123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853238542385523856238572385823859238602386123862238632386423865238662386723868238692387023871238722387323874238752387623877238782387923880238812388223883238842388523886238872388823889238902389123892238932389423895238962389723898238992390023901239022390323904239052390623907239082390923910239112391223913239142391523916239172391823919239202392123922239232392423925239262392723928239292393023931239322393323934239352393623937239382393923940239412394223943239442394523946239472394823949239502395123952239532395423955239562395723958239592396023961239622396323964239652396623967239682396923970239712397223973239742397523976239772397823979239802398123982239832398423985239862398723988239892399023991239922399323994239952399623997239982399924000240012400224003240042400524006240072400824009240102401124012240132401424015240162401724018240192402024021240222402324024240252402624027240282402924030240312403224033240342403524036240372403824039240402404124042240432404424045240462404724048240492405024051240522405324054240552405624057240582405924060240612406224063240642406524066240672406824069240702407124072240732407424075240762407724078240792408024081240822408324084240852408624087240882408924090240912409224093240942409524096240972409824099241002410124102241032410424105241062410724108241092411024111241122411324114241152411624117241182411924120241212412224123241242412524126241272412824129241302413124132241332413424135241362413724138241392414024141241422414324144241452414624147241482414924150241512415224153241542415524156241572415824159241602416124162241632416424165241662416724168241692417024171241722417324174241752417624177241782417924180241812418224183241842418524186241872418824189241902419124192241932419424195241962419724198241992420024201242022420324204242052420624207242082420924210242112421224213242142421524216242172421824219242202422124222242232422424225242262422724228242292423024231242322423324234242352423624237242382423924240242412424224243242442424524246242472424824249242502425124252242532425424255242562425724258242592426024261242622426324264242652426624267242682426924270242712427224273242742427524276242772427824279242802428124282242832428424285242862428724288242892429024291242922429324294242952429624297242982429924300243012430224303243042430524306243072430824309243102431124312243132431424315243162431724318243192432024321243222432324324243252432624327243282432924330243312433224333243342433524336243372433824339243402434124342243432434424345243462434724348243492435024351243522435324354243552435624357243582435924360243612436224363243642436524366243672436824369243702437124372243732437424375243762437724378243792438024381243822438324384243852438624387243882438924390243912439224393243942439524396243972439824399244002440124402244032440424405244062440724408244092441024411244122441324414244152441624417244182441924420244212442224423244242442524426244272442824429244302443124432244332443424435244362443724438244392444024441244422444324444244452444624447244482444924450244512445224453244542445524456244572445824459244602446124462244632446424465244662446724468244692447024471244722447324474244752447624477244782447924480244812448224483244842448524486244872448824489244902449124492244932449424495244962449724498244992450024501245022450324504245052450624507245082450924510245112451224513245142451524516245172451824519245202452124522245232452424525245262452724528245292453024531245322453324534245352453624537245382453924540245412454224543245442454524546245472454824549245502455124552245532455424555245562455724558245592456024561245622456324564245652456624567245682456924570245712457224573245742457524576245772457824579245802458124582245832458424585245862458724588245892459024591245922459324594245952459624597245982459924600246012460224603246042460524606246072460824609246102461124612246132461424615246162461724618246192462024621246222462324624246252462624627246282462924630246312463224633246342463524636246372463824639246402464124642246432464424645246462464724648246492465024651246522465324654246552465624657246582465924660246612466224663246642466524666246672466824669246702467124672246732467424675246762467724678246792468024681246822468324684246852468624687246882468924690246912469224693246942469524696246972469824699247002470124702247032470424705247062470724708247092471024711247122471324714247152471624717247182471924720247212472224723247242472524726247272472824729247302473124732247332473424735247362473724738247392474024741247422474324744247452474624747247482474924750247512475224753247542475524756247572475824759247602476124762247632476424765247662476724768247692477024771247722477324774247752477624777247782477924780247812478224783247842478524786247872478824789247902479124792247932479424795247962479724798247992480024801248022480324804248052480624807248082480924810248112481224813248142481524816248172481824819248202482124822248232482424825248262482724828248292483024831248322483324834248352483624837248382483924840248412484224843248442484524846248472484824849248502485124852248532485424855248562485724858248592486024861248622486324864248652486624867248682486924870248712487224873248742487524876248772487824879248802488124882248832488424885248862488724888248892489024891248922489324894248952489624897248982489924900249012490224903249042490524906249072490824909249102491124912249132491424915249162491724918249192492024921249222492324924249252492624927249282492924930249312493224933249342493524936249372493824939249402494124942249432494424945249462494724948249492495024951249522495324954249552495624957249582495924960249612496224963249642496524966249672496824969249702497124972249732497424975249762497724978249792498024981249822498324984249852498624987249882498924990249912499224993249942499524996249972499824999250002500125002250032500425005250062500725008250092501025011250122501325014250152501625017250182501925020250212502225023250242502525026250272502825029250302503125032250332503425035250362503725038250392504025041250422504325044250452504625047250482504925050250512505225053250542505525056250572505825059250602506125062250632506425065250662506725068250692507025071250722507325074250752507625077250782507925080250812508225083250842508525086250872508825089250902509125092250932509425095250962509725098250992510025101251022510325104251052510625107251082510925110251112511225113251142511525116251172511825119251202512125122251232512425125251262512725128251292513025131251322513325134251352513625137251382513925140251412514225143251442514525146251472514825149251502515125152251532515425155251562515725158251592516025161251622516325164251652516625167251682516925170251712517225173251742517525176251772517825179251802518125182251832518425185251862518725188251892519025191251922519325194251952519625197251982519925200252012520225203252042520525206252072520825209252102521125212252132521425215252162521725218252192522025221252222522325224252252522625227252282522925230252312523225233252342523525236252372523825239252402524125242252432524425245252462524725248252492525025251252522525325254252552525625257252582525925260252612526225263252642526525266252672526825269252702527125272252732527425275252762527725278252792528025281252822528325284252852528625287252882528925290252912529225293252942529525296252972529825299253002530125302253032530425305253062530725308253092531025311253122531325314253152531625317253182531925320253212532225323253242532525326253272532825329253302533125332253332533425335253362533725338253392534025341253422534325344253452534625347253482534925350253512535225353253542535525356253572535825359253602536125362253632536425365253662536725368253692537025371253722537325374253752537625377253782537925380253812538225383253842538525386253872538825389253902539125392253932539425395253962539725398253992540025401254022540325404254052540625407254082540925410254112541225413254142541525416254172541825419254202542125422254232542425425254262542725428254292543025431254322543325434254352543625437254382543925440254412544225443254442544525446254472544825449254502545125452254532545425455254562545725458254592546025461254622546325464254652546625467254682546925470254712547225473254742547525476254772547825479254802548125482254832548425485254862548725488254892549025491254922549325494254952549625497254982549925500255012550225503255042550525506255072550825509255102551125512255132551425515255162551725518255192552025521255222552325524255252552625527255282552925530255312553225533255342553525536255372553825539255402554125542255432554425545255462554725548255492555025551255522555325554255552555625557255582555925560255612556225563255642556525566255672556825569255702557125572255732557425575255762557725578255792558025581255822558325584255852558625587255882558925590255912559225593255942559525596255972559825599256002560125602256032560425605256062560725608256092561025611256122561325614256152561625617256182561925620256212562225623256242562525626256272562825629256302563125632256332563425635256362563725638256392564025641256422564325644256452564625647256482564925650256512565225653256542565525656256572565825659256602566125662256632566425665256662566725668256692567025671256722567325674256752567625677256782567925680256812568225683256842568525686256872568825689256902569125692256932569425695256962569725698256992570025701257022570325704257052570625707257082570925710257112571225713257142571525716257172571825719257202572125722257232572425725257262572725728257292573025731257322573325734257352573625737257382573925740257412574225743257442574525746257472574825749257502575125752257532575425755257562575725758257592576025761257622576325764257652576625767257682576925770257712577225773257742577525776257772577825779257802578125782257832578425785257862578725788257892579025791257922579325794257952579625797257982579925800258012580225803258042580525806258072580825809258102581125812258132581425815258162581725818258192582025821258222582325824258252582625827258282582925830258312583225833258342583525836258372583825839258402584125842258432584425845258462584725848258492585025851258522585325854258552585625857258582585925860258612586225863258642586525866258672586825869258702587125872258732587425875258762587725878258792588025881258822588325884258852588625887258882588925890258912589225893258942589525896258972589825899259002590125902259032590425905259062590725908259092591025911259122591325914259152591625917259182591925920259212592225923259242592525926259272592825929259302593125932259332593425935259362593725938259392594025941259422594325944259452594625947259482594925950259512595225953259542595525956259572595825959259602596125962259632596425965259662596725968259692597025971259722597325974259752597625977259782597925980259812598225983259842598525986259872598825989259902599125992259932599425995259962599725998259992600026001260022600326004260052600626007260082600926010260112601226013260142601526016260172601826019260202602126022260232602426025260262602726028260292603026031260322603326034260352603626037260382603926040260412604226043260442604526046260472604826049260502605126052260532605426055260562605726058260592606026061260622606326064260652606626067260682606926070260712607226073260742607526076260772607826079260802608126082260832608426085260862608726088260892609026091260922609326094260952609626097260982609926100261012610226103261042610526106261072610826109261102611126112261132611426115261162611726118261192612026121261222612326124261252612626127261282612926130261312613226133261342613526136261372613826139261402614126142261432614426145261462614726148261492615026151261522615326154261552615626157261582615926160261612616226163261642616526166261672616826169261702617126172261732617426175261762617726178261792618026181261822618326184261852618626187261882618926190261912619226193261942619526196261972619826199262002620126202262032620426205262062620726208262092621026211262122621326214262152621626217262182621926220262212622226223262242622526226262272622826229262302623126232262332623426235262362623726238262392624026241262422624326244262452624626247262482624926250262512625226253262542625526256262572625826259262602626126262262632626426265262662626726268262692627026271262722627326274262752627626277262782627926280262812628226283262842628526286262872628826289262902629126292262932629426295262962629726298262992630026301263022630326304263052630626307263082630926310263112631226313263142631526316263172631826319263202632126322263232632426325263262632726328263292633026331263322633326334263352633626337263382633926340263412634226343263442634526346263472634826349263502635126352263532635426355263562635726358263592636026361263622636326364263652636626367263682636926370263712637226373263742637526376263772637826379263802638126382263832638426385263862638726388263892639026391263922639326394263952639626397263982639926400264012640226403264042640526406264072640826409264102641126412264132641426415264162641726418264192642026421264222642326424264252642626427264282642926430264312643226433264342643526436264372643826439264402644126442264432644426445264462644726448264492645026451264522645326454264552645626457264582645926460264612646226463264642646526466264672646826469264702647126472264732647426475264762647726478264792648026481264822648326484264852648626487264882648926490264912649226493264942649526496264972649826499265002650126502265032650426505265062650726508265092651026511265122651326514265152651626517265182651926520265212652226523265242652526526265272652826529265302653126532265332653426535265362653726538265392654026541265422654326544265452654626547265482654926550265512655226553265542655526556265572655826559265602656126562265632656426565265662656726568265692657026571265722657326574265752657626577265782657926580265812658226583265842658526586265872658826589265902659126592265932659426595265962659726598265992660026601266022660326604266052660626607266082660926610266112661226613266142661526616266172661826619266202662126622266232662426625266262662726628266292663026631266322663326634266352663626637266382663926640266412664226643266442664526646266472664826649266502665126652266532665426655266562665726658266592666026661266622666326664266652666626667266682666926670266712667226673266742667526676266772667826679266802668126682266832668426685266862668726688266892669026691266922669326694266952669626697266982669926700267012670226703267042670526706267072670826709267102671126712267132671426715267162671726718267192672026721267222672326724267252672626727267282672926730267312673226733267342673526736267372673826739267402674126742267432674426745267462674726748267492675026751267522675326754267552675626757267582675926760267612676226763267642676526766267672676826769267702677126772267732677426775267762677726778267792678026781267822678326784267852678626787267882678926790267912679226793267942679526796267972679826799268002680126802268032680426805268062680726808268092681026811268122681326814268152681626817268182681926820268212682226823268242682526826268272682826829268302683126832268332683426835268362683726838268392684026841268422684326844268452684626847268482684926850268512685226853268542685526856268572685826859268602686126862268632686426865268662686726868268692687026871268722687326874268752687626877268782687926880268812688226883268842688526886268872688826889268902689126892268932689426895268962689726898268992690026901269022690326904269052690626907269082690926910269112691226913269142691526916269172691826919269202692126922269232692426925269262692726928269292693026931269322693326934269352693626937269382693926940269412694226943269442694526946269472694826949269502695126952269532695426955269562695726958269592696026961269622696326964269652696626967269682696926970269712697226973269742697526976269772697826979269802698126982269832698426985269862698726988269892699026991269922699326994269952699626997269982699927000270012700227003270042700527006270072700827009270102701127012270132701427015270162701727018270192702027021270222702327024270252702627027270282702927030270312703227033270342703527036270372703827039270402704127042270432704427045270462704727048270492705027051270522705327054270552705627057270582705927060270612706227063270642706527066270672706827069270702707127072270732707427075270762707727078270792708027081270822708327084270852708627087270882708927090270912709227093270942709527096270972709827099271002710127102271032710427105271062710727108271092711027111271122711327114271152711627117271182711927120271212712227123271242712527126271272712827129271302713127132271332713427135271362713727138271392714027141271422714327144271452714627147271482714927150271512715227153271542715527156271572715827159271602716127162271632716427165271662716727168271692717027171271722717327174271752717627177271782717927180271812718227183271842718527186271872718827189271902719127192271932719427195271962719727198271992720027201272022720327204272052720627207272082720927210272112721227213272142721527216272172721827219272202722127222272232722427225272262722727228272292723027231272322723327234272352723627237272382723927240272412724227243272442724527246272472724827249272502725127252272532725427255272562725727258272592726027261272622726327264272652726627267272682726927270272712727227273272742727527276272772727827279272802728127282272832728427285272862728727288272892729027291272922729327294272952729627297272982729927300273012730227303273042730527306273072730827309273102731127312273132731427315273162731727318273192732027321273222732327324273252732627327273282732927330273312733227333273342733527336273372733827339273402734127342273432734427345273462734727348273492735027351273522735327354273552735627357273582735927360273612736227363273642736527366273672736827369273702737127372273732737427375273762737727378273792738027381273822738327384273852738627387273882738927390273912739227393273942739527396273972739827399274002740127402274032740427405274062740727408274092741027411274122741327414274152741627417274182741927420274212742227423274242742527426274272742827429274302743127432274332743427435274362743727438274392744027441274422744327444274452744627447274482744927450274512745227453274542745527456274572745827459274602746127462274632746427465274662746727468274692747027471274722747327474274752747627477274782747927480274812748227483274842748527486274872748827489274902749127492274932749427495274962749727498274992750027501275022750327504275052750627507275082750927510275112751227513275142751527516275172751827519275202752127522275232752427525275262752727528275292753027531275322753327534275352753627537275382753927540275412754227543275442754527546275472754827549275502755127552275532755427555275562755727558275592756027561275622756327564275652756627567275682756927570275712757227573275742757527576275772757827579275802758127582275832758427585275862758727588275892759027591275922759327594275952759627597275982759927600276012760227603276042760527606276072760827609276102761127612276132761427615276162761727618276192762027621276222762327624276252762627627276282762927630276312763227633276342763527636276372763827639276402764127642276432764427645276462764727648276492765027651276522765327654276552765627657276582765927660276612766227663276642766527666276672766827669276702767127672276732767427675276762767727678276792768027681276822768327684276852768627687276882768927690276912769227693276942769527696276972769827699277002770127702277032770427705277062770727708277092771027711277122771327714277152771627717277182771927720277212772227723277242772527726277272772827729277302773127732277332773427735277362773727738277392774027741277422774327744277452774627747277482774927750277512775227753277542775527756277572775827759277602776127762277632776427765277662776727768277692777027771277722777327774277752777627777277782777927780277812778227783277842778527786277872778827789277902779127792277932779427795277962779727798277992780027801278022780327804278052780627807278082780927810278112781227813278142781527816278172781827819278202782127822278232782427825278262782727828278292783027831278322783327834278352783627837278382783927840278412784227843278442784527846278472784827849278502785127852278532785427855278562785727858278592786027861278622786327864278652786627867278682786927870278712787227873278742787527876278772787827879278802788127882278832788427885278862788727888278892789027891278922789327894278952789627897278982789927900279012790227903279042790527906279072790827909279102791127912279132791427915279162791727918279192792027921279222792327924279252792627927279282792927930279312793227933279342793527936279372793827939279402794127942279432794427945279462794727948279492795027951279522795327954279552795627957279582795927960279612796227963279642796527966279672796827969279702797127972279732797427975279762797727978279792798027981279822798327984279852798627987279882798927990279912799227993279942799527996279972799827999280002800128002280032800428005280062800728008280092801028011280122801328014280152801628017280182801928020280212802228023280242802528026280272802828029280302803128032280332803428035280362803728038280392804028041280422804328044280452804628047280482804928050280512805228053280542805528056280572805828059280602806128062280632806428065280662806728068280692807028071280722807328074280752807628077280782807928080280812808228083280842808528086280872808828089280902809128092280932809428095280962809728098280992810028101281022810328104281052810628107281082810928110281112811228113281142811528116281172811828119281202812128122281232812428125281262812728128281292813028131281322813328134281352813628137281382813928140281412814228143281442814528146281472814828149281502815128152281532815428155281562815728158281592816028161281622816328164281652816628167281682816928170281712817228173281742817528176281772817828179281802818128182281832818428185281862818728188281892819028191281922819328194281952819628197281982819928200282012820228203282042820528206282072820828209282102821128212282132821428215282162821728218282192822028221282222822328224282252822628227282282822928230282312823228233282342823528236282372823828239282402824128242282432824428245282462824728248282492825028251282522825328254282552825628257282582825928260282612826228263282642826528266282672826828269282702827128272282732827428275282762827728278282792828028281282822828328284282852828628287282882828928290282912829228293282942829528296282972829828299283002830128302283032830428305283062830728308283092831028311283122831328314283152831628317283182831928320283212832228323283242832528326283272832828329283302833128332283332833428335283362833728338283392834028341283422834328344283452834628347283482834928350283512835228353283542835528356283572835828359283602836128362283632836428365283662836728368283692837028371283722837328374283752837628377283782837928380283812838228383283842838528386283872838828389283902839128392283932839428395283962839728398283992840028401284022840328404284052840628407284082840928410284112841228413284142841528416284172841828419284202842128422284232842428425284262842728428284292843028431284322843328434284352843628437284382843928440284412844228443284442844528446284472844828449284502845128452284532845428455284562845728458284592846028461284622846328464284652846628467284682846928470284712847228473284742847528476284772847828479284802848128482284832848428485284862848728488284892849028491284922849328494284952849628497284982849928500285012850228503285042850528506285072850828509285102851128512285132851428515285162851728518285192852028521285222852328524285252852628527285282852928530285312853228533285342853528536285372853828539285402854128542285432854428545285462854728548285492855028551285522855328554285552855628557285582855928560285612856228563285642856528566285672856828569285702857128572285732857428575285762857728578285792858028581285822858328584285852858628587285882858928590285912859228593285942859528596285972859828599286002860128602286032860428605286062860728608286092861028611286122861328614286152861628617286182861928620286212862228623286242862528626286272862828629286302863128632286332863428635286362863728638286392864028641286422864328644286452864628647286482864928650286512865228653286542865528656286572865828659286602866128662286632866428665286662866728668286692867028671286722867328674286752867628677286782867928680286812868228683286842868528686286872868828689286902869128692286932869428695286962869728698286992870028701287022870328704287052870628707287082870928710287112871228713287142871528716287172871828719287202872128722287232872428725287262872728728287292873028731287322873328734287352873628737287382873928740287412874228743287442874528746287472874828749287502875128752287532875428755287562875728758287592876028761287622876328764287652876628767287682876928770287712877228773287742877528776287772877828779287802878128782287832878428785287862878728788287892879028791287922879328794287952879628797287982879928800288012880228803288042880528806288072880828809288102881128812288132881428815288162881728818288192882028821288222882328824288252882628827288282882928830288312883228833288342883528836288372883828839288402884128842288432884428845288462884728848288492885028851288522885328854288552885628857288582885928860288612886228863288642886528866288672886828869288702887128872288732887428875288762887728878288792888028881288822888328884288852888628887288882888928890288912889228893288942889528896288972889828899289002890128902289032890428905289062890728908289092891028911289122891328914289152891628917289182891928920289212892228923289242892528926289272892828929289302893128932289332893428935289362893728938289392894028941289422894328944289452894628947289482894928950289512895228953289542895528956289572895828959289602896128962289632896428965289662896728968289692897028971289722897328974289752897628977289782897928980289812898228983289842898528986289872898828989289902899128992289932899428995289962899728998289992900029001290022900329004290052900629007290082900929010290112901229013290142901529016290172901829019290202902129022290232902429025290262902729028290292903029031290322903329034290352903629037290382903929040290412904229043290442904529046290472904829049290502905129052290532905429055290562905729058290592906029061290622906329064290652906629067290682906929070290712907229073290742907529076290772907829079290802908129082290832908429085290862908729088290892909029091290922909329094290952909629097290982909929100291012910229103291042910529106291072910829109291102911129112291132911429115291162911729118291192912029121291222912329124291252912629127291282912929130291312913229133291342913529136291372913829139291402914129142291432914429145291462914729148291492915029151291522915329154291552915629157291582915929160291612916229163291642916529166291672916829169291702917129172291732917429175291762917729178291792918029181291822918329184291852918629187291882918929190291912919229193291942919529196291972919829199292002920129202292032920429205292062920729208292092921029211292122921329214292152921629217292182921929220292212922229223292242922529226292272922829229292302923129232292332923429235292362923729238292392924029241292422924329244292452924629247292482924929250292512925229253292542925529256292572925829259292602926129262292632926429265292662926729268292692927029271292722927329274292752927629277292782927929280292812928229283292842928529286292872928829289292902929129292292932929429295292962929729298292992930029301293022930329304293052930629307293082930929310293112931229313293142931529316293172931829319293202932129322293232932429325293262932729328293292933029331293322933329334293352933629337293382933929340293412934229343293442934529346293472934829349293502935129352293532935429355293562935729358293592936029361293622936329364293652936629367293682936929370293712937229373293742937529376293772937829379293802938129382293832938429385293862938729388293892939029391293922939329394293952939629397293982939929400294012940229403294042940529406294072940829409294102941129412294132941429415294162941729418294192942029421294222942329424294252942629427294282942929430294312943229433294342943529436294372943829439294402944129442294432944429445294462944729448294492945029451294522945329454294552945629457294582945929460294612946229463294642946529466294672946829469294702947129472294732947429475294762947729478294792948029481294822948329484294852948629487294882948929490294912949229493294942949529496294972949829499295002950129502295032950429505295062950729508295092951029511295122951329514295152951629517295182951929520295212952229523295242952529526295272952829529295302953129532295332953429535295362953729538295392954029541295422954329544295452954629547295482954929550295512955229553295542955529556295572955829559295602956129562295632956429565295662956729568295692957029571295722957329574295752957629577295782957929580295812958229583295842958529586295872958829589295902959129592295932959429595295962959729598295992960029601296022960329604296052960629607296082960929610296112961229613296142961529616296172961829619296202962129622296232962429625296262962729628296292963029631296322963329634296352963629637296382963929640296412964229643296442964529646296472964829649296502965129652296532965429655296562965729658296592966029661296622966329664296652966629667296682966929670296712967229673296742967529676296772967829679296802968129682296832968429685296862968729688296892969029691296922969329694296952969629697296982969929700297012970229703297042970529706297072970829709297102971129712297132971429715297162971729718297192972029721297222972329724297252972629727297282972929730297312973229733297342973529736297372973829739297402974129742297432974429745297462974729748297492975029751297522975329754297552975629757297582975929760297612976229763297642976529766297672976829769297702977129772297732977429775297762977729778297792978029781297822978329784297852978629787297882978929790297912979229793297942979529796297972979829799298002980129802298032980429805298062980729808298092981029811298122981329814298152981629817298182981929820298212982229823298242982529826298272982829829298302983129832298332983429835298362983729838298392984029841298422984329844298452984629847298482984929850298512985229853298542985529856298572985829859298602986129862298632986429865298662986729868298692987029871298722987329874298752987629877298782987929880298812988229883298842988529886298872988829889298902989129892298932989429895298962989729898298992990029901299022990329904299052990629907299082990929910299112991229913299142991529916299172991829919299202992129922299232992429925299262992729928299292993029931299322993329934299352993629937299382993929940299412994229943299442994529946299472994829949299502995129952299532995429955299562995729958299592996029961299622996329964299652996629967299682996929970299712997229973299742997529976299772997829979299802998129982299832998429985299862998729988299892999029991299922999329994299952999629997299982999930000300013000230003300043000530006300073000830009300103001130012300133001430015300163001730018300193002030021300223002330024300253002630027300283002930030300313003230033300343003530036300373003830039300403004130042300433004430045300463004730048300493005030051300523005330054300553005630057300583005930060300613006230063300643006530066300673006830069300703007130072300733007430075300763007730078300793008030081300823008330084300853008630087300883008930090300913009230093300943009530096300973009830099301003010130102301033010430105301063010730108301093011030111301123011330114301153011630117301183011930120301213012230123301243012530126301273012830129301303013130132301333013430135301363013730138301393014030141301423014330144301453014630147301483014930150301513015230153301543015530156301573015830159301603016130162301633016430165301663016730168301693017030171301723017330174301753017630177301783017930180301813018230183301843018530186301873018830189301903019130192301933019430195301963019730198301993020030201302023020330204302053020630207302083020930210302113021230213302143021530216302173021830219302203022130222302233022430225302263022730228302293023030231302323023330234302353023630237302383023930240302413024230243302443024530246302473024830249302503025130252302533025430255302563025730258302593026030261302623026330264302653026630267302683026930270302713027230273302743027530276302773027830279302803028130282302833028430285302863028730288302893029030291302923029330294302953029630297302983029930300303013030230303303043030530306303073030830309303103031130312303133031430315303163031730318303193032030321303223032330324303253032630327303283032930330303313033230333303343033530336303373033830339303403034130342303433034430345303463034730348303493035030351303523035330354303553035630357303583035930360303613036230363303643036530366303673036830369303703037130372303733037430375303763037730378303793038030381303823038330384303853038630387303883038930390303913039230393303943039530396303973039830399304003040130402304033040430405304063040730408304093041030411304123041330414304153041630417304183041930420304213042230423304243042530426304273042830429304303043130432304333043430435304363043730438304393044030441304423044330444304453044630447304483044930450304513045230453304543045530456304573045830459304603046130462304633046430465304663046730468304693047030471304723047330474304753047630477304783047930480304813048230483304843048530486304873048830489304903049130492304933049430495304963049730498304993050030501305023050330504305053050630507305083050930510305113051230513305143051530516305173051830519305203052130522305233052430525305263052730528305293053030531305323053330534305353053630537305383053930540305413054230543305443054530546305473054830549305503055130552305533055430555305563055730558305593056030561305623056330564305653056630567305683056930570305713057230573305743057530576305773057830579305803058130582305833058430585305863058730588305893059030591305923059330594305953059630597305983059930600306013060230603306043060530606306073060830609306103061130612306133061430615306163061730618306193062030621306223062330624306253062630627306283062930630306313063230633306343063530636306373063830639306403064130642306433064430645306463064730648306493065030651306523065330654306553065630657306583065930660306613066230663306643066530666306673066830669306703067130672306733067430675306763067730678306793068030681306823068330684306853068630687306883068930690306913069230693306943069530696306973069830699307003070130702307033070430705307063070730708307093071030711307123071330714307153071630717307183071930720307213072230723307243072530726307273072830729307303073130732307333073430735307363073730738307393074030741307423074330744307453074630747307483074930750307513075230753307543075530756307573075830759307603076130762307633076430765307663076730768307693077030771307723077330774307753077630777307783077930780307813078230783307843078530786307873078830789307903079130792307933079430795307963079730798307993080030801308023080330804308053080630807308083080930810308113081230813308143081530816308173081830819308203082130822308233082430825308263082730828308293083030831308323083330834308353083630837308383083930840308413084230843308443084530846308473084830849308503085130852308533085430855308563085730858308593086030861308623086330864308653086630867308683086930870308713087230873308743087530876308773087830879308803088130882308833088430885308863088730888308893089030891308923089330894308953089630897308983089930900309013090230903309043090530906309073090830909309103091130912309133091430915309163091730918309193092030921309223092330924309253092630927309283092930930309313093230933309343093530936309373093830939309403094130942309433094430945309463094730948309493095030951309523095330954309553095630957309583095930960309613096230963309643096530966309673096830969309703097130972309733097430975309763097730978309793098030981309823098330984309853098630987309883098930990309913099230993309943099530996309973099830999310003100131002310033100431005310063100731008310093101031011310123101331014310153101631017310183101931020310213102231023310243102531026310273102831029310303103131032310333103431035310363103731038310393104031041310423104331044310453104631047310483104931050310513105231053310543105531056310573105831059310603106131062310633106431065310663106731068310693107031071310723107331074310753107631077310783107931080310813108231083310843108531086310873108831089310903109131092310933109431095310963109731098310993110031101311023110331104311053110631107311083110931110311113111231113311143111531116311173111831119311203112131122311233112431125311263112731128311293113031131311323113331134311353113631137311383113931140311413114231143311443114531146311473114831149311503115131152311533115431155311563115731158311593116031161311623116331164311653116631167311683116931170311713117231173311743117531176311773117831179311803118131182311833118431185311863118731188311893119031191311923119331194311953119631197311983119931200312013120231203312043120531206312073120831209312103121131212312133121431215312163121731218312193122031221312223122331224312253122631227312283122931230312313123231233312343123531236312373123831239312403124131242312433124431245312463124731248312493125031251312523125331254312553125631257312583125931260312613126231263312643126531266312673126831269312703127131272312733127431275312763127731278312793128031281312823128331284312853128631287312883128931290312913129231293312943129531296312973129831299313003130131302313033130431305313063130731308313093131031311313123131331314313153131631317313183131931320313213132231323313243132531326313273132831329313303133131332313333133431335313363133731338313393134031341313423134331344313453134631347313483134931350313513135231353313543135531356313573135831359313603136131362313633136431365313663136731368313693137031371313723137331374313753137631377313783137931380313813138231383313843138531386313873138831389313903139131392313933139431395313963139731398313993140031401314023140331404314053140631407314083140931410314113141231413314143141531416314173141831419314203142131422314233142431425314263142731428314293143031431314323143331434314353143631437314383143931440314413144231443314443144531446314473144831449314503145131452314533145431455314563145731458314593146031461314623146331464314653146631467314683146931470314713147231473314743147531476314773147831479314803148131482314833148431485314863148731488314893149031491314923149331494314953149631497314983149931500315013150231503315043150531506315073150831509315103151131512315133151431515315163151731518315193152031521315223152331524315253152631527315283152931530315313153231533315343153531536315373153831539315403154131542315433154431545315463154731548315493155031551315523155331554315553155631557315583155931560315613156231563315643156531566315673156831569315703157131572315733157431575315763157731578315793158031581315823158331584315853158631587315883158931590315913159231593315943159531596315973159831599316003160131602316033160431605316063160731608316093161031611316123161331614316153161631617316183161931620316213162231623316243162531626316273162831629316303163131632316333163431635316363163731638316393164031641316423164331644316453164631647316483164931650316513165231653316543165531656316573165831659316603166131662316633166431665316663166731668316693167031671316723167331674316753167631677316783167931680316813168231683316843168531686316873168831689316903169131692316933169431695316963169731698316993170031701317023170331704317053170631707317083170931710317113171231713317143171531716317173171831719317203172131722317233172431725317263172731728317293173031731317323173331734317353173631737317383173931740317413174231743317443174531746317473174831749317503175131752317533175431755317563175731758317593176031761317623176331764317653176631767317683176931770317713177231773317743177531776317773177831779317803178131782317833178431785317863178731788317893179031791317923179331794317953179631797317983179931800318013180231803318043180531806318073180831809318103181131812318133181431815318163181731818318193182031821318223182331824318253182631827318283182931830318313183231833318343183531836318373183831839318403184131842318433184431845318463184731848318493185031851318523185331854318553185631857318583185931860318613186231863318643186531866318673186831869318703187131872318733187431875318763187731878318793188031881318823188331884318853188631887318883188931890318913189231893318943189531896318973189831899319003190131902319033190431905319063190731908319093191031911319123191331914319153191631917319183191931920319213192231923319243192531926319273192831929319303193131932319333193431935319363193731938319393194031941319423194331944319453194631947319483194931950319513195231953319543195531956319573195831959319603196131962319633196431965319663196731968319693197031971319723197331974319753197631977319783197931980319813198231983319843198531986319873198831989319903199131992319933199431995319963199731998319993200032001320023200332004320053200632007320083200932010320113201232013320143201532016320173201832019320203202132022320233202432025320263202732028320293203032031320323203332034320353203632037320383203932040320413204232043320443204532046320473204832049320503205132052320533205432055320563205732058320593206032061320623206332064320653206632067320683206932070320713207232073320743207532076320773207832079320803208132082320833208432085320863208732088320893209032091320923209332094320953209632097320983209932100321013210232103321043210532106321073210832109321103211132112321133211432115321163211732118321193212032121321223212332124321253212632127321283212932130321313213232133321343213532136321373213832139321403214132142321433214432145321463214732148321493215032151321523215332154321553215632157321583215932160321613216232163321643216532166321673216832169321703217132172321733217432175321763217732178321793218032181321823218332184321853218632187321883218932190321913219232193321943219532196321973219832199322003220132202322033220432205322063220732208322093221032211322123221332214322153221632217322183221932220322213222232223322243222532226322273222832229322303223132232322333223432235322363223732238322393224032241322423224332244322453224632247322483224932250322513225232253322543225532256322573225832259322603226132262322633226432265322663226732268322693227032271322723227332274322753227632277322783227932280322813228232283322843228532286322873228832289322903229132292322933229432295322963229732298322993230032301323023230332304323053230632307323083230932310323113231232313323143231532316323173231832319323203232132322323233232432325323263232732328323293233032331323323233332334323353233632337323383233932340323413234232343323443234532346323473234832349323503235132352323533235432355323563235732358323593236032361323623236332364323653236632367323683236932370323713237232373323743237532376323773237832379323803238132382323833238432385323863238732388323893239032391323923239332394323953239632397323983239932400324013240232403324043240532406324073240832409324103241132412324133241432415324163241732418324193242032421324223242332424324253242632427324283242932430324313243232433324343243532436324373243832439324403244132442324433244432445324463244732448324493245032451324523245332454324553245632457324583245932460324613246232463324643246532466324673246832469324703247132472324733247432475324763247732478324793248032481324823248332484324853248632487324883248932490324913249232493324943249532496324973249832499325003250132502325033250432505325063250732508325093251032511325123251332514325153251632517325183251932520325213252232523325243252532526325273252832529325303253132532325333253432535325363253732538325393254032541325423254332544325453254632547325483254932550325513255232553325543255532556325573255832559325603256132562325633256432565325663256732568325693257032571325723257332574325753257632577325783257932580325813258232583325843258532586325873258832589325903259132592325933259432595325963259732598325993260032601326023260332604326053260632607326083260932610326113261232613326143261532616326173261832619326203262132622326233262432625326263262732628326293263032631326323263332634326353263632637326383263932640326413264232643326443264532646326473264832649326503265132652326533265432655326563265732658326593266032661326623266332664326653266632667326683266932670326713267232673326743267532676326773267832679326803268132682326833268432685326863268732688326893269032691326923269332694326953269632697326983269932700327013270232703327043270532706327073270832709327103271132712327133271432715327163271732718327193272032721327223272332724327253272632727327283272932730327313273232733327343273532736327373273832739327403274132742327433274432745327463274732748327493275032751327523275332754327553275632757327583275932760327613276232763327643276532766327673276832769327703277132772327733277432775327763277732778327793278032781327823278332784327853278632787327883278932790327913279232793327943279532796327973279832799328003280132802328033280432805328063280732808328093281032811328123281332814328153281632817328183281932820328213282232823328243282532826328273282832829328303283132832328333283432835328363283732838328393284032841328423284332844328453284632847328483284932850328513285232853328543285532856328573285832859328603286132862328633286432865328663286732868328693287032871328723287332874328753287632877328783287932880328813288232883328843288532886328873288832889328903289132892328933289432895328963289732898328993290032901329023290332904329053290632907329083290932910329113291232913329143291532916329173291832919329203292132922329233292432925329263292732928329293293032931329323293332934329353293632937329383293932940329413294232943329443294532946329473294832949329503295132952329533295432955329563295732958329593296032961329623296332964329653296632967329683296932970329713297232973329743297532976329773297832979329803298132982329833298432985329863298732988329893299032991329923299332994329953299632997329983299933000330013300233003330043300533006330073300833009330103301133012330133301433015330163301733018330193302033021330223302333024330253302633027330283302933030330313303233033330343303533036330373303833039330403304133042330433304433045330463304733048330493305033051330523305333054330553305633057330583305933060330613306233063330643306533066330673306833069330703307133072330733307433075330763307733078330793308033081330823308333084330853308633087330883308933090330913309233093330943309533096330973309833099331003310133102331033310433105331063310733108331093311033111331123311333114331153311633117331183311933120331213312233123331243312533126331273312833129331303313133132331333313433135331363313733138331393314033141331423314333144331453314633147331483314933150331513315233153331543315533156331573315833159331603316133162331633316433165331663316733168331693317033171331723317333174331753317633177331783317933180331813318233183331843318533186331873318833189331903319133192331933319433195331963319733198331993320033201332023320333204332053320633207332083320933210332113321233213332143321533216332173321833219332203322133222332233322433225332263322733228332293323033231332323323333234332353323633237332383323933240332413324233243332443324533246332473324833249332503325133252332533325433255332563325733258332593326033261332623326333264332653326633267332683326933270332713327233273332743327533276332773327833279332803328133282332833328433285332863328733288332893329033291332923329333294332953329633297332983329933300333013330233303333043330533306333073330833309333103331133312333133331433315333163331733318333193332033321333223332333324333253332633327333283332933330333313333233333333343333533336333373333833339333403334133342333433334433345333463334733348333493335033351333523335333354333553335633357333583335933360333613336233363333643336533366333673336833369333703337133372333733337433375333763337733378333793338033381333823338333384333853338633387333883338933390333913339233393333943339533396333973339833399334003340133402334033340433405334063340733408334093341033411334123341333414334153341633417334183341933420334213342233423334243342533426334273342833429334303343133432334333343433435334363343733438334393344033441334423344333444334453344633447334483344933450334513345233453334543345533456334573345833459334603346133462334633346433465334663346733468334693347033471334723347333474334753347633477334783347933480334813348233483334843348533486334873348833489334903349133492334933349433495334963349733498334993350033501335023350333504335053350633507335083350933510335113351233513335143351533516335173351833519335203352133522335233352433525335263352733528335293353033531335323353333534335353353633537335383353933540335413354233543335443354533546335473354833549335503355133552335533355433555335563355733558335593356033561335623356333564335653356633567335683356933570335713357233573335743357533576335773357833579335803358133582335833358433585335863358733588335893359033591335923359333594335953359633597335983359933600336013360233603336043360533606336073360833609336103361133612336133361433615336163361733618336193362033621336223362333624336253362633627336283362933630336313363233633336343363533636336373363833639336403364133642336433364433645336463364733648336493365033651336523365333654336553365633657336583365933660336613366233663336643366533666336673366833669336703367133672336733367433675336763367733678336793368033681336823368333684336853368633687336883368933690336913369233693336943369533696336973369833699337003370133702337033370433705337063370733708337093371033711337123371333714337153371633717337183371933720337213372233723337243372533726337273372833729337303373133732337333373433735337363373733738337393374033741337423374333744337453374633747337483374933750337513375233753337543375533756337573375833759337603376133762337633376433765337663376733768337693377033771337723377333774337753377633777337783377933780337813378233783337843378533786337873378833789337903379133792337933379433795337963379733798337993380033801338023380333804338053380633807338083380933810338113381233813338143381533816338173381833819338203382133822338233382433825338263382733828338293383033831338323383333834338353383633837338383383933840338413384233843338443384533846338473384833849338503385133852338533385433855338563385733858338593386033861338623386333864338653386633867338683386933870338713387233873338743387533876338773387833879338803388133882338833388433885338863388733888338893389033891338923389333894338953389633897338983389933900339013390233903339043390533906339073390833909339103391133912339133391433915339163391733918339193392033921339223392333924339253392633927339283392933930339313393233933339343393533936339373393833939339403394133942339433394433945339463394733948339493395033951339523395333954339553395633957339583395933960339613396233963339643396533966339673396833969339703397133972339733397433975339763397733978339793398033981339823398333984339853398633987339883398933990339913399233993339943399533996339973399833999340003400134002340033400434005340063400734008340093401034011340123401334014340153401634017340183401934020340213402234023340243402534026340273402834029340303403134032340333403434035340363403734038340393404034041340423404334044340453404634047340483404934050340513405234053340543405534056340573405834059340603406134062340633406434065340663406734068340693407034071340723407334074340753407634077340783407934080340813408234083340843408534086340873408834089340903409134092340933409434095340963409734098340993410034101341023410334104341053410634107341083410934110341113411234113341143411534116341173411834119341203412134122341233412434125341263412734128341293413034131341323413334134341353413634137341383413934140341413414234143341443414534146341473414834149341503415134152341533415434155341563415734158341593416034161341623416334164341653416634167341683416934170341713417234173341743417534176341773417834179341803418134182341833418434185341863418734188341893419034191341923419334194341953419634197341983419934200342013420234203342043420534206342073420834209342103421134212342133421434215342163421734218342193422034221342223422334224342253422634227342283422934230342313423234233342343423534236342373423834239342403424134242342433424434245342463424734248342493425034251342523425334254342553425634257342583425934260342613426234263342643426534266342673426834269342703427134272342733427434275342763427734278342793428034281342823428334284342853428634287342883428934290342913429234293342943429534296342973429834299343003430134302343033430434305343063430734308343093431034311343123431334314343153431634317343183431934320343213432234323343243432534326343273432834329343303433134332343333433434335343363433734338343393434034341343423434334344343453434634347343483434934350343513435234353343543435534356343573435834359343603436134362343633436434365343663436734368343693437034371343723437334374343753437634377343783437934380343813438234383343843438534386343873438834389343903439134392343933439434395343963439734398343993440034401344023440334404344053440634407344083440934410344113441234413344143441534416344173441834419344203442134422344233442434425344263442734428344293443034431344323443334434344353443634437344383443934440344413444234443344443444534446344473444834449344503445134452344533445434455344563445734458344593446034461344623446334464344653446634467344683446934470344713447234473344743447534476344773447834479344803448134482344833448434485344863448734488344893449034491344923449334494344953449634497344983449934500345013450234503345043450534506345073450834509345103451134512345133451434515345163451734518345193452034521345223452334524345253452634527345283452934530345313453234533345343453534536345373453834539345403454134542345433454434545345463454734548345493455034551345523455334554345553455634557345583455934560345613456234563345643456534566345673456834569345703457134572345733457434575345763457734578345793458034581345823458334584345853458634587345883458934590345913459234593345943459534596345973459834599346003460134602346033460434605346063460734608346093461034611346123461334614346153461634617346183461934620346213462234623346243462534626346273462834629346303463134632346333463434635346363463734638346393464034641346423464334644346453464634647346483464934650346513465234653346543465534656346573465834659346603466134662346633466434665346663466734668346693467034671346723467334674346753467634677346783467934680346813468234683346843468534686346873468834689346903469134692346933469434695346963469734698346993470034701347023470334704347053470634707347083470934710347113471234713347143471534716347173471834719347203472134722347233472434725347263472734728347293473034731347323473334734347353473634737347383473934740347413474234743347443474534746347473474834749347503475134752347533475434755347563475734758347593476034761347623476334764347653476634767347683476934770347713477234773347743477534776347773477834779347803478134782347833478434785347863478734788347893479034791347923479334794347953479634797347983479934800348013480234803348043480534806348073480834809348103481134812348133481434815348163481734818348193482034821348223482334824348253482634827348283482934830348313483234833348343483534836348373483834839348403484134842348433484434845348463484734848348493485034851348523485334854348553485634857348583485934860348613486234863348643486534866348673486834869348703487134872348733487434875348763487734878348793488034881348823488334884348853488634887348883488934890348913489234893348943489534896348973489834899349003490134902349033490434905349063490734908349093491034911349123491334914349153491634917349183491934920349213492234923349243492534926349273492834929349303493134932349333493434935349363493734938349393494034941349423494334944349453494634947349483494934950349513495234953349543495534956349573495834959349603496134962349633496434965349663496734968349693497034971349723497334974349753497634977349783497934980349813498234983349843498534986349873498834989349903499134992349933499434995349963499734998349993500035001350023500335004350053500635007350083500935010350113501235013350143501535016350173501835019350203502135022350233502435025350263502735028350293503035031350323503335034350353503635037350383503935040350413504235043350443504535046350473504835049350503505135052350533505435055350563505735058350593506035061350623506335064350653506635067350683506935070350713507235073350743507535076350773507835079350803508135082350833508435085350863508735088350893509035091350923509335094350953509635097350983509935100351013510235103351043510535106351073510835109351103511135112351133511435115351163511735118351193512035121351223512335124351253512635127351283512935130351313513235133351343513535136351373513835139351403514135142351433514435145351463514735148351493515035151351523515335154351553515635157351583515935160351613516235163351643516535166351673516835169351703517135172351733517435175351763517735178351793518035181351823518335184351853518635187351883518935190351913519235193351943519535196351973519835199352003520135202352033520435205352063520735208352093521035211352123521335214352153521635217352183521935220352213522235223352243522535226352273522835229352303523135232352333523435235352363523735238352393524035241352423524335244352453524635247352483524935250352513525235253352543525535256352573525835259352603526135262352633526435265352663526735268352693527035271352723527335274352753527635277352783527935280352813528235283352843528535286352873528835289352903529135292352933529435295352963529735298352993530035301353023530335304353053530635307353083530935310353113531235313353143531535316353173531835319353203532135322353233532435325353263532735328353293533035331353323533335334353353533635337353383533935340353413534235343353443534535346353473534835349353503535135352353533535435355353563535735358353593536035361353623536335364353653536635367353683536935370353713537235373353743537535376353773537835379353803538135382353833538435385353863538735388353893539035391353923539335394353953539635397353983539935400354013540235403354043540535406354073540835409354103541135412354133541435415354163541735418354193542035421354223542335424354253542635427354283542935430354313543235433354343543535436354373543835439354403544135442354433544435445354463544735448354493545035451354523545335454354553545635457354583545935460354613546235463354643546535466354673546835469354703547135472354733547435475354763547735478354793548035481354823548335484354853548635487354883548935490354913549235493354943549535496354973549835499355003550135502355033550435505355063550735508355093551035511355123551335514355153551635517355183551935520355213552235523355243552535526355273552835529355303553135532355333553435535355363553735538355393554035541355423554335544355453554635547355483554935550355513555235553355543555535556355573555835559355603556135562355633556435565355663556735568355693557035571355723557335574355753557635577355783557935580355813558235583355843558535586355873558835589355903559135592355933559435595355963559735598355993560035601356023560335604356053560635607356083560935610356113561235613356143561535616356173561835619356203562135622356233562435625356263562735628356293563035631356323563335634356353563635637356383563935640356413564235643356443564535646356473564835649356503565135652356533565435655356563565735658356593566035661356623566335664356653566635667356683566935670356713567235673356743567535676356773567835679356803568135682356833568435685356863568735688356893569035691356923569335694356953569635697356983569935700357013570235703357043570535706357073570835709357103571135712357133571435715357163571735718357193572035721357223572335724357253572635727357283572935730357313573235733357343573535736357373573835739357403574135742357433574435745357463574735748357493575035751357523575335754357553575635757357583575935760357613576235763357643576535766357673576835769357703577135772357733577435775357763577735778357793578035781357823578335784357853578635787357883578935790357913579235793357943579535796357973579835799358003580135802358033580435805358063580735808358093581035811358123581335814358153581635817358183581935820358213582235823358243582535826358273582835829358303583135832358333583435835358363583735838358393584035841358423584335844358453584635847358483584935850358513585235853358543585535856358573585835859358603586135862
  1. /******/ (() => { // webpackBootstrap
  2. /******/ var __webpack_modules__ = ({
  3. /***/ "./node_modules/@coreui/icons-vue/dist/index.es.js":
  4. /*!*********************************************************!*\
  5. !*** ./node_modules/@coreui/icons-vue/dist/index.es.js ***!
  6. \*********************************************************/
  7. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8. "use strict";
  9. __webpack_require__.r(__webpack_exports__);
  10. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11. /* harmony export */ "CIcon": () => (/* binding */ CIcon),
  12. /* harmony export */ "default": () => (/* binding */ CIcon)
  13. /* harmony export */ });
  14. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  15. const CIcon = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  16. name: 'CIcon',
  17. props: {
  18. /**
  19. * Use `:icon="..."` instead of
  20. *
  21. * @deprecated since version 3.0
  22. */
  23. content: {
  24. type: [String, Array],
  25. default: undefined,
  26. required: false,
  27. },
  28. /**
  29. * Use for replacing default CIcon component classes. Prop is overriding the 'size' prop.
  30. */
  31. customClassName: {
  32. type: [String, Array, Object],
  33. default: undefined,
  34. required: false,
  35. },
  36. /**
  37. * Name of the icon placed in React object or SVG content.
  38. */
  39. icon: {
  40. type: [String, Array],
  41. default: undefined,
  42. required: false,
  43. },
  44. /**
  45. * Use `icon="..."` instead of
  46. *
  47. * @deprecated since version 3.0
  48. */
  49. name: {
  50. type: String,
  51. default: undefined,
  52. required: false,
  53. },
  54. /**
  55. * Size of the icon. Available sizes: 'sm', 'lg', 'xl', 'xxl', '3xl...9xl', 'custom', 'custom-size'.
  56. */
  57. size: {
  58. type: String,
  59. default: undefined,
  60. required: false,
  61. validator: (value) => {
  62. return [
  63. 'custom',
  64. 'custom-size',
  65. 'sm',
  66. 'lg',
  67. 'xl',
  68. 'xxl',
  69. '3xl',
  70. '4xl',
  71. '5xl',
  72. '6xl',
  73. '7xl',
  74. '8xl',
  75. '9xl',
  76. ].includes(value);
  77. },
  78. },
  79. /**
  80. * Title tag content.
  81. */
  82. title: {
  83. type: String,
  84. default: undefined,
  85. required: false,
  86. },
  87. /**
  88. * If defined component will be rendered using 'use' tag.
  89. */
  90. use: {
  91. type: String,
  92. default: undefined,
  93. required: false,
  94. },
  95. },
  96. setup(props, { attrs }) {
  97. const icons = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('icons');
  98. const _icon = props.icon || props.content || props.name;
  99. const toCamelCase = (str) => {
  100. return str
  101. .replace(/([-_][a-z0-9])/gi, ($1) => {
  102. return $1.toUpperCase();
  103. })
  104. .replace(/-/gi, '');
  105. };
  106. const iconName = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => _icon && typeof _icon === 'string' ? (_icon.includes('-') ? toCamelCase(_icon) : _icon) : '');
  107. const titleCode = props.title ? `<title>${props.title}</title>` : 'undefined';
  108. const code = (0,vue__WEBPACK_IMPORTED_MODULE_0__.computed)(() => Array.isArray(_icon)
  109. ? _icon
  110. : typeof _icon === 'string' && iconName.value && icons[iconName.value]
  111. ? icons[iconName.value]
  112. : 'undefined');
  113. const iconCode = Array.isArray(code.value) ? code.value[1] || code.value[0] : code.value;
  114. const scale = Array.isArray(code.value) && code.value.length > 1 ? code.value[0] : '64 64';
  115. const viewBox = attrs.viewBox || `0 0 ${scale}`;
  116. const size = () => {
  117. const addCustom = !props.size && (attrs.width || attrs.height);
  118. return props.size === 'custom' || addCustom ? 'custom-size' : props.size;
  119. };
  120. const classNames = (() => {
  121. return [props.customClassName || ['icon', { [`icon-${size()}`]: size() }], attrs.class];
  122. })();
  123. return () => props.use
  124. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('svg', {
  125. ...attrs,
  126. xmlns: 'http://www.w3.org/2000/svg',
  127. class: classNames,
  128. role: 'img',
  129. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('use', { href: props.use }))
  130. : (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('svg', {
  131. ...attrs,
  132. xmlns: 'http://www.w3.org/2000/svg',
  133. class: classNames,
  134. viewBox: viewBox,
  135. innerHTML: `${titleCode}${iconCode}`,
  136. role: 'img',
  137. });
  138. },
  139. });
  140. //# sourceMappingURL=index.es.js.map
  141. /***/ }),
  142. /***/ "./node_modules/@coreui/icons/js/free/cil-account-logout.js":
  143. /*!******************************************************************!*\
  144. !*** ./node_modules/@coreui/icons/js/free/cil-account-logout.js ***!
  145. \******************************************************************/
  146. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  147. "use strict";
  148. __webpack_require__.r(__webpack_exports__);
  149. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  150. /* harmony export */ "cilAccountLogout": () => (/* binding */ cilAccountLogout)
  151. /* harmony export */ });
  152. const cilAccountLogout = ["512 512","<polygon fill='var(--ci-primary-color, currentColor)' points='77.155 272.034 351.75 272.034 351.75 272.033 351.75 240.034 351.75 240.033 77.155 240.033 152.208 164.98 152.208 164.98 152.208 164.979 129.58 142.353 15.899 256.033 15.9 256.034 15.899 256.034 129.58 369.715 152.208 347.088 152.208 347.087 152.208 347.087 77.155 272.034' class='ci-primary'/><polygon fill='var(--ci-primary-color, currentColor)' points='160 16 160 48 464 48 464 464 160 464 160 496 496 496 496 16 160 16' class='ci-primary'/>"]
  153. /***/ }),
  154. /***/ "./node_modules/@coreui/icons/js/free/cil-circle.js":
  155. /*!**********************************************************!*\
  156. !*** ./node_modules/@coreui/icons/js/free/cil-circle.js ***!
  157. \**********************************************************/
  158. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  159. "use strict";
  160. __webpack_require__.r(__webpack_exports__);
  161. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  162. /* harmony export */ "cilCircle": () => (/* binding */ cilCircle)
  163. /* harmony export */ });
  164. const cilCircle = ["512 512","<path fill='var(--ci-primary-color, currentColor)' d='M256.6,496A239.364,239.364,0,0,0,425.856,87.379,239.364,239.364,0,0,0,87.344,425.892,237.8,237.8,0,0,0,256.6,496Zm0-446.729c114.341,0,207.365,93.023,207.365,207.364S370.941,464,256.6,464,49.236,370.977,49.236,256.635,142.259,49.271,256.6,49.271Z' class='ci-primary'/>"]
  165. /***/ }),
  166. /***/ "./node_modules/@coreui/icons/js/free/cil-lock-locked.js":
  167. /*!***************************************************************!*\
  168. !*** ./node_modules/@coreui/icons/js/free/cil-lock-locked.js ***!
  169. \***************************************************************/
  170. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  171. "use strict";
  172. __webpack_require__.r(__webpack_exports__);
  173. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  174. /* harmony export */ "cilLockLocked": () => (/* binding */ cilLockLocked)
  175. /* harmony export */ });
  176. const cilLockLocked = ["512 512","<path fill='var(--ci-primary-color, currentColor)' d='M384,200V144a128,128,0,0,0-256,0v56H88V328c0,92.635,75.364,168,168,168s168-75.365,168-168V200ZM160,144a96,96,0,0,1,192,0v56H160ZM392,328c0,74.99-61.01,136-136,136s-136-61.01-136-136V232H392Z' class='ci-primary'/>"]
  177. /***/ }),
  178. /***/ "./node_modules/@coreui/icons/js/free/cil-loop-circular.js":
  179. /*!*****************************************************************!*\
  180. !*** ./node_modules/@coreui/icons/js/free/cil-loop-circular.js ***!
  181. \*****************************************************************/
  182. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  183. "use strict";
  184. __webpack_require__.r(__webpack_exports__);
  185. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  186. /* harmony export */ "cilLoopCircular": () => (/* binding */ cilLoopCircular)
  187. /* harmony export */ });
  188. const cilLoopCircular = ["512 512","<path fill='var(--ci-primary-color, currentColor)' d='M415.313,358.7c36.453-36.452,55.906-85.231,54.779-137.353-1.112-51.375-21.964-99.908-58.715-136.66L388.75,107.314A166.816,166.816,0,0,1,438.1,222.039c.937,43.313-15.191,83.81-45.463,114.083l-48.617,49.051.044-89.165-32-.016L311.992,440H456.063V408H366.449Z' class='ci-primary'/><path fill='var(--ci-primary-color, currentColor)' d='M47.937,112h89.614L88.687,161.3c-36.453,36.451-55.906,85.231-54.779,137.352a198.676,198.676,0,0,0,58.715,136.66l22.627-22.627A166.818,166.818,0,0,1,65.9,297.962c-.937-43.314,15.191-83.811,45.463-114.083l48.617-49.051-.044,89.165,32,.015L192.008,80H47.937Z' class='ci-primary'/>"]
  189. /***/ }),
  190. /***/ "./node_modules/@coreui/icons/js/free/cil-menu.js":
  191. /*!********************************************************!*\
  192. !*** ./node_modules/@coreui/icons/js/free/cil-menu.js ***!
  193. \********************************************************/
  194. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  195. "use strict";
  196. __webpack_require__.r(__webpack_exports__);
  197. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  198. /* harmony export */ "cilMenu": () => (/* binding */ cilMenu)
  199. /* harmony export */ });
  200. const cilMenu = ["512 512","<rect width='352' height='32' x='80' y='96' fill='var(--ci-primary-color, currentColor)' class='ci-primary'/><rect width='352' height='32' x='80' y='240' fill='var(--ci-primary-color, currentColor)' class='ci-primary'/><rect width='352' height='32' x='80' y='384' fill='var(--ci-primary-color, currentColor)' class='ci-primary'/>"]
  201. /***/ }),
  202. /***/ "./node_modules/@coreui/icons/js/free/cil-money.js":
  203. /*!*********************************************************!*\
  204. !*** ./node_modules/@coreui/icons/js/free/cil-money.js ***!
  205. \*********************************************************/
  206. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  207. "use strict";
  208. __webpack_require__.r(__webpack_exports__);
  209. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  210. /* harmony export */ "cilMoney": () => (/* binding */ cilMoney)
  211. /* harmony export */ });
  212. const cilMoney = ["512 512","<path fill='var(--ci-primary-color, currentColor)' d='M432,64H16V384H432ZM400,352H48V96H400Z' class='ci-primary'/><polygon fill='var(--ci-primary-color, currentColor)' points='464 144 464 416 96 416 96 448 496 448 496 144 464 144' class='ci-primary'/><path fill='var(--ci-primary-color, currentColor)' d='M224,302.46c39.7,0,72-35.137,72-78.326s-32.3-78.326-72-78.326-72,35.136-72,78.326S184.3,302.46,224,302.46Zm0-124.652c22.056,0,40,20.782,40,46.326s-17.944,46.326-40,46.326-40-20.782-40-46.326S201.944,177.808,224,177.808Z' class='ci-primary'/><rect width='32' height='176' x='80' y='136' fill='var(--ci-primary-color, currentColor)' class='ci-primary'/><rect width='32' height='176' x='336' y='136' fill='var(--ci-primary-color, currentColor)' class='ci-primary'/>"]
  213. /***/ }),
  214. /***/ "./node_modules/@coreui/icons/js/free/cil-notes.js":
  215. /*!*********************************************************!*\
  216. !*** ./node_modules/@coreui/icons/js/free/cil-notes.js ***!
  217. \*********************************************************/
  218. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  219. "use strict";
  220. __webpack_require__.r(__webpack_exports__);
  221. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  222. /* harmony export */ "cilNotes": () => (/* binding */ cilNotes)
  223. /* harmony export */ });
  224. const cilNotes = ["512 512","<rect width='288' height='32' x='112' y='152' fill='var(--ci-primary-color, currentColor)' class='ci-primary'/><rect width='288' height='32' x='112' y='240' fill='var(--ci-primary-color, currentColor)' class='ci-primary'/><rect width='152' height='32' x='112' y='328' fill='var(--ci-primary-color, currentColor)' class='ci-primary'/><path fill='var(--ci-primary-color, currentColor)' d='M480,48H32V464H480ZM448,432H64V80H448Z' class='ci-primary'/>"]
  225. /***/ }),
  226. /***/ "./node_modules/@coreui/icons/js/free/cil-pen.js":
  227. /*!*******************************************************!*\
  228. !*** ./node_modules/@coreui/icons/js/free/cil-pen.js ***!
  229. \*******************************************************/
  230. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  231. "use strict";
  232. __webpack_require__.r(__webpack_exports__);
  233. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  234. /* harmony export */ "cilPen": () => (/* binding */ cilPen)
  235. /* harmony export */ });
  236. const cilPen = ["512 512","<path fill='var(--ci-primary-color, currentColor)' d='M345.994,42.019,179.531,208.481A646.3,646.3,0,0,0,25.325,456.521a24.845,24.845,0,0,0,6,25.708l.087.087a24.84,24.84,0,0,0,17.611,7.342,25.172,25.172,0,0,0,8.1-1.344,646.283,646.283,0,0,0,248.04-154.207L471.62,167.646A88.831,88.831,0,0,0,345.994,42.019ZM282.531,311.48A614.445,614.445,0,0,1,60.419,453.221,614.435,614.435,0,0,1,202.158,231.108l99.162-99.161,80.372,80.372ZM448.993,145.019l-44.674,44.673L323.947,109.32l44.674-44.674a56.832,56.832,0,1,1,80.372,80.373Z' class='ci-primary'/>"]
  237. /***/ }),
  238. /***/ "./node_modules/@coreui/icons/js/free/cil-sitemap.js":
  239. /*!***********************************************************!*\
  240. !*** ./node_modules/@coreui/icons/js/free/cil-sitemap.js ***!
  241. \***********************************************************/
  242. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  243. "use strict";
  244. __webpack_require__.r(__webpack_exports__);
  245. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  246. /* harmony export */ "cilSitemap": () => (/* binding */ cilSitemap)
  247. /* harmony export */ });
  248. const cilSitemap = ["512 512","<path fill='var(--ci-primary-color, currentColor)' d='M472,328H448V264a24.027,24.027,0,0,0-24-24H272V176h32a24.028,24.028,0,0,0,24-24V80a24.028,24.028,0,0,0-24-24H208a24.028,24.028,0,0,0-24,24v72a24.028,24.028,0,0,0,24,24h32v64H88a24.027,24.027,0,0,0-24,24v64H40a24.028,24.028,0,0,0-24,24v72a24.028,24.028,0,0,0,24,24h80a24.028,24.028,0,0,0,24-24V352a24.028,24.028,0,0,0-24-24H96V272H240v56H216a24.028,24.028,0,0,0-24,24v72a24.028,24.028,0,0,0,24,24h80a24.028,24.028,0,0,0,24-24V352a24.028,24.028,0,0,0-24-24H272V272H416v56H392a24.028,24.028,0,0,0-24,24v72a24.028,24.028,0,0,0,24,24h80a24.028,24.028,0,0,0,24-24V352A24.028,24.028,0,0,0,472,328ZM216,88h80v56H216ZM112,360v56H48V360Zm176,0v56H224V360Zm176,56H400V360h64Z' class='ci-primary'/>"]
  249. /***/ }),
  250. /***/ "./node_modules/@coreui/icons/js/free/cil-transfer.js":
  251. /*!************************************************************!*\
  252. !*** ./node_modules/@coreui/icons/js/free/cil-transfer.js ***!
  253. \************************************************************/
  254. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  255. "use strict";
  256. __webpack_require__.r(__webpack_exports__);
  257. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  258. /* harmony export */ "cilTransfer": () => (/* binding */ cilTransfer)
  259. /* harmony export */ });
  260. const cilTransfer = ["512 512","<polygon fill='var(--ci-primary-color, currentColor)' points='356.687 228.687 379.313 251.313 494.627 136 379.313 20.687 356.687 43.313 433.372 120 16 120 16 152 433.372 152 356.687 228.687' class='ci-primary'/><polygon fill='var(--ci-primary-color, currentColor)' points='496 360 78.628 360 155.313 283.313 132.687 260.687 17.373 376 132.687 491.313 155.313 468.687 78.628 392 496 392 496 360' class='ci-primary'/>"]
  261. /***/ }),
  262. /***/ "./node_modules/@coreui/icons/js/free/cil-user.js":
  263. /*!********************************************************!*\
  264. !*** ./node_modules/@coreui/icons/js/free/cil-user.js ***!
  265. \********************************************************/
  266. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  267. "use strict";
  268. __webpack_require__.r(__webpack_exports__);
  269. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  270. /* harmony export */ "cilUser": () => (/* binding */ cilUser)
  271. /* harmony export */ });
  272. const cilUser = ["512 512","<path fill='var(--ci-primary-color, currentColor)' d='M411.6,343.656l-72.823-47.334,27.455-50.334A80.23,80.23,0,0,0,376,207.681V128a112,112,0,0,0-224,0v79.681a80.236,80.236,0,0,0,9.768,38.308l27.455,50.333L116.4,343.656A79.725,79.725,0,0,0,80,410.732V496H448V410.732A79.727,79.727,0,0,0,411.6,343.656ZM416,464H112V410.732a47.836,47.836,0,0,1,21.841-40.246l97.66-63.479-41.64-76.341A48.146,48.146,0,0,1,184,207.681V128a80,80,0,0,1,160,0v79.681a48.146,48.146,0,0,1-5.861,22.985L296.5,307.007l97.662,63.479h0A47.836,47.836,0,0,1,416,410.732Z' class='ci-primary'/>"]
  273. /***/ }),
  274. /***/ "./node_modules/@coreui/icons/js/free/cil-wc.js":
  275. /*!******************************************************!*\
  276. !*** ./node_modules/@coreui/icons/js/free/cil-wc.js ***!
  277. \******************************************************/
  278. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  279. "use strict";
  280. __webpack_require__.r(__webpack_exports__);
  281. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  282. /* harmony export */ "cilWc": () => (/* binding */ cilWc)
  283. /* harmony export */ });
  284. const cilWc = ["512 512","<path fill='var(--ci-primary-color, currentColor)' d='M132,139.824A61.912,61.912,0,1,0,70.088,77.912,61.981,61.981,0,0,0,132,139.824ZM132,48a29.912,29.912,0,1,1-29.912,29.912A29.947,29.947,0,0,1,132,48Z' class='ci-primary'/><path fill='var(--ci-primary-color, currentColor)' d='M176,152H88a48.053,48.053,0,0,0-48,48V352H72V496H192V352h32V200A48.053,48.053,0,0,0,176,152Zm16,168H160V464H104V320H72V200a16.019,16.019,0,0,1,16-16h88a16.019,16.019,0,0,1,16,16Z' class='ci-primary'/><path fill='var(--ci-primary-color, currentColor)' d='M370.088,139.824a61.912,61.912,0,1,0-61.912-61.912A61.981,61.981,0,0,0,370.088,139.824Zm0-91.824a29.912,29.912,0,1,1-29.912,29.912A29.947,29.947,0,0,1,370.088,48Z' class='ci-primary'/><path fill='var(--ci-primary-color, currentColor)' d='M425.759,193.354a61.586,61.586,0,0,0-115.833-1.392L248,357.1V400h64v96H416V400h64V349.3ZM448,368H384v96H344V368H280v-5.1l59.889-159.7a29.585,29.585,0,0,1,55.645.669L448,354.7Z' class='ci-primary'/>"]
  285. /***/ }),
  286. /***/ "./node_modules/@coreui/vue/dist/index.es.js":
  287. /*!***************************************************!*\
  288. !*** ./node_modules/@coreui/vue/dist/index.es.js ***!
  289. \***************************************************/
  290. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  291. "use strict";
  292. __webpack_require__.r(__webpack_exports__);
  293. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  294. /* harmony export */ "CAccordion": () => (/* binding */ CAccordion),
  295. /* harmony export */ "CAccordionBody": () => (/* binding */ CAccordionBody),
  296. /* harmony export */ "CAccordionButton": () => (/* binding */ CAccordionButton),
  297. /* harmony export */ "CAccordionCollapse": () => (/* binding */ CAccordionCollapse),
  298. /* harmony export */ "CAccordionHeader": () => (/* binding */ CAccordionHeader),
  299. /* harmony export */ "CAccordionItem": () => (/* binding */ CAccordionItem),
  300. /* harmony export */ "CAccordionPlugin": () => (/* binding */ CAccordionPlugin),
  301. /* harmony export */ "CAlert": () => (/* binding */ CAlert),
  302. /* harmony export */ "CAlertHeading": () => (/* binding */ CAlertHeading),
  303. /* harmony export */ "CAlertLink": () => (/* binding */ CAlertLink),
  304. /* harmony export */ "CAlertPlugin": () => (/* binding */ CAlertPlugin),
  305. /* harmony export */ "CAvatar": () => (/* binding */ CAvatar),
  306. /* harmony export */ "CAvatarPlugin": () => (/* binding */ CAvatarPlugin),
  307. /* harmony export */ "CBackdrop": () => (/* binding */ CBackdrop),
  308. /* harmony export */ "CBackdropPlugin": () => (/* binding */ CBackdropPlugin),
  309. /* harmony export */ "CBadge": () => (/* binding */ CBadge),
  310. /* harmony export */ "CBadgePlugin": () => (/* binding */ CBadgePlugin),
  311. /* harmony export */ "CBreadcrumb": () => (/* binding */ CBreadcrumb),
  312. /* harmony export */ "CBreadcrumbItem": () => (/* binding */ CBreadcrumbItem),
  313. /* harmony export */ "CBreadcrumbPlugin": () => (/* binding */ CBreadcrumbPlugin),
  314. /* harmony export */ "CButton": () => (/* binding */ CButton),
  315. /* harmony export */ "CButtonGroup": () => (/* binding */ CButtonGroup),
  316. /* harmony export */ "CButtonGroupPlugin": () => (/* binding */ CButtonGroupPlugin),
  317. /* harmony export */ "CButtonPlugin": () => (/* binding */ CButtonPlugin),
  318. /* harmony export */ "CButtonToolbar": () => (/* binding */ CButtonToolbar),
  319. /* harmony export */ "CCLinkPlugin": () => (/* binding */ CCLinkPlugin),
  320. /* harmony export */ "CCallout": () => (/* binding */ CCallout),
  321. /* harmony export */ "CCalloutPlugin": () => (/* binding */ CCalloutPlugin),
  322. /* harmony export */ "CCard": () => (/* binding */ CCard),
  323. /* harmony export */ "CCardBody": () => (/* binding */ CCardBody),
  324. /* harmony export */ "CCardFooter": () => (/* binding */ CCardFooter),
  325. /* harmony export */ "CCardGroup": () => (/* binding */ CCardGroup),
  326. /* harmony export */ "CCardHeader": () => (/* binding */ CCardHeader),
  327. /* harmony export */ "CCardImage": () => (/* binding */ CCardImage),
  328. /* harmony export */ "CCardImageOverlay": () => (/* binding */ CCardImageOverlay),
  329. /* harmony export */ "CCardLink": () => (/* binding */ CCardLink),
  330. /* harmony export */ "CCardPlugin": () => (/* binding */ CCardPlugin),
  331. /* harmony export */ "CCardSubtitle": () => (/* binding */ CCardSubtitle),
  332. /* harmony export */ "CCardText": () => (/* binding */ CCardText),
  333. /* harmony export */ "CCardTitle": () => (/* binding */ CCardTitle),
  334. /* harmony export */ "CCarousel": () => (/* binding */ CCarousel),
  335. /* harmony export */ "CCarouselCaption": () => (/* binding */ CCarouselCaption),
  336. /* harmony export */ "CCarouselItem": () => (/* binding */ CCarouselItem),
  337. /* harmony export */ "CCarouselPlugin": () => (/* binding */ CCarouselPlugin),
  338. /* harmony export */ "CCloseButton": () => (/* binding */ CCloseButton),
  339. /* harmony export */ "CCloseButtonPlugin": () => (/* binding */ CCloseButtonPlugin),
  340. /* harmony export */ "CCol": () => (/* binding */ CCol),
  341. /* harmony export */ "CCollapse": () => (/* binding */ CCollapse),
  342. /* harmony export */ "CCollapsePlugin": () => (/* binding */ CCollapsePlugin),
  343. /* harmony export */ "CContainer": () => (/* binding */ CContainer),
  344. /* harmony export */ "CDropdown": () => (/* binding */ CDropdown),
  345. /* harmony export */ "CDropdownDivider": () => (/* binding */ CDropdownDivider),
  346. /* harmony export */ "CDropdownHeader": () => (/* binding */ CDropdownHeader),
  347. /* harmony export */ "CDropdownItem": () => (/* binding */ CDropdownItem),
  348. /* harmony export */ "CDropdownMenu": () => (/* binding */ CDropdownMenu),
  349. /* harmony export */ "CDropdownPlugin": () => (/* binding */ CDropdownPlugin),
  350. /* harmony export */ "CDropdownToggle": () => (/* binding */ CDropdownToggle),
  351. /* harmony export */ "CFooter": () => (/* binding */ CFooter),
  352. /* harmony export */ "CFooterPlugin": () => (/* binding */ CFooterPlugin),
  353. /* harmony export */ "CForm": () => (/* binding */ CForm),
  354. /* harmony export */ "CFormCheck": () => (/* binding */ CFormCheck),
  355. /* harmony export */ "CFormFeedback": () => (/* binding */ CFormFeedback),
  356. /* harmony export */ "CFormFloating": () => (/* binding */ CFormFloating),
  357. /* harmony export */ "CFormInput": () => (/* binding */ CFormInput),
  358. /* harmony export */ "CFormLabel": () => (/* binding */ CFormLabel),
  359. /* harmony export */ "CFormPlugin": () => (/* binding */ CFormPlugin),
  360. /* harmony export */ "CFormRange": () => (/* binding */ CFormRange),
  361. /* harmony export */ "CFormSelect": () => (/* binding */ CFormSelect),
  362. /* harmony export */ "CFormSwitch": () => (/* binding */ CFormSwitch),
  363. /* harmony export */ "CFormText": () => (/* binding */ CFormText),
  364. /* harmony export */ "CFormTextarea": () => (/* binding */ CFormTextarea),
  365. /* harmony export */ "CGridPlugin": () => (/* binding */ CGridPlugin),
  366. /* harmony export */ "CHeader": () => (/* binding */ CHeader),
  367. /* harmony export */ "CHeaderBrand": () => (/* binding */ CHeaderBrand),
  368. /* harmony export */ "CHeaderDivider": () => (/* binding */ CHeaderDivider),
  369. /* harmony export */ "CHeaderNav": () => (/* binding */ CHeaderNav),
  370. /* harmony export */ "CHeaderPlugin": () => (/* binding */ CHeaderPlugin),
  371. /* harmony export */ "CHeaderText": () => (/* binding */ CHeaderText),
  372. /* harmony export */ "CHeaderToggler": () => (/* binding */ CHeaderToggler),
  373. /* harmony export */ "CImage": () => (/* binding */ CImage),
  374. /* harmony export */ "CImagePlugin": () => (/* binding */ CImagePlugin),
  375. /* harmony export */ "CInputGroup": () => (/* binding */ CInputGroup),
  376. /* harmony export */ "CInputGroupText": () => (/* binding */ CInputGroupText),
  377. /* harmony export */ "CLink": () => (/* binding */ CLink),
  378. /* harmony export */ "CListGroup": () => (/* binding */ CListGroup),
  379. /* harmony export */ "CListGroupItem": () => (/* binding */ CListGroupItem),
  380. /* harmony export */ "CListGroupPlugin": () => (/* binding */ CListGroupPlugin),
  381. /* harmony export */ "CModal": () => (/* binding */ CModal),
  382. /* harmony export */ "CModalBody": () => (/* binding */ CModalBody),
  383. /* harmony export */ "CModalFooter": () => (/* binding */ CModalFooter),
  384. /* harmony export */ "CModalHeader": () => (/* binding */ CModalHeader),
  385. /* harmony export */ "CModalPlugin": () => (/* binding */ CModalPlugin),
  386. /* harmony export */ "CModalTitle": () => (/* binding */ CModalTitle),
  387. /* harmony export */ "CNav": () => (/* binding */ CNav),
  388. /* harmony export */ "CNavGroup": () => (/* binding */ CNavGroup),
  389. /* harmony export */ "CNavGroupItems": () => (/* binding */ CNavGroupItems),
  390. /* harmony export */ "CNavItem": () => (/* binding */ CNavItem),
  391. /* harmony export */ "CNavLink": () => (/* binding */ CNavLink),
  392. /* harmony export */ "CNavPlugin": () => (/* binding */ CNavPlugin),
  393. /* harmony export */ "CNavTitle": () => (/* binding */ CNavTitle),
  394. /* harmony export */ "CNavbar": () => (/* binding */ CNavbar),
  395. /* harmony export */ "CNavbarBrand": () => (/* binding */ CNavbarBrand),
  396. /* harmony export */ "CNavbarNav": () => (/* binding */ CNavbarNav),
  397. /* harmony export */ "CNavbarPlugin": () => (/* binding */ CNavbarPlugin),
  398. /* harmony export */ "CNavbarText": () => (/* binding */ CNavbarText),
  399. /* harmony export */ "CNavbarToggler": () => (/* binding */ CNavbarToggler),
  400. /* harmony export */ "COffcanvas": () => (/* binding */ COffcanvas),
  401. /* harmony export */ "COffcanvasBody": () => (/* binding */ COffcanvasBody),
  402. /* harmony export */ "COffcanvasHeader": () => (/* binding */ COffcanvasHeader),
  403. /* harmony export */ "COffcanvasPlugin": () => (/* binding */ COffcanvasPlugin),
  404. /* harmony export */ "COffcanvasTitle": () => (/* binding */ COffcanvasTitle),
  405. /* harmony export */ "CPagination": () => (/* binding */ CPagination),
  406. /* harmony export */ "CPaginationItem": () => (/* binding */ CPaginationItem),
  407. /* harmony export */ "CPaginationPlugin": () => (/* binding */ CPaginationPlugin),
  408. /* harmony export */ "CPlaceholder": () => (/* binding */ CPlaceholder),
  409. /* harmony export */ "CPlaceholderPlugin": () => (/* binding */ CPlaceholderPlugin),
  410. /* harmony export */ "CPopover": () => (/* binding */ CPopover),
  411. /* harmony export */ "CPopoverPlugin": () => (/* binding */ CPopoverPlugin),
  412. /* harmony export */ "CProgress": () => (/* binding */ CProgress),
  413. /* harmony export */ "CProgressBar": () => (/* binding */ CProgressBar),
  414. /* harmony export */ "CProgressPlugin": () => (/* binding */ CProgressPlugin),
  415. /* harmony export */ "CRow": () => (/* binding */ CRow),
  416. /* harmony export */ "CSidebar": () => (/* binding */ CSidebar),
  417. /* harmony export */ "CSidebarBrand": () => (/* binding */ CSidebarBrand),
  418. /* harmony export */ "CSidebarFooter": () => (/* binding */ CSidebarFooter),
  419. /* harmony export */ "CSidebarHeader": () => (/* binding */ CSidebarHeader),
  420. /* harmony export */ "CSidebarNav": () => (/* binding */ CSidebarNav),
  421. /* harmony export */ "CSidebarPlugin": () => (/* binding */ CSidebarPlugin),
  422. /* harmony export */ "CSidebarToggler": () => (/* binding */ CSidebarToggler),
  423. /* harmony export */ "CSpinner": () => (/* binding */ CSpinner),
  424. /* harmony export */ "CSpinnerPlugin": () => (/* binding */ CSpinnerPlugin),
  425. /* harmony export */ "CTabContent": () => (/* binding */ CTabContent),
  426. /* harmony export */ "CTabPane": () => (/* binding */ CTabPane),
  427. /* harmony export */ "CTable": () => (/* binding */ CTable),
  428. /* harmony export */ "CTableBody": () => (/* binding */ CTableBody),
  429. /* harmony export */ "CTableCaption": () => (/* binding */ CTableCaption),
  430. /* harmony export */ "CTableDataCell": () => (/* binding */ CTableDataCell),
  431. /* harmony export */ "CTableFoot": () => (/* binding */ CTableFoot),
  432. /* harmony export */ "CTableHead": () => (/* binding */ CTableHead),
  433. /* harmony export */ "CTableHeaderCell": () => (/* binding */ CTableHeaderCell),
  434. /* harmony export */ "CTablePlugin": () => (/* binding */ CTablePlugin),
  435. /* harmony export */ "CTableRow": () => (/* binding */ CTableRow),
  436. /* harmony export */ "CTabsPlugin": () => (/* binding */ CTabsPlugin),
  437. /* harmony export */ "CToast": () => (/* binding */ CToast),
  438. /* harmony export */ "CToastBody": () => (/* binding */ CToastBody),
  439. /* harmony export */ "CToastClose": () => (/* binding */ CToastClose),
  440. /* harmony export */ "CToastHeader": () => (/* binding */ CToastHeader),
  441. /* harmony export */ "CToastPlugin": () => (/* binding */ CToastPlugin),
  442. /* harmony export */ "CToaster": () => (/* binding */ CToaster),
  443. /* harmony export */ "CTooltip": () => (/* binding */ CTooltip),
  444. /* harmony export */ "CTooltipPlugin": () => (/* binding */ CTooltipPlugin),
  445. /* harmony export */ "CWidgetStatsA": () => (/* binding */ CWidgetStatsA),
  446. /* harmony export */ "CWidgetStatsB": () => (/* binding */ CWidgetStatsB),
  447. /* harmony export */ "CWidgetStatsC": () => (/* binding */ CWidgetStatsC),
  448. /* harmony export */ "CWidgetStatsD": () => (/* binding */ CWidgetStatsD),
  449. /* harmony export */ "CWidgetStatsE": () => (/* binding */ CWidgetStatsE),
  450. /* harmony export */ "CWidgetStatsF": () => (/* binding */ CWidgetStatsF),
  451. /* harmony export */ "CWidgetsStatsPlugin": () => (/* binding */ CWidgetsStatsPlugin),
  452. /* harmony export */ "default": () => (/* binding */ CoreuiVue),
  453. /* harmony export */ "vcplaceholder": () => (/* binding */ vcplaceholder),
  454. /* harmony export */ "vcpopover": () => (/* binding */ vcpopover),
  455. /* harmony export */ "vctooltip": () => (/* binding */ vctooltip)
  456. /* harmony export */ });
  457. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  458. const CAccordion = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  459. name: 'CAccordion',
  460. props: {
  461. /**
  462. * The active item key.
  463. */
  464. activeItemKey: {
  465. type: [Number, String],
  466. default: undefined,
  467. require: false,
  468. },
  469. /**
  470. * Make accordion items stay open when another item is opened
  471. */
  472. alwaysOpen: Boolean,
  473. /**
  474. * Removes the default background-color, some borders, and some rounded corners to render accordions edge-to-edge with their parent container.
  475. */
  476. flush: Boolean,
  477. },
  478. setup(props, { slots }) {
  479. const activeItemKey = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.activeItemKey);
  480. const setActiveItemKey = (key) => {
  481. activeItemKey.value = key;
  482. };
  483. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('activeItemKey', activeItemKey);
  484. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('alwaysOpen', props.alwaysOpen);
  485. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('setActiveItemKey', setActiveItemKey);
  486. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: ['accordion', { ['accordion-flush']: props.flush }] }, slots.default && slots.default());
  487. },
  488. });
  489. const vVisible = {
  490. beforeMount(el, { value }, { transition }) {
  491. el._vod = el.style.display === 'none' ? '' : el.style.display;
  492. if (transition && value) {
  493. transition.beforeEnter(el);
  494. }
  495. },
  496. mounted(el, { value }, { transition }) {
  497. if (transition && value) {
  498. transition.enter(el);
  499. }
  500. },
  501. updated(el, { value, oldValue }, { transition }) {
  502. if (!value === !oldValue)
  503. return;
  504. if (transition) {
  505. if (value) {
  506. transition.beforeEnter(el);
  507. transition.enter(el);
  508. }
  509. else {
  510. transition.leave(el, () => {
  511. // setDisplay(el, false)
  512. });
  513. }
  514. }
  515. },
  516. };
  517. const CCollapse = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  518. name: 'CCollapse',
  519. props: {
  520. /**
  521. * Set horizontal collapsing to transition the width instead of height.
  522. */
  523. horizontal: {
  524. type: Boolean,
  525. required: false,
  526. },
  527. /**
  528. * Toggle the visibility of component.
  529. */
  530. visible: {
  531. type: Boolean,
  532. required: false,
  533. },
  534. },
  535. emits: [
  536. /**
  537. * Callback fired when the component requests to be hidden.
  538. */
  539. 'hide',
  540. /**
  541. * Callback fired when the component requests to be shown.
  542. */
  543. 'show',
  544. ],
  545. setup(props, { slots, emit }) {
  546. const collapsing = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  547. const show = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.visible);
  548. const handleBeforeEnter = () => {
  549. collapsing.value = true;
  550. };
  551. const handleEnter = (el, done) => {
  552. emit('show');
  553. el.addEventListener('transitionend', () => {
  554. done();
  555. });
  556. setTimeout(() => {
  557. if (props.horizontal) {
  558. el.style.width = `${el.scrollWidth}px`;
  559. return;
  560. }
  561. el.style.height = `${el.scrollHeight}px`;
  562. }, 1);
  563. };
  564. const handleAfterEnter = (el) => {
  565. show.value = true;
  566. collapsing.value = false;
  567. props.horizontal ? el.style.removeProperty('width') : el.style.removeProperty('height');
  568. };
  569. const handleBeforeLeave = (el) => {
  570. collapsing.value = true;
  571. show.value = false;
  572. if (props.horizontal) {
  573. el.style.width = `${el.scrollWidth}px`;
  574. return;
  575. }
  576. el.style.height = `${el.scrollHeight}px`;
  577. };
  578. const handleLeave = (el, done) => {
  579. emit('hide');
  580. el.addEventListener('transitionend', () => {
  581. done();
  582. });
  583. setTimeout(() => {
  584. if (props.horizontal) {
  585. el.style.width = '0px';
  586. return;
  587. }
  588. el.style.height = '0px';
  589. }, 1);
  590. };
  591. const handleAfterLeave = (el) => {
  592. collapsing.value = false;
  593. props.horizontal ? el.style.removeProperty('width') : el.style.removeProperty('height');
  594. };
  595. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, {
  596. css: false,
  597. onBeforeEnter: () => handleBeforeEnter(),
  598. onEnter: (el, done) => handleEnter(el, done),
  599. onAfterEnter: (el) => handleAfterEnter(el),
  600. onBeforeLeave: (el) => handleBeforeLeave(el),
  601. onLeave: (el, done) => handleLeave(el, done),
  602. onAfterLeave: (el) => handleAfterLeave(el),
  603. }, () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  604. class: [
  605. collapsing.value ? 'collapsing' : 'collapse',
  606. { 'collapse-horizontal': props.horizontal, show: show.value },
  607. ],
  608. }, slots.default && slots.default()), [[vVisible, props.visible]]));
  609. },
  610. });
  611. const CAccordionBody = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  612. name: 'CAccordionBody',
  613. setup(_, { slots }) {
  614. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('visible');
  615. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCollapse, { class: 'accordion-collapse', visible: visible.value }, {
  616. default: () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: ['accordion-body'] }, slots.default && slots.default()),
  617. });
  618. },
  619. });
  620. const CAccordionButton = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  621. name: 'CAccordionButton',
  622. setup(_, { slots }) {
  623. const toggleVisibility = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('toggleVisibility');
  624. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('visible');
  625. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('button', {
  626. 'aria-expanded': !visible.value,
  627. class: ['accordion-button', { ['collapsed']: !visible.value }],
  628. onClick: () => toggleVisibility(),
  629. }, slots.default && slots.default());
  630. },
  631. });
  632. const CAccordionCollapse = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  633. name: 'CAccordionCollapse',
  634. props: {
  635. /**
  636. * Toggle the visibility of component.
  637. */
  638. visible: {
  639. type: Boolean,
  640. required: false,
  641. },
  642. },
  643. setup(props, { slots }) {
  644. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCollapse, {
  645. class: 'accordion-collapse',
  646. visible: props.visible,
  647. }, slots.default && slots.default());
  648. },
  649. });
  650. const CAccordionHeader = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  651. name: 'CAccordionHeader',
  652. setup(_, { slots }) {
  653. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: ['accordion-header'] }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CAccordionButton, {}, {
  654. default: () => slots.default && slots.default(),
  655. }));
  656. },
  657. });
  658. const CAccordionItem = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  659. name: 'CAccordionItem',
  660. props: {
  661. /**
  662. * The item key.
  663. */
  664. itemKey: {
  665. type: [Number, String],
  666. default: undefined,
  667. require: false,
  668. },
  669. },
  670. setup(props, { slots }) {
  671. const activeItemKey = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('activeItemKey');
  672. const alwaysOpen = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('alwaysOpen');
  673. // eslint-disable-next-line no-unused-vars
  674. const setActiveItemKey = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('setActiveItemKey');
  675. const itemKey = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.itemKey ? props.itemKey : Math.random().toString(36).substr(2, 9));
  676. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(Boolean(activeItemKey.value === itemKey.value));
  677. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(activeItemKey, () => (visible.value = Boolean(activeItemKey.value === itemKey.value)));
  678. const toggleVisibility = () => {
  679. visible.value = !visible.value;
  680. !alwaysOpen && visible && setActiveItemKey(itemKey.value);
  681. };
  682. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('visible', visible);
  683. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('toggleVisibility', toggleVisibility);
  684. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: ['accordion-item'] }, slots.default && slots.default());
  685. },
  686. });
  687. const CAccordionPlugin = {
  688. install: (app) => {
  689. app.component(CAccordion.name, CAccordion);
  690. app.component(CAccordionBody.name, CAccordionBody);
  691. app.component(CAccordionButton.name, CAccordionButton);
  692. app.component(CAccordionCollapse.name, CAccordionCollapse);
  693. app.component(CAccordionHeader.name, CAccordionHeader);
  694. app.component(CAccordionItem.name, CAccordionItem);
  695. },
  696. };
  697. const Shape = {
  698. type: String,
  699. validator: (value) => {
  700. // The value must match one of these strings
  701. return [
  702. 'rounded',
  703. 'rounded-top',
  704. 'rounded-end',
  705. 'rounded-bottom',
  706. 'rounded-start',
  707. 'rounded-circle',
  708. 'rounded-pill',
  709. 'rounded-0',
  710. 'rounded-1',
  711. 'rounded-2',
  712. 'rounded-3',
  713. ].includes(value);
  714. },
  715. };
  716. const Color = {
  717. type: String,
  718. validator: (value) => {
  719. // The value must match one of these strings
  720. return [
  721. 'primary',
  722. 'secondary',
  723. 'success',
  724. 'danger',
  725. 'warning',
  726. 'info',
  727. 'dark',
  728. 'light',
  729. 'link',
  730. 'transparent',
  731. ].includes(value);
  732. },
  733. };
  734. const TextColor = {
  735. type: String,
  736. validator: (value) => {
  737. return [
  738. 'primary',
  739. 'secondary',
  740. 'success',
  741. 'danger',
  742. 'warning',
  743. 'info',
  744. 'dark',
  745. 'light',
  746. 'white',
  747. 'muted',
  748. 'high-emphasis',
  749. 'medium-emphasis',
  750. 'disabled',
  751. 'high-emphasis-inverse',
  752. 'medium-emphasis-inverse',
  753. 'disabled-inverse',
  754. ].includes(value);
  755. },
  756. };
  757. const CCloseButton = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  758. name: 'CCloseButton',
  759. props: {
  760. /**
  761. * Toggle the disabled state for the component.
  762. */
  763. disabled: {
  764. type: Boolean,
  765. required: false,
  766. },
  767. /**
  768. * Change the default color to white.
  769. */
  770. white: {
  771. type: Boolean,
  772. required: false,
  773. },
  774. },
  775. emits: [
  776. /**
  777. * Event called when the user clicks on the component.
  778. */
  779. 'click',
  780. ],
  781. setup(props, { emit }) {
  782. const handleClick = () => {
  783. emit('click');
  784. };
  785. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('button', {
  786. class: [
  787. 'btn',
  788. 'btn-close',
  789. {
  790. ['btn-close-white']: props.white,
  791. },
  792. props.disabled,
  793. ],
  794. 'aria-label': 'Close',
  795. disabled: props.disabled,
  796. onClick: handleClick,
  797. });
  798. },
  799. });
  800. const CAlert = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  801. name: 'CAlert',
  802. props: {
  803. /**
  804. * Sets the color context of the component to one of CoreUI’s themed colors.
  805. *
  806. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  807. */
  808. color: Color,
  809. /**
  810. * Optionally add a close button to alert and allow it to self dismisss.
  811. */
  812. dismissible: {
  813. type: Boolean,
  814. default: false,
  815. required: false,
  816. },
  817. /**
  818. * Set the alert variant to a solid.
  819. *
  820. * @values 'solid'
  821. */
  822. variant: {
  823. type: String,
  824. default: undefined,
  825. required: false,
  826. validator: (value) => {
  827. return value === 'solid';
  828. },
  829. },
  830. /**
  831. * Toggle the visibility of alert component.
  832. */
  833. visible: {
  834. type: Boolean,
  835. default: true,
  836. required: false,
  837. },
  838. },
  839. emits: [
  840. /**
  841. * Callback fired when the component requests to be closed.
  842. */
  843. 'close',
  844. ],
  845. setup(props, { slots, emit }) {
  846. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.visible);
  847. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(() => props.visible, () => {
  848. visible.value = props.visible;
  849. });
  850. const handleDismiss = () => {
  851. visible.value = false;
  852. emit('close');
  853. };
  854. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, {
  855. name: 'fade',
  856. duration: 350,
  857. enterFromClass: '',
  858. enterActiveClass: 'fade',
  859. enterToClass: 'fade show',
  860. leaveActiveClass: 'fade',
  861. }, {
  862. default: () => visible.value &&
  863. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  864. class: [
  865. 'alert',
  866. props.variant === 'solid'
  867. ? `bg-${props.color} text-white border-0`
  868. : `alert-${props.color}`,
  869. {
  870. [`alert-${props.color}`]: props.color,
  871. 'alert-dismissible': props.dismissible,
  872. },
  873. ],
  874. }, [
  875. slots.default && slots.default(),
  876. props.dismissible &&
  877. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCloseButton, {
  878. onClick: () => {
  879. handleDismiss();
  880. },
  881. }),
  882. ]),
  883. });
  884. },
  885. });
  886. const CAlertHeading = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  887. name: 'CAlertHeading',
  888. props: {
  889. /**
  890. * Component used for the root node. Either a string to use a HTML element or a component.
  891. */
  892. component: {
  893. type: String,
  894. default: 'h4',
  895. required: false,
  896. },
  897. },
  898. setup(props, { slots }) {
  899. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  900. class: 'alert-heading',
  901. }, slots);
  902. },
  903. });
  904. const CAlertLink = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  905. name: 'CAlertLink',
  906. setup(_, { slots }) {
  907. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('a', {
  908. class: 'alert-link',
  909. }, slots);
  910. },
  911. });
  912. const CAlertPlugin = {
  913. install: (app) => {
  914. app.component(CAlert.name, CAlert);
  915. app.component(CAlertHeading.name, CAlertHeading);
  916. app.component(CAlertLink.name, CAlertLink);
  917. },
  918. };
  919. const CAvatar = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  920. name: 'CAvatar',
  921. props: {
  922. /**
  923. * Sets the color context of the component to one of CoreUI’s themed colors.
  924. *
  925. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  926. */
  927. color: Color,
  928. /**
  929. * Select the shape of the component.
  930. *
  931. * @values 'rounded', 'rounded-top', 'rounded-end', 'rounded-bottom', 'rounded-start', 'rounded-circle', 'rounded-pill', 'rounded-0', 'rounded-1', 'rounded-2', 'rounded-3'
  932. */
  933. shape: Shape,
  934. /**
  935. * Size the component small, large, or extra large.
  936. *
  937. * @values 'sm', 'md', 'lg', 'xl'
  938. */
  939. size: {
  940. type: String,
  941. default: undefined,
  942. required: false,
  943. validator: (value) => {
  944. return ['sm', 'md', 'lg', 'xl'].includes(value);
  945. },
  946. },
  947. /**
  948. * The src attribute for the img element.
  949. */
  950. src: {
  951. type: String,
  952. default: undefined,
  953. required: false,
  954. },
  955. /**
  956. * Sets the color context of the status indicator to one of CoreUI’s themed colors.
  957. *
  958. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  959. */
  960. status: {
  961. type: String,
  962. default: undefined,
  963. required: false,
  964. validator: (value) => {
  965. return [
  966. 'primary',
  967. 'secondary',
  968. 'success',
  969. 'danger',
  970. 'warning',
  971. 'info',
  972. 'dark',
  973. 'light',
  974. ].includes(value);
  975. },
  976. },
  977. /**
  978. * Sets the text color of the component to one of CoreUI’s themed colors.
  979. *
  980. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', 'white', 'muted', 'high-emphasis', 'medium-emphasis', 'disabled', 'high-emphasis-inverse', 'medium-emphasis-inverse', 'disabled-inverse'
  981. */
  982. textColor: TextColor,
  983. },
  984. setup(props, { slots }) {
  985. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  986. class: [
  987. 'avatar',
  988. {
  989. [`bg-${props.color}`]: props.color,
  990. [`avatar-${props.size}`]: props.size,
  991. [`text-${props.textColor}`]: props.textColor,
  992. },
  993. `${props.shape}`,
  994. ],
  995. }, [
  996. props.src
  997. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('img', { src: props.src, class: 'avatar-img' })
  998. : slots.default && slots.default(),
  999. props.status && (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('span', { class: ['avatar-status', `bg-${props.status}`] }),
  1000. ]);
  1001. },
  1002. });
  1003. const CAvatarPlugin = {
  1004. install: (app) => {
  1005. app.component(CAvatar.name, CAvatar);
  1006. },
  1007. };
  1008. const CBackdrop = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1009. name: 'CBackdrop',
  1010. props: {
  1011. /**
  1012. * Toggle the visibility of modal component.
  1013. */
  1014. visible: {
  1015. type: Boolean,
  1016. default: false,
  1017. required: false,
  1018. },
  1019. },
  1020. setup(props) {
  1021. const handleBeforeEnter = (el) => {
  1022. el.classList.remove('d-none');
  1023. };
  1024. const handleEnter = (el, done) => {
  1025. el.addEventListener('transitionend', () => {
  1026. done();
  1027. });
  1028. setTimeout(() => {
  1029. el.style.visibility = 'visible';
  1030. el.classList.add('show');
  1031. }, 1);
  1032. };
  1033. const handleLeave = (el, done) => {
  1034. el.addEventListener('transitionend', () => {
  1035. done();
  1036. });
  1037. el.classList.remove('show');
  1038. };
  1039. const handleAfterLeave = (el) => {
  1040. el.classList.add('d-none');
  1041. };
  1042. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, {
  1043. onBeforeEnter: (el) => handleBeforeEnter(el),
  1044. onEnter: (el, done) => handleEnter(el, done),
  1045. onLeave: (el, done) => handleLeave(el, done),
  1046. onAfterLeave: (el) => handleAfterLeave(el),
  1047. }, () => props.visible &&
  1048. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  1049. class: 'fade',
  1050. }));
  1051. },
  1052. });
  1053. const CBackdropPlugin = {
  1054. install: (app) => {
  1055. app.component(CBackdrop.name, CBackdrop);
  1056. },
  1057. };
  1058. const CBadge = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1059. name: 'CBadge',
  1060. props: {
  1061. /**
  1062. * Sets the color context of the component to one of CoreUI’s themed colors.
  1063. *
  1064. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  1065. */
  1066. color: Color,
  1067. /**
  1068. * Component used for the root node. Either a string to use a HTML element or a component.
  1069. */
  1070. component: {
  1071. type: String,
  1072. required: false,
  1073. default: 'span',
  1074. },
  1075. /**
  1076. * Position badge in one of the corners of a link or button.
  1077. *
  1078. * @values 'top-start', 'top-end', 'bottom-end', 'bottom-start'
  1079. */
  1080. position: {
  1081. type: String,
  1082. default: undefined,
  1083. required: false,
  1084. validator: (value) => {
  1085. return ['top-start', 'top-end', 'bottom-end', 'bottom-start'].includes(value);
  1086. },
  1087. },
  1088. /**
  1089. * Select the shape of the component.
  1090. *
  1091. * @values 'rounded', 'rounded-top', 'rounded-end', 'rounded-bottom', 'rounded-start', 'rounded-circle', 'rounded-pill', 'rounded-0', 'rounded-1', 'rounded-2', 'rounded-3'
  1092. */
  1093. shape: Shape,
  1094. /**
  1095. * Size the component small.
  1096. *
  1097. * @values 'sm'
  1098. */
  1099. size: {
  1100. type: String,
  1101. default: undefined,
  1102. required: false,
  1103. validator: (value) => {
  1104. return value === 'sm';
  1105. },
  1106. },
  1107. /**
  1108. * Sets the text color of the component to one of CoreUI’s themed colors.
  1109. *
  1110. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', 'white', 'muted', 'high-emphasis', 'medium-emphasis', 'disabled', 'high-emphasis-inverse', 'medium-emphasis-inverse', 'disabled-inverse'
  1111. */
  1112. textColor: TextColor,
  1113. },
  1114. setup(props, { slots }) {
  1115. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  1116. class: [
  1117. 'badge',
  1118. {
  1119. [`bg-${props.color}`]: props.color,
  1120. 'position-absolute translate-middle': props.position,
  1121. 'top-0': props.position && props.position.includes('top'),
  1122. 'top-100': props.position && props.position.includes('bottom'),
  1123. 'start-100': props.position && props.position.includes('end'),
  1124. 'start-0': props.position && props.position.includes('start'),
  1125. [`badge-${props.size}`]: props.size,
  1126. [`text-${props.textColor}`]: props.textColor,
  1127. },
  1128. props.shape,
  1129. ],
  1130. }, slots.default && slots.default());
  1131. },
  1132. });
  1133. const CBadgePlugin = {
  1134. install: (app) => {
  1135. app.component(CBadge.name, CBadge);
  1136. },
  1137. };
  1138. const CBreadcrumbItem = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1139. name: 'CBreadcrumbItem',
  1140. props: {
  1141. /**
  1142. * Toggle the active state for the component.
  1143. */
  1144. active: {
  1145. type: Boolean,
  1146. required: false,
  1147. },
  1148. /**
  1149. * The `href` attribute for the inner link component.
  1150. */
  1151. href: {
  1152. type: String,
  1153. default: undefined,
  1154. required: false,
  1155. },
  1156. },
  1157. setup(props, { slots }) {
  1158. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('li', {
  1159. class: [
  1160. 'breadcrumb-item',
  1161. {
  1162. active: props.active,
  1163. },
  1164. ],
  1165. ...(props.active && { 'aria-current': 'page' }),
  1166. }, props.href
  1167. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('a', { href: props.href }, slots.default && slots.default())
  1168. : slots.default && slots.default());
  1169. },
  1170. });
  1171. const CBreadcrumb = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1172. name: 'CBreadcrumb',
  1173. setup(_, { slots, attrs }) {
  1174. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('nav', {
  1175. 'aria-label': 'breadcrumb',
  1176. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('ol', { class: ['breadcrumb', attrs.class] }, slots.default && slots.default()));
  1177. },
  1178. });
  1179. const CBreadcrumbPlugin = {
  1180. install: (app) => {
  1181. app.component(CBreadcrumb.name, CBreadcrumb);
  1182. app.component(CBreadcrumbItem.name, CBreadcrumbItem);
  1183. },
  1184. };
  1185. const CButton = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1186. name: 'CButton',
  1187. props: {
  1188. /**
  1189. * Toggle the active state for the component.
  1190. */
  1191. active: {
  1192. type: Boolean,
  1193. default: false,
  1194. required: false,
  1195. },
  1196. /**
  1197. * Sets the color context of the component to one of CoreUI’s themed colors.
  1198. *
  1199. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  1200. */
  1201. color: Color,
  1202. /**
  1203. * Component used for the root node. Either a string to use a HTML element or a component.
  1204. */
  1205. component: {
  1206. type: String,
  1207. default: 'button',
  1208. required: false,
  1209. },
  1210. /**
  1211. * Toggle the disabled state for the component.
  1212. */
  1213. disabled: {
  1214. type: Boolean,
  1215. required: false,
  1216. },
  1217. /**
  1218. * The href attribute specifies the URL of the page the link goes to.
  1219. */
  1220. href: {
  1221. type: String,
  1222. default: undefined,
  1223. required: false,
  1224. },
  1225. /**
  1226. * Select the shape of the component.
  1227. *
  1228. * @values 'rounded', 'rounded-top', 'rounded-end', 'rounded-bottom', 'rounded-start', 'rounded-circle', 'rounded-pill', 'rounded-0', 'rounded-1', 'rounded-2', 'rounded-3'
  1229. */
  1230. shape: Shape,
  1231. /**
  1232. * Size the component small or large.
  1233. *
  1234. * @values 'sm', 'lg'
  1235. */
  1236. size: {
  1237. type: String,
  1238. default: undefined,
  1239. required: false,
  1240. validator: (value) => {
  1241. return ['sm', 'lg'].includes(value);
  1242. },
  1243. },
  1244. /**
  1245. * Set the button variant to an outlined button or a ghost button.
  1246. *
  1247. * @values 'ghost', 'outline'
  1248. */
  1249. variant: {
  1250. type: String,
  1251. default: undefined,
  1252. required: false,
  1253. validator: (value) => {
  1254. return ['ghost', 'outline'].includes(value);
  1255. },
  1256. },
  1257. },
  1258. setup(props, { slots }) {
  1259. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  1260. class: [
  1261. 'btn',
  1262. props.variant ? `btn-${props.variant}-${props.color}` : `btn-${props.color}`,
  1263. {
  1264. [`btn-${props.size}`]: props.size,
  1265. active: props.active,
  1266. disabled: props.disabled,
  1267. },
  1268. props.shape,
  1269. ],
  1270. disabled: props.disabled && props.component !== 'a',
  1271. ...(props.component === 'a' && props.disabled && { 'aria-disabled': true, tabIndex: -1 }),
  1272. ...(props.component === 'a' && props.href && { href: props.href }),
  1273. }, slots.default && slots.default());
  1274. },
  1275. });
  1276. const CButtonPlugin = {
  1277. install: (app) => {
  1278. app.component(CButton.name, CButton);
  1279. },
  1280. };
  1281. const CButtonToolbar = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1282. name: 'CButtonToolbar',
  1283. setup(_, { slots }) {
  1284. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'btn-toolbar' }, slots.default && slots.default());
  1285. },
  1286. });
  1287. const CButtonGroup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1288. name: 'CButtonGroup',
  1289. props: {
  1290. /**
  1291. * Size the component small or large.
  1292. *
  1293. * @values 'sm', 'lg'
  1294. */
  1295. size: {
  1296. type: String,
  1297. default: undefined,
  1298. required: false,
  1299. validator: (value) => {
  1300. return ['sm', 'lg'].includes(value);
  1301. },
  1302. },
  1303. /**
  1304. * Create a set of buttons that appear vertically stacked rather than horizontally. Split button dropdowns are not supported here.
  1305. */
  1306. vertical: {
  1307. type: Boolean,
  1308. required: false,
  1309. },
  1310. },
  1311. setup(props, { slots }) {
  1312. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  1313. class: [
  1314. props.vertical ? 'btn-group-vertical' : 'btn-group',
  1315. { [`btn-group-${props.size}`]: props.size },
  1316. ],
  1317. }, slots.default && slots.default());
  1318. },
  1319. });
  1320. const CButtonGroupPlugin = {
  1321. install: (app) => {
  1322. app.component(CButtonToolbar.name, CButtonToolbar);
  1323. app.component(CButtonGroup.name, CButtonGroup);
  1324. },
  1325. };
  1326. const CCallout = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1327. name: 'CCallout',
  1328. props: {
  1329. /**
  1330. * Sets the color context of the component to one of CoreUI’s themed colors.
  1331. *
  1332. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  1333. */
  1334. color: Color,
  1335. },
  1336. setup(props, { slots }) {
  1337. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  1338. class: [
  1339. 'callout',
  1340. {
  1341. [`callout-${props.color}`]: props.color,
  1342. },
  1343. ],
  1344. }, slots.default && slots.default());
  1345. },
  1346. });
  1347. const CCalloutPlugin = {
  1348. install: (app) => {
  1349. app.component(CCallout.name, CCallout);
  1350. },
  1351. };
  1352. const CCard = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1353. name: 'CCard',
  1354. props: {
  1355. /**
  1356. * Sets the color context of the component to one of CoreUI’s themed colors.
  1357. *
  1358. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  1359. */
  1360. color: Color,
  1361. /**
  1362. * Sets the text color context of the component to one of CoreUI’s themed colors.
  1363. *
  1364. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', 'white', 'muted', 'high-emphasis', 'medium-emphasis', 'disabled', 'high-emphasis-inverse', 'medium-emphasis-inverse', 'disabled-inverse'
  1365. */
  1366. textColor: TextColor,
  1367. },
  1368. setup(props, { slots }) {
  1369. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  1370. class: [
  1371. 'card',
  1372. {
  1373. [`bg-${props.color}`]: props.color,
  1374. [`text-${props.textColor}`]: props.textColor,
  1375. },
  1376. ],
  1377. }, slots.default && slots.default());
  1378. },
  1379. });
  1380. const CCardBody = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1381. name: 'CCardBody',
  1382. setup(_, { slots }) {
  1383. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'card-body' }, slots.default && slots.default());
  1384. },
  1385. });
  1386. const CCardFooter = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1387. name: 'CCardFooter',
  1388. setup(_, { slots }) {
  1389. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'card-footer' }, slots.default && slots.default());
  1390. },
  1391. });
  1392. const CCardGroup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1393. name: 'CCardGroup',
  1394. setup(_, { slots }) {
  1395. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'card-group' }, slots.default && slots.default());
  1396. },
  1397. });
  1398. const CCardHeader = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1399. name: 'CCardHeader',
  1400. props: {
  1401. /**
  1402. * Component used for the root node. Either a string to use a HTML element or a component.
  1403. */
  1404. component: {
  1405. type: String,
  1406. required: false,
  1407. default: 'div',
  1408. },
  1409. },
  1410. setup(props, { slots }) {
  1411. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, { class: 'card-header' }, slots.default && slots.default());
  1412. },
  1413. });
  1414. const CCardImage = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1415. name: 'CCardImage',
  1416. props: {
  1417. /**
  1418. * Component used for the root node. Either a string to use a HTML element or a component.
  1419. */
  1420. component: {
  1421. type: String,
  1422. required: false,
  1423. default: 'img',
  1424. },
  1425. /**
  1426. * Optionally orientate the image to the top, bottom.
  1427. *
  1428. * @values 'top', 'bottom'
  1429. */
  1430. orientation: {
  1431. type: String,
  1432. default: undefined,
  1433. required: false,
  1434. validator: (value) => {
  1435. return ['top', 'bottom'].includes(value);
  1436. },
  1437. },
  1438. },
  1439. setup(props, { slots }) {
  1440. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  1441. class: `card-img${props.orientation ? `-${props.orientation}` : ''}`,
  1442. }, slots.default && slots.default());
  1443. },
  1444. });
  1445. const CCardImageOverlay = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1446. name: 'CCardImageOverlay',
  1447. setup(_, { slots }) {
  1448. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'card-img-overlay' }, slots.default && slots.default());
  1449. },
  1450. });
  1451. const CLink = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1452. name: 'CLink',
  1453. props: {
  1454. /**
  1455. * Toggle the active state for the component.
  1456. */
  1457. active: {
  1458. type: Boolean,
  1459. required: false,
  1460. },
  1461. /**
  1462. * Component used for the root node. Either a string to use a HTML element or a component.
  1463. */
  1464. component: {
  1465. type: String,
  1466. required: false,
  1467. default: 'a',
  1468. },
  1469. /**
  1470. * Toggle the disabled state for the component.
  1471. */
  1472. disabled: {
  1473. type: Boolean,
  1474. required: false,
  1475. },
  1476. /**
  1477. * The href attribute specifies the URL of the page the link goes to.
  1478. */
  1479. href: {
  1480. type: String,
  1481. default: undefined,
  1482. required: false,
  1483. },
  1484. },
  1485. emits: [
  1486. /**
  1487. * Event called when the user clicks on the component.
  1488. */
  1489. 'click',
  1490. ],
  1491. setup(props, { slots, emit }) {
  1492. const handleClick = () => {
  1493. emit('click', props.href);
  1494. };
  1495. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  1496. class: [{ active: props.active, disabled: props.disabled }],
  1497. ...(props.active && { 'aria-current': 'page' }),
  1498. ...(props.component === 'a' && props.disabled && { 'aria-disabled': true, tabIndex: -1 }),
  1499. ...((props.component === 'a' || props.component === 'button') && {
  1500. onClick: handleClick,
  1501. }),
  1502. href: props.href,
  1503. }, slots.default && slots.default());
  1504. },
  1505. });
  1506. const CCLinkPlugin = {
  1507. install: (app) => {
  1508. app.component(CLink.name, CLink);
  1509. },
  1510. };
  1511. const CCardLink = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1512. name: 'CCardLink',
  1513. props: {
  1514. /**
  1515. * The href attribute specifies the URL of the page the link goes to.
  1516. */
  1517. href: {
  1518. type: String,
  1519. default: '#',
  1520. required: false,
  1521. },
  1522. },
  1523. setup(props, { slots }) {
  1524. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CLink, { class: 'card-link', href: props.href }, { default: () => slots.default && slots.default() });
  1525. },
  1526. });
  1527. const CCardSubtitle = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1528. name: 'CCardSubtitle',
  1529. props: {
  1530. /**
  1531. * Component used for the root node. Either a string to use a HTML element or a component.
  1532. */
  1533. component: {
  1534. type: String,
  1535. required: false,
  1536. default: 'h6',
  1537. },
  1538. },
  1539. setup(props, { slots }) {
  1540. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, { class: 'card-subtitle' }, slots.default && slots.default());
  1541. },
  1542. });
  1543. const CCardText = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1544. name: 'CCardText',
  1545. props: {
  1546. /**
  1547. * Component used for the root node. Either a string to use a HTML element or a component.
  1548. */
  1549. component: {
  1550. type: String,
  1551. required: false,
  1552. default: 'p',
  1553. },
  1554. },
  1555. setup(props, { slots }) {
  1556. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, { class: 'card-text' }, slots.default && slots.default());
  1557. },
  1558. });
  1559. const CCardTitle = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1560. name: 'CCardTitle',
  1561. props: {
  1562. /**
  1563. * Component used for the root node. Either a string to use a HTML element or a component.
  1564. */
  1565. component: {
  1566. type: String,
  1567. required: false,
  1568. default: 'h5',
  1569. },
  1570. },
  1571. setup(props, { slots }) {
  1572. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, { class: 'card-title' }, slots.default && slots.default());
  1573. },
  1574. });
  1575. const CCardPlugin = {
  1576. install: (app) => {
  1577. app.component(CCard.name, CCard);
  1578. app.component(CCardBody.name, CCardBody);
  1579. app.component(CCardFooter.name, CCardFooter);
  1580. app.component(CCardGroup.name, CCardGroup);
  1581. app.component(CCardHeader.name, CCardHeader);
  1582. app.component(CCardImage.name, CCardImage);
  1583. app.component(CCardImageOverlay.name, CCardImageOverlay);
  1584. app.component(CCardLink.name, CCardLink);
  1585. app.component(CCardSubtitle.name, CCardSubtitle);
  1586. app.component(CCardText.name, CCardText);
  1587. app.component(CCardTitle.name, CCardTitle);
  1588. },
  1589. };
  1590. const isVisible$1 = (element) => {
  1591. const rect = element.getBoundingClientRect();
  1592. return (rect.top >= 0 &&
  1593. rect.left >= 0 &&
  1594. rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
  1595. rect.right <= (window.innerWidth || document.documentElement.clientWidth));
  1596. };
  1597. const CCarousel = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1598. name: 'CCarousel',
  1599. props: {
  1600. /**
  1601. * Adding in the previous and next controls.
  1602. */
  1603. controls: Boolean,
  1604. /**
  1605. * Add darker controls, indicators, and captions.
  1606. */
  1607. dark: Boolean,
  1608. /**
  1609. * index of the active item.
  1610. */
  1611. index: {
  1612. type: Number,
  1613. default: 0,
  1614. required: false,
  1615. },
  1616. /**
  1617. * Adding indicators at the bottom of the carousel for each item.
  1618. */
  1619. indicators: Boolean,
  1620. /**
  1621. * The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
  1622. */
  1623. interval: {
  1624. type: [Boolean, Number],
  1625. default: 5000,
  1626. required: false,
  1627. },
  1628. /**
  1629. * If set to 'hover', pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. If set to false, hovering over the carousel won't pause it.
  1630. */
  1631. pause: {
  1632. type: [Boolean, String],
  1633. default: 'hover',
  1634. required: false,
  1635. validator: (value) => {
  1636. return typeof value === 'boolean' || value === 'hover';
  1637. },
  1638. },
  1639. /**
  1640. * Set type of the transition.
  1641. *
  1642. * @values 'crossfade', 'slide'
  1643. */
  1644. transition: {
  1645. type: String,
  1646. default: 'slide',
  1647. required: false,
  1648. validator: (value) => {
  1649. return ['crossfade', 'slide'].includes(value);
  1650. },
  1651. },
  1652. /**
  1653. * Set whether the carousel should cycle continuously or have hard stops.
  1654. */
  1655. wrap: {
  1656. type: Boolean,
  1657. default: true,
  1658. required: false,
  1659. },
  1660. },
  1661. setup(props, { slots }) {
  1662. const carouselRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  1663. const timeout = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  1664. const animating = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  1665. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  1666. const customInterval = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.interval);
  1667. const setAnimating = (value) => {
  1668. animating.value = value;
  1669. };
  1670. const setCustomInterval = (value) => {
  1671. customInterval.value = value;
  1672. };
  1673. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('setAnimating', setAnimating);
  1674. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('setCustomInterval', setCustomInterval);
  1675. const pause = () => timeout.value && clearInterval(timeout.value);
  1676. const cycle = () => {
  1677. pause();
  1678. if (typeof props.interval === 'number') {
  1679. timeout.value = setTimeout(() => nextItemWhenVisible(), typeof customInterval.value === 'number' ? customInterval.value : props.interval);
  1680. }
  1681. };
  1682. const state = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)({
  1683. items: [],
  1684. active: props.index,
  1685. direction: 'next',
  1686. });
  1687. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount)(() => {
  1688. if (slots.default) {
  1689. // @ts-expect-error TODO: fix types
  1690. state.items = slots.default().filter((child) => child.type.name === 'CCarouselItem');
  1691. }
  1692. });
  1693. const handleControlClick = (direction) => {
  1694. if (animating.value) {
  1695. return;
  1696. }
  1697. state.direction = direction;
  1698. if (direction === 'next') {
  1699. state.active === state.items.length - 1 ? (state.active = 0) : state.active++;
  1700. }
  1701. else {
  1702. state.active === 0 ? (state.active = state.items.length - 1) : state.active--;
  1703. }
  1704. };
  1705. const nextItemWhenVisible = () => {
  1706. // Don't call next when the page isn't visible
  1707. // or the carousel or its parent isn't visible
  1708. if (!document.hidden && isVisible$1(carouselRef.value)) {
  1709. handleControlClick('next');
  1710. }
  1711. };
  1712. const handleIndicatorClick = (index) => {
  1713. if (state.active === index) {
  1714. return;
  1715. }
  1716. if (state.active < index) {
  1717. state.direction = 'next';
  1718. state.active = index;
  1719. return;
  1720. }
  1721. if (state.active > index) {
  1722. state.direction = 'prev';
  1723. state.active = index;
  1724. }
  1725. };
  1726. const handleScroll = () => {
  1727. if (!document.hidden && isVisible$1(carouselRef.value)) {
  1728. visible.value = true;
  1729. }
  1730. else {
  1731. visible.value = false;
  1732. }
  1733. };
  1734. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => {
  1735. window.addEventListener('scroll', handleScroll);
  1736. });
  1737. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onUpdated)(() => {
  1738. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(animating, () => {
  1739. if (props.wrap) {
  1740. !animating.value && cycle();
  1741. return;
  1742. }
  1743. if (!props.wrap && state.active < state.items.length - 1) {
  1744. !animating.value && cycle();
  1745. }
  1746. });
  1747. });
  1748. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(visible, () => {
  1749. visible.value && cycle();
  1750. });
  1751. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  1752. class: [
  1753. 'carousel slide',
  1754. props.transition === 'crossfade' && 'carousel-fade',
  1755. props.dark && 'carousel-dark',
  1756. ],
  1757. onmouseover: () => props.pause && pause(),
  1758. onmouseleave: () => cycle(),
  1759. ref: carouselRef,
  1760. }, [
  1761. props.indicators &&
  1762. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  1763. class: 'carousel-indicators',
  1764. }, state.items.map((_, index) => {
  1765. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('button', {
  1766. type: 'button',
  1767. id: index,
  1768. 'data-coreui-target': '',
  1769. ...(state.active === index && { class: 'active' }),
  1770. onClick: () => handleIndicatorClick(index),
  1771. });
  1772. })),
  1773. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'carousel-inner' }, state.items.map((item, index) => {
  1774. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(item, {
  1775. active: state.active === index ? true : false,
  1776. direction: state.direction,
  1777. });
  1778. })),
  1779. props.controls && [
  1780. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('button', {
  1781. type: 'button',
  1782. class: 'carousel-control-prev',
  1783. 'data-coreui-target': '',
  1784. onClick: () => handleControlClick('prev'),
  1785. }, [
  1786. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('span', { class: 'carousel-control-prev-icon', ariaHidden: 'true' }),
  1787. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('span', { class: 'visually-hidden' }, 'Previous'),
  1788. ]),
  1789. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('button', {
  1790. type: 'button',
  1791. class: 'carousel-control-next',
  1792. 'data-coreui-target': '',
  1793. onClick: () => handleControlClick('next'),
  1794. }, [
  1795. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('span', { class: 'carousel-control-next-icon', ariaHidden: 'true' }),
  1796. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('span', { class: 'visually-hidden' }, 'Next'),
  1797. ]),
  1798. ],
  1799. ]);
  1800. },
  1801. });
  1802. const CCarouselCaption = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1803. name: 'CCarouselCaption',
  1804. setup(_, { slots }) {
  1805. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  1806. class: 'carousel-caption',
  1807. }, slots.default && slots.default());
  1808. },
  1809. });
  1810. const CCarouselItem = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  1811. name: 'CCarouselItem',
  1812. props: {
  1813. /**
  1814. * @ignore
  1815. */
  1816. active: {
  1817. type: Boolean,
  1818. default: false,
  1819. },
  1820. /**
  1821. * @ignore
  1822. */
  1823. direction: {
  1824. type: String,
  1825. default: 'next',
  1826. required: false,
  1827. },
  1828. /**
  1829. * The amount of time to delay between automatically cycling an item.
  1830. */
  1831. interval: {
  1832. type: [Boolean, Number],
  1833. default: false,
  1834. required: false,
  1835. },
  1836. },
  1837. setup(props, { slots }) {
  1838. const carouselItemRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  1839. const { active } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(props);
  1840. const directionClassName = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  1841. const orderClassName = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  1842. const activeClassName = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(active.value && 'active');
  1843. // eslint-disable-next-line no-unused-vars
  1844. const setAnimating = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('setAnimating');
  1845. // eslint-disable-next-line no-unused-vars
  1846. const setCustomInterval = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('setCustomInterval');
  1847. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(active, (active, prevActive) => {
  1848. active && setCustomInterval(props.interval);
  1849. if (!prevActive && active) {
  1850. orderClassName.value = `carousel-item-${props.direction}`;
  1851. setCustomInterval(props.interval);
  1852. }
  1853. setTimeout(() => {
  1854. if (prevActive && !active) {
  1855. activeClassName.value = 'active';
  1856. }
  1857. directionClassName.value = `carousel-item-${props.direction === 'next' ? 'start' : 'end'}`;
  1858. }, 0);
  1859. carouselItemRef.value.addEventListener('transitionstart', () => {
  1860. setAnimating(true);
  1861. });
  1862. carouselItemRef.value.addEventListener('transitionend', () => {
  1863. setAnimating(false);
  1864. if (active) {
  1865. directionClassName.value = '';
  1866. orderClassName.value = '';
  1867. activeClassName.value = 'active';
  1868. }
  1869. if (!active) {
  1870. directionClassName.value = '';
  1871. orderClassName.value = '';
  1872. activeClassName.value = '';
  1873. }
  1874. });
  1875. });
  1876. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  1877. class: [
  1878. 'carousel-item',
  1879. activeClassName.value,
  1880. directionClassName.value,
  1881. orderClassName.value,
  1882. ],
  1883. ref: carouselItemRef,
  1884. }, slots.default && slots.default());
  1885. },
  1886. });
  1887. const CCarouselPlugin = {
  1888. install: (app) => {
  1889. app.component(CCarousel.name, CCarousel);
  1890. app.component(CCarouselCaption.name, CCarouselCaption);
  1891. app.component(CCarouselItem.name, CCarouselItem);
  1892. },
  1893. };
  1894. const CCloseButtonPlugin = {
  1895. install: (app) => {
  1896. app.component(CCloseButton.name, CCloseButton);
  1897. },
  1898. };
  1899. const CCollapsePlugin = {
  1900. install: (app) => {
  1901. app.component(CCollapse.name, CCollapse);
  1902. },
  1903. };
  1904. var top = 'top';
  1905. var bottom = 'bottom';
  1906. var right = 'right';
  1907. var left = 'left';
  1908. var auto = 'auto';
  1909. var basePlacements = [top, bottom, right, left];
  1910. var start = 'start';
  1911. var end = 'end';
  1912. var clippingParents = 'clippingParents';
  1913. var viewport = 'viewport';
  1914. var popper = 'popper';
  1915. var reference = 'reference';
  1916. var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
  1917. return acc.concat([placement + "-" + start, placement + "-" + end]);
  1918. }, []);
  1919. var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
  1920. return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
  1921. }, []); // modifiers that need to read the DOM
  1922. var beforeRead = 'beforeRead';
  1923. var read = 'read';
  1924. var afterRead = 'afterRead'; // pure-logic modifiers
  1925. var beforeMain = 'beforeMain';
  1926. var main = 'main';
  1927. var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
  1928. var beforeWrite = 'beforeWrite';
  1929. var write = 'write';
  1930. var afterWrite = 'afterWrite';
  1931. var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
  1932. function getNodeName(element) {
  1933. return element ? (element.nodeName || '').toLowerCase() : null;
  1934. }
  1935. function getWindow(node) {
  1936. if (node == null) {
  1937. return window;
  1938. }
  1939. if (node.toString() !== '[object Window]') {
  1940. var ownerDocument = node.ownerDocument;
  1941. return ownerDocument ? ownerDocument.defaultView || window : window;
  1942. }
  1943. return node;
  1944. }
  1945. function isElement(node) {
  1946. var OwnElement = getWindow(node).Element;
  1947. return node instanceof OwnElement || node instanceof Element;
  1948. }
  1949. function isHTMLElement(node) {
  1950. var OwnElement = getWindow(node).HTMLElement;
  1951. return node instanceof OwnElement || node instanceof HTMLElement;
  1952. }
  1953. function isShadowRoot(node) {
  1954. // IE 11 has no ShadowRoot
  1955. if (typeof ShadowRoot === 'undefined') {
  1956. return false;
  1957. }
  1958. var OwnElement = getWindow(node).ShadowRoot;
  1959. return node instanceof OwnElement || node instanceof ShadowRoot;
  1960. }
  1961. // and applies them to the HTMLElements such as popper and arrow
  1962. function applyStyles(_ref) {
  1963. var state = _ref.state;
  1964. Object.keys(state.elements).forEach(function (name) {
  1965. var style = state.styles[name] || {};
  1966. var attributes = state.attributes[name] || {};
  1967. var element = state.elements[name]; // arrow is optional + virtual elements
  1968. if (!isHTMLElement(element) || !getNodeName(element)) {
  1969. return;
  1970. } // Flow doesn't support to extend this property, but it's the most
  1971. // effective way to apply styles to an HTMLElement
  1972. // $FlowFixMe[cannot-write]
  1973. Object.assign(element.style, style);
  1974. Object.keys(attributes).forEach(function (name) {
  1975. var value = attributes[name];
  1976. if (value === false) {
  1977. element.removeAttribute(name);
  1978. } else {
  1979. element.setAttribute(name, value === true ? '' : value);
  1980. }
  1981. });
  1982. });
  1983. }
  1984. function effect$2(_ref2) {
  1985. var state = _ref2.state;
  1986. var initialStyles = {
  1987. popper: {
  1988. position: state.options.strategy,
  1989. left: '0',
  1990. top: '0',
  1991. margin: '0'
  1992. },
  1993. arrow: {
  1994. position: 'absolute'
  1995. },
  1996. reference: {}
  1997. };
  1998. Object.assign(state.elements.popper.style, initialStyles.popper);
  1999. state.styles = initialStyles;
  2000. if (state.elements.arrow) {
  2001. Object.assign(state.elements.arrow.style, initialStyles.arrow);
  2002. }
  2003. return function () {
  2004. Object.keys(state.elements).forEach(function (name) {
  2005. var element = state.elements[name];
  2006. var attributes = state.attributes[name] || {};
  2007. var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
  2008. var style = styleProperties.reduce(function (style, property) {
  2009. style[property] = '';
  2010. return style;
  2011. }, {}); // arrow is optional + virtual elements
  2012. if (!isHTMLElement(element) || !getNodeName(element)) {
  2013. return;
  2014. }
  2015. Object.assign(element.style, style);
  2016. Object.keys(attributes).forEach(function (attribute) {
  2017. element.removeAttribute(attribute);
  2018. });
  2019. });
  2020. };
  2021. } // eslint-disable-next-line import/no-unused-modules
  2022. var applyStyles$1 = {
  2023. name: 'applyStyles',
  2024. enabled: true,
  2025. phase: 'write',
  2026. fn: applyStyles,
  2027. effect: effect$2,
  2028. requires: ['computeStyles']
  2029. };
  2030. function getBasePlacement(placement) {
  2031. return placement.split('-')[0];
  2032. }
  2033. var max = Math.max;
  2034. var min = Math.min;
  2035. var round = Math.round;
  2036. function getBoundingClientRect(element, includeScale) {
  2037. if (includeScale === void 0) {
  2038. includeScale = false;
  2039. }
  2040. var rect = element.getBoundingClientRect();
  2041. var scaleX = 1;
  2042. var scaleY = 1;
  2043. if (isHTMLElement(element) && includeScale) {
  2044. var offsetHeight = element.offsetHeight;
  2045. var offsetWidth = element.offsetWidth; // Do not attempt to divide by 0, otherwise we get `Infinity` as scale
  2046. // Fallback to 1 in case both values are `0`
  2047. if (offsetWidth > 0) {
  2048. scaleX = round(rect.width) / offsetWidth || 1;
  2049. }
  2050. if (offsetHeight > 0) {
  2051. scaleY = round(rect.height) / offsetHeight || 1;
  2052. }
  2053. }
  2054. return {
  2055. width: rect.width / scaleX,
  2056. height: rect.height / scaleY,
  2057. top: rect.top / scaleY,
  2058. right: rect.right / scaleX,
  2059. bottom: rect.bottom / scaleY,
  2060. left: rect.left / scaleX,
  2061. x: rect.left / scaleX,
  2062. y: rect.top / scaleY
  2063. };
  2064. }
  2065. // means it doesn't take into account transforms.
  2066. function getLayoutRect(element) {
  2067. var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
  2068. // Fixes https://github.com/popperjs/popper-core/issues/1223
  2069. var width = element.offsetWidth;
  2070. var height = element.offsetHeight;
  2071. if (Math.abs(clientRect.width - width) <= 1) {
  2072. width = clientRect.width;
  2073. }
  2074. if (Math.abs(clientRect.height - height) <= 1) {
  2075. height = clientRect.height;
  2076. }
  2077. return {
  2078. x: element.offsetLeft,
  2079. y: element.offsetTop,
  2080. width: width,
  2081. height: height
  2082. };
  2083. }
  2084. function contains(parent, child) {
  2085. var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
  2086. if (parent.contains(child)) {
  2087. return true;
  2088. } // then fallback to custom implementation with Shadow DOM support
  2089. else if (rootNode && isShadowRoot(rootNode)) {
  2090. var next = child;
  2091. do {
  2092. if (next && parent.isSameNode(next)) {
  2093. return true;
  2094. } // $FlowFixMe[prop-missing]: need a better way to handle this...
  2095. next = next.parentNode || next.host;
  2096. } while (next);
  2097. } // Give up, the result is false
  2098. return false;
  2099. }
  2100. function getComputedStyle$1(element) {
  2101. return getWindow(element).getComputedStyle(element);
  2102. }
  2103. function isTableElement(element) {
  2104. return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
  2105. }
  2106. function getDocumentElement(element) {
  2107. // $FlowFixMe[incompatible-return]: assume body is always available
  2108. return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
  2109. element.document) || window.document).documentElement;
  2110. }
  2111. function getParentNode(element) {
  2112. if (getNodeName(element) === 'html') {
  2113. return element;
  2114. }
  2115. return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
  2116. // $FlowFixMe[incompatible-return]
  2117. // $FlowFixMe[prop-missing]
  2118. element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
  2119. element.parentNode || ( // DOM Element detected
  2120. isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
  2121. // $FlowFixMe[incompatible-call]: HTMLElement is a Node
  2122. getDocumentElement(element) // fallback
  2123. );
  2124. }
  2125. function getTrueOffsetParent(element) {
  2126. if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
  2127. getComputedStyle$1(element).position === 'fixed') {
  2128. return null;
  2129. }
  2130. return element.offsetParent;
  2131. } // `.offsetParent` reports `null` for fixed elements, while absolute elements
  2132. // return the containing block
  2133. function getContainingBlock(element) {
  2134. var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
  2135. var isIE = navigator.userAgent.indexOf('Trident') !== -1;
  2136. if (isIE && isHTMLElement(element)) {
  2137. // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
  2138. var elementCss = getComputedStyle$1(element);
  2139. if (elementCss.position === 'fixed') {
  2140. return null;
  2141. }
  2142. }
  2143. var currentNode = getParentNode(element);
  2144. while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
  2145. var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that
  2146. // create a containing block.
  2147. // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
  2148. if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
  2149. return currentNode;
  2150. } else {
  2151. currentNode = currentNode.parentNode;
  2152. }
  2153. }
  2154. return null;
  2155. } // Gets the closest ancestor positioned element. Handles some edge cases,
  2156. // such as table ancestors and cross browser bugs.
  2157. function getOffsetParent(element) {
  2158. var window = getWindow(element);
  2159. var offsetParent = getTrueOffsetParent(element);
  2160. while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
  2161. offsetParent = getTrueOffsetParent(offsetParent);
  2162. }
  2163. if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static')) {
  2164. return window;
  2165. }
  2166. return offsetParent || getContainingBlock(element) || window;
  2167. }
  2168. function getMainAxisFromPlacement(placement) {
  2169. return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
  2170. }
  2171. function within(min$1, value, max$1) {
  2172. return max(min$1, min(value, max$1));
  2173. }
  2174. function withinMaxClamp(min, value, max) {
  2175. var v = within(min, value, max);
  2176. return v > max ? max : v;
  2177. }
  2178. function getFreshSideObject() {
  2179. return {
  2180. top: 0,
  2181. right: 0,
  2182. bottom: 0,
  2183. left: 0
  2184. };
  2185. }
  2186. function mergePaddingObject(paddingObject) {
  2187. return Object.assign({}, getFreshSideObject(), paddingObject);
  2188. }
  2189. function expandToHashMap(value, keys) {
  2190. return keys.reduce(function (hashMap, key) {
  2191. hashMap[key] = value;
  2192. return hashMap;
  2193. }, {});
  2194. }
  2195. var toPaddingObject = function toPaddingObject(padding, state) {
  2196. padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
  2197. placement: state.placement
  2198. })) : padding;
  2199. return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
  2200. };
  2201. function arrow(_ref) {
  2202. var _state$modifiersData$;
  2203. var state = _ref.state,
  2204. name = _ref.name,
  2205. options = _ref.options;
  2206. var arrowElement = state.elements.arrow;
  2207. var popperOffsets = state.modifiersData.popperOffsets;
  2208. var basePlacement = getBasePlacement(state.placement);
  2209. var axis = getMainAxisFromPlacement(basePlacement);
  2210. var isVertical = [left, right].indexOf(basePlacement) >= 0;
  2211. var len = isVertical ? 'height' : 'width';
  2212. if (!arrowElement || !popperOffsets) {
  2213. return;
  2214. }
  2215. var paddingObject = toPaddingObject(options.padding, state);
  2216. var arrowRect = getLayoutRect(arrowElement);
  2217. var minProp = axis === 'y' ? top : left;
  2218. var maxProp = axis === 'y' ? bottom : right;
  2219. var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
  2220. var startDiff = popperOffsets[axis] - state.rects.reference[axis];
  2221. var arrowOffsetParent = getOffsetParent(arrowElement);
  2222. var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
  2223. var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
  2224. // outside of the popper bounds
  2225. var min = paddingObject[minProp];
  2226. var max = clientSize - arrowRect[len] - paddingObject[maxProp];
  2227. var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
  2228. var offset = within(min, center, max); // Prevents breaking syntax highlighting...
  2229. var axisProp = axis;
  2230. state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
  2231. }
  2232. function effect$1(_ref2) {
  2233. var state = _ref2.state,
  2234. options = _ref2.options;
  2235. var _options$element = options.element,
  2236. arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
  2237. if (arrowElement == null) {
  2238. return;
  2239. } // CSS selector
  2240. if (typeof arrowElement === 'string') {
  2241. arrowElement = state.elements.popper.querySelector(arrowElement);
  2242. if (!arrowElement) {
  2243. return;
  2244. }
  2245. }
  2246. if (true) {
  2247. if (!isHTMLElement(arrowElement)) {
  2248. console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));
  2249. }
  2250. }
  2251. if (!contains(state.elements.popper, arrowElement)) {
  2252. if (true) {
  2253. console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper', 'element.'].join(' '));
  2254. }
  2255. return;
  2256. }
  2257. state.elements.arrow = arrowElement;
  2258. } // eslint-disable-next-line import/no-unused-modules
  2259. var arrow$1 = {
  2260. name: 'arrow',
  2261. enabled: true,
  2262. phase: 'main',
  2263. fn: arrow,
  2264. effect: effect$1,
  2265. requires: ['popperOffsets'],
  2266. requiresIfExists: ['preventOverflow']
  2267. };
  2268. function getVariation(placement) {
  2269. return placement.split('-')[1];
  2270. }
  2271. var unsetSides = {
  2272. top: 'auto',
  2273. right: 'auto',
  2274. bottom: 'auto',
  2275. left: 'auto'
  2276. }; // Round the offsets to the nearest suitable subpixel based on the DPR.
  2277. // Zooming can change the DPR, but it seems to report a value that will
  2278. // cleanly divide the values into the appropriate subpixels.
  2279. function roundOffsetsByDPR(_ref) {
  2280. var x = _ref.x,
  2281. y = _ref.y;
  2282. var win = window;
  2283. var dpr = win.devicePixelRatio || 1;
  2284. return {
  2285. x: round(x * dpr) / dpr || 0,
  2286. y: round(y * dpr) / dpr || 0
  2287. };
  2288. }
  2289. function mapToStyles(_ref2) {
  2290. var _Object$assign2;
  2291. var popper = _ref2.popper,
  2292. popperRect = _ref2.popperRect,
  2293. placement = _ref2.placement,
  2294. variation = _ref2.variation,
  2295. offsets = _ref2.offsets,
  2296. position = _ref2.position,
  2297. gpuAcceleration = _ref2.gpuAcceleration,
  2298. adaptive = _ref2.adaptive,
  2299. roundOffsets = _ref2.roundOffsets,
  2300. isFixed = _ref2.isFixed;
  2301. var _offsets$x = offsets.x,
  2302. x = _offsets$x === void 0 ? 0 : _offsets$x,
  2303. _offsets$y = offsets.y,
  2304. y = _offsets$y === void 0 ? 0 : _offsets$y;
  2305. var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
  2306. x: x,
  2307. y: y
  2308. }) : {
  2309. x: x,
  2310. y: y
  2311. };
  2312. x = _ref3.x;
  2313. y = _ref3.y;
  2314. var hasX = offsets.hasOwnProperty('x');
  2315. var hasY = offsets.hasOwnProperty('y');
  2316. var sideX = left;
  2317. var sideY = top;
  2318. var win = window;
  2319. if (adaptive) {
  2320. var offsetParent = getOffsetParent(popper);
  2321. var heightProp = 'clientHeight';
  2322. var widthProp = 'clientWidth';
  2323. if (offsetParent === getWindow(popper)) {
  2324. offsetParent = getDocumentElement(popper);
  2325. if (getComputedStyle$1(offsetParent).position !== 'static' && position === 'absolute') {
  2326. heightProp = 'scrollHeight';
  2327. widthProp = 'scrollWidth';
  2328. }
  2329. } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
  2330. offsetParent = offsetParent;
  2331. if (placement === top || (placement === left || placement === right) && variation === end) {
  2332. sideY = bottom;
  2333. var offsetY = isFixed && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
  2334. offsetParent[heightProp];
  2335. y -= offsetY - popperRect.height;
  2336. y *= gpuAcceleration ? 1 : -1;
  2337. }
  2338. if (placement === left || (placement === top || placement === bottom) && variation === end) {
  2339. sideX = right;
  2340. var offsetX = isFixed && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
  2341. offsetParent[widthProp];
  2342. x -= offsetX - popperRect.width;
  2343. x *= gpuAcceleration ? 1 : -1;
  2344. }
  2345. }
  2346. var commonStyles = Object.assign({
  2347. position: position
  2348. }, adaptive && unsetSides);
  2349. var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
  2350. x: x,
  2351. y: y
  2352. }) : {
  2353. x: x,
  2354. y: y
  2355. };
  2356. x = _ref4.x;
  2357. y = _ref4.y;
  2358. if (gpuAcceleration) {
  2359. var _Object$assign;
  2360. return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
  2361. }
  2362. return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
  2363. }
  2364. function computeStyles(_ref5) {
  2365. var state = _ref5.state,
  2366. options = _ref5.options;
  2367. var _options$gpuAccelerat = options.gpuAcceleration,
  2368. gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
  2369. _options$adaptive = options.adaptive,
  2370. adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
  2371. _options$roundOffsets = options.roundOffsets,
  2372. roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
  2373. if (true) {
  2374. var transitionProperty = getComputedStyle$1(state.elements.popper).transitionProperty || '';
  2375. if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {
  2376. return transitionProperty.indexOf(property) >= 0;
  2377. })) {
  2378. console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: "transform", "top", "right", "bottom", "left".', '\n\n', 'Disable the "computeStyles" modifier\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\n\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));
  2379. }
  2380. }
  2381. var commonStyles = {
  2382. placement: getBasePlacement(state.placement),
  2383. variation: getVariation(state.placement),
  2384. popper: state.elements.popper,
  2385. popperRect: state.rects.popper,
  2386. gpuAcceleration: gpuAcceleration,
  2387. isFixed: state.options.strategy === 'fixed'
  2388. };
  2389. if (state.modifiersData.popperOffsets != null) {
  2390. state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
  2391. offsets: state.modifiersData.popperOffsets,
  2392. position: state.options.strategy,
  2393. adaptive: adaptive,
  2394. roundOffsets: roundOffsets
  2395. })));
  2396. }
  2397. if (state.modifiersData.arrow != null) {
  2398. state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
  2399. offsets: state.modifiersData.arrow,
  2400. position: 'absolute',
  2401. adaptive: false,
  2402. roundOffsets: roundOffsets
  2403. })));
  2404. }
  2405. state.attributes.popper = Object.assign({}, state.attributes.popper, {
  2406. 'data-popper-placement': state.placement
  2407. });
  2408. } // eslint-disable-next-line import/no-unused-modules
  2409. var computeStyles$1 = {
  2410. name: 'computeStyles',
  2411. enabled: true,
  2412. phase: 'beforeWrite',
  2413. fn: computeStyles,
  2414. data: {}
  2415. };
  2416. var passive = {
  2417. passive: true
  2418. };
  2419. function effect(_ref) {
  2420. var state = _ref.state,
  2421. instance = _ref.instance,
  2422. options = _ref.options;
  2423. var _options$scroll = options.scroll,
  2424. scroll = _options$scroll === void 0 ? true : _options$scroll,
  2425. _options$resize = options.resize,
  2426. resize = _options$resize === void 0 ? true : _options$resize;
  2427. var window = getWindow(state.elements.popper);
  2428. var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
  2429. if (scroll) {
  2430. scrollParents.forEach(function (scrollParent) {
  2431. scrollParent.addEventListener('scroll', instance.update, passive);
  2432. });
  2433. }
  2434. if (resize) {
  2435. window.addEventListener('resize', instance.update, passive);
  2436. }
  2437. return function () {
  2438. if (scroll) {
  2439. scrollParents.forEach(function (scrollParent) {
  2440. scrollParent.removeEventListener('scroll', instance.update, passive);
  2441. });
  2442. }
  2443. if (resize) {
  2444. window.removeEventListener('resize', instance.update, passive);
  2445. }
  2446. };
  2447. } // eslint-disable-next-line import/no-unused-modules
  2448. var eventListeners = {
  2449. name: 'eventListeners',
  2450. enabled: true,
  2451. phase: 'write',
  2452. fn: function fn() {},
  2453. effect: effect,
  2454. data: {}
  2455. };
  2456. var hash$1 = {
  2457. left: 'right',
  2458. right: 'left',
  2459. bottom: 'top',
  2460. top: 'bottom'
  2461. };
  2462. function getOppositePlacement(placement) {
  2463. return placement.replace(/left|right|bottom|top/g, function (matched) {
  2464. return hash$1[matched];
  2465. });
  2466. }
  2467. var hash = {
  2468. start: 'end',
  2469. end: 'start'
  2470. };
  2471. function getOppositeVariationPlacement(placement) {
  2472. return placement.replace(/start|end/g, function (matched) {
  2473. return hash[matched];
  2474. });
  2475. }
  2476. function getWindowScroll(node) {
  2477. var win = getWindow(node);
  2478. var scrollLeft = win.pageXOffset;
  2479. var scrollTop = win.pageYOffset;
  2480. return {
  2481. scrollLeft: scrollLeft,
  2482. scrollTop: scrollTop
  2483. };
  2484. }
  2485. function getWindowScrollBarX(element) {
  2486. // If <html> has a CSS width greater than the viewport, then this will be
  2487. // incorrect for RTL.
  2488. // Popper 1 is broken in this case and never had a bug report so let's assume
  2489. // it's not an issue. I don't think anyone ever specifies width on <html>
  2490. // anyway.
  2491. // Browsers where the left scrollbar doesn't cause an issue report `0` for
  2492. // this (e.g. Edge 2019, IE11, Safari)
  2493. return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
  2494. }
  2495. function getViewportRect(element) {
  2496. var win = getWindow(element);
  2497. var html = getDocumentElement(element);
  2498. var visualViewport = win.visualViewport;
  2499. var width = html.clientWidth;
  2500. var height = html.clientHeight;
  2501. var x = 0;
  2502. var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
  2503. // can be obscured underneath it.
  2504. // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
  2505. // if it isn't open, so if this isn't available, the popper will be detected
  2506. // to overflow the bottom of the screen too early.
  2507. if (visualViewport) {
  2508. width = visualViewport.width;
  2509. height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
  2510. // In Chrome, it returns a value very close to 0 (+/-) but contains rounding
  2511. // errors due to floating point numbers, so we need to check precision.
  2512. // Safari returns a number <= 0, usually < -1 when pinch-zoomed
  2513. // Feature detection fails in mobile emulation mode in Chrome.
  2514. // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
  2515. // 0.001
  2516. // Fallback here: "Not Safari" userAgent
  2517. if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
  2518. x = visualViewport.offsetLeft;
  2519. y = visualViewport.offsetTop;
  2520. }
  2521. }
  2522. return {
  2523. width: width,
  2524. height: height,
  2525. x: x + getWindowScrollBarX(element),
  2526. y: y
  2527. };
  2528. }
  2529. // of the `<html>` and `<body>` rect bounds if horizontally scrollable
  2530. function getDocumentRect(element) {
  2531. var _element$ownerDocumen;
  2532. var html = getDocumentElement(element);
  2533. var winScroll = getWindowScroll(element);
  2534. var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
  2535. var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
  2536. var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
  2537. var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
  2538. var y = -winScroll.scrollTop;
  2539. if (getComputedStyle$1(body || html).direction === 'rtl') {
  2540. x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
  2541. }
  2542. return {
  2543. width: width,
  2544. height: height,
  2545. x: x,
  2546. y: y
  2547. };
  2548. }
  2549. function isScrollParent(element) {
  2550. // Firefox wants us to check `-x` and `-y` variations as well
  2551. var _getComputedStyle = getComputedStyle$1(element),
  2552. overflow = _getComputedStyle.overflow,
  2553. overflowX = _getComputedStyle.overflowX,
  2554. overflowY = _getComputedStyle.overflowY;
  2555. return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
  2556. }
  2557. function getScrollParent(node) {
  2558. if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
  2559. // $FlowFixMe[incompatible-return]: assume body is always available
  2560. return node.ownerDocument.body;
  2561. }
  2562. if (isHTMLElement(node) && isScrollParent(node)) {
  2563. return node;
  2564. }
  2565. return getScrollParent(getParentNode(node));
  2566. }
  2567. /*
  2568. given a DOM element, return the list of all scroll parents, up the list of ancesors
  2569. until we get to the top window object. This list is what we attach scroll listeners
  2570. to, because if any of these parent elements scroll, we'll need to re-calculate the
  2571. reference element's position.
  2572. */
  2573. function listScrollParents(element, list) {
  2574. var _element$ownerDocumen;
  2575. if (list === void 0) {
  2576. list = [];
  2577. }
  2578. var scrollParent = getScrollParent(element);
  2579. var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
  2580. var win = getWindow(scrollParent);
  2581. var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
  2582. var updatedList = list.concat(target);
  2583. return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
  2584. updatedList.concat(listScrollParents(getParentNode(target)));
  2585. }
  2586. function rectToClientRect(rect) {
  2587. return Object.assign({}, rect, {
  2588. left: rect.x,
  2589. top: rect.y,
  2590. right: rect.x + rect.width,
  2591. bottom: rect.y + rect.height
  2592. });
  2593. }
  2594. function getInnerBoundingClientRect(element) {
  2595. var rect = getBoundingClientRect(element);
  2596. rect.top = rect.top + element.clientTop;
  2597. rect.left = rect.left + element.clientLeft;
  2598. rect.bottom = rect.top + element.clientHeight;
  2599. rect.right = rect.left + element.clientWidth;
  2600. rect.width = element.clientWidth;
  2601. rect.height = element.clientHeight;
  2602. rect.x = rect.left;
  2603. rect.y = rect.top;
  2604. return rect;
  2605. }
  2606. function getClientRectFromMixedType(element, clippingParent) {
  2607. return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
  2608. } // A "clipping parent" is an overflowable container with the characteristic of
  2609. // clipping (or hiding) overflowing elements with a position different from
  2610. // `initial`
  2611. function getClippingParents(element) {
  2612. var clippingParents = listScrollParents(getParentNode(element));
  2613. var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;
  2614. var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
  2615. if (!isElement(clipperElement)) {
  2616. return [];
  2617. } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
  2618. return clippingParents.filter(function (clippingParent) {
  2619. return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
  2620. });
  2621. } // Gets the maximum area that the element is visible in due to any number of
  2622. // clipping parents
  2623. function getClippingRect(element, boundary, rootBoundary) {
  2624. var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
  2625. var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
  2626. var firstClippingParent = clippingParents[0];
  2627. var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
  2628. var rect = getClientRectFromMixedType(element, clippingParent);
  2629. accRect.top = max(rect.top, accRect.top);
  2630. accRect.right = min(rect.right, accRect.right);
  2631. accRect.bottom = min(rect.bottom, accRect.bottom);
  2632. accRect.left = max(rect.left, accRect.left);
  2633. return accRect;
  2634. }, getClientRectFromMixedType(element, firstClippingParent));
  2635. clippingRect.width = clippingRect.right - clippingRect.left;
  2636. clippingRect.height = clippingRect.bottom - clippingRect.top;
  2637. clippingRect.x = clippingRect.left;
  2638. clippingRect.y = clippingRect.top;
  2639. return clippingRect;
  2640. }
  2641. function computeOffsets(_ref) {
  2642. var reference = _ref.reference,
  2643. element = _ref.element,
  2644. placement = _ref.placement;
  2645. var basePlacement = placement ? getBasePlacement(placement) : null;
  2646. var variation = placement ? getVariation(placement) : null;
  2647. var commonX = reference.x + reference.width / 2 - element.width / 2;
  2648. var commonY = reference.y + reference.height / 2 - element.height / 2;
  2649. var offsets;
  2650. switch (basePlacement) {
  2651. case top:
  2652. offsets = {
  2653. x: commonX,
  2654. y: reference.y - element.height
  2655. };
  2656. break;
  2657. case bottom:
  2658. offsets = {
  2659. x: commonX,
  2660. y: reference.y + reference.height
  2661. };
  2662. break;
  2663. case right:
  2664. offsets = {
  2665. x: reference.x + reference.width,
  2666. y: commonY
  2667. };
  2668. break;
  2669. case left:
  2670. offsets = {
  2671. x: reference.x - element.width,
  2672. y: commonY
  2673. };
  2674. break;
  2675. default:
  2676. offsets = {
  2677. x: reference.x,
  2678. y: reference.y
  2679. };
  2680. }
  2681. var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
  2682. if (mainAxis != null) {
  2683. var len = mainAxis === 'y' ? 'height' : 'width';
  2684. switch (variation) {
  2685. case start:
  2686. offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
  2687. break;
  2688. case end:
  2689. offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
  2690. break;
  2691. }
  2692. }
  2693. return offsets;
  2694. }
  2695. function detectOverflow(state, options) {
  2696. if (options === void 0) {
  2697. options = {};
  2698. }
  2699. var _options = options,
  2700. _options$placement = _options.placement,
  2701. placement = _options$placement === void 0 ? state.placement : _options$placement,
  2702. _options$boundary = _options.boundary,
  2703. boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
  2704. _options$rootBoundary = _options.rootBoundary,
  2705. rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
  2706. _options$elementConte = _options.elementContext,
  2707. elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
  2708. _options$altBoundary = _options.altBoundary,
  2709. altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
  2710. _options$padding = _options.padding,
  2711. padding = _options$padding === void 0 ? 0 : _options$padding;
  2712. var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
  2713. var altContext = elementContext === popper ? reference : popper;
  2714. var popperRect = state.rects.popper;
  2715. var element = state.elements[altBoundary ? altContext : elementContext];
  2716. var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
  2717. var referenceClientRect = getBoundingClientRect(state.elements.reference);
  2718. var popperOffsets = computeOffsets({
  2719. reference: referenceClientRect,
  2720. element: popperRect,
  2721. strategy: 'absolute',
  2722. placement: placement
  2723. });
  2724. var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
  2725. var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
  2726. // 0 or negative = within the clipping rect
  2727. var overflowOffsets = {
  2728. top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
  2729. bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
  2730. left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
  2731. right: elementClientRect.right - clippingClientRect.right + paddingObject.right
  2732. };
  2733. var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
  2734. if (elementContext === popper && offsetData) {
  2735. var offset = offsetData[placement];
  2736. Object.keys(overflowOffsets).forEach(function (key) {
  2737. var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
  2738. var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
  2739. overflowOffsets[key] += offset[axis] * multiply;
  2740. });
  2741. }
  2742. return overflowOffsets;
  2743. }
  2744. function computeAutoPlacement(state, options) {
  2745. if (options === void 0) {
  2746. options = {};
  2747. }
  2748. var _options = options,
  2749. placement = _options.placement,
  2750. boundary = _options.boundary,
  2751. rootBoundary = _options.rootBoundary,
  2752. padding = _options.padding,
  2753. flipVariations = _options.flipVariations,
  2754. _options$allowedAutoP = _options.allowedAutoPlacements,
  2755. allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
  2756. var variation = getVariation(placement);
  2757. var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
  2758. return getVariation(placement) === variation;
  2759. }) : basePlacements;
  2760. var allowedPlacements = placements$1.filter(function (placement) {
  2761. return allowedAutoPlacements.indexOf(placement) >= 0;
  2762. });
  2763. if (allowedPlacements.length === 0) {
  2764. allowedPlacements = placements$1;
  2765. if (true) {
  2766. console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, "auto" cannot be used to allow "bottom-start".', 'Use "auto-start" instead.'].join(' '));
  2767. }
  2768. } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
  2769. var overflows = allowedPlacements.reduce(function (acc, placement) {
  2770. acc[placement] = detectOverflow(state, {
  2771. placement: placement,
  2772. boundary: boundary,
  2773. rootBoundary: rootBoundary,
  2774. padding: padding
  2775. })[getBasePlacement(placement)];
  2776. return acc;
  2777. }, {});
  2778. return Object.keys(overflows).sort(function (a, b) {
  2779. return overflows[a] - overflows[b];
  2780. });
  2781. }
  2782. function getExpandedFallbackPlacements(placement) {
  2783. if (getBasePlacement(placement) === auto) {
  2784. return [];
  2785. }
  2786. var oppositePlacement = getOppositePlacement(placement);
  2787. return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
  2788. }
  2789. function flip(_ref) {
  2790. var state = _ref.state,
  2791. options = _ref.options,
  2792. name = _ref.name;
  2793. if (state.modifiersData[name]._skip) {
  2794. return;
  2795. }
  2796. var _options$mainAxis = options.mainAxis,
  2797. checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
  2798. _options$altAxis = options.altAxis,
  2799. checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
  2800. specifiedFallbackPlacements = options.fallbackPlacements,
  2801. padding = options.padding,
  2802. boundary = options.boundary,
  2803. rootBoundary = options.rootBoundary,
  2804. altBoundary = options.altBoundary,
  2805. _options$flipVariatio = options.flipVariations,
  2806. flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
  2807. allowedAutoPlacements = options.allowedAutoPlacements;
  2808. var preferredPlacement = state.options.placement;
  2809. var basePlacement = getBasePlacement(preferredPlacement);
  2810. var isBasePlacement = basePlacement === preferredPlacement;
  2811. var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
  2812. var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
  2813. return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
  2814. placement: placement,
  2815. boundary: boundary,
  2816. rootBoundary: rootBoundary,
  2817. padding: padding,
  2818. flipVariations: flipVariations,
  2819. allowedAutoPlacements: allowedAutoPlacements
  2820. }) : placement);
  2821. }, []);
  2822. var referenceRect = state.rects.reference;
  2823. var popperRect = state.rects.popper;
  2824. var checksMap = new Map();
  2825. var makeFallbackChecks = true;
  2826. var firstFittingPlacement = placements[0];
  2827. for (var i = 0; i < placements.length; i++) {
  2828. var placement = placements[i];
  2829. var _basePlacement = getBasePlacement(placement);
  2830. var isStartVariation = getVariation(placement) === start;
  2831. var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
  2832. var len = isVertical ? 'width' : 'height';
  2833. var overflow = detectOverflow(state, {
  2834. placement: placement,
  2835. boundary: boundary,
  2836. rootBoundary: rootBoundary,
  2837. altBoundary: altBoundary,
  2838. padding: padding
  2839. });
  2840. var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
  2841. if (referenceRect[len] > popperRect[len]) {
  2842. mainVariationSide = getOppositePlacement(mainVariationSide);
  2843. }
  2844. var altVariationSide = getOppositePlacement(mainVariationSide);
  2845. var checks = [];
  2846. if (checkMainAxis) {
  2847. checks.push(overflow[_basePlacement] <= 0);
  2848. }
  2849. if (checkAltAxis) {
  2850. checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
  2851. }
  2852. if (checks.every(function (check) {
  2853. return check;
  2854. })) {
  2855. firstFittingPlacement = placement;
  2856. makeFallbackChecks = false;
  2857. break;
  2858. }
  2859. checksMap.set(placement, checks);
  2860. }
  2861. if (makeFallbackChecks) {
  2862. // `2` may be desired in some cases – research later
  2863. var numberOfChecks = flipVariations ? 3 : 1;
  2864. var _loop = function _loop(_i) {
  2865. var fittingPlacement = placements.find(function (placement) {
  2866. var checks = checksMap.get(placement);
  2867. if (checks) {
  2868. return checks.slice(0, _i).every(function (check) {
  2869. return check;
  2870. });
  2871. }
  2872. });
  2873. if (fittingPlacement) {
  2874. firstFittingPlacement = fittingPlacement;
  2875. return "break";
  2876. }
  2877. };
  2878. for (var _i = numberOfChecks; _i > 0; _i--) {
  2879. var _ret = _loop(_i);
  2880. if (_ret === "break") break;
  2881. }
  2882. }
  2883. if (state.placement !== firstFittingPlacement) {
  2884. state.modifiersData[name]._skip = true;
  2885. state.placement = firstFittingPlacement;
  2886. state.reset = true;
  2887. }
  2888. } // eslint-disable-next-line import/no-unused-modules
  2889. var flip$1 = {
  2890. name: 'flip',
  2891. enabled: true,
  2892. phase: 'main',
  2893. fn: flip,
  2894. requiresIfExists: ['offset'],
  2895. data: {
  2896. _skip: false
  2897. }
  2898. };
  2899. function getSideOffsets(overflow, rect, preventedOffsets) {
  2900. if (preventedOffsets === void 0) {
  2901. preventedOffsets = {
  2902. x: 0,
  2903. y: 0
  2904. };
  2905. }
  2906. return {
  2907. top: overflow.top - rect.height - preventedOffsets.y,
  2908. right: overflow.right - rect.width + preventedOffsets.x,
  2909. bottom: overflow.bottom - rect.height + preventedOffsets.y,
  2910. left: overflow.left - rect.width - preventedOffsets.x
  2911. };
  2912. }
  2913. function isAnySideFullyClipped(overflow) {
  2914. return [top, right, bottom, left].some(function (side) {
  2915. return overflow[side] >= 0;
  2916. });
  2917. }
  2918. function hide(_ref) {
  2919. var state = _ref.state,
  2920. name = _ref.name;
  2921. var referenceRect = state.rects.reference;
  2922. var popperRect = state.rects.popper;
  2923. var preventedOffsets = state.modifiersData.preventOverflow;
  2924. var referenceOverflow = detectOverflow(state, {
  2925. elementContext: 'reference'
  2926. });
  2927. var popperAltOverflow = detectOverflow(state, {
  2928. altBoundary: true
  2929. });
  2930. var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
  2931. var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
  2932. var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
  2933. var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
  2934. state.modifiersData[name] = {
  2935. referenceClippingOffsets: referenceClippingOffsets,
  2936. popperEscapeOffsets: popperEscapeOffsets,
  2937. isReferenceHidden: isReferenceHidden,
  2938. hasPopperEscaped: hasPopperEscaped
  2939. };
  2940. state.attributes.popper = Object.assign({}, state.attributes.popper, {
  2941. 'data-popper-reference-hidden': isReferenceHidden,
  2942. 'data-popper-escaped': hasPopperEscaped
  2943. });
  2944. } // eslint-disable-next-line import/no-unused-modules
  2945. var hide$1 = {
  2946. name: 'hide',
  2947. enabled: true,
  2948. phase: 'main',
  2949. requiresIfExists: ['preventOverflow'],
  2950. fn: hide
  2951. };
  2952. function distanceAndSkiddingToXY(placement, rects, offset) {
  2953. var basePlacement = getBasePlacement(placement);
  2954. var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
  2955. var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
  2956. placement: placement
  2957. })) : offset,
  2958. skidding = _ref[0],
  2959. distance = _ref[1];
  2960. skidding = skidding || 0;
  2961. distance = (distance || 0) * invertDistance;
  2962. return [left, right].indexOf(basePlacement) >= 0 ? {
  2963. x: distance,
  2964. y: skidding
  2965. } : {
  2966. x: skidding,
  2967. y: distance
  2968. };
  2969. }
  2970. function offset(_ref2) {
  2971. var state = _ref2.state,
  2972. options = _ref2.options,
  2973. name = _ref2.name;
  2974. var _options$offset = options.offset,
  2975. offset = _options$offset === void 0 ? [0, 0] : _options$offset;
  2976. var data = placements.reduce(function (acc, placement) {
  2977. acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
  2978. return acc;
  2979. }, {});
  2980. var _data$state$placement = data[state.placement],
  2981. x = _data$state$placement.x,
  2982. y = _data$state$placement.y;
  2983. if (state.modifiersData.popperOffsets != null) {
  2984. state.modifiersData.popperOffsets.x += x;
  2985. state.modifiersData.popperOffsets.y += y;
  2986. }
  2987. state.modifiersData[name] = data;
  2988. } // eslint-disable-next-line import/no-unused-modules
  2989. var offset$1 = {
  2990. name: 'offset',
  2991. enabled: true,
  2992. phase: 'main',
  2993. requires: ['popperOffsets'],
  2994. fn: offset
  2995. };
  2996. function popperOffsets(_ref) {
  2997. var state = _ref.state,
  2998. name = _ref.name;
  2999. // Offsets are the actual position the popper needs to have to be
  3000. // properly positioned near its reference element
  3001. // This is the most basic placement, and will be adjusted by
  3002. // the modifiers in the next step
  3003. state.modifiersData[name] = computeOffsets({
  3004. reference: state.rects.reference,
  3005. element: state.rects.popper,
  3006. strategy: 'absolute',
  3007. placement: state.placement
  3008. });
  3009. } // eslint-disable-next-line import/no-unused-modules
  3010. var popperOffsets$1 = {
  3011. name: 'popperOffsets',
  3012. enabled: true,
  3013. phase: 'read',
  3014. fn: popperOffsets,
  3015. data: {}
  3016. };
  3017. function getAltAxis(axis) {
  3018. return axis === 'x' ? 'y' : 'x';
  3019. }
  3020. function preventOverflow(_ref) {
  3021. var state = _ref.state,
  3022. options = _ref.options,
  3023. name = _ref.name;
  3024. var _options$mainAxis = options.mainAxis,
  3025. checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
  3026. _options$altAxis = options.altAxis,
  3027. checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
  3028. boundary = options.boundary,
  3029. rootBoundary = options.rootBoundary,
  3030. altBoundary = options.altBoundary,
  3031. padding = options.padding,
  3032. _options$tether = options.tether,
  3033. tether = _options$tether === void 0 ? true : _options$tether,
  3034. _options$tetherOffset = options.tetherOffset,
  3035. tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
  3036. var overflow = detectOverflow(state, {
  3037. boundary: boundary,
  3038. rootBoundary: rootBoundary,
  3039. padding: padding,
  3040. altBoundary: altBoundary
  3041. });
  3042. var basePlacement = getBasePlacement(state.placement);
  3043. var variation = getVariation(state.placement);
  3044. var isBasePlacement = !variation;
  3045. var mainAxis = getMainAxisFromPlacement(basePlacement);
  3046. var altAxis = getAltAxis(mainAxis);
  3047. var popperOffsets = state.modifiersData.popperOffsets;
  3048. var referenceRect = state.rects.reference;
  3049. var popperRect = state.rects.popper;
  3050. var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
  3051. placement: state.placement
  3052. })) : tetherOffset;
  3053. var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
  3054. mainAxis: tetherOffsetValue,
  3055. altAxis: tetherOffsetValue
  3056. } : Object.assign({
  3057. mainAxis: 0,
  3058. altAxis: 0
  3059. }, tetherOffsetValue);
  3060. var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
  3061. var data = {
  3062. x: 0,
  3063. y: 0
  3064. };
  3065. if (!popperOffsets) {
  3066. return;
  3067. }
  3068. if (checkMainAxis) {
  3069. var _offsetModifierState$;
  3070. var mainSide = mainAxis === 'y' ? top : left;
  3071. var altSide = mainAxis === 'y' ? bottom : right;
  3072. var len = mainAxis === 'y' ? 'height' : 'width';
  3073. var offset = popperOffsets[mainAxis];
  3074. var min$1 = offset + overflow[mainSide];
  3075. var max$1 = offset - overflow[altSide];
  3076. var additive = tether ? -popperRect[len] / 2 : 0;
  3077. var minLen = variation === start ? referenceRect[len] : popperRect[len];
  3078. var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
  3079. // outside the reference bounds
  3080. var arrowElement = state.elements.arrow;
  3081. var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
  3082. width: 0,
  3083. height: 0
  3084. };
  3085. var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
  3086. var arrowPaddingMin = arrowPaddingObject[mainSide];
  3087. var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
  3088. // to include its full size in the calculation. If the reference is small
  3089. // and near the edge of a boundary, the popper can overflow even if the
  3090. // reference is not overflowing as well (e.g. virtual elements with no
  3091. // width or height)
  3092. var arrowLen = within(0, referenceRect[len], arrowRect[len]);
  3093. var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
  3094. var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
  3095. var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
  3096. var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
  3097. var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
  3098. var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
  3099. var tetherMax = offset + maxOffset - offsetModifierValue;
  3100. var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
  3101. popperOffsets[mainAxis] = preventedOffset;
  3102. data[mainAxis] = preventedOffset - offset;
  3103. }
  3104. if (checkAltAxis) {
  3105. var _offsetModifierState$2;
  3106. var _mainSide = mainAxis === 'x' ? top : left;
  3107. var _altSide = mainAxis === 'x' ? bottom : right;
  3108. var _offset = popperOffsets[altAxis];
  3109. var _len = altAxis === 'y' ? 'height' : 'width';
  3110. var _min = _offset + overflow[_mainSide];
  3111. var _max = _offset - overflow[_altSide];
  3112. var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
  3113. var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
  3114. var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
  3115. var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
  3116. var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
  3117. popperOffsets[altAxis] = _preventedOffset;
  3118. data[altAxis] = _preventedOffset - _offset;
  3119. }
  3120. state.modifiersData[name] = data;
  3121. } // eslint-disable-next-line import/no-unused-modules
  3122. var preventOverflow$1 = {
  3123. name: 'preventOverflow',
  3124. enabled: true,
  3125. phase: 'main',
  3126. fn: preventOverflow,
  3127. requiresIfExists: ['offset']
  3128. };
  3129. function getHTMLElementScroll(element) {
  3130. return {
  3131. scrollLeft: element.scrollLeft,
  3132. scrollTop: element.scrollTop
  3133. };
  3134. }
  3135. function getNodeScroll(node) {
  3136. if (node === getWindow(node) || !isHTMLElement(node)) {
  3137. return getWindowScroll(node);
  3138. } else {
  3139. return getHTMLElementScroll(node);
  3140. }
  3141. }
  3142. function isElementScaled(element) {
  3143. var rect = element.getBoundingClientRect();
  3144. var scaleX = round(rect.width) / element.offsetWidth || 1;
  3145. var scaleY = round(rect.height) / element.offsetHeight || 1;
  3146. return scaleX !== 1 || scaleY !== 1;
  3147. } // Returns the composite rect of an element relative to its offsetParent.
  3148. // Composite means it takes into account transforms as well as layout.
  3149. function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
  3150. if (isFixed === void 0) {
  3151. isFixed = false;
  3152. }
  3153. var isOffsetParentAnElement = isHTMLElement(offsetParent);
  3154. var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
  3155. var documentElement = getDocumentElement(offsetParent);
  3156. var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
  3157. var scroll = {
  3158. scrollLeft: 0,
  3159. scrollTop: 0
  3160. };
  3161. var offsets = {
  3162. x: 0,
  3163. y: 0
  3164. };
  3165. if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
  3166. if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
  3167. isScrollParent(documentElement)) {
  3168. scroll = getNodeScroll(offsetParent);
  3169. }
  3170. if (isHTMLElement(offsetParent)) {
  3171. offsets = getBoundingClientRect(offsetParent, true);
  3172. offsets.x += offsetParent.clientLeft;
  3173. offsets.y += offsetParent.clientTop;
  3174. } else if (documentElement) {
  3175. offsets.x = getWindowScrollBarX(documentElement);
  3176. }
  3177. }
  3178. return {
  3179. x: rect.left + scroll.scrollLeft - offsets.x,
  3180. y: rect.top + scroll.scrollTop - offsets.y,
  3181. width: rect.width,
  3182. height: rect.height
  3183. };
  3184. }
  3185. function order(modifiers) {
  3186. var map = new Map();
  3187. var visited = new Set();
  3188. var result = [];
  3189. modifiers.forEach(function (modifier) {
  3190. map.set(modifier.name, modifier);
  3191. }); // On visiting object, check for its dependencies and visit them recursively
  3192. function sort(modifier) {
  3193. visited.add(modifier.name);
  3194. var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
  3195. requires.forEach(function (dep) {
  3196. if (!visited.has(dep)) {
  3197. var depModifier = map.get(dep);
  3198. if (depModifier) {
  3199. sort(depModifier);
  3200. }
  3201. }
  3202. });
  3203. result.push(modifier);
  3204. }
  3205. modifiers.forEach(function (modifier) {
  3206. if (!visited.has(modifier.name)) {
  3207. // check for visited object
  3208. sort(modifier);
  3209. }
  3210. });
  3211. return result;
  3212. }
  3213. function orderModifiers(modifiers) {
  3214. // order based on dependencies
  3215. var orderedModifiers = order(modifiers); // order based on phase
  3216. return modifierPhases.reduce(function (acc, phase) {
  3217. return acc.concat(orderedModifiers.filter(function (modifier) {
  3218. return modifier.phase === phase;
  3219. }));
  3220. }, []);
  3221. }
  3222. function debounce(fn) {
  3223. var pending;
  3224. return function () {
  3225. if (!pending) {
  3226. pending = new Promise(function (resolve) {
  3227. Promise.resolve().then(function () {
  3228. pending = undefined;
  3229. resolve(fn());
  3230. });
  3231. });
  3232. }
  3233. return pending;
  3234. };
  3235. }
  3236. function format(str) {
  3237. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  3238. args[_key - 1] = arguments[_key];
  3239. }
  3240. return [].concat(args).reduce(function (p, c) {
  3241. return p.replace(/%s/, c);
  3242. }, str);
  3243. }
  3244. var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
  3245. var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
  3246. var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
  3247. function validateModifiers(modifiers) {
  3248. modifiers.forEach(function (modifier) {
  3249. [].concat(Object.keys(modifier), VALID_PROPERTIES) // IE11-compatible replacement for `new Set(iterable)`
  3250. .filter(function (value, index, self) {
  3251. return self.indexOf(value) === index;
  3252. }).forEach(function (key) {
  3253. switch (key) {
  3254. case 'name':
  3255. if (typeof modifier.name !== 'string') {
  3256. console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', "\"" + String(modifier.name) + "\""));
  3257. }
  3258. break;
  3259. case 'enabled':
  3260. if (typeof modifier.enabled !== 'boolean') {
  3261. console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\""));
  3262. }
  3263. break;
  3264. case 'phase':
  3265. if (modifierPhases.indexOf(modifier.phase) < 0) {
  3266. console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(', '), "\"" + String(modifier.phase) + "\""));
  3267. }
  3268. break;
  3269. case 'fn':
  3270. if (typeof modifier.fn !== 'function') {
  3271. console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', "\"" + String(modifier.fn) + "\""));
  3272. }
  3273. break;
  3274. case 'effect':
  3275. if (modifier.effect != null && typeof modifier.effect !== 'function') {
  3276. console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\""));
  3277. }
  3278. break;
  3279. case 'requires':
  3280. if (modifier.requires != null && !Array.isArray(modifier.requires)) {
  3281. console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\""));
  3282. }
  3283. break;
  3284. case 'requiresIfExists':
  3285. if (!Array.isArray(modifier.requiresIfExists)) {
  3286. console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', "\"" + String(modifier.requiresIfExists) + "\""));
  3287. }
  3288. break;
  3289. case 'options':
  3290. case 'data':
  3291. break;
  3292. default:
  3293. console.error("PopperJS: an invalid property has been provided to the \"" + modifier.name + "\" modifier, valid properties are " + VALID_PROPERTIES.map(function (s) {
  3294. return "\"" + s + "\"";
  3295. }).join(', ') + "; but \"" + key + "\" was provided.");
  3296. }
  3297. modifier.requires && modifier.requires.forEach(function (requirement) {
  3298. if (modifiers.find(function (mod) {
  3299. return mod.name === requirement;
  3300. }) == null) {
  3301. console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
  3302. }
  3303. });
  3304. });
  3305. });
  3306. }
  3307. function uniqueBy(arr, fn) {
  3308. var identifiers = new Set();
  3309. return arr.filter(function (item) {
  3310. var identifier = fn(item);
  3311. if (!identifiers.has(identifier)) {
  3312. identifiers.add(identifier);
  3313. return true;
  3314. }
  3315. });
  3316. }
  3317. function mergeByName(modifiers) {
  3318. var merged = modifiers.reduce(function (merged, current) {
  3319. var existing = merged[current.name];
  3320. merged[current.name] = existing ? Object.assign({}, existing, current, {
  3321. options: Object.assign({}, existing.options, current.options),
  3322. data: Object.assign({}, existing.data, current.data)
  3323. }) : current;
  3324. return merged;
  3325. }, {}); // IE11 does not support Object.values
  3326. return Object.keys(merged).map(function (key) {
  3327. return merged[key];
  3328. });
  3329. }
  3330. var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
  3331. var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
  3332. var DEFAULT_OPTIONS = {
  3333. placement: 'bottom',
  3334. modifiers: [],
  3335. strategy: 'absolute'
  3336. };
  3337. function areValidElements() {
  3338. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  3339. args[_key] = arguments[_key];
  3340. }
  3341. return !args.some(function (element) {
  3342. return !(element && typeof element.getBoundingClientRect === 'function');
  3343. });
  3344. }
  3345. function popperGenerator(generatorOptions) {
  3346. if (generatorOptions === void 0) {
  3347. generatorOptions = {};
  3348. }
  3349. var _generatorOptions = generatorOptions,
  3350. _generatorOptions$def = _generatorOptions.defaultModifiers,
  3351. defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
  3352. _generatorOptions$def2 = _generatorOptions.defaultOptions,
  3353. defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
  3354. return function createPopper(reference, popper, options) {
  3355. if (options === void 0) {
  3356. options = defaultOptions;
  3357. }
  3358. var state = {
  3359. placement: 'bottom',
  3360. orderedModifiers: [],
  3361. options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
  3362. modifiersData: {},
  3363. elements: {
  3364. reference: reference,
  3365. popper: popper
  3366. },
  3367. attributes: {},
  3368. styles: {}
  3369. };
  3370. var effectCleanupFns = [];
  3371. var isDestroyed = false;
  3372. var instance = {
  3373. state: state,
  3374. setOptions: function setOptions(setOptionsAction) {
  3375. var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
  3376. cleanupModifierEffects();
  3377. state.options = Object.assign({}, defaultOptions, state.options, options);
  3378. state.scrollParents = {
  3379. reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
  3380. popper: listScrollParents(popper)
  3381. }; // Orders the modifiers based on their dependencies and `phase`
  3382. // properties
  3383. var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
  3384. state.orderedModifiers = orderedModifiers.filter(function (m) {
  3385. return m.enabled;
  3386. }); // Validate the provided modifiers so that the consumer will get warned
  3387. // if one of the modifiers is invalid for any reason
  3388. if (true) {
  3389. var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {
  3390. var name = _ref.name;
  3391. return name;
  3392. });
  3393. validateModifiers(modifiers);
  3394. if (getBasePlacement(state.options.placement) === auto) {
  3395. var flipModifier = state.orderedModifiers.find(function (_ref2) {
  3396. var name = _ref2.name;
  3397. return name === 'flip';
  3398. });
  3399. if (!flipModifier) {
  3400. console.error(['Popper: "auto" placements require the "flip" modifier be', 'present and enabled to work.'].join(' '));
  3401. }
  3402. }
  3403. var _getComputedStyle = getComputedStyle$1(popper),
  3404. marginTop = _getComputedStyle.marginTop,
  3405. marginRight = _getComputedStyle.marginRight,
  3406. marginBottom = _getComputedStyle.marginBottom,
  3407. marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
  3408. // cause bugs with positioning, so we'll warn the consumer
  3409. if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
  3410. return parseFloat(margin);
  3411. })) {
  3412. console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
  3413. }
  3414. }
  3415. runModifierEffects();
  3416. return instance.update();
  3417. },
  3418. // Sync update – it will always be executed, even if not necessary. This
  3419. // is useful for low frequency updates where sync behavior simplifies the
  3420. // logic.
  3421. // For high frequency updates (e.g. `resize` and `scroll` events), always
  3422. // prefer the async Popper#update method
  3423. forceUpdate: function forceUpdate() {
  3424. if (isDestroyed) {
  3425. return;
  3426. }
  3427. var _state$elements = state.elements,
  3428. reference = _state$elements.reference,
  3429. popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
  3430. // anymore
  3431. if (!areValidElements(reference, popper)) {
  3432. if (true) {
  3433. console.error(INVALID_ELEMENT_ERROR);
  3434. }
  3435. return;
  3436. } // Store the reference and popper rects to be read by modifiers
  3437. state.rects = {
  3438. reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
  3439. popper: getLayoutRect(popper)
  3440. }; // Modifiers have the ability to reset the current update cycle. The
  3441. // most common use case for this is the `flip` modifier changing the
  3442. // placement, which then needs to re-run all the modifiers, because the
  3443. // logic was previously ran for the previous placement and is therefore
  3444. // stale/incorrect
  3445. state.reset = false;
  3446. state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
  3447. // is filled with the initial data specified by the modifier. This means
  3448. // it doesn't persist and is fresh on each update.
  3449. // To ensure persistent data, use `${name}#persistent`
  3450. state.orderedModifiers.forEach(function (modifier) {
  3451. return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
  3452. });
  3453. var __debug_loops__ = 0;
  3454. for (var index = 0; index < state.orderedModifiers.length; index++) {
  3455. if (true) {
  3456. __debug_loops__ += 1;
  3457. if (__debug_loops__ > 100) {
  3458. console.error(INFINITE_LOOP_ERROR);
  3459. break;
  3460. }
  3461. }
  3462. if (state.reset === true) {
  3463. state.reset = false;
  3464. index = -1;
  3465. continue;
  3466. }
  3467. var _state$orderedModifie = state.orderedModifiers[index],
  3468. fn = _state$orderedModifie.fn,
  3469. _state$orderedModifie2 = _state$orderedModifie.options,
  3470. _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
  3471. name = _state$orderedModifie.name;
  3472. if (typeof fn === 'function') {
  3473. state = fn({
  3474. state: state,
  3475. options: _options,
  3476. name: name,
  3477. instance: instance
  3478. }) || state;
  3479. }
  3480. }
  3481. },
  3482. // Async and optimistically optimized update – it will not be executed if
  3483. // not necessary (debounced to run at most once-per-tick)
  3484. update: debounce(function () {
  3485. return new Promise(function (resolve) {
  3486. instance.forceUpdate();
  3487. resolve(state);
  3488. });
  3489. }),
  3490. destroy: function destroy() {
  3491. cleanupModifierEffects();
  3492. isDestroyed = true;
  3493. }
  3494. };
  3495. if (!areValidElements(reference, popper)) {
  3496. if (true) {
  3497. console.error(INVALID_ELEMENT_ERROR);
  3498. }
  3499. return instance;
  3500. }
  3501. instance.setOptions(options).then(function (state) {
  3502. if (!isDestroyed && options.onFirstUpdate) {
  3503. options.onFirstUpdate(state);
  3504. }
  3505. }); // Modifiers have the ability to execute arbitrary code before the first
  3506. // update cycle runs. They will be executed in the same order as the update
  3507. // cycle. This is useful when a modifier adds some persistent data that
  3508. // other modifiers need to use, but the modifier is run after the dependent
  3509. // one.
  3510. function runModifierEffects() {
  3511. state.orderedModifiers.forEach(function (_ref3) {
  3512. var name = _ref3.name,
  3513. _ref3$options = _ref3.options,
  3514. options = _ref3$options === void 0 ? {} : _ref3$options,
  3515. effect = _ref3.effect;
  3516. if (typeof effect === 'function') {
  3517. var cleanupFn = effect({
  3518. state: state,
  3519. name: name,
  3520. instance: instance,
  3521. options: options
  3522. });
  3523. var noopFn = function noopFn() {};
  3524. effectCleanupFns.push(cleanupFn || noopFn);
  3525. }
  3526. });
  3527. }
  3528. function cleanupModifierEffects() {
  3529. effectCleanupFns.forEach(function (fn) {
  3530. return fn();
  3531. });
  3532. effectCleanupFns = [];
  3533. }
  3534. return instance;
  3535. };
  3536. }
  3537. var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
  3538. var createPopper = /*#__PURE__*/popperGenerator({
  3539. defaultModifiers: defaultModifiers
  3540. }); // eslint-disable-next-line import/no-unused-modules
  3541. const CDropdown = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  3542. name: 'CDropdown',
  3543. props: {
  3544. /**
  3545. * Set aligment of dropdown menu.
  3546. *
  3547. * @values { 'start' | 'end' | { xs: 'start' | 'end' } | { sm: 'start' | 'end' } | { md: 'start' | 'end' } | { lg: 'start' | 'end' } | { xl: 'start' | 'end'} | { xxl: 'start' | 'end'} }
  3548. */
  3549. alignment: {
  3550. type: [String, Object],
  3551. default: undefined,
  3552. required: false,
  3553. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  3554. validator: (value) => {
  3555. if (value === 'start' || value === 'end') {
  3556. return true;
  3557. }
  3558. else {
  3559. if (typeof value.xs !== 'undefined' && (value.xs === 'start' || value.xs === 'end')) {
  3560. return true;
  3561. }
  3562. if (typeof value.sm !== 'undefined' && (value.sm === 'start' || value.sm === 'end')) {
  3563. return true;
  3564. }
  3565. if (typeof value.md !== 'undefined' && (value.md === 'start' || value.md === 'end')) {
  3566. return true;
  3567. }
  3568. if (typeof value.lg !== 'undefined' && (value.lg === 'start' || value.lg === 'end')) {
  3569. return true;
  3570. }
  3571. if (typeof value.xl !== 'undefined' && (value.xl === 'start' || value.xl === 'end')) {
  3572. return true;
  3573. }
  3574. if (typeof value.xxl !== 'undefined' && (value.xxl === 'start' || value.xxl === 'end')) {
  3575. return true;
  3576. }
  3577. return false;
  3578. }
  3579. },
  3580. },
  3581. /**
  3582. * Sets a darker color scheme to match a dark navbar.
  3583. */
  3584. dark: {
  3585. type: Boolean,
  3586. required: false,
  3587. },
  3588. /**
  3589. * Sets a specified direction and location of the dropdown menu.
  3590. *
  3591. * @values 'dropup', 'dropend', 'dropstart'
  3592. */
  3593. direction: {
  3594. type: String,
  3595. default: undefined,
  3596. required: false,
  3597. validator: (value) => {
  3598. return ['dropup', 'dropend', 'dropstart'].includes(value);
  3599. },
  3600. },
  3601. /**
  3602. * Toggle the disabled state for the component.
  3603. */
  3604. disabled: {
  3605. type: Boolean,
  3606. required: false,
  3607. },
  3608. /**
  3609. * Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property.
  3610. *
  3611. * @values 'auto', 'top-end', 'top', 'top-start', 'bottom-end', 'bottom', 'bottom-start', 'right-start', 'right', 'right-end', 'left-start', 'left', 'left-end'
  3612. */
  3613. placement: {
  3614. type: String,
  3615. default: 'bottom-start',
  3616. required: false,
  3617. },
  3618. /**
  3619. * If you want to disable dynamic positioning set this property to `true`.
  3620. */
  3621. popper: {
  3622. type: Boolean,
  3623. default: true,
  3624. required: false,
  3625. },
  3626. /**
  3627. * Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.
  3628. */
  3629. trigger: {
  3630. type: [String, Array],
  3631. required: false,
  3632. default: 'click',
  3633. },
  3634. /**
  3635. * Set the dropdown variant to an btn-group, dropdown, input-group, and nav-item.
  3636. *
  3637. * @values 'btn-group', 'dropdown', 'input-group', 'nav-item'
  3638. */
  3639. variant: {
  3640. type: String,
  3641. default: 'btn-group',
  3642. required: false,
  3643. validator: (value) => {
  3644. return ['btn-group', 'dropdown', 'input-group', 'nav-item'].includes(value);
  3645. },
  3646. },
  3647. /**
  3648. * Toggle the visibility of dropdown menu component.
  3649. */
  3650. visible: {
  3651. type: Boolean,
  3652. required: false,
  3653. },
  3654. },
  3655. emits: [
  3656. /**
  3657. * Callback fired when the component requests to be hidden.
  3658. */
  3659. 'hide',
  3660. /**
  3661. * Callback fired when the component requests to be shown.
  3662. */
  3663. 'show',
  3664. ],
  3665. setup(props, { slots, emit }) {
  3666. const dropdownRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  3667. const dropdownMenuRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  3668. const placement = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.placement);
  3669. const popper = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  3670. const config = (0,vue__WEBPACK_IMPORTED_MODULE_0__.reactive)({
  3671. alignment: props.alignment,
  3672. dark: props.dark,
  3673. popper: props.popper,
  3674. visible: props.visible,
  3675. });
  3676. const { visible } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(config);
  3677. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('config', config);
  3678. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('variant', props.variant);
  3679. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('visible', visible);
  3680. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('dropdownRef', dropdownRef);
  3681. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('dropdownMenuRef', dropdownMenuRef);
  3682. if (props.direction === 'dropup') {
  3683. placement.value = 'top-start';
  3684. }
  3685. if (props.direction === 'dropend') {
  3686. placement.value = 'right-start';
  3687. }
  3688. if (props.direction === 'dropstart') {
  3689. placement.value = 'left-start';
  3690. }
  3691. if (props.alignment === 'end') {
  3692. placement.value = 'bottom-end';
  3693. }
  3694. const initPopper = () => {
  3695. // Disable popper if responsive aligment is set.
  3696. if (typeof props.alignment === 'object') {
  3697. return;
  3698. }
  3699. if (dropdownRef.value) {
  3700. popper.value = createPopper(dropdownRef.value, dropdownMenuRef.value, {
  3701. placement: placement.value,
  3702. });
  3703. }
  3704. };
  3705. const destroyPopper = () => {
  3706. if (popper.value) {
  3707. popper.value.destroy();
  3708. }
  3709. popper.value = undefined;
  3710. };
  3711. const toggleMenu = function () {
  3712. if (props.disabled === false) {
  3713. if (visible.value === true) {
  3714. visible.value = false;
  3715. }
  3716. else {
  3717. visible.value = true;
  3718. }
  3719. }
  3720. };
  3721. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('toggleMenu', toggleMenu);
  3722. const hideMenu = function () {
  3723. if (props.disabled === false) {
  3724. visible.value = false;
  3725. }
  3726. };
  3727. const handleKeyup = (event) => {
  3728. if (dropdownRef.value && !dropdownRef.value.contains(event.target)) {
  3729. hideMenu();
  3730. }
  3731. };
  3732. const handleClickOutside = (event) => {
  3733. if (dropdownRef.value && !dropdownRef.value.contains(event.target)) {
  3734. hideMenu();
  3735. }
  3736. };
  3737. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => {
  3738. window.addEventListener('click', handleClickOutside);
  3739. window.addEventListener('keyup', handleKeyup);
  3740. });
  3741. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onUnmounted)(() => {
  3742. window.removeEventListener('click', handleClickOutside);
  3743. window.removeEventListener('keyup', handleKeyup);
  3744. });
  3745. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(visible, () => {
  3746. props.popper && (visible.value ? initPopper() : destroyPopper());
  3747. visible.value ? emit('show') : emit('hide');
  3748. });
  3749. return () => props.variant === 'input-group'
  3750. ? [slots.default && slots.default()]
  3751. : (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  3752. class: [
  3753. props.variant === 'nav-item' ? 'nav-item dropdown' : props.variant,
  3754. props.direction,
  3755. ],
  3756. }, slots.default && slots.default());
  3757. },
  3758. });
  3759. const CDropdownItem = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  3760. name: 'CDropdownItem',
  3761. props: {
  3762. /**
  3763. * Toggle the active state for the component.
  3764. */
  3765. active: {
  3766. type: Boolean,
  3767. required: false,
  3768. },
  3769. /**
  3770. * Component used for the root node. Either a string to use a HTML element or a component.
  3771. */
  3772. component: {
  3773. type: String,
  3774. default: 'a',
  3775. required: false,
  3776. },
  3777. /**
  3778. * Toggle the disabled state for the component.
  3779. */
  3780. disabled: {
  3781. type: Boolean,
  3782. required: false,
  3783. },
  3784. /**
  3785. * The href attribute specifies the URL of the page the link goes to.
  3786. */
  3787. href: {
  3788. type: String,
  3789. default: undefined,
  3790. required: false,
  3791. },
  3792. },
  3793. setup(props, { slots }) {
  3794. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CLink, {
  3795. class: 'dropdown-item',
  3796. active: props.active,
  3797. component: props.component,
  3798. disabled: props.disabled,
  3799. href: props.href,
  3800. }, {
  3801. default: () => slots.default && slots.default(),
  3802. });
  3803. },
  3804. });
  3805. const CDropdownHeader = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  3806. name: 'CDropdownHeader',
  3807. props: {
  3808. /**
  3809. * Component used for the root node. Either a string to use a HTML element or a component.
  3810. */
  3811. component: {
  3812. type: String,
  3813. default: 'h6',
  3814. required: false,
  3815. },
  3816. },
  3817. setup(props, { slots }) {
  3818. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  3819. class: 'dropdown-header',
  3820. }, slots.default && slots.default());
  3821. },
  3822. });
  3823. const CDropdownDivider = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  3824. name: 'CDropdownDivider',
  3825. setup() {
  3826. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('hr', {
  3827. class: 'dropdown-divider',
  3828. });
  3829. },
  3830. });
  3831. const CDropdownMenu = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  3832. name: 'CDropdownMenu',
  3833. props: {
  3834. /**
  3835. * Component used for the root node. Either a string to use a HTML element or a component.
  3836. *
  3837. * @values 'div', 'ul'
  3838. */
  3839. component: {
  3840. type: String,
  3841. default: 'div',
  3842. required: false,
  3843. },
  3844. },
  3845. setup(props, { slots }) {
  3846. const dropdownMenuRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('dropdownMenuRef');
  3847. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  3848. const config = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('config');
  3849. const { alignment, dark, popper, visible } = (0,vue__WEBPACK_IMPORTED_MODULE_0__.toRefs)(config);
  3850. // eslint-disable-next-line @typescript-eslint/ban-types
  3851. const alignmentClassNames = (alignment) => {
  3852. const classNames = [];
  3853. if (typeof alignment === 'object') {
  3854. Object.keys(alignment).map((key) => {
  3855. classNames.push(`dropdown-menu${key === 'xs' ? '' : `-${key}`}-${alignment[key]}`);
  3856. });
  3857. }
  3858. if (typeof alignment === 'string') {
  3859. classNames.push(`dropdown-menu-${alignment}`);
  3860. }
  3861. return classNames;
  3862. };
  3863. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  3864. class: [
  3865. 'dropdown-menu',
  3866. { 'dropdown-menu-dark': dark.value, show: visible.value },
  3867. alignmentClassNames(alignment.value),
  3868. ],
  3869. ...((typeof alignment.value === 'object' || !popper.value) && {
  3870. 'data-coreui-popper': 'static',
  3871. }),
  3872. ref: dropdownMenuRef,
  3873. }, props.component === 'ul'
  3874. ? slots.default && slots.default().map((vnode) => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('li', {}, vnode))
  3875. : slots.default && slots.default());
  3876. },
  3877. });
  3878. const CDropdownToggle = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  3879. name: 'CDropdownToggle',
  3880. props: {
  3881. /**
  3882. * Toggle the active state for the component.
  3883. */
  3884. active: {
  3885. type: Boolean,
  3886. default: false,
  3887. required: false,
  3888. },
  3889. /**
  3890. * Sets the color context of the component to one of CoreUI’s themed colors.
  3891. *
  3892. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  3893. */
  3894. color: Color,
  3895. /**
  3896. * Enables pseudo element caret on toggler.
  3897. */
  3898. caret: {
  3899. type: Boolean,
  3900. default: true,
  3901. required: false,
  3902. },
  3903. /**
  3904. * Component used for the root node. Either a string to use a HTML element or a component.
  3905. */
  3906. component: {
  3907. type: String,
  3908. default: 'button',
  3909. require: false,
  3910. },
  3911. /**
  3912. * Toggle the disabled state for the component.
  3913. */
  3914. disabled: {
  3915. type: Boolean,
  3916. required: false,
  3917. },
  3918. /**
  3919. * @values 'rounded', 'rounded-top', 'rounded-end', 'rounded-bottom', 'rounded-start', 'rounded-circle', 'rounded-pill', 'rounded-0', 'rounded-1', 'rounded-2', 'rounded-3'
  3920. */
  3921. shape: Shape,
  3922. /**
  3923. * Size the component small or large.
  3924. *
  3925. * @values 'sm', 'lg'
  3926. */
  3927. size: {
  3928. type: String,
  3929. default: undefined,
  3930. required: false,
  3931. validator: (value) => {
  3932. return ['sm', 'lg'].includes(value);
  3933. },
  3934. },
  3935. /**
  3936. * Similarly, create split button dropdowns with virtually the same markup as single button dropdowns, but with the addition of `.dropdown-toggle-split` className for proper spacing around the dropdown caret.
  3937. */
  3938. split: {
  3939. type: Boolean,
  3940. required: false,
  3941. },
  3942. /**
  3943. * Set the button variant to an outlined button or a ghost button.
  3944. *
  3945. * @values 'ghost', 'outline'
  3946. */
  3947. variant: {
  3948. type: String,
  3949. default: undefined,
  3950. required: false,
  3951. validator: (value) => {
  3952. return ['ghost', 'outline'].includes(value);
  3953. },
  3954. },
  3955. },
  3956. setup(props, { slots }) {
  3957. const dropdownRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('dropdownRef');
  3958. const dropdownVariant = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('variant');
  3959. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('visible');
  3960. const toggleMenu = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('toggleMenu');
  3961. const className = [
  3962. {
  3963. 'dropdown-toggle': props.caret,
  3964. 'dropdown-toggle-split': props.split,
  3965. show: visible,
  3966. active: props.active,
  3967. disabled: props.disabled,
  3968. },
  3969. ];
  3970. const buttonClassName = [
  3971. 'btn',
  3972. props.variant ? `btn-${props.variant}-${props.color}` : `btn-${props.color}`,
  3973. {
  3974. [`btn-${props.size}`]: props.size,
  3975. },
  3976. props.shape,
  3977. ];
  3978. return () => dropdownVariant === 'nav-item'
  3979. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('a', {
  3980. active: props.active,
  3981. class: ['nav-link', className],
  3982. disabled: props.disabled,
  3983. href: '#',
  3984. onClick: (event) => {
  3985. event.preventDefault();
  3986. return toggleMenu();
  3987. },
  3988. ref: dropdownRef,
  3989. }, { default: () => slots.default && slots.default() })
  3990. : (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(
  3991. // TODO: check how to use CButton component
  3992. props.component, {
  3993. class: [...className, ...buttonClassName],
  3994. active: props.active,
  3995. disabled: props.disabled,
  3996. onClick: () => toggleMenu(),
  3997. ...(props.component === 'button' && { type: 'button' }),
  3998. ref: dropdownRef,
  3999. }, props.split
  4000. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('span', { class: 'visually-hidden' }, 'Toggle Dropdown')
  4001. : slots.default && slots.default());
  4002. },
  4003. });
  4004. const CDropdownPlugin = {
  4005. install: (app) => {
  4006. app.component(CDropdown.name, CDropdown);
  4007. app.component(CDropdownItem.name, CDropdownItem);
  4008. app.component(CDropdownHeader.name, CDropdownHeader);
  4009. app.component(CDropdownDivider.name, CDropdownDivider);
  4010. app.component(CDropdownMenu.name, CDropdownMenu);
  4011. app.component(CDropdownToggle.name, CDropdownToggle);
  4012. },
  4013. };
  4014. const CFooter = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4015. name: 'CFooter',
  4016. props: {
  4017. /**
  4018. * Place footer in non-static positions.
  4019. *
  4020. * @values 'fixed', 'sticky'
  4021. */
  4022. position: {
  4023. type: String,
  4024. default: undefined,
  4025. required: false,
  4026. validator: (value) => {
  4027. return ['fixed', 'sticky'].includes(value);
  4028. },
  4029. },
  4030. },
  4031. setup(props, { slots }) {
  4032. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: ['footer', { [`footer-${props.position}`]: props.position }] }, slots.default && slots.default());
  4033. },
  4034. });
  4035. const CFooterPlugin = {
  4036. install: (app) => {
  4037. app.component(CFooter.name, CFooter);
  4038. },
  4039. };
  4040. const CForm = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4041. name: 'CForm',
  4042. props: {
  4043. /**
  4044. * Mark a form as validated. If you set it `true`, all validation styles will be applied to the forms component.
  4045. */
  4046. validated: {
  4047. type: Boolean,
  4048. required: false,
  4049. },
  4050. },
  4051. setup(props, { slots }) {
  4052. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('form', { class: [{ ['was-validated']: props.validated }] }, slots.default && slots.default());
  4053. },
  4054. });
  4055. /*!
  4056. * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
  4057. *
  4058. * Copyright (c) 2014-2017, Jon Schlinkert.
  4059. * Released under the MIT License.
  4060. */
  4061. function isObject(o) {
  4062. return Object.prototype.toString.call(o) === '[object Object]';
  4063. }
  4064. function isPlainObject(o) {
  4065. var ctor,prot;
  4066. if (isObject(o) === false) return false;
  4067. // If has modified constructor
  4068. ctor = o.constructor;
  4069. if (ctor === undefined) return true;
  4070. // If has modified prototype
  4071. prot = ctor.prototype;
  4072. if (isObject(prot) === false) return false;
  4073. // If constructor does not have an Object-specific method
  4074. if (prot.hasOwnProperty('isPrototypeOf') === false) {
  4075. return false;
  4076. }
  4077. // Most likely a plain Object
  4078. return true;
  4079. }
  4080. function t(){return t=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n]);}return e},t.apply(this,arguments)}function r(e,t){if(null==e)return {};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}const n={silent:!1,logLevel:"warn"},i=["validator"],o=Object.prototype,a=o.toString,s=o.hasOwnProperty,u=/^\s*function (\w+)/;function l(e){var t;const r=null!==(t=null==e?void 0:e.type)&&void 0!==t?t:e;if(r){const e=r.toString().match(u);return e?e[1]:""}return ""}const c=isPlainObject,f=e=>e;let d=f;if(true){const e="undefined"!=typeof console;d=e?function(e,t=n.logLevel){!1===n.silent&&console[t](`[VueTypes warn]: ${e}`);}:f;}const p=(e,t)=>s.call(e,t),y=Number.isInteger||function(e){return "number"==typeof e&&isFinite(e)&&Math.floor(e)===e},v=Array.isArray||function(e){return "[object Array]"===a.call(e)},h=e=>"[object Function]"===a.call(e),b=e=>c(e)&&p(e,"_vueTypes_name"),g=e=>c(e)&&(p(e,"type")||["_vueTypes_name","validator","default","required"].some(t=>p(e,t)));function O(e,t){return Object.defineProperty(e.bind(t),"__original",{value:e})}function m(e,t,r=!1){let n,i=!0,o="";n=c(e)?e:{type:e};const a=b(n)?n._vueTypes_name+" - ":"";if(g(n)&&null!==n.type){if(void 0===n.type||!0===n.type)return i;if(!n.required&&void 0===t)return i;v(n.type)?(i=n.type.some(e=>!0===m(e,t,!0)),o=n.type.map(e=>l(e)).join(" or ")):(o=l(n),i="Array"===o?v(t):"Object"===o?c(t):"String"===o||"Number"===o||"Boolean"===o||"Function"===o?function(e){if(null==e)return "";const t=e.constructor.toString().match(u);return t?t[1]:""}(t)===o:t instanceof n.type);}if(!i){const e=`${a}value "${t}" should be of type "${o}"`;return !1===r?(d(e),!1):e}if(p(n,"validator")&&h(n.validator)){const e=d,o=[];if(d=e=>{o.push(e);},i=n.validator(t),d=e,!i){const e=(o.length>1?"* ":"")+o.join("\n* ");return o.length=0,!1===r?(d(e),i):e}}return i}function j(e,t){const r=Object.defineProperties(t,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(e){return void 0===e?(p(this,"default")&&delete this.default,this):h(e)||!0===m(this,e,!0)?(this.default=v(e)?()=>[...e]:c(e)?()=>Object.assign({},e):e,this):(d(`${this._vueTypes_name} - invalid default value: "${e}"`),this)}}}),{validator:n}=r;return h(n)&&(r.validator=O(n,r)),r}function _(e,t){const r=j(e,t);return Object.defineProperty(r,"validate",{value(e){return h(this.validator)&&d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:\n${JSON.stringify(this)}`),this.validator=O(e,this),this}})}function T(e,t,n){const o=function(e){const t={};return Object.getOwnPropertyNames(e).forEach(r=>{t[r]=Object.getOwnPropertyDescriptor(e,r);}),Object.defineProperties({},t)}(t);if(o._vueTypes_name=e,!c(n))return o;const{validator:a}=n,s=r(n,i);if(h(a)){let{validator:e}=o;e&&(e=null!==(l=(u=e).__original)&&void 0!==l?l:u),o.validator=O(e?function(t){return e.call(this,t)&&a.call(this,t)}:a,o);}var u,l;return Object.assign(o,s)}function $(e){return e.replace(/^(?!\s*$)/gm," ")}const w=()=>_("any",{}),P=()=>_("function",{type:Function}),x=()=>_("boolean",{type:Boolean}),E=()=>_("string",{type:String}),N=()=>_("number",{type:Number}),q=()=>_("array",{type:Array}),A=()=>_("object",{type:Object}),V=()=>j("integer",{type:Number,validator:e=>y(e)}),S=()=>j("symbol",{validator:e=>"symbol"==typeof e});function k(e,t="custom validation failed"){if("function"!=typeof e)throw new TypeError("[VueTypes error]: You must provide a function as argument");return j(e.name||"<<anonymous function>>",{type:null,validator(r){const n=e(r);return n||d(`${this._vueTypes_name} - ${t}`),n}})}function D(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const t=`oneOf - value should be one of "${e.join('", "')}".`,r=e.reduce((e,t)=>{if(null!=t){const r=t.constructor;-1===e.indexOf(r)&&e.push(r);}return e},[]);return j("oneOf",{type:r.length>0?r:void 0,validator(r){const n=-1!==e.indexOf(r);return n||d(t),n}})}function L(e){if(!v(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let t=!1,r=[];for(let n=0;n<e.length;n+=1){const i=e[n];if(g(i)){if(b(i)&&"oneOf"===i._vueTypes_name&&i.type){r=r.concat(i.type);continue}if(h(i.validator)&&(t=!0),!0===i.type||!i.type){d('oneOfType - invalid usage of "true" or "null" as types.');continue}r=r.concat(i.type);}else r.push(i);}r=r.filter((e,t)=>r.indexOf(e)===t);const n=r.length>0?r:null;return j("oneOfType",t?{type:n,validator(t){const r=[],n=e.some(e=>{const n=m(b(e)&&"oneOf"===e._vueTypes_name?e.type||null:e,t,!0);return "string"==typeof n&&r.push(n),!0===n});return n||d(`oneOfType - provided value does not match any of the ${r.length} passed-in validators:\n${$(r.join("\n"))}`),n}}:{type:n})}function F(e){return j("arrayOf",{type:Array,validator(t){let r="";const n=t.every(t=>(r=m(e,t,!0),!0===r));return n||d(`arrayOf - value validation error:\n${$(r)}`),n}})}function Y(e){return j("instanceOf",{type:e})}function B(e){return j("objectOf",{type:Object,validator(t){let r="";const n=Object.keys(t).every(n=>(r=m(e,t[n],!0),!0===r));return n||d(`objectOf - value validation error:\n${$(r)}`),n}})}function I(e){const t=Object.keys(e),r=t.filter(t=>{var r;return !(null===(r=e[t])||void 0===r||!r.required)}),n=j("shape",{type:Object,validator(n){if(!c(n))return !1;const i=Object.keys(n);if(r.length>0&&r.some(e=>-1===i.indexOf(e))){const e=r.filter(e=>-1===i.indexOf(e));return d(1===e.length?`shape - required property "${e[0]}" is not defined.`:`shape - required properties "${e.join('", "')}" are not defined.`),!1}return i.every(r=>{if(-1===t.indexOf(r))return !0===this._vueTypes_isLoose||(d(`shape - shape definition does not include a "${r}" property. Allowed keys: "${t.join('", "')}".`),!1);const i=m(e[r],n[r],!0);return "string"==typeof i&&d(`shape - "${r}" property validation error:\n ${$(i)}`),!0===i})}});return Object.defineProperty(n,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(n,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),n}const J=["name","validate","getter"],M=/*#__PURE__*/(()=>{var e,t;return t=e=class{static get any(){return w()}static get func(){return P().def(this.defaults.func)}static get bool(){return x().def(this.defaults.bool)}static get string(){return E().def(this.defaults.string)}static get number(){return N().def(this.defaults.number)}static get array(){return q().def(this.defaults.array)}static get object(){return A().def(this.defaults.object)}static get integer(){return V().def(this.defaults.integer)}static get symbol(){return S()}static extend(e){if(v(e))return e.forEach(e=>this.extend(e)),this;const{name:t,validate:n=!1,getter:i=!1}=e,o=r(e,J);if(p(this,t))throw new TypeError(`[VueTypes error]: Type "${t}" already defined`);const{type:a}=o;if(b(a))return delete o.type,Object.defineProperty(this,t,i?{get:()=>T(t,a,o)}:{value(...e){const r=T(t,a,o);return r.validator&&(r.validator=r.validator.bind(r,...e)),r}});let s;return s=i?{get(){const e=Object.assign({},o);return n?_(t,e):j(t,e)},enumerable:!0}:{value(...e){const r=Object.assign({},o);let i;return i=n?_(t,r):j(t,r),r.validator&&(i.validator=r.validator.bind(i,...e)),i},enumerable:!0},Object.defineProperty(this,t,s)}},e.defaults={},e.sensibleDefaults=void 0,e.config=n,e.custom=k,e.oneOf=D,e.instanceOf=Y,e.oneOfType=L,e.arrayOf=F,e.objectOf=B,e.shape=I,e.utils={validate:(e,t)=>!0===m(t,e,!0),toType:(e,t,r=!1)=>r?_(e,t):j(e,t)},t})();function R(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var r,n;return n=r=class extends M{static get sensibleDefaults(){return t({},this.defaults)}static set sensibleDefaults(r){this.defaults=!1!==r?t({},!0!==r?r:e):{};}},r.defaults=t({},e),n}class z extends(R()){}
  4081. const CFormLabel = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4082. name: 'CFormLabel',
  4083. props: {
  4084. /**
  4085. * A string of all className you want to be applied to the component, and override standard className value.
  4086. */
  4087. customClassName: {
  4088. type: [Array, String],
  4089. default: undefined,
  4090. required: false,
  4091. },
  4092. },
  4093. setup(props, { slots }) {
  4094. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('label', {
  4095. class: props.customClassName ? props.customClassName : 'form-label',
  4096. }, slots.default && slots.default());
  4097. },
  4098. });
  4099. const CFormCheck = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4100. name: 'CFormCheck',
  4101. inheritAttrs: false,
  4102. props: {
  4103. /**
  4104. * Create button-like checkboxes and radio buttons.
  4105. */
  4106. button: I({
  4107. /**
  4108. * Sets the color context of the component to one of CoreUI’s themed colors.
  4109. *
  4110. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  4111. */
  4112. color: Color,
  4113. /**
  4114. * Select the shape of the component.
  4115. *
  4116. * @values 'rounded', 'rounded-top', 'rounded-end', 'rounded-bottom', 'rounded-start', 'rounded-circle', 'rounded-pill', 'rounded-0', 'rounded-1', 'rounded-2', 'rounded-3'
  4117. */
  4118. shape: Shape,
  4119. /**
  4120. * Size the component small or large.
  4121. *
  4122. * @values 'sm' | 'lg'
  4123. */
  4124. size: {
  4125. type: String,
  4126. default: undefined,
  4127. required: false,
  4128. validator: (value) => {
  4129. return ['sm', 'lg'].includes(value);
  4130. },
  4131. },
  4132. /**
  4133. * Set the button variant to an outlined button or a ghost button.
  4134. */
  4135. variant: {
  4136. type: String,
  4137. default: undefined,
  4138. required: false,
  4139. validator: (value) => {
  4140. return ['outline', 'ghost'].includes(value);
  4141. },
  4142. },
  4143. }),
  4144. /**
  4145. * The id global attribute defines an identifier (ID) that must be unique in the whole document.
  4146. */
  4147. id: {
  4148. type: String,
  4149. default: undefined,
  4150. required: false,
  4151. },
  4152. /**
  4153. * Input Checkbox indeterminate Property
  4154. */
  4155. indeterminate: Boolean,
  4156. /**
  4157. * Group checkboxes or radios on the same horizontal row by adding.
  4158. */
  4159. inline: {
  4160. type: Boolean,
  4161. required: false,
  4162. },
  4163. /**
  4164. * Set component validation state to invalid.
  4165. */
  4166. invalid: {
  4167. type: Boolean,
  4168. required: false,
  4169. },
  4170. /**
  4171. * The element represents a caption for a component.
  4172. */
  4173. label: {
  4174. type: String,
  4175. default: undefined,
  4176. required: false,
  4177. },
  4178. /**
  4179. * The default name for a value passed using v-model.
  4180. */
  4181. modelValue: {
  4182. type: [Boolean, String],
  4183. value: undefined,
  4184. required: false,
  4185. },
  4186. /**
  4187. * Specifies the type of component.
  4188. *
  4189. * @values 'checkbox', 'radio'
  4190. */
  4191. type: {
  4192. type: String,
  4193. default: 'checkbox',
  4194. required: false,
  4195. },
  4196. /**
  4197. * Set component validation state to valid.
  4198. */
  4199. valid: {
  4200. type: Boolean,
  4201. required: false,
  4202. },
  4203. },
  4204. emits: [
  4205. /**
  4206. * Event occurs when the checked value has been changed.
  4207. */
  4208. 'change',
  4209. /**
  4210. * Emit the new value whenever there’s a change event.
  4211. */
  4212. 'update:modelValue',
  4213. ],
  4214. setup(props, { attrs, emit, slots }) {
  4215. const handleChange = (event) => {
  4216. const target = event.target;
  4217. emit('change', event);
  4218. emit('update:modelValue', target.checked);
  4219. };
  4220. const formControl = () => {
  4221. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('input', {
  4222. checked: props.modelValue,
  4223. class: [
  4224. props.button ? 'btn-check' : 'form-check-input',
  4225. {
  4226. 'is-invalid': props.invalid,
  4227. 'is-valid': props.valid,
  4228. },
  4229. ],
  4230. id: props.id,
  4231. indeterminate: props.indeterminate,
  4232. onChange: (event) => handleChange(event),
  4233. type: props.type,
  4234. ...attrs,
  4235. });
  4236. };
  4237. const formLabel = () => {
  4238. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CFormLabel, {
  4239. customClassName: props.button
  4240. ? [
  4241. 'btn',
  4242. props.button.variant
  4243. ? `btn-${props.button.variant}-${props.button.color}`
  4244. : `btn-${props.button.color}`,
  4245. {
  4246. [`btn-${props.button.size}`]: props.button.size,
  4247. },
  4248. `${props.button.shape}`,
  4249. ]
  4250. : 'form-check-label',
  4251. ...(props.id && { for: props.id }),
  4252. }, {
  4253. default: () => (slots.label && slots.label()) || props.label,
  4254. });
  4255. };
  4256. return () => props.button
  4257. ? [formControl(), (slots.label || props.label) && formLabel()]
  4258. : props.label
  4259. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  4260. class: [
  4261. 'form-check',
  4262. {
  4263. 'form-check-inline': props.inline,
  4264. 'is-invalid': props.invalid,
  4265. 'is-valid': props.valid,
  4266. },
  4267. ],
  4268. }, [formControl(), props.label && formLabel()])
  4269. : formControl();
  4270. },
  4271. });
  4272. const CFormFeedback = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4273. name: 'CFormFeedback',
  4274. props: {
  4275. /**
  4276. * Component used for the root node. Either a string to use a HTML element or a component.
  4277. */
  4278. component: {
  4279. type: String,
  4280. required: false,
  4281. default: 'div',
  4282. },
  4283. /**
  4284. * Method called immediately after the `value` prop changes.
  4285. */
  4286. invalid: Boolean,
  4287. /**
  4288. * If your form layout allows it, you can display validation feedback in a styled tooltip.
  4289. */
  4290. tooltip: Boolean,
  4291. /**
  4292. * Set component validation state to valid.
  4293. */
  4294. valid: Boolean,
  4295. },
  4296. setup(props, { slots }) {
  4297. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  4298. class: [
  4299. {
  4300. [`invalid-${props.tooltip ? 'tooltip' : 'feedback'}`]: props.invalid,
  4301. [`valid-${props.tooltip ? 'tooltip' : 'feedback'}`]: props.valid,
  4302. },
  4303. ],
  4304. }, slots.default && slots.default());
  4305. },
  4306. });
  4307. const CFormFloating = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4308. name: 'CFormFloating',
  4309. setup(_, { slots }) {
  4310. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  4311. class: 'form-floating',
  4312. }, slots.default && slots.default());
  4313. },
  4314. });
  4315. const CFormInput = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4316. name: 'CFormInput',
  4317. props: {
  4318. /**
  4319. * Toggle the disabled state for the component.
  4320. */
  4321. disabled: {
  4322. type: Boolean,
  4323. required: false,
  4324. },
  4325. /**
  4326. * Set component validation state to invalid.
  4327. */
  4328. invalid: {
  4329. type: Boolean,
  4330. required: false,
  4331. },
  4332. /**
  4333. * The default name for a value passed using v-model.
  4334. */
  4335. modelValue: {
  4336. type: String,
  4337. default: undefined,
  4338. require: false,
  4339. },
  4340. /**
  4341. * Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side `readonly`.
  4342. */
  4343. plainText: {
  4344. type: Boolean,
  4345. required: false,
  4346. },
  4347. /**
  4348. * Toggle the readonly state for the component.
  4349. */
  4350. readonly: {
  4351. type: Boolean,
  4352. required: false,
  4353. },
  4354. /**
  4355. * Size the component small or large.
  4356. *
  4357. * @values 'sm' | 'lg'
  4358. */
  4359. size: {
  4360. type: String,
  4361. default: undefined,
  4362. require: false,
  4363. validator: (value) => {
  4364. return ['sm', 'lg'].includes(value);
  4365. },
  4366. },
  4367. /**
  4368. * Specifies the type of component.
  4369. *
  4370. * @values 'color' | 'file' | 'text' | string
  4371. */
  4372. type: {
  4373. type: String,
  4374. default: 'text',
  4375. require: false,
  4376. },
  4377. /**
  4378. * Set component validation state to valid.
  4379. */
  4380. valid: {
  4381. type: Boolean,
  4382. required: false,
  4383. },
  4384. },
  4385. emits: [
  4386. /**
  4387. * Event occurs when the element loses focus, after the content has been changed.
  4388. */
  4389. 'change',
  4390. /**
  4391. * Event occurs immediately after the value of a component has changed.
  4392. */
  4393. 'input',
  4394. /**
  4395. * Emit the new value whenever there’s an input or change event.
  4396. */
  4397. 'update:modelValue',
  4398. ],
  4399. setup(props, { emit, slots }) {
  4400. const handleChange = (event) => {
  4401. const target = event.target;
  4402. emit('change', event);
  4403. emit('update:modelValue', target.value);
  4404. };
  4405. const handleInput = (event) => {
  4406. const target = event.target;
  4407. emit('input', event);
  4408. emit('update:modelValue', target.value);
  4409. };
  4410. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('input', {
  4411. class: [
  4412. props.plainText ? 'form-control-plaintext' : 'form-control',
  4413. {
  4414. 'form-control-color': props.type === 'color',
  4415. [`form-control-${props.size}`]: props.size,
  4416. 'is-invalid': props.invalid,
  4417. 'is-valid': props.valid,
  4418. },
  4419. ],
  4420. disabled: props.disabled,
  4421. onChange: (event) => handleChange(event),
  4422. onInput: (event) => handleInput(event),
  4423. readonly: props.readonly,
  4424. type: props.type,
  4425. value: props.modelValue,
  4426. }, slots.default && slots.default());
  4427. },
  4428. });
  4429. const CFormRange = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4430. name: 'CFormRange',
  4431. props: {
  4432. /**
  4433. * Toggle the disabled state for the component.
  4434. */
  4435. disabled: {
  4436. type: Boolean,
  4437. default: undefined,
  4438. required: false,
  4439. },
  4440. /**
  4441. * Specifies the maximum value for the component.
  4442. */
  4443. max: {
  4444. type: Number,
  4445. default: undefined,
  4446. required: false,
  4447. },
  4448. /**
  4449. * Specifies the minimum value for the component.
  4450. */
  4451. min: {
  4452. type: Number,
  4453. default: undefined,
  4454. required: false,
  4455. },
  4456. /**
  4457. * The default name for a value passed using v-model.
  4458. */
  4459. modelValue: {
  4460. type: String,
  4461. value: undefined,
  4462. required: false,
  4463. },
  4464. /**
  4465. * Toggle the readonly state for the component.
  4466. */
  4467. readonly: {
  4468. type: Boolean,
  4469. required: false,
  4470. },
  4471. /**
  4472. * Specifies the interval between legal numbers in the component.
  4473. */
  4474. steps: {
  4475. type: Number,
  4476. default: undefined,
  4477. required: false,
  4478. },
  4479. /**
  4480. * The `value` attribute of component.
  4481. *
  4482. * @controllable onChange
  4483. * */
  4484. value: {
  4485. type: Number,
  4486. default: undefined,
  4487. required: false,
  4488. },
  4489. },
  4490. emits: [
  4491. /**
  4492. * Event occurs when the value has been changed.
  4493. */
  4494. 'change',
  4495. /**
  4496. * Emit the new value whenever there’s a change event.
  4497. */
  4498. 'update:modelValue',
  4499. ],
  4500. setup(props, { emit, slots }) {
  4501. const handleChange = (event) => {
  4502. const target = event.target;
  4503. emit('change', event);
  4504. emit('update:modelValue', target.value);
  4505. };
  4506. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('input', {
  4507. class: 'form-range',
  4508. disabled: props.disabled,
  4509. max: props.max,
  4510. min: props.min,
  4511. onChange: (event) => handleChange(event),
  4512. steps: props.steps,
  4513. readonly: props.readonly,
  4514. type: 'range',
  4515. value: props.modelValue,
  4516. }, slots.default && slots.default());
  4517. },
  4518. });
  4519. const CFormSelect = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4520. name: 'CFormSelect',
  4521. props: {
  4522. /**
  4523. * Specifies the number of visible options in a drop-down list.
  4524. */
  4525. htmlSize: {
  4526. type: Number,
  4527. default: undefined,
  4528. required: false,
  4529. },
  4530. /**
  4531. * Set component validation state to invalid.
  4532. */
  4533. invalid: {
  4534. type: Boolean,
  4535. required: false,
  4536. },
  4537. /**
  4538. * The default name for a value passed using v-model.
  4539. */
  4540. modelValue: {
  4541. type: [String, Array],
  4542. default: undefined,
  4543. require: false,
  4544. },
  4545. multiple: {
  4546. type: Boolean,
  4547. required: false,
  4548. },
  4549. /**
  4550. * Options list of the select component. Available keys: `label`, `value`, `disabled`.
  4551. * Examples:
  4552. * - `:options="[{ value: 'js', label: 'JavaScript' }, { value: 'html', label: 'HTML', disabled: true }]"`
  4553. * - `:options="['js', 'html']"`
  4554. */
  4555. options: {
  4556. type: Array,
  4557. default: undefined,
  4558. required: false,
  4559. },
  4560. /**
  4561. * Size the component small or large.
  4562. *
  4563. * @values 'sm' | 'lg'
  4564. */
  4565. size: {
  4566. type: String,
  4567. default: undefined,
  4568. require: false,
  4569. validator: (value) => {
  4570. return ['sm', 'lg'].includes(value);
  4571. },
  4572. },
  4573. /**
  4574. * Set component validation state to valid.
  4575. */
  4576. valid: {
  4577. type: Boolean,
  4578. required: false,
  4579. },
  4580. },
  4581. emits: [
  4582. /**
  4583. * Event occurs when when a user changes the selected option of a `<select>` element.
  4584. */
  4585. 'change',
  4586. /**
  4587. * Emit the new value whenever there’s a change event.
  4588. */
  4589. 'update:modelValue',
  4590. ],
  4591. setup(props, { emit, slots }) {
  4592. const handleChange = (event) => {
  4593. const target = event.target;
  4594. const selected = Array.from(target.options)
  4595. .filter((option) => option.selected)
  4596. .map((option) => option.value);
  4597. emit('change', event);
  4598. emit('update:modelValue', target.multiple ? selected : selected[0]);
  4599. };
  4600. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('select', {
  4601. class: [
  4602. 'form-select',
  4603. {
  4604. [`form-select-${props.size}`]: props.size,
  4605. 'is-invalid': props.invalid,
  4606. 'is-valid': props.valid,
  4607. },
  4608. ],
  4609. multiple: props.multiple,
  4610. onChange: (event) => handleChange(event),
  4611. size: props.htmlSize,
  4612. ...(props.modelValue && !props.multiple && { value: props.modelValue }),
  4613. }, props.options
  4614. ? props.options.map((option) => {
  4615. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('option', {
  4616. ...(typeof option === 'object' && {
  4617. ...(option.disabled && { disabled: option.disabled }),
  4618. ...(option.selected && { selected: option.selected }),
  4619. ...(option.value && {
  4620. value: option.value,
  4621. ...(props.modelValue &&
  4622. props.multiple &&
  4623. props.modelValue.includes(option.value) && { selected: true }),
  4624. }),
  4625. }),
  4626. }, typeof option === 'string' ? option : option.label);
  4627. })
  4628. : slots.default && slots.default());
  4629. },
  4630. });
  4631. const CFormSwitch = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4632. name: 'CFormSwitch',
  4633. inheritAttrs: false,
  4634. props: {
  4635. /**
  4636. * The id global attribute defines an identifier (ID) that must be unique in the whole document
  4637. */
  4638. id: {
  4639. type: String,
  4640. default: undefined,
  4641. required: false,
  4642. },
  4643. /**
  4644. * Set component validation state to invalid.
  4645. */
  4646. invalid: {
  4647. type: Boolean,
  4648. required: false,
  4649. },
  4650. /**
  4651. * The element represents a caption for a component.
  4652. */
  4653. label: {
  4654. type: String,
  4655. default: undefined,
  4656. required: false,
  4657. },
  4658. /**
  4659. * The default name for a value passed using v-model.
  4660. */
  4661. modelValue: {
  4662. type: [Boolean, String],
  4663. value: undefined,
  4664. required: false,
  4665. },
  4666. /**
  4667. * Size the component large or extra large. Works only with `switch`.
  4668. *
  4669. * @values 'lg' | 'xl'
  4670. */
  4671. size: {
  4672. type: String,
  4673. default: undefined,
  4674. required: false,
  4675. validator: (value) => {
  4676. return ['lg', 'xl'].includes(value);
  4677. },
  4678. },
  4679. /**
  4680. * Specifies the type of component.
  4681. *
  4682. * @values 'checkbox', 'radio'
  4683. */
  4684. type: {
  4685. type: String,
  4686. default: 'checkbox',
  4687. required: false,
  4688. },
  4689. /**
  4690. * Set component validation state to valid.
  4691. */
  4692. valid: {
  4693. type: Boolean,
  4694. required: false,
  4695. },
  4696. },
  4697. emits: [
  4698. /**
  4699. * Event occurs when the checked value has been changed.
  4700. */
  4701. 'change',
  4702. /**
  4703. * Emit the new value whenever there’s a change event.
  4704. */
  4705. 'update:modelValue',
  4706. ],
  4707. setup(props, { attrs, emit }) {
  4708. const checked = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(attrs.checked);
  4709. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => {
  4710. if (props.modelValue && typeof props.modelValue === 'boolean') {
  4711. console.log(props.modelValue);
  4712. }
  4713. });
  4714. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(() => props.modelValue, () => {
  4715. if (typeof props.modelValue === 'boolean')
  4716. checked.value = props.modelValue;
  4717. });
  4718. const handleChange = (event) => {
  4719. const target = event.target;
  4720. emit('change', event);
  4721. emit('update:modelValue', target.checked);
  4722. };
  4723. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  4724. class: [
  4725. 'form-check form-switch',
  4726. {
  4727. [`form-switch-${props.size}`]: props.size,
  4728. 'is-invalid': props.invalid,
  4729. 'is-valid': props.valid,
  4730. },
  4731. ],
  4732. }, [
  4733. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('input', {
  4734. ...attrs,
  4735. checked: checked.value,
  4736. class: [
  4737. 'form-check-input',
  4738. {
  4739. 'is-invalid': props.invalid,
  4740. 'is-valid': props.valid,
  4741. },
  4742. ],
  4743. id: props.id,
  4744. onChange: (event) => handleChange(event),
  4745. type: props.type,
  4746. }),
  4747. props.label &&
  4748. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CFormLabel, {
  4749. ...(props.id && { for: props.id }),
  4750. class: 'form-check-label',
  4751. }, {
  4752. default: () => props.label,
  4753. }),
  4754. ]);
  4755. },
  4756. });
  4757. const CFormText = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4758. name: 'CFormText',
  4759. props: {
  4760. /**
  4761. * Component used for the root node. Either a string to use a HTML element or a component.
  4762. */
  4763. component: {
  4764. type: String,
  4765. required: false,
  4766. default: 'div',
  4767. },
  4768. },
  4769. setup(props, { slots }) {
  4770. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, { class: 'form-text' }, slots.default && slots.default());
  4771. },
  4772. });
  4773. const CFormTextarea = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4774. name: 'CFormTextarea',
  4775. props: {
  4776. /**
  4777. * Toggle the disabled state for the component.
  4778. */
  4779. disabled: {
  4780. type: Boolean,
  4781. required: false,
  4782. },
  4783. /**
  4784. * Set component validation state to invalid.
  4785. */
  4786. invalid: {
  4787. type: Boolean,
  4788. required: false,
  4789. },
  4790. /**
  4791. * The default name for a value passed using v-model.
  4792. */
  4793. modelValue: {
  4794. type: String,
  4795. default: undefined,
  4796. require: false,
  4797. },
  4798. /**
  4799. * Render the component styled as plain text. Removes the default form field styling and preserve the correct margin and padding. Recommend to use only along side `readonly`.
  4800. */
  4801. plainText: {
  4802. type: Boolean,
  4803. required: false,
  4804. },
  4805. /**
  4806. * Toggle the readonly state for the component.
  4807. */
  4808. readonly: {
  4809. type: Boolean,
  4810. required: false,
  4811. },
  4812. /**
  4813. * Set component validation state to valid.
  4814. */
  4815. valid: {
  4816. type: Boolean,
  4817. required: false,
  4818. },
  4819. },
  4820. emits: [
  4821. /**
  4822. * Event occurs when the element loses focus, after the content has been changed.
  4823. */
  4824. 'change',
  4825. /**
  4826. * Event occurs immediately after the value of a component has changed.
  4827. */
  4828. 'input',
  4829. /**
  4830. * Emit the new value whenever there’s an input or change event.
  4831. */
  4832. 'update:modelValue',
  4833. ],
  4834. setup(props, { emit, slots }) {
  4835. const handleInput = (event) => {
  4836. const target = event.target;
  4837. emit('input', event);
  4838. emit('update:modelValue', target.value);
  4839. };
  4840. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('textarea', {
  4841. disabled: props.disabled,
  4842. readonly: props.readonly,
  4843. class: [
  4844. props.plainText ? 'form-control-plaintext' : 'form-control',
  4845. {
  4846. 'is-invalid': props.invalid,
  4847. 'is-valid': props.valid,
  4848. },
  4849. ],
  4850. onInput: (event) => handleInput(event),
  4851. value: props.modelValue,
  4852. }, slots.default && slots.default());
  4853. },
  4854. });
  4855. const CInputGroup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4856. name: 'CInputGroup',
  4857. props: {
  4858. /**
  4859. * Size the component small or large.
  4860. *
  4861. * @values 'sm', 'lg'
  4862. */
  4863. size: {
  4864. type: String,
  4865. default: undefined,
  4866. required: false,
  4867. validator: (value) => {
  4868. return ['sm', 'lg'].includes(value);
  4869. },
  4870. },
  4871. },
  4872. setup(props, { slots }) {
  4873. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  4874. class: [
  4875. 'input-group',
  4876. {
  4877. [`input-group-${props.size}`]: props.size,
  4878. },
  4879. ],
  4880. }, slots.default && slots.default());
  4881. },
  4882. });
  4883. const CInputGroupText = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4884. name: 'CInputGroupText',
  4885. props: {
  4886. /**
  4887. * Component used for the root node. Either a string to use a HTML element or a component.
  4888. */
  4889. component: {
  4890. type: String,
  4891. required: false,
  4892. default: 'span',
  4893. },
  4894. },
  4895. setup(props, { slots }) {
  4896. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, { class: 'input-group-text' }, slots.default && slots.default());
  4897. },
  4898. });
  4899. const CFormPlugin = {
  4900. install: (app) => {
  4901. app.component(CForm.name, CForm);
  4902. app.component(CFormCheck.name, CFormCheck);
  4903. // app.component(CFormControl.name, CFormControl)
  4904. app.component(CFormFeedback.name, CFormFeedback);
  4905. app.component(CFormFloating.name, CFormFloating);
  4906. app.component(CFormInput.name, CFormInput);
  4907. app.component(CFormLabel.name, CFormLabel);
  4908. app.component(CFormRange.name, CFormRange);
  4909. app.component(CFormSelect.name, CFormSelect);
  4910. app.component(CFormSwitch.name, CFormSwitch);
  4911. app.component(CFormText.name, CFormText);
  4912. app.component(CFormTextarea.name, CFormTextarea);
  4913. app.component(CInputGroup.name, CInputGroup);
  4914. app.component(CInputGroupText.name, CInputGroupText);
  4915. },
  4916. };
  4917. const BREAKPOINTS$4 = [
  4918. 'xxl',
  4919. 'xl',
  4920. 'lg',
  4921. 'md',
  4922. 'sm',
  4923. 'xs',
  4924. ];
  4925. const CCol = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  4926. name: 'CCol',
  4927. props: {
  4928. /**
  4929. * The number of columns/offset/order on extra small devices (<576px).
  4930. *
  4931. * @values 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }
  4932. */
  4933. xs: {
  4934. type: [Boolean, Number, String, Object],
  4935. default: undefined,
  4936. require: false,
  4937. },
  4938. /**
  4939. * The number of columns/offset/order on small devices (<768px).
  4940. *
  4941. * @values 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }
  4942. */
  4943. sm: {
  4944. type: [Boolean, Number, String, Object],
  4945. default: undefined,
  4946. require: false,
  4947. },
  4948. /**
  4949. * The number of columns/offset/order on medium devices (<992px).
  4950. *
  4951. * @values 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }
  4952. */
  4953. md: {
  4954. type: [Boolean, Number, String, Object],
  4955. default: undefined,
  4956. require: false,
  4957. },
  4958. /**
  4959. * The number of columns/offset/order on large devices (<1200px).
  4960. *
  4961. * @values 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }
  4962. */
  4963. lg: {
  4964. type: [Boolean, Number, String, Object],
  4965. default: undefined,
  4966. require: false,
  4967. },
  4968. /**
  4969. * The number of columns/offset/order on X-Large devices (<1400px).
  4970. *
  4971. * @values 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }
  4972. */
  4973. xl: {
  4974. type: [Boolean, Number, String, Object],
  4975. default: undefined,
  4976. require: false,
  4977. },
  4978. /**
  4979. * The number of columns/offset/order on XX-Large devices (≥1400px).
  4980. *
  4981. * @values 'auto' | number | string | boolean | { span: 'auto' | number | string | boolean } | { offset: number | string } | { order: 'first' | 'last' | number | string }
  4982. */
  4983. xxl: {
  4984. type: [Boolean, Number, String, Object],
  4985. default: undefined,
  4986. require: false,
  4987. },
  4988. },
  4989. setup(props, { slots }) {
  4990. const repsonsiveClassNames = [];
  4991. BREAKPOINTS$4.forEach((bp) => {
  4992. const breakpoint = props[bp];
  4993. const infix = bp === 'xs' ? '' : `-${bp}`;
  4994. if (breakpoint) {
  4995. if (typeof breakpoint === 'number' || typeof breakpoint === 'string') {
  4996. repsonsiveClassNames.push(`col${infix}-${breakpoint}`);
  4997. }
  4998. if (typeof breakpoint === 'boolean') {
  4999. repsonsiveClassNames.push(`col${infix}`);
  5000. }
  5001. }
  5002. if (breakpoint && typeof breakpoint === 'object') {
  5003. if (typeof breakpoint.span === 'number' || typeof breakpoint.span === 'string') {
  5004. repsonsiveClassNames.push(`col${infix}-${breakpoint.span}`);
  5005. }
  5006. if (typeof breakpoint.span === 'boolean') {
  5007. repsonsiveClassNames.push(`col${infix}`);
  5008. }
  5009. if (typeof breakpoint.order === 'number' || typeof breakpoint.order === 'string') {
  5010. repsonsiveClassNames.push(`order${infix}-${breakpoint.order}`);
  5011. }
  5012. if (typeof breakpoint.offset === 'number') {
  5013. repsonsiveClassNames.push(`offset${infix}-${breakpoint.offset}`);
  5014. }
  5015. }
  5016. });
  5017. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  5018. class: [repsonsiveClassNames.length ? repsonsiveClassNames : 'col'],
  5019. }, slots.default && slots.default());
  5020. },
  5021. });
  5022. const BREAKPOINTS$3 = [
  5023. 'xxl',
  5024. 'xl',
  5025. 'lg',
  5026. 'md',
  5027. 'sm',
  5028. 'fluid',
  5029. ];
  5030. const CContainer = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5031. name: 'CContainer',
  5032. props: {
  5033. /**
  5034. * Set container 100% wide until small breakpoint.
  5035. */
  5036. sm: {
  5037. type: Boolean,
  5038. required: false,
  5039. },
  5040. /**
  5041. * Set container 100% wide until medium breakpoint.
  5042. */
  5043. md: {
  5044. type: Boolean,
  5045. required: false,
  5046. },
  5047. /**
  5048. * Set container 100% wide until large breakpoint.
  5049. */
  5050. lg: {
  5051. type: Boolean,
  5052. required: false,
  5053. },
  5054. /**
  5055. * Set container 100% wide until X-large breakpoint.
  5056. */
  5057. xl: {
  5058. type: Boolean,
  5059. required: false,
  5060. },
  5061. /**
  5062. * Set container 100% wide until XX-large breakpoint.
  5063. */
  5064. xxl: {
  5065. type: Boolean,
  5066. required: false,
  5067. },
  5068. /**
  5069. * Set container 100% wide, spanning the entire width of the viewport.
  5070. */
  5071. fluid: {
  5072. type: Boolean,
  5073. required: false,
  5074. },
  5075. },
  5076. setup(props, { slots }) {
  5077. const repsonsiveClassNames = [];
  5078. BREAKPOINTS$3.forEach((bp) => {
  5079. const breakpoint = props[bp];
  5080. breakpoint && repsonsiveClassNames.push(`container-${bp}`);
  5081. });
  5082. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  5083. class: [repsonsiveClassNames.length ? repsonsiveClassNames : 'container'],
  5084. }, slots.default && slots.default());
  5085. },
  5086. });
  5087. const BREAKPOINTS$2 = [
  5088. 'xxl',
  5089. 'xl',
  5090. 'lg',
  5091. 'md',
  5092. 'sm',
  5093. 'xs',
  5094. ];
  5095. const CRow = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5096. name: 'CRow',
  5097. props: {
  5098. /**
  5099. * The number of columns/offset/order on extra small devices (<576px).
  5100. *
  5101. * @values { cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }
  5102. */
  5103. xs: {
  5104. type: Object,
  5105. default: undefined,
  5106. required: false,
  5107. },
  5108. /**
  5109. * The number of columns/offset/order on small devices (<768px).
  5110. *
  5111. * @values { cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }
  5112. */
  5113. sm: {
  5114. type: Object,
  5115. default: undefined,
  5116. required: false,
  5117. /**
  5118. * The number of columns/offset/order on medium devices (<992px).
  5119. *
  5120. * @values { cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }
  5121. */
  5122. },
  5123. md: {
  5124. type: Object,
  5125. default: undefined,
  5126. required: false,
  5127. },
  5128. /**
  5129. * The number of columns/offset/order on large devices (<1200px).
  5130. *
  5131. * @values { cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }
  5132. */
  5133. lg: {
  5134. type: Object,
  5135. default: undefined,
  5136. required: false,
  5137. },
  5138. /**
  5139. * The number of columns/offset/order on X-Large devices (<1400px).
  5140. *
  5141. * @values { cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }
  5142. */
  5143. xl: {
  5144. type: Object,
  5145. default: undefined,
  5146. required: false,
  5147. },
  5148. /**
  5149. * The number of columns/offset/order on XX-Large devices (≥1400px).
  5150. *
  5151. * @values { cols: 'auto' | number | string } | { gutter: number | string } | { gutterX: number | string } | { gutterY: number | string }
  5152. */
  5153. xxl: {
  5154. type: Object,
  5155. default: undefined,
  5156. required: false,
  5157. },
  5158. },
  5159. setup(props, { slots }) {
  5160. const repsonsiveClassNames = [];
  5161. BREAKPOINTS$2.forEach((bp) => {
  5162. const breakpoint = props[bp];
  5163. const infix = bp === 'xs' ? '' : `-${bp}`;
  5164. if (typeof breakpoint === 'object') {
  5165. if (breakpoint.cols) {
  5166. repsonsiveClassNames.push(`row-cols${infix}-${breakpoint.cols}`);
  5167. }
  5168. if (typeof breakpoint.gutter === 'number') {
  5169. repsonsiveClassNames.push(`g${infix}-${breakpoint.gutter}`);
  5170. }
  5171. if (typeof breakpoint.gutterX === 'number') {
  5172. repsonsiveClassNames.push(`gx${infix}-${breakpoint.gutterX}`);
  5173. }
  5174. if (typeof breakpoint.gutterY === 'number') {
  5175. repsonsiveClassNames.push(`gy${infix}-${breakpoint.gutterY}`);
  5176. }
  5177. }
  5178. });
  5179. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  5180. class: ['row', repsonsiveClassNames],
  5181. }, slots.default && slots.default());
  5182. },
  5183. });
  5184. const CGridPlugin = {
  5185. install: (app) => {
  5186. app.component(CCol.name, CCol);
  5187. app.component(CContainer.name, CContainer);
  5188. app.component(CRow.name, CRow);
  5189. },
  5190. };
  5191. const CHeader = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5192. name: 'CHeader',
  5193. props: {
  5194. /**
  5195. * Defines optional container wrapping children elements.
  5196. *
  5197. * @values boolean, 'sm', 'md', 'lg', 'xl', 'xxl', 'fluid'
  5198. */
  5199. container: {
  5200. type: [Boolean, String],
  5201. default: undefined,
  5202. required: false,
  5203. validator: (value) => {
  5204. return (typeof value === 'boolean' || ['sm', 'md', 'lg', 'xl', 'xxl', 'fluid'].includes(value));
  5205. },
  5206. },
  5207. /**
  5208. * Place header in non-static positions.
  5209. *
  5210. * @values 'fixed', 'sticky'
  5211. */
  5212. position: {
  5213. type: String,
  5214. default: undefined,
  5215. required: false,
  5216. validator: (value) => {
  5217. return ['fixed', 'sticky'].includes(value);
  5218. },
  5219. },
  5220. },
  5221. setup(props, { slots }) {
  5222. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: ['header', { [`header-${props.position}`]: props.position }] }, props.container
  5223. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: `container${props.container !== true ? '-' + props.container : ''}` }, slots.default && slots.default())
  5224. : slots.default && slots.default());
  5225. },
  5226. });
  5227. const CHeaderBrand = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5228. name: 'CHeaderBrand',
  5229. props: {
  5230. /**
  5231. * Component used for the root node. Either a string to use a HTML element or a component.
  5232. */
  5233. component: {
  5234. type: String,
  5235. required: false,
  5236. default: 'a',
  5237. },
  5238. },
  5239. setup(props, { slots }) {
  5240. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, { class: 'header-brand' }, slots.default && slots.default());
  5241. },
  5242. });
  5243. const CHeaderDivider = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5244. name: 'CHeaderDivider',
  5245. setup(_, { slots }) {
  5246. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'header-divider' }, slots.default && slots.default());
  5247. },
  5248. });
  5249. const CHeaderNav = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5250. name: 'CHeaderNav',
  5251. props: {
  5252. /**
  5253. * Component used for the root node. Either a string to use a HTML element or a component.
  5254. */
  5255. component: {
  5256. type: String,
  5257. required: false,
  5258. default: 'ul',
  5259. },
  5260. },
  5261. setup(props, { slots }) {
  5262. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  5263. class: 'header-nav',
  5264. role: 'navigation',
  5265. }, slots.default && slots.default());
  5266. },
  5267. });
  5268. const CHeaderText = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5269. name: 'CHeaderText',
  5270. setup(_, { slots }) {
  5271. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('span', { class: 'header-text' }, slots.default && slots.default());
  5272. },
  5273. });
  5274. const CHeaderToggler = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5275. name: 'CHeaderToggler',
  5276. setup(_, { slots }) {
  5277. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('button', {
  5278. class: 'header-toggler',
  5279. type: 'button',
  5280. 'aria-label': 'Toggle navigation',
  5281. }, slots.default ? slots.default() : (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('span', { class: ['header-toggler-icon'] }));
  5282. },
  5283. });
  5284. const CHeaderPlugin = {
  5285. install: (app) => {
  5286. app.component(CHeader.name, CHeader);
  5287. app.component(CHeaderBrand.name, CHeaderBrand);
  5288. app.component(CHeaderDivider.name, CHeaderDivider);
  5289. app.component(CHeaderNav.name, CHeaderNav);
  5290. app.component(CHeaderText.name, CHeaderText);
  5291. app.component(CHeaderToggler.name, CHeaderToggler);
  5292. },
  5293. };
  5294. const CImage = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5295. name: 'CImage',
  5296. props: {
  5297. /**
  5298. * Set the horizontal aligment.
  5299. *
  5300. * @values 'start', 'center', 'end'
  5301. */
  5302. align: {
  5303. type: String,
  5304. default: undefined,
  5305. required: false,
  5306. validator: (value) => {
  5307. return ['start', 'center', 'end'].includes(value);
  5308. },
  5309. },
  5310. /**
  5311. * Make image responsive.
  5312. */
  5313. fluid: {
  5314. type: Boolean,
  5315. required: false,
  5316. },
  5317. /**
  5318. * Make image rounded.
  5319. */
  5320. rounded: {
  5321. type: Boolean,
  5322. required: false,
  5323. },
  5324. /**
  5325. * Give an image a rounded 1px border appearance.
  5326. */
  5327. thumbnail: {
  5328. type: Boolean,
  5329. required: false,
  5330. },
  5331. },
  5332. setup(props) {
  5333. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('img', {
  5334. class: [
  5335. {
  5336. [`float-${props.align}`]: props.align && (props.align === 'start' || props.align === 'end'),
  5337. 'd-block mx-auto': props.align && props.align === 'center',
  5338. 'img-fluid': props.fluid,
  5339. rounded: props.rounded,
  5340. 'img-thumbnail': props.thumbnail,
  5341. },
  5342. ],
  5343. });
  5344. },
  5345. });
  5346. const CImagePlugin = {
  5347. install: (app) => {
  5348. app.component(CImage.name, CImage);
  5349. },
  5350. };
  5351. const CListGroup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5352. name: 'CListGroup',
  5353. props: {
  5354. /**
  5355. * Component used for the root node. Either a string to use a HTML element or a component.
  5356. */
  5357. component: {
  5358. type: String,
  5359. required: false,
  5360. default: 'ul',
  5361. },
  5362. /**
  5363. * Remove some borders and rounded corners to render list group items edge-to-edge in a parent component (e.g., `<CCard>`)
  5364. */
  5365. flush: {
  5366. type: Boolean,
  5367. required: false,
  5368. },
  5369. /**
  5370. * Specify a layout type.
  5371. *
  5372. * @values 'horizontal', 'horizontal-sm', 'horizontal-md', 'horizontal-lg', 'horizontal-xl', 'horizontal-xxl',
  5373. */
  5374. layout: {
  5375. type: String,
  5376. default: undefined,
  5377. required: false,
  5378. validator: (value) => {
  5379. return [
  5380. 'horizontal',
  5381. 'horizontal-sm',
  5382. 'horizontal-md',
  5383. 'horizontal-lg',
  5384. 'horizontal-xl',
  5385. 'horizontal-xxl',
  5386. ].includes(value);
  5387. },
  5388. },
  5389. },
  5390. setup(props, { slots }) {
  5391. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  5392. class: [
  5393. 'list-group',
  5394. {
  5395. 'list-group-flush': props.flush,
  5396. [`list-group-${props.layout}`]: props.layout,
  5397. },
  5398. ],
  5399. }, slots.default && slots.default());
  5400. },
  5401. });
  5402. const CListGroupItem = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5403. name: 'CListGroupItem',
  5404. props: {
  5405. /**
  5406. * Toggle the active state for the component.
  5407. */
  5408. active: {
  5409. type: Boolean,
  5410. required: false,
  5411. },
  5412. /**
  5413. * Sets the color context of the component to one of CoreUI’s themed colors.
  5414. *
  5415. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', string
  5416. */
  5417. color: Color,
  5418. /**
  5419. * Toggle the disabled state for the component.
  5420. */
  5421. disabled: {
  5422. type: Boolean,
  5423. required: false,
  5424. },
  5425. /**
  5426. * Component used for the root node. Either a string to use a HTML element or a component.
  5427. */
  5428. component: {
  5429. type: String,
  5430. required: false,
  5431. default: 'li',
  5432. },
  5433. },
  5434. setup(props, { slots }) {
  5435. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  5436. class: [
  5437. 'list-group-item',
  5438. {
  5439. [`list-group-item-${props.color}`]: props.color,
  5440. 'list-group-item-action': props.component === 'a' || props.component === 'button',
  5441. [`active`]: props.active,
  5442. [`disabled`]: props.disabled,
  5443. },
  5444. ],
  5445. ...((props.component === 'a' || props.component === 'button') && {
  5446. active: props.active,
  5447. disabled: props.disabled,
  5448. }),
  5449. ...(props.active && { 'aria-current': true }),
  5450. ...(props.disabled && { 'aria-disabled': true }),
  5451. }, slots.default && slots.default());
  5452. },
  5453. });
  5454. const CListGroupPlugin = {
  5455. install: (app) => {
  5456. app.component(CListGroup.name, CListGroup);
  5457. app.component(CListGroupItem.name, CListGroupItem);
  5458. },
  5459. };
  5460. const CModal = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5461. name: 'CModal',
  5462. props: {
  5463. /**
  5464. * Align the modal in the center or top of the screen.
  5465. *
  5466. * @values 'top', 'center'
  5467. */
  5468. alignment: {
  5469. default: 'top',
  5470. required: false,
  5471. validator: (value) => {
  5472. return ['top', 'center'].includes(value);
  5473. },
  5474. },
  5475. /**
  5476. * Apply a backdrop on body while offcanvas is open.
  5477. *
  5478. * @values 'static'
  5479. */
  5480. backdrop: {
  5481. type: [Boolean, String],
  5482. default: true,
  5483. require: false,
  5484. },
  5485. /**
  5486. * A string of all className you want applied to the modal content component.
  5487. */
  5488. contentClassName: {
  5489. type: String,
  5490. default: undefined,
  5491. required: false,
  5492. },
  5493. /**
  5494. * Set modal to covers the entire user viewport
  5495. *
  5496. * @values boolean, 'sm', 'md', 'lg', 'xl', 'xxl'
  5497. */
  5498. fullscreen: {
  5499. type: [Boolean, String],
  5500. default: undefined,
  5501. required: false,
  5502. validator: (value) => {
  5503. if (typeof value == 'string') {
  5504. return ['sm', 'md', 'lg', 'xl', 'xxl'].includes(value);
  5505. }
  5506. if (typeof value == 'boolean') {
  5507. return true;
  5508. }
  5509. return false;
  5510. },
  5511. },
  5512. /**
  5513. * Closes the modal when escape key is pressed.
  5514. */
  5515. keyboard: {
  5516. type: Boolean,
  5517. default: true,
  5518. required: false,
  5519. },
  5520. /**
  5521. * Create a scrollable modal that allows scrolling the modal body.
  5522. */
  5523. scrollable: {
  5524. type: Boolean,
  5525. required: false,
  5526. },
  5527. /**
  5528. * Size the component small, large, or extra large.
  5529. *
  5530. * @values 'sm', 'lg', 'xl'
  5531. */
  5532. size: {
  5533. type: String,
  5534. default: undefined,
  5535. required: false,
  5536. validator: (value) => {
  5537. return ['sm', 'lg', 'xl'].includes(value);
  5538. },
  5539. },
  5540. /**
  5541. * Remove animation to create modal that simply appear rather than fade in to view.
  5542. */
  5543. transition: {
  5544. type: Boolean,
  5545. default: true,
  5546. required: false,
  5547. },
  5548. /**
  5549. * By default the component is unmounted after close animation, if you want to keep the component mounted set this property to false.
  5550. */
  5551. unmountOnClose: {
  5552. type: Boolean,
  5553. default: true,
  5554. required: false,
  5555. },
  5556. /**
  5557. * Toggle the visibility of alert component.
  5558. */
  5559. visible: Boolean,
  5560. },
  5561. emits: [
  5562. /**
  5563. * Callback fired when the component requests to be closed.
  5564. */
  5565. 'close',
  5566. /**
  5567. * Callback fired when the component requests to be closed.
  5568. */
  5569. 'close-prevented',
  5570. /**
  5571. * Callback fired when the modal is shown, its backdrop is static and a click outside the modal or an escape key press is performed with the keyboard option set to false.
  5572. */
  5573. 'show',
  5574. ],
  5575. setup(props, { slots, attrs, emit }) {
  5576. const modalRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  5577. const modalContentRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  5578. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.visible);
  5579. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(() => props.visible, () => {
  5580. visible.value = props.visible;
  5581. });
  5582. const handleEnter = (el, done) => {
  5583. el.addEventListener('transitionend', () => {
  5584. done();
  5585. });
  5586. document.body.classList.add('modal-open');
  5587. el.style.display = 'block';
  5588. setTimeout(() => {
  5589. el.classList.add('show');
  5590. }, 1);
  5591. emit('show');
  5592. };
  5593. const handleAfterEnter = () => {
  5594. window.addEventListener('mousedown', handleMouseDown);
  5595. window.addEventListener('keyup', handleKeyUp);
  5596. };
  5597. const handleLeave = (el, done) => {
  5598. el.addEventListener('transitionend', () => {
  5599. done();
  5600. });
  5601. document.body.classList.remove('modal-open');
  5602. el.classList.remove('show');
  5603. };
  5604. const handleAfterLeave = (el) => {
  5605. window.removeEventListener('mousedown', handleMouseDown);
  5606. window.removeEventListener('keyup', handleKeyUp);
  5607. el.style.display = 'none';
  5608. };
  5609. const handleDismiss = () => {
  5610. emit('close');
  5611. visible.value = false;
  5612. };
  5613. const handleKeyUp = (event) => {
  5614. if (modalContentRef.value && !modalContentRef.value.contains(event.target)) {
  5615. if (props.backdrop !== 'static' && event.key === 'Escape' && props.keyboard) {
  5616. handleDismiss();
  5617. }
  5618. if (props.backdrop === 'static') {
  5619. modalRef.value.classList.add('modal-static');
  5620. emit('close-prevented');
  5621. setTimeout(() => {
  5622. modalRef.value.classList.remove('modal-static');
  5623. }, 300);
  5624. }
  5625. }
  5626. };
  5627. const handleMouseDown = (event) => {
  5628. window.addEventListener('mouseup', () => handleMouseUp(event), { once: true });
  5629. };
  5630. const handleMouseUp = (event) => {
  5631. if (modalContentRef.value && !modalContentRef.value.contains(event.target)) {
  5632. if (props.backdrop !== 'static') {
  5633. handleDismiss();
  5634. }
  5635. if (props.backdrop === 'static') {
  5636. modalRef.value.classList.add('modal-static');
  5637. setTimeout(() => {
  5638. modalRef.value.classList.remove('modal-static');
  5639. }, 300);
  5640. }
  5641. }
  5642. };
  5643. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('handleDismiss', handleDismiss);
  5644. const modal = () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  5645. class: [
  5646. 'modal',
  5647. {
  5648. ['fade']: props.transition,
  5649. },
  5650. attrs.class,
  5651. ],
  5652. ref: modalRef,
  5653. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  5654. class: [
  5655. 'modal-dialog',
  5656. {
  5657. 'modal-dialog-centered': props.alignment === 'center',
  5658. [`modal-fullscreen-${props.fullscreen}-down`]: props.fullscreen && typeof props.fullscreen === 'string',
  5659. 'modal-fullscreen': props.fullscreen && typeof props.fullscreen === 'boolean',
  5660. ['modal-dialog-scrollable']: props.scrollable,
  5661. [`modal-${props.size}`]: props.size,
  5662. },
  5663. ],
  5664. role: 'dialog',
  5665. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: ['modal-content', props.contentClassName], ref: modalContentRef }, slots.default && slots.default())));
  5666. return () => [
  5667. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, {
  5668. css: false,
  5669. onEnter: (el, done) => handleEnter(el, done),
  5670. onAfterEnter: () => handleAfterEnter(),
  5671. onLeave: (el, done) => handleLeave(el, done),
  5672. onAfterLeave: (el) => handleAfterLeave(el),
  5673. }, () => props.unmountOnClose
  5674. ? visible.value && modal()
  5675. : (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)(modal(), [[vue__WEBPACK_IMPORTED_MODULE_0__.vShow, visible.value]])),
  5676. props.backdrop &&
  5677. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CBackdrop, {
  5678. class: 'modal-backdrop',
  5679. visible: visible.value,
  5680. }),
  5681. ];
  5682. },
  5683. });
  5684. const CModalBody = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5685. name: 'CModalBody',
  5686. setup(_, { slots }) {
  5687. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'modal-body' }, slots.default && slots.default());
  5688. },
  5689. });
  5690. const CModalFooter = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5691. name: 'CModalFooter',
  5692. setup(_, { slots }) {
  5693. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'modal-footer' }, slots.default && slots.default());
  5694. },
  5695. });
  5696. const CModalHeader = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5697. name: 'CModalHeader',
  5698. props: {
  5699. /**
  5700. * Add a close button component to the header.
  5701. */
  5702. closeButton: {
  5703. type: Boolean,
  5704. required: false,
  5705. default: true,
  5706. },
  5707. },
  5708. setup(props, { slots }) {
  5709. const handleDismiss = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('handleDismiss');
  5710. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('span', { class: 'modal-header' }, [
  5711. slots.default && slots.default(),
  5712. props.closeButton && (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCloseButton, { onClick: () => handleDismiss() }, ''),
  5713. ]);
  5714. },
  5715. });
  5716. const CModalTitle = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5717. name: 'CModalTitle',
  5718. props: {
  5719. /**
  5720. * Component used for the root node. Either a string to use a HTML element or a component.
  5721. */
  5722. component: {
  5723. type: String,
  5724. default: 'h5',
  5725. required: false,
  5726. },
  5727. },
  5728. setup(props, { slots }) {
  5729. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, { class: 'modal-title' }, slots.default && slots.default());
  5730. },
  5731. });
  5732. const CModalPlugin = {
  5733. install: (app) => {
  5734. app.component(CModal.name, CModal);
  5735. app.component(CModalBody.name, CModalBody);
  5736. app.component(CModalFooter.name, CModalFooter);
  5737. app.component(CModalHeader.name, CModalHeader);
  5738. app.component(CModalTitle.name, CModalTitle);
  5739. },
  5740. };
  5741. const CNav = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5742. name: 'CNav',
  5743. props: {
  5744. /**
  5745. * Component used for the root node. Either a string to use a HTML element or a component.
  5746. */
  5747. component: {
  5748. type: String,
  5749. required: false,
  5750. default: 'ul',
  5751. },
  5752. /**
  5753. * Specify a layout type for component.
  5754. *
  5755. * @values 'fill', 'justified'
  5756. */
  5757. layout: {
  5758. type: String,
  5759. required: false,
  5760. default: undefined,
  5761. validator: (value) => {
  5762. return ['fill', 'justified'].includes(value);
  5763. },
  5764. },
  5765. /**
  5766. * Set the nav variant to tabs or pills.
  5767. *
  5768. * @values 'tabs', 'pills'
  5769. */
  5770. variant: {
  5771. type: String,
  5772. required: false,
  5773. default: undefined,
  5774. validator: (value) => {
  5775. return ['tabs', 'pills'].includes(value);
  5776. },
  5777. },
  5778. },
  5779. setup(props, { slots }) {
  5780. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  5781. class: [
  5782. 'nav',
  5783. {
  5784. [`nav-${props.layout}`]: props.layout,
  5785. [`nav-${props.variant}`]: props.variant,
  5786. },
  5787. ],
  5788. role: 'navigation',
  5789. }, slots.default && slots.default());
  5790. },
  5791. });
  5792. const CNavGroup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5793. name: 'CNavGroup',
  5794. props: {
  5795. /**
  5796. * Make nav group more compact by cutting all `padding` in half.
  5797. */
  5798. compact: Boolean,
  5799. /**
  5800. * Show nav group items.
  5801. */
  5802. visible: Boolean,
  5803. },
  5804. emits: ['visible-change'],
  5805. setup(props, { slots, emit }) {
  5806. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  5807. const navGroupRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  5808. const visibleGroup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  5809. const handleVisibleChange = (visible, index) => {
  5810. if (visible) {
  5811. visibleGroup.value = index;
  5812. }
  5813. else {
  5814. if (visibleGroup.value === index) {
  5815. visibleGroup.value = 0;
  5816. }
  5817. }
  5818. };
  5819. const isVisible = (index) => Boolean(visibleGroup.value === index);
  5820. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => {
  5821. visible.value = props.visible;
  5822. props.visible && navGroupRef.value.classList.add('show');
  5823. emit('visible-change', visible.value);
  5824. });
  5825. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(() => props.visible, () => {
  5826. visible.value = props.visible;
  5827. if (visible.value === false) {
  5828. visibleGroup.value = undefined;
  5829. }
  5830. });
  5831. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(visible, () => {
  5832. emit('visible-change', visible.value);
  5833. });
  5834. const handleTogglerClick = () => {
  5835. visible.value = !visible.value;
  5836. emit('visible-change', visible.value);
  5837. };
  5838. const handleBeforeEnter = (el) => {
  5839. el.style.height = '0px';
  5840. navGroupRef.value.classList.add('show');
  5841. };
  5842. const handleEnter = (el, done) => {
  5843. el.addEventListener('transitionend', () => {
  5844. done();
  5845. });
  5846. el.style.height = `${el.scrollHeight}px`;
  5847. };
  5848. const handleAfterEnter = (el) => {
  5849. el.style.height = 'auto';
  5850. };
  5851. const handleBeforeLeave = (el) => {
  5852. el.style.height = `${el.scrollHeight}px`;
  5853. };
  5854. const handleLeave = (el, done) => {
  5855. el.addEventListener('transitionend', () => {
  5856. done();
  5857. });
  5858. setTimeout(() => {
  5859. el.style.height = '0px';
  5860. }, 1);
  5861. };
  5862. const handleAfterLeave = () => {
  5863. navGroupRef.value.classList.remove('show');
  5864. };
  5865. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('li', {
  5866. class: 'nav-group',
  5867. ref: navGroupRef,
  5868. }, [
  5869. slots.togglerContent &&
  5870. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('a', {
  5871. class: ['nav-link', 'nav-group-toggle'],
  5872. onClick: handleTogglerClick,
  5873. }, slots.togglerContent && slots.togglerContent()),
  5874. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, {
  5875. css: false,
  5876. onBeforeEnter: (el) => handleBeforeEnter(el),
  5877. onEnter: (el, done) => handleEnter(el, done),
  5878. onAfterEnter: (el) => handleAfterEnter(el),
  5879. onBeforeLeave: (el) => handleBeforeLeave(el),
  5880. onLeave: (el, done) => handleLeave(el, done),
  5881. onAfterLeave: () => handleAfterLeave(),
  5882. }, {
  5883. default: () => visible.value &&
  5884. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('ul', {
  5885. class: [
  5886. 'nav-group-items',
  5887. {
  5888. compact: props.compact,
  5889. },
  5890. ],
  5891. }, slots.default &&
  5892. slots.default().map((vnode, index) => {
  5893. // @ts-expect-error name is defined in component
  5894. if (vnode.type.name === 'CNavGroup') {
  5895. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vnode, {
  5896. onVisibleChange: (visible) => handleVisibleChange(visible, index + 1),
  5897. ...(visibleGroup.value && { visible: isVisible(index + 1) }),
  5898. });
  5899. }
  5900. return vnode;
  5901. })),
  5902. }),
  5903. ]);
  5904. },
  5905. });
  5906. const CNavGroupItems = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5907. name: 'CNavGroupItems',
  5908. setup(_, { slots }) {
  5909. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('ul', { class: 'nav-group-items' }, slots.default && slots.default());
  5910. },
  5911. });
  5912. const CNavLink = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5913. name: 'CNavLink',
  5914. props: {
  5915. /**
  5916. * Toggle the active state for the component.
  5917. */
  5918. active: {
  5919. type: Boolean,
  5920. required: false,
  5921. },
  5922. /**
  5923. * Component used for the root node. Either a string to use a HTML element or a component.
  5924. */
  5925. component: {
  5926. type: String,
  5927. required: false,
  5928. default: 'a',
  5929. },
  5930. /**
  5931. * Toggle the disabled state for the component.
  5932. */
  5933. disabled: {
  5934. type: Boolean,
  5935. required: false,
  5936. },
  5937. /**
  5938. * @ignore
  5939. */
  5940. href: {
  5941. type: String,
  5942. default: undefined,
  5943. required: false,
  5944. },
  5945. },
  5946. setup(props, { slots }) {
  5947. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CLink, {
  5948. class: 'nav-link',
  5949. active: props.active,
  5950. component: props.component,
  5951. disabled: props.disabled,
  5952. href: props.href,
  5953. }, {
  5954. default: () => slots.default && slots.default(),
  5955. });
  5956. },
  5957. });
  5958. const CNavItem = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5959. name: 'CNavItem',
  5960. props: {
  5961. ...CNavLink.props,
  5962. },
  5963. setup(props, { slots }) {
  5964. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('li', {
  5965. class: 'nav-item',
  5966. }, props.href
  5967. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CNavLink, {
  5968. active: props.active,
  5969. component: props.component,
  5970. disabled: props.disabled,
  5971. href: props.href,
  5972. }, {
  5973. default: () => slots.default && slots.default(),
  5974. })
  5975. : slots.default && slots.default());
  5976. },
  5977. });
  5978. const CNavTitle = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5979. name: 'CNavTitle',
  5980. setup(_, { slots }) {
  5981. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('li', { class: 'nav-title' }, slots.default && slots.default());
  5982. },
  5983. });
  5984. const CNavPlugin = {
  5985. install: (app) => {
  5986. app.component(CNav.name, CNav);
  5987. app.component(CNavGroup.name, CNavGroup);
  5988. app.component(CNavGroupItems.name, CNavGroupItems);
  5989. app.component(CNavItem.name, CNavItem);
  5990. app.component(CNavLink.name, CNavLink);
  5991. app.component(CNavTitle.name, CNavTitle);
  5992. },
  5993. };
  5994. const CNavbar = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  5995. name: 'CNavbar',
  5996. props: {
  5997. /**
  5998. * Sets the color context of the component to one of CoreUI’s themed colors.
  5999. *
  6000. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', string
  6001. */
  6002. color: Color,
  6003. /**
  6004. * Sets if the color of text should be colored for a light or dark dark background.
  6005. *
  6006. * @values 'dark', 'light'
  6007. */
  6008. colorScheme: {
  6009. type: String,
  6010. default: undefined,
  6011. required: false,
  6012. validator: (value) => {
  6013. return ['dark', 'light'].includes(value);
  6014. },
  6015. },
  6016. /**
  6017. * Component used for the root node. Either a string to use a HTML element or a component.
  6018. */
  6019. component: {
  6020. type: String,
  6021. default: 'nav',
  6022. required: false,
  6023. },
  6024. /**
  6025. * Defines optional container wrapping children elements.
  6026. *
  6027. * @values boolean, 'sm', 'md', 'lg', 'xl', 'xxl', 'fluid'
  6028. */
  6029. container: {
  6030. type: [Boolean, String],
  6031. default: undefined,
  6032. required: false,
  6033. validator: (value) => {
  6034. return (typeof value === 'boolean' || ['sm', 'md', 'lg', 'xl', 'xxl', 'fluid'].includes(value));
  6035. },
  6036. },
  6037. /**
  6038. * Defines the responsive breakpoint to determine when content collapses.
  6039. *
  6040. * @values boolean, 'sm', 'md', 'lg', 'xl', 'xxl'
  6041. */
  6042. expand: {
  6043. type: [Boolean, String],
  6044. default: undefined,
  6045. required: false,
  6046. validator: (value) => {
  6047. return typeof value === 'boolean' || ['sm', 'md', 'lg', 'xl', 'xxl'].includes(value);
  6048. },
  6049. },
  6050. /**
  6051. * Place component in non-static positions.
  6052. *
  6053. * @values 'fixed-top', 'fixed-bottom', 'sticky-top'
  6054. */
  6055. placement: {
  6056. type: String,
  6057. default: undefined,
  6058. required: false,
  6059. validator: (value) => {
  6060. return ['fixed-top', 'fixed-bottom', 'sticky-top'].includes(value);
  6061. },
  6062. },
  6063. },
  6064. setup(props, { slots }) {
  6065. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  6066. class: [
  6067. 'navbar',
  6068. {
  6069. [`bg-${props.color}`]: props.color,
  6070. [`navbar-${props.colorScheme}`]: props.colorScheme,
  6071. [typeof props.expand === 'boolean'
  6072. ? 'navbar-expand'
  6073. : `navbar-expand-${props.expand}`]: props.expand,
  6074. },
  6075. props.placement,
  6076. ],
  6077. }, props.container
  6078. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: [`container${props.container !== true ? '-' + props.container : ''}`] }, slots.default && slots.default())
  6079. : slots.default && slots.default());
  6080. },
  6081. });
  6082. const CNavbarBrand = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6083. name: 'CNavbarBrand',
  6084. props: {
  6085. /**
  6086. * Component used for the root node. Either a string to use a HTML element or a component.
  6087. *
  6088. */
  6089. component: {
  6090. type: String,
  6091. default: 'a',
  6092. required: false,
  6093. },
  6094. /**
  6095. * The href attribute specifies the URL of the page the link goes to.
  6096. */
  6097. href: {
  6098. type: String,
  6099. default: undefined,
  6100. required: false,
  6101. },
  6102. },
  6103. setup(props, { slots }) {
  6104. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component ? props.component : props.href ? 'a' : 'span', {
  6105. class: 'navbar-brand',
  6106. href: props.href,
  6107. }, slots.default && slots.default());
  6108. },
  6109. });
  6110. const CNavbarNav = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6111. name: 'CNavbarNav',
  6112. props: {
  6113. /**
  6114. * Component used for the root node. Either a string to use a HTML element or a component.
  6115. */
  6116. component: {
  6117. type: String,
  6118. required: false,
  6119. default: 'ul',
  6120. },
  6121. },
  6122. setup(props, { slots }) {
  6123. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  6124. class: 'navbar-nav',
  6125. role: 'navigation',
  6126. }, slots.default && slots.default());
  6127. },
  6128. });
  6129. const CNavbarText = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6130. name: 'CNavbarText',
  6131. setup(_, { slots }) {
  6132. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('span', { class: 'navbar-text' }, slots.default && slots.default());
  6133. },
  6134. });
  6135. const CNavbarToggler = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6136. name: 'CNavbarToggler',
  6137. setup(_, { slots }) {
  6138. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('button', {
  6139. class: 'navbar-toggler',
  6140. }, slots.default ? slots.default() : (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('span', { class: ['navbar-toggler-icon'] }));
  6141. },
  6142. });
  6143. const CNavbarPlugin = {
  6144. install: (app) => {
  6145. app.component(CNavbar.name, CNavbar);
  6146. app.component(CNavbarBrand.name, CNavbarBrand);
  6147. app.component(CNavbarNav.name, CNavbarNav);
  6148. app.component(CNavbarText.name, CNavbarText);
  6149. app.component(CNavbarToggler.name, CNavbarToggler);
  6150. },
  6151. };
  6152. const COffcanvas = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6153. name: 'COffcanvas',
  6154. props: {
  6155. /**
  6156. * Apply a backdrop on body while offcanvas is open.
  6157. */
  6158. backdrop: {
  6159. type: Boolean,
  6160. default: true,
  6161. require: false,
  6162. },
  6163. /**
  6164. * Closes the offcanvas when escape key is pressed.
  6165. */
  6166. keyboard: {
  6167. type: Boolean,
  6168. default: true,
  6169. require: false,
  6170. },
  6171. /**
  6172. * Components placement, there’s no default placement.
  6173. *
  6174. * @values 'start', 'end', 'top', 'bottom'
  6175. */
  6176. placement: {
  6177. type: String,
  6178. default: undefined,
  6179. require: true,
  6180. validator: (value) => {
  6181. return ['start', 'end', 'top', 'bottom'].includes(value);
  6182. },
  6183. },
  6184. /**
  6185. * Allow body scrolling while offcanvas is open
  6186. */
  6187. scroll: {
  6188. type: Boolean,
  6189. default: false,
  6190. required: false,
  6191. },
  6192. /**
  6193. * Toggle the visibility of offcanvas component.
  6194. */
  6195. visible: {
  6196. type: Boolean,
  6197. require: false,
  6198. },
  6199. },
  6200. emits: [
  6201. /**
  6202. * Callback fired when the component requests to be hidden.
  6203. */
  6204. 'hide',
  6205. /**
  6206. * Callback fired when the component requests to be shown.
  6207. */
  6208. 'show',
  6209. ],
  6210. setup(props, { slots, emit }) {
  6211. const offcanvasRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  6212. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.visible);
  6213. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(() => props.visible, () => {
  6214. visible.value = props.visible;
  6215. });
  6216. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(visible, () => {
  6217. if (visible.value) {
  6218. if (!props.scroll) {
  6219. document.body.style.overflow = 'hidden';
  6220. document.body.style.paddingRight = '0px';
  6221. }
  6222. return;
  6223. }
  6224. if (!props.scroll) {
  6225. document.body.style.removeProperty('overflow');
  6226. document.body.style.removeProperty('padding-right');
  6227. }
  6228. });
  6229. const handleEnter = (el, done) => {
  6230. emit('show');
  6231. el.addEventListener('transitionend', () => {
  6232. done();
  6233. });
  6234. setTimeout(() => {
  6235. el.style.visibility = 'visible';
  6236. el.classList.add('show');
  6237. }, 1);
  6238. };
  6239. const handleAfterEnter = () => {
  6240. window.addEventListener('mousedown', handleMouseDown);
  6241. // window.addEventListener('click', handleClickOutside)
  6242. window.addEventListener('keyup', handleKeyUp);
  6243. };
  6244. const handleLeave = (el, done) => {
  6245. el.addEventListener('transitionend', () => {
  6246. done();
  6247. });
  6248. window.removeEventListener('mousedown', handleMouseDown);
  6249. window.removeEventListener('keyup', handleKeyUp);
  6250. el.classList.remove('show');
  6251. };
  6252. const handleAfterLeave = (el) => {
  6253. el.style.visibility = 'hidden';
  6254. };
  6255. const handleDismiss = () => {
  6256. visible.value = false;
  6257. emit('hide');
  6258. };
  6259. const handleKeyUp = (event) => {
  6260. if (offcanvasRef.value && !offcanvasRef.value.contains(event.target)) {
  6261. if (event.key === 'Escape' && props.keyboard && props.backdrop) {
  6262. return handleDismiss();
  6263. }
  6264. }
  6265. };
  6266. const handleMouseDown = (event) => {
  6267. window.addEventListener('mouseup', () => handleMouseUp(event), { once: true });
  6268. };
  6269. const handleMouseUp = (event) => {
  6270. if (offcanvasRef.value && !offcanvasRef.value.contains(event.target)) {
  6271. props.backdrop && handleDismiss();
  6272. }
  6273. };
  6274. return () => [
  6275. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, {
  6276. css: false,
  6277. onEnter: (el, done) => handleEnter(el, done),
  6278. onAfterEnter: () => handleAfterEnter(),
  6279. onLeave: (el, done) => handleLeave(el, done),
  6280. onAfterLeave: (el) => handleAfterLeave(el),
  6281. }, () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  6282. class: [
  6283. 'offcanvas',
  6284. {
  6285. [`offcanvas-${props.placement}`]: props.placement,
  6286. },
  6287. ],
  6288. ref: offcanvasRef,
  6289. role: 'dialog',
  6290. }, slots.default && slots.default()), [[vVisible, props.visible]])),
  6291. props.backdrop &&
  6292. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CBackdrop, {
  6293. class: 'offcanvas-backdrop',
  6294. visible: visible.value,
  6295. }),
  6296. ];
  6297. },
  6298. });
  6299. const COffcanvasBody = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6300. name: 'COffcanvasBody',
  6301. setup(_, { slots }) {
  6302. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'offcanvas-body' }, slots.default && slots.default());
  6303. },
  6304. });
  6305. const COffcanvasHeader = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6306. name: 'COffcanvasHeader',
  6307. setup(_, { slots }) {
  6308. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'offcanvas-header' }, slots.default && slots.default());
  6309. },
  6310. });
  6311. const COffcanvasTitle = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6312. name: 'COffcanvasTitle',
  6313. props: {
  6314. /**
  6315. * Component used for the root node. Either a string to use a HTML element or a component.
  6316. */
  6317. component: {
  6318. type: String,
  6319. required: false,
  6320. default: 'h5',
  6321. },
  6322. },
  6323. setup(props, { slots }) {
  6324. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, { class: 'offcanvas-title' }, slots.default && slots.default());
  6325. },
  6326. });
  6327. const COffcanvasPlugin = {
  6328. install: (app) => {
  6329. app.component(COffcanvas.name, COffcanvas);
  6330. app.component(COffcanvasBody.name, COffcanvasBody);
  6331. app.component(COffcanvasHeader.name, COffcanvasHeader);
  6332. app.component(COffcanvasTitle.name, COffcanvasTitle);
  6333. },
  6334. };
  6335. const CPagination = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6336. name: 'CPagination',
  6337. props: {
  6338. /**
  6339. * Set the alignment of pagination components.
  6340. *
  6341. * @values 'start', 'center', 'end'
  6342. */
  6343. align: {
  6344. type: String,
  6345. default: undefined,
  6346. required: false,
  6347. validator: (value) => {
  6348. return ['start', 'center', 'end'].includes(value);
  6349. },
  6350. },
  6351. /**
  6352. * Size the component small or large.
  6353. *
  6354. * @values 'sm', 'lg'
  6355. */
  6356. size: {
  6357. type: String,
  6358. default: undefined,
  6359. required: false,
  6360. validator: (value) => {
  6361. return ['sm', 'lg'].includes(value);
  6362. },
  6363. },
  6364. },
  6365. setup(props, { slots }) {
  6366. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('nav', {}, (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('ul', {
  6367. class: [
  6368. 'pagination',
  6369. {
  6370. [`justify-content-${props.align}`]: props.align,
  6371. [`pagination-${props.size}`]: props.size,
  6372. },
  6373. ],
  6374. }, slots.default && slots.default()));
  6375. },
  6376. });
  6377. const CPaginationItem = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6378. name: 'CPaginationItem',
  6379. props: {
  6380. /**
  6381. * Toggle the active state for the component.
  6382. */
  6383. active: {
  6384. type: Boolean,
  6385. required: false,
  6386. },
  6387. /**
  6388. * Component used for the root node. Either a string to use a HTML element or a component.
  6389. */
  6390. component: {
  6391. type: String,
  6392. default: undefined,
  6393. required: false,
  6394. },
  6395. /**
  6396. * Toggle the disabled state for the component.
  6397. */
  6398. disabled: {
  6399. type: Boolean,
  6400. required: false,
  6401. },
  6402. /**
  6403. * The href attribute specifies the URL of the page the link goes to.
  6404. */
  6405. href: {
  6406. type: String,
  6407. default: undefined,
  6408. required: false,
  6409. },
  6410. },
  6411. setup(props, { slots }) {
  6412. return () => {
  6413. const component = props.component ? props.component : props.active ? 'span' : 'a';
  6414. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('li', {
  6415. class: [
  6416. 'page-item',
  6417. {
  6418. ['active']: props.active,
  6419. ['disabled']: props.disabled,
  6420. },
  6421. ],
  6422. ...(props.active && { active: props.active, 'aria-current': 'page' }),
  6423. }, component === 'a'
  6424. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CLink, {
  6425. class: ['page-link'],
  6426. component: component,
  6427. href: props.href,
  6428. }, {
  6429. default: () => slots.default && slots.default(),
  6430. })
  6431. : (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(component, { class: ['page-link'] }, slots.default && slots.default()));
  6432. };
  6433. },
  6434. });
  6435. const CPaginationPlugin = {
  6436. install: (app) => {
  6437. app.component(CPagination.name, CPagination);
  6438. app.component(CPaginationItem.name, CPaginationItem);
  6439. },
  6440. };
  6441. const BREAKPOINTS$1 = [
  6442. 'xxl',
  6443. 'xl',
  6444. 'lg',
  6445. 'md',
  6446. 'sm',
  6447. 'xs',
  6448. ];
  6449. const CPlaceholder = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6450. name: 'CPlaceholder',
  6451. props: {
  6452. /**
  6453. * Set animation type to better convey the perception of something being actively loaded.
  6454. *
  6455. * @values 'glow', 'wave'
  6456. */
  6457. animation: {
  6458. type: String,
  6459. default: undefined,
  6460. require: false,
  6461. validator: (value) => {
  6462. return ['glow', 'wave'].includes(value);
  6463. },
  6464. },
  6465. /**
  6466. * Sets the color context of the component to one of CoreUI’s themed colors.
  6467. *
  6468. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  6469. */
  6470. color: Color,
  6471. /**
  6472. * Component used for the root node. Either a string to use a HTML element or a component.
  6473. */
  6474. component: {
  6475. type: String,
  6476. default: 'span',
  6477. required: false,
  6478. },
  6479. /**
  6480. * Size the component extra small, small, or large.
  6481. *
  6482. * @values 'xs', 'sm', 'lg'
  6483. */
  6484. size: {
  6485. type: String,
  6486. default: undefined,
  6487. required: false,
  6488. validator: (value) => {
  6489. return ['xs', 'sm', 'lg'].includes(value);
  6490. },
  6491. },
  6492. /**
  6493. * The number of columns on extra small devices (<576px).
  6494. */
  6495. xs: {
  6496. type: Number,
  6497. default: undefined,
  6498. require: false,
  6499. },
  6500. /**
  6501. * The number of columns on small devices (<768px).
  6502. */
  6503. sm: {
  6504. type: Number,
  6505. default: undefined,
  6506. require: false,
  6507. },
  6508. /**
  6509. * The number of columns on medium devices (<992px).
  6510. */
  6511. md: {
  6512. type: Number,
  6513. default: undefined,
  6514. require: false,
  6515. },
  6516. /**
  6517. * The number of columns on large devices (<1200px).
  6518. */
  6519. lg: {
  6520. type: Number,
  6521. default: undefined,
  6522. require: false,
  6523. },
  6524. /**
  6525. * The number of columns on X-Large devices (<1400px).
  6526. */
  6527. xl: {
  6528. type: Number,
  6529. default: undefined,
  6530. require: false,
  6531. },
  6532. /**
  6533. * The number of columns on XX-Large devices (≥1400px).
  6534. */
  6535. xxl: {
  6536. type: Number,
  6537. default: undefined,
  6538. require: false,
  6539. },
  6540. },
  6541. setup(props, { slots }) {
  6542. const repsonsiveClassNames = [];
  6543. BREAKPOINTS$1.forEach((bp) => {
  6544. const breakpoint = props[bp];
  6545. const infix = bp === 'xs' ? '' : `-${bp}`;
  6546. if (typeof breakpoint === 'number') {
  6547. repsonsiveClassNames.push(`col${infix}-${breakpoint}`);
  6548. }
  6549. if (typeof breakpoint === 'boolean') {
  6550. repsonsiveClassNames.push(`col${infix}`);
  6551. }
  6552. });
  6553. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  6554. class: [
  6555. props.animation ? `placeholder-${props.animation}` : 'placeholder',
  6556. {
  6557. [`bg-${props.color}`]: props.color,
  6558. [`placeholder-${props.size}`]: props.size,
  6559. },
  6560. repsonsiveClassNames,
  6561. ],
  6562. }, slots.default && slots.default());
  6563. },
  6564. });
  6565. const CPlaceholderPlugin = {
  6566. install: (app) => {
  6567. app.component(CPlaceholder.name, CPlaceholder);
  6568. },
  6569. };
  6570. const CProgressBar = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6571. name: 'CProgressBar',
  6572. props: {
  6573. /**
  6574. * Use to animate the stripes right to left via CSS3 animations.
  6575. */
  6576. animated: {
  6577. type: Boolean,
  6578. required: false,
  6579. },
  6580. /**
  6581. * Sets the color context of the component to one of CoreUI’s themed colors.
  6582. *
  6583. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  6584. */
  6585. color: Color,
  6586. /**
  6587. * The percent to progress the ProgressBar.
  6588. */
  6589. value: {
  6590. type: Number,
  6591. required: false,
  6592. default: 0,
  6593. },
  6594. /**
  6595. * Set the progress bar variant to optional striped.
  6596. *
  6597. * @values 'striped'
  6598. */
  6599. variant: {
  6600. type: String,
  6601. default: undefined,
  6602. require: false,
  6603. validator: (value) => {
  6604. return value === 'striped';
  6605. },
  6606. },
  6607. },
  6608. setup(props, { slots }) {
  6609. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  6610. class: [
  6611. 'progress-bar',
  6612. `bg-${props.color}`,
  6613. {
  6614. [`progress-bar-${props.variant}`]: props.variant,
  6615. ['progress-bar-animated']: props.animated,
  6616. },
  6617. ],
  6618. role: 'progressbar',
  6619. style: `width: ${props.value}%`,
  6620. 'aria-valuenow': props.value,
  6621. 'aria-valuemin': '0',
  6622. 'aria-valuemax': '100',
  6623. }, slots.default && slots.default());
  6624. },
  6625. });
  6626. const CProgress = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6627. name: 'CProgress',
  6628. props: {
  6629. /**
  6630. * Sets the height of the component. If you set that value the inner `<CProgressBar>` will automatically resize accordingly.
  6631. */
  6632. height: {
  6633. type: Number,
  6634. default: undefined,
  6635. required: false,
  6636. },
  6637. /**
  6638. * Makes progress bar thinner.
  6639. */
  6640. thin: Boolean,
  6641. /**
  6642. * Change the default color to white.
  6643. */
  6644. white: Boolean,
  6645. ...CProgressBar.props,
  6646. },
  6647. setup(props, { slots }) {
  6648. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  6649. class: [
  6650. 'progress',
  6651. {
  6652. 'progress-thin': props.thin,
  6653. 'progress-white': props.white,
  6654. },
  6655. ],
  6656. ...(props.height, { style: `height: ${props.height}px` }),
  6657. }, props.value
  6658. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CProgressBar, {
  6659. value: props.value,
  6660. animated: props.animated,
  6661. color: props.color,
  6662. variant: props.variant,
  6663. }, slots.default && slots.default())
  6664. : slots.default && slots.default());
  6665. },
  6666. });
  6667. const CProgressPlugin = {
  6668. install: (app) => {
  6669. app.component(CProgress.name, CProgress);
  6670. app.component(CProgressBar.name, CProgressBar);
  6671. },
  6672. };
  6673. const CPopover = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6674. name: 'CPopover',
  6675. props: {
  6676. /**
  6677. * Content for your component. If you want to pass non-string value please use dedicated slot `<template #content>...</template>`
  6678. */
  6679. content: {
  6680. type: String,
  6681. default: undefined,
  6682. required: false,
  6683. },
  6684. /**
  6685. * Offset of the popover relative to its target.
  6686. */
  6687. offset: {
  6688. type: Array,
  6689. default: () => [0, 8],
  6690. required: false,
  6691. },
  6692. /**
  6693. * Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property.
  6694. */
  6695. placement: {
  6696. type: String,
  6697. default: 'top',
  6698. required: false,
  6699. validator: (value) => {
  6700. return ['top', 'right', 'bottom', 'left'].includes(value);
  6701. },
  6702. },
  6703. /**
  6704. * Title for your component. If you want to pass non-string value please use dedicated slot `<template #title>...</template>`
  6705. */
  6706. title: {
  6707. type: String,
  6708. default: undefined,
  6709. required: false,
  6710. },
  6711. /**
  6712. * Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.
  6713. *
  6714. * @values 'click', 'focus', 'hover'
  6715. */
  6716. trigger: {
  6717. type: [String, Array],
  6718. default: 'click',
  6719. required: false,
  6720. validator: (value) => {
  6721. if (typeof value === 'string') {
  6722. return ['click', 'focus', 'hover'].includes(value);
  6723. }
  6724. if (Array.isArray(value)) {
  6725. return value.every((e) => ['click', 'focus', 'hover'].includes(e));
  6726. }
  6727. return false;
  6728. },
  6729. },
  6730. /**
  6731. * Toggle the visibility of popover component.
  6732. */
  6733. visible: Boolean,
  6734. },
  6735. emits: [
  6736. /**
  6737. * Callback fired when the component requests to be hidden.
  6738. */
  6739. 'hide',
  6740. /**
  6741. * Callback fired when the component requests to be shown.
  6742. */
  6743. 'show',
  6744. ],
  6745. setup(props, { slots, emit }) {
  6746. const togglerRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  6747. const popoverRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  6748. const popper = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  6749. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.visible);
  6750. const handleEnter = (el, done) => {
  6751. emit('show');
  6752. initPopper();
  6753. el.classList.add('show');
  6754. el.addEventListener('transitionend', () => {
  6755. done();
  6756. });
  6757. };
  6758. const handleLeave = (el, done) => {
  6759. emit('hide');
  6760. el.classList.remove('show');
  6761. el.addEventListener('transitionend', () => {
  6762. done();
  6763. destroyPopper();
  6764. });
  6765. };
  6766. const handleToggle = (event) => {
  6767. togglerRef.value = event.target;
  6768. visible.value = !visible.value;
  6769. };
  6770. const initPopper = () => {
  6771. if (togglerRef.value) {
  6772. popper.value = createPopper(togglerRef.value, popoverRef.value, {
  6773. placement: props.placement,
  6774. modifiers: [
  6775. {
  6776. name: 'offset',
  6777. options: {
  6778. offset: props.offset,
  6779. },
  6780. },
  6781. ],
  6782. });
  6783. }
  6784. };
  6785. const destroyPopper = () => {
  6786. if (popper.value) {
  6787. popper.value.destroy();
  6788. }
  6789. popper.value = undefined;
  6790. };
  6791. return () => [
  6792. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vue__WEBPACK_IMPORTED_MODULE_0__.Teleport, {
  6793. to: 'body',
  6794. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, {
  6795. onEnter: (el, done) => handleEnter(el, done),
  6796. onLeave: (el, done) => handleLeave(el, done),
  6797. }, () => visible.value &&
  6798. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  6799. class: 'popover fade bs-popover-auto',
  6800. ref: popoverRef,
  6801. role: 'tooltip',
  6802. }, [
  6803. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'popover-arrow', 'data-popper-arrow': '' }),
  6804. (props.title || slots.title) &&
  6805. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'popover-header' }, {
  6806. default: () => (slots.title && slots.title()) || props.title,
  6807. }),
  6808. (props.content || slots.content) &&
  6809. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'popover-body' }, {
  6810. default: () => (slots.content && slots.content()) || props.content,
  6811. }),
  6812. ]))),
  6813. slots.toggler &&
  6814. slots.toggler({
  6815. on: {
  6816. click: (event) => props.trigger.includes('click') && handleToggle(event),
  6817. blur: (event) => props.trigger.includes('focus') && handleToggle(event),
  6818. focus: (event) => props.trigger.includes('focus') && handleToggle(event),
  6819. mouseenter: (event) => props.trigger.includes('hover') && handleToggle(event),
  6820. mouseleave: (event) => props.trigger.includes('hover') && handleToggle(event),
  6821. },
  6822. }),
  6823. ];
  6824. },
  6825. });
  6826. const CPopoverPlugin = {
  6827. install: (app) => {
  6828. app.component(CPopover.name, CPopover);
  6829. },
  6830. };
  6831. const isOnMobile = (element) => Boolean(getComputedStyle(element).getPropertyValue('--cui-is-mobile'));
  6832. const isVisible = (element) => {
  6833. const rect = element.getBoundingClientRect();
  6834. return (rect.top >= 0 &&
  6835. rect.left >= 0 &&
  6836. rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
  6837. rect.right <= (window.innerWidth || document.documentElement.clientWidth));
  6838. };
  6839. const CSidebar = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6840. name: 'CSidebar',
  6841. props: {
  6842. /**
  6843. * Make sidebar narrow.
  6844. */
  6845. narrow: {
  6846. type: Boolean,
  6847. required: false,
  6848. },
  6849. /**
  6850. * Set sidebar to overlaid variant.
  6851. */
  6852. overlaid: {
  6853. type: Boolean,
  6854. required: false,
  6855. },
  6856. /**
  6857. * Place sidebar in non-static positions.
  6858. */
  6859. position: {
  6860. type: String,
  6861. default: undefined,
  6862. validator: (value) => {
  6863. return ['fixed'].includes(value);
  6864. },
  6865. },
  6866. /**
  6867. * Size the component small, large, or extra large.
  6868. */
  6869. size: {
  6870. type: String,
  6871. default: undefined,
  6872. validator: (value) => {
  6873. return ['sm', 'lg', 'xl'].includes(value);
  6874. },
  6875. },
  6876. /**
  6877. * Expand narrowed sidebar on hover.
  6878. */
  6879. unfoldable: Boolean,
  6880. /**
  6881. * Toggle the visibility of sidebar component.
  6882. */
  6883. visible: Boolean,
  6884. },
  6885. emits: [
  6886. /**
  6887. * Callback fired when the component requests to be hidden.
  6888. */
  6889. 'hide',
  6890. /**
  6891. * Callback fired when the component requests to be shown.
  6892. */
  6893. 'show',
  6894. /**
  6895. * Event emitted after visibility of component changed.
  6896. */
  6897. 'visible-change',
  6898. ],
  6899. setup(props, { attrs, slots, emit }) {
  6900. const mobile = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  6901. const inViewport = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  6902. const sidebarRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  6903. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.visible);
  6904. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(inViewport, () => {
  6905. emit('visible-change', inViewport.value);
  6906. inViewport.value ? emit('show') : emit('hide');
  6907. });
  6908. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(() => props.visible, () => (visible.value = props.visible));
  6909. (0,vue__WEBPACK_IMPORTED_MODULE_0__.watch)(mobile, () => {
  6910. if (mobile.value && visible.value)
  6911. visible.value = false;
  6912. });
  6913. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => {
  6914. mobile.value = isOnMobile(sidebarRef.value);
  6915. inViewport.value = isVisible(sidebarRef.value);
  6916. window.addEventListener('resize', () => handleResize());
  6917. window.addEventListener('mouseup', handleClickOutside);
  6918. window.addEventListener('keyup', handleKeyup);
  6919. sidebarRef.value.addEventListener('mouseup', handleOnClick);
  6920. sidebarRef.value.addEventListener('transitionend', () => {
  6921. inViewport.value = isVisible(sidebarRef.value);
  6922. });
  6923. });
  6924. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount)(() => {
  6925. window.removeEventListener('resize', () => handleResize());
  6926. window.removeEventListener('mouseup', handleClickOutside);
  6927. window.removeEventListener('keyup', handleKeyup);
  6928. sidebarRef.value.removeEventListener('mouseup', handleOnClick);
  6929. sidebarRef.value.removeEventListener('transitionend', () => {
  6930. inViewport.value = isVisible(sidebarRef.value);
  6931. });
  6932. });
  6933. const handleHide = () => {
  6934. visible.value = false;
  6935. };
  6936. const handleResize = () => {
  6937. mobile.value = isOnMobile(sidebarRef.value);
  6938. inViewport.value = isVisible(sidebarRef.value);
  6939. };
  6940. const handleKeyup = (event) => {
  6941. if (mobile.value && !sidebarRef.value.contains(event.target)) {
  6942. handleHide();
  6943. }
  6944. };
  6945. const handleClickOutside = (event) => {
  6946. if (mobile.value && !sidebarRef.value.contains(event.target)) {
  6947. handleHide();
  6948. }
  6949. };
  6950. const handleOnClick = (event) => {
  6951. const target = event.target;
  6952. target &&
  6953. target.classList.contains('nav-link') &&
  6954. !target.classList.contains('nav-group-toggle') &&
  6955. mobile.value &&
  6956. handleHide();
  6957. };
  6958. return () => [
  6959. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  6960. class: [
  6961. 'sidebar',
  6962. {
  6963. 'sidebar-narrow': props.narrow,
  6964. 'sidebar-overlaid': props.overlaid,
  6965. [`sidebar-${props.position}`]: props.position,
  6966. [`sidebar-${props.size}`]: props.size,
  6967. 'sidebar-narrow-unfoldable': props.unfoldable,
  6968. show: visible.value === true && mobile.value,
  6969. hide: visible.value === false && !mobile.value,
  6970. },
  6971. attrs.class,
  6972. ],
  6973. ref: sidebarRef,
  6974. }, slots.default && slots.default()),
  6975. mobile.value &&
  6976. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CBackdrop, {
  6977. class: 'sidebar-backdrop d-none',
  6978. visible: props.visible,
  6979. onClick: () => {
  6980. visible.value = false;
  6981. },
  6982. }),
  6983. ];
  6984. },
  6985. });
  6986. const CSidebarBrand = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6987. name: 'CSidebarBrand',
  6988. setup(_, { slots }) {
  6989. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'sidebar-brand' }, slots.default && slots.default());
  6990. },
  6991. });
  6992. const CSidebarFooter = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6993. name: 'CSidebarFooter',
  6994. setup(_, { slots }) {
  6995. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'sidebar-footer' }, slots.default && slots.default());
  6996. },
  6997. });
  6998. const CSidebarHeader = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  6999. name: 'CSidebarHeader',
  7000. setup(_, { slots }) {
  7001. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'sidebar-header' }, slots.default && slots.default());
  7002. },
  7003. });
  7004. const CSidebarNav = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7005. name: 'CSidebarNav',
  7006. setup(_, { slots }) {
  7007. const visibleGroup = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  7008. const handleVisibleChange = (visible, index) => {
  7009. if (visible) {
  7010. visibleGroup.value = index;
  7011. }
  7012. else {
  7013. if (visibleGroup.value === index) {
  7014. visibleGroup.value = 0;
  7015. }
  7016. }
  7017. };
  7018. const isVisible = (index) => Boolean(visibleGroup.value === index);
  7019. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('ul', {
  7020. class: 'sidebar-nav',
  7021. }, slots.default &&
  7022. slots.default().map((vnode, index) => {
  7023. // @ts-expect-error name is defined in component
  7024. if (vnode.type.name === 'CNavGroup') {
  7025. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vnode, {
  7026. onVisibleChange: (visible) => handleVisibleChange(visible, index + 1),
  7027. ...(visibleGroup.value && { visible: isVisible(index + 1) }),
  7028. });
  7029. }
  7030. return vnode;
  7031. }));
  7032. },
  7033. });
  7034. const CSidebarToggler = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7035. name: 'CSidebarToggler',
  7036. setup(_, { slots }) {
  7037. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('button', { class: 'sidebar-toggler' }, slots.default && slots.default());
  7038. },
  7039. });
  7040. const CSidebarPlugin = {
  7041. install: (app) => {
  7042. app.component(CSidebar.name, CSidebar);
  7043. app.component(CSidebarBrand.name, CSidebarBrand);
  7044. app.component(CSidebarFooter.name, CSidebarFooter);
  7045. app.component(CSidebarHeader.name, CSidebarHeader);
  7046. app.component(CSidebarNav.name, CSidebarNav);
  7047. app.component(CSidebarToggler.name, CSidebarToggler);
  7048. },
  7049. };
  7050. const CSpinner = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7051. name: 'CSpinner',
  7052. props: {
  7053. /**
  7054. * Sets the color context of the component to one of CoreUI’s themed colors.
  7055. *
  7056. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  7057. */
  7058. color: {
  7059. type: String,
  7060. default: undefined,
  7061. required: false,
  7062. validator: (value) => {
  7063. return [
  7064. 'primary',
  7065. 'secondary',
  7066. 'success',
  7067. 'danger',
  7068. 'warning',
  7069. 'info',
  7070. 'dark',
  7071. 'light',
  7072. ].includes(value);
  7073. },
  7074. },
  7075. /**
  7076. * Component used for the root node. Either a string to use a HTML element or a component.
  7077. */
  7078. component: {
  7079. type: String,
  7080. default: 'div',
  7081. required: false,
  7082. },
  7083. /**
  7084. * Size the component small.
  7085. *
  7086. * @values 'sm'
  7087. */
  7088. size: {
  7089. type: String,
  7090. default: undefined,
  7091. required: false,
  7092. validator: (value) => {
  7093. return value === 'sm';
  7094. },
  7095. },
  7096. /**
  7097. * Set the button variant to an outlined button or a ghost button.
  7098. *
  7099. * @values 'border', 'grow'
  7100. */
  7101. variant: {
  7102. type: String,
  7103. default: 'border',
  7104. required: false,
  7105. validator: (value) => {
  7106. return ['border', 'grow'].includes(value);
  7107. },
  7108. },
  7109. /**
  7110. * Set visually hidden label for accessibility purposes.
  7111. */
  7112. visuallyHiddenLabel: {
  7113. type: String,
  7114. default: 'Loading...',
  7115. required: false,
  7116. },
  7117. },
  7118. setup(props) {
  7119. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  7120. class: [
  7121. `spinner-${props.variant}`,
  7122. `text-${props.color}`,
  7123. props.size && `spinner-${props.variant}-${props.size}`,
  7124. ],
  7125. role: 'status',
  7126. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('span', { class: ['visually-hidden'] }, props.visuallyHiddenLabel));
  7127. },
  7128. });
  7129. const CSpinnerPlugin = {
  7130. install: (app) => {
  7131. app.component(CSpinner.name, CSpinner);
  7132. },
  7133. };
  7134. const CTable = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7135. name: 'CTable',
  7136. props: {
  7137. /**
  7138. * Set the vertical aligment.
  7139. *
  7140. * @values 'bottom', 'middle', 'top'
  7141. */
  7142. align: {
  7143. type: String,
  7144. default: undefined,
  7145. required: false,
  7146. validator: (value) => {
  7147. return ['bottom', 'middle', 'top'].includes(value);
  7148. },
  7149. },
  7150. /**
  7151. * Sets the border color of the component to one of CoreUI’s themed colors.
  7152. *
  7153. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  7154. */
  7155. borderColor: Color,
  7156. /**
  7157. * Add borders on all sides of the table and cells.
  7158. */
  7159. bordered: {
  7160. type: Boolean,
  7161. required: false,
  7162. },
  7163. /**
  7164. * Remove borders on all sides of the table and cells.
  7165. */
  7166. borderless: {
  7167. type: Boolean,
  7168. required: false,
  7169. },
  7170. /**
  7171. * Put the `<caption>` on the top of the table.
  7172. *
  7173. * @values 'top'
  7174. */
  7175. caption: {
  7176. type: String,
  7177. default: undefined,
  7178. required: false,
  7179. validator: (value) => {
  7180. return value === 'top';
  7181. },
  7182. },
  7183. /**
  7184. * Sets the color context of the component to one of CoreUI’s themed colors.
  7185. *
  7186. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', string
  7187. */
  7188. color: Color,
  7189. /**
  7190. * Enable a hover state on table rows within a `<CTableBody>`.
  7191. */
  7192. hover: {
  7193. type: Boolean,
  7194. required: false,
  7195. },
  7196. /**
  7197. * Make any table responsive across all viewports or pick a maximum breakpoint with which to have a responsive table up to.
  7198. *
  7199. * @values boolean, 'sm', 'md', 'lg', 'xl', 'xxl'
  7200. */
  7201. responsive: {
  7202. type: [Boolean, String],
  7203. default: undefined,
  7204. required: false,
  7205. validator: (value) => {
  7206. if (typeof value == 'string') {
  7207. return ['sm', 'md', 'lg', 'xl', 'xxl'].includes(value);
  7208. }
  7209. if (typeof value == 'boolean') {
  7210. return true;
  7211. }
  7212. return false;
  7213. },
  7214. },
  7215. /**
  7216. * Make table more compact by cutting all cell `padding` in half.
  7217. */
  7218. small: {
  7219. type: Boolean,
  7220. required: false,
  7221. },
  7222. /**
  7223. * Add zebra-striping to any table row within the `<CTableBody>`.
  7224. */
  7225. striped: {
  7226. type: Boolean,
  7227. required: false,
  7228. },
  7229. },
  7230. setup(props, { slots, attrs }) {
  7231. const table = () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('table', {
  7232. class: [
  7233. 'table',
  7234. {
  7235. [`align-${props.align}`]: props.align,
  7236. [`caption-${props.caption}`]: props.caption,
  7237. [`border-${props.borderColor}`]: props.borderColor,
  7238. 'table-bordered': props.bordered,
  7239. 'table-borderless': props.borderless,
  7240. [`table-${props.color}`]: props.color,
  7241. 'table-hover': props.hover,
  7242. 'table-sm': props.small,
  7243. 'table-striped': props.striped,
  7244. },
  7245. attrs.class,
  7246. ],
  7247. }, slots.default && slots.default());
  7248. return () => [
  7249. props.responsive
  7250. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  7251. class: typeof props.responsive === 'boolean'
  7252. ? 'table-responsive'
  7253. : `table-responsive-${props.responsive}`,
  7254. }, table())
  7255. : table(),
  7256. ];
  7257. },
  7258. });
  7259. const CTableBody = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7260. name: 'CTableBody',
  7261. props: {
  7262. /**
  7263. * Sets the color context of the component to one of CoreUI’s themed colors.
  7264. *
  7265. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', string
  7266. */
  7267. color: Color,
  7268. },
  7269. setup(props, { slots }) {
  7270. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('tbody', {
  7271. class: [
  7272. {
  7273. [`table-${props.color}`]: props.color,
  7274. },
  7275. ],
  7276. }, slots.default && slots.default());
  7277. },
  7278. });
  7279. const CTableCaption = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7280. name: 'CTableCaption',
  7281. props: {},
  7282. setup(_, { slots }) {
  7283. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('caption', {}, slots.default && slots.default());
  7284. },
  7285. });
  7286. const CTableDataCell = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7287. name: 'CTableDataCell',
  7288. props: {
  7289. /**
  7290. * Highlight a table row or cell.
  7291. */
  7292. active: {
  7293. type: Boolean,
  7294. required: false,
  7295. },
  7296. /**
  7297. * Set the vertical aligment.
  7298. *
  7299. * @values 'bottom', 'middle', 'top'
  7300. */
  7301. align: {
  7302. type: String,
  7303. default: undefined,
  7304. required: false,
  7305. validator: (value) => {
  7306. return ['bottom', 'middle', 'top'].includes(value);
  7307. },
  7308. },
  7309. /**
  7310. * Sets the color context of the component to one of CoreUI’s themed colors.
  7311. *
  7312. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', string
  7313. */
  7314. color: Color,
  7315. },
  7316. setup(props, { slots }) {
  7317. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('td', {
  7318. class: [
  7319. {
  7320. [`align-${props.align}`]: props.align,
  7321. 'table-active': props.active,
  7322. [`table-${props.color}`]: props.color,
  7323. },
  7324. ],
  7325. }, slots.default && slots.default());
  7326. },
  7327. });
  7328. const CTableFoot = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7329. name: 'CTableFoot',
  7330. props: {
  7331. /**
  7332. * Sets the color context of the component to one of CoreUI’s themed colors.
  7333. *
  7334. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', string
  7335. */
  7336. color: Color,
  7337. },
  7338. setup(props, { slots }) {
  7339. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('tfoot', {
  7340. class: [
  7341. {
  7342. [`table-${props.color}`]: props.color,
  7343. },
  7344. ],
  7345. }, slots.default && slots.default());
  7346. },
  7347. });
  7348. const CTableHead = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7349. name: 'CTableHead',
  7350. props: {
  7351. /**
  7352. * Sets the color context of the component to one of CoreUI’s themed colors.
  7353. *
  7354. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', string
  7355. */
  7356. color: Color,
  7357. },
  7358. setup(props, { slots }) {
  7359. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('thead', {
  7360. class: [
  7361. {
  7362. [`table-${props.color}`]: props.color,
  7363. },
  7364. ],
  7365. }, slots.default && slots.default());
  7366. },
  7367. });
  7368. const CTableHeaderCell = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7369. name: 'CTableHeaderCell',
  7370. props: {
  7371. /**
  7372. * Sets the color context of the component to one of CoreUI’s themed colors.
  7373. *
  7374. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', string
  7375. */
  7376. color: Color,
  7377. },
  7378. setup(props, { slots }) {
  7379. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('th', {
  7380. class: [
  7381. {
  7382. [`table-${props.color}`]: props.color,
  7383. },
  7384. ],
  7385. }, slots.default && slots.default());
  7386. },
  7387. });
  7388. const CTableRow = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7389. name: 'CTableRow',
  7390. props: {
  7391. /**
  7392. * Highlight a table row or cell..
  7393. */
  7394. active: {
  7395. type: Boolean,
  7396. required: false,
  7397. },
  7398. /**
  7399. * Set the vertical aligment.
  7400. *
  7401. * @values 'bottom', 'middle', 'top'
  7402. */
  7403. align: {
  7404. type: String,
  7405. default: undefined,
  7406. required: false,
  7407. validator: (value) => {
  7408. return ['bottom', 'middle', 'top'].includes(value);
  7409. },
  7410. },
  7411. /**
  7412. * Sets the color context of the component to one of CoreUI’s themed colors.
  7413. *
  7414. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', string
  7415. */
  7416. color: Color,
  7417. },
  7418. setup(props, { slots }) {
  7419. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('tr', {
  7420. class: [
  7421. {
  7422. [`align-${props.align}`]: props.align,
  7423. 'table-active': props.active,
  7424. [`table-${props.color}`]: props.color,
  7425. },
  7426. ],
  7427. }, slots.default && slots.default());
  7428. },
  7429. });
  7430. const CTablePlugin = {
  7431. install: (app) => {
  7432. app.component(CTable.name, CTable);
  7433. app.component(CTableBody.name, CTableBody);
  7434. app.component(CTableCaption.name, CTableCaption);
  7435. app.component(CTableDataCell.name, CTableDataCell);
  7436. app.component(CTableFoot.name, CTableFoot);
  7437. app.component(CTableHead.name, CTableHead);
  7438. app.component(CTableHeaderCell.name, CTableHeaderCell);
  7439. app.component(CTableRow.name, CTableRow);
  7440. },
  7441. };
  7442. const CTabContent = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7443. name: 'CTabContent',
  7444. setup(_, { slots }) {
  7445. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'tab-content' }, slots.default && slots.default());
  7446. },
  7447. });
  7448. const CTabPane = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7449. name: 'CTabPane',
  7450. props: {
  7451. /**
  7452. * Toggle the visibility of component.
  7453. */
  7454. visible: {
  7455. type: Boolean,
  7456. default: false,
  7457. required: false,
  7458. },
  7459. },
  7460. emits: [
  7461. /**
  7462. * Callback fired when the component requests to be hidden.
  7463. */
  7464. 'hide',
  7465. /**
  7466. * Callback fired when the component requests to be shown.
  7467. */
  7468. 'show',
  7469. ],
  7470. setup(props, { slots, emit }) {
  7471. const tabPaneRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  7472. const firstRender = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(true);
  7473. const handleEnter = (el, done) => {
  7474. firstRender.value = false;
  7475. emit('show');
  7476. setTimeout(() => {
  7477. el.classList.add('show');
  7478. }, 1);
  7479. el.addEventListener('transitionend', () => {
  7480. done();
  7481. });
  7482. };
  7483. const handleLeave = (el, done) => {
  7484. firstRender.value = false;
  7485. emit('hide');
  7486. el.classList.remove('show');
  7487. el.addEventListener('transitionend', () => {
  7488. done();
  7489. });
  7490. };
  7491. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, {
  7492. onEnter: (el, done) => handleEnter(el, done),
  7493. onLeave: (el, done) => handleLeave(el, done),
  7494. }, () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.withDirectives)((0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  7495. class: [
  7496. 'tab-pane',
  7497. 'fade',
  7498. {
  7499. active: props.visible,
  7500. show: firstRender.value && props.visible,
  7501. },
  7502. ],
  7503. ref: tabPaneRef,
  7504. }, slots.default && slots.default()), [[vue__WEBPACK_IMPORTED_MODULE_0__.vShow, props.visible]]));
  7505. },
  7506. });
  7507. const CTabsPlugin = {
  7508. install: (app) => {
  7509. app.component(CTabContent.name, CTabContent);
  7510. app.component(CTabPane.name, CTabPane);
  7511. },
  7512. };
  7513. const CToast = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7514. name: 'CToast',
  7515. props: {
  7516. /**
  7517. * Auto hide the toast.
  7518. */
  7519. autohide: {
  7520. type: Boolean,
  7521. default: true,
  7522. required: false,
  7523. },
  7524. /**
  7525. * Sets the color context of the component to one of CoreUI’s themed colors.
  7526. *
  7527. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light', string
  7528. */
  7529. color: Color,
  7530. /**
  7531. * Delay hiding the toast (ms).
  7532. */
  7533. delay: {
  7534. type: Number,
  7535. default: 5000,
  7536. required: false,
  7537. },
  7538. /**
  7539. * Optionally add a close button to component and allow it to self dismiss.
  7540. */
  7541. dismissible: {
  7542. type: Boolean,
  7543. default: true,
  7544. required: false,
  7545. },
  7546. /**
  7547. * index of the component.
  7548. */
  7549. index: {
  7550. type: Number,
  7551. default: undefined,
  7552. required: false,
  7553. },
  7554. /**
  7555. * Title node for your component.
  7556. */
  7557. title: {
  7558. type: String,
  7559. default: undefined,
  7560. required: false,
  7561. },
  7562. /**
  7563. * Toggle the visibility of component.
  7564. */
  7565. visible: {
  7566. type: Boolean,
  7567. default: true,
  7568. required: false,
  7569. },
  7570. },
  7571. emits: [
  7572. /**
  7573. * Callback fired when the component requests to be closed.
  7574. */
  7575. 'close',
  7576. /**
  7577. * Callback fired when the component requests to be shown.
  7578. */
  7579. 'show',
  7580. ],
  7581. setup(props, { slots, emit }) {
  7582. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.visible);
  7583. let timeout = 0;
  7584. const updateVisible = (v) => {
  7585. visible.value = v;
  7586. };
  7587. (0,vue__WEBPACK_IMPORTED_MODULE_0__.provide)('updateVisible', updateVisible);
  7588. const handleEnter = (el, done) => {
  7589. el.addEventListener('transitionend', () => {
  7590. done();
  7591. });
  7592. setTimeout(() => {
  7593. el.classList.add('show');
  7594. }, 1);
  7595. if (props.index) {
  7596. emit('show', props.index);
  7597. }
  7598. else {
  7599. emit('show');
  7600. }
  7601. };
  7602. const handleBeforeLeave = (el) => {
  7603. el.classList.remove('show');
  7604. };
  7605. const handleLeave = (el, done) => {
  7606. el.addEventListener('transitionend', () => {
  7607. done();
  7608. });
  7609. el.classList.remove('show');
  7610. };
  7611. const handleAfterLeave = (el) => {
  7612. el.classList.add('hide');
  7613. if (props.index) {
  7614. emit('close', props.index);
  7615. }
  7616. else {
  7617. emit('close');
  7618. }
  7619. };
  7620. (0,vue__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => {
  7621. if (props.autohide) {
  7622. clearTimeout(timeout);
  7623. timeout = window.setTimeout(() => {
  7624. visible.value = false;
  7625. }, props.delay);
  7626. }
  7627. });
  7628. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, {
  7629. appear: true,
  7630. onEnter: (el, done) => handleEnter(el, done),
  7631. onBeforeLeave: (el) => handleBeforeLeave(el),
  7632. onLeave: (el, done) => handleLeave(el, done),
  7633. onAfterLeave: (el) => handleAfterLeave(el),
  7634. }, () => visible.value &&
  7635. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  7636. class: [
  7637. 'toast fade',
  7638. {
  7639. [`bg-${props.color}`]: props.color,
  7640. },
  7641. ],
  7642. 'aria-live': 'assertive',
  7643. 'aria-atomic': true,
  7644. role: 'alert',
  7645. ref: 'toastRef',
  7646. }, slots.default && slots.default()));
  7647. },
  7648. });
  7649. const CToastBody = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7650. name: 'CToastBody',
  7651. setup(_, { slots }) {
  7652. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'toast-body' }, slots.default && slots.default());
  7653. },
  7654. });
  7655. const CToastClose = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7656. name: 'CToastClose',
  7657. props: {
  7658. /**
  7659. * Component used for the root node. Either a string to use a HTML element or a component.
  7660. */
  7661. component: {
  7662. type: String,
  7663. default: undefined,
  7664. required: false,
  7665. },
  7666. ...CCloseButton.props,
  7667. },
  7668. emits: [
  7669. /**
  7670. * Event called before the dissmiss animation has started.
  7671. */
  7672. 'close',
  7673. ],
  7674. setup(props, { slots, emit }) {
  7675. // eslint-disable-next-line no-unused-vars
  7676. const updateVisible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.inject)('updateVisible');
  7677. const handleClose = () => {
  7678. emit('close');
  7679. updateVisible(false);
  7680. };
  7681. return () => props.component
  7682. ? (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(props.component, {
  7683. onClick: () => {
  7684. handleClose();
  7685. },
  7686. }, () => slots.default && slots.default())
  7687. : (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCloseButton, {
  7688. ...props,
  7689. onClick: () => {
  7690. handleClose();
  7691. },
  7692. });
  7693. },
  7694. });
  7695. const CToaster = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7696. name: 'CToaster',
  7697. props: {
  7698. /**
  7699. * Describes the placement of component.
  7700. *
  7701. * @values 'top-start', 'top', 'top-end', 'middle-start', 'middle', 'middle-end', 'bottom-start', 'bottom', 'bottom-end'
  7702. */
  7703. placement: {
  7704. type: String,
  7705. default: undefined,
  7706. require: false,
  7707. validator: (value) => {
  7708. return [
  7709. 'top-start',
  7710. 'top-center',
  7711. 'top-end',
  7712. 'middle-start',
  7713. 'middle-center',
  7714. 'middle-end',
  7715. 'bottom-start',
  7716. 'bottom-center',
  7717. 'bottom-end',
  7718. ].includes(value);
  7719. },
  7720. },
  7721. },
  7722. setup(props, { slots }) {
  7723. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  7724. class: [
  7725. 'toaster toast-container p-3',
  7726. {
  7727. 'position-fixed': props.placement,
  7728. 'top-0': props.placement && props.placement.includes('top'),
  7729. 'top-50 translate-middle-y': props.placement && props.placement.includes('middle'),
  7730. 'bottom-0': props.placement && props.placement.includes('bottom'),
  7731. 'start-0': props.placement && props.placement.includes('start'),
  7732. 'start-50 translate-middle-x': props.placement && props.placement.includes('center'),
  7733. 'end-0': props.placement && props.placement.includes('end'),
  7734. },
  7735. ],
  7736. }, slots.default && slots.default());
  7737. },
  7738. });
  7739. const CToastHeader = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7740. name: 'CToastHeader',
  7741. props: {
  7742. /**
  7743. * Automatically add a close button to the header.
  7744. */
  7745. closeButton: {
  7746. type: Boolean,
  7747. require: false,
  7748. },
  7749. },
  7750. emits: [
  7751. /**
  7752. * Event called after clicking the close button.
  7753. */
  7754. 'close',
  7755. ],
  7756. setup(props, { slots, emit }) {
  7757. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'toast-header' }, [
  7758. slots.default && slots.default(),
  7759. props.closeButton &&
  7760. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CToastClose, {
  7761. onClose: () => emit('close'),
  7762. }),
  7763. ]);
  7764. },
  7765. });
  7766. const CToastPlugin = {
  7767. install: (app) => {
  7768. app.component(CToast.name, CToast);
  7769. app.component(CToastBody.name, CToastBody);
  7770. app.component(CToastClose.name, CToastClose);
  7771. app.component(CToaster.name, CToaster);
  7772. app.component(CToastHeader.name, CToastHeader);
  7773. },
  7774. };
  7775. const CTooltip = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7776. name: 'CTooltip',
  7777. props: {
  7778. /**
  7779. * Content for your component. If you want to pass non-string value please use dedicated slot `<template #content>...</template>`
  7780. */
  7781. content: {
  7782. type: String,
  7783. default: undefined,
  7784. required: false,
  7785. },
  7786. /**
  7787. * Offset of the tooltip relative to its target.
  7788. */
  7789. offset: {
  7790. type: Array,
  7791. default: () => [0, 0],
  7792. required: false,
  7793. },
  7794. /**
  7795. * Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property.
  7796. */
  7797. placement: {
  7798. type: String,
  7799. default: 'top',
  7800. required: false,
  7801. validator: (value) => {
  7802. return ['top', 'right', 'bottom', 'left'].includes(value);
  7803. },
  7804. },
  7805. /**
  7806. * Sets which event handlers you’d like provided to your toggle prop. You can specify one trigger or an array of them.
  7807. *
  7808. * @values 'click', 'focus', 'hover'
  7809. */
  7810. trigger: {
  7811. type: [String, Array],
  7812. default: 'hover',
  7813. required: false,
  7814. validator: (value) => {
  7815. if (typeof value === 'string') {
  7816. return ['click', 'focus', 'hover'].includes(value);
  7817. }
  7818. if (Array.isArray(value)) {
  7819. return value.every((e) => ['click', 'focus', 'hover'].includes(e));
  7820. }
  7821. return false;
  7822. },
  7823. },
  7824. /**
  7825. * Toggle the visibility of tooltip component.
  7826. */
  7827. visible: Boolean,
  7828. },
  7829. emits: [
  7830. /**
  7831. * Callback fired when the component requests to be hidden.
  7832. */
  7833. 'hide',
  7834. /**
  7835. * Callback fired when the component requests to be shown.
  7836. */
  7837. 'show',
  7838. ],
  7839. setup(props, { slots, emit }) {
  7840. const togglerRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  7841. const tooltipRef = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  7842. const popper = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)();
  7843. const visible = (0,vue__WEBPACK_IMPORTED_MODULE_0__.ref)(props.visible);
  7844. const handleEnter = (el, done) => {
  7845. emit('show');
  7846. initPopper();
  7847. el.classList.add('show');
  7848. el.addEventListener('transitionend', () => {
  7849. done();
  7850. });
  7851. };
  7852. const handleLeave = (el, done) => {
  7853. emit('hide');
  7854. el.classList.remove('show');
  7855. el.addEventListener('transitionend', () => {
  7856. done();
  7857. destroyPopper();
  7858. });
  7859. };
  7860. const handleToggle = (event) => {
  7861. togglerRef.value = event.target;
  7862. visible.value = !visible.value;
  7863. };
  7864. const initPopper = () => {
  7865. if (togglerRef.value) {
  7866. popper.value = createPopper(togglerRef.value, tooltipRef.value, {
  7867. placement: props.placement,
  7868. modifiers: [
  7869. {
  7870. name: 'offset',
  7871. options: {
  7872. offset: props.offset,
  7873. },
  7874. },
  7875. ],
  7876. });
  7877. }
  7878. };
  7879. const destroyPopper = () => {
  7880. if (popper.value) {
  7881. popper.value.destroy();
  7882. }
  7883. popper.value = undefined;
  7884. };
  7885. return () => [
  7886. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vue__WEBPACK_IMPORTED_MODULE_0__.Teleport, {
  7887. to: 'body',
  7888. }, (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(vue__WEBPACK_IMPORTED_MODULE_0__.Transition, {
  7889. onEnter: (el, done) => handleEnter(el, done),
  7890. onLeave: (el, done) => handleLeave(el, done),
  7891. }, () => visible.value &&
  7892. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  7893. class: 'tooltip fade bs-tooltip-auto',
  7894. ref: tooltipRef,
  7895. role: 'tooltip',
  7896. }, [
  7897. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'tooltip-arrow', 'data-popper-arrow': '' }),
  7898. (props.content || slots.content) &&
  7899. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'tooltip-inner' }, {
  7900. default: () => (slots.content && slots.content()) || props.content,
  7901. }),
  7902. ]))),
  7903. slots.toggler &&
  7904. slots.toggler({
  7905. on: {
  7906. click: (event) => props.trigger.includes('click') && handleToggle(event),
  7907. blur: (event) => props.trigger.includes('focus') && handleToggle(event),
  7908. focus: (event) => props.trigger.includes('focus') && handleToggle(event),
  7909. mouseenter: (event) => props.trigger.includes('hover') && handleToggle(event),
  7910. mouseleave: (event) => props.trigger.includes('hover') && handleToggle(event),
  7911. },
  7912. }),
  7913. ];
  7914. },
  7915. });
  7916. const CTooltipPlugin = {
  7917. install: (app) => {
  7918. app.component(CTooltip.name, CTooltip);
  7919. },
  7920. };
  7921. const CWidgetStatsA = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7922. name: 'CWidgetStatsA',
  7923. props: {
  7924. color: {
  7925. type: String,
  7926. default: undefined,
  7927. require: false,
  7928. },
  7929. /**
  7930. * Title for your component. If you want to pass non-string value please use dedicated slot `<template #title>...</template>`
  7931. */
  7932. title: {
  7933. type: String,
  7934. default: undefined,
  7935. require: false,
  7936. },
  7937. /**
  7938. * Value for your component. If you want to pass non-string or non-number value please use dedicated slot `<template #value>...</template>`
  7939. */
  7940. value: {
  7941. type: [Number, String],
  7942. default: 0,
  7943. require: false,
  7944. },
  7945. },
  7946. /**
  7947. * Location for action component, ex. `<CDropdown>`.
  7948. *
  7949. * @slot action
  7950. */
  7951. /**
  7952. * Location for chart component.
  7953. *
  7954. * @slot chart
  7955. */
  7956. setup(props, { slots }) {
  7957. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCard, {
  7958. class: [
  7959. { [`bg-${props.color}`]: props.color, 'text-high-emphasis-inverse': props.color },
  7960. ],
  7961. }, () => [
  7962. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCardBody, {
  7963. class: 'pb-0 d-flex justify-content-between align-items-start',
  7964. }, () => [
  7965. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {}, [
  7966. (props.value || slots.value) &&
  7967. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'fs-4 fw-semibold' }, {
  7968. default: () => (slots.value && slots.value()) || props.value,
  7969. }),
  7970. (props.title || slots.title) &&
  7971. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {}, {
  7972. default: () => (slots.title && slots.title()) || props.title,
  7973. }),
  7974. ]),
  7975. /**
  7976. * @slot Location for action component, ex. `<CDropdown>`.
  7977. */
  7978. slots.action && slots.action(),
  7979. ]),
  7980. /**
  7981. * @slot Location for chart component.
  7982. */
  7983. slots.chart && slots.chart(),
  7984. slots.default && slots.default(),
  7985. ]);
  7986. },
  7987. });
  7988. const CWidgetStatsB = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  7989. name: 'CWidgetStatsB',
  7990. props: {
  7991. /**
  7992. * Sets the color context of the component to one of CoreUI’s themed colors
  7993. *
  7994. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  7995. */
  7996. color: Color,
  7997. /**
  7998. * Colors have been inverted from their default dark shade.
  7999. */
  8000. inverse: {
  8001. type: Boolean,
  8002. default: undefined,
  8003. require: false,
  8004. },
  8005. progress: I({
  8006. /**
  8007. * Sets the color context of the progress bar to one of CoreUI’s themed colors
  8008. *
  8009. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  8010. */
  8011. color: Color,
  8012. /**
  8013. * The percent to progress the ProgressBar (out of 100).
  8014. */
  8015. value: {
  8016. type: Number,
  8017. default: 0,
  8018. },
  8019. }),
  8020. /**
  8021. * Helper text for your component. If you want to pass non-string value please use dedicated slot `<template #text>...</template>`
  8022. */
  8023. text: {
  8024. type: String,
  8025. default: undefined,
  8026. require: false,
  8027. },
  8028. /**
  8029. * Title for your component. If you want to pass non-string value please use dedicated slot `<template #title>...</template>`
  8030. */
  8031. title: {
  8032. type: String,
  8033. default: undefined,
  8034. require: false,
  8035. },
  8036. /**
  8037. * Value for your component. If you want to pass non-string or non-number value please use dedicated slot `<template #value>...</template>`
  8038. */
  8039. value: {
  8040. type: [Number, String],
  8041. default: 0,
  8042. require: false,
  8043. },
  8044. },
  8045. setup(props, { slots }) {
  8046. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCard, {
  8047. class: [
  8048. {
  8049. 'text-high-emphasis-inverse': props.inverse,
  8050. },
  8051. ],
  8052. color: props.color,
  8053. }, () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCardBody, {
  8054. class: 'card-body',
  8055. }, () => [
  8056. (props.value || slots.value) &&
  8057. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  8058. class: 'fs-4 fw-semibold',
  8059. }, {
  8060. default: () => (slots.value && slots.value()) || props.value,
  8061. }),
  8062. (props.title || slots.title) &&
  8063. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {}, {
  8064. default: () => (slots.title && slots.title()) || props.title,
  8065. }),
  8066. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CProgress, {
  8067. class: 'my-2',
  8068. ...(props.progress && props.progress.color && { color: props.progress.color }),
  8069. height: 4,
  8070. ...(props.progress && props.progress.value && { value: props.progress.value }),
  8071. white: props.inverse,
  8072. }),
  8073. (props.text || slots.text) &&
  8074. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('small', {
  8075. class: [
  8076. props.inverse ? 'text-medium-emphasis-inverse' : 'text-medium-emphasis',
  8077. ],
  8078. }, {
  8079. default: () => (slots.text && slots.text()) || props.text,
  8080. }),
  8081. ]));
  8082. },
  8083. });
  8084. const CWidgetStatsC = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  8085. name: 'CWidgetStatsC',
  8086. props: {
  8087. /**
  8088. * Sets the color context of the component to one of CoreUI’s themed colors.
  8089. *
  8090. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  8091. */
  8092. color: Color,
  8093. /**
  8094. * Colors have been inverted from their default dark shade.
  8095. */
  8096. inverse: {
  8097. type: Boolean,
  8098. default: undefined,
  8099. require: false,
  8100. },
  8101. progress: I({
  8102. /**
  8103. * Sets the color context of the progress bar to one of CoreUI’s themed colors
  8104. *
  8105. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  8106. */
  8107. color: Color,
  8108. /**
  8109. * The percent to progress the ProgressBar (out of 100).
  8110. */
  8111. value: {
  8112. type: Number,
  8113. default: 0,
  8114. },
  8115. }),
  8116. /**
  8117. * Title for your component. If you want to pass non-string value please use dedicated slot `<template #title>...</template>`
  8118. */
  8119. title: {
  8120. type: String,
  8121. default: undefined,
  8122. require: false,
  8123. },
  8124. /**
  8125. * Value for your component. If you want to pass non-string or non-number value please use dedicated slot `<template #value>...</template>`
  8126. */
  8127. value: {
  8128. type: [Number, String],
  8129. default: 0,
  8130. require: false,
  8131. },
  8132. },
  8133. /**
  8134. * Location for icon component.
  8135. *
  8136. * @slot icon
  8137. */
  8138. setup(props, { slots }) {
  8139. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCard, {
  8140. class: [
  8141. {
  8142. ['text-white']: props.inverse,
  8143. },
  8144. ],
  8145. color: props.color,
  8146. }, () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCardBody, {
  8147. class: 'card-body',
  8148. }, () => [
  8149. slots.icon &&
  8150. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  8151. class: [
  8152. 'text-end mb-4',
  8153. props.inverse ? 'text-medium-emphasis-inverse' : 'text-medium-emphasis',
  8154. ],
  8155. }, slots.icon && slots.icon()),
  8156. (props.value || slots.value) &&
  8157. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  8158. class: 'fs-4 fw-semibold',
  8159. }, {
  8160. default: () => (slots.value && slots.value()) || props.value,
  8161. }),
  8162. (props.title || slots.title) &&
  8163. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  8164. class: [
  8165. 'text-uppercase fw-semibold small',
  8166. props.inverse ? 'text-medium-emphasis-inverse' : 'text-medium-emphasis',
  8167. ],
  8168. }, {
  8169. default: () => (slots.title && slots.title()) || props.title,
  8170. }),
  8171. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CProgress, {
  8172. class: 'my-2',
  8173. ...(props.progress && props.progress.color && { color: props.progress.color }),
  8174. height: 4,
  8175. ...(props.progress && props.progress.value && { value: props.progress.value }),
  8176. white: props.inverse,
  8177. }),
  8178. ]));
  8179. },
  8180. });
  8181. const CWidgetStatsD = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  8182. name: 'CWidgetStatsD',
  8183. props: {
  8184. /**
  8185. * Sets the color context of the component to one of CoreUI’s themed colors.
  8186. *
  8187. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  8188. */
  8189. color: Color,
  8190. /**
  8191. * Values and titles for your component.
  8192. */
  8193. values: {
  8194. type: Array,
  8195. default: () => [],
  8196. require: false,
  8197. },
  8198. },
  8199. /**
  8200. * Location for icon component, ex. `<CDropdown>`.
  8201. *
  8202. * @slot icon
  8203. */
  8204. /**
  8205. * Location for chart component.
  8206. *
  8207. * @slot chart
  8208. */
  8209. setup(props, { slots }) {
  8210. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCard, {}, {
  8211. default: () => [
  8212. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCardHeader, {
  8213. class: [
  8214. 'position-relative d-flex justify-content-center align-items-center',
  8215. {
  8216. [`bg-${props.color}`]: props.color,
  8217. },
  8218. ],
  8219. }, () => [slots.icon && slots.icon(), slots.chart && slots.chart()]),
  8220. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCardBody, {
  8221. class: 'row text-center',
  8222. }, {
  8223. default: () => props.values &&
  8224. props.values.map((value, index) => [
  8225. index % 2 !== 0 && (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', { class: 'vr' }),
  8226. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCol, {}, {
  8227. default: () => [
  8228. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCol, { class: 'fs-5 fw-semibold' }, () => value.value),
  8229. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCol, { class: 'text-uppercase text-medium-emphasis small' }, () => value.title),
  8230. ],
  8231. }),
  8232. ]),
  8233. }),
  8234. ],
  8235. });
  8236. },
  8237. });
  8238. const CWidgetStatsE = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  8239. name: 'CWidgetStatsE',
  8240. props: {
  8241. /**
  8242. * Title for your component. If you want to pass non-string value please use dedicated slot `<template #title>...</template>`
  8243. */
  8244. title: {
  8245. type: String,
  8246. default: undefined,
  8247. require: false,
  8248. },
  8249. /**
  8250. * Value for your component. If you want to pass non-string or non-number value please use dedicated slot `<template #value>...</template>`
  8251. */
  8252. value: {
  8253. type: [Number, String],
  8254. default: 0,
  8255. require: false,
  8256. },
  8257. },
  8258. /**
  8259. * Location for chart component.
  8260. *
  8261. * @slot chart
  8262. */
  8263. setup(props, { slots }) {
  8264. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCard, {}, () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCardBody, {
  8265. class: 'text-center',
  8266. }, () => [
  8267. (props.title || slots.title) &&
  8268. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  8269. class: 'text-muted small text-uppercase font-weight-bold',
  8270. }, {
  8271. default: () => (slots.title && slots.title()) || props.title,
  8272. }),
  8273. (props.value || slots.value) &&
  8274. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  8275. class: 'h2 py-3',
  8276. }, {
  8277. default: () => (slots.value && slots.value()) || props.value,
  8278. }),
  8279. slots.chart && slots.chart(),
  8280. slots.default && slots.default(),
  8281. ]));
  8282. },
  8283. });
  8284. const CWidgetStatsF = (0,vue__WEBPACK_IMPORTED_MODULE_0__.defineComponent)({
  8285. name: 'CWidgetStatsF',
  8286. props: {
  8287. /**
  8288. * Sets the color context of the component to one of CoreUI’s themed colors.
  8289. *
  8290. * @values 'primary', 'secondary', 'success', 'danger', 'warning', 'info', 'dark', 'light'
  8291. */
  8292. color: Color,
  8293. /**
  8294. * Set padding of your component.
  8295. */
  8296. padding: {
  8297. type: Boolean,
  8298. default: true,
  8299. },
  8300. /**
  8301. * Title for your component. If you want to pass non-string value please use dedicated slot `<template #title>...</template>`
  8302. */
  8303. title: {
  8304. type: String,
  8305. default: undefined,
  8306. require: false,
  8307. },
  8308. /**
  8309. * Helper text for your component. If you want to pass non-string value please use dedicated slot `<template #text>...</template>`
  8310. */
  8311. text: {
  8312. type: String,
  8313. default: undefined,
  8314. require: false,
  8315. },
  8316. /**
  8317. * Value for your component. If you want to pass non-string or non-number value please use dedicated slot `<template #value>...</template>`
  8318. */
  8319. value: {
  8320. type: [Number, String],
  8321. default: 0,
  8322. require: false,
  8323. },
  8324. },
  8325. /**
  8326. * Location for icon component.
  8327. *
  8328. * @slot icon
  8329. */
  8330. setup(props, { slots }) {
  8331. return () => (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCard, {}, {
  8332. default: () => [
  8333. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCardBody, {
  8334. class: ['d-flex align-items-center', props.padding === false && 'p-0'],
  8335. }, () => [
  8336. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  8337. class: [
  8338. 'me-3',
  8339. 'text-white',
  8340. `bg-${props.color}`,
  8341. props.padding ? 'p-3' : 'p-4',
  8342. ],
  8343. }, (slots.default && slots.default()) || (slots.icon && slots.icon())),
  8344. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {}, [
  8345. (props.value || slots.value) &&
  8346. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  8347. class: [`fs-6 fw-semibold text-${props.color}`],
  8348. }, {
  8349. default: () => (slots.value && slots.value()) || props.value,
  8350. }),
  8351. (props.title || slots.title) &&
  8352. (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)('div', {
  8353. class: 'text-medium-emphasis text-uppercase fw-semibold small',
  8354. }, {
  8355. default: () => (slots.title && slots.title()) || props.title,
  8356. }),
  8357. ]),
  8358. ]),
  8359. slots.footer && (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(CCardFooter, {}, () => slots.footer && slots.footer()),
  8360. ],
  8361. });
  8362. },
  8363. });
  8364. const CWidgetsStatsPlugin = {
  8365. install: (app) => {
  8366. app.component(CWidgetStatsA.name, CWidgetStatsA);
  8367. app.component(CWidgetStatsB.name, CWidgetStatsB);
  8368. app.component(CWidgetStatsC.name, CWidgetStatsC);
  8369. app.component(CWidgetStatsD.name, CWidgetStatsD);
  8370. app.component(CWidgetStatsE.name, CWidgetStatsE);
  8371. app.component(CWidgetStatsF.name, CWidgetStatsF);
  8372. },
  8373. };
  8374. var Components = /*#__PURE__*/Object.freeze({
  8375. __proto__: null,
  8376. CAccordionPlugin: CAccordionPlugin,
  8377. CAccordion: CAccordion,
  8378. CAccordionBody: CAccordionBody,
  8379. CAccordionButton: CAccordionButton,
  8380. CAccordionCollapse: CAccordionCollapse,
  8381. CAccordionHeader: CAccordionHeader,
  8382. CAccordionItem: CAccordionItem,
  8383. CAlertPlugin: CAlertPlugin,
  8384. CAlert: CAlert,
  8385. CAlertHeading: CAlertHeading,
  8386. CAlertLink: CAlertLink,
  8387. CAvatarPlugin: CAvatarPlugin,
  8388. CAvatar: CAvatar,
  8389. CBackdropPlugin: CBackdropPlugin,
  8390. CBackdrop: CBackdrop,
  8391. CBadge: CBadge,
  8392. CBadgePlugin: CBadgePlugin,
  8393. CBreadcrumbPlugin: CBreadcrumbPlugin,
  8394. CBreadcrumb: CBreadcrumb,
  8395. CBreadcrumbItem: CBreadcrumbItem,
  8396. CButtonPlugin: CButtonPlugin,
  8397. CButton: CButton,
  8398. CButtonGroupPlugin: CButtonGroupPlugin,
  8399. CButtonToolbar: CButtonToolbar,
  8400. CButtonGroup: CButtonGroup,
  8401. CCalloutPlugin: CCalloutPlugin,
  8402. CCallout: CCallout,
  8403. CCardPlugin: CCardPlugin,
  8404. CCard: CCard,
  8405. CCardBody: CCardBody,
  8406. CCardFooter: CCardFooter,
  8407. CCardGroup: CCardGroup,
  8408. CCardHeader: CCardHeader,
  8409. CCardImage: CCardImage,
  8410. CCardImageOverlay: CCardImageOverlay,
  8411. CCardLink: CCardLink,
  8412. CCardSubtitle: CCardSubtitle,
  8413. CCardText: CCardText,
  8414. CCardTitle: CCardTitle,
  8415. CCarouselPlugin: CCarouselPlugin,
  8416. CCarousel: CCarousel,
  8417. CCarouselCaption: CCarouselCaption,
  8418. CCarouselItem: CCarouselItem,
  8419. CCloseButtonPlugin: CCloseButtonPlugin,
  8420. CCloseButton: CCloseButton,
  8421. CCollapsePlugin: CCollapsePlugin,
  8422. CCollapse: CCollapse,
  8423. CDropdownPlugin: CDropdownPlugin,
  8424. CDropdown: CDropdown,
  8425. CDropdownItem: CDropdownItem,
  8426. CDropdownHeader: CDropdownHeader,
  8427. CDropdownDivider: CDropdownDivider,
  8428. CDropdownMenu: CDropdownMenu,
  8429. CDropdownToggle: CDropdownToggle,
  8430. CFooterPlugin: CFooterPlugin,
  8431. CFooter: CFooter,
  8432. CFormPlugin: CFormPlugin,
  8433. CForm: CForm,
  8434. CFormCheck: CFormCheck,
  8435. CFormFeedback: CFormFeedback,
  8436. CFormFloating: CFormFloating,
  8437. CFormInput: CFormInput,
  8438. CFormLabel: CFormLabel,
  8439. CFormRange: CFormRange,
  8440. CFormSelect: CFormSelect,
  8441. CFormSwitch: CFormSwitch,
  8442. CFormText: CFormText,
  8443. CFormTextarea: CFormTextarea,
  8444. CInputGroup: CInputGroup,
  8445. CInputGroupText: CInputGroupText,
  8446. CGridPlugin: CGridPlugin,
  8447. CCol: CCol,
  8448. CContainer: CContainer,
  8449. CRow: CRow,
  8450. CHeaderPlugin: CHeaderPlugin,
  8451. CHeader: CHeader,
  8452. CHeaderBrand: CHeaderBrand,
  8453. CHeaderDivider: CHeaderDivider,
  8454. CHeaderNav: CHeaderNav,
  8455. CHeaderText: CHeaderText,
  8456. CHeaderToggler: CHeaderToggler,
  8457. CImagePlugin: CImagePlugin,
  8458. CImage: CImage,
  8459. CCLinkPlugin: CCLinkPlugin,
  8460. CLink: CLink,
  8461. CListGroupPlugin: CListGroupPlugin,
  8462. CListGroup: CListGroup,
  8463. CListGroupItem: CListGroupItem,
  8464. CModalPlugin: CModalPlugin,
  8465. CModal: CModal,
  8466. CModalBody: CModalBody,
  8467. CModalFooter: CModalFooter,
  8468. CModalHeader: CModalHeader,
  8469. CModalTitle: CModalTitle,
  8470. CNavPlugin: CNavPlugin,
  8471. CNav: CNav,
  8472. CNavGroup: CNavGroup,
  8473. CNavGroupItems: CNavGroupItems,
  8474. CNavItem: CNavItem,
  8475. CNavLink: CNavLink,
  8476. CNavTitle: CNavTitle,
  8477. CNavbarPlugin: CNavbarPlugin,
  8478. CNavbar: CNavbar,
  8479. CNavbarBrand: CNavbarBrand,
  8480. CNavbarNav: CNavbarNav,
  8481. CNavbarText: CNavbarText,
  8482. CNavbarToggler: CNavbarToggler,
  8483. COffcanvasPlugin: COffcanvasPlugin,
  8484. COffcanvas: COffcanvas,
  8485. COffcanvasBody: COffcanvasBody,
  8486. COffcanvasHeader: COffcanvasHeader,
  8487. COffcanvasTitle: COffcanvasTitle,
  8488. CPaginationPlugin: CPaginationPlugin,
  8489. CPagination: CPagination,
  8490. CPaginationItem: CPaginationItem,
  8491. CPlaceholderPlugin: CPlaceholderPlugin,
  8492. CPlaceholder: CPlaceholder,
  8493. CProgressPlugin: CProgressPlugin,
  8494. CProgress: CProgress,
  8495. CProgressBar: CProgressBar,
  8496. CPopoverPlugin: CPopoverPlugin,
  8497. CPopover: CPopover,
  8498. CSidebarPlugin: CSidebarPlugin,
  8499. CSidebar: CSidebar,
  8500. CSidebarBrand: CSidebarBrand,
  8501. CSidebarFooter: CSidebarFooter,
  8502. CSidebarHeader: CSidebarHeader,
  8503. CSidebarNav: CSidebarNav,
  8504. CSidebarToggler: CSidebarToggler,
  8505. CSpinnerPlugin: CSpinnerPlugin,
  8506. CSpinner: CSpinner,
  8507. CTablePlugin: CTablePlugin,
  8508. CTable: CTable,
  8509. CTableBody: CTableBody,
  8510. CTableCaption: CTableCaption,
  8511. CTableDataCell: CTableDataCell,
  8512. CTableFoot: CTableFoot,
  8513. CTableHead: CTableHead,
  8514. CTableHeaderCell: CTableHeaderCell,
  8515. CTableRow: CTableRow,
  8516. CTabsPlugin: CTabsPlugin,
  8517. CTabContent: CTabContent,
  8518. CTabPane: CTabPane,
  8519. CToastPlugin: CToastPlugin,
  8520. CToast: CToast,
  8521. CToastBody: CToastBody,
  8522. CToastClose: CToastClose,
  8523. CToaster: CToaster,
  8524. CToastHeader: CToastHeader,
  8525. CTooltipPlugin: CTooltipPlugin,
  8526. CTooltip: CTooltip,
  8527. CWidgetsStatsPlugin: CWidgetsStatsPlugin,
  8528. CWidgetStatsA: CWidgetStatsA,
  8529. CWidgetStatsB: CWidgetStatsB,
  8530. CWidgetStatsC: CWidgetStatsC,
  8531. CWidgetStatsD: CWidgetStatsD,
  8532. CWidgetStatsE: CWidgetStatsE,
  8533. CWidgetStatsF: CWidgetStatsF
  8534. });
  8535. const BREAKPOINTS = [
  8536. 'xxl',
  8537. 'xl',
  8538. 'lg',
  8539. 'md',
  8540. 'sm',
  8541. 'xs',
  8542. ];
  8543. var vcplaceholder = {
  8544. name: 'c-placeholder',
  8545. mounted(el, binding) {
  8546. const value = binding.value;
  8547. el.classList.add(value.animation ? `placeholder-${value.animation}` : 'placeholder');
  8548. BREAKPOINTS.forEach((bp) => {
  8549. const breakpoint = value[bp];
  8550. const infix = bp === 'xs' ? '' : `-${bp}`;
  8551. if (typeof breakpoint === 'number') {
  8552. el.classList.add(`col${infix}-${breakpoint}`);
  8553. }
  8554. if (typeof breakpoint === 'boolean') {
  8555. el.classList.add(`col${infix}`);
  8556. }
  8557. });
  8558. },
  8559. };
  8560. const getUID$1 = (prefix) => {
  8561. do {
  8562. prefix += Math.floor(Math.random() * 1000000);
  8563. } while (document.getElementById(prefix));
  8564. return prefix;
  8565. };
  8566. const createPopoverElement = (id, header, content) => {
  8567. const popover = document.createElement('div');
  8568. popover.id = id;
  8569. popover.classList.add('popover', 'bs-popover-auto', 'fade');
  8570. popover.setAttribute('role', 'popover');
  8571. popover.innerHTML = `<div class="popover-arrow" data-popper-arrow></div>
  8572. <div class="popover-header">${header}</div>
  8573. <div class="popover-body" id="">${content}</div>`;
  8574. return popover;
  8575. };
  8576. const addPopoverElement = (popover, el, popperOptions) => {
  8577. document.body.appendChild(popover);
  8578. createPopper(el, popover, popperOptions);
  8579. setTimeout(() => {
  8580. popover.classList.add('show');
  8581. }, 1);
  8582. };
  8583. const removePopoverElement = (popover) => {
  8584. popover.classList.remove('show');
  8585. setTimeout(() => {
  8586. document.body.removeChild(popover);
  8587. }, 300);
  8588. };
  8589. const togglePopoverElement = (popover, el, popperOptions) => {
  8590. const popperElement = document.getElementById(popover.id);
  8591. if (popperElement && popperElement.classList.contains('show')) {
  8592. removePopoverElement(popover);
  8593. return;
  8594. }
  8595. addPopoverElement(popover, el, popperOptions);
  8596. };
  8597. var vcpopover = {
  8598. name: 'c-popover',
  8599. uid: '',
  8600. mounted(el, binding) {
  8601. const value = binding.value;
  8602. const content = typeof value === 'string' ? value : value.content ? value.content : '';
  8603. const header = value.header ? value.header : '';
  8604. const trigger = value.trigger ? value.trigger : 'click';
  8605. // Popper Config
  8606. const offset = value.offset ? value.offset : [0, 8];
  8607. const placement = value.placement ? value.placement : 'top';
  8608. const popperOptions = {
  8609. placement: placement,
  8610. modifiers: [
  8611. {
  8612. name: 'offset',
  8613. options: {
  8614. offset: offset,
  8615. },
  8616. },
  8617. ],
  8618. };
  8619. const popoverUID = getUID$1('popover');
  8620. binding.arg = popoverUID;
  8621. const popover = createPopoverElement(popoverUID, header, content);
  8622. trigger.includes('click') &&
  8623. el.addEventListener('click', () => {
  8624. togglePopoverElement(popover, el, popperOptions);
  8625. });
  8626. if (trigger.includes('focus')) {
  8627. el.addEventListener('focus', () => {
  8628. addPopoverElement(popover, el, popperOptions);
  8629. });
  8630. el.addEventListener('blur', () => {
  8631. removePopoverElement(popover);
  8632. });
  8633. }
  8634. if (trigger.includes('hover')) {
  8635. el.addEventListener('mouseenter', () => {
  8636. addPopoverElement(popover, el, popperOptions);
  8637. });
  8638. el.addEventListener('mouseleave', () => {
  8639. removePopoverElement(popover);
  8640. });
  8641. }
  8642. },
  8643. unmounted(binding) {
  8644. const popover = binding.arg && document.getElementById(binding.arg);
  8645. popover && popover.remove();
  8646. },
  8647. };
  8648. const getUID = (prefix) => {
  8649. do {
  8650. prefix += Math.floor(Math.random() * 1000000);
  8651. } while (document.getElementById(prefix));
  8652. return prefix;
  8653. };
  8654. const createTooltipElement = (id, content) => {
  8655. const tooltip = document.createElement('div');
  8656. tooltip.id = id;
  8657. tooltip.classList.add('tooltip', 'bs-tooltip-auto', 'fade');
  8658. tooltip.setAttribute('role', 'tooltip');
  8659. tooltip.innerHTML = `<div class="tooltip-arrow" data-popper-arrow></div>
  8660. <div class="tooltip-inner" id="">${content}</div>`;
  8661. return tooltip;
  8662. };
  8663. const addTooltipElement = (tooltip, el, popperOptions) => {
  8664. document.body.appendChild(tooltip);
  8665. createPopper(el, tooltip, popperOptions);
  8666. setTimeout(() => {
  8667. tooltip.classList.add('show');
  8668. }, 1);
  8669. };
  8670. const removeTooltipElement = (tooltip) => {
  8671. tooltip.classList.remove('show');
  8672. setTimeout(() => {
  8673. document.body.removeChild(tooltip);
  8674. }, 300);
  8675. };
  8676. const toggleTooltipElement = (tooltip, el, popperOptions) => {
  8677. const popperElement = document.getElementById(tooltip.id);
  8678. if (popperElement && popperElement.classList.contains('show')) {
  8679. removeTooltipElement(tooltip);
  8680. return;
  8681. }
  8682. addTooltipElement(tooltip, el, popperOptions);
  8683. };
  8684. var vctooltip = {
  8685. mounted(el, binding) {
  8686. const value = binding.value;
  8687. const content = typeof value === 'string' ? value : value.content ? value.content : '';
  8688. const trigger = value.trigger ? value.trigger : 'hover';
  8689. // Popper Config
  8690. const offset = value.offset ? value.offset : [0, 0];
  8691. const placement = value.placement ? value.placement : 'top';
  8692. const popperOptions = {
  8693. placement: placement,
  8694. modifiers: [
  8695. {
  8696. name: 'offset',
  8697. options: {
  8698. offset: offset,
  8699. },
  8700. },
  8701. ],
  8702. };
  8703. const tooltipUID = getUID('tooltip');
  8704. binding.arg = tooltipUID;
  8705. const tooltip = createTooltipElement(tooltipUID, content);
  8706. trigger.includes('click') &&
  8707. el.addEventListener('click', () => {
  8708. toggleTooltipElement(tooltip, el, popperOptions);
  8709. });
  8710. if (trigger.includes('focus')) {
  8711. el.addEventListener('focus', () => {
  8712. addTooltipElement(tooltip, el, popperOptions);
  8713. });
  8714. el.addEventListener('blur', () => {
  8715. removeTooltipElement(tooltip);
  8716. });
  8717. }
  8718. if (trigger.includes('hover')) {
  8719. el.addEventListener('mouseenter', () => {
  8720. addTooltipElement(tooltip, el, popperOptions);
  8721. });
  8722. el.addEventListener('mouseleave', () => {
  8723. removeTooltipElement(tooltip);
  8724. });
  8725. }
  8726. },
  8727. beforeUnmount(binding) {
  8728. const tooltip = binding.arg && document.getElementById(binding.arg);
  8729. tooltip && tooltip.remove();
  8730. },
  8731. };
  8732. const removeKeysFromObject = (object, keys) => {
  8733. return Object.entries(object).reduce((obj, [key, value]) => {
  8734. if (!keys.includes(key) && !keys.includes(value.name)) {
  8735. obj[key] = value;
  8736. }
  8737. return obj;
  8738. }, {});
  8739. };
  8740. const CoreuiVue = {
  8741. install: (app, options) => {
  8742. let pluginComponents = Components;
  8743. // let pluginDirectives = Directives
  8744. const toRemove = options && options.remove ? options.remove : null;
  8745. if (toRemove && Array.isArray(toRemove)) {
  8746. pluginComponents = removeKeysFromObject(Components, toRemove);
  8747. // pluginDirectives = removeKeysFromObject(Directives, toRemove)
  8748. }
  8749. for (const plugin in pluginComponents) {
  8750. app.component(plugin, Components[plugin]);
  8751. }
  8752. // for (const directive in pluginDirectives) {
  8753. // app.directive(directive, Directives[directive])
  8754. // }
  8755. app.directive('c-placeholder', vcplaceholder);
  8756. app.directive('c-popover', vcpopover);
  8757. app.directive('c-tooltip', vctooltip);
  8758. },
  8759. };
  8760. //# sourceMappingURL=index.es.js.map
  8761. /***/ }),
  8762. /***/ "./node_modules/@inertiajs/inertia-vue3/dist/index.js":
  8763. /*!************************************************************!*\
  8764. !*** ./node_modules/@inertiajs/inertia-vue3/dist/index.js ***!
  8765. \************************************************************/
  8766. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  8767. function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var r=e(__webpack_require__(/*! lodash.isequal */ "./node_modules/lodash.isequal/index.js")),t=__webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js"),n=e(__webpack_require__(/*! lodash.clonedeep */ "./node_modules/lodash.clonedeep/index.js")),o=__webpack_require__(/*! @inertiajs/inertia */ "./node_modules/@inertiajs/inertia/dist/index.js");function i(){return(i=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}).apply(this,arguments)}function a(){var e=[].slice.call(arguments),a="string"==typeof e[0]?e[0]:null,u=("string"==typeof e[0]?e[1]:e[0])||{},s=a?o.Inertia.restore(a):null,c=n(u),l=null,p=null,f=function(e){return e},d=t.reactive(i({},s?s.data:u,{isDirty:!1,errors:s?s.errors:{},hasErrors:!1,processing:!1,progress:null,wasSuccessful:!1,recentlySuccessful:!1,data:function(){var e=this;return Object.keys(u).reduce(function(r,t){return r[t]=e[t],r},{})},transform:function(e){return f=e,this},defaults:function(e,r){var t;return c=void 0===e?this.data():Object.assign({},n(c),r?((t={})[e]=r,t):e),this},reset:function(){var e=[].slice.call(arguments),r=n(c);return Object.assign(this,0===e.length?r:Object.keys(r).filter(function(r){return e.includes(r)}).reduce(function(e,t){return e[t]=r[t],e},{})),this},setError:function(e,r){var t;return Object.assign(this.errors,r?((t={})[e]=r,t):e),this.hasErrors=Object.keys(this.errors).length>0,this},clearErrors:function(){var e=this,r=[].slice.call(arguments);return this.errors=Object.keys(this.errors).reduce(function(t,n){var o;return i({},t,r.length>0&&!r.includes(n)?((o={})[n]=e.errors[n],o):{})},{}),this.hasErrors=Object.keys(this.errors).length>0,this},submit:function(e,r,t){var a=this,u=this;void 0===t&&(t={});var s=f(this.data()),d=i({},t,{onCancelToken:function(e){if(l=e,t.onCancelToken)return t.onCancelToken(e)},onBefore:function(e){if(u.wasSuccessful=!1,u.recentlySuccessful=!1,clearTimeout(p),t.onBefore)return t.onBefore(e)},onStart:function(e){if(u.processing=!0,t.onStart)return t.onStart(e)},onProgress:function(e){if(u.progress=e,t.onProgress)return t.onProgress(e)},onSuccess:function(e){try{var r=function(e){return c=n(a.data()),a.isDirty=!1,e};return a.processing=!1,a.progress=null,a.clearErrors(),a.wasSuccessful=!0,a.recentlySuccessful=!0,p=setTimeout(function(){return a.recentlySuccessful=!1},2e3),Promise.resolve(t.onSuccess?Promise.resolve(t.onSuccess(e)).then(r):r(null))}catch(e){return Promise.reject(e)}},onError:function(e){if(u.processing=!1,u.progress=null,u.clearErrors().setError(e),t.onError)return t.onError(e)},onCancel:function(){if(u.processing=!1,u.progress=null,t.onCancel)return t.onCancel()},onFinish:function(){if(u.processing=!1,u.progress=null,l=null,t.onFinish)return t.onFinish()}});"delete"===e?o.Inertia.delete(r,i({},d,{data:s})):o.Inertia[e](r,s,d)},get:function(e,r){this.submit("get",e,r)},post:function(e,r){this.submit("post",e,r)},put:function(e,r){this.submit("put",e,r)},patch:function(e,r){this.submit("patch",e,r)},delete:function(e,r){this.submit("delete",e,r)},cancel:function(){l&&l.cancel()},__rememberable:null===a,__remember:function(){return{data:this.data(),errors:this.errors}},__restore:function(e){Object.assign(this,e.data),this.setError(e.errors)}}));return t.watch(d,function(e){d.isDirty=!r(d.data(),c),a&&o.Inertia.remember(n(e.__remember()),a)},{immediate:!0,deep:!0}),d}var u={created:function(){var e=this;if(this.$options.remember){Array.isArray(this.$options.remember)&&(this.$options.remember={data:this.$options.remember}),"string"==typeof this.$options.remember&&(this.$options.remember={data:[this.$options.remember]}),"string"==typeof this.$options.remember.data&&(this.$options.remember={data:[this.$options.remember.data]});var r=this.$options.remember.key instanceof Function?this.$options.remember.key.call(this):this.$options.remember.key,t=o.Inertia.restore(r),a=this.$options.remember.data.filter(function(r){return!(null!==e[r]&&"object"==typeof e[r]&&!1===e[r].__rememberable)}),u=function(r){return null!==e[r]&&"object"==typeof e[r]&&"function"==typeof e[r].__remember&&"function"==typeof e[r].__restore};a.forEach(function(s){void 0!==e[s]&&void 0!==t&&void 0!==t[s]&&(u(s)?e[s].__restore(t[s]):e[s]=t[s]),e.$watch(s,function(){o.Inertia.remember(a.reduce(function(r,t){var o;return i({},r,((o={})[t]=n(u(t)?e[t].__remember():e[t]),o))},{}),r)},{immediate:!0,deep:!0})})}}},s=t.ref(null),c=t.ref({}),l=t.ref(null),p=null,f={name:"Inertia",props:{initialPage:{type:Object,required:!0},initialComponent:{type:Object,required:!1},resolveComponent:{type:Function,required:!1},titleCallback:{type:Function,required:!1,default:function(e){return e}},onHeadUpdate:{type:Function,required:!1,default:function(){return function(){}}}},setup:function(e){var r=e.initialPage,n=e.initialComponent,a=e.resolveComponent,u=e.titleCallback,f=e.onHeadUpdate;s.value=n?t.markRaw(n):null,c.value=r,l.value=null;var d="undefined"==typeof window;return p=o.createHeadManager(d,u,f),d||o.Inertia.init({initialPage:r,resolveComponent:a,swapComponent:function(e){try{return s.value=t.markRaw(e.component),c.value=e.page,l.value=e.preserveState?l.value:Date.now(),Promise.resolve()}catch(e){return Promise.reject(e)}}}),function(){if(s.value){s.value.inheritAttrs=!!s.value.inheritAttrs;var e=t.h(s.value,i({},c.value.props,{key:l.value}));return s.value.layout?"function"==typeof s.value.layout?s.value.layout(t.h,e):(Array.isArray(s.value.layout)?s.value.layout:[s.value.layout]).concat(e).reverse().reduce(function(e,r){return r.inheritAttrs=!!r.inheritAttrs,t.h(r,i({},c.value.props),function(){return e})}):e}}}},d={install:function(e){o.Inertia.form=a,Object.defineProperty(e.config.globalProperties,"$inertia",{get:function(){return o.Inertia}}),Object.defineProperty(e.config.globalProperties,"$page",{get:function(){return c.value}}),Object.defineProperty(e.config.globalProperties,"$headManager",{get:function(){return p}}),e.mixin(u)}},h={props:{title:{type:String,required:!1}},data:function(){return{provider:this.$headManager.createProvider()}},beforeUnmount:function(){this.provider.disconnect()},methods:{isUnaryTag:function(e){return["area","base","br","col","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"].indexOf(e.type)>-1},renderTagStart:function(e){e.props=e.props||{},e.props.inertia=void 0!==e.props["head-key"]?e.props["head-key"]:"";var r=Object.keys(e.props).reduce(function(r,t){var n=e.props[t];return["key","head-key"].includes(t)?r:""===n?r+" "+t:r+" "+t+'="'+n+'"'},"");return"<"+e.type+r+">"},renderTagChildren:function(e){var r=this;return"string"==typeof e.children?e.children:e.children.reduce(function(e,t){return e+r.renderTag(t)},"")},renderTag:function(e){if("Symbol(Text)"===e.type.toString())return e.children;if("Symbol()"===e.type.toString())return"";if("Symbol(Comment)"===e.type.toString())return"";var r=this.renderTagStart(e);return e.children&&(r+=this.renderTagChildren(e)),this.isUnaryTag(e)||(r+="</"+e.type+">"),r},addTitleElement:function(e){return this.title&&!e.find(function(e){return e.startsWith("<title")})&&e.push("<title inertia>"+this.title+"</title>"),e},renderNodes:function(e){var r=this;return this.addTitleElement(e.flatMap(function(e){return"Symbol(Fragment)"===e.type.toString()?e.children:e}).map(function(e){return r.renderTag(e)}).filter(function(e){return e}))}},render:function(){this.provider.update(this.renderNodes(this.$slots.default?this.$slots.default():[]))}},m={name:"InertiaLink",props:{as:{type:String,default:"a"},data:{type:Object,default:function(){return{}}},href:{type:String},method:{type:String,default:"get"},replace:{type:Boolean,default:!1},preserveScroll:{type:Boolean,default:!1},preserveState:{type:Boolean,default:null},only:{type:Array,default:function(){return[]}},headers:{type:Object,default:function(){return{}}},queryStringArrayFormat:{type:String,default:"brackets"}},setup:function(e,r){var n=r.slots,a=r.attrs;return function(e){var r=e.as.toLowerCase(),u=e.method.toLowerCase(),s=o.mergeDataIntoQueryString(u,e.href||"",e.data,e.queryStringArrayFormat),c=s[0],l=s[1];return"a"===r&&"get"!==u&&console.warn('Creating POST/PUT/PATCH/DELETE <a> links is discouraged as it causes "Open Link in New Tab/Window" accessibility issues.\n\nPlease specify a more appropriate element using the "as" attribute. For example:\n\n<Link href="'+c+'" method="'+u+'" as="button">...</Link>'),t.h(e.as,i({},a,"a"===r?{href:c}:{},{onClick:function(r){var t;o.shouldIntercept(r)&&(r.preventDefault(),o.Inertia.visit(c,{data:l,method:u,replace:e.replace,preserveScroll:e.preserveScroll,preserveState:null!=(t=e.preserveState)?t:"get"!==u,only:e.only,headers:e.headers,onCancelToken:a.onCancelToken||function(){return{}},onBefore:a.onBefore||function(){return{}},onStart:a.onStart||function(){return{}},onProgress:a.onProgress||function(){return{}},onFinish:a.onFinish||function(){return{}},onCancel:a.onCancel||function(){return{}},onSuccess:a.onSuccess||function(){return{}},onError:a.onError||function(){return{}}}))}}),n)}}};exports.App=f,exports.Head=h,exports.InertiaApp=f,exports.InertiaHead=h,exports.InertiaLink=m,exports.Link=m,exports.app=f,exports.createInertiaApp=function(e){try{var r,n,o,i,a,u,s;n=void 0===(r=e.id)?"app":r,o=e.resolve,i=e.setup,a=e.title,u=e.page,s=e.render;var c="undefined"==typeof window,l=c?null:document.getElementById(n),p=u||JSON.parse(l.dataset.page),h=function(e){return Promise.resolve(o(e)).then(function(e){return e.default||e})},m=[];return Promise.resolve(h(p.component).then(function(e){return i({el:l,app:f,App:f,props:{initialPage:p,initialComponent:e,resolveComponent:h,titleCallback:a,onHeadUpdate:c?function(e){return m=e}:null},plugin:d})})).then(function(e){return function(){if(c)return Promise.resolve(s(t.createSSRApp({render:function(){return t.h("div",{id:n,"data-page":JSON.stringify(p),innerHTML:s(e)})}}))).then(function(e){return{head:m,body:e}})}()})}catch(e){return Promise.reject(e)}},exports.link=m,exports.plugin=d,exports.useForm=a,exports.usePage=function(){return{props:t.computed(function(){return c.value.props}),url:t.computed(function(){return c.value.url}),component:t.computed(function(){return c.value.component}),version:t.computed(function(){return c.value.version})}},exports.useRemember=function(e,r){if("object"==typeof e&&null!==e&&!1===e.__rememberable)return e;var i=o.Inertia.restore(r),a=t.isReactive(e)?t.reactive:t.ref,u="function"==typeof e.__remember&&"function"==typeof e.__restore,s=void 0===i?e:a(u?e.__restore(i):i);return t.watch(s,function(t){o.Inertia.remember(n(u?e.__remember():t),r)},{immediate:!0,deep:!0}),s};
  8768. //# sourceMappingURL=index.js.map
  8769. /***/ }),
  8770. /***/ "./node_modules/@inertiajs/inertia/dist/index.js":
  8771. /*!*******************************************************!*\
  8772. !*** ./node_modules/@inertiajs/inertia/dist/index.js ***!
  8773. \*******************************************************/
  8774. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  8775. function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(__webpack_require__(/*! axios */ "./node_modules/@inertiajs/inertia/node_modules/axios/index.js")),n=__webpack_require__(/*! qs */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/index.js"),i=e(__webpack_require__(/*! deepmerge */ "./node_modules/deepmerge/dist/cjs.js"));function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e}).apply(this,arguments)}var o,s={modal:null,listener:null,show:function(e){var t=this;"object"==typeof e&&(e="All Inertia requests must receive a valid Inertia response, however a plain JSON response was received.<hr>"+JSON.stringify(e));var n=document.createElement("html");n.innerHTML=e,n.querySelectorAll("a").forEach(function(e){return e.setAttribute("target","_top")}),this.modal=document.createElement("div"),this.modal.style.position="fixed",this.modal.style.width="100vw",this.modal.style.height="100vh",this.modal.style.padding="50px",this.modal.style.boxSizing="border-box",this.modal.style.backgroundColor="rgba(0, 0, 0, .6)",this.modal.style.zIndex=2e5,this.modal.addEventListener("click",function(){return t.hide()});var i=document.createElement("iframe");if(i.style.backgroundColor="white",i.style.borderRadius="5px",i.style.width="100%",i.style.height="100%",this.modal.appendChild(i),document.body.prepend(this.modal),document.body.style.overflow="hidden",!i.contentWindow)throw new Error("iframe not yet ready.");i.contentWindow.document.open(),i.contentWindow.document.write(n.outerHTML),i.contentWindow.document.close(),this.listener=this.hideOnEscape.bind(this),document.addEventListener("keydown",this.listener)},hide:function(){this.modal.outerHTML="",this.modal=null,document.body.style.overflow="visible",document.removeEventListener("keydown",this.listener)},hideOnEscape:function(e){27===e.keyCode&&this.hide()}};function a(e,t){var n;return function(){var i=arguments,r=this;clearTimeout(n),n=setTimeout(function(){return e.apply(r,[].slice.call(i))},t)}}function c(e,t,n){for(var i in void 0===t&&(t=new FormData),void 0===n&&(n=null),e=e||{})Object.prototype.hasOwnProperty.call(e,i)&&d(t,l(n,i),e[i]);return t}function l(e,t){return e?e+"["+t+"]":t}function d(e,t,n){return Array.isArray(n)?Array.from(n.keys()).forEach(function(i){return d(e,l(t,i.toString()),n[i])}):n instanceof Date?e.append(t,n.toISOString()):n instanceof File?e.append(t,n,n.name):n instanceof Blob?e.append(t,n):"boolean"==typeof n?e.append(t,n?"1":"0"):"string"==typeof n?e.append(t,n):"number"==typeof n?e.append(t,""+n):null==n?e.append(t,""):void c(n,e,t)}function u(e){return new URL(e.toString(),window.location.toString())}function h(e,t,r,o){void 0===o&&(o="brackets");var s=/^https?:\/\//.test(t.toString()),a=s||t.toString().startsWith("/"),c=!a&&!t.toString().startsWith("#")&&!t.toString().startsWith("?"),l=t.toString().includes("?")||e===exports.Method.GET&&Object.keys(r).length,d=t.toString().includes("#"),u=new URL(t.toString(),"http://localhost");return e===exports.Method.GET&&Object.keys(r).length&&(u.search=n.stringify(i(n.parse(u.search,{ignoreQueryPrefix:!0}),r),{encodeValuesOnly:!0,arrayFormat:o}),r={}),[[s?u.protocol+"//"+u.host:"",a?u.pathname:"",c?u.pathname.substring(1):"",l?u.search:"",d?u.hash:""].join(""),r]}function p(e){return(e=new URL(e.href)).hash="",e}function f(e,t){return document.dispatchEvent(new CustomEvent("inertia:"+e,t))}(o=exports.Method||(exports.Method={})).GET="get",o.POST="post",o.PUT="put",o.PATCH="patch",o.DELETE="delete";var v=function(e){return f("finish",{detail:{visit:e}})},m=function(e){return f("navigate",{detail:{page:e}})},g="undefined"==typeof window,w=function(){function e(){this.visitId=null}var n=e.prototype;return n.init=function(e){var t=e.resolveComponent,n=e.swapComponent;this.page=e.initialPage,this.resolveComponent=t,this.swapComponent=n,this.isBackForwardVisit()?this.handleBackForwardVisit(this.page):this.isLocationVisit()?this.handleLocationVisit(this.page):this.handleInitialPageVisit(this.page),this.setupEventListeners()},n.handleInitialPageVisit=function(e){this.page.url+=window.location.hash,this.setPage(e,{preserveState:!0}).then(function(){return m(e)})},n.setupEventListeners=function(){window.addEventListener("popstate",this.handlePopstateEvent.bind(this)),document.addEventListener("scroll",a(this.handleScrollEvent.bind(this),100),!0)},n.scrollRegions=function(){return document.querySelectorAll("[scroll-region]")},n.handleScrollEvent=function(e){"function"==typeof e.target.hasAttribute&&e.target.hasAttribute("scroll-region")&&this.saveScrollPositions()},n.saveScrollPositions=function(){this.replaceState(r({},this.page,{scrollRegions:Array.from(this.scrollRegions()).map(function(e){return{top:e.scrollTop,left:e.scrollLeft}})}))},n.resetScrollPositions=function(){var e;document.documentElement.scrollTop=0,document.documentElement.scrollLeft=0,this.scrollRegions().forEach(function(e){e.scrollTop=0,e.scrollLeft=0}),this.saveScrollPositions(),window.location.hash&&(null==(e=document.getElementById(window.location.hash.slice(1)))||e.scrollIntoView())},n.restoreScrollPositions=function(){var e=this;this.page.scrollRegions&&this.scrollRegions().forEach(function(t,n){var i=e.page.scrollRegions[n];i&&(t.scrollTop=i.top,t.scrollLeft=i.left)})},n.isBackForwardVisit=function(){return window.history.state&&window.performance&&window.performance.getEntriesByType("navigation").length>0&&"back_forward"===window.performance.getEntriesByType("navigation")[0].type},n.handleBackForwardVisit=function(e){var t=this;window.history.state.version=e.version,this.setPage(window.history.state,{preserveScroll:!0,preserveState:!0}).then(function(){t.restoreScrollPositions(),m(e)})},n.locationVisit=function(e,t){try{window.sessionStorage.setItem("inertiaLocationVisit",JSON.stringify({preserveScroll:t})),window.location.href=e.href,p(window.location).href===p(e).href&&window.location.reload()}catch(e){return!1}},n.isLocationVisit=function(){try{return null!==window.sessionStorage.getItem("inertiaLocationVisit")}catch(e){return!1}},n.handleLocationVisit=function(e){var t,n,i,r,o=this,s=JSON.parse(window.sessionStorage.getItem("inertiaLocationVisit")||"");window.sessionStorage.removeItem("inertiaLocationVisit"),e.url+=window.location.hash,e.rememberedState=null!=(t=null==(n=window.history.state)?void 0:n.rememberedState)?t:{},e.scrollRegions=null!=(i=null==(r=window.history.state)?void 0:r.scrollRegions)?i:[],this.setPage(e,{preserveScroll:s.preserveScroll,preserveState:!0}).then(function(){s.preserveScroll&&o.restoreScrollPositions(),m(e)})},n.isLocationVisitResponse=function(e){return e&&409===e.status&&e.headers["x-inertia-location"]},n.isInertiaResponse=function(e){return null==e?void 0:e.headers["x-inertia"]},n.createVisitId=function(){return this.visitId={},this.visitId},n.cancelVisit=function(e,t){var n=t.cancelled,i=void 0!==n&&n,r=t.interrupted,o=void 0!==r&&r;!e||e.completed||e.cancelled||e.interrupted||(e.cancelToken.cancel(),e.onCancel(),e.completed=!1,e.cancelled=i,e.interrupted=o,v(e),e.onFinish(e))},n.finishVisit=function(e){e.cancelled||e.interrupted||(e.completed=!0,e.cancelled=!1,e.interrupted=!1,v(e),e.onFinish(e))},n.resolvePreserveOption=function(e,t){return"function"==typeof e?e(t):"errors"===e?Object.keys(t.props.errors||{}).length>0:e},n.visit=function(e,n){var i=this,o=void 0===n?{}:n,a=o.method,l=void 0===a?exports.Method.GET:a,d=o.data,v=void 0===d?{}:d,m=o.replace,g=void 0!==m&&m,w=o.preserveScroll,y=void 0!==w&&w,S=o.preserveState,b=void 0!==S&&S,E=o.only,P=void 0===E?[]:E,I=o.headers,x=void 0===I?{}:I,V=o.errorBag,T=void 0===V?"":V,L=o.forceFormData,O=void 0!==L&&L,k=o.onCancelToken,C=void 0===k?function(){}:k,M=o.onBefore,A=void 0===M?function(){}:M,F=o.onStart,R=void 0===F?function(){}:F,j=o.onProgress,D=void 0===j?function(){}:j,B=o.onFinish,q=void 0===B?function(){}:B,N=o.onCancel,H=void 0===N?function(){}:N,W=o.onSuccess,G=void 0===W?function(){}:W,U=o.onError,X=void 0===U?function(){}:U,J=o.queryStringArrayFormat,K=void 0===J?"brackets":J,_="string"==typeof e?u(e):e;if(!function e(t){return t instanceof File||t instanceof Blob||t instanceof FileList&&t.length>0||t instanceof FormData&&Array.from(t.values()).some(function(t){return e(t)})||"object"==typeof t&&null!==t&&Object.values(t).some(function(t){return e(t)})}(v)&&!O||v instanceof FormData||(v=c(v)),!(v instanceof FormData)){var z=h(l,_,v,K),Q=z[1];_=u(z[0]),v=Q}var Y={url:_,method:l,data:v,replace:g,preserveScroll:y,preserveState:b,only:P,headers:x,errorBag:T,forceFormData:O,queryStringArrayFormat:K,cancelled:!1,completed:!1,interrupted:!1};if(!1!==A(Y)&&function(e){return f("before",{cancelable:!0,detail:{visit:e}})}(Y)){this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();var Z=this.createVisitId();this.activeVisit=r({},Y,{onCancelToken:C,onBefore:A,onStart:R,onProgress:D,onFinish:q,onCancel:H,onSuccess:G,onError:X,queryStringArrayFormat:K,cancelToken:t.CancelToken.source()}),C({cancel:function(){i.activeVisit&&i.cancelVisit(i.activeVisit,{cancelled:!0})}}),function(e){f("start",{detail:{visit:e}})}(Y),R(Y),t({method:l,url:p(_).href,data:l===exports.Method.GET?{}:v,params:l===exports.Method.GET?v:{},cancelToken:this.activeVisit.cancelToken.token,headers:r({},x,{Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},P.length?{"X-Inertia-Partial-Component":this.page.component,"X-Inertia-Partial-Data":P.join(",")}:{},T&&T.length?{"X-Inertia-Error-Bag":T}:{},this.page.version?{"X-Inertia-Version":this.page.version}:{}),onUploadProgress:function(e){v instanceof FormData&&(e.percentage=Math.round(e.loaded/e.total*100),function(e){f("progress",{detail:{progress:e}})}(e),D(e))}}).then(function(e){var t;if(!i.isInertiaResponse(e))return Promise.reject({response:e});var n=e.data;P.length&&n.component===i.page.component&&(n.props=r({},i.page.props,n.props)),y=i.resolvePreserveOption(y,n),(b=i.resolvePreserveOption(b,n))&&null!=(t=window.history.state)&&t.rememberedState&&n.component===i.page.component&&(n.rememberedState=window.history.state.rememberedState);var o=_,s=u(n.url);return o.hash&&!s.hash&&p(o).href===s.href&&(s.hash=o.hash,n.url=s.href),i.setPage(n,{visitId:Z,replace:g,preserveScroll:y,preserveState:b})}).then(function(){var e=i.page.props.errors||{};if(Object.keys(e).length>0){var t=T?e[T]?e[T]:{}:e;return function(e){f("error",{detail:{errors:e}})}(t),X(t)}return f("success",{detail:{page:i.page}}),G(i.page)}).catch(function(e){if(i.isInertiaResponse(e.response))return i.setPage(e.response.data,{visitId:Z});if(i.isLocationVisitResponse(e.response)){var t=u(e.response.headers["x-inertia-location"]),n=_;n.hash&&!t.hash&&p(n).href===t.href&&(t.hash=n.hash),i.locationVisit(t,!0===y)}else{if(!e.response)return Promise.reject(e);f("invalid",{cancelable:!0,detail:{response:e.response}})&&s.show(e.response.data)}}).then(function(){i.activeVisit&&i.finishVisit(i.activeVisit)}).catch(function(e){if(!t.isCancel(e)){var n=f("exception",{cancelable:!0,detail:{exception:e}});if(i.activeVisit&&i.finishVisit(i.activeVisit),n)return Promise.reject(e)}})}},n.setPage=function(e,t){var n=this,i=void 0===t?{}:t,r=i.visitId,o=void 0===r?this.createVisitId():r,s=i.replace,a=void 0!==s&&s,c=i.preserveScroll,l=void 0!==c&&c,d=i.preserveState,h=void 0!==d&&d;return Promise.resolve(this.resolveComponent(e.component)).then(function(t){o===n.visitId&&(e.scrollRegions=e.scrollRegions||[],e.rememberedState=e.rememberedState||{},(a=a||u(e.url).href===window.location.href)?n.replaceState(e):n.pushState(e),n.swapComponent({component:t,page:e,preserveState:h}).then(function(){l||n.resetScrollPositions(),a||m(e)}))})},n.pushState=function(e){this.page=e,window.history.pushState(e,"",e.url)},n.replaceState=function(e){this.page=e,window.history.replaceState(e,"",e.url)},n.handlePopstateEvent=function(e){var t=this;if(null!==e.state){var n=e.state,i=this.createVisitId();Promise.resolve(this.resolveComponent(n.component)).then(function(e){i===t.visitId&&(t.page=n,t.swapComponent({component:e,page:n,preserveState:!1}).then(function(){t.restoreScrollPositions(),m(n)}))})}else{var o=u(this.page.url);o.hash=window.location.hash,this.replaceState(r({},this.page,{url:o.href})),this.resetScrollPositions()}},n.get=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({},n,{method:exports.Method.GET,data:t}))},n.reload=function(e){return void 0===e&&(e={}),this.visit(window.location.href,r({},e,{preserveScroll:!0,preserveState:!0}))},n.replace=function(e,t){var n;return void 0===t&&(t={}),console.warn("Inertia.replace() has been deprecated and will be removed in a future release. Please use Inertia."+(null!=(n=t.method)?n:"get")+"() instead."),this.visit(e,r({preserveState:!0},t,{replace:!0}))},n.post=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({preserveState:!0},n,{method:exports.Method.POST,data:t}))},n.put=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({preserveState:!0},n,{method:exports.Method.PUT,data:t}))},n.patch=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({preserveState:!0},n,{method:exports.Method.PATCH,data:t}))},n.delete=function(e,t){return void 0===t&&(t={}),this.visit(e,r({preserveState:!0},t,{method:exports.Method.DELETE}))},n.remember=function(e,t){var n,i;void 0===t&&(t="default"),g||this.replaceState(r({},this.page,{rememberedState:r({},null==(n=this.page)?void 0:n.rememberedState,(i={},i[t]=e,i))}))},n.restore=function(e){var t,n;if(void 0===e&&(e="default"),!g)return null==(t=window.history.state)||null==(n=t.rememberedState)?void 0:n[e]},n.on=function(e,t){var n=function(e){var n=t(e);e.cancelable&&!e.defaultPrevented&&!1===n&&e.preventDefault()};return document.addEventListener("inertia:"+e,n),function(){return document.removeEventListener("inertia:"+e,n)}},e}(),y={buildDOMElement:function(e){var t=document.createElement("template");t.innerHTML=e;var n=t.content.firstChild;if(!e.startsWith("<script "))return n;var i=document.createElement("script");return i.innerHTML=n.innerHTML,n.getAttributeNames().forEach(function(e){i.setAttribute(e,n.getAttribute(e)||"")}),i},isInertiaManagedElement:function(e){return e.nodeType===Node.ELEMENT_NODE&&null!==e.getAttribute("inertia")},findMatchingElementIndex:function(e,t){var n=e.getAttribute("inertia");return null!==n?t.findIndex(function(e){return e.getAttribute("inertia")===n}):-1},update:a(function(e){var t=this,n=e.map(function(e){return t.buildDOMElement(e)});Array.from(document.head.childNodes).filter(function(e){return t.isInertiaManagedElement(e)}).forEach(function(e){var i=t.findMatchingElementIndex(e,n);if(-1!==i){var r,o=n.splice(i,1)[0];o&&!e.isEqualNode(o)&&(null==e||null==(r=e.parentNode)||r.replaceChild(o,e))}else{var s;null==e||null==(s=e.parentNode)||s.removeChild(e)}}),n.forEach(function(e){return document.head.appendChild(e)})},1)},S=new w;exports.Inertia=S,exports.createHeadManager=function(e,t,n){var i={},r=0;function o(){var e=Object.values(i).reduce(function(e,t){return e.concat(t)},[]).reduce(function(e,n){if(-1===n.indexOf("<"))return e;if(0===n.indexOf("<title ")){var i=n.match(/(<title [^>]+>)(.*?)(<\/title>)/);return e.title=i?""+i[1]+t(i[2])+i[3]:n,e}var r=n.match(/ inertia="[^"]+"/);return r?e[r[0]]=n:e[Object.keys(e).length]=n,e},{});return Object.values(e)}function s(){e?n(o()):y.update(o())}return{createProvider:function(){var e=function(){var e=r+=1;return i[e]=[],e.toString()}();return{update:function(t){return function(e,t){void 0===t&&(t=[]),null!==e&&Object.keys(i).indexOf(e)>-1&&(i[e]=t),s()}(e,t)},disconnect:function(){return function(e){null!==e&&-1!==Object.keys(i).indexOf(e)&&(delete i[e],s())}(e)}}}}},exports.hrefToUrl=u,exports.mergeDataIntoQueryString=h,exports.shouldIntercept=function(e){var t="a"===e.currentTarget.tagName.toLowerCase();return!(e.target&&null!=e&&e.target.isContentEditable||e.defaultPrevented||t&&e.which>1||t&&e.altKey||t&&e.ctrlKey||t&&e.metaKey||t&&e.shiftKey)},exports.urlWithoutHash=p;
  8776. //# sourceMappingURL=index.js.map
  8777. /***/ }),
  8778. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/index.js":
  8779. /*!*********************************************************************!*\
  8780. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/index.js ***!
  8781. \*********************************************************************/
  8782. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8783. module.exports = __webpack_require__(/*! ./lib/axios */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/axios.js");
  8784. /***/ }),
  8785. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/adapters/xhr.js":
  8786. /*!********************************************************************************!*\
  8787. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/adapters/xhr.js ***!
  8788. \********************************************************************************/
  8789. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8790. "use strict";
  8791. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  8792. var settle = __webpack_require__(/*! ./../core/settle */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/settle.js");
  8793. var cookies = __webpack_require__(/*! ./../helpers/cookies */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/cookies.js");
  8794. var buildURL = __webpack_require__(/*! ./../helpers/buildURL */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/buildURL.js");
  8795. var buildFullPath = __webpack_require__(/*! ../core/buildFullPath */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/buildFullPath.js");
  8796. var parseHeaders = __webpack_require__(/*! ./../helpers/parseHeaders */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/parseHeaders.js");
  8797. var isURLSameOrigin = __webpack_require__(/*! ./../helpers/isURLSameOrigin */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isURLSameOrigin.js");
  8798. var createError = __webpack_require__(/*! ../core/createError */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/createError.js");
  8799. module.exports = function xhrAdapter(config) {
  8800. return new Promise(function dispatchXhrRequest(resolve, reject) {
  8801. var requestData = config.data;
  8802. var requestHeaders = config.headers;
  8803. var responseType = config.responseType;
  8804. if (utils.isFormData(requestData)) {
  8805. delete requestHeaders['Content-Type']; // Let the browser set it
  8806. }
  8807. var request = new XMLHttpRequest();
  8808. // HTTP basic authentication
  8809. if (config.auth) {
  8810. var username = config.auth.username || '';
  8811. var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
  8812. requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
  8813. }
  8814. var fullPath = buildFullPath(config.baseURL, config.url);
  8815. request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
  8816. // Set the request timeout in MS
  8817. request.timeout = config.timeout;
  8818. function onloadend() {
  8819. if (!request) {
  8820. return;
  8821. }
  8822. // Prepare the response
  8823. var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
  8824. var responseData = !responseType || responseType === 'text' || responseType === 'json' ?
  8825. request.responseText : request.response;
  8826. var response = {
  8827. data: responseData,
  8828. status: request.status,
  8829. statusText: request.statusText,
  8830. headers: responseHeaders,
  8831. config: config,
  8832. request: request
  8833. };
  8834. settle(resolve, reject, response);
  8835. // Clean up request
  8836. request = null;
  8837. }
  8838. if ('onloadend' in request) {
  8839. // Use onloadend if available
  8840. request.onloadend = onloadend;
  8841. } else {
  8842. // Listen for ready state to emulate onloadend
  8843. request.onreadystatechange = function handleLoad() {
  8844. if (!request || request.readyState !== 4) {
  8845. return;
  8846. }
  8847. // The request errored out and we didn't get a response, this will be
  8848. // handled by onerror instead
  8849. // With one exception: request that using file: protocol, most browsers
  8850. // will return status as 0 even though it's a successful request
  8851. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
  8852. return;
  8853. }
  8854. // readystate handler is calling before onerror or ontimeout handlers,
  8855. // so we should call onloadend on the next 'tick'
  8856. setTimeout(onloadend);
  8857. };
  8858. }
  8859. // Handle browser request cancellation (as opposed to a manual cancellation)
  8860. request.onabort = function handleAbort() {
  8861. if (!request) {
  8862. return;
  8863. }
  8864. reject(createError('Request aborted', config, 'ECONNABORTED', request));
  8865. // Clean up request
  8866. request = null;
  8867. };
  8868. // Handle low level network errors
  8869. request.onerror = function handleError() {
  8870. // Real errors are hidden from us by the browser
  8871. // onerror should only fire if it's a network error
  8872. reject(createError('Network Error', config, null, request));
  8873. // Clean up request
  8874. request = null;
  8875. };
  8876. // Handle timeout
  8877. request.ontimeout = function handleTimeout() {
  8878. var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
  8879. if (config.timeoutErrorMessage) {
  8880. timeoutErrorMessage = config.timeoutErrorMessage;
  8881. }
  8882. reject(createError(
  8883. timeoutErrorMessage,
  8884. config,
  8885. config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
  8886. request));
  8887. // Clean up request
  8888. request = null;
  8889. };
  8890. // Add xsrf header
  8891. // This is only done if running in a standard browser environment.
  8892. // Specifically not if we're in a web worker, or react-native.
  8893. if (utils.isStandardBrowserEnv()) {
  8894. // Add xsrf header
  8895. var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
  8896. cookies.read(config.xsrfCookieName) :
  8897. undefined;
  8898. if (xsrfValue) {
  8899. requestHeaders[config.xsrfHeaderName] = xsrfValue;
  8900. }
  8901. }
  8902. // Add headers to the request
  8903. if ('setRequestHeader' in request) {
  8904. utils.forEach(requestHeaders, function setRequestHeader(val, key) {
  8905. if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
  8906. // Remove Content-Type if data is undefined
  8907. delete requestHeaders[key];
  8908. } else {
  8909. // Otherwise add header to the request
  8910. request.setRequestHeader(key, val);
  8911. }
  8912. });
  8913. }
  8914. // Add withCredentials to request if needed
  8915. if (!utils.isUndefined(config.withCredentials)) {
  8916. request.withCredentials = !!config.withCredentials;
  8917. }
  8918. // Add responseType to request if needed
  8919. if (responseType && responseType !== 'json') {
  8920. request.responseType = config.responseType;
  8921. }
  8922. // Handle progress if needed
  8923. if (typeof config.onDownloadProgress === 'function') {
  8924. request.addEventListener('progress', config.onDownloadProgress);
  8925. }
  8926. // Not all browsers support upload events
  8927. if (typeof config.onUploadProgress === 'function' && request.upload) {
  8928. request.upload.addEventListener('progress', config.onUploadProgress);
  8929. }
  8930. if (config.cancelToken) {
  8931. // Handle cancellation
  8932. config.cancelToken.promise.then(function onCanceled(cancel) {
  8933. if (!request) {
  8934. return;
  8935. }
  8936. request.abort();
  8937. reject(cancel);
  8938. // Clean up request
  8939. request = null;
  8940. });
  8941. }
  8942. if (!requestData) {
  8943. requestData = null;
  8944. }
  8945. // Send the request
  8946. request.send(requestData);
  8947. });
  8948. };
  8949. /***/ }),
  8950. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/axios.js":
  8951. /*!*************************************************************************!*\
  8952. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/axios.js ***!
  8953. \*************************************************************************/
  8954. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  8955. "use strict";
  8956. var utils = __webpack_require__(/*! ./utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  8957. var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/bind.js");
  8958. var Axios = __webpack_require__(/*! ./core/Axios */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/Axios.js");
  8959. var mergeConfig = __webpack_require__(/*! ./core/mergeConfig */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/mergeConfig.js");
  8960. var defaults = __webpack_require__(/*! ./defaults */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/defaults.js");
  8961. /**
  8962. * Create an instance of Axios
  8963. *
  8964. * @param {Object} defaultConfig The default config for the instance
  8965. * @return {Axios} A new instance of Axios
  8966. */
  8967. function createInstance(defaultConfig) {
  8968. var context = new Axios(defaultConfig);
  8969. var instance = bind(Axios.prototype.request, context);
  8970. // Copy axios.prototype to instance
  8971. utils.extend(instance, Axios.prototype, context);
  8972. // Copy context to instance
  8973. utils.extend(instance, context);
  8974. return instance;
  8975. }
  8976. // Create the default instance to be exported
  8977. var axios = createInstance(defaults);
  8978. // Expose Axios class to allow class inheritance
  8979. axios.Axios = Axios;
  8980. // Factory for creating new instances
  8981. axios.create = function create(instanceConfig) {
  8982. return createInstance(mergeConfig(axios.defaults, instanceConfig));
  8983. };
  8984. // Expose Cancel & CancelToken
  8985. axios.Cancel = __webpack_require__(/*! ./cancel/Cancel */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/Cancel.js");
  8986. axios.CancelToken = __webpack_require__(/*! ./cancel/CancelToken */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/CancelToken.js");
  8987. axios.isCancel = __webpack_require__(/*! ./cancel/isCancel */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/isCancel.js");
  8988. // Expose all/spread
  8989. axios.all = function all(promises) {
  8990. return Promise.all(promises);
  8991. };
  8992. axios.spread = __webpack_require__(/*! ./helpers/spread */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/spread.js");
  8993. // Expose isAxiosError
  8994. axios.isAxiosError = __webpack_require__(/*! ./helpers/isAxiosError */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isAxiosError.js");
  8995. module.exports = axios;
  8996. // Allow use of default import syntax in TypeScript
  8997. module.exports["default"] = axios;
  8998. /***/ }),
  8999. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/Cancel.js":
  9000. /*!*********************************************************************************!*\
  9001. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/Cancel.js ***!
  9002. \*********************************************************************************/
  9003. /***/ ((module) => {
  9004. "use strict";
  9005. /**
  9006. * A `Cancel` is an object that is thrown when an operation is canceled.
  9007. *
  9008. * @class
  9009. * @param {string=} message The message.
  9010. */
  9011. function Cancel(message) {
  9012. this.message = message;
  9013. }
  9014. Cancel.prototype.toString = function toString() {
  9015. return 'Cancel' + (this.message ? ': ' + this.message : '');
  9016. };
  9017. Cancel.prototype.__CANCEL__ = true;
  9018. module.exports = Cancel;
  9019. /***/ }),
  9020. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/CancelToken.js":
  9021. /*!**************************************************************************************!*\
  9022. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/CancelToken.js ***!
  9023. \**************************************************************************************/
  9024. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9025. "use strict";
  9026. var Cancel = __webpack_require__(/*! ./Cancel */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/Cancel.js");
  9027. /**
  9028. * A `CancelToken` is an object that can be used to request cancellation of an operation.
  9029. *
  9030. * @class
  9031. * @param {Function} executor The executor function.
  9032. */
  9033. function CancelToken(executor) {
  9034. if (typeof executor !== 'function') {
  9035. throw new TypeError('executor must be a function.');
  9036. }
  9037. var resolvePromise;
  9038. this.promise = new Promise(function promiseExecutor(resolve) {
  9039. resolvePromise = resolve;
  9040. });
  9041. var token = this;
  9042. executor(function cancel(message) {
  9043. if (token.reason) {
  9044. // Cancellation has already been requested
  9045. return;
  9046. }
  9047. token.reason = new Cancel(message);
  9048. resolvePromise(token.reason);
  9049. });
  9050. }
  9051. /**
  9052. * Throws a `Cancel` if cancellation has been requested.
  9053. */
  9054. CancelToken.prototype.throwIfRequested = function throwIfRequested() {
  9055. if (this.reason) {
  9056. throw this.reason;
  9057. }
  9058. };
  9059. /**
  9060. * Returns an object that contains a new `CancelToken` and a function that, when called,
  9061. * cancels the `CancelToken`.
  9062. */
  9063. CancelToken.source = function source() {
  9064. var cancel;
  9065. var token = new CancelToken(function executor(c) {
  9066. cancel = c;
  9067. });
  9068. return {
  9069. token: token,
  9070. cancel: cancel
  9071. };
  9072. };
  9073. module.exports = CancelToken;
  9074. /***/ }),
  9075. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/isCancel.js":
  9076. /*!***********************************************************************************!*\
  9077. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/isCancel.js ***!
  9078. \***********************************************************************************/
  9079. /***/ ((module) => {
  9080. "use strict";
  9081. module.exports = function isCancel(value) {
  9082. return !!(value && value.__CANCEL__);
  9083. };
  9084. /***/ }),
  9085. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/Axios.js":
  9086. /*!******************************************************************************!*\
  9087. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/Axios.js ***!
  9088. \******************************************************************************/
  9089. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9090. "use strict";
  9091. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  9092. var buildURL = __webpack_require__(/*! ../helpers/buildURL */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/buildURL.js");
  9093. var InterceptorManager = __webpack_require__(/*! ./InterceptorManager */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/InterceptorManager.js");
  9094. var dispatchRequest = __webpack_require__(/*! ./dispatchRequest */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/dispatchRequest.js");
  9095. var mergeConfig = __webpack_require__(/*! ./mergeConfig */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/mergeConfig.js");
  9096. var validator = __webpack_require__(/*! ../helpers/validator */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/validator.js");
  9097. var validators = validator.validators;
  9098. /**
  9099. * Create a new instance of Axios
  9100. *
  9101. * @param {Object} instanceConfig The default config for the instance
  9102. */
  9103. function Axios(instanceConfig) {
  9104. this.defaults = instanceConfig;
  9105. this.interceptors = {
  9106. request: new InterceptorManager(),
  9107. response: new InterceptorManager()
  9108. };
  9109. }
  9110. /**
  9111. * Dispatch a request
  9112. *
  9113. * @param {Object} config The config specific for this request (merged with this.defaults)
  9114. */
  9115. Axios.prototype.request = function request(config) {
  9116. /*eslint no-param-reassign:0*/
  9117. // Allow for axios('example/url'[, config]) a la fetch API
  9118. if (typeof config === 'string') {
  9119. config = arguments[1] || {};
  9120. config.url = arguments[0];
  9121. } else {
  9122. config = config || {};
  9123. }
  9124. config = mergeConfig(this.defaults, config);
  9125. // Set config.method
  9126. if (config.method) {
  9127. config.method = config.method.toLowerCase();
  9128. } else if (this.defaults.method) {
  9129. config.method = this.defaults.method.toLowerCase();
  9130. } else {
  9131. config.method = 'get';
  9132. }
  9133. var transitional = config.transitional;
  9134. if (transitional !== undefined) {
  9135. validator.assertOptions(transitional, {
  9136. silentJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
  9137. forcedJSONParsing: validators.transitional(validators.boolean, '1.0.0'),
  9138. clarifyTimeoutError: validators.transitional(validators.boolean, '1.0.0')
  9139. }, false);
  9140. }
  9141. // filter out skipped interceptors
  9142. var requestInterceptorChain = [];
  9143. var synchronousRequestInterceptors = true;
  9144. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  9145. if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
  9146. return;
  9147. }
  9148. synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
  9149. requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
  9150. });
  9151. var responseInterceptorChain = [];
  9152. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  9153. responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
  9154. });
  9155. var promise;
  9156. if (!synchronousRequestInterceptors) {
  9157. var chain = [dispatchRequest, undefined];
  9158. Array.prototype.unshift.apply(chain, requestInterceptorChain);
  9159. chain = chain.concat(responseInterceptorChain);
  9160. promise = Promise.resolve(config);
  9161. while (chain.length) {
  9162. promise = promise.then(chain.shift(), chain.shift());
  9163. }
  9164. return promise;
  9165. }
  9166. var newConfig = config;
  9167. while (requestInterceptorChain.length) {
  9168. var onFulfilled = requestInterceptorChain.shift();
  9169. var onRejected = requestInterceptorChain.shift();
  9170. try {
  9171. newConfig = onFulfilled(newConfig);
  9172. } catch (error) {
  9173. onRejected(error);
  9174. break;
  9175. }
  9176. }
  9177. try {
  9178. promise = dispatchRequest(newConfig);
  9179. } catch (error) {
  9180. return Promise.reject(error);
  9181. }
  9182. while (responseInterceptorChain.length) {
  9183. promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
  9184. }
  9185. return promise;
  9186. };
  9187. Axios.prototype.getUri = function getUri(config) {
  9188. config = mergeConfig(this.defaults, config);
  9189. return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
  9190. };
  9191. // Provide aliases for supported request methods
  9192. utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
  9193. /*eslint func-names:0*/
  9194. Axios.prototype[method] = function(url, config) {
  9195. return this.request(mergeConfig(config || {}, {
  9196. method: method,
  9197. url: url,
  9198. data: (config || {}).data
  9199. }));
  9200. };
  9201. });
  9202. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  9203. /*eslint func-names:0*/
  9204. Axios.prototype[method] = function(url, data, config) {
  9205. return this.request(mergeConfig(config || {}, {
  9206. method: method,
  9207. url: url,
  9208. data: data
  9209. }));
  9210. };
  9211. });
  9212. module.exports = Axios;
  9213. /***/ }),
  9214. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/InterceptorManager.js":
  9215. /*!*******************************************************************************************!*\
  9216. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/InterceptorManager.js ***!
  9217. \*******************************************************************************************/
  9218. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9219. "use strict";
  9220. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  9221. function InterceptorManager() {
  9222. this.handlers = [];
  9223. }
  9224. /**
  9225. * Add a new interceptor to the stack
  9226. *
  9227. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  9228. * @param {Function} rejected The function to handle `reject` for a `Promise`
  9229. *
  9230. * @return {Number} An ID used to remove interceptor later
  9231. */
  9232. InterceptorManager.prototype.use = function use(fulfilled, rejected, options) {
  9233. this.handlers.push({
  9234. fulfilled: fulfilled,
  9235. rejected: rejected,
  9236. synchronous: options ? options.synchronous : false,
  9237. runWhen: options ? options.runWhen : null
  9238. });
  9239. return this.handlers.length - 1;
  9240. };
  9241. /**
  9242. * Remove an interceptor from the stack
  9243. *
  9244. * @param {Number} id The ID that was returned by `use`
  9245. */
  9246. InterceptorManager.prototype.eject = function eject(id) {
  9247. if (this.handlers[id]) {
  9248. this.handlers[id] = null;
  9249. }
  9250. };
  9251. /**
  9252. * Iterate over all the registered interceptors
  9253. *
  9254. * This method is particularly useful for skipping over any
  9255. * interceptors that may have become `null` calling `eject`.
  9256. *
  9257. * @param {Function} fn The function to call for each interceptor
  9258. */
  9259. InterceptorManager.prototype.forEach = function forEach(fn) {
  9260. utils.forEach(this.handlers, function forEachHandler(h) {
  9261. if (h !== null) {
  9262. fn(h);
  9263. }
  9264. });
  9265. };
  9266. module.exports = InterceptorManager;
  9267. /***/ }),
  9268. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/buildFullPath.js":
  9269. /*!**************************************************************************************!*\
  9270. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/buildFullPath.js ***!
  9271. \**************************************************************************************/
  9272. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9273. "use strict";
  9274. var isAbsoluteURL = __webpack_require__(/*! ../helpers/isAbsoluteURL */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isAbsoluteURL.js");
  9275. var combineURLs = __webpack_require__(/*! ../helpers/combineURLs */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/combineURLs.js");
  9276. /**
  9277. * Creates a new URL by combining the baseURL with the requestedURL,
  9278. * only when the requestedURL is not already an absolute URL.
  9279. * If the requestURL is absolute, this function returns the requestedURL untouched.
  9280. *
  9281. * @param {string} baseURL The base URL
  9282. * @param {string} requestedURL Absolute or relative URL to combine
  9283. * @returns {string} The combined full path
  9284. */
  9285. module.exports = function buildFullPath(baseURL, requestedURL) {
  9286. if (baseURL && !isAbsoluteURL(requestedURL)) {
  9287. return combineURLs(baseURL, requestedURL);
  9288. }
  9289. return requestedURL;
  9290. };
  9291. /***/ }),
  9292. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/createError.js":
  9293. /*!************************************************************************************!*\
  9294. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/createError.js ***!
  9295. \************************************************************************************/
  9296. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9297. "use strict";
  9298. var enhanceError = __webpack_require__(/*! ./enhanceError */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/enhanceError.js");
  9299. /**
  9300. * Create an Error with the specified message, config, error code, request and response.
  9301. *
  9302. * @param {string} message The error message.
  9303. * @param {Object} config The config.
  9304. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  9305. * @param {Object} [request] The request.
  9306. * @param {Object} [response] The response.
  9307. * @returns {Error} The created error.
  9308. */
  9309. module.exports = function createError(message, config, code, request, response) {
  9310. var error = new Error(message);
  9311. return enhanceError(error, config, code, request, response);
  9312. };
  9313. /***/ }),
  9314. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/dispatchRequest.js":
  9315. /*!****************************************************************************************!*\
  9316. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/dispatchRequest.js ***!
  9317. \****************************************************************************************/
  9318. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9319. "use strict";
  9320. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  9321. var transformData = __webpack_require__(/*! ./transformData */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/transformData.js");
  9322. var isCancel = __webpack_require__(/*! ../cancel/isCancel */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/cancel/isCancel.js");
  9323. var defaults = __webpack_require__(/*! ../defaults */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/defaults.js");
  9324. /**
  9325. * Throws a `Cancel` if cancellation has been requested.
  9326. */
  9327. function throwIfCancellationRequested(config) {
  9328. if (config.cancelToken) {
  9329. config.cancelToken.throwIfRequested();
  9330. }
  9331. }
  9332. /**
  9333. * Dispatch a request to the server using the configured adapter.
  9334. *
  9335. * @param {object} config The config that is to be used for the request
  9336. * @returns {Promise} The Promise to be fulfilled
  9337. */
  9338. module.exports = function dispatchRequest(config) {
  9339. throwIfCancellationRequested(config);
  9340. // Ensure headers exist
  9341. config.headers = config.headers || {};
  9342. // Transform request data
  9343. config.data = transformData.call(
  9344. config,
  9345. config.data,
  9346. config.headers,
  9347. config.transformRequest
  9348. );
  9349. // Flatten headers
  9350. config.headers = utils.merge(
  9351. config.headers.common || {},
  9352. config.headers[config.method] || {},
  9353. config.headers
  9354. );
  9355. utils.forEach(
  9356. ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
  9357. function cleanHeaderConfig(method) {
  9358. delete config.headers[method];
  9359. }
  9360. );
  9361. var adapter = config.adapter || defaults.adapter;
  9362. return adapter(config).then(function onAdapterResolution(response) {
  9363. throwIfCancellationRequested(config);
  9364. // Transform response data
  9365. response.data = transformData.call(
  9366. config,
  9367. response.data,
  9368. response.headers,
  9369. config.transformResponse
  9370. );
  9371. return response;
  9372. }, function onAdapterRejection(reason) {
  9373. if (!isCancel(reason)) {
  9374. throwIfCancellationRequested(config);
  9375. // Transform response data
  9376. if (reason && reason.response) {
  9377. reason.response.data = transformData.call(
  9378. config,
  9379. reason.response.data,
  9380. reason.response.headers,
  9381. config.transformResponse
  9382. );
  9383. }
  9384. }
  9385. return Promise.reject(reason);
  9386. });
  9387. };
  9388. /***/ }),
  9389. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/enhanceError.js":
  9390. /*!*************************************************************************************!*\
  9391. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/enhanceError.js ***!
  9392. \*************************************************************************************/
  9393. /***/ ((module) => {
  9394. "use strict";
  9395. /**
  9396. * Update an Error with the specified config, error code, and response.
  9397. *
  9398. * @param {Error} error The error to update.
  9399. * @param {Object} config The config.
  9400. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  9401. * @param {Object} [request] The request.
  9402. * @param {Object} [response] The response.
  9403. * @returns {Error} The error.
  9404. */
  9405. module.exports = function enhanceError(error, config, code, request, response) {
  9406. error.config = config;
  9407. if (code) {
  9408. error.code = code;
  9409. }
  9410. error.request = request;
  9411. error.response = response;
  9412. error.isAxiosError = true;
  9413. error.toJSON = function toJSON() {
  9414. return {
  9415. // Standard
  9416. message: this.message,
  9417. name: this.name,
  9418. // Microsoft
  9419. description: this.description,
  9420. number: this.number,
  9421. // Mozilla
  9422. fileName: this.fileName,
  9423. lineNumber: this.lineNumber,
  9424. columnNumber: this.columnNumber,
  9425. stack: this.stack,
  9426. // Axios
  9427. config: this.config,
  9428. code: this.code
  9429. };
  9430. };
  9431. return error;
  9432. };
  9433. /***/ }),
  9434. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/mergeConfig.js":
  9435. /*!************************************************************************************!*\
  9436. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/mergeConfig.js ***!
  9437. \************************************************************************************/
  9438. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9439. "use strict";
  9440. var utils = __webpack_require__(/*! ../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  9441. /**
  9442. * Config-specific merge-function which creates a new config-object
  9443. * by merging two configuration objects together.
  9444. *
  9445. * @param {Object} config1
  9446. * @param {Object} config2
  9447. * @returns {Object} New object resulting from merging config2 to config1
  9448. */
  9449. module.exports = function mergeConfig(config1, config2) {
  9450. // eslint-disable-next-line no-param-reassign
  9451. config2 = config2 || {};
  9452. var config = {};
  9453. var valueFromConfig2Keys = ['url', 'method', 'data'];
  9454. var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
  9455. var defaultToConfig2Keys = [
  9456. 'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
  9457. 'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
  9458. 'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
  9459. 'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
  9460. 'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
  9461. ];
  9462. var directMergeKeys = ['validateStatus'];
  9463. function getMergedValue(target, source) {
  9464. if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
  9465. return utils.merge(target, source);
  9466. } else if (utils.isPlainObject(source)) {
  9467. return utils.merge({}, source);
  9468. } else if (utils.isArray(source)) {
  9469. return source.slice();
  9470. }
  9471. return source;
  9472. }
  9473. function mergeDeepProperties(prop) {
  9474. if (!utils.isUndefined(config2[prop])) {
  9475. config[prop] = getMergedValue(config1[prop], config2[prop]);
  9476. } else if (!utils.isUndefined(config1[prop])) {
  9477. config[prop] = getMergedValue(undefined, config1[prop]);
  9478. }
  9479. }
  9480. utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
  9481. if (!utils.isUndefined(config2[prop])) {
  9482. config[prop] = getMergedValue(undefined, config2[prop]);
  9483. }
  9484. });
  9485. utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
  9486. utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
  9487. if (!utils.isUndefined(config2[prop])) {
  9488. config[prop] = getMergedValue(undefined, config2[prop]);
  9489. } else if (!utils.isUndefined(config1[prop])) {
  9490. config[prop] = getMergedValue(undefined, config1[prop]);
  9491. }
  9492. });
  9493. utils.forEach(directMergeKeys, function merge(prop) {
  9494. if (prop in config2) {
  9495. config[prop] = getMergedValue(config1[prop], config2[prop]);
  9496. } else if (prop in config1) {
  9497. config[prop] = getMergedValue(undefined, config1[prop]);
  9498. }
  9499. });
  9500. var axiosKeys = valueFromConfig2Keys
  9501. .concat(mergeDeepPropertiesKeys)
  9502. .concat(defaultToConfig2Keys)
  9503. .concat(directMergeKeys);
  9504. var otherKeys = Object
  9505. .keys(config1)
  9506. .concat(Object.keys(config2))
  9507. .filter(function filterAxiosKeys(key) {
  9508. return axiosKeys.indexOf(key) === -1;
  9509. });
  9510. utils.forEach(otherKeys, mergeDeepProperties);
  9511. return config;
  9512. };
  9513. /***/ }),
  9514. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/settle.js":
  9515. /*!*******************************************************************************!*\
  9516. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/settle.js ***!
  9517. \*******************************************************************************/
  9518. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9519. "use strict";
  9520. var createError = __webpack_require__(/*! ./createError */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/createError.js");
  9521. /**
  9522. * Resolve or reject a Promise based on response status.
  9523. *
  9524. * @param {Function} resolve A function that resolves the promise.
  9525. * @param {Function} reject A function that rejects the promise.
  9526. * @param {object} response The response.
  9527. */
  9528. module.exports = function settle(resolve, reject, response) {
  9529. var validateStatus = response.config.validateStatus;
  9530. if (!response.status || !validateStatus || validateStatus(response.status)) {
  9531. resolve(response);
  9532. } else {
  9533. reject(createError(
  9534. 'Request failed with status code ' + response.status,
  9535. response.config,
  9536. null,
  9537. response.request,
  9538. response
  9539. ));
  9540. }
  9541. };
  9542. /***/ }),
  9543. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/transformData.js":
  9544. /*!**************************************************************************************!*\
  9545. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/transformData.js ***!
  9546. \**************************************************************************************/
  9547. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9548. "use strict";
  9549. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  9550. var defaults = __webpack_require__(/*! ./../defaults */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/defaults.js");
  9551. /**
  9552. * Transform the data for a request or a response
  9553. *
  9554. * @param {Object|String} data The data to be transformed
  9555. * @param {Array} headers The headers for the request or response
  9556. * @param {Array|Function} fns A single function or Array of functions
  9557. * @returns {*} The resulting transformed data
  9558. */
  9559. module.exports = function transformData(data, headers, fns) {
  9560. var context = this || defaults;
  9561. /*eslint no-param-reassign:0*/
  9562. utils.forEach(fns, function transform(fn) {
  9563. data = fn.call(context, data, headers);
  9564. });
  9565. return data;
  9566. };
  9567. /***/ }),
  9568. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/defaults.js":
  9569. /*!****************************************************************************!*\
  9570. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/defaults.js ***!
  9571. \****************************************************************************/
  9572. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9573. "use strict";
  9574. /* provided dependency */ var process = __webpack_require__(/*! process/browser.js */ "./node_modules/process/browser.js");
  9575. var utils = __webpack_require__(/*! ./utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  9576. var normalizeHeaderName = __webpack_require__(/*! ./helpers/normalizeHeaderName */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/normalizeHeaderName.js");
  9577. var enhanceError = __webpack_require__(/*! ./core/enhanceError */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/core/enhanceError.js");
  9578. var DEFAULT_CONTENT_TYPE = {
  9579. 'Content-Type': 'application/x-www-form-urlencoded'
  9580. };
  9581. function setContentTypeIfUnset(headers, value) {
  9582. if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {
  9583. headers['Content-Type'] = value;
  9584. }
  9585. }
  9586. function getDefaultAdapter() {
  9587. var adapter;
  9588. if (typeof XMLHttpRequest !== 'undefined') {
  9589. // For browsers use XHR adapter
  9590. adapter = __webpack_require__(/*! ./adapters/xhr */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/adapters/xhr.js");
  9591. } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
  9592. // For node use HTTP adapter
  9593. adapter = __webpack_require__(/*! ./adapters/http */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/adapters/xhr.js");
  9594. }
  9595. return adapter;
  9596. }
  9597. function stringifySafely(rawValue, parser, encoder) {
  9598. if (utils.isString(rawValue)) {
  9599. try {
  9600. (parser || JSON.parse)(rawValue);
  9601. return utils.trim(rawValue);
  9602. } catch (e) {
  9603. if (e.name !== 'SyntaxError') {
  9604. throw e;
  9605. }
  9606. }
  9607. }
  9608. return (encoder || JSON.stringify)(rawValue);
  9609. }
  9610. var defaults = {
  9611. transitional: {
  9612. silentJSONParsing: true,
  9613. forcedJSONParsing: true,
  9614. clarifyTimeoutError: false
  9615. },
  9616. adapter: getDefaultAdapter(),
  9617. transformRequest: [function transformRequest(data, headers) {
  9618. normalizeHeaderName(headers, 'Accept');
  9619. normalizeHeaderName(headers, 'Content-Type');
  9620. if (utils.isFormData(data) ||
  9621. utils.isArrayBuffer(data) ||
  9622. utils.isBuffer(data) ||
  9623. utils.isStream(data) ||
  9624. utils.isFile(data) ||
  9625. utils.isBlob(data)
  9626. ) {
  9627. return data;
  9628. }
  9629. if (utils.isArrayBufferView(data)) {
  9630. return data.buffer;
  9631. }
  9632. if (utils.isURLSearchParams(data)) {
  9633. setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
  9634. return data.toString();
  9635. }
  9636. if (utils.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
  9637. setContentTypeIfUnset(headers, 'application/json');
  9638. return stringifySafely(data);
  9639. }
  9640. return data;
  9641. }],
  9642. transformResponse: [function transformResponse(data) {
  9643. var transitional = this.transitional;
  9644. var silentJSONParsing = transitional && transitional.silentJSONParsing;
  9645. var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
  9646. var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
  9647. if (strictJSONParsing || (forcedJSONParsing && utils.isString(data) && data.length)) {
  9648. try {
  9649. return JSON.parse(data);
  9650. } catch (e) {
  9651. if (strictJSONParsing) {
  9652. if (e.name === 'SyntaxError') {
  9653. throw enhanceError(e, this, 'E_JSON_PARSE');
  9654. }
  9655. throw e;
  9656. }
  9657. }
  9658. }
  9659. return data;
  9660. }],
  9661. /**
  9662. * A timeout in milliseconds to abort a request. If set to 0 (default) a
  9663. * timeout is not created.
  9664. */
  9665. timeout: 0,
  9666. xsrfCookieName: 'XSRF-TOKEN',
  9667. xsrfHeaderName: 'X-XSRF-TOKEN',
  9668. maxContentLength: -1,
  9669. maxBodyLength: -1,
  9670. validateStatus: function validateStatus(status) {
  9671. return status >= 200 && status < 300;
  9672. }
  9673. };
  9674. defaults.headers = {
  9675. common: {
  9676. 'Accept': 'application/json, text/plain, */*'
  9677. }
  9678. };
  9679. utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
  9680. defaults.headers[method] = {};
  9681. });
  9682. utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  9683. defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
  9684. });
  9685. module.exports = defaults;
  9686. /***/ }),
  9687. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/bind.js":
  9688. /*!********************************************************************************!*\
  9689. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/bind.js ***!
  9690. \********************************************************************************/
  9691. /***/ ((module) => {
  9692. "use strict";
  9693. module.exports = function bind(fn, thisArg) {
  9694. return function wrap() {
  9695. var args = new Array(arguments.length);
  9696. for (var i = 0; i < args.length; i++) {
  9697. args[i] = arguments[i];
  9698. }
  9699. return fn.apply(thisArg, args);
  9700. };
  9701. };
  9702. /***/ }),
  9703. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/buildURL.js":
  9704. /*!************************************************************************************!*\
  9705. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/buildURL.js ***!
  9706. \************************************************************************************/
  9707. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9708. "use strict";
  9709. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  9710. function encode(val) {
  9711. return encodeURIComponent(val).
  9712. replace(/%3A/gi, ':').
  9713. replace(/%24/g, '$').
  9714. replace(/%2C/gi, ',').
  9715. replace(/%20/g, '+').
  9716. replace(/%5B/gi, '[').
  9717. replace(/%5D/gi, ']');
  9718. }
  9719. /**
  9720. * Build a URL by appending params to the end
  9721. *
  9722. * @param {string} url The base of the url (e.g., http://www.google.com)
  9723. * @param {object} [params] The params to be appended
  9724. * @returns {string} The formatted url
  9725. */
  9726. module.exports = function buildURL(url, params, paramsSerializer) {
  9727. /*eslint no-param-reassign:0*/
  9728. if (!params) {
  9729. return url;
  9730. }
  9731. var serializedParams;
  9732. if (paramsSerializer) {
  9733. serializedParams = paramsSerializer(params);
  9734. } else if (utils.isURLSearchParams(params)) {
  9735. serializedParams = params.toString();
  9736. } else {
  9737. var parts = [];
  9738. utils.forEach(params, function serialize(val, key) {
  9739. if (val === null || typeof val === 'undefined') {
  9740. return;
  9741. }
  9742. if (utils.isArray(val)) {
  9743. key = key + '[]';
  9744. } else {
  9745. val = [val];
  9746. }
  9747. utils.forEach(val, function parseValue(v) {
  9748. if (utils.isDate(v)) {
  9749. v = v.toISOString();
  9750. } else if (utils.isObject(v)) {
  9751. v = JSON.stringify(v);
  9752. }
  9753. parts.push(encode(key) + '=' + encode(v));
  9754. });
  9755. });
  9756. serializedParams = parts.join('&');
  9757. }
  9758. if (serializedParams) {
  9759. var hashmarkIndex = url.indexOf('#');
  9760. if (hashmarkIndex !== -1) {
  9761. url = url.slice(0, hashmarkIndex);
  9762. }
  9763. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  9764. }
  9765. return url;
  9766. };
  9767. /***/ }),
  9768. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/combineURLs.js":
  9769. /*!***************************************************************************************!*\
  9770. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/combineURLs.js ***!
  9771. \***************************************************************************************/
  9772. /***/ ((module) => {
  9773. "use strict";
  9774. /**
  9775. * Creates a new URL by combining the specified URLs
  9776. *
  9777. * @param {string} baseURL The base URL
  9778. * @param {string} relativeURL The relative URL
  9779. * @returns {string} The combined URL
  9780. */
  9781. module.exports = function combineURLs(baseURL, relativeURL) {
  9782. return relativeURL
  9783. ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
  9784. : baseURL;
  9785. };
  9786. /***/ }),
  9787. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/cookies.js":
  9788. /*!***********************************************************************************!*\
  9789. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/cookies.js ***!
  9790. \***********************************************************************************/
  9791. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9792. "use strict";
  9793. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  9794. module.exports = (
  9795. utils.isStandardBrowserEnv() ?
  9796. // Standard browser envs support document.cookie
  9797. (function standardBrowserEnv() {
  9798. return {
  9799. write: function write(name, value, expires, path, domain, secure) {
  9800. var cookie = [];
  9801. cookie.push(name + '=' + encodeURIComponent(value));
  9802. if (utils.isNumber(expires)) {
  9803. cookie.push('expires=' + new Date(expires).toGMTString());
  9804. }
  9805. if (utils.isString(path)) {
  9806. cookie.push('path=' + path);
  9807. }
  9808. if (utils.isString(domain)) {
  9809. cookie.push('domain=' + domain);
  9810. }
  9811. if (secure === true) {
  9812. cookie.push('secure');
  9813. }
  9814. document.cookie = cookie.join('; ');
  9815. },
  9816. read: function read(name) {
  9817. var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
  9818. return (match ? decodeURIComponent(match[3]) : null);
  9819. },
  9820. remove: function remove(name) {
  9821. this.write(name, '', Date.now() - 86400000);
  9822. }
  9823. };
  9824. })() :
  9825. // Non standard browser env (web workers, react-native) lack needed support.
  9826. (function nonStandardBrowserEnv() {
  9827. return {
  9828. write: function write() {},
  9829. read: function read() { return null; },
  9830. remove: function remove() {}
  9831. };
  9832. })()
  9833. );
  9834. /***/ }),
  9835. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isAbsoluteURL.js":
  9836. /*!*****************************************************************************************!*\
  9837. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
  9838. \*****************************************************************************************/
  9839. /***/ ((module) => {
  9840. "use strict";
  9841. /**
  9842. * Determines whether the specified URL is absolute
  9843. *
  9844. * @param {string} url The URL to test
  9845. * @returns {boolean} True if the specified URL is absolute, otherwise false
  9846. */
  9847. module.exports = function isAbsoluteURL(url) {
  9848. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  9849. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  9850. // by any combination of letters, digits, plus, period, or hyphen.
  9851. return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
  9852. };
  9853. /***/ }),
  9854. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isAxiosError.js":
  9855. /*!****************************************************************************************!*\
  9856. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isAxiosError.js ***!
  9857. \****************************************************************************************/
  9858. /***/ ((module) => {
  9859. "use strict";
  9860. /**
  9861. * Determines whether the payload is an error thrown by Axios
  9862. *
  9863. * @param {*} payload The value to test
  9864. * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
  9865. */
  9866. module.exports = function isAxiosError(payload) {
  9867. return (typeof payload === 'object') && (payload.isAxiosError === true);
  9868. };
  9869. /***/ }),
  9870. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isURLSameOrigin.js":
  9871. /*!*******************************************************************************************!*\
  9872. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
  9873. \*******************************************************************************************/
  9874. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9875. "use strict";
  9876. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  9877. module.exports = (
  9878. utils.isStandardBrowserEnv() ?
  9879. // Standard browser envs have full support of the APIs needed to test
  9880. // whether the request URL is of the same origin as current location.
  9881. (function standardBrowserEnv() {
  9882. var msie = /(msie|trident)/i.test(navigator.userAgent);
  9883. var urlParsingNode = document.createElement('a');
  9884. var originURL;
  9885. /**
  9886. * Parse a URL to discover it's components
  9887. *
  9888. * @param {String} url The URL to be parsed
  9889. * @returns {Object}
  9890. */
  9891. function resolveURL(url) {
  9892. var href = url;
  9893. if (msie) {
  9894. // IE needs attribute set twice to normalize properties
  9895. urlParsingNode.setAttribute('href', href);
  9896. href = urlParsingNode.href;
  9897. }
  9898. urlParsingNode.setAttribute('href', href);
  9899. // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
  9900. return {
  9901. href: urlParsingNode.href,
  9902. protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
  9903. host: urlParsingNode.host,
  9904. search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
  9905. hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
  9906. hostname: urlParsingNode.hostname,
  9907. port: urlParsingNode.port,
  9908. pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
  9909. urlParsingNode.pathname :
  9910. '/' + urlParsingNode.pathname
  9911. };
  9912. }
  9913. originURL = resolveURL(window.location.href);
  9914. /**
  9915. * Determine if a URL shares the same origin as the current location
  9916. *
  9917. * @param {String} requestURL The URL to test
  9918. * @returns {boolean} True if URL shares the same origin, otherwise false
  9919. */
  9920. return function isURLSameOrigin(requestURL) {
  9921. var parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
  9922. return (parsed.protocol === originURL.protocol &&
  9923. parsed.host === originURL.host);
  9924. };
  9925. })() :
  9926. // Non standard browser envs (web workers, react-native) lack needed support.
  9927. (function nonStandardBrowserEnv() {
  9928. return function isURLSameOrigin() {
  9929. return true;
  9930. };
  9931. })()
  9932. );
  9933. /***/ }),
  9934. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/normalizeHeaderName.js":
  9935. /*!***********************************************************************************************!*\
  9936. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/normalizeHeaderName.js ***!
  9937. \***********************************************************************************************/
  9938. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9939. "use strict";
  9940. var utils = __webpack_require__(/*! ../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  9941. module.exports = function normalizeHeaderName(headers, normalizedName) {
  9942. utils.forEach(headers, function processHeader(value, name) {
  9943. if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
  9944. headers[normalizedName] = value;
  9945. delete headers[name];
  9946. }
  9947. });
  9948. };
  9949. /***/ }),
  9950. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/parseHeaders.js":
  9951. /*!****************************************************************************************!*\
  9952. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/parseHeaders.js ***!
  9953. \****************************************************************************************/
  9954. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  9955. "use strict";
  9956. var utils = __webpack_require__(/*! ./../utils */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js");
  9957. // Headers whose duplicates are ignored by node
  9958. // c.f. https://nodejs.org/api/http.html#http_message_headers
  9959. var ignoreDuplicateOf = [
  9960. 'age', 'authorization', 'content-length', 'content-type', 'etag',
  9961. 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
  9962. 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
  9963. 'referer', 'retry-after', 'user-agent'
  9964. ];
  9965. /**
  9966. * Parse headers into an object
  9967. *
  9968. * ```
  9969. * Date: Wed, 27 Aug 2014 08:58:49 GMT
  9970. * Content-Type: application/json
  9971. * Connection: keep-alive
  9972. * Transfer-Encoding: chunked
  9973. * ```
  9974. *
  9975. * @param {String} headers Headers needing to be parsed
  9976. * @returns {Object} Headers parsed into an object
  9977. */
  9978. module.exports = function parseHeaders(headers) {
  9979. var parsed = {};
  9980. var key;
  9981. var val;
  9982. var i;
  9983. if (!headers) { return parsed; }
  9984. utils.forEach(headers.split('\n'), function parser(line) {
  9985. i = line.indexOf(':');
  9986. key = utils.trim(line.substr(0, i)).toLowerCase();
  9987. val = utils.trim(line.substr(i + 1));
  9988. if (key) {
  9989. if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
  9990. return;
  9991. }
  9992. if (key === 'set-cookie') {
  9993. parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
  9994. } else {
  9995. parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
  9996. }
  9997. }
  9998. });
  9999. return parsed;
  10000. };
  10001. /***/ }),
  10002. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/spread.js":
  10003. /*!**********************************************************************************!*\
  10004. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/spread.js ***!
  10005. \**********************************************************************************/
  10006. /***/ ((module) => {
  10007. "use strict";
  10008. /**
  10009. * Syntactic sugar for invoking a function and expanding an array for arguments.
  10010. *
  10011. * Common use case would be to use `Function.prototype.apply`.
  10012. *
  10013. * ```js
  10014. * function f(x, y, z) {}
  10015. * var args = [1, 2, 3];
  10016. * f.apply(null, args);
  10017. * ```
  10018. *
  10019. * With `spread` this example can be re-written.
  10020. *
  10021. * ```js
  10022. * spread(function(x, y, z) {})([1, 2, 3]);
  10023. * ```
  10024. *
  10025. * @param {Function} callback
  10026. * @returns {Function}
  10027. */
  10028. module.exports = function spread(callback) {
  10029. return function wrap(arr) {
  10030. return callback.apply(null, arr);
  10031. };
  10032. };
  10033. /***/ }),
  10034. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/validator.js":
  10035. /*!*************************************************************************************!*\
  10036. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/validator.js ***!
  10037. \*************************************************************************************/
  10038. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  10039. "use strict";
  10040. var pkg = __webpack_require__(/*! ./../../package.json */ "./node_modules/@inertiajs/inertia/node_modules/axios/package.json");
  10041. var validators = {};
  10042. // eslint-disable-next-line func-names
  10043. ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
  10044. validators[type] = function validator(thing) {
  10045. return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
  10046. };
  10047. });
  10048. var deprecatedWarnings = {};
  10049. var currentVerArr = pkg.version.split('.');
  10050. /**
  10051. * Compare package versions
  10052. * @param {string} version
  10053. * @param {string?} thanVersion
  10054. * @returns {boolean}
  10055. */
  10056. function isOlderVersion(version, thanVersion) {
  10057. var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
  10058. var destVer = version.split('.');
  10059. for (var i = 0; i < 3; i++) {
  10060. if (pkgVersionArr[i] > destVer[i]) {
  10061. return true;
  10062. } else if (pkgVersionArr[i] < destVer[i]) {
  10063. return false;
  10064. }
  10065. }
  10066. return false;
  10067. }
  10068. /**
  10069. * Transitional option validator
  10070. * @param {function|boolean?} validator
  10071. * @param {string?} version
  10072. * @param {string} message
  10073. * @returns {function}
  10074. */
  10075. validators.transitional = function transitional(validator, version, message) {
  10076. var isDeprecated = version && isOlderVersion(version);
  10077. function formatMessage(opt, desc) {
  10078. return '[Axios v' + pkg.version + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
  10079. }
  10080. // eslint-disable-next-line func-names
  10081. return function(value, opt, opts) {
  10082. if (validator === false) {
  10083. throw new Error(formatMessage(opt, ' has been removed in ' + version));
  10084. }
  10085. if (isDeprecated && !deprecatedWarnings[opt]) {
  10086. deprecatedWarnings[opt] = true;
  10087. // eslint-disable-next-line no-console
  10088. console.warn(
  10089. formatMessage(
  10090. opt,
  10091. ' has been deprecated since v' + version + ' and will be removed in the near future'
  10092. )
  10093. );
  10094. }
  10095. return validator ? validator(value, opt, opts) : true;
  10096. };
  10097. };
  10098. /**
  10099. * Assert object's properties type
  10100. * @param {object} options
  10101. * @param {object} schema
  10102. * @param {boolean?} allowUnknown
  10103. */
  10104. function assertOptions(options, schema, allowUnknown) {
  10105. if (typeof options !== 'object') {
  10106. throw new TypeError('options must be an object');
  10107. }
  10108. var keys = Object.keys(options);
  10109. var i = keys.length;
  10110. while (i-- > 0) {
  10111. var opt = keys[i];
  10112. var validator = schema[opt];
  10113. if (validator) {
  10114. var value = options[opt];
  10115. var result = value === undefined || validator(value, opt, options);
  10116. if (result !== true) {
  10117. throw new TypeError('option ' + opt + ' must be ' + result);
  10118. }
  10119. continue;
  10120. }
  10121. if (allowUnknown !== true) {
  10122. throw Error('Unknown option ' + opt);
  10123. }
  10124. }
  10125. }
  10126. module.exports = {
  10127. isOlderVersion: isOlderVersion,
  10128. assertOptions: assertOptions,
  10129. validators: validators
  10130. };
  10131. /***/ }),
  10132. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js":
  10133. /*!*************************************************************************!*\
  10134. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/lib/utils.js ***!
  10135. \*************************************************************************/
  10136. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  10137. "use strict";
  10138. var bind = __webpack_require__(/*! ./helpers/bind */ "./node_modules/@inertiajs/inertia/node_modules/axios/lib/helpers/bind.js");
  10139. // utils is a library of generic helper functions non-specific to axios
  10140. var toString = Object.prototype.toString;
  10141. /**
  10142. * Determine if a value is an Array
  10143. *
  10144. * @param {Object} val The value to test
  10145. * @returns {boolean} True if value is an Array, otherwise false
  10146. */
  10147. function isArray(val) {
  10148. return toString.call(val) === '[object Array]';
  10149. }
  10150. /**
  10151. * Determine if a value is undefined
  10152. *
  10153. * @param {Object} val The value to test
  10154. * @returns {boolean} True if the value is undefined, otherwise false
  10155. */
  10156. function isUndefined(val) {
  10157. return typeof val === 'undefined';
  10158. }
  10159. /**
  10160. * Determine if a value is a Buffer
  10161. *
  10162. * @param {Object} val The value to test
  10163. * @returns {boolean} True if value is a Buffer, otherwise false
  10164. */
  10165. function isBuffer(val) {
  10166. return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
  10167. && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
  10168. }
  10169. /**
  10170. * Determine if a value is an ArrayBuffer
  10171. *
  10172. * @param {Object} val The value to test
  10173. * @returns {boolean} True if value is an ArrayBuffer, otherwise false
  10174. */
  10175. function isArrayBuffer(val) {
  10176. return toString.call(val) === '[object ArrayBuffer]';
  10177. }
  10178. /**
  10179. * Determine if a value is a FormData
  10180. *
  10181. * @param {Object} val The value to test
  10182. * @returns {boolean} True if value is an FormData, otherwise false
  10183. */
  10184. function isFormData(val) {
  10185. return (typeof FormData !== 'undefined') && (val instanceof FormData);
  10186. }
  10187. /**
  10188. * Determine if a value is a view on an ArrayBuffer
  10189. *
  10190. * @param {Object} val The value to test
  10191. * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
  10192. */
  10193. function isArrayBufferView(val) {
  10194. var result;
  10195. if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
  10196. result = ArrayBuffer.isView(val);
  10197. } else {
  10198. result = (val) && (val.buffer) && (val.buffer instanceof ArrayBuffer);
  10199. }
  10200. return result;
  10201. }
  10202. /**
  10203. * Determine if a value is a String
  10204. *
  10205. * @param {Object} val The value to test
  10206. * @returns {boolean} True if value is a String, otherwise false
  10207. */
  10208. function isString(val) {
  10209. return typeof val === 'string';
  10210. }
  10211. /**
  10212. * Determine if a value is a Number
  10213. *
  10214. * @param {Object} val The value to test
  10215. * @returns {boolean} True if value is a Number, otherwise false
  10216. */
  10217. function isNumber(val) {
  10218. return typeof val === 'number';
  10219. }
  10220. /**
  10221. * Determine if a value is an Object
  10222. *
  10223. * @param {Object} val The value to test
  10224. * @returns {boolean} True if value is an Object, otherwise false
  10225. */
  10226. function isObject(val) {
  10227. return val !== null && typeof val === 'object';
  10228. }
  10229. /**
  10230. * Determine if a value is a plain Object
  10231. *
  10232. * @param {Object} val The value to test
  10233. * @return {boolean} True if value is a plain Object, otherwise false
  10234. */
  10235. function isPlainObject(val) {
  10236. if (toString.call(val) !== '[object Object]') {
  10237. return false;
  10238. }
  10239. var prototype = Object.getPrototypeOf(val);
  10240. return prototype === null || prototype === Object.prototype;
  10241. }
  10242. /**
  10243. * Determine if a value is a Date
  10244. *
  10245. * @param {Object} val The value to test
  10246. * @returns {boolean} True if value is a Date, otherwise false
  10247. */
  10248. function isDate(val) {
  10249. return toString.call(val) === '[object Date]';
  10250. }
  10251. /**
  10252. * Determine if a value is a File
  10253. *
  10254. * @param {Object} val The value to test
  10255. * @returns {boolean} True if value is a File, otherwise false
  10256. */
  10257. function isFile(val) {
  10258. return toString.call(val) === '[object File]';
  10259. }
  10260. /**
  10261. * Determine if a value is a Blob
  10262. *
  10263. * @param {Object} val The value to test
  10264. * @returns {boolean} True if value is a Blob, otherwise false
  10265. */
  10266. function isBlob(val) {
  10267. return toString.call(val) === '[object Blob]';
  10268. }
  10269. /**
  10270. * Determine if a value is a Function
  10271. *
  10272. * @param {Object} val The value to test
  10273. * @returns {boolean} True if value is a Function, otherwise false
  10274. */
  10275. function isFunction(val) {
  10276. return toString.call(val) === '[object Function]';
  10277. }
  10278. /**
  10279. * Determine if a value is a Stream
  10280. *
  10281. * @param {Object} val The value to test
  10282. * @returns {boolean} True if value is a Stream, otherwise false
  10283. */
  10284. function isStream(val) {
  10285. return isObject(val) && isFunction(val.pipe);
  10286. }
  10287. /**
  10288. * Determine if a value is a URLSearchParams object
  10289. *
  10290. * @param {Object} val The value to test
  10291. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  10292. */
  10293. function isURLSearchParams(val) {
  10294. return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
  10295. }
  10296. /**
  10297. * Trim excess whitespace off the beginning and end of a string
  10298. *
  10299. * @param {String} str The String to trim
  10300. * @returns {String} The String freed of excess whitespace
  10301. */
  10302. function trim(str) {
  10303. return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
  10304. }
  10305. /**
  10306. * Determine if we're running in a standard browser environment
  10307. *
  10308. * This allows axios to run in a web worker, and react-native.
  10309. * Both environments support XMLHttpRequest, but not fully standard globals.
  10310. *
  10311. * web workers:
  10312. * typeof window -> undefined
  10313. * typeof document -> undefined
  10314. *
  10315. * react-native:
  10316. * navigator.product -> 'ReactNative'
  10317. * nativescript
  10318. * navigator.product -> 'NativeScript' or 'NS'
  10319. */
  10320. function isStandardBrowserEnv() {
  10321. if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
  10322. navigator.product === 'NativeScript' ||
  10323. navigator.product === 'NS')) {
  10324. return false;
  10325. }
  10326. return (
  10327. typeof window !== 'undefined' &&
  10328. typeof document !== 'undefined'
  10329. );
  10330. }
  10331. /**
  10332. * Iterate over an Array or an Object invoking a function for each item.
  10333. *
  10334. * If `obj` is an Array callback will be called passing
  10335. * the value, index, and complete array for each item.
  10336. *
  10337. * If 'obj' is an Object callback will be called passing
  10338. * the value, key, and complete object for each property.
  10339. *
  10340. * @param {Object|Array} obj The object to iterate
  10341. * @param {Function} fn The callback to invoke for each item
  10342. */
  10343. function forEach(obj, fn) {
  10344. // Don't bother if no value provided
  10345. if (obj === null || typeof obj === 'undefined') {
  10346. return;
  10347. }
  10348. // Force an array if not already something iterable
  10349. if (typeof obj !== 'object') {
  10350. /*eslint no-param-reassign:0*/
  10351. obj = [obj];
  10352. }
  10353. if (isArray(obj)) {
  10354. // Iterate over array values
  10355. for (var i = 0, l = obj.length; i < l; i++) {
  10356. fn.call(null, obj[i], i, obj);
  10357. }
  10358. } else {
  10359. // Iterate over object keys
  10360. for (var key in obj) {
  10361. if (Object.prototype.hasOwnProperty.call(obj, key)) {
  10362. fn.call(null, obj[key], key, obj);
  10363. }
  10364. }
  10365. }
  10366. }
  10367. /**
  10368. * Accepts varargs expecting each argument to be an object, then
  10369. * immutably merges the properties of each object and returns result.
  10370. *
  10371. * When multiple objects contain the same key the later object in
  10372. * the arguments list will take precedence.
  10373. *
  10374. * Example:
  10375. *
  10376. * ```js
  10377. * var result = merge({foo: 123}, {foo: 456});
  10378. * console.log(result.foo); // outputs 456
  10379. * ```
  10380. *
  10381. * @param {Object} obj1 Object to merge
  10382. * @returns {Object} Result of all merge properties
  10383. */
  10384. function merge(/* obj1, obj2, obj3, ... */) {
  10385. var result = {};
  10386. function assignValue(val, key) {
  10387. if (isPlainObject(result[key]) && isPlainObject(val)) {
  10388. result[key] = merge(result[key], val);
  10389. } else if (isPlainObject(val)) {
  10390. result[key] = merge({}, val);
  10391. } else if (isArray(val)) {
  10392. result[key] = val.slice();
  10393. } else {
  10394. result[key] = val;
  10395. }
  10396. }
  10397. for (var i = 0, l = arguments.length; i < l; i++) {
  10398. forEach(arguments[i], assignValue);
  10399. }
  10400. return result;
  10401. }
  10402. /**
  10403. * Extends object a by mutably adding to it the properties of object b.
  10404. *
  10405. * @param {Object} a The object to be extended
  10406. * @param {Object} b The object to copy properties from
  10407. * @param {Object} thisArg The object to bind function to
  10408. * @return {Object} The resulting value of object a
  10409. */
  10410. function extend(a, b, thisArg) {
  10411. forEach(b, function assignValue(val, key) {
  10412. if (thisArg && typeof val === 'function') {
  10413. a[key] = bind(val, thisArg);
  10414. } else {
  10415. a[key] = val;
  10416. }
  10417. });
  10418. return a;
  10419. }
  10420. /**
  10421. * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
  10422. *
  10423. * @param {string} content with BOM
  10424. * @return {string} content value without BOM
  10425. */
  10426. function stripBOM(content) {
  10427. if (content.charCodeAt(0) === 0xFEFF) {
  10428. content = content.slice(1);
  10429. }
  10430. return content;
  10431. }
  10432. module.exports = {
  10433. isArray: isArray,
  10434. isArrayBuffer: isArrayBuffer,
  10435. isBuffer: isBuffer,
  10436. isFormData: isFormData,
  10437. isArrayBufferView: isArrayBufferView,
  10438. isString: isString,
  10439. isNumber: isNumber,
  10440. isObject: isObject,
  10441. isPlainObject: isPlainObject,
  10442. isUndefined: isUndefined,
  10443. isDate: isDate,
  10444. isFile: isFile,
  10445. isBlob: isBlob,
  10446. isFunction: isFunction,
  10447. isStream: isStream,
  10448. isURLSearchParams: isURLSearchParams,
  10449. isStandardBrowserEnv: isStandardBrowserEnv,
  10450. forEach: forEach,
  10451. merge: merge,
  10452. extend: extend,
  10453. trim: trim,
  10454. stripBOM: stripBOM
  10455. };
  10456. /***/ }),
  10457. /***/ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/formats.js":
  10458. /*!************************************************************************!*\
  10459. !*** ./node_modules/@inertiajs/inertia/node_modules/qs/lib/formats.js ***!
  10460. \************************************************************************/
  10461. /***/ ((module) => {
  10462. "use strict";
  10463. var replace = String.prototype.replace;
  10464. var percentTwenties = /%20/g;
  10465. var Format = {
  10466. RFC1738: 'RFC1738',
  10467. RFC3986: 'RFC3986'
  10468. };
  10469. module.exports = {
  10470. 'default': Format.RFC3986,
  10471. formatters: {
  10472. RFC1738: function (value) {
  10473. return replace.call(value, percentTwenties, '+');
  10474. },
  10475. RFC3986: function (value) {
  10476. return String(value);
  10477. }
  10478. },
  10479. RFC1738: Format.RFC1738,
  10480. RFC3986: Format.RFC3986
  10481. };
  10482. /***/ }),
  10483. /***/ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/index.js":
  10484. /*!**********************************************************************!*\
  10485. !*** ./node_modules/@inertiajs/inertia/node_modules/qs/lib/index.js ***!
  10486. \**********************************************************************/
  10487. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  10488. "use strict";
  10489. var stringify = __webpack_require__(/*! ./stringify */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/stringify.js");
  10490. var parse = __webpack_require__(/*! ./parse */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/parse.js");
  10491. var formats = __webpack_require__(/*! ./formats */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/formats.js");
  10492. module.exports = {
  10493. formats: formats,
  10494. parse: parse,
  10495. stringify: stringify
  10496. };
  10497. /***/ }),
  10498. /***/ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/parse.js":
  10499. /*!**********************************************************************!*\
  10500. !*** ./node_modules/@inertiajs/inertia/node_modules/qs/lib/parse.js ***!
  10501. \**********************************************************************/
  10502. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  10503. "use strict";
  10504. var utils = __webpack_require__(/*! ./utils */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/utils.js");
  10505. var has = Object.prototype.hasOwnProperty;
  10506. var isArray = Array.isArray;
  10507. var defaults = {
  10508. allowDots: false,
  10509. allowPrototypes: false,
  10510. allowSparse: false,
  10511. arrayLimit: 20,
  10512. charset: 'utf-8',
  10513. charsetSentinel: false,
  10514. comma: false,
  10515. decoder: utils.decode,
  10516. delimiter: '&',
  10517. depth: 5,
  10518. ignoreQueryPrefix: false,
  10519. interpretNumericEntities: false,
  10520. parameterLimit: 1000,
  10521. parseArrays: true,
  10522. plainObjects: false,
  10523. strictNullHandling: false
  10524. };
  10525. var interpretNumericEntities = function (str) {
  10526. return str.replace(/&#(\d+);/g, function ($0, numberStr) {
  10527. return String.fromCharCode(parseInt(numberStr, 10));
  10528. });
  10529. };
  10530. var parseArrayValue = function (val, options) {
  10531. if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
  10532. return val.split(',');
  10533. }
  10534. return val;
  10535. };
  10536. // This is what browsers will submit when the ✓ character occurs in an
  10537. // application/x-www-form-urlencoded body and the encoding of the page containing
  10538. // the form is iso-8859-1, or when the submitted form has an accept-charset
  10539. // attribute of iso-8859-1. Presumably also with other charsets that do not contain
  10540. // the ✓ character, such as us-ascii.
  10541. var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
  10542. // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
  10543. var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
  10544. var parseValues = function parseQueryStringValues(str, options) {
  10545. var obj = {};
  10546. var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
  10547. var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
  10548. var parts = cleanStr.split(options.delimiter, limit);
  10549. var skipIndex = -1; // Keep track of where the utf8 sentinel was found
  10550. var i;
  10551. var charset = options.charset;
  10552. if (options.charsetSentinel) {
  10553. for (i = 0; i < parts.length; ++i) {
  10554. if (parts[i].indexOf('utf8=') === 0) {
  10555. if (parts[i] === charsetSentinel) {
  10556. charset = 'utf-8';
  10557. } else if (parts[i] === isoSentinel) {
  10558. charset = 'iso-8859-1';
  10559. }
  10560. skipIndex = i;
  10561. i = parts.length; // The eslint settings do not allow break;
  10562. }
  10563. }
  10564. }
  10565. for (i = 0; i < parts.length; ++i) {
  10566. if (i === skipIndex) {
  10567. continue;
  10568. }
  10569. var part = parts[i];
  10570. var bracketEqualsPos = part.indexOf(']=');
  10571. var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
  10572. var key, val;
  10573. if (pos === -1) {
  10574. key = options.decoder(part, defaults.decoder, charset, 'key');
  10575. val = options.strictNullHandling ? null : '';
  10576. } else {
  10577. key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
  10578. val = utils.maybeMap(
  10579. parseArrayValue(part.slice(pos + 1), options),
  10580. function (encodedVal) {
  10581. return options.decoder(encodedVal, defaults.decoder, charset, 'value');
  10582. }
  10583. );
  10584. }
  10585. if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
  10586. val = interpretNumericEntities(val);
  10587. }
  10588. if (part.indexOf('[]=') > -1) {
  10589. val = isArray(val) ? [val] : val;
  10590. }
  10591. if (has.call(obj, key)) {
  10592. obj[key] = utils.combine(obj[key], val);
  10593. } else {
  10594. obj[key] = val;
  10595. }
  10596. }
  10597. return obj;
  10598. };
  10599. var parseObject = function (chain, val, options, valuesParsed) {
  10600. var leaf = valuesParsed ? val : parseArrayValue(val, options);
  10601. for (var i = chain.length - 1; i >= 0; --i) {
  10602. var obj;
  10603. var root = chain[i];
  10604. if (root === '[]' && options.parseArrays) {
  10605. obj = [].concat(leaf);
  10606. } else {
  10607. obj = options.plainObjects ? Object.create(null) : {};
  10608. var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
  10609. var index = parseInt(cleanRoot, 10);
  10610. if (!options.parseArrays && cleanRoot === '') {
  10611. obj = { 0: leaf };
  10612. } else if (
  10613. !isNaN(index)
  10614. && root !== cleanRoot
  10615. && String(index) === cleanRoot
  10616. && index >= 0
  10617. && (options.parseArrays && index <= options.arrayLimit)
  10618. ) {
  10619. obj = [];
  10620. obj[index] = leaf;
  10621. } else if (cleanRoot !== '__proto__') {
  10622. obj[cleanRoot] = leaf;
  10623. }
  10624. }
  10625. leaf = obj;
  10626. }
  10627. return leaf;
  10628. };
  10629. var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
  10630. if (!givenKey) {
  10631. return;
  10632. }
  10633. // Transform dot notation to bracket notation
  10634. var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
  10635. // The regex chunks
  10636. var brackets = /(\[[^[\]]*])/;
  10637. var child = /(\[[^[\]]*])/g;
  10638. // Get the parent
  10639. var segment = options.depth > 0 && brackets.exec(key);
  10640. var parent = segment ? key.slice(0, segment.index) : key;
  10641. // Stash the parent if it exists
  10642. var keys = [];
  10643. if (parent) {
  10644. // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
  10645. if (!options.plainObjects && has.call(Object.prototype, parent)) {
  10646. if (!options.allowPrototypes) {
  10647. return;
  10648. }
  10649. }
  10650. keys.push(parent);
  10651. }
  10652. // Loop through children appending to the array until we hit depth
  10653. var i = 0;
  10654. while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
  10655. i += 1;
  10656. if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
  10657. if (!options.allowPrototypes) {
  10658. return;
  10659. }
  10660. }
  10661. keys.push(segment[1]);
  10662. }
  10663. // If there's a remainder, just add whatever is left
  10664. if (segment) {
  10665. keys.push('[' + key.slice(segment.index) + ']');
  10666. }
  10667. return parseObject(keys, val, options, valuesParsed);
  10668. };
  10669. var normalizeParseOptions = function normalizeParseOptions(opts) {
  10670. if (!opts) {
  10671. return defaults;
  10672. }
  10673. if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
  10674. throw new TypeError('Decoder has to be a function.');
  10675. }
  10676. if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
  10677. throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
  10678. }
  10679. var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
  10680. return {
  10681. allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
  10682. allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
  10683. allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
  10684. arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
  10685. charset: charset,
  10686. charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
  10687. comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
  10688. decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
  10689. delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
  10690. // eslint-disable-next-line no-implicit-coercion, no-extra-parens
  10691. depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
  10692. ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
  10693. interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
  10694. parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
  10695. parseArrays: opts.parseArrays !== false,
  10696. plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
  10697. strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
  10698. };
  10699. };
  10700. module.exports = function (str, opts) {
  10701. var options = normalizeParseOptions(opts);
  10702. if (str === '' || str === null || typeof str === 'undefined') {
  10703. return options.plainObjects ? Object.create(null) : {};
  10704. }
  10705. var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
  10706. var obj = options.plainObjects ? Object.create(null) : {};
  10707. // Iterate over the keys and setup the new object
  10708. var keys = Object.keys(tempObj);
  10709. for (var i = 0; i < keys.length; ++i) {
  10710. var key = keys[i];
  10711. var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
  10712. obj = utils.merge(obj, newObj, options);
  10713. }
  10714. if (options.allowSparse === true) {
  10715. return obj;
  10716. }
  10717. return utils.compact(obj);
  10718. };
  10719. /***/ }),
  10720. /***/ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/stringify.js":
  10721. /*!**************************************************************************!*\
  10722. !*** ./node_modules/@inertiajs/inertia/node_modules/qs/lib/stringify.js ***!
  10723. \**************************************************************************/
  10724. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  10725. "use strict";
  10726. var getSideChannel = __webpack_require__(/*! side-channel */ "./node_modules/side-channel/index.js");
  10727. var utils = __webpack_require__(/*! ./utils */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/utils.js");
  10728. var formats = __webpack_require__(/*! ./formats */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/formats.js");
  10729. var has = Object.prototype.hasOwnProperty;
  10730. var arrayPrefixGenerators = {
  10731. brackets: function brackets(prefix) {
  10732. return prefix + '[]';
  10733. },
  10734. comma: 'comma',
  10735. indices: function indices(prefix, key) {
  10736. return prefix + '[' + key + ']';
  10737. },
  10738. repeat: function repeat(prefix) {
  10739. return prefix;
  10740. }
  10741. };
  10742. var isArray = Array.isArray;
  10743. var split = String.prototype.split;
  10744. var push = Array.prototype.push;
  10745. var pushToArray = function (arr, valueOrArray) {
  10746. push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
  10747. };
  10748. var toISO = Date.prototype.toISOString;
  10749. var defaultFormat = formats['default'];
  10750. var defaults = {
  10751. addQueryPrefix: false,
  10752. allowDots: false,
  10753. charset: 'utf-8',
  10754. charsetSentinel: false,
  10755. delimiter: '&',
  10756. encode: true,
  10757. encoder: utils.encode,
  10758. encodeValuesOnly: false,
  10759. format: defaultFormat,
  10760. formatter: formats.formatters[defaultFormat],
  10761. // deprecated
  10762. indices: false,
  10763. serializeDate: function serializeDate(date) {
  10764. return toISO.call(date);
  10765. },
  10766. skipNulls: false,
  10767. strictNullHandling: false
  10768. };
  10769. var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
  10770. return typeof v === 'string'
  10771. || typeof v === 'number'
  10772. || typeof v === 'boolean'
  10773. || typeof v === 'symbol'
  10774. || typeof v === 'bigint';
  10775. };
  10776. var sentinel = {};
  10777. var stringify = function stringify(
  10778. object,
  10779. prefix,
  10780. generateArrayPrefix,
  10781. strictNullHandling,
  10782. skipNulls,
  10783. encoder,
  10784. filter,
  10785. sort,
  10786. allowDots,
  10787. serializeDate,
  10788. format,
  10789. formatter,
  10790. encodeValuesOnly,
  10791. charset,
  10792. sideChannel
  10793. ) {
  10794. var obj = object;
  10795. var tmpSc = sideChannel;
  10796. var step = 0;
  10797. var findFlag = false;
  10798. while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
  10799. // Where object last appeared in the ref tree
  10800. var pos = tmpSc.get(object);
  10801. step += 1;
  10802. if (typeof pos !== 'undefined') {
  10803. if (pos === step) {
  10804. throw new RangeError('Cyclic object value');
  10805. } else {
  10806. findFlag = true; // Break while
  10807. }
  10808. }
  10809. if (typeof tmpSc.get(sentinel) === 'undefined') {
  10810. step = 0;
  10811. }
  10812. }
  10813. if (typeof filter === 'function') {
  10814. obj = filter(prefix, obj);
  10815. } else if (obj instanceof Date) {
  10816. obj = serializeDate(obj);
  10817. } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
  10818. obj = utils.maybeMap(obj, function (value) {
  10819. if (value instanceof Date) {
  10820. return serializeDate(value);
  10821. }
  10822. return value;
  10823. });
  10824. }
  10825. if (obj === null) {
  10826. if (strictNullHandling) {
  10827. return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
  10828. }
  10829. obj = '';
  10830. }
  10831. if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
  10832. if (encoder) {
  10833. var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
  10834. if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
  10835. var valuesArray = split.call(String(obj), ',');
  10836. var valuesJoined = '';
  10837. for (var i = 0; i < valuesArray.length; ++i) {
  10838. valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
  10839. }
  10840. return [formatter(keyValue) + '=' + valuesJoined];
  10841. }
  10842. return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
  10843. }
  10844. return [formatter(prefix) + '=' + formatter(String(obj))];
  10845. }
  10846. var values = [];
  10847. if (typeof obj === 'undefined') {
  10848. return values;
  10849. }
  10850. var objKeys;
  10851. if (generateArrayPrefix === 'comma' && isArray(obj)) {
  10852. // we need to join elements in
  10853. objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
  10854. } else if (isArray(filter)) {
  10855. objKeys = filter;
  10856. } else {
  10857. var keys = Object.keys(obj);
  10858. objKeys = sort ? keys.sort(sort) : keys;
  10859. }
  10860. for (var j = 0; j < objKeys.length; ++j) {
  10861. var key = objKeys[j];
  10862. var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
  10863. if (skipNulls && value === null) {
  10864. continue;
  10865. }
  10866. var keyPrefix = isArray(obj)
  10867. ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(prefix, key) : prefix
  10868. : prefix + (allowDots ? '.' + key : '[' + key + ']');
  10869. sideChannel.set(object, step);
  10870. var valueSideChannel = getSideChannel();
  10871. valueSideChannel.set(sentinel, sideChannel);
  10872. pushToArray(values, stringify(
  10873. value,
  10874. keyPrefix,
  10875. generateArrayPrefix,
  10876. strictNullHandling,
  10877. skipNulls,
  10878. encoder,
  10879. filter,
  10880. sort,
  10881. allowDots,
  10882. serializeDate,
  10883. format,
  10884. formatter,
  10885. encodeValuesOnly,
  10886. charset,
  10887. valueSideChannel
  10888. ));
  10889. }
  10890. return values;
  10891. };
  10892. var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
  10893. if (!opts) {
  10894. return defaults;
  10895. }
  10896. if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
  10897. throw new TypeError('Encoder has to be a function.');
  10898. }
  10899. var charset = opts.charset || defaults.charset;
  10900. if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
  10901. throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
  10902. }
  10903. var format = formats['default'];
  10904. if (typeof opts.format !== 'undefined') {
  10905. if (!has.call(formats.formatters, opts.format)) {
  10906. throw new TypeError('Unknown format option provided.');
  10907. }
  10908. format = opts.format;
  10909. }
  10910. var formatter = formats.formatters[format];
  10911. var filter = defaults.filter;
  10912. if (typeof opts.filter === 'function' || isArray(opts.filter)) {
  10913. filter = opts.filter;
  10914. }
  10915. return {
  10916. addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
  10917. allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
  10918. charset: charset,
  10919. charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
  10920. delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
  10921. encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
  10922. encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
  10923. encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
  10924. filter: filter,
  10925. format: format,
  10926. formatter: formatter,
  10927. serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
  10928. skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
  10929. sort: typeof opts.sort === 'function' ? opts.sort : null,
  10930. strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
  10931. };
  10932. };
  10933. module.exports = function (object, opts) {
  10934. var obj = object;
  10935. var options = normalizeStringifyOptions(opts);
  10936. var objKeys;
  10937. var filter;
  10938. if (typeof options.filter === 'function') {
  10939. filter = options.filter;
  10940. obj = filter('', obj);
  10941. } else if (isArray(options.filter)) {
  10942. filter = options.filter;
  10943. objKeys = filter;
  10944. }
  10945. var keys = [];
  10946. if (typeof obj !== 'object' || obj === null) {
  10947. return '';
  10948. }
  10949. var arrayFormat;
  10950. if (opts && opts.arrayFormat in arrayPrefixGenerators) {
  10951. arrayFormat = opts.arrayFormat;
  10952. } else if (opts && 'indices' in opts) {
  10953. arrayFormat = opts.indices ? 'indices' : 'repeat';
  10954. } else {
  10955. arrayFormat = 'indices';
  10956. }
  10957. var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
  10958. if (!objKeys) {
  10959. objKeys = Object.keys(obj);
  10960. }
  10961. if (options.sort) {
  10962. objKeys.sort(options.sort);
  10963. }
  10964. var sideChannel = getSideChannel();
  10965. for (var i = 0; i < objKeys.length; ++i) {
  10966. var key = objKeys[i];
  10967. if (options.skipNulls && obj[key] === null) {
  10968. continue;
  10969. }
  10970. pushToArray(keys, stringify(
  10971. obj[key],
  10972. key,
  10973. generateArrayPrefix,
  10974. options.strictNullHandling,
  10975. options.skipNulls,
  10976. options.encode ? options.encoder : null,
  10977. options.filter,
  10978. options.sort,
  10979. options.allowDots,
  10980. options.serializeDate,
  10981. options.format,
  10982. options.formatter,
  10983. options.encodeValuesOnly,
  10984. options.charset,
  10985. sideChannel
  10986. ));
  10987. }
  10988. var joined = keys.join(options.delimiter);
  10989. var prefix = options.addQueryPrefix === true ? '?' : '';
  10990. if (options.charsetSentinel) {
  10991. if (options.charset === 'iso-8859-1') {
  10992. // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
  10993. prefix += 'utf8=%26%2310003%3B&';
  10994. } else {
  10995. // encodeURIComponent('✓')
  10996. prefix += 'utf8=%E2%9C%93&';
  10997. }
  10998. }
  10999. return joined.length > 0 ? prefix + joined : '';
  11000. };
  11001. /***/ }),
  11002. /***/ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/utils.js":
  11003. /*!**********************************************************************!*\
  11004. !*** ./node_modules/@inertiajs/inertia/node_modules/qs/lib/utils.js ***!
  11005. \**********************************************************************/
  11006. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  11007. "use strict";
  11008. var formats = __webpack_require__(/*! ./formats */ "./node_modules/@inertiajs/inertia/node_modules/qs/lib/formats.js");
  11009. var has = Object.prototype.hasOwnProperty;
  11010. var isArray = Array.isArray;
  11011. var hexTable = (function () {
  11012. var array = [];
  11013. for (var i = 0; i < 256; ++i) {
  11014. array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
  11015. }
  11016. return array;
  11017. }());
  11018. var compactQueue = function compactQueue(queue) {
  11019. while (queue.length > 1) {
  11020. var item = queue.pop();
  11021. var obj = item.obj[item.prop];
  11022. if (isArray(obj)) {
  11023. var compacted = [];
  11024. for (var j = 0; j < obj.length; ++j) {
  11025. if (typeof obj[j] !== 'undefined') {
  11026. compacted.push(obj[j]);
  11027. }
  11028. }
  11029. item.obj[item.prop] = compacted;
  11030. }
  11031. }
  11032. };
  11033. var arrayToObject = function arrayToObject(source, options) {
  11034. var obj = options && options.plainObjects ? Object.create(null) : {};
  11035. for (var i = 0; i < source.length; ++i) {
  11036. if (typeof source[i] !== 'undefined') {
  11037. obj[i] = source[i];
  11038. }
  11039. }
  11040. return obj;
  11041. };
  11042. var merge = function merge(target, source, options) {
  11043. /* eslint no-param-reassign: 0 */
  11044. if (!source) {
  11045. return target;
  11046. }
  11047. if (typeof source !== 'object') {
  11048. if (isArray(target)) {
  11049. target.push(source);
  11050. } else if (target && typeof target === 'object') {
  11051. if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
  11052. target[source] = true;
  11053. }
  11054. } else {
  11055. return [target, source];
  11056. }
  11057. return target;
  11058. }
  11059. if (!target || typeof target !== 'object') {
  11060. return [target].concat(source);
  11061. }
  11062. var mergeTarget = target;
  11063. if (isArray(target) && !isArray(source)) {
  11064. mergeTarget = arrayToObject(target, options);
  11065. }
  11066. if (isArray(target) && isArray(source)) {
  11067. source.forEach(function (item, i) {
  11068. if (has.call(target, i)) {
  11069. var targetItem = target[i];
  11070. if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
  11071. target[i] = merge(targetItem, item, options);
  11072. } else {
  11073. target.push(item);
  11074. }
  11075. } else {
  11076. target[i] = item;
  11077. }
  11078. });
  11079. return target;
  11080. }
  11081. return Object.keys(source).reduce(function (acc, key) {
  11082. var value = source[key];
  11083. if (has.call(acc, key)) {
  11084. acc[key] = merge(acc[key], value, options);
  11085. } else {
  11086. acc[key] = value;
  11087. }
  11088. return acc;
  11089. }, mergeTarget);
  11090. };
  11091. var assign = function assignSingleSource(target, source) {
  11092. return Object.keys(source).reduce(function (acc, key) {
  11093. acc[key] = source[key];
  11094. return acc;
  11095. }, target);
  11096. };
  11097. var decode = function (str, decoder, charset) {
  11098. var strWithoutPlus = str.replace(/\+/g, ' ');
  11099. if (charset === 'iso-8859-1') {
  11100. // unescape never throws, no try...catch needed:
  11101. return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
  11102. }
  11103. // utf-8
  11104. try {
  11105. return decodeURIComponent(strWithoutPlus);
  11106. } catch (e) {
  11107. return strWithoutPlus;
  11108. }
  11109. };
  11110. var encode = function encode(str, defaultEncoder, charset, kind, format) {
  11111. // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
  11112. // It has been adapted here for stricter adherence to RFC 3986
  11113. if (str.length === 0) {
  11114. return str;
  11115. }
  11116. var string = str;
  11117. if (typeof str === 'symbol') {
  11118. string = Symbol.prototype.toString.call(str);
  11119. } else if (typeof str !== 'string') {
  11120. string = String(str);
  11121. }
  11122. if (charset === 'iso-8859-1') {
  11123. return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
  11124. return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
  11125. });
  11126. }
  11127. var out = '';
  11128. for (var i = 0; i < string.length; ++i) {
  11129. var c = string.charCodeAt(i);
  11130. if (
  11131. c === 0x2D // -
  11132. || c === 0x2E // .
  11133. || c === 0x5F // _
  11134. || c === 0x7E // ~
  11135. || (c >= 0x30 && c <= 0x39) // 0-9
  11136. || (c >= 0x41 && c <= 0x5A) // a-z
  11137. || (c >= 0x61 && c <= 0x7A) // A-Z
  11138. || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
  11139. ) {
  11140. out += string.charAt(i);
  11141. continue;
  11142. }
  11143. if (c < 0x80) {
  11144. out = out + hexTable[c];
  11145. continue;
  11146. }
  11147. if (c < 0x800) {
  11148. out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
  11149. continue;
  11150. }
  11151. if (c < 0xD800 || c >= 0xE000) {
  11152. out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
  11153. continue;
  11154. }
  11155. i += 1;
  11156. c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
  11157. /* eslint operator-linebreak: [2, "before"] */
  11158. out += hexTable[0xF0 | (c >> 18)]
  11159. + hexTable[0x80 | ((c >> 12) & 0x3F)]
  11160. + hexTable[0x80 | ((c >> 6) & 0x3F)]
  11161. + hexTable[0x80 | (c & 0x3F)];
  11162. }
  11163. return out;
  11164. };
  11165. var compact = function compact(value) {
  11166. var queue = [{ obj: { o: value }, prop: 'o' }];
  11167. var refs = [];
  11168. for (var i = 0; i < queue.length; ++i) {
  11169. var item = queue[i];
  11170. var obj = item.obj[item.prop];
  11171. var keys = Object.keys(obj);
  11172. for (var j = 0; j < keys.length; ++j) {
  11173. var key = keys[j];
  11174. var val = obj[key];
  11175. if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
  11176. queue.push({ obj: obj, prop: key });
  11177. refs.push(val);
  11178. }
  11179. }
  11180. }
  11181. compactQueue(queue);
  11182. return value;
  11183. };
  11184. var isRegExp = function isRegExp(obj) {
  11185. return Object.prototype.toString.call(obj) === '[object RegExp]';
  11186. };
  11187. var isBuffer = function isBuffer(obj) {
  11188. if (!obj || typeof obj !== 'object') {
  11189. return false;
  11190. }
  11191. return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
  11192. };
  11193. var combine = function combine(a, b) {
  11194. return [].concat(a, b);
  11195. };
  11196. var maybeMap = function maybeMap(val, fn) {
  11197. if (isArray(val)) {
  11198. var mapped = [];
  11199. for (var i = 0; i < val.length; i += 1) {
  11200. mapped.push(fn(val[i]));
  11201. }
  11202. return mapped;
  11203. }
  11204. return fn(val);
  11205. };
  11206. module.exports = {
  11207. arrayToObject: arrayToObject,
  11208. assign: assign,
  11209. combine: combine,
  11210. compact: compact,
  11211. decode: decode,
  11212. encode: encode,
  11213. isBuffer: isBuffer,
  11214. isRegExp: isRegExp,
  11215. maybeMap: maybeMap,
  11216. merge: merge
  11217. };
  11218. /***/ }),
  11219. /***/ "./node_modules/@inertiajs/progress/dist/index.js":
  11220. /*!********************************************************!*\
  11221. !*** ./node_modules/@inertiajs/progress/dist/index.js ***!
  11222. \********************************************************/
  11223. /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
  11224. var n,e=(n=__webpack_require__(/*! nprogress */ "./node_modules/nprogress/nprogress.js"))&&"object"==typeof n&&"default"in n?n.default:n,t=null;function r(n){document.addEventListener("inertia:start",o.bind(null,n)),document.addEventListener("inertia:progress",i),document.addEventListener("inertia:finish",s)}function o(n){t=setTimeout(function(){return e.start()},n)}function i(n){e.isStarted()&&n.detail.progress.percentage&&e.set(Math.max(e.status,n.detail.progress.percentage/100*.9))}function s(n){clearTimeout(t),e.isStarted()&&(n.detail.visit.completed?e.done():n.detail.visit.interrupted?e.set(0):n.detail.visit.cancelled&&(e.done(),e.remove()))}exports.InertiaProgress={init:function(n){var t=void 0===n?{}:n,o=t.delay,i=t.color,s=void 0===i?"#29d":i,a=t.includeCSS,p=void 0===a||a,d=t.showSpinner,l=void 0!==d&&d;r(void 0===o?250:o),e.configure({showSpinner:l}),p&&function(n){var e=document.createElement("style");e.type="text/css",e.textContent="\n #nprogress {\n pointer-events: none;\n }\n\n #nprogress .bar {\n background: "+n+";\n\n position: fixed;\n z-index: 1031;\n top: 0;\n left: 0;\n\n width: 100%;\n height: 2px;\n }\n\n #nprogress .peg {\n display: block;\n position: absolute;\n right: 0px;\n width: 100px;\n height: 100%;\n box-shadow: 0 0 10px "+n+", 0 0 5px "+n+";\n opacity: 1.0;\n\n -webkit-transform: rotate(3deg) translate(0px, -4px);\n -ms-transform: rotate(3deg) translate(0px, -4px);\n transform: rotate(3deg) translate(0px, -4px);\n }\n\n #nprogress .spinner {\n display: block;\n position: fixed;\n z-index: 1031;\n top: 15px;\n right: 15px;\n }\n\n #nprogress .spinner-icon {\n width: 18px;\n height: 18px;\n box-sizing: border-box;\n\n border: solid 2px transparent;\n border-top-color: "+n+";\n border-left-color: "+n+";\n border-radius: 50%;\n\n -webkit-animation: nprogress-spinner 400ms linear infinite;\n animation: nprogress-spinner 400ms linear infinite;\n }\n\n .nprogress-custom-parent {\n overflow: hidden;\n position: relative;\n }\n\n .nprogress-custom-parent #nprogress .spinner,\n .nprogress-custom-parent #nprogress .bar {\n position: absolute;\n }\n\n @-webkit-keyframes nprogress-spinner {\n 0% { -webkit-transform: rotate(0deg); }\n 100% { -webkit-transform: rotate(360deg); }\n }\n @keyframes nprogress-spinner {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n ",document.head.appendChild(e)}(s)}};
  11225. //# sourceMappingURL=index.js.map
  11226. /***/ }),
  11227. /***/ "./node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js":
  11228. /*!***************************************************************************!*\
  11229. !*** ./node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js ***!
  11230. \***************************************************************************/
  11231. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  11232. "use strict";
  11233. __webpack_require__.r(__webpack_exports__);
  11234. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11235. /* harmony export */ "generateCodeFrame": () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_0__.generateCodeFrame),
  11236. /* harmony export */ "BASE_TRANSITION": () => (/* binding */ BASE_TRANSITION),
  11237. /* harmony export */ "CAMELIZE": () => (/* binding */ CAMELIZE),
  11238. /* harmony export */ "CAPITALIZE": () => (/* binding */ CAPITALIZE),
  11239. /* harmony export */ "CREATE_BLOCK": () => (/* binding */ CREATE_BLOCK),
  11240. /* harmony export */ "CREATE_COMMENT": () => (/* binding */ CREATE_COMMENT),
  11241. /* harmony export */ "CREATE_ELEMENT_BLOCK": () => (/* binding */ CREATE_ELEMENT_BLOCK),
  11242. /* harmony export */ "CREATE_ELEMENT_VNODE": () => (/* binding */ CREATE_ELEMENT_VNODE),
  11243. /* harmony export */ "CREATE_SLOTS": () => (/* binding */ CREATE_SLOTS),
  11244. /* harmony export */ "CREATE_STATIC": () => (/* binding */ CREATE_STATIC),
  11245. /* harmony export */ "CREATE_TEXT": () => (/* binding */ CREATE_TEXT),
  11246. /* harmony export */ "CREATE_VNODE": () => (/* binding */ CREATE_VNODE),
  11247. /* harmony export */ "FRAGMENT": () => (/* binding */ FRAGMENT),
  11248. /* harmony export */ "GUARD_REACTIVE_PROPS": () => (/* binding */ GUARD_REACTIVE_PROPS),
  11249. /* harmony export */ "IS_MEMO_SAME": () => (/* binding */ IS_MEMO_SAME),
  11250. /* harmony export */ "IS_REF": () => (/* binding */ IS_REF),
  11251. /* harmony export */ "KEEP_ALIVE": () => (/* binding */ KEEP_ALIVE),
  11252. /* harmony export */ "MERGE_PROPS": () => (/* binding */ MERGE_PROPS),
  11253. /* harmony export */ "NORMALIZE_CLASS": () => (/* binding */ NORMALIZE_CLASS),
  11254. /* harmony export */ "NORMALIZE_PROPS": () => (/* binding */ NORMALIZE_PROPS),
  11255. /* harmony export */ "NORMALIZE_STYLE": () => (/* binding */ NORMALIZE_STYLE),
  11256. /* harmony export */ "OPEN_BLOCK": () => (/* binding */ OPEN_BLOCK),
  11257. /* harmony export */ "POP_SCOPE_ID": () => (/* binding */ POP_SCOPE_ID),
  11258. /* harmony export */ "PUSH_SCOPE_ID": () => (/* binding */ PUSH_SCOPE_ID),
  11259. /* harmony export */ "RENDER_LIST": () => (/* binding */ RENDER_LIST),
  11260. /* harmony export */ "RENDER_SLOT": () => (/* binding */ RENDER_SLOT),
  11261. /* harmony export */ "RESOLVE_COMPONENT": () => (/* binding */ RESOLVE_COMPONENT),
  11262. /* harmony export */ "RESOLVE_DIRECTIVE": () => (/* binding */ RESOLVE_DIRECTIVE),
  11263. /* harmony export */ "RESOLVE_DYNAMIC_COMPONENT": () => (/* binding */ RESOLVE_DYNAMIC_COMPONENT),
  11264. /* harmony export */ "RESOLVE_FILTER": () => (/* binding */ RESOLVE_FILTER),
  11265. /* harmony export */ "SET_BLOCK_TRACKING": () => (/* binding */ SET_BLOCK_TRACKING),
  11266. /* harmony export */ "SUSPENSE": () => (/* binding */ SUSPENSE),
  11267. /* harmony export */ "TELEPORT": () => (/* binding */ TELEPORT),
  11268. /* harmony export */ "TO_DISPLAY_STRING": () => (/* binding */ TO_DISPLAY_STRING),
  11269. /* harmony export */ "TO_HANDLERS": () => (/* binding */ TO_HANDLERS),
  11270. /* harmony export */ "TO_HANDLER_KEY": () => (/* binding */ TO_HANDLER_KEY),
  11271. /* harmony export */ "UNREF": () => (/* binding */ UNREF),
  11272. /* harmony export */ "WITH_CTX": () => (/* binding */ WITH_CTX),
  11273. /* harmony export */ "WITH_DIRECTIVES": () => (/* binding */ WITH_DIRECTIVES),
  11274. /* harmony export */ "WITH_MEMO": () => (/* binding */ WITH_MEMO),
  11275. /* harmony export */ "advancePositionWithClone": () => (/* binding */ advancePositionWithClone),
  11276. /* harmony export */ "advancePositionWithMutation": () => (/* binding */ advancePositionWithMutation),
  11277. /* harmony export */ "assert": () => (/* binding */ assert),
  11278. /* harmony export */ "baseCompile": () => (/* binding */ baseCompile),
  11279. /* harmony export */ "baseParse": () => (/* binding */ baseParse),
  11280. /* harmony export */ "buildDirectiveArgs": () => (/* binding */ buildDirectiveArgs),
  11281. /* harmony export */ "buildProps": () => (/* binding */ buildProps),
  11282. /* harmony export */ "buildSlots": () => (/* binding */ buildSlots),
  11283. /* harmony export */ "checkCompatEnabled": () => (/* binding */ checkCompatEnabled),
  11284. /* harmony export */ "createArrayExpression": () => (/* binding */ createArrayExpression),
  11285. /* harmony export */ "createAssignmentExpression": () => (/* binding */ createAssignmentExpression),
  11286. /* harmony export */ "createBlockStatement": () => (/* binding */ createBlockStatement),
  11287. /* harmony export */ "createCacheExpression": () => (/* binding */ createCacheExpression),
  11288. /* harmony export */ "createCallExpression": () => (/* binding */ createCallExpression),
  11289. /* harmony export */ "createCompilerError": () => (/* binding */ createCompilerError),
  11290. /* harmony export */ "createCompoundExpression": () => (/* binding */ createCompoundExpression),
  11291. /* harmony export */ "createConditionalExpression": () => (/* binding */ createConditionalExpression),
  11292. /* harmony export */ "createForLoopParams": () => (/* binding */ createForLoopParams),
  11293. /* harmony export */ "createFunctionExpression": () => (/* binding */ createFunctionExpression),
  11294. /* harmony export */ "createIfStatement": () => (/* binding */ createIfStatement),
  11295. /* harmony export */ "createInterpolation": () => (/* binding */ createInterpolation),
  11296. /* harmony export */ "createObjectExpression": () => (/* binding */ createObjectExpression),
  11297. /* harmony export */ "createObjectProperty": () => (/* binding */ createObjectProperty),
  11298. /* harmony export */ "createReturnStatement": () => (/* binding */ createReturnStatement),
  11299. /* harmony export */ "createRoot": () => (/* binding */ createRoot),
  11300. /* harmony export */ "createSequenceExpression": () => (/* binding */ createSequenceExpression),
  11301. /* harmony export */ "createSimpleExpression": () => (/* binding */ createSimpleExpression),
  11302. /* harmony export */ "createStructuralDirectiveTransform": () => (/* binding */ createStructuralDirectiveTransform),
  11303. /* harmony export */ "createTemplateLiteral": () => (/* binding */ createTemplateLiteral),
  11304. /* harmony export */ "createTransformContext": () => (/* binding */ createTransformContext),
  11305. /* harmony export */ "createVNodeCall": () => (/* binding */ createVNodeCall),
  11306. /* harmony export */ "extractIdentifiers": () => (/* binding */ extractIdentifiers),
  11307. /* harmony export */ "findDir": () => (/* binding */ findDir),
  11308. /* harmony export */ "findProp": () => (/* binding */ findProp),
  11309. /* harmony export */ "generate": () => (/* binding */ generate),
  11310. /* harmony export */ "getBaseTransformPreset": () => (/* binding */ getBaseTransformPreset),
  11311. /* harmony export */ "getInnerRange": () => (/* binding */ getInnerRange),
  11312. /* harmony export */ "getMemoedVNodeCall": () => (/* binding */ getMemoedVNodeCall),
  11313. /* harmony export */ "getVNodeBlockHelper": () => (/* binding */ getVNodeBlockHelper),
  11314. /* harmony export */ "getVNodeHelper": () => (/* binding */ getVNodeHelper),
  11315. /* harmony export */ "hasDynamicKeyVBind": () => (/* binding */ hasDynamicKeyVBind),
  11316. /* harmony export */ "hasScopeRef": () => (/* binding */ hasScopeRef),
  11317. /* harmony export */ "helperNameMap": () => (/* binding */ helperNameMap),
  11318. /* harmony export */ "injectProp": () => (/* binding */ injectProp),
  11319. /* harmony export */ "isBuiltInType": () => (/* binding */ isBuiltInType),
  11320. /* harmony export */ "isCoreComponent": () => (/* binding */ isCoreComponent),
  11321. /* harmony export */ "isFunctionType": () => (/* binding */ isFunctionType),
  11322. /* harmony export */ "isInDestructureAssignment": () => (/* binding */ isInDestructureAssignment),
  11323. /* harmony export */ "isMemberExpression": () => (/* binding */ isMemberExpression),
  11324. /* harmony export */ "isMemberExpressionBrowser": () => (/* binding */ isMemberExpressionBrowser),
  11325. /* harmony export */ "isMemberExpressionNode": () => (/* binding */ isMemberExpressionNode),
  11326. /* harmony export */ "isReferencedIdentifier": () => (/* binding */ isReferencedIdentifier),
  11327. /* harmony export */ "isSimpleIdentifier": () => (/* binding */ isSimpleIdentifier),
  11328. /* harmony export */ "isSlotOutlet": () => (/* binding */ isSlotOutlet),
  11329. /* harmony export */ "isStaticArgOf": () => (/* binding */ isStaticArgOf),
  11330. /* harmony export */ "isStaticExp": () => (/* binding */ isStaticExp),
  11331. /* harmony export */ "isStaticProperty": () => (/* binding */ isStaticProperty),
  11332. /* harmony export */ "isStaticPropertyKey": () => (/* binding */ isStaticPropertyKey),
  11333. /* harmony export */ "isTemplateNode": () => (/* binding */ isTemplateNode),
  11334. /* harmony export */ "isText": () => (/* binding */ isText),
  11335. /* harmony export */ "isVSlot": () => (/* binding */ isVSlot),
  11336. /* harmony export */ "locStub": () => (/* binding */ locStub),
  11337. /* harmony export */ "makeBlock": () => (/* binding */ makeBlock),
  11338. /* harmony export */ "noopDirectiveTransform": () => (/* binding */ noopDirectiveTransform),
  11339. /* harmony export */ "processExpression": () => (/* binding */ processExpression),
  11340. /* harmony export */ "processFor": () => (/* binding */ processFor),
  11341. /* harmony export */ "processIf": () => (/* binding */ processIf),
  11342. /* harmony export */ "processSlotOutlet": () => (/* binding */ processSlotOutlet),
  11343. /* harmony export */ "registerRuntimeHelpers": () => (/* binding */ registerRuntimeHelpers),
  11344. /* harmony export */ "resolveComponentType": () => (/* binding */ resolveComponentType),
  11345. /* harmony export */ "toValidAssetId": () => (/* binding */ toValidAssetId),
  11346. /* harmony export */ "trackSlotScopes": () => (/* binding */ trackSlotScopes),
  11347. /* harmony export */ "trackVForSlotScopes": () => (/* binding */ trackVForSlotScopes),
  11348. /* harmony export */ "transform": () => (/* binding */ transform),
  11349. /* harmony export */ "transformBind": () => (/* binding */ transformBind),
  11350. /* harmony export */ "transformElement": () => (/* binding */ transformElement),
  11351. /* harmony export */ "transformExpression": () => (/* binding */ transformExpression),
  11352. /* harmony export */ "transformModel": () => (/* binding */ transformModel),
  11353. /* harmony export */ "transformOn": () => (/* binding */ transformOn),
  11354. /* harmony export */ "traverseNode": () => (/* binding */ traverseNode),
  11355. /* harmony export */ "walkBlockDeclarations": () => (/* binding */ walkBlockDeclarations),
  11356. /* harmony export */ "walkFunctionParams": () => (/* binding */ walkFunctionParams),
  11357. /* harmony export */ "walkIdentifiers": () => (/* binding */ walkIdentifiers),
  11358. /* harmony export */ "warnDeprecation": () => (/* binding */ warnDeprecation)
  11359. /* harmony export */ });
  11360. /* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
  11361. function defaultOnError(error) {
  11362. throw error;
  11363. }
  11364. function defaultOnWarn(msg) {
  11365. ( true) && console.warn(`[Vue warn] ${msg.message}`);
  11366. }
  11367. function createCompilerError(code, loc, messages, additionalMessage) {
  11368. const msg = true
  11369. ? (messages || errorMessages)[code] + (additionalMessage || ``)
  11370. : 0;
  11371. const error = new SyntaxError(String(msg));
  11372. error.code = code;
  11373. error.loc = loc;
  11374. return error;
  11375. }
  11376. const errorMessages = {
  11377. // parse errors
  11378. [0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */]: 'Illegal comment.',
  11379. [1 /* CDATA_IN_HTML_CONTENT */]: 'CDATA section is allowed only in XML context.',
  11380. [2 /* DUPLICATE_ATTRIBUTE */]: 'Duplicate attribute.',
  11381. [3 /* END_TAG_WITH_ATTRIBUTES */]: 'End tag cannot have attributes.',
  11382. [4 /* END_TAG_WITH_TRAILING_SOLIDUS */]: "Illegal '/' in tags.",
  11383. [5 /* EOF_BEFORE_TAG_NAME */]: 'Unexpected EOF in tag.',
  11384. [6 /* EOF_IN_CDATA */]: 'Unexpected EOF in CDATA section.',
  11385. [7 /* EOF_IN_COMMENT */]: 'Unexpected EOF in comment.',
  11386. [8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */]: 'Unexpected EOF in script.',
  11387. [9 /* EOF_IN_TAG */]: 'Unexpected EOF in tag.',
  11388. [10 /* INCORRECTLY_CLOSED_COMMENT */]: 'Incorrectly closed comment.',
  11389. [11 /* INCORRECTLY_OPENED_COMMENT */]: 'Incorrectly opened comment.',
  11390. [12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */]: "Illegal tag name. Use '&lt;' to print '<'.",
  11391. [13 /* MISSING_ATTRIBUTE_VALUE */]: 'Attribute value was expected.',
  11392. [14 /* MISSING_END_TAG_NAME */]: 'End tag name was expected.',
  11393. [15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */]: 'Whitespace was expected.',
  11394. [16 /* NESTED_COMMENT */]: "Unexpected '<!--' in comment.",
  11395. [17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */]: 'Attribute name cannot contain U+0022 ("), U+0027 (\'), and U+003C (<).',
  11396. [18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */]: 'Unquoted attribute value cannot contain U+0022 ("), U+0027 (\'), U+003C (<), U+003D (=), and U+0060 (`).',
  11397. [19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */]: "Attribute name cannot start with '='.",
  11398. [21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */]: "'<?' is allowed only in XML context.",
  11399. [20 /* UNEXPECTED_NULL_CHARACTER */]: `Unexpected null character.`,
  11400. [22 /* UNEXPECTED_SOLIDUS_IN_TAG */]: "Illegal '/' in tags.",
  11401. // Vue-specific parse errors
  11402. [23 /* X_INVALID_END_TAG */]: 'Invalid end tag.',
  11403. [24 /* X_MISSING_END_TAG */]: 'Element is missing end tag.',
  11404. [25 /* X_MISSING_INTERPOLATION_END */]: 'Interpolation end sign was not found.',
  11405. [27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */]: 'End bracket for dynamic directive argument was not found. ' +
  11406. 'Note that dynamic directive argument cannot contain spaces.',
  11407. [26 /* X_MISSING_DIRECTIVE_NAME */]: 'Legal directive name was expected.',
  11408. // transform errors
  11409. [28 /* X_V_IF_NO_EXPRESSION */]: `v-if/v-else-if is missing expression.`,
  11410. [29 /* X_V_IF_SAME_KEY */]: `v-if/else branches must use unique keys.`,
  11411. [30 /* X_V_ELSE_NO_ADJACENT_IF */]: `v-else/v-else-if has no adjacent v-if or v-else-if.`,
  11412. [31 /* X_V_FOR_NO_EXPRESSION */]: `v-for is missing expression.`,
  11413. [32 /* X_V_FOR_MALFORMED_EXPRESSION */]: `v-for has invalid expression.`,
  11414. [33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */]: `<template v-for> key should be placed on the <template> tag.`,
  11415. [34 /* X_V_BIND_NO_EXPRESSION */]: `v-bind is missing expression.`,
  11416. [35 /* X_V_ON_NO_EXPRESSION */]: `v-on is missing expression.`,
  11417. [36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */]: `Unexpected custom directive on <slot> outlet.`,
  11418. [37 /* X_V_SLOT_MIXED_SLOT_USAGE */]: `Mixed v-slot usage on both the component and nested <template>.` +
  11419. `When there are multiple named slots, all slots should use <template> ` +
  11420. `syntax to avoid scope ambiguity.`,
  11421. [38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */]: `Duplicate slot names found. `,
  11422. [39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */]: `Extraneous children found when component already has explicitly named ` +
  11423. `default slot. These children will be ignored.`,
  11424. [40 /* X_V_SLOT_MISPLACED */]: `v-slot can only be used on components or <template> tags.`,
  11425. [41 /* X_V_MODEL_NO_EXPRESSION */]: `v-model is missing expression.`,
  11426. [42 /* X_V_MODEL_MALFORMED_EXPRESSION */]: `v-model value must be a valid JavaScript member expression.`,
  11427. [43 /* X_V_MODEL_ON_SCOPE_VARIABLE */]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
  11428. [44 /* X_INVALID_EXPRESSION */]: `Error parsing JavaScript expression: `,
  11429. [45 /* X_KEEP_ALIVE_INVALID_CHILDREN */]: `<KeepAlive> expects exactly one child component.`,
  11430. // generic errors
  11431. [46 /* X_PREFIX_ID_NOT_SUPPORTED */]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
  11432. [47 /* X_MODULE_MODE_NOT_SUPPORTED */]: `ES module mode is not supported in this build of compiler.`,
  11433. [48 /* X_CACHE_HANDLER_NOT_SUPPORTED */]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
  11434. [49 /* X_SCOPE_ID_NOT_SUPPORTED */]: `"scopeId" option is only supported in module mode.`,
  11435. // just to fulfill types
  11436. [50 /* __EXTEND_POINT__ */]: ``
  11437. };
  11438. const FRAGMENT = Symbol(( true) ? `Fragment` : 0);
  11439. const TELEPORT = Symbol(( true) ? `Teleport` : 0);
  11440. const SUSPENSE = Symbol(( true) ? `Suspense` : 0);
  11441. const KEEP_ALIVE = Symbol(( true) ? `KeepAlive` : 0);
  11442. const BASE_TRANSITION = Symbol(( true) ? `BaseTransition` : 0);
  11443. const OPEN_BLOCK = Symbol(( true) ? `openBlock` : 0);
  11444. const CREATE_BLOCK = Symbol(( true) ? `createBlock` : 0);
  11445. const CREATE_ELEMENT_BLOCK = Symbol(( true) ? `createElementBlock` : 0);
  11446. const CREATE_VNODE = Symbol(( true) ? `createVNode` : 0);
  11447. const CREATE_ELEMENT_VNODE = Symbol(( true) ? `createElementVNode` : 0);
  11448. const CREATE_COMMENT = Symbol(( true) ? `createCommentVNode` : 0);
  11449. const CREATE_TEXT = Symbol(( true) ? `createTextVNode` : 0);
  11450. const CREATE_STATIC = Symbol(( true) ? `createStaticVNode` : 0);
  11451. const RESOLVE_COMPONENT = Symbol(( true) ? `resolveComponent` : 0);
  11452. const RESOLVE_DYNAMIC_COMPONENT = Symbol(( true) ? `resolveDynamicComponent` : 0);
  11453. const RESOLVE_DIRECTIVE = Symbol(( true) ? `resolveDirective` : 0);
  11454. const RESOLVE_FILTER = Symbol(( true) ? `resolveFilter` : 0);
  11455. const WITH_DIRECTIVES = Symbol(( true) ? `withDirectives` : 0);
  11456. const RENDER_LIST = Symbol(( true) ? `renderList` : 0);
  11457. const RENDER_SLOT = Symbol(( true) ? `renderSlot` : 0);
  11458. const CREATE_SLOTS = Symbol(( true) ? `createSlots` : 0);
  11459. const TO_DISPLAY_STRING = Symbol(( true) ? `toDisplayString` : 0);
  11460. const MERGE_PROPS = Symbol(( true) ? `mergeProps` : 0);
  11461. const NORMALIZE_CLASS = Symbol(( true) ? `normalizeClass` : 0);
  11462. const NORMALIZE_STYLE = Symbol(( true) ? `normalizeStyle` : 0);
  11463. const NORMALIZE_PROPS = Symbol(( true) ? `normalizeProps` : 0);
  11464. const GUARD_REACTIVE_PROPS = Symbol(( true) ? `guardReactiveProps` : 0);
  11465. const TO_HANDLERS = Symbol(( true) ? `toHandlers` : 0);
  11466. const CAMELIZE = Symbol(( true) ? `camelize` : 0);
  11467. const CAPITALIZE = Symbol(( true) ? `capitalize` : 0);
  11468. const TO_HANDLER_KEY = Symbol(( true) ? `toHandlerKey` : 0);
  11469. const SET_BLOCK_TRACKING = Symbol(( true) ? `setBlockTracking` : 0);
  11470. const PUSH_SCOPE_ID = Symbol(( true) ? `pushScopeId` : 0);
  11471. const POP_SCOPE_ID = Symbol(( true) ? `popScopeId` : 0);
  11472. const WITH_CTX = Symbol(( true) ? `withCtx` : 0);
  11473. const UNREF = Symbol(( true) ? `unref` : 0);
  11474. const IS_REF = Symbol(( true) ? `isRef` : 0);
  11475. const WITH_MEMO = Symbol(( true) ? `withMemo` : 0);
  11476. const IS_MEMO_SAME = Symbol(( true) ? `isMemoSame` : 0);
  11477. // Name mapping for runtime helpers that need to be imported from 'vue' in
  11478. // generated code. Make sure these are correctly exported in the runtime!
  11479. // Using `any` here because TS doesn't allow symbols as index type.
  11480. const helperNameMap = {
  11481. [FRAGMENT]: `Fragment`,
  11482. [TELEPORT]: `Teleport`,
  11483. [SUSPENSE]: `Suspense`,
  11484. [KEEP_ALIVE]: `KeepAlive`,
  11485. [BASE_TRANSITION]: `BaseTransition`,
  11486. [OPEN_BLOCK]: `openBlock`,
  11487. [CREATE_BLOCK]: `createBlock`,
  11488. [CREATE_ELEMENT_BLOCK]: `createElementBlock`,
  11489. [CREATE_VNODE]: `createVNode`,
  11490. [CREATE_ELEMENT_VNODE]: `createElementVNode`,
  11491. [CREATE_COMMENT]: `createCommentVNode`,
  11492. [CREATE_TEXT]: `createTextVNode`,
  11493. [CREATE_STATIC]: `createStaticVNode`,
  11494. [RESOLVE_COMPONENT]: `resolveComponent`,
  11495. [RESOLVE_DYNAMIC_COMPONENT]: `resolveDynamicComponent`,
  11496. [RESOLVE_DIRECTIVE]: `resolveDirective`,
  11497. [RESOLVE_FILTER]: `resolveFilter`,
  11498. [WITH_DIRECTIVES]: `withDirectives`,
  11499. [RENDER_LIST]: `renderList`,
  11500. [RENDER_SLOT]: `renderSlot`,
  11501. [CREATE_SLOTS]: `createSlots`,
  11502. [TO_DISPLAY_STRING]: `toDisplayString`,
  11503. [MERGE_PROPS]: `mergeProps`,
  11504. [NORMALIZE_CLASS]: `normalizeClass`,
  11505. [NORMALIZE_STYLE]: `normalizeStyle`,
  11506. [NORMALIZE_PROPS]: `normalizeProps`,
  11507. [GUARD_REACTIVE_PROPS]: `guardReactiveProps`,
  11508. [TO_HANDLERS]: `toHandlers`,
  11509. [CAMELIZE]: `camelize`,
  11510. [CAPITALIZE]: `capitalize`,
  11511. [TO_HANDLER_KEY]: `toHandlerKey`,
  11512. [SET_BLOCK_TRACKING]: `setBlockTracking`,
  11513. [PUSH_SCOPE_ID]: `pushScopeId`,
  11514. [POP_SCOPE_ID]: `popScopeId`,
  11515. [WITH_CTX]: `withCtx`,
  11516. [UNREF]: `unref`,
  11517. [IS_REF]: `isRef`,
  11518. [WITH_MEMO]: `withMemo`,
  11519. [IS_MEMO_SAME]: `isMemoSame`
  11520. };
  11521. function registerRuntimeHelpers(helpers) {
  11522. Object.getOwnPropertySymbols(helpers).forEach(s => {
  11523. helperNameMap[s] = helpers[s];
  11524. });
  11525. }
  11526. // AST Utilities ---------------------------------------------------------------
  11527. // Some expressions, e.g. sequence and conditional expressions, are never
  11528. // associated with template nodes, so their source locations are just a stub.
  11529. // Container types like CompoundExpression also don't need a real location.
  11530. const locStub = {
  11531. source: '',
  11532. start: { line: 1, column: 1, offset: 0 },
  11533. end: { line: 1, column: 1, offset: 0 }
  11534. };
  11535. function createRoot(children, loc = locStub) {
  11536. return {
  11537. type: 0 /* ROOT */,
  11538. children,
  11539. helpers: [],
  11540. components: [],
  11541. directives: [],
  11542. hoists: [],
  11543. imports: [],
  11544. cached: 0,
  11545. temps: 0,
  11546. codegenNode: undefined,
  11547. loc
  11548. };
  11549. }
  11550. function createVNodeCall(context, tag, props, children, patchFlag, dynamicProps, directives, isBlock = false, disableTracking = false, isComponent = false, loc = locStub) {
  11551. if (context) {
  11552. if (isBlock) {
  11553. context.helper(OPEN_BLOCK);
  11554. context.helper(getVNodeBlockHelper(context.inSSR, isComponent));
  11555. }
  11556. else {
  11557. context.helper(getVNodeHelper(context.inSSR, isComponent));
  11558. }
  11559. if (directives) {
  11560. context.helper(WITH_DIRECTIVES);
  11561. }
  11562. }
  11563. return {
  11564. type: 13 /* VNODE_CALL */,
  11565. tag,
  11566. props,
  11567. children,
  11568. patchFlag,
  11569. dynamicProps,
  11570. directives,
  11571. isBlock,
  11572. disableTracking,
  11573. isComponent,
  11574. loc
  11575. };
  11576. }
  11577. function createArrayExpression(elements, loc = locStub) {
  11578. return {
  11579. type: 17 /* JS_ARRAY_EXPRESSION */,
  11580. loc,
  11581. elements
  11582. };
  11583. }
  11584. function createObjectExpression(properties, loc = locStub) {
  11585. return {
  11586. type: 15 /* JS_OBJECT_EXPRESSION */,
  11587. loc,
  11588. properties
  11589. };
  11590. }
  11591. function createObjectProperty(key, value) {
  11592. return {
  11593. type: 16 /* JS_PROPERTY */,
  11594. loc: locStub,
  11595. key: (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(key) ? createSimpleExpression(key, true) : key,
  11596. value
  11597. };
  11598. }
  11599. function createSimpleExpression(content, isStatic = false, loc = locStub, constType = 0 /* NOT_CONSTANT */) {
  11600. return {
  11601. type: 4 /* SIMPLE_EXPRESSION */,
  11602. loc,
  11603. content,
  11604. isStatic,
  11605. constType: isStatic ? 3 /* CAN_STRINGIFY */ : constType
  11606. };
  11607. }
  11608. function createInterpolation(content, loc) {
  11609. return {
  11610. type: 5 /* INTERPOLATION */,
  11611. loc,
  11612. content: (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(content)
  11613. ? createSimpleExpression(content, false, loc)
  11614. : content
  11615. };
  11616. }
  11617. function createCompoundExpression(children, loc = locStub) {
  11618. return {
  11619. type: 8 /* COMPOUND_EXPRESSION */,
  11620. loc,
  11621. children
  11622. };
  11623. }
  11624. function createCallExpression(callee, args = [], loc = locStub) {
  11625. return {
  11626. type: 14 /* JS_CALL_EXPRESSION */,
  11627. loc,
  11628. callee,
  11629. arguments: args
  11630. };
  11631. }
  11632. function createFunctionExpression(params, returns = undefined, newline = false, isSlot = false, loc = locStub) {
  11633. return {
  11634. type: 18 /* JS_FUNCTION_EXPRESSION */,
  11635. params,
  11636. returns,
  11637. newline,
  11638. isSlot,
  11639. loc
  11640. };
  11641. }
  11642. function createConditionalExpression(test, consequent, alternate, newline = true) {
  11643. return {
  11644. type: 19 /* JS_CONDITIONAL_EXPRESSION */,
  11645. test,
  11646. consequent,
  11647. alternate,
  11648. newline,
  11649. loc: locStub
  11650. };
  11651. }
  11652. function createCacheExpression(index, value, isVNode = false) {
  11653. return {
  11654. type: 20 /* JS_CACHE_EXPRESSION */,
  11655. index,
  11656. value,
  11657. isVNode,
  11658. loc: locStub
  11659. };
  11660. }
  11661. function createBlockStatement(body) {
  11662. return {
  11663. type: 21 /* JS_BLOCK_STATEMENT */,
  11664. body,
  11665. loc: locStub
  11666. };
  11667. }
  11668. function createTemplateLiteral(elements) {
  11669. return {
  11670. type: 22 /* JS_TEMPLATE_LITERAL */,
  11671. elements,
  11672. loc: locStub
  11673. };
  11674. }
  11675. function createIfStatement(test, consequent, alternate) {
  11676. return {
  11677. type: 23 /* JS_IF_STATEMENT */,
  11678. test,
  11679. consequent,
  11680. alternate,
  11681. loc: locStub
  11682. };
  11683. }
  11684. function createAssignmentExpression(left, right) {
  11685. return {
  11686. type: 24 /* JS_ASSIGNMENT_EXPRESSION */,
  11687. left,
  11688. right,
  11689. loc: locStub
  11690. };
  11691. }
  11692. function createSequenceExpression(expressions) {
  11693. return {
  11694. type: 25 /* JS_SEQUENCE_EXPRESSION */,
  11695. expressions,
  11696. loc: locStub
  11697. };
  11698. }
  11699. function createReturnStatement(returns) {
  11700. return {
  11701. type: 26 /* JS_RETURN_STATEMENT */,
  11702. returns,
  11703. loc: locStub
  11704. };
  11705. }
  11706. const isStaticExp = (p) => p.type === 4 /* SIMPLE_EXPRESSION */ && p.isStatic;
  11707. const isBuiltInType = (tag, expected) => tag === expected || tag === (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hyphenate)(expected);
  11708. function isCoreComponent(tag) {
  11709. if (isBuiltInType(tag, 'Teleport')) {
  11710. return TELEPORT;
  11711. }
  11712. else if (isBuiltInType(tag, 'Suspense')) {
  11713. return SUSPENSE;
  11714. }
  11715. else if (isBuiltInType(tag, 'KeepAlive')) {
  11716. return KEEP_ALIVE;
  11717. }
  11718. else if (isBuiltInType(tag, 'BaseTransition')) {
  11719. return BASE_TRANSITION;
  11720. }
  11721. }
  11722. const nonIdentifierRE = /^\d|[^\$\w]/;
  11723. const isSimpleIdentifier = (name) => !nonIdentifierRE.test(name);
  11724. const validFirstIdentCharRE = /[A-Za-z_$\xA0-\uFFFF]/;
  11725. const validIdentCharRE = /[\.\?\w$\xA0-\uFFFF]/;
  11726. const whitespaceRE = /\s+[.[]\s*|\s*[.[]\s+/g;
  11727. /**
  11728. * Simple lexer to check if an expression is a member expression. This is
  11729. * lax and only checks validity at the root level (i.e. does not validate exps
  11730. * inside square brackets), but it's ok since these are only used on template
  11731. * expressions and false positives are invalid expressions in the first place.
  11732. */
  11733. const isMemberExpressionBrowser = (path) => {
  11734. // remove whitespaces around . or [ first
  11735. path = path.trim().replace(whitespaceRE, s => s.trim());
  11736. let state = 0 /* inMemberExp */;
  11737. let stateStack = [];
  11738. let currentOpenBracketCount = 0;
  11739. let currentOpenParensCount = 0;
  11740. let currentStringType = null;
  11741. for (let i = 0; i < path.length; i++) {
  11742. const char = path.charAt(i);
  11743. switch (state) {
  11744. case 0 /* inMemberExp */:
  11745. if (char === '[') {
  11746. stateStack.push(state);
  11747. state = 1 /* inBrackets */;
  11748. currentOpenBracketCount++;
  11749. }
  11750. else if (char === '(') {
  11751. stateStack.push(state);
  11752. state = 2 /* inParens */;
  11753. currentOpenParensCount++;
  11754. }
  11755. else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) {
  11756. return false;
  11757. }
  11758. break;
  11759. case 1 /* inBrackets */:
  11760. if (char === `'` || char === `"` || char === '`') {
  11761. stateStack.push(state);
  11762. state = 3 /* inString */;
  11763. currentStringType = char;
  11764. }
  11765. else if (char === `[`) {
  11766. currentOpenBracketCount++;
  11767. }
  11768. else if (char === `]`) {
  11769. if (!--currentOpenBracketCount) {
  11770. state = stateStack.pop();
  11771. }
  11772. }
  11773. break;
  11774. case 2 /* inParens */:
  11775. if (char === `'` || char === `"` || char === '`') {
  11776. stateStack.push(state);
  11777. state = 3 /* inString */;
  11778. currentStringType = char;
  11779. }
  11780. else if (char === `(`) {
  11781. currentOpenParensCount++;
  11782. }
  11783. else if (char === `)`) {
  11784. // if the exp ends as a call then it should not be considered valid
  11785. if (i === path.length - 1) {
  11786. return false;
  11787. }
  11788. if (!--currentOpenParensCount) {
  11789. state = stateStack.pop();
  11790. }
  11791. }
  11792. break;
  11793. case 3 /* inString */:
  11794. if (char === currentStringType) {
  11795. state = stateStack.pop();
  11796. currentStringType = null;
  11797. }
  11798. break;
  11799. }
  11800. }
  11801. return !currentOpenBracketCount && !currentOpenParensCount;
  11802. };
  11803. const isMemberExpressionNode = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NOOP
  11804. ;
  11805. const isMemberExpression = isMemberExpressionBrowser
  11806. ;
  11807. function getInnerRange(loc, offset, length) {
  11808. const source = loc.source.slice(offset, offset + length);
  11809. const newLoc = {
  11810. source,
  11811. start: advancePositionWithClone(loc.start, loc.source, offset),
  11812. end: loc.end
  11813. };
  11814. if (length != null) {
  11815. newLoc.end = advancePositionWithClone(loc.start, loc.source, offset + length);
  11816. }
  11817. return newLoc;
  11818. }
  11819. function advancePositionWithClone(pos, source, numberOfCharacters = source.length) {
  11820. return advancePositionWithMutation((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({}, pos), source, numberOfCharacters);
  11821. }
  11822. // advance by mutation without cloning (for performance reasons), since this
  11823. // gets called a lot in the parser
  11824. function advancePositionWithMutation(pos, source, numberOfCharacters = source.length) {
  11825. let linesCount = 0;
  11826. let lastNewLinePos = -1;
  11827. for (let i = 0; i < numberOfCharacters; i++) {
  11828. if (source.charCodeAt(i) === 10 /* newline char code */) {
  11829. linesCount++;
  11830. lastNewLinePos = i;
  11831. }
  11832. }
  11833. pos.offset += numberOfCharacters;
  11834. pos.line += linesCount;
  11835. pos.column =
  11836. lastNewLinePos === -1
  11837. ? pos.column + numberOfCharacters
  11838. : numberOfCharacters - lastNewLinePos;
  11839. return pos;
  11840. }
  11841. function assert(condition, msg) {
  11842. /* istanbul ignore if */
  11843. if (!condition) {
  11844. throw new Error(msg || `unexpected compiler condition`);
  11845. }
  11846. }
  11847. function findDir(node, name, allowEmpty = false) {
  11848. for (let i = 0; i < node.props.length; i++) {
  11849. const p = node.props[i];
  11850. if (p.type === 7 /* DIRECTIVE */ &&
  11851. (allowEmpty || p.exp) &&
  11852. ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(name) ? p.name === name : name.test(p.name))) {
  11853. return p;
  11854. }
  11855. }
  11856. }
  11857. function findProp(node, name, dynamicOnly = false, allowEmpty = false) {
  11858. for (let i = 0; i < node.props.length; i++) {
  11859. const p = node.props[i];
  11860. if (p.type === 6 /* ATTRIBUTE */) {
  11861. if (dynamicOnly)
  11862. continue;
  11863. if (p.name === name && (p.value || allowEmpty)) {
  11864. return p;
  11865. }
  11866. }
  11867. else if (p.name === 'bind' &&
  11868. (p.exp || allowEmpty) &&
  11869. isStaticArgOf(p.arg, name)) {
  11870. return p;
  11871. }
  11872. }
  11873. }
  11874. function isStaticArgOf(arg, name) {
  11875. return !!(arg && isStaticExp(arg) && arg.content === name);
  11876. }
  11877. function hasDynamicKeyVBind(node) {
  11878. return node.props.some(p => p.type === 7 /* DIRECTIVE */ &&
  11879. p.name === 'bind' &&
  11880. (!p.arg || // v-bind="obj"
  11881. p.arg.type !== 4 /* SIMPLE_EXPRESSION */ || // v-bind:[_ctx.foo]
  11882. !p.arg.isStatic) // v-bind:[foo]
  11883. );
  11884. }
  11885. function isText(node) {
  11886. return node.type === 5 /* INTERPOLATION */ || node.type === 2 /* TEXT */;
  11887. }
  11888. function isVSlot(p) {
  11889. return p.type === 7 /* DIRECTIVE */ && p.name === 'slot';
  11890. }
  11891. function isTemplateNode(node) {
  11892. return (node.type === 1 /* ELEMENT */ && node.tagType === 3 /* TEMPLATE */);
  11893. }
  11894. function isSlotOutlet(node) {
  11895. return node.type === 1 /* ELEMENT */ && node.tagType === 2 /* SLOT */;
  11896. }
  11897. function getVNodeHelper(ssr, isComponent) {
  11898. return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
  11899. }
  11900. function getVNodeBlockHelper(ssr, isComponent) {
  11901. return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
  11902. }
  11903. const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
  11904. function getUnnormalizedProps(props, callPath = []) {
  11905. if (props &&
  11906. !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(props) &&
  11907. props.type === 14 /* JS_CALL_EXPRESSION */) {
  11908. const callee = props.callee;
  11909. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(callee) && propsHelperSet.has(callee)) {
  11910. return getUnnormalizedProps(props.arguments[0], callPath.concat(props));
  11911. }
  11912. }
  11913. return [props, callPath];
  11914. }
  11915. function injectProp(node, prop, context) {
  11916. let propsWithInjection;
  11917. /**
  11918. * 1. mergeProps(...)
  11919. * 2. toHandlers(...)
  11920. * 3. normalizeProps(...)
  11921. * 4. normalizeProps(guardReactiveProps(...))
  11922. *
  11923. * we need to get the real props before normalization
  11924. */
  11925. let props = node.type === 13 /* VNODE_CALL */ ? node.props : node.arguments[2];
  11926. let callPath = [];
  11927. let parentCall;
  11928. if (props &&
  11929. !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(props) &&
  11930. props.type === 14 /* JS_CALL_EXPRESSION */) {
  11931. const ret = getUnnormalizedProps(props);
  11932. props = ret[0];
  11933. callPath = ret[1];
  11934. parentCall = callPath[callPath.length - 1];
  11935. }
  11936. if (props == null || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(props)) {
  11937. propsWithInjection = createObjectExpression([prop]);
  11938. }
  11939. else if (props.type === 14 /* JS_CALL_EXPRESSION */) {
  11940. // merged props... add ours
  11941. // only inject key to object literal if it's the first argument so that
  11942. // if doesn't override user provided keys
  11943. const first = props.arguments[0];
  11944. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(first) && first.type === 15 /* JS_OBJECT_EXPRESSION */) {
  11945. first.properties.unshift(prop);
  11946. }
  11947. else {
  11948. if (props.callee === TO_HANDLERS) {
  11949. // #2366
  11950. propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [
  11951. createObjectExpression([prop]),
  11952. props
  11953. ]);
  11954. }
  11955. else {
  11956. props.arguments.unshift(createObjectExpression([prop]));
  11957. }
  11958. }
  11959. !propsWithInjection && (propsWithInjection = props);
  11960. }
  11961. else if (props.type === 15 /* JS_OBJECT_EXPRESSION */) {
  11962. let alreadyExists = false;
  11963. // check existing key to avoid overriding user provided keys
  11964. if (prop.key.type === 4 /* SIMPLE_EXPRESSION */) {
  11965. const propKeyName = prop.key.content;
  11966. alreadyExists = props.properties.some(p => p.key.type === 4 /* SIMPLE_EXPRESSION */ &&
  11967. p.key.content === propKeyName);
  11968. }
  11969. if (!alreadyExists) {
  11970. props.properties.unshift(prop);
  11971. }
  11972. propsWithInjection = props;
  11973. }
  11974. else {
  11975. // single v-bind with expression, return a merged replacement
  11976. propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [
  11977. createObjectExpression([prop]),
  11978. props
  11979. ]);
  11980. // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(props))`,
  11981. // it will be rewritten as `normalizeProps(mergeProps({ key: 0 }, props))`,
  11982. // the `guardReactiveProps` will no longer be needed
  11983. if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) {
  11984. parentCall = callPath[callPath.length - 2];
  11985. }
  11986. }
  11987. if (node.type === 13 /* VNODE_CALL */) {
  11988. if (parentCall) {
  11989. parentCall.arguments[0] = propsWithInjection;
  11990. }
  11991. else {
  11992. node.props = propsWithInjection;
  11993. }
  11994. }
  11995. else {
  11996. if (parentCall) {
  11997. parentCall.arguments[0] = propsWithInjection;
  11998. }
  11999. else {
  12000. node.arguments[2] = propsWithInjection;
  12001. }
  12002. }
  12003. }
  12004. function toValidAssetId(name, type) {
  12005. // see issue#4422, we need adding identifier on validAssetId if variable `name` has specific character
  12006. return `_${type}_${name.replace(/[^\w]/g, (searchValue, replaceValue) => {
  12007. return searchValue === '-' ? '_' : name.charCodeAt(replaceValue).toString();
  12008. })}`;
  12009. }
  12010. // Check if a node contains expressions that reference current context scope ids
  12011. function hasScopeRef(node, ids) {
  12012. if (!node || Object.keys(ids).length === 0) {
  12013. return false;
  12014. }
  12015. switch (node.type) {
  12016. case 1 /* ELEMENT */:
  12017. for (let i = 0; i < node.props.length; i++) {
  12018. const p = node.props[i];
  12019. if (p.type === 7 /* DIRECTIVE */ &&
  12020. (hasScopeRef(p.arg, ids) || hasScopeRef(p.exp, ids))) {
  12021. return true;
  12022. }
  12023. }
  12024. return node.children.some(c => hasScopeRef(c, ids));
  12025. case 11 /* FOR */:
  12026. if (hasScopeRef(node.source, ids)) {
  12027. return true;
  12028. }
  12029. return node.children.some(c => hasScopeRef(c, ids));
  12030. case 9 /* IF */:
  12031. return node.branches.some(b => hasScopeRef(b, ids));
  12032. case 10 /* IF_BRANCH */:
  12033. if (hasScopeRef(node.condition, ids)) {
  12034. return true;
  12035. }
  12036. return node.children.some(c => hasScopeRef(c, ids));
  12037. case 4 /* SIMPLE_EXPRESSION */:
  12038. return (!node.isStatic &&
  12039. isSimpleIdentifier(node.content) &&
  12040. !!ids[node.content]);
  12041. case 8 /* COMPOUND_EXPRESSION */:
  12042. return node.children.some(c => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(c) && hasScopeRef(c, ids));
  12043. case 5 /* INTERPOLATION */:
  12044. case 12 /* TEXT_CALL */:
  12045. return hasScopeRef(node.content, ids);
  12046. case 2 /* TEXT */:
  12047. case 3 /* COMMENT */:
  12048. return false;
  12049. default:
  12050. if ((true)) ;
  12051. return false;
  12052. }
  12053. }
  12054. function getMemoedVNodeCall(node) {
  12055. if (node.type === 14 /* JS_CALL_EXPRESSION */ && node.callee === WITH_MEMO) {
  12056. return node.arguments[1].returns;
  12057. }
  12058. else {
  12059. return node;
  12060. }
  12061. }
  12062. function makeBlock(node, { helper, removeHelper, inSSR }) {
  12063. if (!node.isBlock) {
  12064. node.isBlock = true;
  12065. removeHelper(getVNodeHelper(inSSR, node.isComponent));
  12066. helper(OPEN_BLOCK);
  12067. helper(getVNodeBlockHelper(inSSR, node.isComponent));
  12068. }
  12069. }
  12070. const deprecationData = {
  12071. ["COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */]: {
  12072. message: `Platform-native elements with "is" prop will no longer be ` +
  12073. `treated as components in Vue 3 unless the "is" value is explicitly ` +
  12074. `prefixed with "vue:".`,
  12075. link: `https://v3-migration.vuejs.org/breaking-changes/custom-elements-interop.html`
  12076. },
  12077. ["COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */]: {
  12078. message: key => `.sync modifier for v-bind has been removed. Use v-model with ` +
  12079. `argument instead. \`v-bind:${key}.sync\` should be changed to ` +
  12080. `\`v-model:${key}\`.`,
  12081. link: `https://v3-migration.vuejs.org/breaking-changes/v-model.html`
  12082. },
  12083. ["COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */]: {
  12084. message: `.prop modifier for v-bind has been removed and no longer necessary. ` +
  12085. `Vue 3 will automatically set a binding as DOM property when appropriate.`
  12086. },
  12087. ["COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */]: {
  12088. message: `v-bind="obj" usage is now order sensitive and behaves like JavaScript ` +
  12089. `object spread: it will now overwrite an existing non-mergeable attribute ` +
  12090. `that appears before v-bind in the case of conflict. ` +
  12091. `To retain 2.x behavior, move v-bind to make it the first attribute. ` +
  12092. `You can also suppress this warning if the usage is intended.`,
  12093. link: `https://v3-migration.vuejs.org/breaking-changes/v-bind.html`
  12094. },
  12095. ["COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */]: {
  12096. message: `.native modifier for v-on has been removed as is no longer necessary.`,
  12097. link: `https://v3-migration.vuejs.org/breaking-changes/v-on-native-modifier-removed.html`
  12098. },
  12099. ["COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */]: {
  12100. message: `v-if / v-for precedence when used on the same element has changed ` +
  12101. `in Vue 3: v-if now takes higher precedence and will no longer have ` +
  12102. `access to v-for scope variables. It is best to avoid the ambiguity ` +
  12103. `with <template> tags or use a computed property that filters v-for ` +
  12104. `data source.`,
  12105. link: `https://v3-migration.vuejs.org/breaking-changes/v-if-v-for.html`
  12106. },
  12107. ["COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */]: {
  12108. message: `<template> with no special directives will render as a native template ` +
  12109. `element instead of its inner content in Vue 3.`
  12110. },
  12111. ["COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */]: {
  12112. message: `"inline-template" has been removed in Vue 3.`,
  12113. link: `https://v3-migration.vuejs.org/breaking-changes/inline-template-attribute.html`
  12114. },
  12115. ["COMPILER_FILTER" /* COMPILER_FILTERS */]: {
  12116. message: `filters have been removed in Vue 3. ` +
  12117. `The "|" symbol will be treated as native JavaScript bitwise OR operator. ` +
  12118. `Use method calls or computed properties instead.`,
  12119. link: `https://v3-migration.vuejs.org/breaking-changes/filters.html`
  12120. }
  12121. };
  12122. function getCompatValue(key, context) {
  12123. const config = context.options
  12124. ? context.options.compatConfig
  12125. : context.compatConfig;
  12126. const value = config && config[key];
  12127. if (key === 'MODE') {
  12128. return value || 3; // compiler defaults to v3 behavior
  12129. }
  12130. else {
  12131. return value;
  12132. }
  12133. }
  12134. function isCompatEnabled(key, context) {
  12135. const mode = getCompatValue('MODE', context);
  12136. const value = getCompatValue(key, context);
  12137. // in v3 mode, only enable if explicitly set to true
  12138. // otherwise enable for any non-false value
  12139. return mode === 3 ? value === true : value !== false;
  12140. }
  12141. function checkCompatEnabled(key, context, loc, ...args) {
  12142. const enabled = isCompatEnabled(key, context);
  12143. if (( true) && enabled) {
  12144. warnDeprecation(key, context, loc, ...args);
  12145. }
  12146. return enabled;
  12147. }
  12148. function warnDeprecation(key, context, loc, ...args) {
  12149. const val = getCompatValue(key, context);
  12150. if (val === 'suppress-warning') {
  12151. return;
  12152. }
  12153. const { message, link } = deprecationData[key];
  12154. const msg = `(deprecation ${key}) ${typeof message === 'function' ? message(...args) : message}${link ? `\n Details: ${link}` : ``}`;
  12155. const err = new SyntaxError(msg);
  12156. err.code = key;
  12157. if (loc)
  12158. err.loc = loc;
  12159. context.onWarn(err);
  12160. }
  12161. // The default decoder only provides escapes for characters reserved as part of
  12162. // the template syntax, and is only used if the custom renderer did not provide
  12163. // a platform-specific decoder.
  12164. const decodeRE = /&(gt|lt|amp|apos|quot);/g;
  12165. const decodeMap = {
  12166. gt: '>',
  12167. lt: '<',
  12168. amp: '&',
  12169. apos: "'",
  12170. quot: '"'
  12171. };
  12172. const defaultParserOptions = {
  12173. delimiters: [`{{`, `}}`],
  12174. getNamespace: () => 0 /* HTML */,
  12175. getTextMode: () => 0 /* DATA */,
  12176. isVoidTag: _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NO,
  12177. isPreTag: _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NO,
  12178. isCustomElement: _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NO,
  12179. decodeEntities: (rawText) => rawText.replace(decodeRE, (_, p1) => decodeMap[p1]),
  12180. onError: defaultOnError,
  12181. onWarn: defaultOnWarn,
  12182. comments: ("development" !== 'production')
  12183. };
  12184. function baseParse(content, options = {}) {
  12185. const context = createParserContext(content, options);
  12186. const start = getCursor(context);
  12187. return createRoot(parseChildren(context, 0 /* DATA */, []), getSelection(context, start));
  12188. }
  12189. function createParserContext(content, rawOptions) {
  12190. const options = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({}, defaultParserOptions);
  12191. let key;
  12192. for (key in rawOptions) {
  12193. // @ts-ignore
  12194. options[key] =
  12195. rawOptions[key] === undefined
  12196. ? defaultParserOptions[key]
  12197. : rawOptions[key];
  12198. }
  12199. return {
  12200. options,
  12201. column: 1,
  12202. line: 1,
  12203. offset: 0,
  12204. originalSource: content,
  12205. source: content,
  12206. inPre: false,
  12207. inVPre: false,
  12208. onWarn: options.onWarn
  12209. };
  12210. }
  12211. function parseChildren(context, mode, ancestors) {
  12212. const parent = last(ancestors);
  12213. const ns = parent ? parent.ns : 0 /* HTML */;
  12214. const nodes = [];
  12215. while (!isEnd(context, mode, ancestors)) {
  12216. const s = context.source;
  12217. let node = undefined;
  12218. if (mode === 0 /* DATA */ || mode === 1 /* RCDATA */) {
  12219. if (!context.inVPre && startsWith(s, context.options.delimiters[0])) {
  12220. // '{{'
  12221. node = parseInterpolation(context, mode);
  12222. }
  12223. else if (mode === 0 /* DATA */ && s[0] === '<') {
  12224. // https://html.spec.whatwg.org/multipage/parsing.html#tag-open-state
  12225. if (s.length === 1) {
  12226. emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 1);
  12227. }
  12228. else if (s[1] === '!') {
  12229. // https://html.spec.whatwg.org/multipage/parsing.html#markup-declaration-open-state
  12230. if (startsWith(s, '<!--')) {
  12231. node = parseComment(context);
  12232. }
  12233. else if (startsWith(s, '<!DOCTYPE')) {
  12234. // Ignore DOCTYPE by a limitation.
  12235. node = parseBogusComment(context);
  12236. }
  12237. else if (startsWith(s, '<![CDATA[')) {
  12238. if (ns !== 0 /* HTML */) {
  12239. node = parseCDATA(context, ancestors);
  12240. }
  12241. else {
  12242. emitError(context, 1 /* CDATA_IN_HTML_CONTENT */);
  12243. node = parseBogusComment(context);
  12244. }
  12245. }
  12246. else {
  12247. emitError(context, 11 /* INCORRECTLY_OPENED_COMMENT */);
  12248. node = parseBogusComment(context);
  12249. }
  12250. }
  12251. else if (s[1] === '/') {
  12252. // https://html.spec.whatwg.org/multipage/parsing.html#end-tag-open-state
  12253. if (s.length === 2) {
  12254. emitError(context, 5 /* EOF_BEFORE_TAG_NAME */, 2);
  12255. }
  12256. else if (s[2] === '>') {
  12257. emitError(context, 14 /* MISSING_END_TAG_NAME */, 2);
  12258. advanceBy(context, 3);
  12259. continue;
  12260. }
  12261. else if (/[a-z]/i.test(s[2])) {
  12262. emitError(context, 23 /* X_INVALID_END_TAG */);
  12263. parseTag(context, 1 /* End */, parent);
  12264. continue;
  12265. }
  12266. else {
  12267. emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 2);
  12268. node = parseBogusComment(context);
  12269. }
  12270. }
  12271. else if (/[a-z]/i.test(s[1])) {
  12272. node = parseElement(context, ancestors);
  12273. // 2.x <template> with no directive compat
  12274. if (isCompatEnabled("COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */, context) &&
  12275. node &&
  12276. node.tag === 'template' &&
  12277. !node.props.some(p => p.type === 7 /* DIRECTIVE */ &&
  12278. isSpecialTemplateDirective(p.name))) {
  12279. ( true) &&
  12280. warnDeprecation("COMPILER_NATIVE_TEMPLATE" /* COMPILER_NATIVE_TEMPLATE */, context, node.loc);
  12281. node = node.children;
  12282. }
  12283. }
  12284. else if (s[1] === '?') {
  12285. emitError(context, 21 /* UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME */, 1);
  12286. node = parseBogusComment(context);
  12287. }
  12288. else {
  12289. emitError(context, 12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */, 1);
  12290. }
  12291. }
  12292. }
  12293. if (!node) {
  12294. node = parseText(context, mode);
  12295. }
  12296. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(node)) {
  12297. for (let i = 0; i < node.length; i++) {
  12298. pushNode(nodes, node[i]);
  12299. }
  12300. }
  12301. else {
  12302. pushNode(nodes, node);
  12303. }
  12304. }
  12305. // Whitespace handling strategy like v2
  12306. let removedWhitespace = false;
  12307. if (mode !== 2 /* RAWTEXT */ && mode !== 1 /* RCDATA */) {
  12308. const shouldCondense = context.options.whitespace !== 'preserve';
  12309. for (let i = 0; i < nodes.length; i++) {
  12310. const node = nodes[i];
  12311. if (!context.inPre && node.type === 2 /* TEXT */) {
  12312. if (!/[^\t\r\n\f ]/.test(node.content)) {
  12313. const prev = nodes[i - 1];
  12314. const next = nodes[i + 1];
  12315. // Remove if:
  12316. // - the whitespace is the first or last node, or:
  12317. // - (condense mode) the whitespace is adjacent to a comment, or:
  12318. // - (condense mode) the whitespace is between two elements AND contains newline
  12319. if (!prev ||
  12320. !next ||
  12321. (shouldCondense &&
  12322. (prev.type === 3 /* COMMENT */ ||
  12323. next.type === 3 /* COMMENT */ ||
  12324. (prev.type === 1 /* ELEMENT */ &&
  12325. next.type === 1 /* ELEMENT */ &&
  12326. /[\r\n]/.test(node.content))))) {
  12327. removedWhitespace = true;
  12328. nodes[i] = null;
  12329. }
  12330. else {
  12331. // Otherwise, the whitespace is condensed into a single space
  12332. node.content = ' ';
  12333. }
  12334. }
  12335. else if (shouldCondense) {
  12336. // in condense mode, consecutive whitespaces in text are condensed
  12337. // down to a single space.
  12338. node.content = node.content.replace(/[\t\r\n\f ]+/g, ' ');
  12339. }
  12340. }
  12341. // Remove comment nodes if desired by configuration.
  12342. else if (node.type === 3 /* COMMENT */ && !context.options.comments) {
  12343. removedWhitespace = true;
  12344. nodes[i] = null;
  12345. }
  12346. }
  12347. if (context.inPre && parent && context.options.isPreTag(parent.tag)) {
  12348. // remove leading newline per html spec
  12349. // https://html.spec.whatwg.org/multipage/grouping-content.html#the-pre-element
  12350. const first = nodes[0];
  12351. if (first && first.type === 2 /* TEXT */) {
  12352. first.content = first.content.replace(/^\r?\n/, '');
  12353. }
  12354. }
  12355. }
  12356. return removedWhitespace ? nodes.filter(Boolean) : nodes;
  12357. }
  12358. function pushNode(nodes, node) {
  12359. if (node.type === 2 /* TEXT */) {
  12360. const prev = last(nodes);
  12361. // Merge if both this and the previous node are text and those are
  12362. // consecutive. This happens for cases like "a < b".
  12363. if (prev &&
  12364. prev.type === 2 /* TEXT */ &&
  12365. prev.loc.end.offset === node.loc.start.offset) {
  12366. prev.content += node.content;
  12367. prev.loc.end = node.loc.end;
  12368. prev.loc.source += node.loc.source;
  12369. return;
  12370. }
  12371. }
  12372. nodes.push(node);
  12373. }
  12374. function parseCDATA(context, ancestors) {
  12375. advanceBy(context, 9);
  12376. const nodes = parseChildren(context, 3 /* CDATA */, ancestors);
  12377. if (context.source.length === 0) {
  12378. emitError(context, 6 /* EOF_IN_CDATA */);
  12379. }
  12380. else {
  12381. advanceBy(context, 3);
  12382. }
  12383. return nodes;
  12384. }
  12385. function parseComment(context) {
  12386. const start = getCursor(context);
  12387. let content;
  12388. // Regular comment.
  12389. const match = /--(\!)?>/.exec(context.source);
  12390. if (!match) {
  12391. content = context.source.slice(4);
  12392. advanceBy(context, context.source.length);
  12393. emitError(context, 7 /* EOF_IN_COMMENT */);
  12394. }
  12395. else {
  12396. if (match.index <= 3) {
  12397. emitError(context, 0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */);
  12398. }
  12399. if (match[1]) {
  12400. emitError(context, 10 /* INCORRECTLY_CLOSED_COMMENT */);
  12401. }
  12402. content = context.source.slice(4, match.index);
  12403. // Advancing with reporting nested comments.
  12404. const s = context.source.slice(0, match.index);
  12405. let prevIndex = 1, nestedIndex = 0;
  12406. while ((nestedIndex = s.indexOf('<!--', prevIndex)) !== -1) {
  12407. advanceBy(context, nestedIndex - prevIndex + 1);
  12408. if (nestedIndex + 4 < s.length) {
  12409. emitError(context, 16 /* NESTED_COMMENT */);
  12410. }
  12411. prevIndex = nestedIndex + 1;
  12412. }
  12413. advanceBy(context, match.index + match[0].length - prevIndex + 1);
  12414. }
  12415. return {
  12416. type: 3 /* COMMENT */,
  12417. content,
  12418. loc: getSelection(context, start)
  12419. };
  12420. }
  12421. function parseBogusComment(context) {
  12422. const start = getCursor(context);
  12423. const contentStart = context.source[1] === '?' ? 1 : 2;
  12424. let content;
  12425. const closeIndex = context.source.indexOf('>');
  12426. if (closeIndex === -1) {
  12427. content = context.source.slice(contentStart);
  12428. advanceBy(context, context.source.length);
  12429. }
  12430. else {
  12431. content = context.source.slice(contentStart, closeIndex);
  12432. advanceBy(context, closeIndex + 1);
  12433. }
  12434. return {
  12435. type: 3 /* COMMENT */,
  12436. content,
  12437. loc: getSelection(context, start)
  12438. };
  12439. }
  12440. function parseElement(context, ancestors) {
  12441. // Start tag.
  12442. const wasInPre = context.inPre;
  12443. const wasInVPre = context.inVPre;
  12444. const parent = last(ancestors);
  12445. const element = parseTag(context, 0 /* Start */, parent);
  12446. const isPreBoundary = context.inPre && !wasInPre;
  12447. const isVPreBoundary = context.inVPre && !wasInVPre;
  12448. if (element.isSelfClosing || context.options.isVoidTag(element.tag)) {
  12449. // #4030 self-closing <pre> tag
  12450. if (isPreBoundary) {
  12451. context.inPre = false;
  12452. }
  12453. if (isVPreBoundary) {
  12454. context.inVPre = false;
  12455. }
  12456. return element;
  12457. }
  12458. // Children.
  12459. ancestors.push(element);
  12460. const mode = context.options.getTextMode(element, parent);
  12461. const children = parseChildren(context, mode, ancestors);
  12462. ancestors.pop();
  12463. // 2.x inline-template compat
  12464. {
  12465. const inlineTemplateProp = element.props.find(p => p.type === 6 /* ATTRIBUTE */ && p.name === 'inline-template');
  12466. if (inlineTemplateProp &&
  12467. checkCompatEnabled("COMPILER_INLINE_TEMPLATE" /* COMPILER_INLINE_TEMPLATE */, context, inlineTemplateProp.loc)) {
  12468. const loc = getSelection(context, element.loc.end);
  12469. inlineTemplateProp.value = {
  12470. type: 2 /* TEXT */,
  12471. content: loc.source,
  12472. loc
  12473. };
  12474. }
  12475. }
  12476. element.children = children;
  12477. // End tag.
  12478. if (startsWithEndTagOpen(context.source, element.tag)) {
  12479. parseTag(context, 1 /* End */, parent);
  12480. }
  12481. else {
  12482. emitError(context, 24 /* X_MISSING_END_TAG */, 0, element.loc.start);
  12483. if (context.source.length === 0 && element.tag.toLowerCase() === 'script') {
  12484. const first = children[0];
  12485. if (first && startsWith(first.loc.source, '<!--')) {
  12486. emitError(context, 8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */);
  12487. }
  12488. }
  12489. }
  12490. element.loc = getSelection(context, element.loc.start);
  12491. if (isPreBoundary) {
  12492. context.inPre = false;
  12493. }
  12494. if (isVPreBoundary) {
  12495. context.inVPre = false;
  12496. }
  12497. return element;
  12498. }
  12499. const isSpecialTemplateDirective = /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.makeMap)(`if,else,else-if,for,slot`);
  12500. function parseTag(context, type, parent) {
  12501. // Tag open.
  12502. const start = getCursor(context);
  12503. const match = /^<\/?([a-z][^\t\r\n\f />]*)/i.exec(context.source);
  12504. const tag = match[1];
  12505. const ns = context.options.getNamespace(tag, parent);
  12506. advanceBy(context, match[0].length);
  12507. advanceSpaces(context);
  12508. // save current state in case we need to re-parse attributes with v-pre
  12509. const cursor = getCursor(context);
  12510. const currentSource = context.source;
  12511. // check <pre> tag
  12512. if (context.options.isPreTag(tag)) {
  12513. context.inPre = true;
  12514. }
  12515. // Attributes.
  12516. let props = parseAttributes(context, type);
  12517. // check v-pre
  12518. if (type === 0 /* Start */ &&
  12519. !context.inVPre &&
  12520. props.some(p => p.type === 7 /* DIRECTIVE */ && p.name === 'pre')) {
  12521. context.inVPre = true;
  12522. // reset context
  12523. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)(context, cursor);
  12524. context.source = currentSource;
  12525. // re-parse attrs and filter out v-pre itself
  12526. props = parseAttributes(context, type).filter(p => p.name !== 'v-pre');
  12527. }
  12528. // Tag close.
  12529. let isSelfClosing = false;
  12530. if (context.source.length === 0) {
  12531. emitError(context, 9 /* EOF_IN_TAG */);
  12532. }
  12533. else {
  12534. isSelfClosing = startsWith(context.source, '/>');
  12535. if (type === 1 /* End */ && isSelfClosing) {
  12536. emitError(context, 4 /* END_TAG_WITH_TRAILING_SOLIDUS */);
  12537. }
  12538. advanceBy(context, isSelfClosing ? 2 : 1);
  12539. }
  12540. if (type === 1 /* End */) {
  12541. return;
  12542. }
  12543. // 2.x deprecation checks
  12544. if (( true) &&
  12545. isCompatEnabled("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context)) {
  12546. let hasIf = false;
  12547. let hasFor = false;
  12548. for (let i = 0; i < props.length; i++) {
  12549. const p = props[i];
  12550. if (p.type === 7 /* DIRECTIVE */) {
  12551. if (p.name === 'if') {
  12552. hasIf = true;
  12553. }
  12554. else if (p.name === 'for') {
  12555. hasFor = true;
  12556. }
  12557. }
  12558. if (hasIf && hasFor) {
  12559. warnDeprecation("COMPILER_V_IF_V_FOR_PRECEDENCE" /* COMPILER_V_IF_V_FOR_PRECEDENCE */, context, getSelection(context, start));
  12560. break;
  12561. }
  12562. }
  12563. }
  12564. let tagType = 0 /* ELEMENT */;
  12565. if (!context.inVPre) {
  12566. if (tag === 'slot') {
  12567. tagType = 2 /* SLOT */;
  12568. }
  12569. else if (tag === 'template') {
  12570. if (props.some(p => p.type === 7 /* DIRECTIVE */ && isSpecialTemplateDirective(p.name))) {
  12571. tagType = 3 /* TEMPLATE */;
  12572. }
  12573. }
  12574. else if (isComponent(tag, props, context)) {
  12575. tagType = 1 /* COMPONENT */;
  12576. }
  12577. }
  12578. return {
  12579. type: 1 /* ELEMENT */,
  12580. ns,
  12581. tag,
  12582. tagType,
  12583. props,
  12584. isSelfClosing,
  12585. children: [],
  12586. loc: getSelection(context, start),
  12587. codegenNode: undefined // to be created during transform phase
  12588. };
  12589. }
  12590. function isComponent(tag, props, context) {
  12591. const options = context.options;
  12592. if (options.isCustomElement(tag)) {
  12593. return false;
  12594. }
  12595. if (tag === 'component' ||
  12596. /^[A-Z]/.test(tag) ||
  12597. isCoreComponent(tag) ||
  12598. (options.isBuiltInComponent && options.isBuiltInComponent(tag)) ||
  12599. (options.isNativeTag && !options.isNativeTag(tag))) {
  12600. return true;
  12601. }
  12602. // at this point the tag should be a native tag, but check for potential "is"
  12603. // casting
  12604. for (let i = 0; i < props.length; i++) {
  12605. const p = props[i];
  12606. if (p.type === 6 /* ATTRIBUTE */) {
  12607. if (p.name === 'is' && p.value) {
  12608. if (p.value.content.startsWith('vue:')) {
  12609. return true;
  12610. }
  12611. else if (checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) {
  12612. return true;
  12613. }
  12614. }
  12615. }
  12616. else {
  12617. // directive
  12618. // v-is (TODO Deprecate)
  12619. if (p.name === 'is') {
  12620. return true;
  12621. }
  12622. else if (
  12623. // :is on plain element - only treat as component in compat mode
  12624. p.name === 'bind' &&
  12625. isStaticArgOf(p.arg, 'is') &&
  12626. true &&
  12627. checkCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context, p.loc)) {
  12628. return true;
  12629. }
  12630. }
  12631. }
  12632. }
  12633. function parseAttributes(context, type) {
  12634. const props = [];
  12635. const attributeNames = new Set();
  12636. while (context.source.length > 0 &&
  12637. !startsWith(context.source, '>') &&
  12638. !startsWith(context.source, '/>')) {
  12639. if (startsWith(context.source, '/')) {
  12640. emitError(context, 22 /* UNEXPECTED_SOLIDUS_IN_TAG */);
  12641. advanceBy(context, 1);
  12642. advanceSpaces(context);
  12643. continue;
  12644. }
  12645. if (type === 1 /* End */) {
  12646. emitError(context, 3 /* END_TAG_WITH_ATTRIBUTES */);
  12647. }
  12648. const attr = parseAttribute(context, attributeNames);
  12649. // Trim whitespace between class
  12650. // https://github.com/vuejs/core/issues/4251
  12651. if (attr.type === 6 /* ATTRIBUTE */ &&
  12652. attr.value &&
  12653. attr.name === 'class') {
  12654. attr.value.content = attr.value.content.replace(/\s+/g, ' ').trim();
  12655. }
  12656. if (type === 0 /* Start */) {
  12657. props.push(attr);
  12658. }
  12659. if (/^[^\t\r\n\f />]/.test(context.source)) {
  12660. emitError(context, 15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */);
  12661. }
  12662. advanceSpaces(context);
  12663. }
  12664. return props;
  12665. }
  12666. function parseAttribute(context, nameSet) {
  12667. // Name.
  12668. const start = getCursor(context);
  12669. const match = /^[^\t\r\n\f />][^\t\r\n\f />=]*/.exec(context.source);
  12670. const name = match[0];
  12671. if (nameSet.has(name)) {
  12672. emitError(context, 2 /* DUPLICATE_ATTRIBUTE */);
  12673. }
  12674. nameSet.add(name);
  12675. if (name[0] === '=') {
  12676. emitError(context, 19 /* UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME */);
  12677. }
  12678. {
  12679. const pattern = /["'<]/g;
  12680. let m;
  12681. while ((m = pattern.exec(name))) {
  12682. emitError(context, 17 /* UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME */, m.index);
  12683. }
  12684. }
  12685. advanceBy(context, name.length);
  12686. // Value
  12687. let value = undefined;
  12688. if (/^[\t\r\n\f ]*=/.test(context.source)) {
  12689. advanceSpaces(context);
  12690. advanceBy(context, 1);
  12691. advanceSpaces(context);
  12692. value = parseAttributeValue(context);
  12693. if (!value) {
  12694. emitError(context, 13 /* MISSING_ATTRIBUTE_VALUE */);
  12695. }
  12696. }
  12697. const loc = getSelection(context, start);
  12698. if (!context.inVPre && /^(v-[A-Za-z0-9-]|:|\.|@|#)/.test(name)) {
  12699. const match = /(?:^v-([a-z0-9-]+))?(?:(?::|^\.|^@|^#)(\[[^\]]+\]|[^\.]+))?(.+)?$/i.exec(name);
  12700. let isPropShorthand = startsWith(name, '.');
  12701. let dirName = match[1] ||
  12702. (isPropShorthand || startsWith(name, ':')
  12703. ? 'bind'
  12704. : startsWith(name, '@')
  12705. ? 'on'
  12706. : 'slot');
  12707. let arg;
  12708. if (match[2]) {
  12709. const isSlot = dirName === 'slot';
  12710. const startOffset = name.lastIndexOf(match[2]);
  12711. const loc = getSelection(context, getNewPosition(context, start, startOffset), getNewPosition(context, start, startOffset + match[2].length + ((isSlot && match[3]) || '').length));
  12712. let content = match[2];
  12713. let isStatic = true;
  12714. if (content.startsWith('[')) {
  12715. isStatic = false;
  12716. if (!content.endsWith(']')) {
  12717. emitError(context, 27 /* X_MISSING_DYNAMIC_DIRECTIVE_ARGUMENT_END */);
  12718. content = content.slice(1);
  12719. }
  12720. else {
  12721. content = content.slice(1, content.length - 1);
  12722. }
  12723. }
  12724. else if (isSlot) {
  12725. // #1241 special case for v-slot: vuetify relies extensively on slot
  12726. // names containing dots. v-slot doesn't have any modifiers and Vue 2.x
  12727. // supports such usage so we are keeping it consistent with 2.x.
  12728. content += match[3] || '';
  12729. }
  12730. arg = {
  12731. type: 4 /* SIMPLE_EXPRESSION */,
  12732. content,
  12733. isStatic,
  12734. constType: isStatic
  12735. ? 3 /* CAN_STRINGIFY */
  12736. : 0 /* NOT_CONSTANT */,
  12737. loc
  12738. };
  12739. }
  12740. if (value && value.isQuoted) {
  12741. const valueLoc = value.loc;
  12742. valueLoc.start.offset++;
  12743. valueLoc.start.column++;
  12744. valueLoc.end = advancePositionWithClone(valueLoc.start, value.content);
  12745. valueLoc.source = valueLoc.source.slice(1, -1);
  12746. }
  12747. const modifiers = match[3] ? match[3].slice(1).split('.') : [];
  12748. if (isPropShorthand)
  12749. modifiers.push('prop');
  12750. // 2.x compat v-bind:foo.sync -> v-model:foo
  12751. if (dirName === 'bind' && arg) {
  12752. if (modifiers.includes('sync') &&
  12753. checkCompatEnabled("COMPILER_V_BIND_SYNC" /* COMPILER_V_BIND_SYNC */, context, loc, arg.loc.source)) {
  12754. dirName = 'model';
  12755. modifiers.splice(modifiers.indexOf('sync'), 1);
  12756. }
  12757. if (( true) && modifiers.includes('prop')) {
  12758. checkCompatEnabled("COMPILER_V_BIND_PROP" /* COMPILER_V_BIND_PROP */, context, loc);
  12759. }
  12760. }
  12761. return {
  12762. type: 7 /* DIRECTIVE */,
  12763. name: dirName,
  12764. exp: value && {
  12765. type: 4 /* SIMPLE_EXPRESSION */,
  12766. content: value.content,
  12767. isStatic: false,
  12768. // Treat as non-constant by default. This can be potentially set to
  12769. // other values by `transformExpression` to make it eligible for hoisting.
  12770. constType: 0 /* NOT_CONSTANT */,
  12771. loc: value.loc
  12772. },
  12773. arg,
  12774. modifiers,
  12775. loc
  12776. };
  12777. }
  12778. // missing directive name or illegal directive name
  12779. if (!context.inVPre && startsWith(name, 'v-')) {
  12780. emitError(context, 26 /* X_MISSING_DIRECTIVE_NAME */);
  12781. }
  12782. return {
  12783. type: 6 /* ATTRIBUTE */,
  12784. name,
  12785. value: value && {
  12786. type: 2 /* TEXT */,
  12787. content: value.content,
  12788. loc: value.loc
  12789. },
  12790. loc
  12791. };
  12792. }
  12793. function parseAttributeValue(context) {
  12794. const start = getCursor(context);
  12795. let content;
  12796. const quote = context.source[0];
  12797. const isQuoted = quote === `"` || quote === `'`;
  12798. if (isQuoted) {
  12799. // Quoted value.
  12800. advanceBy(context, 1);
  12801. const endIndex = context.source.indexOf(quote);
  12802. if (endIndex === -1) {
  12803. content = parseTextData(context, context.source.length, 4 /* ATTRIBUTE_VALUE */);
  12804. }
  12805. else {
  12806. content = parseTextData(context, endIndex, 4 /* ATTRIBUTE_VALUE */);
  12807. advanceBy(context, 1);
  12808. }
  12809. }
  12810. else {
  12811. // Unquoted
  12812. const match = /^[^\t\r\n\f >]+/.exec(context.source);
  12813. if (!match) {
  12814. return undefined;
  12815. }
  12816. const unexpectedChars = /["'<=`]/g;
  12817. let m;
  12818. while ((m = unexpectedChars.exec(match[0]))) {
  12819. emitError(context, 18 /* UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE */, m.index);
  12820. }
  12821. content = parseTextData(context, match[0].length, 4 /* ATTRIBUTE_VALUE */);
  12822. }
  12823. return { content, isQuoted, loc: getSelection(context, start) };
  12824. }
  12825. function parseInterpolation(context, mode) {
  12826. const [open, close] = context.options.delimiters;
  12827. const closeIndex = context.source.indexOf(close, open.length);
  12828. if (closeIndex === -1) {
  12829. emitError(context, 25 /* X_MISSING_INTERPOLATION_END */);
  12830. return undefined;
  12831. }
  12832. const start = getCursor(context);
  12833. advanceBy(context, open.length);
  12834. const innerStart = getCursor(context);
  12835. const innerEnd = getCursor(context);
  12836. const rawContentLength = closeIndex - open.length;
  12837. const rawContent = context.source.slice(0, rawContentLength);
  12838. const preTrimContent = parseTextData(context, rawContentLength, mode);
  12839. const content = preTrimContent.trim();
  12840. const startOffset = preTrimContent.indexOf(content);
  12841. if (startOffset > 0) {
  12842. advancePositionWithMutation(innerStart, rawContent, startOffset);
  12843. }
  12844. const endOffset = rawContentLength - (preTrimContent.length - content.length - startOffset);
  12845. advancePositionWithMutation(innerEnd, rawContent, endOffset);
  12846. advanceBy(context, close.length);
  12847. return {
  12848. type: 5 /* INTERPOLATION */,
  12849. content: {
  12850. type: 4 /* SIMPLE_EXPRESSION */,
  12851. isStatic: false,
  12852. // Set `isConstant` to false by default and will decide in transformExpression
  12853. constType: 0 /* NOT_CONSTANT */,
  12854. content,
  12855. loc: getSelection(context, innerStart, innerEnd)
  12856. },
  12857. loc: getSelection(context, start)
  12858. };
  12859. }
  12860. function parseText(context, mode) {
  12861. const endTokens = mode === 3 /* CDATA */ ? [']]>'] : ['<', context.options.delimiters[0]];
  12862. let endIndex = context.source.length;
  12863. for (let i = 0; i < endTokens.length; i++) {
  12864. const index = context.source.indexOf(endTokens[i], 1);
  12865. if (index !== -1 && endIndex > index) {
  12866. endIndex = index;
  12867. }
  12868. }
  12869. const start = getCursor(context);
  12870. const content = parseTextData(context, endIndex, mode);
  12871. return {
  12872. type: 2 /* TEXT */,
  12873. content,
  12874. loc: getSelection(context, start)
  12875. };
  12876. }
  12877. /**
  12878. * Get text data with a given length from the current location.
  12879. * This translates HTML entities in the text data.
  12880. */
  12881. function parseTextData(context, length, mode) {
  12882. const rawText = context.source.slice(0, length);
  12883. advanceBy(context, length);
  12884. if (mode === 2 /* RAWTEXT */ ||
  12885. mode === 3 /* CDATA */ ||
  12886. !rawText.includes('&')) {
  12887. return rawText;
  12888. }
  12889. else {
  12890. // DATA or RCDATA containing "&"". Entity decoding required.
  12891. return context.options.decodeEntities(rawText, mode === 4 /* ATTRIBUTE_VALUE */);
  12892. }
  12893. }
  12894. function getCursor(context) {
  12895. const { column, line, offset } = context;
  12896. return { column, line, offset };
  12897. }
  12898. function getSelection(context, start, end) {
  12899. end = end || getCursor(context);
  12900. return {
  12901. start,
  12902. end,
  12903. source: context.originalSource.slice(start.offset, end.offset)
  12904. };
  12905. }
  12906. function last(xs) {
  12907. return xs[xs.length - 1];
  12908. }
  12909. function startsWith(source, searchString) {
  12910. return source.startsWith(searchString);
  12911. }
  12912. function advanceBy(context, numberOfCharacters) {
  12913. const { source } = context;
  12914. advancePositionWithMutation(context, source, numberOfCharacters);
  12915. context.source = source.slice(numberOfCharacters);
  12916. }
  12917. function advanceSpaces(context) {
  12918. const match = /^[\t\r\n\f ]+/.exec(context.source);
  12919. if (match) {
  12920. advanceBy(context, match[0].length);
  12921. }
  12922. }
  12923. function getNewPosition(context, start, numberOfCharacters) {
  12924. return advancePositionWithClone(start, context.originalSource.slice(start.offset, numberOfCharacters), numberOfCharacters);
  12925. }
  12926. function emitError(context, code, offset, loc = getCursor(context)) {
  12927. if (offset) {
  12928. loc.offset += offset;
  12929. loc.column += offset;
  12930. }
  12931. context.options.onError(createCompilerError(code, {
  12932. start: loc,
  12933. end: loc,
  12934. source: ''
  12935. }));
  12936. }
  12937. function isEnd(context, mode, ancestors) {
  12938. const s = context.source;
  12939. switch (mode) {
  12940. case 0 /* DATA */:
  12941. if (startsWith(s, '</')) {
  12942. // TODO: probably bad performance
  12943. for (let i = ancestors.length - 1; i >= 0; --i) {
  12944. if (startsWithEndTagOpen(s, ancestors[i].tag)) {
  12945. return true;
  12946. }
  12947. }
  12948. }
  12949. break;
  12950. case 1 /* RCDATA */:
  12951. case 2 /* RAWTEXT */: {
  12952. const parent = last(ancestors);
  12953. if (parent && startsWithEndTagOpen(s, parent.tag)) {
  12954. return true;
  12955. }
  12956. break;
  12957. }
  12958. case 3 /* CDATA */:
  12959. if (startsWith(s, ']]>')) {
  12960. return true;
  12961. }
  12962. break;
  12963. }
  12964. return !s;
  12965. }
  12966. function startsWithEndTagOpen(source, tag) {
  12967. return (startsWith(source, '</') &&
  12968. source.slice(2, 2 + tag.length).toLowerCase() === tag.toLowerCase() &&
  12969. /[\t\r\n\f />]/.test(source[2 + tag.length] || '>'));
  12970. }
  12971. function hoistStatic(root, context) {
  12972. walk(root, context,
  12973. // Root node is unfortunately non-hoistable due to potential parent
  12974. // fallthrough attributes.
  12975. isSingleElementRoot(root, root.children[0]));
  12976. }
  12977. function isSingleElementRoot(root, child) {
  12978. const { children } = root;
  12979. return (children.length === 1 &&
  12980. child.type === 1 /* ELEMENT */ &&
  12981. !isSlotOutlet(child));
  12982. }
  12983. function walk(node, context, doNotHoistNode = false) {
  12984. const { children } = node;
  12985. const originalCount = children.length;
  12986. let hoistedCount = 0;
  12987. for (let i = 0; i < children.length; i++) {
  12988. const child = children[i];
  12989. // only plain elements & text calls are eligible for hoisting.
  12990. if (child.type === 1 /* ELEMENT */ &&
  12991. child.tagType === 0 /* ELEMENT */) {
  12992. const constantType = doNotHoistNode
  12993. ? 0 /* NOT_CONSTANT */
  12994. : getConstantType(child, context);
  12995. if (constantType > 0 /* NOT_CONSTANT */) {
  12996. if (constantType >= 2 /* CAN_HOIST */) {
  12997. child.codegenNode.patchFlag =
  12998. -1 /* HOISTED */ + (( true) ? ` /* HOISTED */` : 0);
  12999. child.codegenNode = context.hoist(child.codegenNode);
  13000. hoistedCount++;
  13001. continue;
  13002. }
  13003. }
  13004. else {
  13005. // node may contain dynamic children, but its props may be eligible for
  13006. // hoisting.
  13007. const codegenNode = child.codegenNode;
  13008. if (codegenNode.type === 13 /* VNODE_CALL */) {
  13009. const flag = getPatchFlag(codegenNode);
  13010. if ((!flag ||
  13011. flag === 512 /* NEED_PATCH */ ||
  13012. flag === 1 /* TEXT */) &&
  13013. getGeneratedPropsConstantType(child, context) >=
  13014. 2 /* CAN_HOIST */) {
  13015. const props = getNodeProps(child);
  13016. if (props) {
  13017. codegenNode.props = context.hoist(props);
  13018. }
  13019. }
  13020. if (codegenNode.dynamicProps) {
  13021. codegenNode.dynamicProps = context.hoist(codegenNode.dynamicProps);
  13022. }
  13023. }
  13024. }
  13025. }
  13026. else if (child.type === 12 /* TEXT_CALL */ &&
  13027. getConstantType(child.content, context) >= 2 /* CAN_HOIST */) {
  13028. child.codegenNode = context.hoist(child.codegenNode);
  13029. hoistedCount++;
  13030. }
  13031. // walk further
  13032. if (child.type === 1 /* ELEMENT */) {
  13033. const isComponent = child.tagType === 1 /* COMPONENT */;
  13034. if (isComponent) {
  13035. context.scopes.vSlot++;
  13036. }
  13037. walk(child, context);
  13038. if (isComponent) {
  13039. context.scopes.vSlot--;
  13040. }
  13041. }
  13042. else if (child.type === 11 /* FOR */) {
  13043. // Do not hoist v-for single child because it has to be a block
  13044. walk(child, context, child.children.length === 1);
  13045. }
  13046. else if (child.type === 9 /* IF */) {
  13047. for (let i = 0; i < child.branches.length; i++) {
  13048. // Do not hoist v-if single child because it has to be a block
  13049. walk(child.branches[i], context, child.branches[i].children.length === 1);
  13050. }
  13051. }
  13052. }
  13053. if (hoistedCount && context.transformHoist) {
  13054. context.transformHoist(children, context, node);
  13055. }
  13056. // all children were hoisted - the entire children array is hoistable.
  13057. if (hoistedCount &&
  13058. hoistedCount === originalCount &&
  13059. node.type === 1 /* ELEMENT */ &&
  13060. node.tagType === 0 /* ELEMENT */ &&
  13061. node.codegenNode &&
  13062. node.codegenNode.type === 13 /* VNODE_CALL */ &&
  13063. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(node.codegenNode.children)) {
  13064. node.codegenNode.children = context.hoist(createArrayExpression(node.codegenNode.children));
  13065. }
  13066. }
  13067. function getConstantType(node, context) {
  13068. const { constantCache } = context;
  13069. switch (node.type) {
  13070. case 1 /* ELEMENT */:
  13071. if (node.tagType !== 0 /* ELEMENT */) {
  13072. return 0 /* NOT_CONSTANT */;
  13073. }
  13074. const cached = constantCache.get(node);
  13075. if (cached !== undefined) {
  13076. return cached;
  13077. }
  13078. const codegenNode = node.codegenNode;
  13079. if (codegenNode.type !== 13 /* VNODE_CALL */) {
  13080. return 0 /* NOT_CONSTANT */;
  13081. }
  13082. if (codegenNode.isBlock &&
  13083. node.tag !== 'svg' &&
  13084. node.tag !== 'foreignObject') {
  13085. return 0 /* NOT_CONSTANT */;
  13086. }
  13087. const flag = getPatchFlag(codegenNode);
  13088. if (!flag) {
  13089. let returnType = 3 /* CAN_STRINGIFY */;
  13090. // Element itself has no patch flag. However we still need to check:
  13091. // 1. Even for a node with no patch flag, it is possible for it to contain
  13092. // non-hoistable expressions that refers to scope variables, e.g. compiler
  13093. // injected keys or cached event handlers. Therefore we need to always
  13094. // check the codegenNode's props to be sure.
  13095. const generatedPropsType = getGeneratedPropsConstantType(node, context);
  13096. if (generatedPropsType === 0 /* NOT_CONSTANT */) {
  13097. constantCache.set(node, 0 /* NOT_CONSTANT */);
  13098. return 0 /* NOT_CONSTANT */;
  13099. }
  13100. if (generatedPropsType < returnType) {
  13101. returnType = generatedPropsType;
  13102. }
  13103. // 2. its children.
  13104. for (let i = 0; i < node.children.length; i++) {
  13105. const childType = getConstantType(node.children[i], context);
  13106. if (childType === 0 /* NOT_CONSTANT */) {
  13107. constantCache.set(node, 0 /* NOT_CONSTANT */);
  13108. return 0 /* NOT_CONSTANT */;
  13109. }
  13110. if (childType < returnType) {
  13111. returnType = childType;
  13112. }
  13113. }
  13114. // 3. if the type is not already CAN_SKIP_PATCH which is the lowest non-0
  13115. // type, check if any of the props can cause the type to be lowered
  13116. // we can skip can_patch because it's guaranteed by the absence of a
  13117. // patchFlag.
  13118. if (returnType > 1 /* CAN_SKIP_PATCH */) {
  13119. for (let i = 0; i < node.props.length; i++) {
  13120. const p = node.props[i];
  13121. if (p.type === 7 /* DIRECTIVE */ && p.name === 'bind' && p.exp) {
  13122. const expType = getConstantType(p.exp, context);
  13123. if (expType === 0 /* NOT_CONSTANT */) {
  13124. constantCache.set(node, 0 /* NOT_CONSTANT */);
  13125. return 0 /* NOT_CONSTANT */;
  13126. }
  13127. if (expType < returnType) {
  13128. returnType = expType;
  13129. }
  13130. }
  13131. }
  13132. }
  13133. // only svg/foreignObject could be block here, however if they are
  13134. // static then they don't need to be blocks since there will be no
  13135. // nested updates.
  13136. if (codegenNode.isBlock) {
  13137. context.removeHelper(OPEN_BLOCK);
  13138. context.removeHelper(getVNodeBlockHelper(context.inSSR, codegenNode.isComponent));
  13139. codegenNode.isBlock = false;
  13140. context.helper(getVNodeHelper(context.inSSR, codegenNode.isComponent));
  13141. }
  13142. constantCache.set(node, returnType);
  13143. return returnType;
  13144. }
  13145. else {
  13146. constantCache.set(node, 0 /* NOT_CONSTANT */);
  13147. return 0 /* NOT_CONSTANT */;
  13148. }
  13149. case 2 /* TEXT */:
  13150. case 3 /* COMMENT */:
  13151. return 3 /* CAN_STRINGIFY */;
  13152. case 9 /* IF */:
  13153. case 11 /* FOR */:
  13154. case 10 /* IF_BRANCH */:
  13155. return 0 /* NOT_CONSTANT */;
  13156. case 5 /* INTERPOLATION */:
  13157. case 12 /* TEXT_CALL */:
  13158. return getConstantType(node.content, context);
  13159. case 4 /* SIMPLE_EXPRESSION */:
  13160. return node.constType;
  13161. case 8 /* COMPOUND_EXPRESSION */:
  13162. let returnType = 3 /* CAN_STRINGIFY */;
  13163. for (let i = 0; i < node.children.length; i++) {
  13164. const child = node.children[i];
  13165. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(child) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(child)) {
  13166. continue;
  13167. }
  13168. const childType = getConstantType(child, context);
  13169. if (childType === 0 /* NOT_CONSTANT */) {
  13170. return 0 /* NOT_CONSTANT */;
  13171. }
  13172. else if (childType < returnType) {
  13173. returnType = childType;
  13174. }
  13175. }
  13176. return returnType;
  13177. default:
  13178. if ((true)) ;
  13179. return 0 /* NOT_CONSTANT */;
  13180. }
  13181. }
  13182. const allowHoistedHelperSet = new Set([
  13183. NORMALIZE_CLASS,
  13184. NORMALIZE_STYLE,
  13185. NORMALIZE_PROPS,
  13186. GUARD_REACTIVE_PROPS
  13187. ]);
  13188. function getConstantTypeOfHelperCall(value, context) {
  13189. if (value.type === 14 /* JS_CALL_EXPRESSION */ &&
  13190. !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(value.callee) &&
  13191. allowHoistedHelperSet.has(value.callee)) {
  13192. const arg = value.arguments[0];
  13193. if (arg.type === 4 /* SIMPLE_EXPRESSION */) {
  13194. return getConstantType(arg, context);
  13195. }
  13196. else if (arg.type === 14 /* JS_CALL_EXPRESSION */) {
  13197. // in the case of nested helper call, e.g. `normalizeProps(guardReactiveProps(exp))`
  13198. return getConstantTypeOfHelperCall(arg, context);
  13199. }
  13200. }
  13201. return 0 /* NOT_CONSTANT */;
  13202. }
  13203. function getGeneratedPropsConstantType(node, context) {
  13204. let returnType = 3 /* CAN_STRINGIFY */;
  13205. const props = getNodeProps(node);
  13206. if (props && props.type === 15 /* JS_OBJECT_EXPRESSION */) {
  13207. const { properties } = props;
  13208. for (let i = 0; i < properties.length; i++) {
  13209. const { key, value } = properties[i];
  13210. const keyType = getConstantType(key, context);
  13211. if (keyType === 0 /* NOT_CONSTANT */) {
  13212. return keyType;
  13213. }
  13214. if (keyType < returnType) {
  13215. returnType = keyType;
  13216. }
  13217. let valueType;
  13218. if (value.type === 4 /* SIMPLE_EXPRESSION */) {
  13219. valueType = getConstantType(value, context);
  13220. }
  13221. else if (value.type === 14 /* JS_CALL_EXPRESSION */) {
  13222. // some helper calls can be hoisted,
  13223. // such as the `normalizeProps` generated by the compiler for pre-normalize class,
  13224. // in this case we need to respect the ConstantType of the helper's arguments
  13225. valueType = getConstantTypeOfHelperCall(value, context);
  13226. }
  13227. else {
  13228. valueType = 0 /* NOT_CONSTANT */;
  13229. }
  13230. if (valueType === 0 /* NOT_CONSTANT */) {
  13231. return valueType;
  13232. }
  13233. if (valueType < returnType) {
  13234. returnType = valueType;
  13235. }
  13236. }
  13237. }
  13238. return returnType;
  13239. }
  13240. function getNodeProps(node) {
  13241. const codegenNode = node.codegenNode;
  13242. if (codegenNode.type === 13 /* VNODE_CALL */) {
  13243. return codegenNode.props;
  13244. }
  13245. }
  13246. function getPatchFlag(node) {
  13247. const flag = node.patchFlag;
  13248. return flag ? parseInt(flag, 10) : undefined;
  13249. }
  13250. function createTransformContext(root, { filename = '', prefixIdentifiers = false, hoistStatic = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NOOP, isCustomElement = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
  13251. const nameMatch = filename.replace(/\?.*$/, '').match(/([^/\\]+)\.\w+$/);
  13252. const context = {
  13253. // options
  13254. selfName: nameMatch && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.capitalize)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.camelize)(nameMatch[1])),
  13255. prefixIdentifiers,
  13256. hoistStatic,
  13257. cacheHandlers,
  13258. nodeTransforms,
  13259. directiveTransforms,
  13260. transformHoist,
  13261. isBuiltInComponent,
  13262. isCustomElement,
  13263. expressionPlugins,
  13264. scopeId,
  13265. slotted,
  13266. ssr,
  13267. inSSR,
  13268. ssrCssVars,
  13269. bindingMetadata,
  13270. inline,
  13271. isTS,
  13272. onError,
  13273. onWarn,
  13274. compatConfig,
  13275. // state
  13276. root,
  13277. helpers: new Map(),
  13278. components: new Set(),
  13279. directives: new Set(),
  13280. hoists: [],
  13281. imports: [],
  13282. constantCache: new Map(),
  13283. temps: 0,
  13284. cached: 0,
  13285. identifiers: Object.create(null),
  13286. scopes: {
  13287. vFor: 0,
  13288. vSlot: 0,
  13289. vPre: 0,
  13290. vOnce: 0
  13291. },
  13292. parent: null,
  13293. currentNode: root,
  13294. childIndex: 0,
  13295. inVOnce: false,
  13296. // methods
  13297. helper(name) {
  13298. const count = context.helpers.get(name) || 0;
  13299. context.helpers.set(name, count + 1);
  13300. return name;
  13301. },
  13302. removeHelper(name) {
  13303. const count = context.helpers.get(name);
  13304. if (count) {
  13305. const currentCount = count - 1;
  13306. if (!currentCount) {
  13307. context.helpers.delete(name);
  13308. }
  13309. else {
  13310. context.helpers.set(name, currentCount);
  13311. }
  13312. }
  13313. },
  13314. helperString(name) {
  13315. return `_${helperNameMap[context.helper(name)]}`;
  13316. },
  13317. replaceNode(node) {
  13318. /* istanbul ignore if */
  13319. if ((true)) {
  13320. if (!context.currentNode) {
  13321. throw new Error(`Node being replaced is already removed.`);
  13322. }
  13323. if (!context.parent) {
  13324. throw new Error(`Cannot replace root node.`);
  13325. }
  13326. }
  13327. context.parent.children[context.childIndex] = context.currentNode = node;
  13328. },
  13329. removeNode(node) {
  13330. if (( true) && !context.parent) {
  13331. throw new Error(`Cannot remove root node.`);
  13332. }
  13333. const list = context.parent.children;
  13334. const removalIndex = node
  13335. ? list.indexOf(node)
  13336. : context.currentNode
  13337. ? context.childIndex
  13338. : -1;
  13339. /* istanbul ignore if */
  13340. if (( true) && removalIndex < 0) {
  13341. throw new Error(`node being removed is not a child of current parent`);
  13342. }
  13343. if (!node || node === context.currentNode) {
  13344. // current node removed
  13345. context.currentNode = null;
  13346. context.onNodeRemoved();
  13347. }
  13348. else {
  13349. // sibling node removed
  13350. if (context.childIndex > removalIndex) {
  13351. context.childIndex--;
  13352. context.onNodeRemoved();
  13353. }
  13354. }
  13355. context.parent.children.splice(removalIndex, 1);
  13356. },
  13357. onNodeRemoved: () => { },
  13358. addIdentifiers(exp) {
  13359. },
  13360. removeIdentifiers(exp) {
  13361. },
  13362. hoist(exp) {
  13363. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(exp))
  13364. exp = createSimpleExpression(exp);
  13365. context.hoists.push(exp);
  13366. const identifier = createSimpleExpression(`_hoisted_${context.hoists.length}`, false, exp.loc, 2 /* CAN_HOIST */);
  13367. identifier.hoisted = exp;
  13368. return identifier;
  13369. },
  13370. cache(exp, isVNode = false) {
  13371. return createCacheExpression(context.cached++, exp, isVNode);
  13372. }
  13373. };
  13374. {
  13375. context.filters = new Set();
  13376. }
  13377. return context;
  13378. }
  13379. function transform(root, options) {
  13380. const context = createTransformContext(root, options);
  13381. traverseNode(root, context);
  13382. if (options.hoistStatic) {
  13383. hoistStatic(root, context);
  13384. }
  13385. if (!options.ssr) {
  13386. createRootCodegen(root, context);
  13387. }
  13388. // finalize meta information
  13389. root.helpers = [...context.helpers.keys()];
  13390. root.components = [...context.components];
  13391. root.directives = [...context.directives];
  13392. root.imports = context.imports;
  13393. root.hoists = context.hoists;
  13394. root.temps = context.temps;
  13395. root.cached = context.cached;
  13396. {
  13397. root.filters = [...context.filters];
  13398. }
  13399. }
  13400. function createRootCodegen(root, context) {
  13401. const { helper } = context;
  13402. const { children } = root;
  13403. if (children.length === 1) {
  13404. const child = children[0];
  13405. // if the single child is an element, turn it into a block.
  13406. if (isSingleElementRoot(root, child) && child.codegenNode) {
  13407. // single element root is never hoisted so codegenNode will never be
  13408. // SimpleExpressionNode
  13409. const codegenNode = child.codegenNode;
  13410. if (codegenNode.type === 13 /* VNODE_CALL */) {
  13411. makeBlock(codegenNode, context);
  13412. }
  13413. root.codegenNode = codegenNode;
  13414. }
  13415. else {
  13416. // - single <slot/>, IfNode, ForNode: already blocks.
  13417. // - single text node: always patched.
  13418. // root codegen falls through via genNode()
  13419. root.codegenNode = child;
  13420. }
  13421. }
  13422. else if (children.length > 1) {
  13423. // root has multiple nodes - return a fragment block.
  13424. let patchFlag = 64 /* STABLE_FRAGMENT */;
  13425. let patchFlagText = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[64];
  13426. // check if the fragment actually contains a single valid child with
  13427. // the rest being comments
  13428. if (( true) &&
  13429. children.filter(c => c.type !== 3 /* COMMENT */).length === 1) {
  13430. patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */;
  13431. patchFlagText += `, ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[2048]}`;
  13432. }
  13433. root.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, root.children, patchFlag + (( true) ? ` /* ${patchFlagText} */` : 0), undefined, undefined, true, undefined, false /* isComponent */);
  13434. }
  13435. else ;
  13436. }
  13437. function traverseChildren(parent, context) {
  13438. let i = 0;
  13439. const nodeRemoved = () => {
  13440. i--;
  13441. };
  13442. for (; i < parent.children.length; i++) {
  13443. const child = parent.children[i];
  13444. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(child))
  13445. continue;
  13446. context.parent = parent;
  13447. context.childIndex = i;
  13448. context.onNodeRemoved = nodeRemoved;
  13449. traverseNode(child, context);
  13450. }
  13451. }
  13452. function traverseNode(node, context) {
  13453. context.currentNode = node;
  13454. // apply transform plugins
  13455. const { nodeTransforms } = context;
  13456. const exitFns = [];
  13457. for (let i = 0; i < nodeTransforms.length; i++) {
  13458. const onExit = nodeTransforms[i](node, context);
  13459. if (onExit) {
  13460. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(onExit)) {
  13461. exitFns.push(...onExit);
  13462. }
  13463. else {
  13464. exitFns.push(onExit);
  13465. }
  13466. }
  13467. if (!context.currentNode) {
  13468. // node was removed
  13469. return;
  13470. }
  13471. else {
  13472. // node may have been replaced
  13473. node = context.currentNode;
  13474. }
  13475. }
  13476. switch (node.type) {
  13477. case 3 /* COMMENT */:
  13478. if (!context.ssr) {
  13479. // inject import for the Comment symbol, which is needed for creating
  13480. // comment nodes with `createVNode`
  13481. context.helper(CREATE_COMMENT);
  13482. }
  13483. break;
  13484. case 5 /* INTERPOLATION */:
  13485. // no need to traverse, but we need to inject toString helper
  13486. if (!context.ssr) {
  13487. context.helper(TO_DISPLAY_STRING);
  13488. }
  13489. break;
  13490. // for container types, further traverse downwards
  13491. case 9 /* IF */:
  13492. for (let i = 0; i < node.branches.length; i++) {
  13493. traverseNode(node.branches[i], context);
  13494. }
  13495. break;
  13496. case 10 /* IF_BRANCH */:
  13497. case 11 /* FOR */:
  13498. case 1 /* ELEMENT */:
  13499. case 0 /* ROOT */:
  13500. traverseChildren(node, context);
  13501. break;
  13502. }
  13503. // exit transforms
  13504. context.currentNode = node;
  13505. let i = exitFns.length;
  13506. while (i--) {
  13507. exitFns[i]();
  13508. }
  13509. }
  13510. function createStructuralDirectiveTransform(name, fn) {
  13511. const matches = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(name)
  13512. ? (n) => n === name
  13513. : (n) => name.test(n);
  13514. return (node, context) => {
  13515. if (node.type === 1 /* ELEMENT */) {
  13516. const { props } = node;
  13517. // structural directive transforms are not concerned with slots
  13518. // as they are handled separately in vSlot.ts
  13519. if (node.tagType === 3 /* TEMPLATE */ && props.some(isVSlot)) {
  13520. return;
  13521. }
  13522. const exitFns = [];
  13523. for (let i = 0; i < props.length; i++) {
  13524. const prop = props[i];
  13525. if (prop.type === 7 /* DIRECTIVE */ && matches(prop.name)) {
  13526. // structural directives are removed to avoid infinite recursion
  13527. // also we remove them *before* applying so that it can further
  13528. // traverse itself in case it moves the node around
  13529. props.splice(i, 1);
  13530. i--;
  13531. const onExit = fn(node, prop, context);
  13532. if (onExit)
  13533. exitFns.push(onExit);
  13534. }
  13535. }
  13536. return exitFns;
  13537. }
  13538. };
  13539. }
  13540. const PURE_ANNOTATION = `/*#__PURE__*/`;
  13541. function createCodegenContext(ast, { mode = 'function', prefixIdentifiers = mode === 'module', sourceMap = false, filename = `template.vue.html`, scopeId = null, optimizeImports = false, runtimeGlobalName = `Vue`, runtimeModuleName = `vue`, ssrRuntimeModuleName = 'vue/server-renderer', ssr = false, isTS = false, inSSR = false }) {
  13542. const context = {
  13543. mode,
  13544. prefixIdentifiers,
  13545. sourceMap,
  13546. filename,
  13547. scopeId,
  13548. optimizeImports,
  13549. runtimeGlobalName,
  13550. runtimeModuleName,
  13551. ssrRuntimeModuleName,
  13552. ssr,
  13553. isTS,
  13554. inSSR,
  13555. source: ast.loc.source,
  13556. code: ``,
  13557. column: 1,
  13558. line: 1,
  13559. offset: 0,
  13560. indentLevel: 0,
  13561. pure: false,
  13562. map: undefined,
  13563. helper(key) {
  13564. return `_${helperNameMap[key]}`;
  13565. },
  13566. push(code, node) {
  13567. context.code += code;
  13568. },
  13569. indent() {
  13570. newline(++context.indentLevel);
  13571. },
  13572. deindent(withoutNewLine = false) {
  13573. if (withoutNewLine) {
  13574. --context.indentLevel;
  13575. }
  13576. else {
  13577. newline(--context.indentLevel);
  13578. }
  13579. },
  13580. newline() {
  13581. newline(context.indentLevel);
  13582. }
  13583. };
  13584. function newline(n) {
  13585. context.push('\n' + ` `.repeat(n));
  13586. }
  13587. return context;
  13588. }
  13589. function generate(ast, options = {}) {
  13590. const context = createCodegenContext(ast, options);
  13591. if (options.onContextCreated)
  13592. options.onContextCreated(context);
  13593. const { mode, push, prefixIdentifiers, indent, deindent, newline, scopeId, ssr } = context;
  13594. const hasHelpers = ast.helpers.length > 0;
  13595. const useWithBlock = !prefixIdentifiers && mode !== 'module';
  13596. // preambles
  13597. // in setup() inline mode, the preamble is generated in a sub context
  13598. // and returned separately.
  13599. const preambleContext = context;
  13600. {
  13601. genFunctionPreamble(ast, preambleContext);
  13602. }
  13603. // enter render function
  13604. const functionName = ssr ? `ssrRender` : `render`;
  13605. const args = ssr ? ['_ctx', '_push', '_parent', '_attrs'] : ['_ctx', '_cache'];
  13606. const signature = args.join(', ');
  13607. {
  13608. push(`function ${functionName}(${signature}) {`);
  13609. }
  13610. indent();
  13611. if (useWithBlock) {
  13612. push(`with (_ctx) {`);
  13613. indent();
  13614. // function mode const declarations should be inside with block
  13615. // also they should be renamed to avoid collision with user properties
  13616. if (hasHelpers) {
  13617. push(`const { ${ast.helpers
  13618. .map(s => `${helperNameMap[s]}: _${helperNameMap[s]}`)
  13619. .join(', ')} } = _Vue`);
  13620. push(`\n`);
  13621. newline();
  13622. }
  13623. }
  13624. // generate asset resolution statements
  13625. if (ast.components.length) {
  13626. genAssets(ast.components, 'component', context);
  13627. if (ast.directives.length || ast.temps > 0) {
  13628. newline();
  13629. }
  13630. }
  13631. if (ast.directives.length) {
  13632. genAssets(ast.directives, 'directive', context);
  13633. if (ast.temps > 0) {
  13634. newline();
  13635. }
  13636. }
  13637. if (ast.filters && ast.filters.length) {
  13638. newline();
  13639. genAssets(ast.filters, 'filter', context);
  13640. newline();
  13641. }
  13642. if (ast.temps > 0) {
  13643. push(`let `);
  13644. for (let i = 0; i < ast.temps; i++) {
  13645. push(`${i > 0 ? `, ` : ``}_temp${i}`);
  13646. }
  13647. }
  13648. if (ast.components.length || ast.directives.length || ast.temps) {
  13649. push(`\n`);
  13650. newline();
  13651. }
  13652. // generate the VNode tree expression
  13653. if (!ssr) {
  13654. push(`return `);
  13655. }
  13656. if (ast.codegenNode) {
  13657. genNode(ast.codegenNode, context);
  13658. }
  13659. else {
  13660. push(`null`);
  13661. }
  13662. if (useWithBlock) {
  13663. deindent();
  13664. push(`}`);
  13665. }
  13666. deindent();
  13667. push(`}`);
  13668. return {
  13669. ast,
  13670. code: context.code,
  13671. preamble: ``,
  13672. // SourceMapGenerator does have toJSON() method but it's not in the types
  13673. map: context.map ? context.map.toJSON() : undefined
  13674. };
  13675. }
  13676. function genFunctionPreamble(ast, context) {
  13677. const { ssr, prefixIdentifiers, push, newline, runtimeModuleName, runtimeGlobalName, ssrRuntimeModuleName } = context;
  13678. const VueBinding = runtimeGlobalName;
  13679. const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;
  13680. // Generate const declaration for helpers
  13681. // In prefix mode, we place the const declaration at top so it's done
  13682. // only once; But if we not prefixing, we place the declaration inside the
  13683. // with block so it doesn't incur the `in` check cost for every helper access.
  13684. if (ast.helpers.length > 0) {
  13685. {
  13686. // "with" mode.
  13687. // save Vue in a separate variable to avoid collision
  13688. push(`const _Vue = ${VueBinding}\n`);
  13689. // in "with" mode, helpers are declared inside the with block to avoid
  13690. // has check cost, but hoists are lifted out of the function - we need
  13691. // to provide the helper here.
  13692. if (ast.hoists.length) {
  13693. const staticHelpers = [
  13694. CREATE_VNODE,
  13695. CREATE_ELEMENT_VNODE,
  13696. CREATE_COMMENT,
  13697. CREATE_TEXT,
  13698. CREATE_STATIC
  13699. ]
  13700. .filter(helper => ast.helpers.includes(helper))
  13701. .map(aliasHelper)
  13702. .join(', ');
  13703. push(`const { ${staticHelpers} } = _Vue\n`);
  13704. }
  13705. }
  13706. }
  13707. genHoists(ast.hoists, context);
  13708. newline();
  13709. push(`return `);
  13710. }
  13711. function genAssets(assets, type, { helper, push, newline, isTS }) {
  13712. const resolver = helper(type === 'filter'
  13713. ? RESOLVE_FILTER
  13714. : type === 'component'
  13715. ? RESOLVE_COMPONENT
  13716. : RESOLVE_DIRECTIVE);
  13717. for (let i = 0; i < assets.length; i++) {
  13718. let id = assets[i];
  13719. // potential component implicit self-reference inferred from SFC filename
  13720. const maybeSelfReference = id.endsWith('__self');
  13721. if (maybeSelfReference) {
  13722. id = id.slice(0, -6);
  13723. }
  13724. push(`const ${toValidAssetId(id, type)} = ${resolver}(${JSON.stringify(id)}${maybeSelfReference ? `, true` : ``})${isTS ? `!` : ``}`);
  13725. if (i < assets.length - 1) {
  13726. newline();
  13727. }
  13728. }
  13729. }
  13730. function genHoists(hoists, context) {
  13731. if (!hoists.length) {
  13732. return;
  13733. }
  13734. context.pure = true;
  13735. const { push, newline, helper, scopeId, mode } = context;
  13736. newline();
  13737. for (let i = 0; i < hoists.length; i++) {
  13738. const exp = hoists[i];
  13739. if (exp) {
  13740. push(`const _hoisted_${i + 1} = ${``}`);
  13741. genNode(exp, context);
  13742. newline();
  13743. }
  13744. }
  13745. context.pure = false;
  13746. }
  13747. function isText$1(n) {
  13748. return ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(n) ||
  13749. n.type === 4 /* SIMPLE_EXPRESSION */ ||
  13750. n.type === 2 /* TEXT */ ||
  13751. n.type === 5 /* INTERPOLATION */ ||
  13752. n.type === 8 /* COMPOUND_EXPRESSION */);
  13753. }
  13754. function genNodeListAsArray(nodes, context) {
  13755. const multilines = nodes.length > 3 ||
  13756. ((( true)) && nodes.some(n => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(n) || !isText$1(n)));
  13757. context.push(`[`);
  13758. multilines && context.indent();
  13759. genNodeList(nodes, context, multilines);
  13760. multilines && context.deindent();
  13761. context.push(`]`);
  13762. }
  13763. function genNodeList(nodes, context, multilines = false, comma = true) {
  13764. const { push, newline } = context;
  13765. for (let i = 0; i < nodes.length; i++) {
  13766. const node = nodes[i];
  13767. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(node)) {
  13768. push(node);
  13769. }
  13770. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(node)) {
  13771. genNodeListAsArray(node, context);
  13772. }
  13773. else {
  13774. genNode(node, context);
  13775. }
  13776. if (i < nodes.length - 1) {
  13777. if (multilines) {
  13778. comma && push(',');
  13779. newline();
  13780. }
  13781. else {
  13782. comma && push(', ');
  13783. }
  13784. }
  13785. }
  13786. }
  13787. function genNode(node, context) {
  13788. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(node)) {
  13789. context.push(node);
  13790. return;
  13791. }
  13792. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(node)) {
  13793. context.push(context.helper(node));
  13794. return;
  13795. }
  13796. switch (node.type) {
  13797. case 1 /* ELEMENT */:
  13798. case 9 /* IF */:
  13799. case 11 /* FOR */:
  13800. ( true) &&
  13801. assert(node.codegenNode != null, `Codegen node is missing for element/if/for node. ` +
  13802. `Apply appropriate transforms first.`);
  13803. genNode(node.codegenNode, context);
  13804. break;
  13805. case 2 /* TEXT */:
  13806. genText(node, context);
  13807. break;
  13808. case 4 /* SIMPLE_EXPRESSION */:
  13809. genExpression(node, context);
  13810. break;
  13811. case 5 /* INTERPOLATION */:
  13812. genInterpolation(node, context);
  13813. break;
  13814. case 12 /* TEXT_CALL */:
  13815. genNode(node.codegenNode, context);
  13816. break;
  13817. case 8 /* COMPOUND_EXPRESSION */:
  13818. genCompoundExpression(node, context);
  13819. break;
  13820. case 3 /* COMMENT */:
  13821. genComment(node, context);
  13822. break;
  13823. case 13 /* VNODE_CALL */:
  13824. genVNodeCall(node, context);
  13825. break;
  13826. case 14 /* JS_CALL_EXPRESSION */:
  13827. genCallExpression(node, context);
  13828. break;
  13829. case 15 /* JS_OBJECT_EXPRESSION */:
  13830. genObjectExpression(node, context);
  13831. break;
  13832. case 17 /* JS_ARRAY_EXPRESSION */:
  13833. genArrayExpression(node, context);
  13834. break;
  13835. case 18 /* JS_FUNCTION_EXPRESSION */:
  13836. genFunctionExpression(node, context);
  13837. break;
  13838. case 19 /* JS_CONDITIONAL_EXPRESSION */:
  13839. genConditionalExpression(node, context);
  13840. break;
  13841. case 20 /* JS_CACHE_EXPRESSION */:
  13842. genCacheExpression(node, context);
  13843. break;
  13844. case 21 /* JS_BLOCK_STATEMENT */:
  13845. genNodeList(node.body, context, true, false);
  13846. break;
  13847. // SSR only types
  13848. case 22 /* JS_TEMPLATE_LITERAL */:
  13849. break;
  13850. case 23 /* JS_IF_STATEMENT */:
  13851. break;
  13852. case 24 /* JS_ASSIGNMENT_EXPRESSION */:
  13853. break;
  13854. case 25 /* JS_SEQUENCE_EXPRESSION */:
  13855. break;
  13856. case 26 /* JS_RETURN_STATEMENT */:
  13857. break;
  13858. /* istanbul ignore next */
  13859. case 10 /* IF_BRANCH */:
  13860. // noop
  13861. break;
  13862. default:
  13863. if ((true)) {
  13864. assert(false, `unhandled codegen node type: ${node.type}`);
  13865. // make sure we exhaust all possible types
  13866. const exhaustiveCheck = node;
  13867. return exhaustiveCheck;
  13868. }
  13869. }
  13870. }
  13871. function genText(node, context) {
  13872. context.push(JSON.stringify(node.content), node);
  13873. }
  13874. function genExpression(node, context) {
  13875. const { content, isStatic } = node;
  13876. context.push(isStatic ? JSON.stringify(content) : content, node);
  13877. }
  13878. function genInterpolation(node, context) {
  13879. const { push, helper, pure } = context;
  13880. if (pure)
  13881. push(PURE_ANNOTATION);
  13882. push(`${helper(TO_DISPLAY_STRING)}(`);
  13883. genNode(node.content, context);
  13884. push(`)`);
  13885. }
  13886. function genCompoundExpression(node, context) {
  13887. for (let i = 0; i < node.children.length; i++) {
  13888. const child = node.children[i];
  13889. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(child)) {
  13890. context.push(child);
  13891. }
  13892. else {
  13893. genNode(child, context);
  13894. }
  13895. }
  13896. }
  13897. function genExpressionAsPropertyKey(node, context) {
  13898. const { push } = context;
  13899. if (node.type === 8 /* COMPOUND_EXPRESSION */) {
  13900. push(`[`);
  13901. genCompoundExpression(node, context);
  13902. push(`]`);
  13903. }
  13904. else if (node.isStatic) {
  13905. // only quote keys if necessary
  13906. const text = isSimpleIdentifier(node.content)
  13907. ? node.content
  13908. : JSON.stringify(node.content);
  13909. push(text, node);
  13910. }
  13911. else {
  13912. push(`[${node.content}]`, node);
  13913. }
  13914. }
  13915. function genComment(node, context) {
  13916. const { push, helper, pure } = context;
  13917. if (pure) {
  13918. push(PURE_ANNOTATION);
  13919. }
  13920. push(`${helper(CREATE_COMMENT)}(${JSON.stringify(node.content)})`, node);
  13921. }
  13922. function genVNodeCall(node, context) {
  13923. const { push, helper, pure } = context;
  13924. const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node;
  13925. if (directives) {
  13926. push(helper(WITH_DIRECTIVES) + `(`);
  13927. }
  13928. if (isBlock) {
  13929. push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `);
  13930. }
  13931. if (pure) {
  13932. push(PURE_ANNOTATION);
  13933. }
  13934. const callHelper = isBlock
  13935. ? getVNodeBlockHelper(context.inSSR, isComponent)
  13936. : getVNodeHelper(context.inSSR, isComponent);
  13937. push(helper(callHelper) + `(`, node);
  13938. genNodeList(genNullableArgs([tag, props, children, patchFlag, dynamicProps]), context);
  13939. push(`)`);
  13940. if (isBlock) {
  13941. push(`)`);
  13942. }
  13943. if (directives) {
  13944. push(`, `);
  13945. genNode(directives, context);
  13946. push(`)`);
  13947. }
  13948. }
  13949. function genNullableArgs(args) {
  13950. let i = args.length;
  13951. while (i--) {
  13952. if (args[i] != null)
  13953. break;
  13954. }
  13955. return args.slice(0, i + 1).map(arg => arg || `null`);
  13956. }
  13957. // JavaScript
  13958. function genCallExpression(node, context) {
  13959. const { push, helper, pure } = context;
  13960. const callee = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(node.callee) ? node.callee : helper(node.callee);
  13961. if (pure) {
  13962. push(PURE_ANNOTATION);
  13963. }
  13964. push(callee + `(`, node);
  13965. genNodeList(node.arguments, context);
  13966. push(`)`);
  13967. }
  13968. function genObjectExpression(node, context) {
  13969. const { push, indent, deindent, newline } = context;
  13970. const { properties } = node;
  13971. if (!properties.length) {
  13972. push(`{}`, node);
  13973. return;
  13974. }
  13975. const multilines = properties.length > 1 ||
  13976. ((( true)) &&
  13977. properties.some(p => p.value.type !== 4 /* SIMPLE_EXPRESSION */));
  13978. push(multilines ? `{` : `{ `);
  13979. multilines && indent();
  13980. for (let i = 0; i < properties.length; i++) {
  13981. const { key, value } = properties[i];
  13982. // key
  13983. genExpressionAsPropertyKey(key, context);
  13984. push(`: `);
  13985. // value
  13986. genNode(value, context);
  13987. if (i < properties.length - 1) {
  13988. // will only reach this if it's multilines
  13989. push(`,`);
  13990. newline();
  13991. }
  13992. }
  13993. multilines && deindent();
  13994. push(multilines ? `}` : ` }`);
  13995. }
  13996. function genArrayExpression(node, context) {
  13997. genNodeListAsArray(node.elements, context);
  13998. }
  13999. function genFunctionExpression(node, context) {
  14000. const { push, indent, deindent } = context;
  14001. const { params, returns, body, newline, isSlot } = node;
  14002. if (isSlot) {
  14003. // wrap slot functions with owner context
  14004. push(`_${helperNameMap[WITH_CTX]}(`);
  14005. }
  14006. push(`(`, node);
  14007. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(params)) {
  14008. genNodeList(params, context);
  14009. }
  14010. else if (params) {
  14011. genNode(params, context);
  14012. }
  14013. push(`) => `);
  14014. if (newline || body) {
  14015. push(`{`);
  14016. indent();
  14017. }
  14018. if (returns) {
  14019. if (newline) {
  14020. push(`return `);
  14021. }
  14022. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(returns)) {
  14023. genNodeListAsArray(returns, context);
  14024. }
  14025. else {
  14026. genNode(returns, context);
  14027. }
  14028. }
  14029. else if (body) {
  14030. genNode(body, context);
  14031. }
  14032. if (newline || body) {
  14033. deindent();
  14034. push(`}`);
  14035. }
  14036. if (isSlot) {
  14037. if (node.isNonScopedSlot) {
  14038. push(`, undefined, true`);
  14039. }
  14040. push(`)`);
  14041. }
  14042. }
  14043. function genConditionalExpression(node, context) {
  14044. const { test, consequent, alternate, newline: needNewline } = node;
  14045. const { push, indent, deindent, newline } = context;
  14046. if (test.type === 4 /* SIMPLE_EXPRESSION */) {
  14047. const needsParens = !isSimpleIdentifier(test.content);
  14048. needsParens && push(`(`);
  14049. genExpression(test, context);
  14050. needsParens && push(`)`);
  14051. }
  14052. else {
  14053. push(`(`);
  14054. genNode(test, context);
  14055. push(`)`);
  14056. }
  14057. needNewline && indent();
  14058. context.indentLevel++;
  14059. needNewline || push(` `);
  14060. push(`? `);
  14061. genNode(consequent, context);
  14062. context.indentLevel--;
  14063. needNewline && newline();
  14064. needNewline || push(` `);
  14065. push(`: `);
  14066. const isNested = alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */;
  14067. if (!isNested) {
  14068. context.indentLevel++;
  14069. }
  14070. genNode(alternate, context);
  14071. if (!isNested) {
  14072. context.indentLevel--;
  14073. }
  14074. needNewline && deindent(true /* without newline */);
  14075. }
  14076. function genCacheExpression(node, context) {
  14077. const { push, helper, indent, deindent, newline } = context;
  14078. push(`_cache[${node.index}] || (`);
  14079. if (node.isVNode) {
  14080. indent();
  14081. push(`${helper(SET_BLOCK_TRACKING)}(-1),`);
  14082. newline();
  14083. }
  14084. push(`_cache[${node.index}] = `);
  14085. genNode(node.value, context);
  14086. if (node.isVNode) {
  14087. push(`,`);
  14088. newline();
  14089. push(`${helper(SET_BLOCK_TRACKING)}(1),`);
  14090. newline();
  14091. push(`_cache[${node.index}]`);
  14092. deindent();
  14093. }
  14094. push(`)`);
  14095. }
  14096. function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = Object.create(null)) {
  14097. {
  14098. return;
  14099. }
  14100. }
  14101. function isReferencedIdentifier(id, parent, parentStack) {
  14102. {
  14103. return false;
  14104. }
  14105. }
  14106. function isInDestructureAssignment(parent, parentStack) {
  14107. if (parent &&
  14108. (parent.type === 'ObjectProperty' || parent.type === 'ArrayPattern')) {
  14109. let i = parentStack.length;
  14110. while (i--) {
  14111. const p = parentStack[i];
  14112. if (p.type === 'AssignmentExpression') {
  14113. return true;
  14114. }
  14115. else if (p.type !== 'ObjectProperty' && !p.type.endsWith('Pattern')) {
  14116. break;
  14117. }
  14118. }
  14119. }
  14120. return false;
  14121. }
  14122. function walkFunctionParams(node, onIdent) {
  14123. for (const p of node.params) {
  14124. for (const id of extractIdentifiers(p)) {
  14125. onIdent(id);
  14126. }
  14127. }
  14128. }
  14129. function walkBlockDeclarations(block, onIdent) {
  14130. for (const stmt of block.body) {
  14131. if (stmt.type === 'VariableDeclaration') {
  14132. if (stmt.declare)
  14133. continue;
  14134. for (const decl of stmt.declarations) {
  14135. for (const id of extractIdentifiers(decl.id)) {
  14136. onIdent(id);
  14137. }
  14138. }
  14139. }
  14140. else if (stmt.type === 'FunctionDeclaration' ||
  14141. stmt.type === 'ClassDeclaration') {
  14142. if (stmt.declare || !stmt.id)
  14143. continue;
  14144. onIdent(stmt.id);
  14145. }
  14146. }
  14147. }
  14148. function extractIdentifiers(param, nodes = []) {
  14149. switch (param.type) {
  14150. case 'Identifier':
  14151. nodes.push(param);
  14152. break;
  14153. case 'MemberExpression':
  14154. let object = param;
  14155. while (object.type === 'MemberExpression') {
  14156. object = object.object;
  14157. }
  14158. nodes.push(object);
  14159. break;
  14160. case 'ObjectPattern':
  14161. for (const prop of param.properties) {
  14162. if (prop.type === 'RestElement') {
  14163. extractIdentifiers(prop.argument, nodes);
  14164. }
  14165. else {
  14166. extractIdentifiers(prop.value, nodes);
  14167. }
  14168. }
  14169. break;
  14170. case 'ArrayPattern':
  14171. param.elements.forEach(element => {
  14172. if (element)
  14173. extractIdentifiers(element, nodes);
  14174. });
  14175. break;
  14176. case 'RestElement':
  14177. extractIdentifiers(param.argument, nodes);
  14178. break;
  14179. case 'AssignmentPattern':
  14180. extractIdentifiers(param.left, nodes);
  14181. break;
  14182. }
  14183. return nodes;
  14184. }
  14185. const isFunctionType = (node) => {
  14186. return /Function(?:Expression|Declaration)$|Method$/.test(node.type);
  14187. };
  14188. const isStaticProperty = (node) => node &&
  14189. (node.type === 'ObjectProperty' || node.type === 'ObjectMethod') &&
  14190. !node.computed;
  14191. const isStaticPropertyKey = (node, parent) => isStaticProperty(parent) && parent.key === node;
  14192. // these keywords should not appear inside expressions, but operators like
  14193. // typeof, instanceof and in are allowed
  14194. const prohibitedKeywordRE = new RegExp('\\b' +
  14195. ('do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' +
  14196. 'super,throw,while,yield,delete,export,import,return,switch,default,' +
  14197. 'extends,finally,continue,debugger,function,arguments,typeof,void')
  14198. .split(',')
  14199. .join('\\b|\\b') +
  14200. '\\b');
  14201. // strip strings in expressions
  14202. const stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g;
  14203. /**
  14204. * Validate a non-prefixed expression.
  14205. * This is only called when using the in-browser runtime compiler since it
  14206. * doesn't prefix expressions.
  14207. */
  14208. function validateBrowserExpression(node, context, asParams = false, asRawStatements = false) {
  14209. const exp = node.content;
  14210. // empty expressions are validated per-directive since some directives
  14211. // do allow empty expressions.
  14212. if (!exp.trim()) {
  14213. return;
  14214. }
  14215. try {
  14216. new Function(asRawStatements
  14217. ? ` ${exp} `
  14218. : `return ${asParams ? `(${exp}) => {}` : `(${exp})`}`);
  14219. }
  14220. catch (e) {
  14221. let message = e.message;
  14222. const keywordMatch = exp
  14223. .replace(stripStringRE, '')
  14224. .match(prohibitedKeywordRE);
  14225. if (keywordMatch) {
  14226. message = `avoid using JavaScript keyword as property name: "${keywordMatch[0]}"`;
  14227. }
  14228. context.onError(createCompilerError(44 /* X_INVALID_EXPRESSION */, node.loc, undefined, message));
  14229. }
  14230. }
  14231. const transformExpression = (node, context) => {
  14232. if (node.type === 5 /* INTERPOLATION */) {
  14233. node.content = processExpression(node.content, context);
  14234. }
  14235. else if (node.type === 1 /* ELEMENT */) {
  14236. // handle directives on element
  14237. for (let i = 0; i < node.props.length; i++) {
  14238. const dir = node.props[i];
  14239. // do not process for v-on & v-for since they are special handled
  14240. if (dir.type === 7 /* DIRECTIVE */ && dir.name !== 'for') {
  14241. const exp = dir.exp;
  14242. const arg = dir.arg;
  14243. // do not process exp if this is v-on:arg - we need special handling
  14244. // for wrapping inline statements.
  14245. if (exp &&
  14246. exp.type === 4 /* SIMPLE_EXPRESSION */ &&
  14247. !(dir.name === 'on' && arg)) {
  14248. dir.exp = processExpression(exp, context,
  14249. // slot args must be processed as function params
  14250. dir.name === 'slot');
  14251. }
  14252. if (arg && arg.type === 4 /* SIMPLE_EXPRESSION */ && !arg.isStatic) {
  14253. dir.arg = processExpression(arg, context);
  14254. }
  14255. }
  14256. }
  14257. }
  14258. };
  14259. // Important: since this function uses Node.js only dependencies, it should
  14260. // always be used with a leading !true check so that it can be
  14261. // tree-shaken from the browser build.
  14262. function processExpression(node, context,
  14263. // some expressions like v-slot props & v-for aliases should be parsed as
  14264. // function params
  14265. asParams = false,
  14266. // v-on handler values may contain multiple statements
  14267. asRawStatements = false, localVars = Object.create(context.identifiers)) {
  14268. {
  14269. if ((true)) {
  14270. // simple in-browser validation (same logic in 2.x)
  14271. validateBrowserExpression(node, context, asParams, asRawStatements);
  14272. }
  14273. return node;
  14274. }
  14275. }
  14276. const transformIf = createStructuralDirectiveTransform(/^(if|else|else-if)$/, (node, dir, context) => {
  14277. return processIf(node, dir, context, (ifNode, branch, isRoot) => {
  14278. // #1587: We need to dynamically increment the key based on the current
  14279. // node's sibling nodes, since chained v-if/else branches are
  14280. // rendered at the same depth
  14281. const siblings = context.parent.children;
  14282. let i = siblings.indexOf(ifNode);
  14283. let key = 0;
  14284. while (i-- >= 0) {
  14285. const sibling = siblings[i];
  14286. if (sibling && sibling.type === 9 /* IF */) {
  14287. key += sibling.branches.length;
  14288. }
  14289. }
  14290. // Exit callback. Complete the codegenNode when all children have been
  14291. // transformed.
  14292. return () => {
  14293. if (isRoot) {
  14294. ifNode.codegenNode = createCodegenNodeForBranch(branch, key, context);
  14295. }
  14296. else {
  14297. // attach this branch's codegen node to the v-if root.
  14298. const parentCondition = getParentCondition(ifNode.codegenNode);
  14299. parentCondition.alternate = createCodegenNodeForBranch(branch, key + ifNode.branches.length - 1, context);
  14300. }
  14301. };
  14302. });
  14303. });
  14304. // target-agnostic transform used for both Client and SSR
  14305. function processIf(node, dir, context, processCodegen) {
  14306. if (dir.name !== 'else' &&
  14307. (!dir.exp || !dir.exp.content.trim())) {
  14308. const loc = dir.exp ? dir.exp.loc : node.loc;
  14309. context.onError(createCompilerError(28 /* X_V_IF_NO_EXPRESSION */, dir.loc));
  14310. dir.exp = createSimpleExpression(`true`, false, loc);
  14311. }
  14312. if ( true && dir.exp) {
  14313. validateBrowserExpression(dir.exp, context);
  14314. }
  14315. if (dir.name === 'if') {
  14316. const branch = createIfBranch(node, dir);
  14317. const ifNode = {
  14318. type: 9 /* IF */,
  14319. loc: node.loc,
  14320. branches: [branch]
  14321. };
  14322. context.replaceNode(ifNode);
  14323. if (processCodegen) {
  14324. return processCodegen(ifNode, branch, true);
  14325. }
  14326. }
  14327. else {
  14328. // locate the adjacent v-if
  14329. const siblings = context.parent.children;
  14330. const comments = [];
  14331. let i = siblings.indexOf(node);
  14332. while (i-- >= -1) {
  14333. const sibling = siblings[i];
  14334. if (( true) && sibling && sibling.type === 3 /* COMMENT */) {
  14335. context.removeNode(sibling);
  14336. comments.unshift(sibling);
  14337. continue;
  14338. }
  14339. if (sibling &&
  14340. sibling.type === 2 /* TEXT */ &&
  14341. !sibling.content.trim().length) {
  14342. context.removeNode(sibling);
  14343. continue;
  14344. }
  14345. if (sibling && sibling.type === 9 /* IF */) {
  14346. // Check if v-else was followed by v-else-if
  14347. if (dir.name === 'else-if' &&
  14348. sibling.branches[sibling.branches.length - 1].condition === undefined) {
  14349. context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc));
  14350. }
  14351. // move the node to the if node's branches
  14352. context.removeNode();
  14353. const branch = createIfBranch(node, dir);
  14354. if (( true) &&
  14355. comments.length &&
  14356. // #3619 ignore comments if the v-if is direct child of <transition>
  14357. !(context.parent &&
  14358. context.parent.type === 1 /* ELEMENT */ &&
  14359. isBuiltInType(context.parent.tag, 'transition'))) {
  14360. branch.children = [...comments, ...branch.children];
  14361. }
  14362. // check if user is forcing same key on different branches
  14363. if (true) {
  14364. const key = branch.userKey;
  14365. if (key) {
  14366. sibling.branches.forEach(({ userKey }) => {
  14367. if (isSameKey(userKey, key)) {
  14368. context.onError(createCompilerError(29 /* X_V_IF_SAME_KEY */, branch.userKey.loc));
  14369. }
  14370. });
  14371. }
  14372. }
  14373. sibling.branches.push(branch);
  14374. const onExit = processCodegen && processCodegen(sibling, branch, false);
  14375. // since the branch was removed, it will not be traversed.
  14376. // make sure to traverse here.
  14377. traverseNode(branch, context);
  14378. // call on exit
  14379. if (onExit)
  14380. onExit();
  14381. // make sure to reset currentNode after traversal to indicate this
  14382. // node has been removed.
  14383. context.currentNode = null;
  14384. }
  14385. else {
  14386. context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, node.loc));
  14387. }
  14388. break;
  14389. }
  14390. }
  14391. }
  14392. function createIfBranch(node, dir) {
  14393. return {
  14394. type: 10 /* IF_BRANCH */,
  14395. loc: node.loc,
  14396. condition: dir.name === 'else' ? undefined : dir.exp,
  14397. children: node.tagType === 3 /* TEMPLATE */ && !findDir(node, 'for')
  14398. ? node.children
  14399. : [node],
  14400. userKey: findProp(node, `key`)
  14401. };
  14402. }
  14403. function createCodegenNodeForBranch(branch, keyIndex, context) {
  14404. if (branch.condition) {
  14405. return createConditionalExpression(branch.condition, createChildrenCodegenNode(branch, keyIndex, context),
  14406. // make sure to pass in asBlock: true so that the comment node call
  14407. // closes the current block.
  14408. createCallExpression(context.helper(CREATE_COMMENT), [
  14409. ( true) ? '"v-if"' : 0,
  14410. 'true'
  14411. ]));
  14412. }
  14413. else {
  14414. return createChildrenCodegenNode(branch, keyIndex, context);
  14415. }
  14416. }
  14417. function createChildrenCodegenNode(branch, keyIndex, context) {
  14418. const { helper } = context;
  14419. const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2 /* CAN_HOIST */));
  14420. const { children } = branch;
  14421. const firstChild = children[0];
  14422. const needFragmentWrapper = children.length !== 1 || firstChild.type !== 1 /* ELEMENT */;
  14423. if (needFragmentWrapper) {
  14424. if (children.length === 1 && firstChild.type === 11 /* FOR */) {
  14425. // optimize away nested fragments when child is a ForNode
  14426. const vnodeCall = firstChild.codegenNode;
  14427. injectProp(vnodeCall, keyProperty, context);
  14428. return vnodeCall;
  14429. }
  14430. else {
  14431. let patchFlag = 64 /* STABLE_FRAGMENT */;
  14432. let patchFlagText = _vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[64];
  14433. // check if the fragment actually contains a single valid child with
  14434. // the rest being comments
  14435. if (( true) &&
  14436. children.filter(c => c.type !== 3 /* COMMENT */).length === 1) {
  14437. patchFlag |= 2048 /* DEV_ROOT_FRAGMENT */;
  14438. patchFlagText += `, ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[2048]}`;
  14439. }
  14440. return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag + (( true) ? ` /* ${patchFlagText} */` : 0), undefined, undefined, true, false, false /* isComponent */, branch.loc);
  14441. }
  14442. }
  14443. else {
  14444. const ret = firstChild.codegenNode;
  14445. const vnodeCall = getMemoedVNodeCall(ret);
  14446. // Change createVNode to createBlock.
  14447. if (vnodeCall.type === 13 /* VNODE_CALL */) {
  14448. makeBlock(vnodeCall, context);
  14449. }
  14450. // inject branch key
  14451. injectProp(vnodeCall, keyProperty, context);
  14452. return ret;
  14453. }
  14454. }
  14455. function isSameKey(a, b) {
  14456. if (!a || a.type !== b.type) {
  14457. return false;
  14458. }
  14459. if (a.type === 6 /* ATTRIBUTE */) {
  14460. if (a.value.content !== b.value.content) {
  14461. return false;
  14462. }
  14463. }
  14464. else {
  14465. // directive
  14466. const exp = a.exp;
  14467. const branchExp = b.exp;
  14468. if (exp.type !== branchExp.type) {
  14469. return false;
  14470. }
  14471. if (exp.type !== 4 /* SIMPLE_EXPRESSION */ ||
  14472. exp.isStatic !== branchExp.isStatic ||
  14473. exp.content !== branchExp.content) {
  14474. return false;
  14475. }
  14476. }
  14477. return true;
  14478. }
  14479. function getParentCondition(node) {
  14480. while (true) {
  14481. if (node.type === 19 /* JS_CONDITIONAL_EXPRESSION */) {
  14482. if (node.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) {
  14483. node = node.alternate;
  14484. }
  14485. else {
  14486. return node;
  14487. }
  14488. }
  14489. else if (node.type === 20 /* JS_CACHE_EXPRESSION */) {
  14490. node = node.value;
  14491. }
  14492. }
  14493. }
  14494. const transformFor = createStructuralDirectiveTransform('for', (node, dir, context) => {
  14495. const { helper, removeHelper } = context;
  14496. return processFor(node, dir, context, forNode => {
  14497. // create the loop render function expression now, and add the
  14498. // iterator on exit after all children have been traversed
  14499. const renderExp = createCallExpression(helper(RENDER_LIST), [
  14500. forNode.source
  14501. ]);
  14502. const isTemplate = isTemplateNode(node);
  14503. const memo = findDir(node, 'memo');
  14504. const keyProp = findProp(node, `key`);
  14505. const keyExp = keyProp &&
  14506. (keyProp.type === 6 /* ATTRIBUTE */
  14507. ? createSimpleExpression(keyProp.value.content, true)
  14508. : keyProp.exp);
  14509. const keyProperty = keyProp ? createObjectProperty(`key`, keyExp) : null;
  14510. const isStableFragment = forNode.source.type === 4 /* SIMPLE_EXPRESSION */ &&
  14511. forNode.source.constType > 0 /* NOT_CONSTANT */;
  14512. const fragmentFlag = isStableFragment
  14513. ? 64 /* STABLE_FRAGMENT */
  14514. : keyProp
  14515. ? 128 /* KEYED_FRAGMENT */
  14516. : 256 /* UNKEYED_FRAGMENT */;
  14517. forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), undefined, renderExp, fragmentFlag +
  14518. (( true) ? ` /* ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[fragmentFlag]} */` : 0), undefined, undefined, true /* isBlock */, !isStableFragment /* disableTracking */, false /* isComponent */, node.loc);
  14519. return () => {
  14520. // finish the codegen now that all children have been traversed
  14521. let childBlock;
  14522. const { children } = forNode;
  14523. // check <template v-for> key placement
  14524. if (( true) && isTemplate) {
  14525. node.children.some(c => {
  14526. if (c.type === 1 /* ELEMENT */) {
  14527. const key = findProp(c, 'key');
  14528. if (key) {
  14529. context.onError(createCompilerError(33 /* X_V_FOR_TEMPLATE_KEY_PLACEMENT */, key.loc));
  14530. return true;
  14531. }
  14532. }
  14533. });
  14534. }
  14535. const needFragmentWrapper = children.length !== 1 || children[0].type !== 1 /* ELEMENT */;
  14536. const slotOutlet = isSlotOutlet(node)
  14537. ? node
  14538. : isTemplate &&
  14539. node.children.length === 1 &&
  14540. isSlotOutlet(node.children[0])
  14541. ? node.children[0] // api-extractor somehow fails to infer this
  14542. : null;
  14543. if (slotOutlet) {
  14544. // <slot v-for="..."> or <template v-for="..."><slot/></template>
  14545. childBlock = slotOutlet.codegenNode;
  14546. if (isTemplate && keyProperty) {
  14547. // <template v-for="..." :key="..."><slot/></template>
  14548. // we need to inject the key to the renderSlot() call.
  14549. // the props for renderSlot is passed as the 3rd argument.
  14550. injectProp(childBlock, keyProperty, context);
  14551. }
  14552. }
  14553. else if (needFragmentWrapper) {
  14554. // <template v-for="..."> with text or multi-elements
  14555. // should generate a fragment block for each loop
  14556. childBlock = createVNodeCall(context, helper(FRAGMENT), keyProperty ? createObjectExpression([keyProperty]) : undefined, node.children, 64 /* STABLE_FRAGMENT */ +
  14557. (( true)
  14558. ? ` /* ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[64]} */`
  14559. : 0), undefined, undefined, true, undefined, false /* isComponent */);
  14560. }
  14561. else {
  14562. // Normal element v-for. Directly use the child's codegenNode
  14563. // but mark it as a block.
  14564. childBlock = children[0]
  14565. .codegenNode;
  14566. if (isTemplate && keyProperty) {
  14567. injectProp(childBlock, keyProperty, context);
  14568. }
  14569. if (childBlock.isBlock !== !isStableFragment) {
  14570. if (childBlock.isBlock) {
  14571. // switch from block to vnode
  14572. removeHelper(OPEN_BLOCK);
  14573. removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
  14574. }
  14575. else {
  14576. // switch from vnode to block
  14577. removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent));
  14578. }
  14579. }
  14580. childBlock.isBlock = !isStableFragment;
  14581. if (childBlock.isBlock) {
  14582. helper(OPEN_BLOCK);
  14583. helper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
  14584. }
  14585. else {
  14586. helper(getVNodeHelper(context.inSSR, childBlock.isComponent));
  14587. }
  14588. }
  14589. if (memo) {
  14590. const loop = createFunctionExpression(createForLoopParams(forNode.parseResult, [
  14591. createSimpleExpression(`_cached`)
  14592. ]));
  14593. loop.body = createBlockStatement([
  14594. createCompoundExpression([`const _memo = (`, memo.exp, `)`]),
  14595. createCompoundExpression([
  14596. `if (_cached`,
  14597. ...(keyExp ? [` && _cached.key === `, keyExp] : []),
  14598. ` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached`
  14599. ]),
  14600. createCompoundExpression([`const _item = `, childBlock]),
  14601. createSimpleExpression(`_item.memo = _memo`),
  14602. createSimpleExpression(`return _item`)
  14603. ]);
  14604. renderExp.arguments.push(loop, createSimpleExpression(`_cache`), createSimpleExpression(String(context.cached++)));
  14605. }
  14606. else {
  14607. renderExp.arguments.push(createFunctionExpression(createForLoopParams(forNode.parseResult), childBlock, true /* force newline */));
  14608. }
  14609. };
  14610. });
  14611. });
  14612. // target-agnostic transform used for both Client and SSR
  14613. function processFor(node, dir, context, processCodegen) {
  14614. if (!dir.exp) {
  14615. context.onError(createCompilerError(31 /* X_V_FOR_NO_EXPRESSION */, dir.loc));
  14616. return;
  14617. }
  14618. const parseResult = parseForExpression(
  14619. // can only be simple expression because vFor transform is applied
  14620. // before expression transform.
  14621. dir.exp, context);
  14622. if (!parseResult) {
  14623. context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, dir.loc));
  14624. return;
  14625. }
  14626. const { addIdentifiers, removeIdentifiers, scopes } = context;
  14627. const { source, value, key, index } = parseResult;
  14628. const forNode = {
  14629. type: 11 /* FOR */,
  14630. loc: dir.loc,
  14631. source,
  14632. valueAlias: value,
  14633. keyAlias: key,
  14634. objectIndexAlias: index,
  14635. parseResult,
  14636. children: isTemplateNode(node) ? node.children : [node]
  14637. };
  14638. context.replaceNode(forNode);
  14639. // bookkeeping
  14640. scopes.vFor++;
  14641. const onExit = processCodegen && processCodegen(forNode);
  14642. return () => {
  14643. scopes.vFor--;
  14644. if (onExit)
  14645. onExit();
  14646. };
  14647. }
  14648. const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/;
  14649. // This regex doesn't cover the case if key or index aliases have destructuring,
  14650. // but those do not make sense in the first place, so this works in practice.
  14651. const forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/;
  14652. const stripParensRE = /^\(|\)$/g;
  14653. function parseForExpression(input, context) {
  14654. const loc = input.loc;
  14655. const exp = input.content;
  14656. const inMatch = exp.match(forAliasRE);
  14657. if (!inMatch)
  14658. return;
  14659. const [, LHS, RHS] = inMatch;
  14660. const result = {
  14661. source: createAliasExpression(loc, RHS.trim(), exp.indexOf(RHS, LHS.length)),
  14662. value: undefined,
  14663. key: undefined,
  14664. index: undefined
  14665. };
  14666. if (true) {
  14667. validateBrowserExpression(result.source, context);
  14668. }
  14669. let valueContent = LHS.trim().replace(stripParensRE, '').trim();
  14670. const trimmedOffset = LHS.indexOf(valueContent);
  14671. const iteratorMatch = valueContent.match(forIteratorRE);
  14672. if (iteratorMatch) {
  14673. valueContent = valueContent.replace(forIteratorRE, '').trim();
  14674. const keyContent = iteratorMatch[1].trim();
  14675. let keyOffset;
  14676. if (keyContent) {
  14677. keyOffset = exp.indexOf(keyContent, trimmedOffset + valueContent.length);
  14678. result.key = createAliasExpression(loc, keyContent, keyOffset);
  14679. if (true) {
  14680. validateBrowserExpression(result.key, context, true);
  14681. }
  14682. }
  14683. if (iteratorMatch[2]) {
  14684. const indexContent = iteratorMatch[2].trim();
  14685. if (indexContent) {
  14686. result.index = createAliasExpression(loc, indexContent, exp.indexOf(indexContent, result.key
  14687. ? keyOffset + keyContent.length
  14688. : trimmedOffset + valueContent.length));
  14689. if (true) {
  14690. validateBrowserExpression(result.index, context, true);
  14691. }
  14692. }
  14693. }
  14694. }
  14695. if (valueContent) {
  14696. result.value = createAliasExpression(loc, valueContent, trimmedOffset);
  14697. if (true) {
  14698. validateBrowserExpression(result.value, context, true);
  14699. }
  14700. }
  14701. return result;
  14702. }
  14703. function createAliasExpression(range, content, offset) {
  14704. return createSimpleExpression(content, false, getInnerRange(range, offset, content.length));
  14705. }
  14706. function createForLoopParams({ value, key, index }, memoArgs = []) {
  14707. return createParamsList([value, key, index, ...memoArgs]);
  14708. }
  14709. function createParamsList(args) {
  14710. let i = args.length;
  14711. while (i--) {
  14712. if (args[i])
  14713. break;
  14714. }
  14715. return args
  14716. .slice(0, i + 1)
  14717. .map((arg, i) => arg || createSimpleExpression(`_`.repeat(i + 1), false));
  14718. }
  14719. const defaultFallback = createSimpleExpression(`undefined`, false);
  14720. // A NodeTransform that:
  14721. // 1. Tracks scope identifiers for scoped slots so that they don't get prefixed
  14722. // by transformExpression. This is only applied in non-browser builds with
  14723. // { prefixIdentifiers: true }.
  14724. // 2. Track v-slot depths so that we know a slot is inside another slot.
  14725. // Note the exit callback is executed before buildSlots() on the same node,
  14726. // so only nested slots see positive numbers.
  14727. const trackSlotScopes = (node, context) => {
  14728. if (node.type === 1 /* ELEMENT */ &&
  14729. (node.tagType === 1 /* COMPONENT */ ||
  14730. node.tagType === 3 /* TEMPLATE */)) {
  14731. // We are only checking non-empty v-slot here
  14732. // since we only care about slots that introduce scope variables.
  14733. const vSlot = findDir(node, 'slot');
  14734. if (vSlot) {
  14735. vSlot.exp;
  14736. context.scopes.vSlot++;
  14737. return () => {
  14738. context.scopes.vSlot--;
  14739. };
  14740. }
  14741. }
  14742. };
  14743. // A NodeTransform that tracks scope identifiers for scoped slots with v-for.
  14744. // This transform is only applied in non-browser builds with { prefixIdentifiers: true }
  14745. const trackVForSlotScopes = (node, context) => {
  14746. let vFor;
  14747. if (isTemplateNode(node) &&
  14748. node.props.some(isVSlot) &&
  14749. (vFor = findDir(node, 'for'))) {
  14750. const result = (vFor.parseResult = parseForExpression(vFor.exp, context));
  14751. if (result) {
  14752. const { value, key, index } = result;
  14753. const { addIdentifiers, removeIdentifiers } = context;
  14754. value && addIdentifiers(value);
  14755. key && addIdentifiers(key);
  14756. index && addIdentifiers(index);
  14757. return () => {
  14758. value && removeIdentifiers(value);
  14759. key && removeIdentifiers(key);
  14760. index && removeIdentifiers(index);
  14761. };
  14762. }
  14763. }
  14764. };
  14765. const buildClientSlotFn = (props, children, loc) => createFunctionExpression(props, children, false /* newline */, true /* isSlot */, children.length ? children[0].loc : loc);
  14766. // Instead of being a DirectiveTransform, v-slot processing is called during
  14767. // transformElement to build the slots object for a component.
  14768. function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
  14769. context.helper(WITH_CTX);
  14770. const { children, loc } = node;
  14771. const slotsProperties = [];
  14772. const dynamicSlots = [];
  14773. // If the slot is inside a v-for or another v-slot, force it to be dynamic
  14774. // since it likely uses a scope variable.
  14775. let hasDynamicSlots = context.scopes.vSlot > 0 || context.scopes.vFor > 0;
  14776. // 1. Check for slot with slotProps on component itself.
  14777. // <Comp v-slot="{ prop }"/>
  14778. const onComponentSlot = findDir(node, 'slot', true);
  14779. if (onComponentSlot) {
  14780. const { arg, exp } = onComponentSlot;
  14781. if (arg && !isStaticExp(arg)) {
  14782. hasDynamicSlots = true;
  14783. }
  14784. slotsProperties.push(createObjectProperty(arg || createSimpleExpression('default', true), buildSlotFn(exp, children, loc)));
  14785. }
  14786. // 2. Iterate through children and check for template slots
  14787. // <template v-slot:foo="{ prop }">
  14788. let hasTemplateSlots = false;
  14789. let hasNamedDefaultSlot = false;
  14790. const implicitDefaultChildren = [];
  14791. const seenSlotNames = new Set();
  14792. for (let i = 0; i < children.length; i++) {
  14793. const slotElement = children[i];
  14794. let slotDir;
  14795. if (!isTemplateNode(slotElement) ||
  14796. !(slotDir = findDir(slotElement, 'slot', true))) {
  14797. // not a <template v-slot>, skip.
  14798. if (slotElement.type !== 3 /* COMMENT */) {
  14799. implicitDefaultChildren.push(slotElement);
  14800. }
  14801. continue;
  14802. }
  14803. if (onComponentSlot) {
  14804. // already has on-component slot - this is incorrect usage.
  14805. context.onError(createCompilerError(37 /* X_V_SLOT_MIXED_SLOT_USAGE */, slotDir.loc));
  14806. break;
  14807. }
  14808. hasTemplateSlots = true;
  14809. const { children: slotChildren, loc: slotLoc } = slotElement;
  14810. const { arg: slotName = createSimpleExpression(`default`, true), exp: slotProps, loc: dirLoc } = slotDir;
  14811. // check if name is dynamic.
  14812. let staticSlotName;
  14813. if (isStaticExp(slotName)) {
  14814. staticSlotName = slotName ? slotName.content : `default`;
  14815. }
  14816. else {
  14817. hasDynamicSlots = true;
  14818. }
  14819. const slotFunction = buildSlotFn(slotProps, slotChildren, slotLoc);
  14820. // check if this slot is conditional (v-if/v-for)
  14821. let vIf;
  14822. let vElse;
  14823. let vFor;
  14824. if ((vIf = findDir(slotElement, 'if'))) {
  14825. hasDynamicSlots = true;
  14826. dynamicSlots.push(createConditionalExpression(vIf.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback));
  14827. }
  14828. else if ((vElse = findDir(slotElement, /^else(-if)?$/, true /* allowEmpty */))) {
  14829. // find adjacent v-if
  14830. let j = i;
  14831. let prev;
  14832. while (j--) {
  14833. prev = children[j];
  14834. if (prev.type !== 3 /* COMMENT */) {
  14835. break;
  14836. }
  14837. }
  14838. if (prev && isTemplateNode(prev) && findDir(prev, 'if')) {
  14839. // remove node
  14840. children.splice(i, 1);
  14841. i--;
  14842. // attach this slot to previous conditional
  14843. let conditional = dynamicSlots[dynamicSlots.length - 1];
  14844. while (conditional.alternate.type === 19 /* JS_CONDITIONAL_EXPRESSION */) {
  14845. conditional = conditional.alternate;
  14846. }
  14847. conditional.alternate = vElse.exp
  14848. ? createConditionalExpression(vElse.exp, buildDynamicSlot(slotName, slotFunction), defaultFallback)
  14849. : buildDynamicSlot(slotName, slotFunction);
  14850. }
  14851. else {
  14852. context.onError(createCompilerError(30 /* X_V_ELSE_NO_ADJACENT_IF */, vElse.loc));
  14853. }
  14854. }
  14855. else if ((vFor = findDir(slotElement, 'for'))) {
  14856. hasDynamicSlots = true;
  14857. const parseResult = vFor.parseResult ||
  14858. parseForExpression(vFor.exp, context);
  14859. if (parseResult) {
  14860. // Render the dynamic slots as an array and add it to the createSlot()
  14861. // args. The runtime knows how to handle it appropriately.
  14862. dynamicSlots.push(createCallExpression(context.helper(RENDER_LIST), [
  14863. parseResult.source,
  14864. createFunctionExpression(createForLoopParams(parseResult), buildDynamicSlot(slotName, slotFunction), true /* force newline */)
  14865. ]));
  14866. }
  14867. else {
  14868. context.onError(createCompilerError(32 /* X_V_FOR_MALFORMED_EXPRESSION */, vFor.loc));
  14869. }
  14870. }
  14871. else {
  14872. // check duplicate static names
  14873. if (staticSlotName) {
  14874. if (seenSlotNames.has(staticSlotName)) {
  14875. context.onError(createCompilerError(38 /* X_V_SLOT_DUPLICATE_SLOT_NAMES */, dirLoc));
  14876. continue;
  14877. }
  14878. seenSlotNames.add(staticSlotName);
  14879. if (staticSlotName === 'default') {
  14880. hasNamedDefaultSlot = true;
  14881. }
  14882. }
  14883. slotsProperties.push(createObjectProperty(slotName, slotFunction));
  14884. }
  14885. }
  14886. if (!onComponentSlot) {
  14887. const buildDefaultSlotProperty = (props, children) => {
  14888. const fn = buildSlotFn(props, children, loc);
  14889. if (context.compatConfig) {
  14890. fn.isNonScopedSlot = true;
  14891. }
  14892. return createObjectProperty(`default`, fn);
  14893. };
  14894. if (!hasTemplateSlots) {
  14895. // implicit default slot (on component)
  14896. slotsProperties.push(buildDefaultSlotProperty(undefined, children));
  14897. }
  14898. else if (implicitDefaultChildren.length &&
  14899. // #3766
  14900. // with whitespace: 'preserve', whitespaces between slots will end up in
  14901. // implicitDefaultChildren. Ignore if all implicit children are whitespaces.
  14902. implicitDefaultChildren.some(node => isNonWhitespaceContent(node))) {
  14903. // implicit default slot (mixed with named slots)
  14904. if (hasNamedDefaultSlot) {
  14905. context.onError(createCompilerError(39 /* X_V_SLOT_EXTRANEOUS_DEFAULT_SLOT_CHILDREN */, implicitDefaultChildren[0].loc));
  14906. }
  14907. else {
  14908. slotsProperties.push(buildDefaultSlotProperty(undefined, implicitDefaultChildren));
  14909. }
  14910. }
  14911. }
  14912. const slotFlag = hasDynamicSlots
  14913. ? 2 /* DYNAMIC */
  14914. : hasForwardedSlots(node.children)
  14915. ? 3 /* FORWARDED */
  14916. : 1 /* STABLE */;
  14917. let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`,
  14918. // 2 = compiled but dynamic = can skip normalization, but must run diff
  14919. // 1 = compiled and static = can skip normalization AND diff as optimized
  14920. createSimpleExpression(slotFlag + (( true) ? ` /* ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.slotFlagsText[slotFlag]} */` : 0), false))), loc);
  14921. if (dynamicSlots.length) {
  14922. slots = createCallExpression(context.helper(CREATE_SLOTS), [
  14923. slots,
  14924. createArrayExpression(dynamicSlots)
  14925. ]);
  14926. }
  14927. return {
  14928. slots,
  14929. hasDynamicSlots
  14930. };
  14931. }
  14932. function buildDynamicSlot(name, fn) {
  14933. return createObjectExpression([
  14934. createObjectProperty(`name`, name),
  14935. createObjectProperty(`fn`, fn)
  14936. ]);
  14937. }
  14938. function hasForwardedSlots(children) {
  14939. for (let i = 0; i < children.length; i++) {
  14940. const child = children[i];
  14941. switch (child.type) {
  14942. case 1 /* ELEMENT */:
  14943. if (child.tagType === 2 /* SLOT */ ||
  14944. hasForwardedSlots(child.children)) {
  14945. return true;
  14946. }
  14947. break;
  14948. case 9 /* IF */:
  14949. if (hasForwardedSlots(child.branches))
  14950. return true;
  14951. break;
  14952. case 10 /* IF_BRANCH */:
  14953. case 11 /* FOR */:
  14954. if (hasForwardedSlots(child.children))
  14955. return true;
  14956. break;
  14957. }
  14958. }
  14959. return false;
  14960. }
  14961. function isNonWhitespaceContent(node) {
  14962. if (node.type !== 2 /* TEXT */ && node.type !== 12 /* TEXT_CALL */)
  14963. return true;
  14964. return node.type === 2 /* TEXT */
  14965. ? !!node.content.trim()
  14966. : isNonWhitespaceContent(node.content);
  14967. }
  14968. // some directive transforms (e.g. v-model) may return a symbol for runtime
  14969. // import, which should be used instead of a resolveDirective call.
  14970. const directiveImportMap = new WeakMap();
  14971. // generate a JavaScript AST for this element's codegen
  14972. const transformElement = (node, context) => {
  14973. // perform the work on exit, after all child expressions have been
  14974. // processed and merged.
  14975. return function postTransformElement() {
  14976. node = context.currentNode;
  14977. if (!(node.type === 1 /* ELEMENT */ &&
  14978. (node.tagType === 0 /* ELEMENT */ ||
  14979. node.tagType === 1 /* COMPONENT */))) {
  14980. return;
  14981. }
  14982. const { tag, props } = node;
  14983. const isComponent = node.tagType === 1 /* COMPONENT */;
  14984. // The goal of the transform is to create a codegenNode implementing the
  14985. // VNodeCall interface.
  14986. let vnodeTag = isComponent
  14987. ? resolveComponentType(node, context)
  14988. : `"${tag}"`;
  14989. const isDynamicComponent = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(vnodeTag) && vnodeTag.callee === RESOLVE_DYNAMIC_COMPONENT;
  14990. let vnodeProps;
  14991. let vnodeChildren;
  14992. let vnodePatchFlag;
  14993. let patchFlag = 0;
  14994. let vnodeDynamicProps;
  14995. let dynamicPropNames;
  14996. let vnodeDirectives;
  14997. let shouldUseBlock =
  14998. // dynamic component may resolve to plain elements
  14999. isDynamicComponent ||
  15000. vnodeTag === TELEPORT ||
  15001. vnodeTag === SUSPENSE ||
  15002. (!isComponent &&
  15003. // <svg> and <foreignObject> must be forced into blocks so that block
  15004. // updates inside get proper isSVG flag at runtime. (#639, #643)
  15005. // This is technically web-specific, but splitting the logic out of core
  15006. // leads to too much unnecessary complexity.
  15007. (tag === 'svg' || tag === 'foreignObject'));
  15008. // props
  15009. if (props.length > 0) {
  15010. const propsBuildResult = buildProps(node, context);
  15011. vnodeProps = propsBuildResult.props;
  15012. patchFlag = propsBuildResult.patchFlag;
  15013. dynamicPropNames = propsBuildResult.dynamicPropNames;
  15014. const directives = propsBuildResult.directives;
  15015. vnodeDirectives =
  15016. directives && directives.length
  15017. ? createArrayExpression(directives.map(dir => buildDirectiveArgs(dir, context)))
  15018. : undefined;
  15019. if (propsBuildResult.shouldUseBlock) {
  15020. shouldUseBlock = true;
  15021. }
  15022. }
  15023. // children
  15024. if (node.children.length > 0) {
  15025. if (vnodeTag === KEEP_ALIVE) {
  15026. // Although a built-in component, we compile KeepAlive with raw children
  15027. // instead of slot functions so that it can be used inside Transition
  15028. // or other Transition-wrapping HOCs.
  15029. // To ensure correct updates with block optimizations, we need to:
  15030. // 1. Force keep-alive into a block. This avoids its children being
  15031. // collected by a parent block.
  15032. shouldUseBlock = true;
  15033. // 2. Force keep-alive to always be updated, since it uses raw children.
  15034. patchFlag |= 1024 /* DYNAMIC_SLOTS */;
  15035. if (( true) && node.children.length > 1) {
  15036. context.onError(createCompilerError(45 /* X_KEEP_ALIVE_INVALID_CHILDREN */, {
  15037. start: node.children[0].loc.start,
  15038. end: node.children[node.children.length - 1].loc.end,
  15039. source: ''
  15040. }));
  15041. }
  15042. }
  15043. const shouldBuildAsSlots = isComponent &&
  15044. // Teleport is not a real component and has dedicated runtime handling
  15045. vnodeTag !== TELEPORT &&
  15046. // explained above.
  15047. vnodeTag !== KEEP_ALIVE;
  15048. if (shouldBuildAsSlots) {
  15049. const { slots, hasDynamicSlots } = buildSlots(node, context);
  15050. vnodeChildren = slots;
  15051. if (hasDynamicSlots) {
  15052. patchFlag |= 1024 /* DYNAMIC_SLOTS */;
  15053. }
  15054. }
  15055. else if (node.children.length === 1 && vnodeTag !== TELEPORT) {
  15056. const child = node.children[0];
  15057. const type = child.type;
  15058. // check for dynamic text children
  15059. const hasDynamicTextChild = type === 5 /* INTERPOLATION */ ||
  15060. type === 8 /* COMPOUND_EXPRESSION */;
  15061. if (hasDynamicTextChild &&
  15062. getConstantType(child, context) === 0 /* NOT_CONSTANT */) {
  15063. patchFlag |= 1 /* TEXT */;
  15064. }
  15065. // pass directly if the only child is a text node
  15066. // (plain / interpolation / expression)
  15067. if (hasDynamicTextChild || type === 2 /* TEXT */) {
  15068. vnodeChildren = child;
  15069. }
  15070. else {
  15071. vnodeChildren = node.children;
  15072. }
  15073. }
  15074. else {
  15075. vnodeChildren = node.children;
  15076. }
  15077. }
  15078. // patchFlag & dynamicPropNames
  15079. if (patchFlag !== 0) {
  15080. if ((true)) {
  15081. if (patchFlag < 0) {
  15082. // special flags (negative and mutually exclusive)
  15083. vnodePatchFlag = patchFlag + ` /* ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[patchFlag]} */`;
  15084. }
  15085. else {
  15086. // bitwise flags
  15087. const flagNames = Object.keys(_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames)
  15088. .map(Number)
  15089. .filter(n => n > 0 && patchFlag & n)
  15090. .map(n => _vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[n])
  15091. .join(`, `);
  15092. vnodePatchFlag = patchFlag + ` /* ${flagNames} */`;
  15093. }
  15094. }
  15095. else {}
  15096. if (dynamicPropNames && dynamicPropNames.length) {
  15097. vnodeDynamicProps = stringifyDynamicPropNames(dynamicPropNames);
  15098. }
  15099. }
  15100. node.codegenNode = createVNodeCall(context, vnodeTag, vnodeProps, vnodeChildren, vnodePatchFlag, vnodeDynamicProps, vnodeDirectives, !!shouldUseBlock, false /* disableTracking */, isComponent, node.loc);
  15101. };
  15102. };
  15103. function resolveComponentType(node, context, ssr = false) {
  15104. let { tag } = node;
  15105. // 1. dynamic component
  15106. const isExplicitDynamic = isComponentTag(tag);
  15107. const isProp = findProp(node, 'is');
  15108. if (isProp) {
  15109. if (isExplicitDynamic ||
  15110. (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context))) {
  15111. const exp = isProp.type === 6 /* ATTRIBUTE */
  15112. ? isProp.value && createSimpleExpression(isProp.value.content, true)
  15113. : isProp.exp;
  15114. if (exp) {
  15115. return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
  15116. exp
  15117. ]);
  15118. }
  15119. }
  15120. else if (isProp.type === 6 /* ATTRIBUTE */ &&
  15121. isProp.value.content.startsWith('vue:')) {
  15122. // <button is="vue:xxx">
  15123. // if not <component>, only is value that starts with "vue:" will be
  15124. // treated as component by the parse phase and reach here, unless it's
  15125. // compat mode where all is values are considered components
  15126. tag = isProp.value.content.slice(4);
  15127. }
  15128. }
  15129. // 1.5 v-is (TODO: Deprecate)
  15130. const isDir = !isExplicitDynamic && findDir(node, 'is');
  15131. if (isDir && isDir.exp) {
  15132. return createCallExpression(context.helper(RESOLVE_DYNAMIC_COMPONENT), [
  15133. isDir.exp
  15134. ]);
  15135. }
  15136. // 2. built-in components (Teleport, Transition, KeepAlive, Suspense...)
  15137. const builtIn = isCoreComponent(tag) || context.isBuiltInComponent(tag);
  15138. if (builtIn) {
  15139. // built-ins are simply fallthroughs / have special handling during ssr
  15140. // so we don't need to import their runtime equivalents
  15141. if (!ssr)
  15142. context.helper(builtIn);
  15143. return builtIn;
  15144. }
  15145. // 5. user component (resolve)
  15146. context.helper(RESOLVE_COMPONENT);
  15147. context.components.add(tag);
  15148. return toValidAssetId(tag, `component`);
  15149. }
  15150. function buildProps(node, context, props = node.props, ssr = false) {
  15151. const { tag, loc: elementLoc, children } = node;
  15152. const isComponent = node.tagType === 1 /* COMPONENT */;
  15153. let properties = [];
  15154. const mergeArgs = [];
  15155. const runtimeDirectives = [];
  15156. const hasChildren = children.length > 0;
  15157. let shouldUseBlock = false;
  15158. // patchFlag analysis
  15159. let patchFlag = 0;
  15160. let hasRef = false;
  15161. let hasClassBinding = false;
  15162. let hasStyleBinding = false;
  15163. let hasHydrationEventBinding = false;
  15164. let hasDynamicKeys = false;
  15165. let hasVnodeHook = false;
  15166. const dynamicPropNames = [];
  15167. const analyzePatchFlag = ({ key, value }) => {
  15168. if (isStaticExp(key)) {
  15169. const name = key.content;
  15170. const isEventHandler = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isOn)(name);
  15171. if (!isComponent &&
  15172. isEventHandler &&
  15173. // omit the flag for click handlers because hydration gives click
  15174. // dedicated fast path.
  15175. name.toLowerCase() !== 'onclick' &&
  15176. // omit v-model handlers
  15177. name !== 'onUpdate:modelValue' &&
  15178. // omit onVnodeXXX hooks
  15179. !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isReservedProp)(name)) {
  15180. hasHydrationEventBinding = true;
  15181. }
  15182. if (isEventHandler && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isReservedProp)(name)) {
  15183. hasVnodeHook = true;
  15184. }
  15185. if (value.type === 20 /* JS_CACHE_EXPRESSION */ ||
  15186. ((value.type === 4 /* SIMPLE_EXPRESSION */ ||
  15187. value.type === 8 /* COMPOUND_EXPRESSION */) &&
  15188. getConstantType(value, context) > 0)) {
  15189. // skip if the prop is a cached handler or has constant value
  15190. return;
  15191. }
  15192. if (name === 'ref') {
  15193. hasRef = true;
  15194. }
  15195. else if (name === 'class') {
  15196. hasClassBinding = true;
  15197. }
  15198. else if (name === 'style') {
  15199. hasStyleBinding = true;
  15200. }
  15201. else if (name !== 'key' && !dynamicPropNames.includes(name)) {
  15202. dynamicPropNames.push(name);
  15203. }
  15204. // treat the dynamic class and style binding of the component as dynamic props
  15205. if (isComponent &&
  15206. (name === 'class' || name === 'style') &&
  15207. !dynamicPropNames.includes(name)) {
  15208. dynamicPropNames.push(name);
  15209. }
  15210. }
  15211. else {
  15212. hasDynamicKeys = true;
  15213. }
  15214. };
  15215. for (let i = 0; i < props.length; i++) {
  15216. // static attribute
  15217. const prop = props[i];
  15218. if (prop.type === 6 /* ATTRIBUTE */) {
  15219. const { loc, name, value } = prop;
  15220. let isStatic = true;
  15221. if (name === 'ref') {
  15222. hasRef = true;
  15223. if (context.scopes.vFor > 0) {
  15224. properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true')));
  15225. }
  15226. }
  15227. // skip is on <component>, or is="vue:xxx"
  15228. if (name === 'is' &&
  15229. (isComponentTag(tag) ||
  15230. (value && value.content.startsWith('vue:')) ||
  15231. (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context)))) {
  15232. continue;
  15233. }
  15234. properties.push(createObjectProperty(createSimpleExpression(name, true, getInnerRange(loc, 0, name.length)), createSimpleExpression(value ? value.content : '', isStatic, value ? value.loc : loc)));
  15235. }
  15236. else {
  15237. // directives
  15238. const { name, arg, exp, loc } = prop;
  15239. const isVBind = name === 'bind';
  15240. const isVOn = name === 'on';
  15241. // skip v-slot - it is handled by its dedicated transform.
  15242. if (name === 'slot') {
  15243. if (!isComponent) {
  15244. context.onError(createCompilerError(40 /* X_V_SLOT_MISPLACED */, loc));
  15245. }
  15246. continue;
  15247. }
  15248. // skip v-once/v-memo - they are handled by dedicated transforms.
  15249. if (name === 'once' || name === 'memo') {
  15250. continue;
  15251. }
  15252. // skip v-is and :is on <component>
  15253. if (name === 'is' ||
  15254. (isVBind &&
  15255. isStaticArgOf(arg, 'is') &&
  15256. (isComponentTag(tag) ||
  15257. (isCompatEnabled("COMPILER_IS_ON_ELEMENT" /* COMPILER_IS_ON_ELEMENT */, context))))) {
  15258. continue;
  15259. }
  15260. // skip v-on in SSR compilation
  15261. if (isVOn && ssr) {
  15262. continue;
  15263. }
  15264. if (
  15265. // #938: elements with dynamic keys should be forced into blocks
  15266. (isVBind && isStaticArgOf(arg, 'key')) ||
  15267. // inline before-update hooks need to force block so that it is invoked
  15268. // before children
  15269. (isVOn && hasChildren && isStaticArgOf(arg, 'vue:before-update'))) {
  15270. shouldUseBlock = true;
  15271. }
  15272. if (isVBind && isStaticArgOf(arg, 'ref') && context.scopes.vFor > 0) {
  15273. properties.push(createObjectProperty(createSimpleExpression('ref_for', true), createSimpleExpression('true')));
  15274. }
  15275. // special case for v-bind and v-on with no argument
  15276. if (!arg && (isVBind || isVOn)) {
  15277. hasDynamicKeys = true;
  15278. if (exp) {
  15279. if (properties.length) {
  15280. mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc));
  15281. properties = [];
  15282. }
  15283. if (isVBind) {
  15284. {
  15285. // 2.x v-bind object order compat
  15286. if ((true)) {
  15287. const hasOverridableKeys = mergeArgs.some(arg => {
  15288. if (arg.type === 15 /* JS_OBJECT_EXPRESSION */) {
  15289. return arg.properties.some(({ key }) => {
  15290. if (key.type !== 4 /* SIMPLE_EXPRESSION */ ||
  15291. !key.isStatic) {
  15292. return true;
  15293. }
  15294. return (key.content !== 'class' &&
  15295. key.content !== 'style' &&
  15296. !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isOn)(key.content));
  15297. });
  15298. }
  15299. else {
  15300. // dynamic expression
  15301. return true;
  15302. }
  15303. });
  15304. if (hasOverridableKeys) {
  15305. checkCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */, context, loc);
  15306. }
  15307. }
  15308. if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER" /* COMPILER_V_BIND_OBJECT_ORDER */, context)) {
  15309. mergeArgs.unshift(exp);
  15310. continue;
  15311. }
  15312. }
  15313. mergeArgs.push(exp);
  15314. }
  15315. else {
  15316. // v-on="obj" -> toHandlers(obj)
  15317. mergeArgs.push({
  15318. type: 14 /* JS_CALL_EXPRESSION */,
  15319. loc,
  15320. callee: context.helper(TO_HANDLERS),
  15321. arguments: [exp]
  15322. });
  15323. }
  15324. }
  15325. else {
  15326. context.onError(createCompilerError(isVBind
  15327. ? 34 /* X_V_BIND_NO_EXPRESSION */
  15328. : 35 /* X_V_ON_NO_EXPRESSION */, loc));
  15329. }
  15330. continue;
  15331. }
  15332. const directiveTransform = context.directiveTransforms[name];
  15333. if (directiveTransform) {
  15334. // has built-in directive transform.
  15335. const { props, needRuntime } = directiveTransform(prop, node, context);
  15336. !ssr && props.forEach(analyzePatchFlag);
  15337. properties.push(...props);
  15338. if (needRuntime) {
  15339. runtimeDirectives.push(prop);
  15340. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(needRuntime)) {
  15341. directiveImportMap.set(prop, needRuntime);
  15342. }
  15343. }
  15344. }
  15345. else if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isBuiltInDirective)(name)) {
  15346. // no built-in transform, this is a user custom directive.
  15347. runtimeDirectives.push(prop);
  15348. // custom dirs may use beforeUpdate so they need to force blocks
  15349. // to ensure before-update gets called before children update
  15350. if (hasChildren) {
  15351. shouldUseBlock = true;
  15352. }
  15353. }
  15354. }
  15355. }
  15356. let propsExpression = undefined;
  15357. // has v-bind="object" or v-on="object", wrap with mergeProps
  15358. if (mergeArgs.length) {
  15359. if (properties.length) {
  15360. mergeArgs.push(createObjectExpression(dedupeProperties(properties), elementLoc));
  15361. }
  15362. if (mergeArgs.length > 1) {
  15363. propsExpression = createCallExpression(context.helper(MERGE_PROPS), mergeArgs, elementLoc);
  15364. }
  15365. else {
  15366. // single v-bind with nothing else - no need for a mergeProps call
  15367. propsExpression = mergeArgs[0];
  15368. }
  15369. }
  15370. else if (properties.length) {
  15371. propsExpression = createObjectExpression(dedupeProperties(properties), elementLoc);
  15372. }
  15373. // patchFlag analysis
  15374. if (hasDynamicKeys) {
  15375. patchFlag |= 16 /* FULL_PROPS */;
  15376. }
  15377. else {
  15378. if (hasClassBinding && !isComponent) {
  15379. patchFlag |= 2 /* CLASS */;
  15380. }
  15381. if (hasStyleBinding && !isComponent) {
  15382. patchFlag |= 4 /* STYLE */;
  15383. }
  15384. if (dynamicPropNames.length) {
  15385. patchFlag |= 8 /* PROPS */;
  15386. }
  15387. if (hasHydrationEventBinding) {
  15388. patchFlag |= 32 /* HYDRATE_EVENTS */;
  15389. }
  15390. }
  15391. if (!shouldUseBlock &&
  15392. (patchFlag === 0 || patchFlag === 32 /* HYDRATE_EVENTS */) &&
  15393. (hasRef || hasVnodeHook || runtimeDirectives.length > 0)) {
  15394. patchFlag |= 512 /* NEED_PATCH */;
  15395. }
  15396. // pre-normalize props, SSR is skipped for now
  15397. if (!context.inSSR && propsExpression) {
  15398. switch (propsExpression.type) {
  15399. case 15 /* JS_OBJECT_EXPRESSION */:
  15400. // means that there is no v-bind,
  15401. // but still need to deal with dynamic key binding
  15402. let classKeyIndex = -1;
  15403. let styleKeyIndex = -1;
  15404. let hasDynamicKey = false;
  15405. for (let i = 0; i < propsExpression.properties.length; i++) {
  15406. const key = propsExpression.properties[i].key;
  15407. if (isStaticExp(key)) {
  15408. if (key.content === 'class') {
  15409. classKeyIndex = i;
  15410. }
  15411. else if (key.content === 'style') {
  15412. styleKeyIndex = i;
  15413. }
  15414. }
  15415. else if (!key.isHandlerKey) {
  15416. hasDynamicKey = true;
  15417. }
  15418. }
  15419. const classProp = propsExpression.properties[classKeyIndex];
  15420. const styleProp = propsExpression.properties[styleKeyIndex];
  15421. // no dynamic key
  15422. if (!hasDynamicKey) {
  15423. if (classProp && !isStaticExp(classProp.value)) {
  15424. classProp.value = createCallExpression(context.helper(NORMALIZE_CLASS), [classProp.value]);
  15425. }
  15426. if (styleProp &&
  15427. !isStaticExp(styleProp.value) &&
  15428. // the static style is compiled into an object,
  15429. // so use `hasStyleBinding` to ensure that it is a dynamic style binding
  15430. (hasStyleBinding ||
  15431. // v-bind:style and style both exist,
  15432. // v-bind:style with static literal object
  15433. styleProp.value.type === 17 /* JS_ARRAY_EXPRESSION */)) {
  15434. styleProp.value = createCallExpression(context.helper(NORMALIZE_STYLE), [styleProp.value]);
  15435. }
  15436. }
  15437. else {
  15438. // dynamic key binding, wrap with `normalizeProps`
  15439. propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]);
  15440. }
  15441. break;
  15442. case 14 /* JS_CALL_EXPRESSION */:
  15443. // mergeProps call, do nothing
  15444. break;
  15445. default:
  15446. // single v-bind
  15447. propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [
  15448. createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [
  15449. propsExpression
  15450. ])
  15451. ]);
  15452. break;
  15453. }
  15454. }
  15455. return {
  15456. props: propsExpression,
  15457. directives: runtimeDirectives,
  15458. patchFlag,
  15459. dynamicPropNames,
  15460. shouldUseBlock
  15461. };
  15462. }
  15463. // Dedupe props in an object literal.
  15464. // Literal duplicated attributes would have been warned during the parse phase,
  15465. // however, it's possible to encounter duplicated `onXXX` handlers with different
  15466. // modifiers. We also need to merge static and dynamic class / style attributes.
  15467. // - onXXX handlers / style: merge into array
  15468. // - class: merge into single expression with concatenation
  15469. function dedupeProperties(properties) {
  15470. const knownProps = new Map();
  15471. const deduped = [];
  15472. for (let i = 0; i < properties.length; i++) {
  15473. const prop = properties[i];
  15474. // dynamic keys are always allowed
  15475. if (prop.key.type === 8 /* COMPOUND_EXPRESSION */ || !prop.key.isStatic) {
  15476. deduped.push(prop);
  15477. continue;
  15478. }
  15479. const name = prop.key.content;
  15480. const existing = knownProps.get(name);
  15481. if (existing) {
  15482. if (name === 'style' || name === 'class' || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isOn)(name)) {
  15483. mergeAsArray(existing, prop);
  15484. }
  15485. // unexpected duplicate, should have emitted error during parse
  15486. }
  15487. else {
  15488. knownProps.set(name, prop);
  15489. deduped.push(prop);
  15490. }
  15491. }
  15492. return deduped;
  15493. }
  15494. function mergeAsArray(existing, incoming) {
  15495. if (existing.value.type === 17 /* JS_ARRAY_EXPRESSION */) {
  15496. existing.value.elements.push(incoming.value);
  15497. }
  15498. else {
  15499. existing.value = createArrayExpression([existing.value, incoming.value], existing.loc);
  15500. }
  15501. }
  15502. function buildDirectiveArgs(dir, context) {
  15503. const dirArgs = [];
  15504. const runtime = directiveImportMap.get(dir);
  15505. if (runtime) {
  15506. // built-in directive with runtime
  15507. dirArgs.push(context.helperString(runtime));
  15508. }
  15509. else {
  15510. {
  15511. // inject statement for resolving directive
  15512. context.helper(RESOLVE_DIRECTIVE);
  15513. context.directives.add(dir.name);
  15514. dirArgs.push(toValidAssetId(dir.name, `directive`));
  15515. }
  15516. }
  15517. const { loc } = dir;
  15518. if (dir.exp)
  15519. dirArgs.push(dir.exp);
  15520. if (dir.arg) {
  15521. if (!dir.exp) {
  15522. dirArgs.push(`void 0`);
  15523. }
  15524. dirArgs.push(dir.arg);
  15525. }
  15526. if (Object.keys(dir.modifiers).length) {
  15527. if (!dir.arg) {
  15528. if (!dir.exp) {
  15529. dirArgs.push(`void 0`);
  15530. }
  15531. dirArgs.push(`void 0`);
  15532. }
  15533. const trueExpression = createSimpleExpression(`true`, false, loc);
  15534. dirArgs.push(createObjectExpression(dir.modifiers.map(modifier => createObjectProperty(modifier, trueExpression)), loc));
  15535. }
  15536. return createArrayExpression(dirArgs, dir.loc);
  15537. }
  15538. function stringifyDynamicPropNames(props) {
  15539. let propsNamesString = `[`;
  15540. for (let i = 0, l = props.length; i < l; i++) {
  15541. propsNamesString += JSON.stringify(props[i]);
  15542. if (i < l - 1)
  15543. propsNamesString += ', ';
  15544. }
  15545. return propsNamesString + `]`;
  15546. }
  15547. function isComponentTag(tag) {
  15548. return tag === 'component' || tag === 'Component';
  15549. }
  15550. ( true)
  15551. ? Object.freeze({})
  15552. : 0;
  15553. ( true) ? Object.freeze([]) : 0;
  15554. const cacheStringFunction = (fn) => {
  15555. const cache = Object.create(null);
  15556. return ((str) => {
  15557. const hit = cache[str];
  15558. return hit || (cache[str] = fn(str));
  15559. });
  15560. };
  15561. const camelizeRE = /-(\w)/g;
  15562. /**
  15563. * @private
  15564. */
  15565. const camelize = cacheStringFunction((str) => {
  15566. return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''));
  15567. });
  15568. const transformSlotOutlet = (node, context) => {
  15569. if (isSlotOutlet(node)) {
  15570. const { children, loc } = node;
  15571. const { slotName, slotProps } = processSlotOutlet(node, context);
  15572. const slotArgs = [
  15573. context.prefixIdentifiers ? `_ctx.$slots` : `$slots`,
  15574. slotName,
  15575. '{}',
  15576. 'undefined',
  15577. 'true'
  15578. ];
  15579. let expectedLen = 2;
  15580. if (slotProps) {
  15581. slotArgs[2] = slotProps;
  15582. expectedLen = 3;
  15583. }
  15584. if (children.length) {
  15585. slotArgs[3] = createFunctionExpression([], children, false, false, loc);
  15586. expectedLen = 4;
  15587. }
  15588. if (context.scopeId && !context.slotted) {
  15589. expectedLen = 5;
  15590. }
  15591. slotArgs.splice(expectedLen); // remove unused arguments
  15592. node.codegenNode = createCallExpression(context.helper(RENDER_SLOT), slotArgs, loc);
  15593. }
  15594. };
  15595. function processSlotOutlet(node, context) {
  15596. let slotName = `"default"`;
  15597. let slotProps = undefined;
  15598. const nonNameProps = [];
  15599. for (let i = 0; i < node.props.length; i++) {
  15600. const p = node.props[i];
  15601. if (p.type === 6 /* ATTRIBUTE */) {
  15602. if (p.value) {
  15603. if (p.name === 'name') {
  15604. slotName = JSON.stringify(p.value.content);
  15605. }
  15606. else {
  15607. p.name = camelize(p.name);
  15608. nonNameProps.push(p);
  15609. }
  15610. }
  15611. }
  15612. else {
  15613. if (p.name === 'bind' && isStaticArgOf(p.arg, 'name')) {
  15614. if (p.exp)
  15615. slotName = p.exp;
  15616. }
  15617. else {
  15618. if (p.name === 'bind' && p.arg && isStaticExp(p.arg)) {
  15619. p.arg.content = camelize(p.arg.content);
  15620. }
  15621. nonNameProps.push(p);
  15622. }
  15623. }
  15624. }
  15625. if (nonNameProps.length > 0) {
  15626. const { props, directives } = buildProps(node, context, nonNameProps);
  15627. slotProps = props;
  15628. if (directives.length) {
  15629. context.onError(createCompilerError(36 /* X_V_SLOT_UNEXPECTED_DIRECTIVE_ON_SLOT_OUTLET */, directives[0].loc));
  15630. }
  15631. }
  15632. return {
  15633. slotName,
  15634. slotProps
  15635. };
  15636. }
  15637. const fnExpRE = /^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;
  15638. const transformOn = (dir, node, context, augmentor) => {
  15639. const { loc, modifiers, arg } = dir;
  15640. if (!dir.exp && !modifiers.length) {
  15641. context.onError(createCompilerError(35 /* X_V_ON_NO_EXPRESSION */, loc));
  15642. }
  15643. let eventName;
  15644. if (arg.type === 4 /* SIMPLE_EXPRESSION */) {
  15645. if (arg.isStatic) {
  15646. let rawName = arg.content;
  15647. // TODO deprecate @vnodeXXX usage
  15648. if (rawName.startsWith('vue:')) {
  15649. rawName = `vnode-${rawName.slice(4)}`;
  15650. }
  15651. // for all event listeners, auto convert it to camelCase. See issue #2249
  15652. eventName = createSimpleExpression((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.camelize)(rawName)), true, arg.loc);
  15653. }
  15654. else {
  15655. // #2388
  15656. eventName = createCompoundExpression([
  15657. `${context.helperString(TO_HANDLER_KEY)}(`,
  15658. arg,
  15659. `)`
  15660. ]);
  15661. }
  15662. }
  15663. else {
  15664. // already a compound expression.
  15665. eventName = arg;
  15666. eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`);
  15667. eventName.children.push(`)`);
  15668. }
  15669. // handler processing
  15670. let exp = dir.exp;
  15671. if (exp && !exp.content.trim()) {
  15672. exp = undefined;
  15673. }
  15674. let shouldCache = context.cacheHandlers && !exp && !context.inVOnce;
  15675. if (exp) {
  15676. const isMemberExp = isMemberExpression(exp.content);
  15677. const isInlineStatement = !(isMemberExp || fnExpRE.test(exp.content));
  15678. const hasMultipleStatements = exp.content.includes(`;`);
  15679. if (true) {
  15680. validateBrowserExpression(exp, context, false, hasMultipleStatements);
  15681. }
  15682. if (isInlineStatement || (shouldCache && isMemberExp)) {
  15683. // wrap inline statement in a function expression
  15684. exp = createCompoundExpression([
  15685. `${isInlineStatement
  15686. ? `$event`
  15687. : `${``}(...args)`} => ${hasMultipleStatements ? `{` : `(`}`,
  15688. exp,
  15689. hasMultipleStatements ? `}` : `)`
  15690. ]);
  15691. }
  15692. }
  15693. let ret = {
  15694. props: [
  15695. createObjectProperty(eventName, exp || createSimpleExpression(`() => {}`, false, loc))
  15696. ]
  15697. };
  15698. // apply extended compiler augmentor
  15699. if (augmentor) {
  15700. ret = augmentor(ret);
  15701. }
  15702. if (shouldCache) {
  15703. // cache handlers so that it's always the same handler being passed down.
  15704. // this avoids unnecessary re-renders when users use inline handlers on
  15705. // components.
  15706. ret.props[0].value = context.cache(ret.props[0].value);
  15707. }
  15708. // mark the key as handler for props normalization check
  15709. ret.props.forEach(p => (p.key.isHandlerKey = true));
  15710. return ret;
  15711. };
  15712. // v-bind without arg is handled directly in ./transformElements.ts due to it affecting
  15713. // codegen for the entire props object. This transform here is only for v-bind
  15714. // *with* args.
  15715. const transformBind = (dir, _node, context) => {
  15716. const { exp, modifiers, loc } = dir;
  15717. const arg = dir.arg;
  15718. if (arg.type !== 4 /* SIMPLE_EXPRESSION */) {
  15719. arg.children.unshift(`(`);
  15720. arg.children.push(`) || ""`);
  15721. }
  15722. else if (!arg.isStatic) {
  15723. arg.content = `${arg.content} || ""`;
  15724. }
  15725. // .sync is replaced by v-model:arg
  15726. if (modifiers.includes('camel')) {
  15727. if (arg.type === 4 /* SIMPLE_EXPRESSION */) {
  15728. if (arg.isStatic) {
  15729. arg.content = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.camelize)(arg.content);
  15730. }
  15731. else {
  15732. arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
  15733. }
  15734. }
  15735. else {
  15736. arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
  15737. arg.children.push(`)`);
  15738. }
  15739. }
  15740. if (!context.inSSR) {
  15741. if (modifiers.includes('prop')) {
  15742. injectPrefix(arg, '.');
  15743. }
  15744. if (modifiers.includes('attr')) {
  15745. injectPrefix(arg, '^');
  15746. }
  15747. }
  15748. if (!exp ||
  15749. (exp.type === 4 /* SIMPLE_EXPRESSION */ && !exp.content.trim())) {
  15750. context.onError(createCompilerError(34 /* X_V_BIND_NO_EXPRESSION */, loc));
  15751. return {
  15752. props: [createObjectProperty(arg, createSimpleExpression('', true, loc))]
  15753. };
  15754. }
  15755. return {
  15756. props: [createObjectProperty(arg, exp)]
  15757. };
  15758. };
  15759. const injectPrefix = (arg, prefix) => {
  15760. if (arg.type === 4 /* SIMPLE_EXPRESSION */) {
  15761. if (arg.isStatic) {
  15762. arg.content = prefix + arg.content;
  15763. }
  15764. else {
  15765. arg.content = `\`${prefix}\${${arg.content}}\``;
  15766. }
  15767. }
  15768. else {
  15769. arg.children.unshift(`'${prefix}' + (`);
  15770. arg.children.push(`)`);
  15771. }
  15772. };
  15773. // Merge adjacent text nodes and expressions into a single expression
  15774. // e.g. <div>abc {{ d }} {{ e }}</div> should have a single expression node as child.
  15775. const transformText = (node, context) => {
  15776. if (node.type === 0 /* ROOT */ ||
  15777. node.type === 1 /* ELEMENT */ ||
  15778. node.type === 11 /* FOR */ ||
  15779. node.type === 10 /* IF_BRANCH */) {
  15780. // perform the transform on node exit so that all expressions have already
  15781. // been processed.
  15782. return () => {
  15783. const children = node.children;
  15784. let currentContainer = undefined;
  15785. let hasText = false;
  15786. for (let i = 0; i < children.length; i++) {
  15787. const child = children[i];
  15788. if (isText(child)) {
  15789. hasText = true;
  15790. for (let j = i + 1; j < children.length; j++) {
  15791. const next = children[j];
  15792. if (isText(next)) {
  15793. if (!currentContainer) {
  15794. currentContainer = children[i] = {
  15795. type: 8 /* COMPOUND_EXPRESSION */,
  15796. loc: child.loc,
  15797. children: [child]
  15798. };
  15799. }
  15800. // merge adjacent text node into current
  15801. currentContainer.children.push(` + `, next);
  15802. children.splice(j, 1);
  15803. j--;
  15804. }
  15805. else {
  15806. currentContainer = undefined;
  15807. break;
  15808. }
  15809. }
  15810. }
  15811. }
  15812. if (!hasText ||
  15813. // if this is a plain element with a single text child, leave it
  15814. // as-is since the runtime has dedicated fast path for this by directly
  15815. // setting textContent of the element.
  15816. // for component root it's always normalized anyway.
  15817. (children.length === 1 &&
  15818. (node.type === 0 /* ROOT */ ||
  15819. (node.type === 1 /* ELEMENT */ &&
  15820. node.tagType === 0 /* ELEMENT */ &&
  15821. // #3756
  15822. // custom directives can potentially add DOM elements arbitrarily,
  15823. // we need to avoid setting textContent of the element at runtime
  15824. // to avoid accidentally overwriting the DOM elements added
  15825. // by the user through custom directives.
  15826. !node.props.find(p => p.type === 7 /* DIRECTIVE */ &&
  15827. !context.directiveTransforms[p.name]) &&
  15828. // in compat mode, <template> tags with no special directives
  15829. // will be rendered as a fragment so its children must be
  15830. // converted into vnodes.
  15831. !(node.tag === 'template'))))) {
  15832. return;
  15833. }
  15834. // pre-convert text nodes into createTextVNode(text) calls to avoid
  15835. // runtime normalization.
  15836. for (let i = 0; i < children.length; i++) {
  15837. const child = children[i];
  15838. if (isText(child) || child.type === 8 /* COMPOUND_EXPRESSION */) {
  15839. const callArgs = [];
  15840. // createTextVNode defaults to single whitespace, so if it is a
  15841. // single space the code could be an empty call to save bytes.
  15842. if (child.type !== 2 /* TEXT */ || child.content !== ' ') {
  15843. callArgs.push(child);
  15844. }
  15845. // mark dynamic text with flag so it gets patched inside a block
  15846. if (!context.ssr &&
  15847. getConstantType(child, context) === 0 /* NOT_CONSTANT */) {
  15848. callArgs.push(1 /* TEXT */ +
  15849. (( true) ? ` /* ${_vue_shared__WEBPACK_IMPORTED_MODULE_0__.PatchFlagNames[1]} */` : 0));
  15850. }
  15851. children[i] = {
  15852. type: 12 /* TEXT_CALL */,
  15853. content: child,
  15854. loc: child.loc,
  15855. codegenNode: createCallExpression(context.helper(CREATE_TEXT), callArgs)
  15856. };
  15857. }
  15858. }
  15859. };
  15860. }
  15861. };
  15862. const seen = new WeakSet();
  15863. const transformOnce = (node, context) => {
  15864. if (node.type === 1 /* ELEMENT */ && findDir(node, 'once', true)) {
  15865. if (seen.has(node) || context.inVOnce) {
  15866. return;
  15867. }
  15868. seen.add(node);
  15869. context.inVOnce = true;
  15870. context.helper(SET_BLOCK_TRACKING);
  15871. return () => {
  15872. context.inVOnce = false;
  15873. const cur = context.currentNode;
  15874. if (cur.codegenNode) {
  15875. cur.codegenNode = context.cache(cur.codegenNode, true /* isVNode */);
  15876. }
  15877. };
  15878. }
  15879. };
  15880. const transformModel = (dir, node, context) => {
  15881. const { exp, arg } = dir;
  15882. if (!exp) {
  15883. context.onError(createCompilerError(41 /* X_V_MODEL_NO_EXPRESSION */, dir.loc));
  15884. return createTransformProps();
  15885. }
  15886. const rawExp = exp.loc.source;
  15887. const expString = exp.type === 4 /* SIMPLE_EXPRESSION */ ? exp.content : rawExp;
  15888. // im SFC <script setup> inline mode, the exp may have been transformed into
  15889. // _unref(exp)
  15890. context.bindingMetadata[rawExp];
  15891. const maybeRef = !true /* SETUP_CONST */;
  15892. if (!expString.trim() ||
  15893. (!isMemberExpression(expString) && !maybeRef)) {
  15894. context.onError(createCompilerError(42 /* X_V_MODEL_MALFORMED_EXPRESSION */, exp.loc));
  15895. return createTransformProps();
  15896. }
  15897. const propName = arg ? arg : createSimpleExpression('modelValue', true);
  15898. const eventName = arg
  15899. ? isStaticExp(arg)
  15900. ? `onUpdate:${arg.content}`
  15901. : createCompoundExpression(['"onUpdate:" + ', arg])
  15902. : `onUpdate:modelValue`;
  15903. let assignmentExp;
  15904. const eventArg = context.isTS ? `($event: any)` : `$event`;
  15905. {
  15906. assignmentExp = createCompoundExpression([
  15907. `${eventArg} => ((`,
  15908. exp,
  15909. `) = $event)`
  15910. ]);
  15911. }
  15912. const props = [
  15913. // modelValue: foo
  15914. createObjectProperty(propName, dir.exp),
  15915. // "onUpdate:modelValue": $event => (foo = $event)
  15916. createObjectProperty(eventName, assignmentExp)
  15917. ];
  15918. // modelModifiers: { foo: true, "bar-baz": true }
  15919. if (dir.modifiers.length && node.tagType === 1 /* COMPONENT */) {
  15920. const modifiers = dir.modifiers
  15921. .map(m => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`)
  15922. .join(`, `);
  15923. const modifiersKey = arg
  15924. ? isStaticExp(arg)
  15925. ? `${arg.content}Modifiers`
  15926. : createCompoundExpression([arg, ' + "Modifiers"'])
  15927. : `modelModifiers`;
  15928. props.push(createObjectProperty(modifiersKey, createSimpleExpression(`{ ${modifiers} }`, false, dir.loc, 2 /* CAN_HOIST */)));
  15929. }
  15930. return createTransformProps(props);
  15931. };
  15932. function createTransformProps(props = []) {
  15933. return { props };
  15934. }
  15935. const validDivisionCharRE = /[\w).+\-_$\]]/;
  15936. const transformFilter = (node, context) => {
  15937. if (!isCompatEnabled("COMPILER_FILTER" /* COMPILER_FILTERS */, context)) {
  15938. return;
  15939. }
  15940. if (node.type === 5 /* INTERPOLATION */) {
  15941. // filter rewrite is applied before expression transform so only
  15942. // simple expressions are possible at this stage
  15943. rewriteFilter(node.content, context);
  15944. }
  15945. if (node.type === 1 /* ELEMENT */) {
  15946. node.props.forEach((prop) => {
  15947. if (prop.type === 7 /* DIRECTIVE */ &&
  15948. prop.name !== 'for' &&
  15949. prop.exp) {
  15950. rewriteFilter(prop.exp, context);
  15951. }
  15952. });
  15953. }
  15954. };
  15955. function rewriteFilter(node, context) {
  15956. if (node.type === 4 /* SIMPLE_EXPRESSION */) {
  15957. parseFilter(node, context);
  15958. }
  15959. else {
  15960. for (let i = 0; i < node.children.length; i++) {
  15961. const child = node.children[i];
  15962. if (typeof child !== 'object')
  15963. continue;
  15964. if (child.type === 4 /* SIMPLE_EXPRESSION */) {
  15965. parseFilter(child, context);
  15966. }
  15967. else if (child.type === 8 /* COMPOUND_EXPRESSION */) {
  15968. rewriteFilter(node, context);
  15969. }
  15970. else if (child.type === 5 /* INTERPOLATION */) {
  15971. rewriteFilter(child.content, context);
  15972. }
  15973. }
  15974. }
  15975. }
  15976. function parseFilter(node, context) {
  15977. const exp = node.content;
  15978. let inSingle = false;
  15979. let inDouble = false;
  15980. let inTemplateString = false;
  15981. let inRegex = false;
  15982. let curly = 0;
  15983. let square = 0;
  15984. let paren = 0;
  15985. let lastFilterIndex = 0;
  15986. let c, prev, i, expression, filters = [];
  15987. for (i = 0; i < exp.length; i++) {
  15988. prev = c;
  15989. c = exp.charCodeAt(i);
  15990. if (inSingle) {
  15991. if (c === 0x27 && prev !== 0x5c)
  15992. inSingle = false;
  15993. }
  15994. else if (inDouble) {
  15995. if (c === 0x22 && prev !== 0x5c)
  15996. inDouble = false;
  15997. }
  15998. else if (inTemplateString) {
  15999. if (c === 0x60 && prev !== 0x5c)
  16000. inTemplateString = false;
  16001. }
  16002. else if (inRegex) {
  16003. if (c === 0x2f && prev !== 0x5c)
  16004. inRegex = false;
  16005. }
  16006. else if (c === 0x7c && // pipe
  16007. exp.charCodeAt(i + 1) !== 0x7c &&
  16008. exp.charCodeAt(i - 1) !== 0x7c &&
  16009. !curly &&
  16010. !square &&
  16011. !paren) {
  16012. if (expression === undefined) {
  16013. // first filter, end of expression
  16014. lastFilterIndex = i + 1;
  16015. expression = exp.slice(0, i).trim();
  16016. }
  16017. else {
  16018. pushFilter();
  16019. }
  16020. }
  16021. else {
  16022. switch (c) {
  16023. case 0x22:
  16024. inDouble = true;
  16025. break; // "
  16026. case 0x27:
  16027. inSingle = true;
  16028. break; // '
  16029. case 0x60:
  16030. inTemplateString = true;
  16031. break; // `
  16032. case 0x28:
  16033. paren++;
  16034. break; // (
  16035. case 0x29:
  16036. paren--;
  16037. break; // )
  16038. case 0x5b:
  16039. square++;
  16040. break; // [
  16041. case 0x5d:
  16042. square--;
  16043. break; // ]
  16044. case 0x7b:
  16045. curly++;
  16046. break; // {
  16047. case 0x7d:
  16048. curly--;
  16049. break; // }
  16050. }
  16051. if (c === 0x2f) {
  16052. // /
  16053. let j = i - 1;
  16054. let p;
  16055. // find first non-whitespace prev char
  16056. for (; j >= 0; j--) {
  16057. p = exp.charAt(j);
  16058. if (p !== ' ')
  16059. break;
  16060. }
  16061. if (!p || !validDivisionCharRE.test(p)) {
  16062. inRegex = true;
  16063. }
  16064. }
  16065. }
  16066. }
  16067. if (expression === undefined) {
  16068. expression = exp.slice(0, i).trim();
  16069. }
  16070. else if (lastFilterIndex !== 0) {
  16071. pushFilter();
  16072. }
  16073. function pushFilter() {
  16074. filters.push(exp.slice(lastFilterIndex, i).trim());
  16075. lastFilterIndex = i + 1;
  16076. }
  16077. if (filters.length) {
  16078. ( true) &&
  16079. warnDeprecation("COMPILER_FILTER" /* COMPILER_FILTERS */, context, node.loc);
  16080. for (i = 0; i < filters.length; i++) {
  16081. expression = wrapFilter(expression, filters[i], context);
  16082. }
  16083. node.content = expression;
  16084. }
  16085. }
  16086. function wrapFilter(exp, filter, context) {
  16087. context.helper(RESOLVE_FILTER);
  16088. const i = filter.indexOf('(');
  16089. if (i < 0) {
  16090. context.filters.add(filter);
  16091. return `${toValidAssetId(filter, 'filter')}(${exp})`;
  16092. }
  16093. else {
  16094. const name = filter.slice(0, i);
  16095. const args = filter.slice(i + 1);
  16096. context.filters.add(name);
  16097. return `${toValidAssetId(name, 'filter')}(${exp}${args !== ')' ? ',' + args : args}`;
  16098. }
  16099. }
  16100. const seen$1 = new WeakSet();
  16101. const transformMemo = (node, context) => {
  16102. if (node.type === 1 /* ELEMENT */) {
  16103. const dir = findDir(node, 'memo');
  16104. if (!dir || seen$1.has(node)) {
  16105. return;
  16106. }
  16107. seen$1.add(node);
  16108. return () => {
  16109. const codegenNode = node.codegenNode ||
  16110. context.currentNode.codegenNode;
  16111. if (codegenNode && codegenNode.type === 13 /* VNODE_CALL */) {
  16112. // non-component sub tree should be turned into a block
  16113. if (node.tagType !== 1 /* COMPONENT */) {
  16114. makeBlock(codegenNode, context);
  16115. }
  16116. node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
  16117. dir.exp,
  16118. createFunctionExpression(undefined, codegenNode),
  16119. `_cache`,
  16120. String(context.cached++)
  16121. ]);
  16122. }
  16123. };
  16124. }
  16125. };
  16126. function getBaseTransformPreset(prefixIdentifiers) {
  16127. return [
  16128. [
  16129. transformOnce,
  16130. transformIf,
  16131. transformMemo,
  16132. transformFor,
  16133. ...([transformFilter] ),
  16134. ...(( true)
  16135. ? [transformExpression]
  16136. : 0),
  16137. transformSlotOutlet,
  16138. transformElement,
  16139. trackSlotScopes,
  16140. transformText
  16141. ],
  16142. {
  16143. on: transformOn,
  16144. bind: transformBind,
  16145. model: transformModel
  16146. }
  16147. ];
  16148. }
  16149. // we name it `baseCompile` so that higher order compilers like
  16150. // @vue/compiler-dom can export `compile` while re-exporting everything else.
  16151. function baseCompile(template, options = {}) {
  16152. const onError = options.onError || defaultOnError;
  16153. const isModuleMode = options.mode === 'module';
  16154. /* istanbul ignore if */
  16155. {
  16156. if (options.prefixIdentifiers === true) {
  16157. onError(createCompilerError(46 /* X_PREFIX_ID_NOT_SUPPORTED */));
  16158. }
  16159. else if (isModuleMode) {
  16160. onError(createCompilerError(47 /* X_MODULE_MODE_NOT_SUPPORTED */));
  16161. }
  16162. }
  16163. const prefixIdentifiers = !true ;
  16164. if (options.cacheHandlers) {
  16165. onError(createCompilerError(48 /* X_CACHE_HANDLER_NOT_SUPPORTED */));
  16166. }
  16167. if (options.scopeId && !isModuleMode) {
  16168. onError(createCompilerError(49 /* X_SCOPE_ID_NOT_SUPPORTED */));
  16169. }
  16170. const ast = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isString)(template) ? baseParse(template, options) : template;
  16171. const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
  16172. transform(ast, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({}, options, {
  16173. prefixIdentifiers,
  16174. nodeTransforms: [
  16175. ...nodeTransforms,
  16176. ...(options.nodeTransforms || []) // user transforms
  16177. ],
  16178. directiveTransforms: (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({}, directiveTransforms, options.directiveTransforms || {} // user transforms
  16179. )
  16180. }));
  16181. return generate(ast, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({}, options, {
  16182. prefixIdentifiers
  16183. }));
  16184. }
  16185. const noopDirectiveTransform = () => ({ props: [] });
  16186. /***/ }),
  16187. /***/ "./node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js":
  16188. /*!*************************************************************************!*\
  16189. !*** ./node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js ***!
  16190. \*************************************************************************/
  16191. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  16192. "use strict";
  16193. __webpack_require__.r(__webpack_exports__);
  16194. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  16195. /* harmony export */ "BASE_TRANSITION": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.BASE_TRANSITION),
  16196. /* harmony export */ "CAMELIZE": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CAMELIZE),
  16197. /* harmony export */ "CAPITALIZE": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CAPITALIZE),
  16198. /* harmony export */ "CREATE_BLOCK": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_BLOCK),
  16199. /* harmony export */ "CREATE_COMMENT": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_COMMENT),
  16200. /* harmony export */ "CREATE_ELEMENT_BLOCK": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_ELEMENT_BLOCK),
  16201. /* harmony export */ "CREATE_ELEMENT_VNODE": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_ELEMENT_VNODE),
  16202. /* harmony export */ "CREATE_SLOTS": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_SLOTS),
  16203. /* harmony export */ "CREATE_STATIC": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_STATIC),
  16204. /* harmony export */ "CREATE_TEXT": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_TEXT),
  16205. /* harmony export */ "CREATE_VNODE": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.CREATE_VNODE),
  16206. /* harmony export */ "FRAGMENT": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.FRAGMENT),
  16207. /* harmony export */ "GUARD_REACTIVE_PROPS": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.GUARD_REACTIVE_PROPS),
  16208. /* harmony export */ "IS_MEMO_SAME": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.IS_MEMO_SAME),
  16209. /* harmony export */ "IS_REF": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.IS_REF),
  16210. /* harmony export */ "KEEP_ALIVE": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.KEEP_ALIVE),
  16211. /* harmony export */ "MERGE_PROPS": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.MERGE_PROPS),
  16212. /* harmony export */ "NORMALIZE_CLASS": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.NORMALIZE_CLASS),
  16213. /* harmony export */ "NORMALIZE_PROPS": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.NORMALIZE_PROPS),
  16214. /* harmony export */ "NORMALIZE_STYLE": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.NORMALIZE_STYLE),
  16215. /* harmony export */ "OPEN_BLOCK": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.OPEN_BLOCK),
  16216. /* harmony export */ "POP_SCOPE_ID": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.POP_SCOPE_ID),
  16217. /* harmony export */ "PUSH_SCOPE_ID": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.PUSH_SCOPE_ID),
  16218. /* harmony export */ "RENDER_LIST": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.RENDER_LIST),
  16219. /* harmony export */ "RENDER_SLOT": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.RENDER_SLOT),
  16220. /* harmony export */ "RESOLVE_COMPONENT": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.RESOLVE_COMPONENT),
  16221. /* harmony export */ "RESOLVE_DIRECTIVE": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.RESOLVE_DIRECTIVE),
  16222. /* harmony export */ "RESOLVE_DYNAMIC_COMPONENT": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.RESOLVE_DYNAMIC_COMPONENT),
  16223. /* harmony export */ "RESOLVE_FILTER": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.RESOLVE_FILTER),
  16224. /* harmony export */ "SET_BLOCK_TRACKING": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.SET_BLOCK_TRACKING),
  16225. /* harmony export */ "SUSPENSE": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.SUSPENSE),
  16226. /* harmony export */ "TELEPORT": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.TELEPORT),
  16227. /* harmony export */ "TO_DISPLAY_STRING": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.TO_DISPLAY_STRING),
  16228. /* harmony export */ "TO_HANDLERS": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.TO_HANDLERS),
  16229. /* harmony export */ "TO_HANDLER_KEY": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.TO_HANDLER_KEY),
  16230. /* harmony export */ "UNREF": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.UNREF),
  16231. /* harmony export */ "WITH_CTX": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.WITH_CTX),
  16232. /* harmony export */ "WITH_DIRECTIVES": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.WITH_DIRECTIVES),
  16233. /* harmony export */ "WITH_MEMO": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.WITH_MEMO),
  16234. /* harmony export */ "advancePositionWithClone": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.advancePositionWithClone),
  16235. /* harmony export */ "advancePositionWithMutation": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.advancePositionWithMutation),
  16236. /* harmony export */ "assert": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.assert),
  16237. /* harmony export */ "baseCompile": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.baseCompile),
  16238. /* harmony export */ "baseParse": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.baseParse),
  16239. /* harmony export */ "buildDirectiveArgs": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.buildDirectiveArgs),
  16240. /* harmony export */ "buildProps": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.buildProps),
  16241. /* harmony export */ "buildSlots": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.buildSlots),
  16242. /* harmony export */ "checkCompatEnabled": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.checkCompatEnabled),
  16243. /* harmony export */ "createArrayExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createArrayExpression),
  16244. /* harmony export */ "createAssignmentExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createAssignmentExpression),
  16245. /* harmony export */ "createBlockStatement": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createBlockStatement),
  16246. /* harmony export */ "createCacheExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCacheExpression),
  16247. /* harmony export */ "createCallExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCallExpression),
  16248. /* harmony export */ "createCompilerError": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCompilerError),
  16249. /* harmony export */ "createCompoundExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCompoundExpression),
  16250. /* harmony export */ "createConditionalExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createConditionalExpression),
  16251. /* harmony export */ "createForLoopParams": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createForLoopParams),
  16252. /* harmony export */ "createFunctionExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createFunctionExpression),
  16253. /* harmony export */ "createIfStatement": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createIfStatement),
  16254. /* harmony export */ "createInterpolation": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createInterpolation),
  16255. /* harmony export */ "createObjectExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createObjectExpression),
  16256. /* harmony export */ "createObjectProperty": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createObjectProperty),
  16257. /* harmony export */ "createReturnStatement": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createReturnStatement),
  16258. /* harmony export */ "createRoot": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createRoot),
  16259. /* harmony export */ "createSequenceExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSequenceExpression),
  16260. /* harmony export */ "createSimpleExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression),
  16261. /* harmony export */ "createStructuralDirectiveTransform": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createStructuralDirectiveTransform),
  16262. /* harmony export */ "createTemplateLiteral": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createTemplateLiteral),
  16263. /* harmony export */ "createTransformContext": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createTransformContext),
  16264. /* harmony export */ "createVNodeCall": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createVNodeCall),
  16265. /* harmony export */ "extractIdentifiers": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.extractIdentifiers),
  16266. /* harmony export */ "findDir": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.findDir),
  16267. /* harmony export */ "findProp": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.findProp),
  16268. /* harmony export */ "generate": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.generate),
  16269. /* harmony export */ "generateCodeFrame": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.generateCodeFrame),
  16270. /* harmony export */ "getBaseTransformPreset": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.getBaseTransformPreset),
  16271. /* harmony export */ "getInnerRange": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.getInnerRange),
  16272. /* harmony export */ "getMemoedVNodeCall": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.getMemoedVNodeCall),
  16273. /* harmony export */ "getVNodeBlockHelper": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.getVNodeBlockHelper),
  16274. /* harmony export */ "getVNodeHelper": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.getVNodeHelper),
  16275. /* harmony export */ "hasDynamicKeyVBind": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.hasDynamicKeyVBind),
  16276. /* harmony export */ "hasScopeRef": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.hasScopeRef),
  16277. /* harmony export */ "helperNameMap": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.helperNameMap),
  16278. /* harmony export */ "injectProp": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.injectProp),
  16279. /* harmony export */ "isBuiltInType": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isBuiltInType),
  16280. /* harmony export */ "isCoreComponent": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isCoreComponent),
  16281. /* harmony export */ "isFunctionType": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isFunctionType),
  16282. /* harmony export */ "isInDestructureAssignment": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isInDestructureAssignment),
  16283. /* harmony export */ "isMemberExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isMemberExpression),
  16284. /* harmony export */ "isMemberExpressionBrowser": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isMemberExpressionBrowser),
  16285. /* harmony export */ "isMemberExpressionNode": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isMemberExpressionNode),
  16286. /* harmony export */ "isReferencedIdentifier": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isReferencedIdentifier),
  16287. /* harmony export */ "isSimpleIdentifier": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isSimpleIdentifier),
  16288. /* harmony export */ "isSlotOutlet": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isSlotOutlet),
  16289. /* harmony export */ "isStaticArgOf": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticArgOf),
  16290. /* harmony export */ "isStaticExp": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticExp),
  16291. /* harmony export */ "isStaticProperty": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticProperty),
  16292. /* harmony export */ "isStaticPropertyKey": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticPropertyKey),
  16293. /* harmony export */ "isTemplateNode": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isTemplateNode),
  16294. /* harmony export */ "isText": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isText),
  16295. /* harmony export */ "isVSlot": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isVSlot),
  16296. /* harmony export */ "locStub": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.locStub),
  16297. /* harmony export */ "makeBlock": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.makeBlock),
  16298. /* harmony export */ "noopDirectiveTransform": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.noopDirectiveTransform),
  16299. /* harmony export */ "processExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.processExpression),
  16300. /* harmony export */ "processFor": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.processFor),
  16301. /* harmony export */ "processIf": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.processIf),
  16302. /* harmony export */ "processSlotOutlet": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.processSlotOutlet),
  16303. /* harmony export */ "registerRuntimeHelpers": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeHelpers),
  16304. /* harmony export */ "resolveComponentType": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.resolveComponentType),
  16305. /* harmony export */ "toValidAssetId": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.toValidAssetId),
  16306. /* harmony export */ "trackSlotScopes": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.trackSlotScopes),
  16307. /* harmony export */ "trackVForSlotScopes": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.trackVForSlotScopes),
  16308. /* harmony export */ "transform": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transform),
  16309. /* harmony export */ "transformBind": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformBind),
  16310. /* harmony export */ "transformElement": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformElement),
  16311. /* harmony export */ "transformExpression": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformExpression),
  16312. /* harmony export */ "transformModel": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformModel),
  16313. /* harmony export */ "transformOn": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformOn),
  16314. /* harmony export */ "traverseNode": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.traverseNode),
  16315. /* harmony export */ "walkBlockDeclarations": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.walkBlockDeclarations),
  16316. /* harmony export */ "walkFunctionParams": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.walkFunctionParams),
  16317. /* harmony export */ "walkIdentifiers": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.walkIdentifiers),
  16318. /* harmony export */ "warnDeprecation": () => (/* reexport safe */ _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.warnDeprecation),
  16319. /* harmony export */ "DOMDirectiveTransforms": () => (/* binding */ DOMDirectiveTransforms),
  16320. /* harmony export */ "DOMNodeTransforms": () => (/* binding */ DOMNodeTransforms),
  16321. /* harmony export */ "TRANSITION": () => (/* binding */ TRANSITION),
  16322. /* harmony export */ "TRANSITION_GROUP": () => (/* binding */ TRANSITION_GROUP),
  16323. /* harmony export */ "V_MODEL_CHECKBOX": () => (/* binding */ V_MODEL_CHECKBOX),
  16324. /* harmony export */ "V_MODEL_DYNAMIC": () => (/* binding */ V_MODEL_DYNAMIC),
  16325. /* harmony export */ "V_MODEL_RADIO": () => (/* binding */ V_MODEL_RADIO),
  16326. /* harmony export */ "V_MODEL_SELECT": () => (/* binding */ V_MODEL_SELECT),
  16327. /* harmony export */ "V_MODEL_TEXT": () => (/* binding */ V_MODEL_TEXT),
  16328. /* harmony export */ "V_ON_WITH_KEYS": () => (/* binding */ V_ON_WITH_KEYS),
  16329. /* harmony export */ "V_ON_WITH_MODIFIERS": () => (/* binding */ V_ON_WITH_MODIFIERS),
  16330. /* harmony export */ "V_SHOW": () => (/* binding */ V_SHOW),
  16331. /* harmony export */ "compile": () => (/* binding */ compile),
  16332. /* harmony export */ "createDOMCompilerError": () => (/* binding */ createDOMCompilerError),
  16333. /* harmony export */ "parse": () => (/* binding */ parse),
  16334. /* harmony export */ "parserOptions": () => (/* binding */ parserOptions),
  16335. /* harmony export */ "transformStyle": () => (/* binding */ transformStyle)
  16336. /* harmony export */ });
  16337. /* harmony import */ var _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/compiler-core */ "./node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js");
  16338. /* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
  16339. const V_MODEL_RADIO = Symbol(( true) ? `vModelRadio` : 0);
  16340. const V_MODEL_CHECKBOX = Symbol(( true) ? `vModelCheckbox` : 0);
  16341. const V_MODEL_TEXT = Symbol(( true) ? `vModelText` : 0);
  16342. const V_MODEL_SELECT = Symbol(( true) ? `vModelSelect` : 0);
  16343. const V_MODEL_DYNAMIC = Symbol(( true) ? `vModelDynamic` : 0);
  16344. const V_ON_WITH_MODIFIERS = Symbol(( true) ? `vOnModifiersGuard` : 0);
  16345. const V_ON_WITH_KEYS = Symbol(( true) ? `vOnKeysGuard` : 0);
  16346. const V_SHOW = Symbol(( true) ? `vShow` : 0);
  16347. const TRANSITION = Symbol(( true) ? `Transition` : 0);
  16348. const TRANSITION_GROUP = Symbol(( true) ? `TransitionGroup` : 0);
  16349. (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeHelpers)({
  16350. [V_MODEL_RADIO]: `vModelRadio`,
  16351. [V_MODEL_CHECKBOX]: `vModelCheckbox`,
  16352. [V_MODEL_TEXT]: `vModelText`,
  16353. [V_MODEL_SELECT]: `vModelSelect`,
  16354. [V_MODEL_DYNAMIC]: `vModelDynamic`,
  16355. [V_ON_WITH_MODIFIERS]: `withModifiers`,
  16356. [V_ON_WITH_KEYS]: `withKeys`,
  16357. [V_SHOW]: `vShow`,
  16358. [TRANSITION]: `Transition`,
  16359. [TRANSITION_GROUP]: `TransitionGroup`
  16360. });
  16361. /* eslint-disable no-restricted-globals */
  16362. let decoder;
  16363. function decodeHtmlBrowser(raw, asAttr = false) {
  16364. if (!decoder) {
  16365. decoder = document.createElement('div');
  16366. }
  16367. if (asAttr) {
  16368. decoder.innerHTML = `<div foo="${raw.replace(/"/g, '&quot;')}">`;
  16369. return decoder.children[0].getAttribute('foo');
  16370. }
  16371. else {
  16372. decoder.innerHTML = raw;
  16373. return decoder.textContent;
  16374. }
  16375. }
  16376. const isRawTextContainer = /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)('style,iframe,script,noscript', true);
  16377. const parserOptions = {
  16378. isVoidTag: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.isVoidTag,
  16379. isNativeTag: tag => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isHTMLTag)(tag) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSVGTag)(tag),
  16380. isPreTag: tag => tag === 'pre',
  16381. decodeEntities: decodeHtmlBrowser ,
  16382. isBuiltInComponent: (tag) => {
  16383. if ((0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isBuiltInType)(tag, `Transition`)) {
  16384. return TRANSITION;
  16385. }
  16386. else if ((0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isBuiltInType)(tag, `TransitionGroup`)) {
  16387. return TRANSITION_GROUP;
  16388. }
  16389. },
  16390. // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
  16391. getNamespace(tag, parent) {
  16392. let ns = parent ? parent.ns : 0 /* HTML */;
  16393. if (parent && ns === 2 /* MATH_ML */) {
  16394. if (parent.tag === 'annotation-xml') {
  16395. if (tag === 'svg') {
  16396. return 1 /* SVG */;
  16397. }
  16398. if (parent.props.some(a => a.type === 6 /* ATTRIBUTE */ &&
  16399. a.name === 'encoding' &&
  16400. a.value != null &&
  16401. (a.value.content === 'text/html' ||
  16402. a.value.content === 'application/xhtml+xml'))) {
  16403. ns = 0 /* HTML */;
  16404. }
  16405. }
  16406. else if (/^m(?:[ions]|text)$/.test(parent.tag) &&
  16407. tag !== 'mglyph' &&
  16408. tag !== 'malignmark') {
  16409. ns = 0 /* HTML */;
  16410. }
  16411. }
  16412. else if (parent && ns === 1 /* SVG */) {
  16413. if (parent.tag === 'foreignObject' ||
  16414. parent.tag === 'desc' ||
  16415. parent.tag === 'title') {
  16416. ns = 0 /* HTML */;
  16417. }
  16418. }
  16419. if (ns === 0 /* HTML */) {
  16420. if (tag === 'svg') {
  16421. return 1 /* SVG */;
  16422. }
  16423. if (tag === 'math') {
  16424. return 2 /* MATH_ML */;
  16425. }
  16426. }
  16427. return ns;
  16428. },
  16429. // https://html.spec.whatwg.org/multipage/parsing.html#parsing-html-fragments
  16430. getTextMode({ tag, ns }) {
  16431. if (ns === 0 /* HTML */) {
  16432. if (tag === 'textarea' || tag === 'title') {
  16433. return 1 /* RCDATA */;
  16434. }
  16435. if (isRawTextContainer(tag)) {
  16436. return 2 /* RAWTEXT */;
  16437. }
  16438. }
  16439. return 0 /* DATA */;
  16440. }
  16441. };
  16442. // Parse inline CSS strings for static style attributes into an object.
  16443. // This is a NodeTransform since it works on the static `style` attribute and
  16444. // converts it into a dynamic equivalent:
  16445. // style="color: red" -> :style='{ "color": "red" }'
  16446. // It is then processed by `transformElement` and included in the generated
  16447. // props.
  16448. const transformStyle = node => {
  16449. if (node.type === 1 /* ELEMENT */) {
  16450. node.props.forEach((p, i) => {
  16451. if (p.type === 6 /* ATTRIBUTE */ && p.name === 'style' && p.value) {
  16452. // replace p with an expression node
  16453. node.props[i] = {
  16454. type: 7 /* DIRECTIVE */,
  16455. name: `bind`,
  16456. arg: (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)(`style`, true, p.loc),
  16457. exp: parseInlineCSS(p.value.content, p.loc),
  16458. modifiers: [],
  16459. loc: p.loc
  16460. };
  16461. }
  16462. });
  16463. }
  16464. };
  16465. const parseInlineCSS = (cssText, loc) => {
  16466. const normalized = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.parseStringStyle)(cssText);
  16467. return (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)(JSON.stringify(normalized), false, loc, 3 /* CAN_STRINGIFY */);
  16468. };
  16469. function createDOMCompilerError(code, loc) {
  16470. return (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCompilerError)(code, loc, true ? DOMErrorMessages : 0);
  16471. }
  16472. const DOMErrorMessages = {
  16473. [50 /* X_V_HTML_NO_EXPRESSION */]: `v-html is missing expression.`,
  16474. [51 /* X_V_HTML_WITH_CHILDREN */]: `v-html will override element children.`,
  16475. [52 /* X_V_TEXT_NO_EXPRESSION */]: `v-text is missing expression.`,
  16476. [53 /* X_V_TEXT_WITH_CHILDREN */]: `v-text will override element children.`,
  16477. [54 /* X_V_MODEL_ON_INVALID_ELEMENT */]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
  16478. [55 /* X_V_MODEL_ARG_ON_ELEMENT */]: `v-model argument is not supported on plain elements.`,
  16479. [56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
  16480. [57 /* X_V_MODEL_UNNECESSARY_VALUE */]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
  16481. [58 /* X_V_SHOW_NO_EXPRESSION */]: `v-show is missing expression.`,
  16482. [59 /* X_TRANSITION_INVALID_CHILDREN */]: `<Transition> expects exactly one child element or component.`,
  16483. [60 /* X_IGNORED_SIDE_EFFECT_TAG */]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`
  16484. };
  16485. const transformVHtml = (dir, node, context) => {
  16486. const { exp, loc } = dir;
  16487. if (!exp) {
  16488. context.onError(createDOMCompilerError(50 /* X_V_HTML_NO_EXPRESSION */, loc));
  16489. }
  16490. if (node.children.length) {
  16491. context.onError(createDOMCompilerError(51 /* X_V_HTML_WITH_CHILDREN */, loc));
  16492. node.children.length = 0;
  16493. }
  16494. return {
  16495. props: [
  16496. (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createObjectProperty)((0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)(`innerHTML`, true, loc), exp || (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)('', true))
  16497. ]
  16498. };
  16499. };
  16500. const transformVText = (dir, node, context) => {
  16501. const { exp, loc } = dir;
  16502. if (!exp) {
  16503. context.onError(createDOMCompilerError(52 /* X_V_TEXT_NO_EXPRESSION */, loc));
  16504. }
  16505. if (node.children.length) {
  16506. context.onError(createDOMCompilerError(53 /* X_V_TEXT_WITH_CHILDREN */, loc));
  16507. node.children.length = 0;
  16508. }
  16509. return {
  16510. props: [
  16511. (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createObjectProperty)((0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)(`textContent`, true), exp
  16512. ? (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCallExpression)(context.helperString(_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.TO_DISPLAY_STRING), [exp], loc)
  16513. : (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)('', true))
  16514. ]
  16515. };
  16516. };
  16517. const transformModel = (dir, node, context) => {
  16518. const baseResult = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformModel)(dir, node, context);
  16519. // base transform has errors OR component v-model (only need props)
  16520. if (!baseResult.props.length || node.tagType === 1 /* COMPONENT */) {
  16521. return baseResult;
  16522. }
  16523. if (dir.arg) {
  16524. context.onError(createDOMCompilerError(55 /* X_V_MODEL_ARG_ON_ELEMENT */, dir.arg.loc));
  16525. }
  16526. function checkDuplicatedValue() {
  16527. const value = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.findProp)(node, 'value');
  16528. if (value) {
  16529. context.onError(createDOMCompilerError(57 /* X_V_MODEL_UNNECESSARY_VALUE */, value.loc));
  16530. }
  16531. }
  16532. const { tag } = node;
  16533. const isCustomElement = context.isCustomElement(tag);
  16534. if (tag === 'input' ||
  16535. tag === 'textarea' ||
  16536. tag === 'select' ||
  16537. isCustomElement) {
  16538. let directiveToUse = V_MODEL_TEXT;
  16539. let isInvalidType = false;
  16540. if (tag === 'input' || isCustomElement) {
  16541. const type = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.findProp)(node, `type`);
  16542. if (type) {
  16543. if (type.type === 7 /* DIRECTIVE */) {
  16544. // :type="foo"
  16545. directiveToUse = V_MODEL_DYNAMIC;
  16546. }
  16547. else if (type.value) {
  16548. switch (type.value.content) {
  16549. case 'radio':
  16550. directiveToUse = V_MODEL_RADIO;
  16551. break;
  16552. case 'checkbox':
  16553. directiveToUse = V_MODEL_CHECKBOX;
  16554. break;
  16555. case 'file':
  16556. isInvalidType = true;
  16557. context.onError(createDOMCompilerError(56 /* X_V_MODEL_ON_FILE_INPUT_ELEMENT */, dir.loc));
  16558. break;
  16559. default:
  16560. // text type
  16561. ( true) && checkDuplicatedValue();
  16562. break;
  16563. }
  16564. }
  16565. }
  16566. else if ((0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.hasDynamicKeyVBind)(node)) {
  16567. // element has bindings with dynamic keys, which can possibly contain
  16568. // "type".
  16569. directiveToUse = V_MODEL_DYNAMIC;
  16570. }
  16571. else {
  16572. // text type
  16573. ( true) && checkDuplicatedValue();
  16574. }
  16575. }
  16576. else if (tag === 'select') {
  16577. directiveToUse = V_MODEL_SELECT;
  16578. }
  16579. else {
  16580. // textarea
  16581. ( true) && checkDuplicatedValue();
  16582. }
  16583. // inject runtime directive
  16584. // by returning the helper symbol via needRuntime
  16585. // the import will replaced a resolveDirective call.
  16586. if (!isInvalidType) {
  16587. baseResult.needRuntime = context.helper(directiveToUse);
  16588. }
  16589. }
  16590. else {
  16591. context.onError(createDOMCompilerError(54 /* X_V_MODEL_ON_INVALID_ELEMENT */, dir.loc));
  16592. }
  16593. // native vmodel doesn't need the `modelValue` props since they are also
  16594. // passed to the runtime as `binding.value`. removing it reduces code size.
  16595. baseResult.props = baseResult.props.filter(p => !(p.key.type === 4 /* SIMPLE_EXPRESSION */ &&
  16596. p.key.content === 'modelValue'));
  16597. return baseResult;
  16598. };
  16599. const isEventOptionModifier = /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)(`passive,once,capture`);
  16600. const isNonKeyModifier = /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)(
  16601. // event propagation management
  16602. `stop,prevent,self,` +
  16603. // system modifiers + exact
  16604. `ctrl,shift,alt,meta,exact,` +
  16605. // mouse
  16606. `middle`);
  16607. // left & right could be mouse or key modifiers based on event type
  16608. const maybeKeyModifier = /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)('left,right');
  16609. const isKeyboardEvent = /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)(`onkeyup,onkeydown,onkeypress`, true);
  16610. const resolveModifiers = (key, modifiers, context, loc) => {
  16611. const keyModifiers = [];
  16612. const nonKeyModifiers = [];
  16613. const eventOptionModifiers = [];
  16614. for (let i = 0; i < modifiers.length; i++) {
  16615. const modifier = modifiers[i];
  16616. if (modifier === 'native' &&
  16617. (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.checkCompatEnabled)("COMPILER_V_ON_NATIVE" /* COMPILER_V_ON_NATIVE */, context, loc)) {
  16618. eventOptionModifiers.push(modifier);
  16619. }
  16620. else if (isEventOptionModifier(modifier)) {
  16621. // eventOptionModifiers: modifiers for addEventListener() options,
  16622. // e.g. .passive & .capture
  16623. eventOptionModifiers.push(modifier);
  16624. }
  16625. else {
  16626. // runtimeModifiers: modifiers that needs runtime guards
  16627. if (maybeKeyModifier(modifier)) {
  16628. if ((0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticExp)(key)) {
  16629. if (isKeyboardEvent(key.content)) {
  16630. keyModifiers.push(modifier);
  16631. }
  16632. else {
  16633. nonKeyModifiers.push(modifier);
  16634. }
  16635. }
  16636. else {
  16637. keyModifiers.push(modifier);
  16638. nonKeyModifiers.push(modifier);
  16639. }
  16640. }
  16641. else {
  16642. if (isNonKeyModifier(modifier)) {
  16643. nonKeyModifiers.push(modifier);
  16644. }
  16645. else {
  16646. keyModifiers.push(modifier);
  16647. }
  16648. }
  16649. }
  16650. }
  16651. return {
  16652. keyModifiers,
  16653. nonKeyModifiers,
  16654. eventOptionModifiers
  16655. };
  16656. };
  16657. const transformClick = (key, event) => {
  16658. const isStaticClick = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticExp)(key) && key.content.toLowerCase() === 'onclick';
  16659. return isStaticClick
  16660. ? (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)(event, true)
  16661. : key.type !== 4 /* SIMPLE_EXPRESSION */
  16662. ? (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCompoundExpression)([
  16663. `(`,
  16664. key,
  16665. `) === "onClick" ? "${event}" : (`,
  16666. key,
  16667. `)`
  16668. ])
  16669. : key;
  16670. };
  16671. const transformOn = (dir, node, context) => {
  16672. return (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.transformOn)(dir, node, context, baseResult => {
  16673. const { modifiers } = dir;
  16674. if (!modifiers.length)
  16675. return baseResult;
  16676. let { key, value: handlerExp } = baseResult.props[0];
  16677. const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(key, modifiers, context, dir.loc);
  16678. // normalize click.right and click.middle since they don't actually fire
  16679. if (nonKeyModifiers.includes('right')) {
  16680. key = transformClick(key, `onContextmenu`);
  16681. }
  16682. if (nonKeyModifiers.includes('middle')) {
  16683. key = transformClick(key, `onMouseup`);
  16684. }
  16685. if (nonKeyModifiers.length) {
  16686. handlerExp = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCallExpression)(context.helper(V_ON_WITH_MODIFIERS), [
  16687. handlerExp,
  16688. JSON.stringify(nonKeyModifiers)
  16689. ]);
  16690. }
  16691. if (keyModifiers.length &&
  16692. // if event name is dynamic, always wrap with keys guard
  16693. (!(0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticExp)(key) || isKeyboardEvent(key.content))) {
  16694. handlerExp = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCallExpression)(context.helper(V_ON_WITH_KEYS), [
  16695. handlerExp,
  16696. JSON.stringify(keyModifiers)
  16697. ]);
  16698. }
  16699. if (eventOptionModifiers.length) {
  16700. const modifierPostfix = eventOptionModifiers.map(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize).join('');
  16701. key = (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.isStaticExp)(key)
  16702. ? (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createSimpleExpression)(`${key.content}${modifierPostfix}`, true)
  16703. : (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createCompoundExpression)([`(`, key, `) + "${modifierPostfix}"`]);
  16704. }
  16705. return {
  16706. props: [(0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.createObjectProperty)(key, handlerExp)]
  16707. };
  16708. });
  16709. };
  16710. const transformShow = (dir, node, context) => {
  16711. const { exp, loc } = dir;
  16712. if (!exp) {
  16713. context.onError(createDOMCompilerError(58 /* X_V_SHOW_NO_EXPRESSION */, loc));
  16714. }
  16715. return {
  16716. props: [],
  16717. needRuntime: context.helper(V_SHOW)
  16718. };
  16719. };
  16720. const warnTransitionChildren = (node, context) => {
  16721. if (node.type === 1 /* ELEMENT */ &&
  16722. node.tagType === 1 /* COMPONENT */) {
  16723. const component = context.isBuiltInComponent(node.tag);
  16724. if (component === TRANSITION) {
  16725. return () => {
  16726. if (node.children.length && hasMultipleChildren(node)) {
  16727. context.onError(createDOMCompilerError(59 /* X_TRANSITION_INVALID_CHILDREN */, {
  16728. start: node.children[0].loc.start,
  16729. end: node.children[node.children.length - 1].loc.end,
  16730. source: ''
  16731. }));
  16732. }
  16733. };
  16734. }
  16735. }
  16736. };
  16737. function hasMultipleChildren(node) {
  16738. // #1352 filter out potential comment nodes.
  16739. const children = (node.children = node.children.filter(c => c.type !== 3 /* COMMENT */ &&
  16740. !(c.type === 2 /* TEXT */ && !c.content.trim())));
  16741. const child = children[0];
  16742. return (children.length !== 1 ||
  16743. child.type === 11 /* FOR */ ||
  16744. (child.type === 9 /* IF */ && child.branches.some(hasMultipleChildren)));
  16745. }
  16746. const ignoreSideEffectTags = (node, context) => {
  16747. if (node.type === 1 /* ELEMENT */ &&
  16748. node.tagType === 0 /* ELEMENT */ &&
  16749. (node.tag === 'script' || node.tag === 'style')) {
  16750. context.onError(createDOMCompilerError(60 /* X_IGNORED_SIDE_EFFECT_TAG */, node.loc));
  16751. context.removeNode();
  16752. }
  16753. };
  16754. const DOMNodeTransforms = [
  16755. transformStyle,
  16756. ...(( true) ? [warnTransitionChildren] : 0)
  16757. ];
  16758. const DOMDirectiveTransforms = {
  16759. cloak: _vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.noopDirectiveTransform,
  16760. html: transformVHtml,
  16761. text: transformVText,
  16762. model: transformModel,
  16763. on: transformOn,
  16764. show: transformShow
  16765. };
  16766. function compile(template, options = {}) {
  16767. return (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.baseCompile)(template, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, parserOptions, options, {
  16768. nodeTransforms: [
  16769. // ignore <script> and <tag>
  16770. // this is not put inside DOMNodeTransforms because that list is used
  16771. // by compiler-ssr to generate vnode fallback branches
  16772. ignoreSideEffectTags,
  16773. ...DOMNodeTransforms,
  16774. ...(options.nodeTransforms || [])
  16775. ],
  16776. directiveTransforms: (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, DOMDirectiveTransforms, options.directiveTransforms || {}),
  16777. transformHoist: null
  16778. }));
  16779. }
  16780. function parse(template, options = {}) {
  16781. return (0,_vue_compiler_core__WEBPACK_IMPORTED_MODULE_0__.baseParse)(template, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, parserOptions, options));
  16782. }
  16783. /***/ }),
  16784. /***/ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js":
  16785. /*!*********************************************************************!*\
  16786. !*** ./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js ***!
  16787. \*********************************************************************/
  16788. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  16789. "use strict";
  16790. __webpack_require__.r(__webpack_exports__);
  16791. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  16792. /* harmony export */ "EffectScope": () => (/* binding */ EffectScope),
  16793. /* harmony export */ "ITERATE_KEY": () => (/* binding */ ITERATE_KEY),
  16794. /* harmony export */ "ReactiveEffect": () => (/* binding */ ReactiveEffect),
  16795. /* harmony export */ "computed": () => (/* binding */ computed),
  16796. /* harmony export */ "customRef": () => (/* binding */ customRef),
  16797. /* harmony export */ "deferredComputed": () => (/* binding */ deferredComputed),
  16798. /* harmony export */ "effect": () => (/* binding */ effect),
  16799. /* harmony export */ "effectScope": () => (/* binding */ effectScope),
  16800. /* harmony export */ "enableTracking": () => (/* binding */ enableTracking),
  16801. /* harmony export */ "getCurrentScope": () => (/* binding */ getCurrentScope),
  16802. /* harmony export */ "isProxy": () => (/* binding */ isProxy),
  16803. /* harmony export */ "isReactive": () => (/* binding */ isReactive),
  16804. /* harmony export */ "isReadonly": () => (/* binding */ isReadonly),
  16805. /* harmony export */ "isRef": () => (/* binding */ isRef),
  16806. /* harmony export */ "isShallow": () => (/* binding */ isShallow),
  16807. /* harmony export */ "markRaw": () => (/* binding */ markRaw),
  16808. /* harmony export */ "onScopeDispose": () => (/* binding */ onScopeDispose),
  16809. /* harmony export */ "pauseTracking": () => (/* binding */ pauseTracking),
  16810. /* harmony export */ "proxyRefs": () => (/* binding */ proxyRefs),
  16811. /* harmony export */ "reactive": () => (/* binding */ reactive),
  16812. /* harmony export */ "readonly": () => (/* binding */ readonly),
  16813. /* harmony export */ "ref": () => (/* binding */ ref),
  16814. /* harmony export */ "resetTracking": () => (/* binding */ resetTracking),
  16815. /* harmony export */ "shallowReactive": () => (/* binding */ shallowReactive),
  16816. /* harmony export */ "shallowReadonly": () => (/* binding */ shallowReadonly),
  16817. /* harmony export */ "shallowRef": () => (/* binding */ shallowRef),
  16818. /* harmony export */ "stop": () => (/* binding */ stop),
  16819. /* harmony export */ "toRaw": () => (/* binding */ toRaw),
  16820. /* harmony export */ "toRef": () => (/* binding */ toRef),
  16821. /* harmony export */ "toRefs": () => (/* binding */ toRefs),
  16822. /* harmony export */ "track": () => (/* binding */ track),
  16823. /* harmony export */ "trigger": () => (/* binding */ trigger),
  16824. /* harmony export */ "triggerRef": () => (/* binding */ triggerRef),
  16825. /* harmony export */ "unref": () => (/* binding */ unref)
  16826. /* harmony export */ });
  16827. /* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
  16828. function warn(msg, ...args) {
  16829. console.warn(`[Vue warn] ${msg}`, ...args);
  16830. }
  16831. let activeEffectScope;
  16832. class EffectScope {
  16833. constructor(detached = false) {
  16834. this.active = true;
  16835. this.effects = [];
  16836. this.cleanups = [];
  16837. if (!detached && activeEffectScope) {
  16838. this.parent = activeEffectScope;
  16839. this.index =
  16840. (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(this) - 1;
  16841. }
  16842. }
  16843. run(fn) {
  16844. if (this.active) {
  16845. try {
  16846. activeEffectScope = this;
  16847. return fn();
  16848. }
  16849. finally {
  16850. activeEffectScope = this.parent;
  16851. }
  16852. }
  16853. else if ((true)) {
  16854. warn(`cannot run an inactive effect scope.`);
  16855. }
  16856. }
  16857. on() {
  16858. activeEffectScope = this;
  16859. }
  16860. off() {
  16861. activeEffectScope = this.parent;
  16862. }
  16863. stop(fromParent) {
  16864. if (this.active) {
  16865. let i, l;
  16866. for (i = 0, l = this.effects.length; i < l; i++) {
  16867. this.effects[i].stop();
  16868. }
  16869. for (i = 0, l = this.cleanups.length; i < l; i++) {
  16870. this.cleanups[i]();
  16871. }
  16872. if (this.scopes) {
  16873. for (i = 0, l = this.scopes.length; i < l; i++) {
  16874. this.scopes[i].stop(true);
  16875. }
  16876. }
  16877. // nested scope, dereference from parent to avoid memory leaks
  16878. if (this.parent && !fromParent) {
  16879. // optimized O(1) removal
  16880. const last = this.parent.scopes.pop();
  16881. if (last && last !== this) {
  16882. this.parent.scopes[this.index] = last;
  16883. last.index = this.index;
  16884. }
  16885. }
  16886. this.active = false;
  16887. }
  16888. }
  16889. }
  16890. function effectScope(detached) {
  16891. return new EffectScope(detached);
  16892. }
  16893. function recordEffectScope(effect, scope = activeEffectScope) {
  16894. if (scope && scope.active) {
  16895. scope.effects.push(effect);
  16896. }
  16897. }
  16898. function getCurrentScope() {
  16899. return activeEffectScope;
  16900. }
  16901. function onScopeDispose(fn) {
  16902. if (activeEffectScope) {
  16903. activeEffectScope.cleanups.push(fn);
  16904. }
  16905. else if ((true)) {
  16906. warn(`onScopeDispose() is called when there is no active effect scope` +
  16907. ` to be associated with.`);
  16908. }
  16909. }
  16910. const createDep = (effects) => {
  16911. const dep = new Set(effects);
  16912. dep.w = 0;
  16913. dep.n = 0;
  16914. return dep;
  16915. };
  16916. const wasTracked = (dep) => (dep.w & trackOpBit) > 0;
  16917. const newTracked = (dep) => (dep.n & trackOpBit) > 0;
  16918. const initDepMarkers = ({ deps }) => {
  16919. if (deps.length) {
  16920. for (let i = 0; i < deps.length; i++) {
  16921. deps[i].w |= trackOpBit; // set was tracked
  16922. }
  16923. }
  16924. };
  16925. const finalizeDepMarkers = (effect) => {
  16926. const { deps } = effect;
  16927. if (deps.length) {
  16928. let ptr = 0;
  16929. for (let i = 0; i < deps.length; i++) {
  16930. const dep = deps[i];
  16931. if (wasTracked(dep) && !newTracked(dep)) {
  16932. dep.delete(effect);
  16933. }
  16934. else {
  16935. deps[ptr++] = dep;
  16936. }
  16937. // clear bits
  16938. dep.w &= ~trackOpBit;
  16939. dep.n &= ~trackOpBit;
  16940. }
  16941. deps.length = ptr;
  16942. }
  16943. };
  16944. const targetMap = new WeakMap();
  16945. // The number of effects currently being tracked recursively.
  16946. let effectTrackDepth = 0;
  16947. let trackOpBit = 1;
  16948. /**
  16949. * The bitwise track markers support at most 30 levels of recursion.
  16950. * This value is chosen to enable modern JS engines to use a SMI on all platforms.
  16951. * When recursion depth is greater, fall back to using a full cleanup.
  16952. */
  16953. const maxMarkerBits = 30;
  16954. let activeEffect;
  16955. const ITERATE_KEY = Symbol(( true) ? 'iterate' : 0);
  16956. const MAP_KEY_ITERATE_KEY = Symbol(( true) ? 'Map key iterate' : 0);
  16957. class ReactiveEffect {
  16958. constructor(fn, scheduler = null, scope) {
  16959. this.fn = fn;
  16960. this.scheduler = scheduler;
  16961. this.active = true;
  16962. this.deps = [];
  16963. this.parent = undefined;
  16964. recordEffectScope(this, scope);
  16965. }
  16966. run() {
  16967. if (!this.active) {
  16968. return this.fn();
  16969. }
  16970. let parent = activeEffect;
  16971. let lastShouldTrack = shouldTrack;
  16972. while (parent) {
  16973. if (parent === this) {
  16974. return;
  16975. }
  16976. parent = parent.parent;
  16977. }
  16978. try {
  16979. this.parent = activeEffect;
  16980. activeEffect = this;
  16981. shouldTrack = true;
  16982. trackOpBit = 1 << ++effectTrackDepth;
  16983. if (effectTrackDepth <= maxMarkerBits) {
  16984. initDepMarkers(this);
  16985. }
  16986. else {
  16987. cleanupEffect(this);
  16988. }
  16989. return this.fn();
  16990. }
  16991. finally {
  16992. if (effectTrackDepth <= maxMarkerBits) {
  16993. finalizeDepMarkers(this);
  16994. }
  16995. trackOpBit = 1 << --effectTrackDepth;
  16996. activeEffect = this.parent;
  16997. shouldTrack = lastShouldTrack;
  16998. this.parent = undefined;
  16999. }
  17000. }
  17001. stop() {
  17002. if (this.active) {
  17003. cleanupEffect(this);
  17004. if (this.onStop) {
  17005. this.onStop();
  17006. }
  17007. this.active = false;
  17008. }
  17009. }
  17010. }
  17011. function cleanupEffect(effect) {
  17012. const { deps } = effect;
  17013. if (deps.length) {
  17014. for (let i = 0; i < deps.length; i++) {
  17015. deps[i].delete(effect);
  17016. }
  17017. deps.length = 0;
  17018. }
  17019. }
  17020. function effect(fn, options) {
  17021. if (fn.effect) {
  17022. fn = fn.effect.fn;
  17023. }
  17024. const _effect = new ReactiveEffect(fn);
  17025. if (options) {
  17026. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)(_effect, options);
  17027. if (options.scope)
  17028. recordEffectScope(_effect, options.scope);
  17029. }
  17030. if (!options || !options.lazy) {
  17031. _effect.run();
  17032. }
  17033. const runner = _effect.run.bind(_effect);
  17034. runner.effect = _effect;
  17035. return runner;
  17036. }
  17037. function stop(runner) {
  17038. runner.effect.stop();
  17039. }
  17040. let shouldTrack = true;
  17041. const trackStack = [];
  17042. function pauseTracking() {
  17043. trackStack.push(shouldTrack);
  17044. shouldTrack = false;
  17045. }
  17046. function enableTracking() {
  17047. trackStack.push(shouldTrack);
  17048. shouldTrack = true;
  17049. }
  17050. function resetTracking() {
  17051. const last = trackStack.pop();
  17052. shouldTrack = last === undefined ? true : last;
  17053. }
  17054. function track(target, type, key) {
  17055. if (shouldTrack && activeEffect) {
  17056. let depsMap = targetMap.get(target);
  17057. if (!depsMap) {
  17058. targetMap.set(target, (depsMap = new Map()));
  17059. }
  17060. let dep = depsMap.get(key);
  17061. if (!dep) {
  17062. depsMap.set(key, (dep = createDep()));
  17063. }
  17064. const eventInfo = ( true)
  17065. ? { effect: activeEffect, target, type, key }
  17066. : 0;
  17067. trackEffects(dep, eventInfo);
  17068. }
  17069. }
  17070. function trackEffects(dep, debuggerEventExtraInfo) {
  17071. let shouldTrack = false;
  17072. if (effectTrackDepth <= maxMarkerBits) {
  17073. if (!newTracked(dep)) {
  17074. dep.n |= trackOpBit; // set newly tracked
  17075. shouldTrack = !wasTracked(dep);
  17076. }
  17077. }
  17078. else {
  17079. // Full cleanup mode.
  17080. shouldTrack = !dep.has(activeEffect);
  17081. }
  17082. if (shouldTrack) {
  17083. dep.add(activeEffect);
  17084. activeEffect.deps.push(dep);
  17085. if (( true) && activeEffect.onTrack) {
  17086. activeEffect.onTrack(Object.assign({
  17087. effect: activeEffect
  17088. }, debuggerEventExtraInfo));
  17089. }
  17090. }
  17091. }
  17092. function trigger(target, type, key, newValue, oldValue, oldTarget) {
  17093. const depsMap = targetMap.get(target);
  17094. if (!depsMap) {
  17095. // never been tracked
  17096. return;
  17097. }
  17098. let deps = [];
  17099. if (type === "clear" /* CLEAR */) {
  17100. // collection being cleared
  17101. // trigger all effects for target
  17102. deps = [...depsMap.values()];
  17103. }
  17104. else if (key === 'length' && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target)) {
  17105. depsMap.forEach((dep, key) => {
  17106. if (key === 'length' || key >= newValue) {
  17107. deps.push(dep);
  17108. }
  17109. });
  17110. }
  17111. else {
  17112. // schedule runs for SET | ADD | DELETE
  17113. if (key !== void 0) {
  17114. deps.push(depsMap.get(key));
  17115. }
  17116. // also run for iteration key on ADD | DELETE | Map.SET
  17117. switch (type) {
  17118. case "add" /* ADD */:
  17119. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target)) {
  17120. deps.push(depsMap.get(ITERATE_KEY));
  17121. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(target)) {
  17122. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  17123. }
  17124. }
  17125. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isIntegerKey)(key)) {
  17126. // new index added to array -> length changes
  17127. deps.push(depsMap.get('length'));
  17128. }
  17129. break;
  17130. case "delete" /* DELETE */:
  17131. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target)) {
  17132. deps.push(depsMap.get(ITERATE_KEY));
  17133. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(target)) {
  17134. deps.push(depsMap.get(MAP_KEY_ITERATE_KEY));
  17135. }
  17136. }
  17137. break;
  17138. case "set" /* SET */:
  17139. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(target)) {
  17140. deps.push(depsMap.get(ITERATE_KEY));
  17141. }
  17142. break;
  17143. }
  17144. }
  17145. const eventInfo = ( true)
  17146. ? { target, type, key, newValue, oldValue, oldTarget }
  17147. : 0;
  17148. if (deps.length === 1) {
  17149. if (deps[0]) {
  17150. if ((true)) {
  17151. triggerEffects(deps[0], eventInfo);
  17152. }
  17153. else {}
  17154. }
  17155. }
  17156. else {
  17157. const effects = [];
  17158. for (const dep of deps) {
  17159. if (dep) {
  17160. effects.push(...dep);
  17161. }
  17162. }
  17163. if ((true)) {
  17164. triggerEffects(createDep(effects), eventInfo);
  17165. }
  17166. else {}
  17167. }
  17168. }
  17169. function triggerEffects(dep, debuggerEventExtraInfo) {
  17170. // spread into array for stabilization
  17171. for (const effect of (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(dep) ? dep : [...dep]) {
  17172. if (effect !== activeEffect || effect.allowRecurse) {
  17173. if (( true) && effect.onTrigger) {
  17174. effect.onTrigger((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({ effect }, debuggerEventExtraInfo));
  17175. }
  17176. if (effect.scheduler) {
  17177. effect.scheduler();
  17178. }
  17179. else {
  17180. effect.run();
  17181. }
  17182. }
  17183. }
  17184. }
  17185. const isNonTrackableKeys = /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.makeMap)(`__proto__,__v_isRef,__isVue`);
  17186. const builtInSymbols = new Set(Object.getOwnPropertyNames(Symbol)
  17187. .map(key => Symbol[key])
  17188. .filter(_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol));
  17189. const get = /*#__PURE__*/ createGetter();
  17190. const shallowGet = /*#__PURE__*/ createGetter(false, true);
  17191. const readonlyGet = /*#__PURE__*/ createGetter(true);
  17192. const shallowReadonlyGet = /*#__PURE__*/ createGetter(true, true);
  17193. const arrayInstrumentations = /*#__PURE__*/ createArrayInstrumentations();
  17194. function createArrayInstrumentations() {
  17195. const instrumentations = {};
  17196. ['includes', 'indexOf', 'lastIndexOf'].forEach(key => {
  17197. instrumentations[key] = function (...args) {
  17198. const arr = toRaw(this);
  17199. for (let i = 0, l = this.length; i < l; i++) {
  17200. track(arr, "get" /* GET */, i + '');
  17201. }
  17202. // we run the method using the original args first (which may be reactive)
  17203. const res = arr[key](...args);
  17204. if (res === -1 || res === false) {
  17205. // if that didn't work, run it again using raw values.
  17206. return arr[key](...args.map(toRaw));
  17207. }
  17208. else {
  17209. return res;
  17210. }
  17211. };
  17212. });
  17213. ['push', 'pop', 'shift', 'unshift', 'splice'].forEach(key => {
  17214. instrumentations[key] = function (...args) {
  17215. pauseTracking();
  17216. const res = toRaw(this)[key].apply(this, args);
  17217. resetTracking();
  17218. return res;
  17219. };
  17220. });
  17221. return instrumentations;
  17222. }
  17223. function createGetter(isReadonly = false, shallow = false) {
  17224. return function get(target, key, receiver) {
  17225. if (key === "__v_isReactive" /* IS_REACTIVE */) {
  17226. return !isReadonly;
  17227. }
  17228. else if (key === "__v_isReadonly" /* IS_READONLY */) {
  17229. return isReadonly;
  17230. }
  17231. else if (key === "__v_isShallow" /* IS_SHALLOW */) {
  17232. return shallow;
  17233. }
  17234. else if (key === "__v_raw" /* RAW */ &&
  17235. receiver ===
  17236. (isReadonly
  17237. ? shallow
  17238. ? shallowReadonlyMap
  17239. : readonlyMap
  17240. : shallow
  17241. ? shallowReactiveMap
  17242. : reactiveMap).get(target)) {
  17243. return target;
  17244. }
  17245. const targetIsArray = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target);
  17246. if (!isReadonly && targetIsArray && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(arrayInstrumentations, key)) {
  17247. return Reflect.get(arrayInstrumentations, key, receiver);
  17248. }
  17249. const res = Reflect.get(target, key, receiver);
  17250. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
  17251. return res;
  17252. }
  17253. if (!isReadonly) {
  17254. track(target, "get" /* GET */, key);
  17255. }
  17256. if (shallow) {
  17257. return res;
  17258. }
  17259. if (isRef(res)) {
  17260. // ref unwrapping - does not apply for Array + integer key.
  17261. const shouldUnwrap = !targetIsArray || !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isIntegerKey)(key);
  17262. return shouldUnwrap ? res.value : res;
  17263. }
  17264. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(res)) {
  17265. // Convert returned value into a proxy as well. we do the isObject check
  17266. // here to avoid invalid value warning. Also need to lazy access readonly
  17267. // and reactive here to avoid circular dependency.
  17268. return isReadonly ? readonly(res) : reactive(res);
  17269. }
  17270. return res;
  17271. };
  17272. }
  17273. const set = /*#__PURE__*/ createSetter();
  17274. const shallowSet = /*#__PURE__*/ createSetter(true);
  17275. function createSetter(shallow = false) {
  17276. return function set(target, key, value, receiver) {
  17277. let oldValue = target[key];
  17278. if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
  17279. return false;
  17280. }
  17281. if (!shallow && !isReadonly(value)) {
  17282. if (!isShallow(value)) {
  17283. value = toRaw(value);
  17284. oldValue = toRaw(oldValue);
  17285. }
  17286. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target) && isRef(oldValue) && !isRef(value)) {
  17287. oldValue.value = value;
  17288. return true;
  17289. }
  17290. }
  17291. const hadKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isIntegerKey)(key)
  17292. ? Number(key) < target.length
  17293. : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(target, key);
  17294. const result = Reflect.set(target, key, value, receiver);
  17295. // don't trigger if target is something up in the prototype chain of original
  17296. if (target === toRaw(receiver)) {
  17297. if (!hadKey) {
  17298. trigger(target, "add" /* ADD */, key, value);
  17299. }
  17300. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(value, oldValue)) {
  17301. trigger(target, "set" /* SET */, key, value, oldValue);
  17302. }
  17303. }
  17304. return result;
  17305. };
  17306. }
  17307. function deleteProperty(target, key) {
  17308. const hadKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(target, key);
  17309. const oldValue = target[key];
  17310. const result = Reflect.deleteProperty(target, key);
  17311. if (result && hadKey) {
  17312. trigger(target, "delete" /* DELETE */, key, undefined, oldValue);
  17313. }
  17314. return result;
  17315. }
  17316. function has(target, key) {
  17317. const result = Reflect.has(target, key);
  17318. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isSymbol)(key) || !builtInSymbols.has(key)) {
  17319. track(target, "has" /* HAS */, key);
  17320. }
  17321. return result;
  17322. }
  17323. function ownKeys(target) {
  17324. track(target, "iterate" /* ITERATE */, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(target) ? 'length' : ITERATE_KEY);
  17325. return Reflect.ownKeys(target);
  17326. }
  17327. const mutableHandlers = {
  17328. get,
  17329. set,
  17330. deleteProperty,
  17331. has,
  17332. ownKeys
  17333. };
  17334. const readonlyHandlers = {
  17335. get: readonlyGet,
  17336. set(target, key) {
  17337. if ((true)) {
  17338. console.warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
  17339. }
  17340. return true;
  17341. },
  17342. deleteProperty(target, key) {
  17343. if ((true)) {
  17344. console.warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
  17345. }
  17346. return true;
  17347. }
  17348. };
  17349. const shallowReactiveHandlers = /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({}, mutableHandlers, {
  17350. get: shallowGet,
  17351. set: shallowSet
  17352. });
  17353. // Props handlers are special in the sense that it should not unwrap top-level
  17354. // refs (in order to allow refs to be explicitly passed down), but should
  17355. // retain the reactivity of the normal readonly object.
  17356. const shallowReadonlyHandlers = /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.extend)({}, readonlyHandlers, {
  17357. get: shallowReadonlyGet
  17358. });
  17359. const toShallow = (value) => value;
  17360. const getProto = (v) => Reflect.getPrototypeOf(v);
  17361. function get$1(target, key, isReadonly = false, isShallow = false) {
  17362. // #1772: readonly(reactive(Map)) should return readonly + reactive version
  17363. // of the value
  17364. target = target["__v_raw" /* RAW */];
  17365. const rawTarget = toRaw(target);
  17366. const rawKey = toRaw(key);
  17367. if (key !== rawKey) {
  17368. !isReadonly && track(rawTarget, "get" /* GET */, key);
  17369. }
  17370. !isReadonly && track(rawTarget, "get" /* GET */, rawKey);
  17371. const { has } = getProto(rawTarget);
  17372. const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
  17373. if (has.call(rawTarget, key)) {
  17374. return wrap(target.get(key));
  17375. }
  17376. else if (has.call(rawTarget, rawKey)) {
  17377. return wrap(target.get(rawKey));
  17378. }
  17379. else if (target !== rawTarget) {
  17380. // #3602 readonly(reactive(Map))
  17381. // ensure that the nested reactive `Map` can do tracking for itself
  17382. target.get(key);
  17383. }
  17384. }
  17385. function has$1(key, isReadonly = false) {
  17386. const target = this["__v_raw" /* RAW */];
  17387. const rawTarget = toRaw(target);
  17388. const rawKey = toRaw(key);
  17389. if (key !== rawKey) {
  17390. !isReadonly && track(rawTarget, "has" /* HAS */, key);
  17391. }
  17392. !isReadonly && track(rawTarget, "has" /* HAS */, rawKey);
  17393. return key === rawKey
  17394. ? target.has(key)
  17395. : target.has(key) || target.has(rawKey);
  17396. }
  17397. function size(target, isReadonly = false) {
  17398. target = target["__v_raw" /* RAW */];
  17399. !isReadonly && track(toRaw(target), "iterate" /* ITERATE */, ITERATE_KEY);
  17400. return Reflect.get(target, 'size', target);
  17401. }
  17402. function add(value) {
  17403. value = toRaw(value);
  17404. const target = toRaw(this);
  17405. const proto = getProto(target);
  17406. const hadKey = proto.has.call(target, value);
  17407. if (!hadKey) {
  17408. target.add(value);
  17409. trigger(target, "add" /* ADD */, value, value);
  17410. }
  17411. return this;
  17412. }
  17413. function set$1(key, value) {
  17414. value = toRaw(value);
  17415. const target = toRaw(this);
  17416. const { has, get } = getProto(target);
  17417. let hadKey = has.call(target, key);
  17418. if (!hadKey) {
  17419. key = toRaw(key);
  17420. hadKey = has.call(target, key);
  17421. }
  17422. else if ((true)) {
  17423. checkIdentityKeys(target, has, key);
  17424. }
  17425. const oldValue = get.call(target, key);
  17426. target.set(key, value);
  17427. if (!hadKey) {
  17428. trigger(target, "add" /* ADD */, key, value);
  17429. }
  17430. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(value, oldValue)) {
  17431. trigger(target, "set" /* SET */, key, value, oldValue);
  17432. }
  17433. return this;
  17434. }
  17435. function deleteEntry(key) {
  17436. const target = toRaw(this);
  17437. const { has, get } = getProto(target);
  17438. let hadKey = has.call(target, key);
  17439. if (!hadKey) {
  17440. key = toRaw(key);
  17441. hadKey = has.call(target, key);
  17442. }
  17443. else if ((true)) {
  17444. checkIdentityKeys(target, has, key);
  17445. }
  17446. const oldValue = get ? get.call(target, key) : undefined;
  17447. // forward the operation before queueing reactions
  17448. const result = target.delete(key);
  17449. if (hadKey) {
  17450. trigger(target, "delete" /* DELETE */, key, undefined, oldValue);
  17451. }
  17452. return result;
  17453. }
  17454. function clear() {
  17455. const target = toRaw(this);
  17456. const hadItems = target.size !== 0;
  17457. const oldTarget = ( true)
  17458. ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(target)
  17459. ? new Map(target)
  17460. : new Set(target)
  17461. : 0;
  17462. // forward the operation before queueing reactions
  17463. const result = target.clear();
  17464. if (hadItems) {
  17465. trigger(target, "clear" /* CLEAR */, undefined, undefined, oldTarget);
  17466. }
  17467. return result;
  17468. }
  17469. function createForEach(isReadonly, isShallow) {
  17470. return function forEach(callback, thisArg) {
  17471. const observed = this;
  17472. const target = observed["__v_raw" /* RAW */];
  17473. const rawTarget = toRaw(target);
  17474. const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
  17475. !isReadonly && track(rawTarget, "iterate" /* ITERATE */, ITERATE_KEY);
  17476. return target.forEach((value, key) => {
  17477. // important: make sure the callback is
  17478. // 1. invoked with the reactive map as `this` and 3rd arg
  17479. // 2. the value received should be a corresponding reactive/readonly.
  17480. return callback.call(thisArg, wrap(value), wrap(key), observed);
  17481. });
  17482. };
  17483. }
  17484. function createIterableMethod(method, isReadonly, isShallow) {
  17485. return function (...args) {
  17486. const target = this["__v_raw" /* RAW */];
  17487. const rawTarget = toRaw(target);
  17488. const targetIsMap = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isMap)(rawTarget);
  17489. const isPair = method === 'entries' || (method === Symbol.iterator && targetIsMap);
  17490. const isKeyOnly = method === 'keys' && targetIsMap;
  17491. const innerIterator = target[method](...args);
  17492. const wrap = isShallow ? toShallow : isReadonly ? toReadonly : toReactive;
  17493. !isReadonly &&
  17494. track(rawTarget, "iterate" /* ITERATE */, isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
  17495. // return a wrapped iterator which returns observed versions of the
  17496. // values emitted from the real iterator
  17497. return {
  17498. // iterator protocol
  17499. next() {
  17500. const { value, done } = innerIterator.next();
  17501. return done
  17502. ? { value, done }
  17503. : {
  17504. value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
  17505. done
  17506. };
  17507. },
  17508. // iterable protocol
  17509. [Symbol.iterator]() {
  17510. return this;
  17511. }
  17512. };
  17513. };
  17514. }
  17515. function createReadonlyMethod(type) {
  17516. return function (...args) {
  17517. if ((true)) {
  17518. const key = args[0] ? `on key "${args[0]}" ` : ``;
  17519. console.warn(`${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.capitalize)(type)} operation ${key}failed: target is readonly.`, toRaw(this));
  17520. }
  17521. return type === "delete" /* DELETE */ ? false : this;
  17522. };
  17523. }
  17524. function createInstrumentations() {
  17525. const mutableInstrumentations = {
  17526. get(key) {
  17527. return get$1(this, key);
  17528. },
  17529. get size() {
  17530. return size(this);
  17531. },
  17532. has: has$1,
  17533. add,
  17534. set: set$1,
  17535. delete: deleteEntry,
  17536. clear,
  17537. forEach: createForEach(false, false)
  17538. };
  17539. const shallowInstrumentations = {
  17540. get(key) {
  17541. return get$1(this, key, false, true);
  17542. },
  17543. get size() {
  17544. return size(this);
  17545. },
  17546. has: has$1,
  17547. add,
  17548. set: set$1,
  17549. delete: deleteEntry,
  17550. clear,
  17551. forEach: createForEach(false, true)
  17552. };
  17553. const readonlyInstrumentations = {
  17554. get(key) {
  17555. return get$1(this, key, true);
  17556. },
  17557. get size() {
  17558. return size(this, true);
  17559. },
  17560. has(key) {
  17561. return has$1.call(this, key, true);
  17562. },
  17563. add: createReadonlyMethod("add" /* ADD */),
  17564. set: createReadonlyMethod("set" /* SET */),
  17565. delete: createReadonlyMethod("delete" /* DELETE */),
  17566. clear: createReadonlyMethod("clear" /* CLEAR */),
  17567. forEach: createForEach(true, false)
  17568. };
  17569. const shallowReadonlyInstrumentations = {
  17570. get(key) {
  17571. return get$1(this, key, true, true);
  17572. },
  17573. get size() {
  17574. return size(this, true);
  17575. },
  17576. has(key) {
  17577. return has$1.call(this, key, true);
  17578. },
  17579. add: createReadonlyMethod("add" /* ADD */),
  17580. set: createReadonlyMethod("set" /* SET */),
  17581. delete: createReadonlyMethod("delete" /* DELETE */),
  17582. clear: createReadonlyMethod("clear" /* CLEAR */),
  17583. forEach: createForEach(true, true)
  17584. };
  17585. const iteratorMethods = ['keys', 'values', 'entries', Symbol.iterator];
  17586. iteratorMethods.forEach(method => {
  17587. mutableInstrumentations[method] = createIterableMethod(method, false, false);
  17588. readonlyInstrumentations[method] = createIterableMethod(method, true, false);
  17589. shallowInstrumentations[method] = createIterableMethod(method, false, true);
  17590. shallowReadonlyInstrumentations[method] = createIterableMethod(method, true, true);
  17591. });
  17592. return [
  17593. mutableInstrumentations,
  17594. readonlyInstrumentations,
  17595. shallowInstrumentations,
  17596. shallowReadonlyInstrumentations
  17597. ];
  17598. }
  17599. const [mutableInstrumentations, readonlyInstrumentations, shallowInstrumentations, shallowReadonlyInstrumentations] = /* #__PURE__*/ createInstrumentations();
  17600. function createInstrumentationGetter(isReadonly, shallow) {
  17601. const instrumentations = shallow
  17602. ? isReadonly
  17603. ? shallowReadonlyInstrumentations
  17604. : shallowInstrumentations
  17605. : isReadonly
  17606. ? readonlyInstrumentations
  17607. : mutableInstrumentations;
  17608. return (target, key, receiver) => {
  17609. if (key === "__v_isReactive" /* IS_REACTIVE */) {
  17610. return !isReadonly;
  17611. }
  17612. else if (key === "__v_isReadonly" /* IS_READONLY */) {
  17613. return isReadonly;
  17614. }
  17615. else if (key === "__v_raw" /* RAW */) {
  17616. return target;
  17617. }
  17618. return Reflect.get((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasOwn)(instrumentations, key) && key in target
  17619. ? instrumentations
  17620. : target, key, receiver);
  17621. };
  17622. }
  17623. const mutableCollectionHandlers = {
  17624. get: /*#__PURE__*/ createInstrumentationGetter(false, false)
  17625. };
  17626. const shallowCollectionHandlers = {
  17627. get: /*#__PURE__*/ createInstrumentationGetter(false, true)
  17628. };
  17629. const readonlyCollectionHandlers = {
  17630. get: /*#__PURE__*/ createInstrumentationGetter(true, false)
  17631. };
  17632. const shallowReadonlyCollectionHandlers = {
  17633. get: /*#__PURE__*/ createInstrumentationGetter(true, true)
  17634. };
  17635. function checkIdentityKeys(target, has, key) {
  17636. const rawKey = toRaw(key);
  17637. if (rawKey !== key && has.call(target, rawKey)) {
  17638. const type = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.toRawType)(target);
  17639. console.warn(`Reactive ${type} contains both the raw and reactive ` +
  17640. `versions of the same object${type === `Map` ? ` as keys` : ``}, ` +
  17641. `which can lead to inconsistencies. ` +
  17642. `Avoid differentiating between the raw and reactive versions ` +
  17643. `of an object and only use the reactive version if possible.`);
  17644. }
  17645. }
  17646. const reactiveMap = new WeakMap();
  17647. const shallowReactiveMap = new WeakMap();
  17648. const readonlyMap = new WeakMap();
  17649. const shallowReadonlyMap = new WeakMap();
  17650. function targetTypeMap(rawType) {
  17651. switch (rawType) {
  17652. case 'Object':
  17653. case 'Array':
  17654. return 1 /* COMMON */;
  17655. case 'Map':
  17656. case 'Set':
  17657. case 'WeakMap':
  17658. case 'WeakSet':
  17659. return 2 /* COLLECTION */;
  17660. default:
  17661. return 0 /* INVALID */;
  17662. }
  17663. }
  17664. function getTargetType(value) {
  17665. return value["__v_skip" /* SKIP */] || !Object.isExtensible(value)
  17666. ? 0 /* INVALID */
  17667. : targetTypeMap((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.toRawType)(value));
  17668. }
  17669. function reactive(target) {
  17670. // if trying to observe a readonly proxy, return the readonly version.
  17671. if (isReadonly(target)) {
  17672. return target;
  17673. }
  17674. return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
  17675. }
  17676. /**
  17677. * Return a shallowly-reactive copy of the original object, where only the root
  17678. * level properties are reactive. It also does not auto-unwrap refs (even at the
  17679. * root level).
  17680. */
  17681. function shallowReactive(target) {
  17682. return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
  17683. }
  17684. /**
  17685. * Creates a readonly copy of the original object. Note the returned copy is not
  17686. * made reactive, but `readonly` can be called on an already reactive object.
  17687. */
  17688. function readonly(target) {
  17689. return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
  17690. }
  17691. /**
  17692. * Returns a reactive-copy of the original object, where only the root level
  17693. * properties are readonly, and does NOT unwrap refs nor recursively convert
  17694. * returned properties.
  17695. * This is used for creating the props proxy object for stateful components.
  17696. */
  17697. function shallowReadonly(target) {
  17698. return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
  17699. }
  17700. function createReactiveObject(target, isReadonly, baseHandlers, collectionHandlers, proxyMap) {
  17701. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(target)) {
  17702. if ((true)) {
  17703. console.warn(`value cannot be made reactive: ${String(target)}`);
  17704. }
  17705. return target;
  17706. }
  17707. // target is already a Proxy, return it.
  17708. // exception: calling readonly() on a reactive object
  17709. if (target["__v_raw" /* RAW */] &&
  17710. !(isReadonly && target["__v_isReactive" /* IS_REACTIVE */])) {
  17711. return target;
  17712. }
  17713. // target already has corresponding Proxy
  17714. const existingProxy = proxyMap.get(target);
  17715. if (existingProxy) {
  17716. return existingProxy;
  17717. }
  17718. // only a whitelist of value types can be observed.
  17719. const targetType = getTargetType(target);
  17720. if (targetType === 0 /* INVALID */) {
  17721. return target;
  17722. }
  17723. const proxy = new Proxy(target, targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers);
  17724. proxyMap.set(target, proxy);
  17725. return proxy;
  17726. }
  17727. function isReactive(value) {
  17728. if (isReadonly(value)) {
  17729. return isReactive(value["__v_raw" /* RAW */]);
  17730. }
  17731. return !!(value && value["__v_isReactive" /* IS_REACTIVE */]);
  17732. }
  17733. function isReadonly(value) {
  17734. return !!(value && value["__v_isReadonly" /* IS_READONLY */]);
  17735. }
  17736. function isShallow(value) {
  17737. return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
  17738. }
  17739. function isProxy(value) {
  17740. return isReactive(value) || isReadonly(value);
  17741. }
  17742. function toRaw(observed) {
  17743. const raw = observed && observed["__v_raw" /* RAW */];
  17744. return raw ? toRaw(raw) : observed;
  17745. }
  17746. function markRaw(value) {
  17747. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.def)(value, "__v_skip" /* SKIP */, true);
  17748. return value;
  17749. }
  17750. const toReactive = (value) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(value) ? reactive(value) : value;
  17751. const toReadonly = (value) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isObject)(value) ? readonly(value) : value;
  17752. function trackRefValue(ref) {
  17753. if (shouldTrack && activeEffect) {
  17754. ref = toRaw(ref);
  17755. if ((true)) {
  17756. trackEffects(ref.dep || (ref.dep = createDep()), {
  17757. target: ref,
  17758. type: "get" /* GET */,
  17759. key: 'value'
  17760. });
  17761. }
  17762. else {}
  17763. }
  17764. }
  17765. function triggerRefValue(ref, newVal) {
  17766. ref = toRaw(ref);
  17767. if (ref.dep) {
  17768. if ((true)) {
  17769. triggerEffects(ref.dep, {
  17770. target: ref,
  17771. type: "set" /* SET */,
  17772. key: 'value',
  17773. newValue: newVal
  17774. });
  17775. }
  17776. else {}
  17777. }
  17778. }
  17779. function isRef(r) {
  17780. return !!(r && r.__v_isRef === true);
  17781. }
  17782. function ref(value) {
  17783. return createRef(value, false);
  17784. }
  17785. function shallowRef(value) {
  17786. return createRef(value, true);
  17787. }
  17788. function createRef(rawValue, shallow) {
  17789. if (isRef(rawValue)) {
  17790. return rawValue;
  17791. }
  17792. return new RefImpl(rawValue, shallow);
  17793. }
  17794. class RefImpl {
  17795. constructor(value, __v_isShallow) {
  17796. this.__v_isShallow = __v_isShallow;
  17797. this.dep = undefined;
  17798. this.__v_isRef = true;
  17799. this._rawValue = __v_isShallow ? value : toRaw(value);
  17800. this._value = __v_isShallow ? value : toReactive(value);
  17801. }
  17802. get value() {
  17803. trackRefValue(this);
  17804. return this._value;
  17805. }
  17806. set value(newVal) {
  17807. newVal = this.__v_isShallow ? newVal : toRaw(newVal);
  17808. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.hasChanged)(newVal, this._rawValue)) {
  17809. this._rawValue = newVal;
  17810. this._value = this.__v_isShallow ? newVal : toReactive(newVal);
  17811. triggerRefValue(this, newVal);
  17812. }
  17813. }
  17814. }
  17815. function triggerRef(ref) {
  17816. triggerRefValue(ref, ( true) ? ref.value : 0);
  17817. }
  17818. function unref(ref) {
  17819. return isRef(ref) ? ref.value : ref;
  17820. }
  17821. const shallowUnwrapHandlers = {
  17822. get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)),
  17823. set: (target, key, value, receiver) => {
  17824. const oldValue = target[key];
  17825. if (isRef(oldValue) && !isRef(value)) {
  17826. oldValue.value = value;
  17827. return true;
  17828. }
  17829. else {
  17830. return Reflect.set(target, key, value, receiver);
  17831. }
  17832. }
  17833. };
  17834. function proxyRefs(objectWithRefs) {
  17835. return isReactive(objectWithRefs)
  17836. ? objectWithRefs
  17837. : new Proxy(objectWithRefs, shallowUnwrapHandlers);
  17838. }
  17839. class CustomRefImpl {
  17840. constructor(factory) {
  17841. this.dep = undefined;
  17842. this.__v_isRef = true;
  17843. const { get, set } = factory(() => trackRefValue(this), () => triggerRefValue(this));
  17844. this._get = get;
  17845. this._set = set;
  17846. }
  17847. get value() {
  17848. return this._get();
  17849. }
  17850. set value(newVal) {
  17851. this._set(newVal);
  17852. }
  17853. }
  17854. function customRef(factory) {
  17855. return new CustomRefImpl(factory);
  17856. }
  17857. function toRefs(object) {
  17858. if (( true) && !isProxy(object)) {
  17859. console.warn(`toRefs() expects a reactive object but received a plain one.`);
  17860. }
  17861. const ret = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isArray)(object) ? new Array(object.length) : {};
  17862. for (const key in object) {
  17863. ret[key] = toRef(object, key);
  17864. }
  17865. return ret;
  17866. }
  17867. class ObjectRefImpl {
  17868. constructor(_object, _key, _defaultValue) {
  17869. this._object = _object;
  17870. this._key = _key;
  17871. this._defaultValue = _defaultValue;
  17872. this.__v_isRef = true;
  17873. }
  17874. get value() {
  17875. const val = this._object[this._key];
  17876. return val === undefined ? this._defaultValue : val;
  17877. }
  17878. set value(newVal) {
  17879. this._object[this._key] = newVal;
  17880. }
  17881. }
  17882. function toRef(object, key, defaultValue) {
  17883. const val = object[key];
  17884. return isRef(val)
  17885. ? val
  17886. : new ObjectRefImpl(object, key, defaultValue);
  17887. }
  17888. class ComputedRefImpl {
  17889. constructor(getter, _setter, isReadonly, isSSR) {
  17890. this._setter = _setter;
  17891. this.dep = undefined;
  17892. this.__v_isRef = true;
  17893. this._dirty = true;
  17894. this.effect = new ReactiveEffect(getter, () => {
  17895. if (!this._dirty) {
  17896. this._dirty = true;
  17897. triggerRefValue(this);
  17898. }
  17899. });
  17900. this.effect.computed = this;
  17901. this.effect.active = this._cacheable = !isSSR;
  17902. this["__v_isReadonly" /* IS_READONLY */] = isReadonly;
  17903. }
  17904. get value() {
  17905. // the computed ref may get wrapped by other proxies e.g. readonly() #3376
  17906. const self = toRaw(this);
  17907. trackRefValue(self);
  17908. if (self._dirty || !self._cacheable) {
  17909. self._dirty = false;
  17910. self._value = self.effect.run();
  17911. }
  17912. return self._value;
  17913. }
  17914. set value(newValue) {
  17915. this._setter(newValue);
  17916. }
  17917. }
  17918. function computed(getterOrOptions, debugOptions, isSSR = false) {
  17919. let getter;
  17920. let setter;
  17921. const onlyGetter = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_0__.isFunction)(getterOrOptions);
  17922. if (onlyGetter) {
  17923. getter = getterOrOptions;
  17924. setter = ( true)
  17925. ? () => {
  17926. console.warn('Write operation failed: computed value is readonly');
  17927. }
  17928. : 0;
  17929. }
  17930. else {
  17931. getter = getterOrOptions.get;
  17932. setter = getterOrOptions.set;
  17933. }
  17934. const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR);
  17935. if (( true) && debugOptions && !isSSR) {
  17936. cRef.effect.onTrack = debugOptions.onTrack;
  17937. cRef.effect.onTrigger = debugOptions.onTrigger;
  17938. }
  17939. return cRef;
  17940. }
  17941. var _a;
  17942. const tick = Promise.resolve();
  17943. const queue = [];
  17944. let queued = false;
  17945. const scheduler = (fn) => {
  17946. queue.push(fn);
  17947. if (!queued) {
  17948. queued = true;
  17949. tick.then(flush);
  17950. }
  17951. };
  17952. const flush = () => {
  17953. for (let i = 0; i < queue.length; i++) {
  17954. queue[i]();
  17955. }
  17956. queue.length = 0;
  17957. queued = false;
  17958. };
  17959. class DeferredComputedRefImpl {
  17960. constructor(getter) {
  17961. this.dep = undefined;
  17962. this._dirty = true;
  17963. this.__v_isRef = true;
  17964. this[_a] = true;
  17965. let compareTarget;
  17966. let hasCompareTarget = false;
  17967. let scheduled = false;
  17968. this.effect = new ReactiveEffect(getter, (computedTrigger) => {
  17969. if (this.dep) {
  17970. if (computedTrigger) {
  17971. compareTarget = this._value;
  17972. hasCompareTarget = true;
  17973. }
  17974. else if (!scheduled) {
  17975. const valueToCompare = hasCompareTarget ? compareTarget : this._value;
  17976. scheduled = true;
  17977. hasCompareTarget = false;
  17978. scheduler(() => {
  17979. if (this.effect.active && this._get() !== valueToCompare) {
  17980. triggerRefValue(this);
  17981. }
  17982. scheduled = false;
  17983. });
  17984. }
  17985. // chained upstream computeds are notified synchronously to ensure
  17986. // value invalidation in case of sync access; normal effects are
  17987. // deferred to be triggered in scheduler.
  17988. for (const e of this.dep) {
  17989. if (e.computed instanceof DeferredComputedRefImpl) {
  17990. e.scheduler(true /* computedTrigger */);
  17991. }
  17992. }
  17993. }
  17994. this._dirty = true;
  17995. });
  17996. this.effect.computed = this;
  17997. }
  17998. _get() {
  17999. if (this._dirty) {
  18000. this._dirty = false;
  18001. return (this._value = this.effect.run());
  18002. }
  18003. return this._value;
  18004. }
  18005. get value() {
  18006. trackRefValue(this);
  18007. // the computed ref may get wrapped by other proxies e.g. readonly() #3376
  18008. return toRaw(this)._get();
  18009. }
  18010. }
  18011. _a = "__v_isReadonly" /* IS_READONLY */;
  18012. function deferredComputed(getter) {
  18013. return new DeferredComputedRefImpl(getter);
  18014. }
  18015. /***/ }),
  18016. /***/ "./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js":
  18017. /*!*************************************************************************!*\
  18018. !*** ./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js ***!
  18019. \*************************************************************************/
  18020. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  18021. "use strict";
  18022. __webpack_require__.r(__webpack_exports__);
  18023. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  18024. /* harmony export */ "EffectScope": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.EffectScope),
  18025. /* harmony export */ "ReactiveEffect": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect),
  18026. /* harmony export */ "customRef": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.customRef),
  18027. /* harmony export */ "effect": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.effect),
  18028. /* harmony export */ "effectScope": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.effectScope),
  18029. /* harmony export */ "getCurrentScope": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope),
  18030. /* harmony export */ "isProxy": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isProxy),
  18031. /* harmony export */ "isReactive": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive),
  18032. /* harmony export */ "isReadonly": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReadonly),
  18033. /* harmony export */ "isRef": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef),
  18034. /* harmony export */ "isShallow": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isShallow),
  18035. /* harmony export */ "markRaw": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.markRaw),
  18036. /* harmony export */ "onScopeDispose": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose),
  18037. /* harmony export */ "proxyRefs": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.proxyRefs),
  18038. /* harmony export */ "reactive": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.reactive),
  18039. /* harmony export */ "readonly": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.readonly),
  18040. /* harmony export */ "ref": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref),
  18041. /* harmony export */ "shallowReactive": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReactive),
  18042. /* harmony export */ "shallowReadonly": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly),
  18043. /* harmony export */ "shallowRef": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowRef),
  18044. /* harmony export */ "stop": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.stop),
  18045. /* harmony export */ "toRaw": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw),
  18046. /* harmony export */ "toRef": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRef),
  18047. /* harmony export */ "toRefs": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRefs),
  18048. /* harmony export */ "triggerRef": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.triggerRef),
  18049. /* harmony export */ "unref": () => (/* reexport safe */ _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.unref),
  18050. /* harmony export */ "camelize": () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize),
  18051. /* harmony export */ "capitalize": () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize),
  18052. /* harmony export */ "normalizeClass": () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeClass),
  18053. /* harmony export */ "normalizeProps": () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeProps),
  18054. /* harmony export */ "normalizeStyle": () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeStyle),
  18055. /* harmony export */ "toDisplayString": () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.toDisplayString),
  18056. /* harmony export */ "toHandlerKey": () => (/* reexport safe */ _vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey),
  18057. /* harmony export */ "BaseTransition": () => (/* binding */ BaseTransition),
  18058. /* harmony export */ "Comment": () => (/* binding */ Comment),
  18059. /* harmony export */ "Fragment": () => (/* binding */ Fragment),
  18060. /* harmony export */ "KeepAlive": () => (/* binding */ KeepAlive),
  18061. /* harmony export */ "Static": () => (/* binding */ Static),
  18062. /* harmony export */ "Suspense": () => (/* binding */ Suspense),
  18063. /* harmony export */ "Teleport": () => (/* binding */ Teleport),
  18064. /* harmony export */ "Text": () => (/* binding */ Text),
  18065. /* harmony export */ "callWithAsyncErrorHandling": () => (/* binding */ callWithAsyncErrorHandling),
  18066. /* harmony export */ "callWithErrorHandling": () => (/* binding */ callWithErrorHandling),
  18067. /* harmony export */ "cloneVNode": () => (/* binding */ cloneVNode),
  18068. /* harmony export */ "compatUtils": () => (/* binding */ compatUtils),
  18069. /* harmony export */ "computed": () => (/* binding */ computed),
  18070. /* harmony export */ "createBlock": () => (/* binding */ createBlock),
  18071. /* harmony export */ "createCommentVNode": () => (/* binding */ createCommentVNode),
  18072. /* harmony export */ "createElementBlock": () => (/* binding */ createElementBlock),
  18073. /* harmony export */ "createElementVNode": () => (/* binding */ createBaseVNode),
  18074. /* harmony export */ "createHydrationRenderer": () => (/* binding */ createHydrationRenderer),
  18075. /* harmony export */ "createPropsRestProxy": () => (/* binding */ createPropsRestProxy),
  18076. /* harmony export */ "createRenderer": () => (/* binding */ createRenderer),
  18077. /* harmony export */ "createSlots": () => (/* binding */ createSlots),
  18078. /* harmony export */ "createStaticVNode": () => (/* binding */ createStaticVNode),
  18079. /* harmony export */ "createTextVNode": () => (/* binding */ createTextVNode),
  18080. /* harmony export */ "createVNode": () => (/* binding */ createVNode),
  18081. /* harmony export */ "defineAsyncComponent": () => (/* binding */ defineAsyncComponent),
  18082. /* harmony export */ "defineComponent": () => (/* binding */ defineComponent),
  18083. /* harmony export */ "defineEmits": () => (/* binding */ defineEmits),
  18084. /* harmony export */ "defineExpose": () => (/* binding */ defineExpose),
  18085. /* harmony export */ "defineProps": () => (/* binding */ defineProps),
  18086. /* harmony export */ "devtools": () => (/* binding */ devtools),
  18087. /* harmony export */ "getCurrentInstance": () => (/* binding */ getCurrentInstance),
  18088. /* harmony export */ "getTransitionRawChildren": () => (/* binding */ getTransitionRawChildren),
  18089. /* harmony export */ "guardReactiveProps": () => (/* binding */ guardReactiveProps),
  18090. /* harmony export */ "h": () => (/* binding */ h),
  18091. /* harmony export */ "handleError": () => (/* binding */ handleError),
  18092. /* harmony export */ "initCustomFormatter": () => (/* binding */ initCustomFormatter),
  18093. /* harmony export */ "inject": () => (/* binding */ inject),
  18094. /* harmony export */ "isMemoSame": () => (/* binding */ isMemoSame),
  18095. /* harmony export */ "isRuntimeOnly": () => (/* binding */ isRuntimeOnly),
  18096. /* harmony export */ "isVNode": () => (/* binding */ isVNode),
  18097. /* harmony export */ "mergeDefaults": () => (/* binding */ mergeDefaults),
  18098. /* harmony export */ "mergeProps": () => (/* binding */ mergeProps),
  18099. /* harmony export */ "nextTick": () => (/* binding */ nextTick),
  18100. /* harmony export */ "onActivated": () => (/* binding */ onActivated),
  18101. /* harmony export */ "onBeforeMount": () => (/* binding */ onBeforeMount),
  18102. /* harmony export */ "onBeforeUnmount": () => (/* binding */ onBeforeUnmount),
  18103. /* harmony export */ "onBeforeUpdate": () => (/* binding */ onBeforeUpdate),
  18104. /* harmony export */ "onDeactivated": () => (/* binding */ onDeactivated),
  18105. /* harmony export */ "onErrorCaptured": () => (/* binding */ onErrorCaptured),
  18106. /* harmony export */ "onMounted": () => (/* binding */ onMounted),
  18107. /* harmony export */ "onRenderTracked": () => (/* binding */ onRenderTracked),
  18108. /* harmony export */ "onRenderTriggered": () => (/* binding */ onRenderTriggered),
  18109. /* harmony export */ "onServerPrefetch": () => (/* binding */ onServerPrefetch),
  18110. /* harmony export */ "onUnmounted": () => (/* binding */ onUnmounted),
  18111. /* harmony export */ "onUpdated": () => (/* binding */ onUpdated),
  18112. /* harmony export */ "openBlock": () => (/* binding */ openBlock),
  18113. /* harmony export */ "popScopeId": () => (/* binding */ popScopeId),
  18114. /* harmony export */ "provide": () => (/* binding */ provide),
  18115. /* harmony export */ "pushScopeId": () => (/* binding */ pushScopeId),
  18116. /* harmony export */ "queuePostFlushCb": () => (/* binding */ queuePostFlushCb),
  18117. /* harmony export */ "registerRuntimeCompiler": () => (/* binding */ registerRuntimeCompiler),
  18118. /* harmony export */ "renderList": () => (/* binding */ renderList),
  18119. /* harmony export */ "renderSlot": () => (/* binding */ renderSlot),
  18120. /* harmony export */ "resolveComponent": () => (/* binding */ resolveComponent),
  18121. /* harmony export */ "resolveDirective": () => (/* binding */ resolveDirective),
  18122. /* harmony export */ "resolveDynamicComponent": () => (/* binding */ resolveDynamicComponent),
  18123. /* harmony export */ "resolveFilter": () => (/* binding */ resolveFilter),
  18124. /* harmony export */ "resolveTransitionHooks": () => (/* binding */ resolveTransitionHooks),
  18125. /* harmony export */ "setBlockTracking": () => (/* binding */ setBlockTracking),
  18126. /* harmony export */ "setDevtoolsHook": () => (/* binding */ setDevtoolsHook),
  18127. /* harmony export */ "setTransitionHooks": () => (/* binding */ setTransitionHooks),
  18128. /* harmony export */ "ssrContextKey": () => (/* binding */ ssrContextKey),
  18129. /* harmony export */ "ssrUtils": () => (/* binding */ ssrUtils),
  18130. /* harmony export */ "toHandlers": () => (/* binding */ toHandlers),
  18131. /* harmony export */ "transformVNodeArgs": () => (/* binding */ transformVNodeArgs),
  18132. /* harmony export */ "useAttrs": () => (/* binding */ useAttrs),
  18133. /* harmony export */ "useSSRContext": () => (/* binding */ useSSRContext),
  18134. /* harmony export */ "useSlots": () => (/* binding */ useSlots),
  18135. /* harmony export */ "useTransitionState": () => (/* binding */ useTransitionState),
  18136. /* harmony export */ "version": () => (/* binding */ version),
  18137. /* harmony export */ "warn": () => (/* binding */ warn),
  18138. /* harmony export */ "watch": () => (/* binding */ watch),
  18139. /* harmony export */ "watchEffect": () => (/* binding */ watchEffect),
  18140. /* harmony export */ "watchPostEffect": () => (/* binding */ watchPostEffect),
  18141. /* harmony export */ "watchSyncEffect": () => (/* binding */ watchSyncEffect),
  18142. /* harmony export */ "withAsyncContext": () => (/* binding */ withAsyncContext),
  18143. /* harmony export */ "withCtx": () => (/* binding */ withCtx),
  18144. /* harmony export */ "withDefaults": () => (/* binding */ withDefaults),
  18145. /* harmony export */ "withDirectives": () => (/* binding */ withDirectives),
  18146. /* harmony export */ "withMemo": () => (/* binding */ withMemo),
  18147. /* harmony export */ "withScopeId": () => (/* binding */ withScopeId)
  18148. /* harmony export */ });
  18149. /* harmony import */ var _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/reactivity */ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
  18150. /* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
  18151. const stack = [];
  18152. function pushWarningContext(vnode) {
  18153. stack.push(vnode);
  18154. }
  18155. function popWarningContext() {
  18156. stack.pop();
  18157. }
  18158. function warn(msg, ...args) {
  18159. // avoid props formatting or warn handler tracking deps that might be mutated
  18160. // during patch, leading to infinite recursion.
  18161. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)();
  18162. const instance = stack.length ? stack[stack.length - 1].component : null;
  18163. const appWarnHandler = instance && instance.appContext.config.warnHandler;
  18164. const trace = getComponentTrace();
  18165. if (appWarnHandler) {
  18166. callWithErrorHandling(appWarnHandler, instance, 11 /* APP_WARN_HANDLER */, [
  18167. msg + args.join(''),
  18168. instance && instance.proxy,
  18169. trace
  18170. .map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`)
  18171. .join('\n'),
  18172. trace
  18173. ]);
  18174. }
  18175. else {
  18176. const warnArgs = [`[Vue warn]: ${msg}`, ...args];
  18177. /* istanbul ignore if */
  18178. if (trace.length &&
  18179. // avoid spamming console during tests
  18180. !false) {
  18181. warnArgs.push(`\n`, ...formatTrace(trace));
  18182. }
  18183. console.warn(...warnArgs);
  18184. }
  18185. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)();
  18186. }
  18187. function getComponentTrace() {
  18188. let currentVNode = stack[stack.length - 1];
  18189. if (!currentVNode) {
  18190. return [];
  18191. }
  18192. // we can't just use the stack because it will be incomplete during updates
  18193. // that did not start from the root. Re-construct the parent chain using
  18194. // instance parent pointers.
  18195. const normalizedStack = [];
  18196. while (currentVNode) {
  18197. const last = normalizedStack[0];
  18198. if (last && last.vnode === currentVNode) {
  18199. last.recurseCount++;
  18200. }
  18201. else {
  18202. normalizedStack.push({
  18203. vnode: currentVNode,
  18204. recurseCount: 0
  18205. });
  18206. }
  18207. const parentInstance = currentVNode.component && currentVNode.component.parent;
  18208. currentVNode = parentInstance && parentInstance.vnode;
  18209. }
  18210. return normalizedStack;
  18211. }
  18212. /* istanbul ignore next */
  18213. function formatTrace(trace) {
  18214. const logs = [];
  18215. trace.forEach((entry, i) => {
  18216. logs.push(...(i === 0 ? [] : [`\n`]), ...formatTraceEntry(entry));
  18217. });
  18218. return logs;
  18219. }
  18220. function formatTraceEntry({ vnode, recurseCount }) {
  18221. const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
  18222. const isRoot = vnode.component ? vnode.component.parent == null : false;
  18223. const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;
  18224. const close = `>` + postfix;
  18225. return vnode.props
  18226. ? [open, ...formatProps(vnode.props), close]
  18227. : [open + close];
  18228. }
  18229. /* istanbul ignore next */
  18230. function formatProps(props) {
  18231. const res = [];
  18232. const keys = Object.keys(props);
  18233. keys.slice(0, 3).forEach(key => {
  18234. res.push(...formatProp(key, props[key]));
  18235. });
  18236. if (keys.length > 3) {
  18237. res.push(` ...`);
  18238. }
  18239. return res;
  18240. }
  18241. /* istanbul ignore next */
  18242. function formatProp(key, value, raw) {
  18243. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(value)) {
  18244. value = JSON.stringify(value);
  18245. return raw ? value : [`${key}=${value}`];
  18246. }
  18247. else if (typeof value === 'number' ||
  18248. typeof value === 'boolean' ||
  18249. value == null) {
  18250. return raw ? value : [`${key}=${value}`];
  18251. }
  18252. else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(value)) {
  18253. value = formatProp(key, (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(value.value), true);
  18254. return raw ? value : [`${key}=Ref<`, value, `>`];
  18255. }
  18256. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value)) {
  18257. return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
  18258. }
  18259. else {
  18260. value = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(value);
  18261. return raw ? value : [`${key}=`, value];
  18262. }
  18263. }
  18264. const ErrorTypeStrings = {
  18265. ["sp" /* SERVER_PREFETCH */]: 'serverPrefetch hook',
  18266. ["bc" /* BEFORE_CREATE */]: 'beforeCreate hook',
  18267. ["c" /* CREATED */]: 'created hook',
  18268. ["bm" /* BEFORE_MOUNT */]: 'beforeMount hook',
  18269. ["m" /* MOUNTED */]: 'mounted hook',
  18270. ["bu" /* BEFORE_UPDATE */]: 'beforeUpdate hook',
  18271. ["u" /* UPDATED */]: 'updated',
  18272. ["bum" /* BEFORE_UNMOUNT */]: 'beforeUnmount hook',
  18273. ["um" /* UNMOUNTED */]: 'unmounted hook',
  18274. ["a" /* ACTIVATED */]: 'activated hook',
  18275. ["da" /* DEACTIVATED */]: 'deactivated hook',
  18276. ["ec" /* ERROR_CAPTURED */]: 'errorCaptured hook',
  18277. ["rtc" /* RENDER_TRACKED */]: 'renderTracked hook',
  18278. ["rtg" /* RENDER_TRIGGERED */]: 'renderTriggered hook',
  18279. [0 /* SETUP_FUNCTION */]: 'setup function',
  18280. [1 /* RENDER_FUNCTION */]: 'render function',
  18281. [2 /* WATCH_GETTER */]: 'watcher getter',
  18282. [3 /* WATCH_CALLBACK */]: 'watcher callback',
  18283. [4 /* WATCH_CLEANUP */]: 'watcher cleanup function',
  18284. [5 /* NATIVE_EVENT_HANDLER */]: 'native event handler',
  18285. [6 /* COMPONENT_EVENT_HANDLER */]: 'component event handler',
  18286. [7 /* VNODE_HOOK */]: 'vnode hook',
  18287. [8 /* DIRECTIVE_HOOK */]: 'directive hook',
  18288. [9 /* TRANSITION_HOOK */]: 'transition hook',
  18289. [10 /* APP_ERROR_HANDLER */]: 'app errorHandler',
  18290. [11 /* APP_WARN_HANDLER */]: 'app warnHandler',
  18291. [12 /* FUNCTION_REF */]: 'ref function',
  18292. [13 /* ASYNC_COMPONENT_LOADER */]: 'async component loader',
  18293. [14 /* SCHEDULER */]: 'scheduler flush. This is likely a Vue internals bug. ' +
  18294. 'Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core'
  18295. };
  18296. function callWithErrorHandling(fn, instance, type, args) {
  18297. let res;
  18298. try {
  18299. res = args ? fn(...args) : fn();
  18300. }
  18301. catch (err) {
  18302. handleError(err, instance, type);
  18303. }
  18304. return res;
  18305. }
  18306. function callWithAsyncErrorHandling(fn, instance, type, args) {
  18307. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(fn)) {
  18308. const res = callWithErrorHandling(fn, instance, type, args);
  18309. if (res && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPromise)(res)) {
  18310. res.catch(err => {
  18311. handleError(err, instance, type);
  18312. });
  18313. }
  18314. return res;
  18315. }
  18316. const values = [];
  18317. for (let i = 0; i < fn.length; i++) {
  18318. values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
  18319. }
  18320. return values;
  18321. }
  18322. function handleError(err, instance, type, throwInDev = true) {
  18323. const contextVNode = instance ? instance.vnode : null;
  18324. if (instance) {
  18325. let cur = instance.parent;
  18326. // the exposed instance is the render proxy to keep it consistent with 2.x
  18327. const exposedInstance = instance.proxy;
  18328. // in production the hook receives only the error code
  18329. const errorInfo = ( true) ? ErrorTypeStrings[type] : 0;
  18330. while (cur) {
  18331. const errorCapturedHooks = cur.ec;
  18332. if (errorCapturedHooks) {
  18333. for (let i = 0; i < errorCapturedHooks.length; i++) {
  18334. if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
  18335. return;
  18336. }
  18337. }
  18338. }
  18339. cur = cur.parent;
  18340. }
  18341. // app-level handling
  18342. const appErrorHandler = instance.appContext.config.errorHandler;
  18343. if (appErrorHandler) {
  18344. callWithErrorHandling(appErrorHandler, null, 10 /* APP_ERROR_HANDLER */, [err, exposedInstance, errorInfo]);
  18345. return;
  18346. }
  18347. }
  18348. logError(err, type, contextVNode, throwInDev);
  18349. }
  18350. function logError(err, type, contextVNode, throwInDev = true) {
  18351. if ((true)) {
  18352. const info = ErrorTypeStrings[type];
  18353. if (contextVNode) {
  18354. pushWarningContext(contextVNode);
  18355. }
  18356. warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
  18357. if (contextVNode) {
  18358. popWarningContext();
  18359. }
  18360. // crash in dev by default so it's more noticeable
  18361. if (throwInDev) {
  18362. throw err;
  18363. }
  18364. else {
  18365. console.error(err);
  18366. }
  18367. }
  18368. else {}
  18369. }
  18370. let isFlushing = false;
  18371. let isFlushPending = false;
  18372. const queue = [];
  18373. let flushIndex = 0;
  18374. const pendingPreFlushCbs = [];
  18375. let activePreFlushCbs = null;
  18376. let preFlushIndex = 0;
  18377. const pendingPostFlushCbs = [];
  18378. let activePostFlushCbs = null;
  18379. let postFlushIndex = 0;
  18380. const resolvedPromise = Promise.resolve();
  18381. let currentFlushPromise = null;
  18382. let currentPreFlushParentJob = null;
  18383. const RECURSION_LIMIT = 100;
  18384. function nextTick(fn) {
  18385. const p = currentFlushPromise || resolvedPromise;
  18386. return fn ? p.then(this ? fn.bind(this) : fn) : p;
  18387. }
  18388. // #2768
  18389. // Use binary-search to find a suitable position in the queue,
  18390. // so that the queue maintains the increasing order of job's id,
  18391. // which can prevent the job from being skipped and also can avoid repeated patching.
  18392. function findInsertionIndex(id) {
  18393. // the start index should be `flushIndex + 1`
  18394. let start = flushIndex + 1;
  18395. let end = queue.length;
  18396. while (start < end) {
  18397. const middle = (start + end) >>> 1;
  18398. const middleJobId = getId(queue[middle]);
  18399. middleJobId < id ? (start = middle + 1) : (end = middle);
  18400. }
  18401. return start;
  18402. }
  18403. function queueJob(job) {
  18404. // the dedupe search uses the startIndex argument of Array.includes()
  18405. // by default the search index includes the current job that is being run
  18406. // so it cannot recursively trigger itself again.
  18407. // if the job is a watch() callback, the search will start with a +1 index to
  18408. // allow it recursively trigger itself - it is the user's responsibility to
  18409. // ensure it doesn't end up in an infinite loop.
  18410. if ((!queue.length ||
  18411. !queue.includes(job, isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex)) &&
  18412. job !== currentPreFlushParentJob) {
  18413. if (job.id == null) {
  18414. queue.push(job);
  18415. }
  18416. else {
  18417. queue.splice(findInsertionIndex(job.id), 0, job);
  18418. }
  18419. queueFlush();
  18420. }
  18421. }
  18422. function queueFlush() {
  18423. if (!isFlushing && !isFlushPending) {
  18424. isFlushPending = true;
  18425. currentFlushPromise = resolvedPromise.then(flushJobs);
  18426. }
  18427. }
  18428. function invalidateJob(job) {
  18429. const i = queue.indexOf(job);
  18430. if (i > flushIndex) {
  18431. queue.splice(i, 1);
  18432. }
  18433. }
  18434. function queueCb(cb, activeQueue, pendingQueue, index) {
  18435. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(cb)) {
  18436. if (!activeQueue ||
  18437. !activeQueue.includes(cb, cb.allowRecurse ? index + 1 : index)) {
  18438. pendingQueue.push(cb);
  18439. }
  18440. }
  18441. else {
  18442. // if cb is an array, it is a component lifecycle hook which can only be
  18443. // triggered by a job, which is already deduped in the main queue, so
  18444. // we can skip duplicate check here to improve perf
  18445. pendingQueue.push(...cb);
  18446. }
  18447. queueFlush();
  18448. }
  18449. function queuePreFlushCb(cb) {
  18450. queueCb(cb, activePreFlushCbs, pendingPreFlushCbs, preFlushIndex);
  18451. }
  18452. function queuePostFlushCb(cb) {
  18453. queueCb(cb, activePostFlushCbs, pendingPostFlushCbs, postFlushIndex);
  18454. }
  18455. function flushPreFlushCbs(seen, parentJob = null) {
  18456. if (pendingPreFlushCbs.length) {
  18457. currentPreFlushParentJob = parentJob;
  18458. activePreFlushCbs = [...new Set(pendingPreFlushCbs)];
  18459. pendingPreFlushCbs.length = 0;
  18460. if ((true)) {
  18461. seen = seen || new Map();
  18462. }
  18463. for (preFlushIndex = 0; preFlushIndex < activePreFlushCbs.length; preFlushIndex++) {
  18464. if (( true) &&
  18465. checkRecursiveUpdates(seen, activePreFlushCbs[preFlushIndex])) {
  18466. continue;
  18467. }
  18468. activePreFlushCbs[preFlushIndex]();
  18469. }
  18470. activePreFlushCbs = null;
  18471. preFlushIndex = 0;
  18472. currentPreFlushParentJob = null;
  18473. // recursively flush until it drains
  18474. flushPreFlushCbs(seen, parentJob);
  18475. }
  18476. }
  18477. function flushPostFlushCbs(seen) {
  18478. if (pendingPostFlushCbs.length) {
  18479. const deduped = [...new Set(pendingPostFlushCbs)];
  18480. pendingPostFlushCbs.length = 0;
  18481. // #1947 already has active queue, nested flushPostFlushCbs call
  18482. if (activePostFlushCbs) {
  18483. activePostFlushCbs.push(...deduped);
  18484. return;
  18485. }
  18486. activePostFlushCbs = deduped;
  18487. if ((true)) {
  18488. seen = seen || new Map();
  18489. }
  18490. activePostFlushCbs.sort((a, b) => getId(a) - getId(b));
  18491. for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
  18492. if (( true) &&
  18493. checkRecursiveUpdates(seen, activePostFlushCbs[postFlushIndex])) {
  18494. continue;
  18495. }
  18496. activePostFlushCbs[postFlushIndex]();
  18497. }
  18498. activePostFlushCbs = null;
  18499. postFlushIndex = 0;
  18500. }
  18501. }
  18502. const getId = (job) => job.id == null ? Infinity : job.id;
  18503. function flushJobs(seen) {
  18504. isFlushPending = false;
  18505. isFlushing = true;
  18506. if ((true)) {
  18507. seen = seen || new Map();
  18508. }
  18509. flushPreFlushCbs(seen);
  18510. // Sort queue before flush.
  18511. // This ensures that:
  18512. // 1. Components are updated from parent to child. (because parent is always
  18513. // created before the child so its render effect will have smaller
  18514. // priority number)
  18515. // 2. If a component is unmounted during a parent component's update,
  18516. // its update can be skipped.
  18517. queue.sort((a, b) => getId(a) - getId(b));
  18518. // conditional usage of checkRecursiveUpdate must be determined out of
  18519. // try ... catch block since Rollup by default de-optimizes treeshaking
  18520. // inside try-catch. This can leave all warning code unshaked. Although
  18521. // they would get eventually shaken by a minifier like terser, some minifiers
  18522. // would fail to do that (e.g. https://github.com/evanw/esbuild/issues/1610)
  18523. const check = ( true)
  18524. ? (job) => checkRecursiveUpdates(seen, job)
  18525. : 0;
  18526. try {
  18527. for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
  18528. const job = queue[flushIndex];
  18529. if (job && job.active !== false) {
  18530. if (( true) && check(job)) {
  18531. continue;
  18532. }
  18533. // console.log(`running:`, job.id)
  18534. callWithErrorHandling(job, null, 14 /* SCHEDULER */);
  18535. }
  18536. }
  18537. }
  18538. finally {
  18539. flushIndex = 0;
  18540. queue.length = 0;
  18541. flushPostFlushCbs(seen);
  18542. isFlushing = false;
  18543. currentFlushPromise = null;
  18544. // some postFlushCb queued jobs!
  18545. // keep flushing until it drains.
  18546. if (queue.length ||
  18547. pendingPreFlushCbs.length ||
  18548. pendingPostFlushCbs.length) {
  18549. flushJobs(seen);
  18550. }
  18551. }
  18552. }
  18553. function checkRecursiveUpdates(seen, fn) {
  18554. if (!seen.has(fn)) {
  18555. seen.set(fn, 1);
  18556. }
  18557. else {
  18558. const count = seen.get(fn);
  18559. if (count > RECURSION_LIMIT) {
  18560. const instance = fn.ownerInstance;
  18561. const componentName = instance && getComponentName(instance.type);
  18562. warn(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. ` +
  18563. `This means you have a reactive effect that is mutating its own ` +
  18564. `dependencies and thus recursively triggering itself. Possible sources ` +
  18565. `include component template, render function, updated hook or ` +
  18566. `watcher source function.`);
  18567. return true;
  18568. }
  18569. else {
  18570. seen.set(fn, count + 1);
  18571. }
  18572. }
  18573. }
  18574. /* eslint-disable no-restricted-globals */
  18575. let isHmrUpdating = false;
  18576. const hmrDirtyComponents = new Set();
  18577. // Expose the HMR runtime on the global object
  18578. // This makes it entirely tree-shakable without polluting the exports and makes
  18579. // it easier to be used in toolings like vue-loader
  18580. // Note: for a component to be eligible for HMR it also needs the __hmrId option
  18581. // to be set so that its instances can be registered / removed.
  18582. if ((true)) {
  18583. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.getGlobalThis)().__VUE_HMR_RUNTIME__ = {
  18584. createRecord: tryWrap(createRecord),
  18585. rerender: tryWrap(rerender),
  18586. reload: tryWrap(reload)
  18587. };
  18588. }
  18589. const map = new Map();
  18590. function registerHMR(instance) {
  18591. const id = instance.type.__hmrId;
  18592. let record = map.get(id);
  18593. if (!record) {
  18594. createRecord(id, instance.type);
  18595. record = map.get(id);
  18596. }
  18597. record.instances.add(instance);
  18598. }
  18599. function unregisterHMR(instance) {
  18600. map.get(instance.type.__hmrId).instances.delete(instance);
  18601. }
  18602. function createRecord(id, initialDef) {
  18603. if (map.has(id)) {
  18604. return false;
  18605. }
  18606. map.set(id, {
  18607. initialDef: normalizeClassComponent(initialDef),
  18608. instances: new Set()
  18609. });
  18610. return true;
  18611. }
  18612. function normalizeClassComponent(component) {
  18613. return isClassComponent(component) ? component.__vccOpts : component;
  18614. }
  18615. function rerender(id, newRender) {
  18616. const record = map.get(id);
  18617. if (!record) {
  18618. return;
  18619. }
  18620. // update initial record (for not-yet-rendered component)
  18621. record.initialDef.render = newRender;
  18622. [...record.instances].forEach(instance => {
  18623. if (newRender) {
  18624. instance.render = newRender;
  18625. normalizeClassComponent(instance.type).render = newRender;
  18626. }
  18627. instance.renderCache = [];
  18628. // this flag forces child components with slot content to update
  18629. isHmrUpdating = true;
  18630. instance.update();
  18631. isHmrUpdating = false;
  18632. });
  18633. }
  18634. function reload(id, newComp) {
  18635. const record = map.get(id);
  18636. if (!record)
  18637. return;
  18638. newComp = normalizeClassComponent(newComp);
  18639. // update initial def (for not-yet-rendered components)
  18640. updateComponentDef(record.initialDef, newComp);
  18641. // create a snapshot which avoids the set being mutated during updates
  18642. const instances = [...record.instances];
  18643. for (const instance of instances) {
  18644. const oldComp = normalizeClassComponent(instance.type);
  18645. if (!hmrDirtyComponents.has(oldComp)) {
  18646. // 1. Update existing comp definition to match new one
  18647. if (oldComp !== record.initialDef) {
  18648. updateComponentDef(oldComp, newComp);
  18649. }
  18650. // 2. mark definition dirty. This forces the renderer to replace the
  18651. // component on patch.
  18652. hmrDirtyComponents.add(oldComp);
  18653. }
  18654. // 3. invalidate options resolution cache
  18655. instance.appContext.optionsCache.delete(instance.type);
  18656. // 4. actually update
  18657. if (instance.ceReload) {
  18658. // custom element
  18659. hmrDirtyComponents.add(oldComp);
  18660. instance.ceReload(newComp.styles);
  18661. hmrDirtyComponents.delete(oldComp);
  18662. }
  18663. else if (instance.parent) {
  18664. // 4. Force the parent instance to re-render. This will cause all updated
  18665. // components to be unmounted and re-mounted. Queue the update so that we
  18666. // don't end up forcing the same parent to re-render multiple times.
  18667. queueJob(instance.parent.update);
  18668. // instance is the inner component of an async custom element
  18669. // invoke to reset styles
  18670. if (instance.parent.type.__asyncLoader &&
  18671. instance.parent.ceReload) {
  18672. instance.parent.ceReload(newComp.styles);
  18673. }
  18674. }
  18675. else if (instance.appContext.reload) {
  18676. // root instance mounted via createApp() has a reload method
  18677. instance.appContext.reload();
  18678. }
  18679. else if (typeof window !== 'undefined') {
  18680. // root instance inside tree created via raw render(). Force reload.
  18681. window.location.reload();
  18682. }
  18683. else {
  18684. console.warn('[HMR] Root or manually mounted instance modified. Full reload required.');
  18685. }
  18686. }
  18687. // 5. make sure to cleanup dirty hmr components after update
  18688. queuePostFlushCb(() => {
  18689. for (const instance of instances) {
  18690. hmrDirtyComponents.delete(normalizeClassComponent(instance.type));
  18691. }
  18692. });
  18693. }
  18694. function updateComponentDef(oldComp, newComp) {
  18695. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(oldComp, newComp);
  18696. for (const key in oldComp) {
  18697. if (key !== '__file' && !(key in newComp)) {
  18698. delete oldComp[key];
  18699. }
  18700. }
  18701. }
  18702. function tryWrap(fn) {
  18703. return (id, arg) => {
  18704. try {
  18705. return fn(id, arg);
  18706. }
  18707. catch (e) {
  18708. console.error(e);
  18709. console.warn(`[HMR] Something went wrong during Vue component hot-reload. ` +
  18710. `Full reload required.`);
  18711. }
  18712. };
  18713. }
  18714. let devtools;
  18715. let buffer = [];
  18716. let devtoolsNotInstalled = false;
  18717. function emit(event, ...args) {
  18718. if (devtools) {
  18719. devtools.emit(event, ...args);
  18720. }
  18721. else if (!devtoolsNotInstalled) {
  18722. buffer.push({ event, args });
  18723. }
  18724. }
  18725. function setDevtoolsHook(hook, target) {
  18726. var _a, _b;
  18727. devtools = hook;
  18728. if (devtools) {
  18729. devtools.enabled = true;
  18730. buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
  18731. buffer = [];
  18732. }
  18733. else if (
  18734. // handle late devtools injection - only do this if we are in an actual
  18735. // browser environment to avoid the timer handle stalling test runner exit
  18736. // (#4815)
  18737. // eslint-disable-next-line no-restricted-globals
  18738. typeof window !== 'undefined' &&
  18739. // some envs mock window but not fully
  18740. window.HTMLElement &&
  18741. // also exclude jsdom
  18742. !((_b = (_a = window.navigator) === null || _a === void 0 ? void 0 : _a.userAgent) === null || _b === void 0 ? void 0 : _b.includes('jsdom'))) {
  18743. const replay = (target.__VUE_DEVTOOLS_HOOK_REPLAY__ =
  18744. target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []);
  18745. replay.push((newHook) => {
  18746. setDevtoolsHook(newHook, target);
  18747. });
  18748. // clear buffer after 3s - the user probably doesn't have devtools installed
  18749. // at all, and keeping the buffer will cause memory leaks (#4738)
  18750. setTimeout(() => {
  18751. if (!devtools) {
  18752. target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
  18753. devtoolsNotInstalled = true;
  18754. buffer = [];
  18755. }
  18756. }, 3000);
  18757. }
  18758. else {
  18759. // non-browser env, assume not installed
  18760. devtoolsNotInstalled = true;
  18761. buffer = [];
  18762. }
  18763. }
  18764. function devtoolsInitApp(app, version) {
  18765. emit("app:init" /* APP_INIT */, app, version, {
  18766. Fragment,
  18767. Text,
  18768. Comment,
  18769. Static
  18770. });
  18771. }
  18772. function devtoolsUnmountApp(app) {
  18773. emit("app:unmount" /* APP_UNMOUNT */, app);
  18774. }
  18775. const devtoolsComponentAdded = /*#__PURE__*/ createDevtoolsComponentHook("component:added" /* COMPONENT_ADDED */);
  18776. const devtoolsComponentUpdated =
  18777. /*#__PURE__*/ createDevtoolsComponentHook("component:updated" /* COMPONENT_UPDATED */);
  18778. const devtoolsComponentRemoved =
  18779. /*#__PURE__*/ createDevtoolsComponentHook("component:removed" /* COMPONENT_REMOVED */);
  18780. function createDevtoolsComponentHook(hook) {
  18781. return (component) => {
  18782. emit(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : undefined, component);
  18783. };
  18784. }
  18785. const devtoolsPerfStart = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:start" /* PERFORMANCE_START */);
  18786. const devtoolsPerfEnd = /*#__PURE__*/ createDevtoolsPerformanceHook("perf:end" /* PERFORMANCE_END */);
  18787. function createDevtoolsPerformanceHook(hook) {
  18788. return (component, type, time) => {
  18789. emit(hook, component.appContext.app, component.uid, component, type, time);
  18790. };
  18791. }
  18792. function devtoolsComponentEmit(component, event, params) {
  18793. emit("component:emit" /* COMPONENT_EMIT */, component.appContext.app, component, event, params);
  18794. }
  18795. function emit$1(instance, event, ...rawArgs) {
  18796. const props = instance.vnode.props || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
  18797. if ((true)) {
  18798. const { emitsOptions, propsOptions: [propsOptions] } = instance;
  18799. if (emitsOptions) {
  18800. if (!(event in emitsOptions) &&
  18801. !(false )) {
  18802. if (!propsOptions || !((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(event) in propsOptions)) {
  18803. warn(`Component emitted event "${event}" but it is neither declared in ` +
  18804. `the emits option nor as an "${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(event)}" prop.`);
  18805. }
  18806. }
  18807. else {
  18808. const validator = emitsOptions[event];
  18809. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(validator)) {
  18810. const isValid = validator(...rawArgs);
  18811. if (!isValid) {
  18812. warn(`Invalid event arguments: event validation failed for event "${event}".`);
  18813. }
  18814. }
  18815. }
  18816. }
  18817. }
  18818. let args = rawArgs;
  18819. const isModelListener = event.startsWith('update:');
  18820. // for v-model update:xxx events, apply modifiers on args
  18821. const modelArg = isModelListener && event.slice(7);
  18822. if (modelArg && modelArg in props) {
  18823. const modifiersKey = `${modelArg === 'modelValue' ? 'model' : modelArg}Modifiers`;
  18824. const { number, trim } = props[modifiersKey] || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
  18825. if (trim) {
  18826. args = rawArgs.map(a => a.trim());
  18827. }
  18828. else if (number) {
  18829. args = rawArgs.map(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber);
  18830. }
  18831. }
  18832. if (true) {
  18833. devtoolsComponentEmit(instance, event, args);
  18834. }
  18835. if ((true)) {
  18836. const lowerCaseEvent = event.toLowerCase();
  18837. if (lowerCaseEvent !== event && props[(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(lowerCaseEvent)]) {
  18838. warn(`Event "${lowerCaseEvent}" is emitted in component ` +
  18839. `${formatComponentName(instance, instance.type)} but the handler is registered for "${event}". ` +
  18840. `Note that HTML attributes are case-insensitive and you cannot use ` +
  18841. `v-on to listen to camelCase events when using in-DOM templates. ` +
  18842. `You should probably use "${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(event)}" instead of "${event}".`);
  18843. }
  18844. }
  18845. let handlerName;
  18846. let handler = props[(handlerName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(event))] ||
  18847. // also try camelCase event handler (#2249)
  18848. props[(handlerName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(event)))];
  18849. // for v-model update:xxx events, also trigger kebab-case equivalent
  18850. // for props passed via kebab-case
  18851. if (!handler && isModelListener) {
  18852. handler = props[(handlerName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(event)))];
  18853. }
  18854. if (handler) {
  18855. callWithAsyncErrorHandling(handler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
  18856. }
  18857. const onceHandler = props[handlerName + `Once`];
  18858. if (onceHandler) {
  18859. if (!instance.emitted) {
  18860. instance.emitted = {};
  18861. }
  18862. else if (instance.emitted[handlerName]) {
  18863. return;
  18864. }
  18865. instance.emitted[handlerName] = true;
  18866. callWithAsyncErrorHandling(onceHandler, instance, 6 /* COMPONENT_EVENT_HANDLER */, args);
  18867. }
  18868. }
  18869. function normalizeEmitsOptions(comp, appContext, asMixin = false) {
  18870. const cache = appContext.emitsCache;
  18871. const cached = cache.get(comp);
  18872. if (cached !== undefined) {
  18873. return cached;
  18874. }
  18875. const raw = comp.emits;
  18876. let normalized = {};
  18877. // apply mixin/extends props
  18878. let hasExtends = false;
  18879. if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(comp)) {
  18880. const extendEmits = (raw) => {
  18881. const normalizedFromExtend = normalizeEmitsOptions(raw, appContext, true);
  18882. if (normalizedFromExtend) {
  18883. hasExtends = true;
  18884. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(normalized, normalizedFromExtend);
  18885. }
  18886. };
  18887. if (!asMixin && appContext.mixins.length) {
  18888. appContext.mixins.forEach(extendEmits);
  18889. }
  18890. if (comp.extends) {
  18891. extendEmits(comp.extends);
  18892. }
  18893. if (comp.mixins) {
  18894. comp.mixins.forEach(extendEmits);
  18895. }
  18896. }
  18897. if (!raw && !hasExtends) {
  18898. cache.set(comp, null);
  18899. return null;
  18900. }
  18901. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)) {
  18902. raw.forEach(key => (normalized[key] = null));
  18903. }
  18904. else {
  18905. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(normalized, raw);
  18906. }
  18907. cache.set(comp, normalized);
  18908. return normalized;
  18909. }
  18910. // Check if an incoming prop key is a declared emit event listener.
  18911. // e.g. With `emits: { click: null }`, props named `onClick` and `onclick` are
  18912. // both considered matched listeners.
  18913. function isEmitListener(options, key) {
  18914. if (!options || !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) {
  18915. return false;
  18916. }
  18917. key = key.slice(2).replace(/Once$/, '');
  18918. return ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(options, key[0].toLowerCase() + key.slice(1)) ||
  18919. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(options, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key)) ||
  18920. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(options, key));
  18921. }
  18922. /**
  18923. * mark the current rendering instance for asset resolution (e.g.
  18924. * resolveComponent, resolveDirective) during render
  18925. */
  18926. let currentRenderingInstance = null;
  18927. let currentScopeId = null;
  18928. /**
  18929. * Note: rendering calls maybe nested. The function returns the parent rendering
  18930. * instance if present, which should be restored after the render is done:
  18931. *
  18932. * ```js
  18933. * const prev = setCurrentRenderingInstance(i)
  18934. * // ...render
  18935. * setCurrentRenderingInstance(prev)
  18936. * ```
  18937. */
  18938. function setCurrentRenderingInstance(instance) {
  18939. const prev = currentRenderingInstance;
  18940. currentRenderingInstance = instance;
  18941. currentScopeId = (instance && instance.type.__scopeId) || null;
  18942. return prev;
  18943. }
  18944. /**
  18945. * Set scope id when creating hoisted vnodes.
  18946. * @private compiler helper
  18947. */
  18948. function pushScopeId(id) {
  18949. currentScopeId = id;
  18950. }
  18951. /**
  18952. * Technically we no longer need this after 3.0.8 but we need to keep the same
  18953. * API for backwards compat w/ code generated by compilers.
  18954. * @private
  18955. */
  18956. function popScopeId() {
  18957. currentScopeId = null;
  18958. }
  18959. /**
  18960. * Only for backwards compat
  18961. * @private
  18962. */
  18963. const withScopeId = (_id) => withCtx;
  18964. /**
  18965. * Wrap a slot function to memoize current rendering instance
  18966. * @private compiler helper
  18967. */
  18968. function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot // false only
  18969. ) {
  18970. if (!ctx)
  18971. return fn;
  18972. // already normalized
  18973. if (fn._n) {
  18974. return fn;
  18975. }
  18976. const renderFnWithContext = (...args) => {
  18977. // If a user calls a compiled slot inside a template expression (#1745), it
  18978. // can mess up block tracking, so by default we disable block tracking and
  18979. // force bail out when invoking a compiled slot (indicated by the ._d flag).
  18980. // This isn't necessary if rendering a compiled `<slot>`, so we flip the
  18981. // ._d flag off when invoking the wrapped fn inside `renderSlot`.
  18982. if (renderFnWithContext._d) {
  18983. setBlockTracking(-1);
  18984. }
  18985. const prevInstance = setCurrentRenderingInstance(ctx);
  18986. const res = fn(...args);
  18987. setCurrentRenderingInstance(prevInstance);
  18988. if (renderFnWithContext._d) {
  18989. setBlockTracking(1);
  18990. }
  18991. if (true) {
  18992. devtoolsComponentUpdated(ctx);
  18993. }
  18994. return res;
  18995. };
  18996. // mark normalized to avoid duplicated wrapping
  18997. renderFnWithContext._n = true;
  18998. // mark this as compiled by default
  18999. // this is used in vnode.ts -> normalizeChildren() to set the slot
  19000. // rendering flag.
  19001. renderFnWithContext._c = true;
  19002. // disable block tracking by default
  19003. renderFnWithContext._d = true;
  19004. return renderFnWithContext;
  19005. }
  19006. /**
  19007. * dev only flag to track whether $attrs was used during render.
  19008. * If $attrs was used during render then the warning for failed attrs
  19009. * fallthrough can be suppressed.
  19010. */
  19011. let accessedAttrs = false;
  19012. function markAttrsAccessed() {
  19013. accessedAttrs = true;
  19014. }
  19015. function renderComponentRoot(instance) {
  19016. const { type: Component, vnode, proxy, withProxy, props, propsOptions: [propsOptions], slots, attrs, emit, render, renderCache, data, setupState, ctx, inheritAttrs } = instance;
  19017. let result;
  19018. let fallthroughAttrs;
  19019. const prev = setCurrentRenderingInstance(instance);
  19020. if ((true)) {
  19021. accessedAttrs = false;
  19022. }
  19023. try {
  19024. if (vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */) {
  19025. // withProxy is a proxy with a different `has` trap only for
  19026. // runtime-compiled render functions using `with` block.
  19027. const proxyToUse = withProxy || proxy;
  19028. result = normalizeVNode(render.call(proxyToUse, proxyToUse, renderCache, props, setupState, data, ctx));
  19029. fallthroughAttrs = attrs;
  19030. }
  19031. else {
  19032. // functional
  19033. const render = Component;
  19034. // in dev, mark attrs accessed if optional props (attrs === props)
  19035. if (( true) && attrs === props) {
  19036. markAttrsAccessed();
  19037. }
  19038. result = normalizeVNode(render.length > 1
  19039. ? render(props, ( true)
  19040. ? {
  19041. get attrs() {
  19042. markAttrsAccessed();
  19043. return attrs;
  19044. },
  19045. slots,
  19046. emit
  19047. }
  19048. : 0)
  19049. : render(props, null /* we know it doesn't need it */));
  19050. fallthroughAttrs = Component.props
  19051. ? attrs
  19052. : getFunctionalFallthrough(attrs);
  19053. }
  19054. }
  19055. catch (err) {
  19056. blockStack.length = 0;
  19057. handleError(err, instance, 1 /* RENDER_FUNCTION */);
  19058. result = createVNode(Comment);
  19059. }
  19060. // attr merging
  19061. // in dev mode, comments are preserved, and it's possible for a template
  19062. // to have comments along side the root element which makes it a fragment
  19063. let root = result;
  19064. let setRoot = undefined;
  19065. if (( true) &&
  19066. result.patchFlag > 0 &&
  19067. result.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
  19068. [root, setRoot] = getChildRoot(result);
  19069. }
  19070. if (fallthroughAttrs && inheritAttrs !== false) {
  19071. const keys = Object.keys(fallthroughAttrs);
  19072. const { shapeFlag } = root;
  19073. if (keys.length) {
  19074. if (shapeFlag & (1 /* ELEMENT */ | 6 /* COMPONENT */)) {
  19075. if (propsOptions && keys.some(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isModelListener)) {
  19076. // If a v-model listener (onUpdate:xxx) has a corresponding declared
  19077. // prop, it indicates this component expects to handle v-model and
  19078. // it should not fallthrough.
  19079. // related: #1543, #1643, #1989
  19080. fallthroughAttrs = filterModelListeners(fallthroughAttrs, propsOptions);
  19081. }
  19082. root = cloneVNode(root, fallthroughAttrs);
  19083. }
  19084. else if (( true) && !accessedAttrs && root.type !== Comment) {
  19085. const allAttrs = Object.keys(attrs);
  19086. const eventAttrs = [];
  19087. const extraAttrs = [];
  19088. for (let i = 0, l = allAttrs.length; i < l; i++) {
  19089. const key = allAttrs[i];
  19090. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) {
  19091. // ignore v-model handlers when they fail to fallthrough
  19092. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isModelListener)(key)) {
  19093. // remove `on`, lowercase first letter to reflect event casing
  19094. // accurately
  19095. eventAttrs.push(key[2].toLowerCase() + key.slice(3));
  19096. }
  19097. }
  19098. else {
  19099. extraAttrs.push(key);
  19100. }
  19101. }
  19102. if (extraAttrs.length) {
  19103. warn(`Extraneous non-props attributes (` +
  19104. `${extraAttrs.join(', ')}) ` +
  19105. `were passed to component but could not be automatically inherited ` +
  19106. `because component renders fragment or text root nodes.`);
  19107. }
  19108. if (eventAttrs.length) {
  19109. warn(`Extraneous non-emits event listeners (` +
  19110. `${eventAttrs.join(', ')}) ` +
  19111. `were passed to component but could not be automatically inherited ` +
  19112. `because component renders fragment or text root nodes. ` +
  19113. `If the listener is intended to be a component custom event listener only, ` +
  19114. `declare it using the "emits" option.`);
  19115. }
  19116. }
  19117. }
  19118. }
  19119. // inherit directives
  19120. if (vnode.dirs) {
  19121. if (( true) && !isElementRoot(root)) {
  19122. warn(`Runtime directive used on component with non-element root node. ` +
  19123. `The directives will not function as intended.`);
  19124. }
  19125. root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
  19126. }
  19127. // inherit transition data
  19128. if (vnode.transition) {
  19129. if (( true) && !isElementRoot(root)) {
  19130. warn(`Component inside <Transition> renders non-element root node ` +
  19131. `that cannot be animated.`);
  19132. }
  19133. root.transition = vnode.transition;
  19134. }
  19135. if (( true) && setRoot) {
  19136. setRoot(root);
  19137. }
  19138. else {
  19139. result = root;
  19140. }
  19141. setCurrentRenderingInstance(prev);
  19142. return result;
  19143. }
  19144. /**
  19145. * dev only
  19146. * In dev mode, template root level comments are rendered, which turns the
  19147. * template into a fragment root, but we need to locate the single element
  19148. * root for attrs and scope id processing.
  19149. */
  19150. const getChildRoot = (vnode) => {
  19151. const rawChildren = vnode.children;
  19152. const dynamicChildren = vnode.dynamicChildren;
  19153. const childRoot = filterSingleRoot(rawChildren);
  19154. if (!childRoot) {
  19155. return [vnode, undefined];
  19156. }
  19157. const index = rawChildren.indexOf(childRoot);
  19158. const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1;
  19159. const setRoot = (updatedRoot) => {
  19160. rawChildren[index] = updatedRoot;
  19161. if (dynamicChildren) {
  19162. if (dynamicIndex > -1) {
  19163. dynamicChildren[dynamicIndex] = updatedRoot;
  19164. }
  19165. else if (updatedRoot.patchFlag > 0) {
  19166. vnode.dynamicChildren = [...dynamicChildren, updatedRoot];
  19167. }
  19168. }
  19169. };
  19170. return [normalizeVNode(childRoot), setRoot];
  19171. };
  19172. function filterSingleRoot(children) {
  19173. let singleRoot;
  19174. for (let i = 0; i < children.length; i++) {
  19175. const child = children[i];
  19176. if (isVNode(child)) {
  19177. // ignore user comment
  19178. if (child.type !== Comment || child.children === 'v-if') {
  19179. if (singleRoot) {
  19180. // has more than 1 non-comment child, return now
  19181. return;
  19182. }
  19183. else {
  19184. singleRoot = child;
  19185. }
  19186. }
  19187. }
  19188. else {
  19189. return;
  19190. }
  19191. }
  19192. return singleRoot;
  19193. }
  19194. const getFunctionalFallthrough = (attrs) => {
  19195. let res;
  19196. for (const key in attrs) {
  19197. if (key === 'class' || key === 'style' || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) {
  19198. (res || (res = {}))[key] = attrs[key];
  19199. }
  19200. }
  19201. return res;
  19202. };
  19203. const filterModelListeners = (attrs, props) => {
  19204. const res = {};
  19205. for (const key in attrs) {
  19206. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isModelListener)(key) || !(key.slice(9) in props)) {
  19207. res[key] = attrs[key];
  19208. }
  19209. }
  19210. return res;
  19211. };
  19212. const isElementRoot = (vnode) => {
  19213. return (vnode.shapeFlag & (6 /* COMPONENT */ | 1 /* ELEMENT */) ||
  19214. vnode.type === Comment // potential v-if branch switch
  19215. );
  19216. };
  19217. function shouldUpdateComponent(prevVNode, nextVNode, optimized) {
  19218. const { props: prevProps, children: prevChildren, component } = prevVNode;
  19219. const { props: nextProps, children: nextChildren, patchFlag } = nextVNode;
  19220. const emits = component.emitsOptions;
  19221. // Parent component's render function was hot-updated. Since this may have
  19222. // caused the child component's slots content to have changed, we need to
  19223. // force the child to update as well.
  19224. if (( true) && (prevChildren || nextChildren) && isHmrUpdating) {
  19225. return true;
  19226. }
  19227. // force child update for runtime directive or transition on component vnode.
  19228. if (nextVNode.dirs || nextVNode.transition) {
  19229. return true;
  19230. }
  19231. if (optimized && patchFlag >= 0) {
  19232. if (patchFlag & 1024 /* DYNAMIC_SLOTS */) {
  19233. // slot content that references values that might have changed,
  19234. // e.g. in a v-for
  19235. return true;
  19236. }
  19237. if (patchFlag & 16 /* FULL_PROPS */) {
  19238. if (!prevProps) {
  19239. return !!nextProps;
  19240. }
  19241. // presence of this flag indicates props are always non-null
  19242. return hasPropsChanged(prevProps, nextProps, emits);
  19243. }
  19244. else if (patchFlag & 8 /* PROPS */) {
  19245. const dynamicProps = nextVNode.dynamicProps;
  19246. for (let i = 0; i < dynamicProps.length; i++) {
  19247. const key = dynamicProps[i];
  19248. if (nextProps[key] !== prevProps[key] &&
  19249. !isEmitListener(emits, key)) {
  19250. return true;
  19251. }
  19252. }
  19253. }
  19254. }
  19255. else {
  19256. // this path is only taken by manually written render functions
  19257. // so presence of any children leads to a forced update
  19258. if (prevChildren || nextChildren) {
  19259. if (!nextChildren || !nextChildren.$stable) {
  19260. return true;
  19261. }
  19262. }
  19263. if (prevProps === nextProps) {
  19264. return false;
  19265. }
  19266. if (!prevProps) {
  19267. return !!nextProps;
  19268. }
  19269. if (!nextProps) {
  19270. return true;
  19271. }
  19272. return hasPropsChanged(prevProps, nextProps, emits);
  19273. }
  19274. return false;
  19275. }
  19276. function hasPropsChanged(prevProps, nextProps, emitsOptions) {
  19277. const nextKeys = Object.keys(nextProps);
  19278. if (nextKeys.length !== Object.keys(prevProps).length) {
  19279. return true;
  19280. }
  19281. for (let i = 0; i < nextKeys.length; i++) {
  19282. const key = nextKeys[i];
  19283. if (nextProps[key] !== prevProps[key] &&
  19284. !isEmitListener(emitsOptions, key)) {
  19285. return true;
  19286. }
  19287. }
  19288. return false;
  19289. }
  19290. function updateHOCHostEl({ vnode, parent }, el // HostNode
  19291. ) {
  19292. while (parent && parent.subTree === vnode) {
  19293. (vnode = parent.vnode).el = el;
  19294. parent = parent.parent;
  19295. }
  19296. }
  19297. const isSuspense = (type) => type.__isSuspense;
  19298. // Suspense exposes a component-like API, and is treated like a component
  19299. // in the compiler, but internally it's a special built-in type that hooks
  19300. // directly into the renderer.
  19301. const SuspenseImpl = {
  19302. name: 'Suspense',
  19303. // In order to make Suspense tree-shakable, we need to avoid importing it
  19304. // directly in the renderer. The renderer checks for the __isSuspense flag
  19305. // on a vnode's type and calls the `process` method, passing in renderer
  19306. // internals.
  19307. __isSuspense: true,
  19308. process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized,
  19309. // platform-specific impl passed from renderer
  19310. rendererInternals) {
  19311. if (n1 == null) {
  19312. mountSuspense(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals);
  19313. }
  19314. else {
  19315. patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, rendererInternals);
  19316. }
  19317. },
  19318. hydrate: hydrateSuspense,
  19319. create: createSuspenseBoundary,
  19320. normalize: normalizeSuspenseChildren
  19321. };
  19322. // Force-casted public typing for h and TSX props inference
  19323. const Suspense = (SuspenseImpl );
  19324. function triggerEvent(vnode, name) {
  19325. const eventListener = vnode.props && vnode.props[name];
  19326. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(eventListener)) {
  19327. eventListener();
  19328. }
  19329. }
  19330. function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
  19331. const { p: patch, o: { createElement } } = rendererInternals;
  19332. const hiddenContainer = createElement('div');
  19333. const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals));
  19334. // start mounting the content subtree in an off-dom container
  19335. patch(null, (suspense.pendingBranch = vnode.ssContent), hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds);
  19336. // now check if we have encountered any async deps
  19337. if (suspense.deps > 0) {
  19338. // has async
  19339. // invoke @fallback event
  19340. triggerEvent(vnode, 'onPending');
  19341. triggerEvent(vnode, 'onFallback');
  19342. // mount the fallback tree
  19343. patch(null, vnode.ssFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context
  19344. isSVG, slotScopeIds);
  19345. setActiveBranch(suspense, vnode.ssFallback);
  19346. }
  19347. else {
  19348. // Suspense has no async deps. Just resolve.
  19349. suspense.resolve();
  19350. }
  19351. }
  19352. function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
  19353. const suspense = (n2.suspense = n1.suspense);
  19354. suspense.vnode = n2;
  19355. n2.el = n1.el;
  19356. const newBranch = n2.ssContent;
  19357. const newFallback = n2.ssFallback;
  19358. const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense;
  19359. if (pendingBranch) {
  19360. suspense.pendingBranch = newBranch;
  19361. if (isSameVNodeType(newBranch, pendingBranch)) {
  19362. // same root type but content may have changed.
  19363. patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);
  19364. if (suspense.deps <= 0) {
  19365. suspense.resolve();
  19366. }
  19367. else if (isInFallback) {
  19368. patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context
  19369. isSVG, slotScopeIds, optimized);
  19370. setActiveBranch(suspense, newFallback);
  19371. }
  19372. }
  19373. else {
  19374. // toggled before pending tree is resolved
  19375. suspense.pendingId++;
  19376. if (isHydrating) {
  19377. // if toggled before hydration is finished, the current DOM tree is
  19378. // no longer valid. set it as the active branch so it will be unmounted
  19379. // when resolved
  19380. suspense.isHydrating = false;
  19381. suspense.activeBranch = pendingBranch;
  19382. }
  19383. else {
  19384. unmount(pendingBranch, parentComponent, suspense);
  19385. }
  19386. // increment pending ID. this is used to invalidate async callbacks
  19387. // reset suspense state
  19388. suspense.deps = 0;
  19389. // discard effects from pending branch
  19390. suspense.effects.length = 0;
  19391. // discard previous container
  19392. suspense.hiddenContainer = createElement('div');
  19393. if (isInFallback) {
  19394. // already in fallback state
  19395. patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);
  19396. if (suspense.deps <= 0) {
  19397. suspense.resolve();
  19398. }
  19399. else {
  19400. patch(activeBranch, newFallback, container, anchor, parentComponent, null, // fallback tree will not have suspense context
  19401. isSVG, slotScopeIds, optimized);
  19402. setActiveBranch(suspense, newFallback);
  19403. }
  19404. }
  19405. else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
  19406. // toggled "back" to current active branch
  19407. patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized);
  19408. // force resolve
  19409. suspense.resolve(true);
  19410. }
  19411. else {
  19412. // switched to a 3rd branch
  19413. patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);
  19414. if (suspense.deps <= 0) {
  19415. suspense.resolve();
  19416. }
  19417. }
  19418. }
  19419. }
  19420. else {
  19421. if (activeBranch && isSameVNodeType(newBranch, activeBranch)) {
  19422. // root did not change, just normal patch
  19423. patch(activeBranch, newBranch, container, anchor, parentComponent, suspense, isSVG, slotScopeIds, optimized);
  19424. setActiveBranch(suspense, newBranch);
  19425. }
  19426. else {
  19427. // root node toggled
  19428. // invoke @pending event
  19429. triggerEvent(n2, 'onPending');
  19430. // mount pending branch in off-dom container
  19431. suspense.pendingBranch = newBranch;
  19432. suspense.pendingId++;
  19433. patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, isSVG, slotScopeIds, optimized);
  19434. if (suspense.deps <= 0) {
  19435. // incoming branch has no async deps, resolve now.
  19436. suspense.resolve();
  19437. }
  19438. else {
  19439. const { timeout, pendingId } = suspense;
  19440. if (timeout > 0) {
  19441. setTimeout(() => {
  19442. if (suspense.pendingId === pendingId) {
  19443. suspense.fallback(newFallback);
  19444. }
  19445. }, timeout);
  19446. }
  19447. else if (timeout === 0) {
  19448. suspense.fallback(newFallback);
  19449. }
  19450. }
  19451. }
  19452. }
  19453. }
  19454. let hasWarned = false;
  19455. function createSuspenseBoundary(vnode, parent, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
  19456. /* istanbul ignore if */
  19457. if ( true && !hasWarned) {
  19458. hasWarned = true;
  19459. // @ts-ignore `console.info` cannot be null error
  19460. console[console.info ? 'info' : 'log'](`<Suspense> is an experimental feature and its API will likely change.`);
  19461. }
  19462. const { p: patch, m: move, um: unmount, n: next, o: { parentNode, remove } } = rendererInternals;
  19463. const timeout = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(vnode.props && vnode.props.timeout);
  19464. const suspense = {
  19465. vnode,
  19466. parent,
  19467. parentComponent,
  19468. isSVG,
  19469. container,
  19470. hiddenContainer,
  19471. anchor,
  19472. deps: 0,
  19473. pendingId: 0,
  19474. timeout: typeof timeout === 'number' ? timeout : -1,
  19475. activeBranch: null,
  19476. pendingBranch: null,
  19477. isInFallback: true,
  19478. isHydrating,
  19479. isUnmounted: false,
  19480. effects: [],
  19481. resolve(resume = false) {
  19482. if ((true)) {
  19483. if (!resume && !suspense.pendingBranch) {
  19484. throw new Error(`suspense.resolve() is called without a pending branch.`);
  19485. }
  19486. if (suspense.isUnmounted) {
  19487. throw new Error(`suspense.resolve() is called on an already unmounted suspense boundary.`);
  19488. }
  19489. }
  19490. const { vnode, activeBranch, pendingBranch, pendingId, effects, parentComponent, container } = suspense;
  19491. if (suspense.isHydrating) {
  19492. suspense.isHydrating = false;
  19493. }
  19494. else if (!resume) {
  19495. const delayEnter = activeBranch &&
  19496. pendingBranch.transition &&
  19497. pendingBranch.transition.mode === 'out-in';
  19498. if (delayEnter) {
  19499. activeBranch.transition.afterLeave = () => {
  19500. if (pendingId === suspense.pendingId) {
  19501. move(pendingBranch, container, anchor, 0 /* ENTER */);
  19502. }
  19503. };
  19504. }
  19505. // this is initial anchor on mount
  19506. let { anchor } = suspense;
  19507. // unmount current active tree
  19508. if (activeBranch) {
  19509. // if the fallback tree was mounted, it may have been moved
  19510. // as part of a parent suspense. get the latest anchor for insertion
  19511. anchor = next(activeBranch);
  19512. unmount(activeBranch, parentComponent, suspense, true);
  19513. }
  19514. if (!delayEnter) {
  19515. // move content from off-dom container to actual container
  19516. move(pendingBranch, container, anchor, 0 /* ENTER */);
  19517. }
  19518. }
  19519. setActiveBranch(suspense, pendingBranch);
  19520. suspense.pendingBranch = null;
  19521. suspense.isInFallback = false;
  19522. // flush buffered effects
  19523. // check if there is a pending parent suspense
  19524. let parent = suspense.parent;
  19525. let hasUnresolvedAncestor = false;
  19526. while (parent) {
  19527. if (parent.pendingBranch) {
  19528. // found a pending parent suspense, merge buffered post jobs
  19529. // into that parent
  19530. parent.effects.push(...effects);
  19531. hasUnresolvedAncestor = true;
  19532. break;
  19533. }
  19534. parent = parent.parent;
  19535. }
  19536. // no pending parent suspense, flush all jobs
  19537. if (!hasUnresolvedAncestor) {
  19538. queuePostFlushCb(effects);
  19539. }
  19540. suspense.effects = [];
  19541. // invoke @resolve event
  19542. triggerEvent(vnode, 'onResolve');
  19543. },
  19544. fallback(fallbackVNode) {
  19545. if (!suspense.pendingBranch) {
  19546. return;
  19547. }
  19548. const { vnode, activeBranch, parentComponent, container, isSVG } = suspense;
  19549. // invoke @fallback event
  19550. triggerEvent(vnode, 'onFallback');
  19551. const anchor = next(activeBranch);
  19552. const mountFallback = () => {
  19553. if (!suspense.isInFallback) {
  19554. return;
  19555. }
  19556. // mount the fallback tree
  19557. patch(null, fallbackVNode, container, anchor, parentComponent, null, // fallback tree will not have suspense context
  19558. isSVG, slotScopeIds, optimized);
  19559. setActiveBranch(suspense, fallbackVNode);
  19560. };
  19561. const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === 'out-in';
  19562. if (delayEnter) {
  19563. activeBranch.transition.afterLeave = mountFallback;
  19564. }
  19565. suspense.isInFallback = true;
  19566. // unmount current active branch
  19567. unmount(activeBranch, parentComponent, null, // no suspense so unmount hooks fire now
  19568. true // shouldRemove
  19569. );
  19570. if (!delayEnter) {
  19571. mountFallback();
  19572. }
  19573. },
  19574. move(container, anchor, type) {
  19575. suspense.activeBranch &&
  19576. move(suspense.activeBranch, container, anchor, type);
  19577. suspense.container = container;
  19578. },
  19579. next() {
  19580. return suspense.activeBranch && next(suspense.activeBranch);
  19581. },
  19582. registerDep(instance, setupRenderEffect) {
  19583. const isInPendingSuspense = !!suspense.pendingBranch;
  19584. if (isInPendingSuspense) {
  19585. suspense.deps++;
  19586. }
  19587. const hydratedEl = instance.vnode.el;
  19588. instance
  19589. .asyncDep.catch(err => {
  19590. handleError(err, instance, 0 /* SETUP_FUNCTION */);
  19591. })
  19592. .then(asyncSetupResult => {
  19593. // retry when the setup() promise resolves.
  19594. // component may have been unmounted before resolve.
  19595. if (instance.isUnmounted ||
  19596. suspense.isUnmounted ||
  19597. suspense.pendingId !== instance.suspenseId) {
  19598. return;
  19599. }
  19600. // retry from this component
  19601. instance.asyncResolved = true;
  19602. const { vnode } = instance;
  19603. if ((true)) {
  19604. pushWarningContext(vnode);
  19605. }
  19606. handleSetupResult(instance, asyncSetupResult, false);
  19607. if (hydratedEl) {
  19608. // vnode may have been replaced if an update happened before the
  19609. // async dep is resolved.
  19610. vnode.el = hydratedEl;
  19611. }
  19612. const placeholder = !hydratedEl && instance.subTree.el;
  19613. setupRenderEffect(instance, vnode,
  19614. // component may have been moved before resolve.
  19615. // if this is not a hydration, instance.subTree will be the comment
  19616. // placeholder.
  19617. parentNode(hydratedEl || instance.subTree.el),
  19618. // anchor will not be used if this is hydration, so only need to
  19619. // consider the comment placeholder case.
  19620. hydratedEl ? null : next(instance.subTree), suspense, isSVG, optimized);
  19621. if (placeholder) {
  19622. remove(placeholder);
  19623. }
  19624. updateHOCHostEl(instance, vnode.el);
  19625. if ((true)) {
  19626. popWarningContext();
  19627. }
  19628. // only decrease deps count if suspense is not already resolved
  19629. if (isInPendingSuspense && --suspense.deps === 0) {
  19630. suspense.resolve();
  19631. }
  19632. });
  19633. },
  19634. unmount(parentSuspense, doRemove) {
  19635. suspense.isUnmounted = true;
  19636. if (suspense.activeBranch) {
  19637. unmount(suspense.activeBranch, parentComponent, parentSuspense, doRemove);
  19638. }
  19639. if (suspense.pendingBranch) {
  19640. unmount(suspense.pendingBranch, parentComponent, parentSuspense, doRemove);
  19641. }
  19642. }
  19643. };
  19644. return suspense;
  19645. }
  19646. function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {
  19647. /* eslint-disable no-restricted-globals */
  19648. const suspense = (vnode.suspense = createSuspenseBoundary(vnode, parentSuspense, parentComponent, node.parentNode, document.createElement('div'), null, isSVG, slotScopeIds, optimized, rendererInternals, true /* hydrating */));
  19649. // there are two possible scenarios for server-rendered suspense:
  19650. // - success: ssr content should be fully resolved
  19651. // - failure: ssr content should be the fallback branch.
  19652. // however, on the client we don't really know if it has failed or not
  19653. // attempt to hydrate the DOM assuming it has succeeded, but we still
  19654. // need to construct a suspense boundary first
  19655. const result = hydrateNode(node, (suspense.pendingBranch = vnode.ssContent), parentComponent, suspense, slotScopeIds, optimized);
  19656. if (suspense.deps === 0) {
  19657. suspense.resolve();
  19658. }
  19659. return result;
  19660. /* eslint-enable no-restricted-globals */
  19661. }
  19662. function normalizeSuspenseChildren(vnode) {
  19663. const { shapeFlag, children } = vnode;
  19664. const isSlotChildren = shapeFlag & 32 /* SLOTS_CHILDREN */;
  19665. vnode.ssContent = normalizeSuspenseSlot(isSlotChildren ? children.default : children);
  19666. vnode.ssFallback = isSlotChildren
  19667. ? normalizeSuspenseSlot(children.fallback)
  19668. : createVNode(Comment);
  19669. }
  19670. function normalizeSuspenseSlot(s) {
  19671. let block;
  19672. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(s)) {
  19673. const trackBlock = isBlockTreeEnabled && s._c;
  19674. if (trackBlock) {
  19675. // disableTracking: false
  19676. // allow block tracking for compiled slots
  19677. // (see ./componentRenderContext.ts)
  19678. s._d = false;
  19679. openBlock();
  19680. }
  19681. s = s();
  19682. if (trackBlock) {
  19683. s._d = true;
  19684. block = currentBlock;
  19685. closeBlock();
  19686. }
  19687. }
  19688. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(s)) {
  19689. const singleChild = filterSingleRoot(s);
  19690. if (( true) && !singleChild) {
  19691. warn(`<Suspense> slots expect a single root node.`);
  19692. }
  19693. s = singleChild;
  19694. }
  19695. s = normalizeVNode(s);
  19696. if (block && !s.dynamicChildren) {
  19697. s.dynamicChildren = block.filter(c => c !== s);
  19698. }
  19699. return s;
  19700. }
  19701. function queueEffectWithSuspense(fn, suspense) {
  19702. if (suspense && suspense.pendingBranch) {
  19703. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(fn)) {
  19704. suspense.effects.push(...fn);
  19705. }
  19706. else {
  19707. suspense.effects.push(fn);
  19708. }
  19709. }
  19710. else {
  19711. queuePostFlushCb(fn);
  19712. }
  19713. }
  19714. function setActiveBranch(suspense, branch) {
  19715. suspense.activeBranch = branch;
  19716. const { vnode, parentComponent } = suspense;
  19717. const el = (vnode.el = branch.el);
  19718. // in case suspense is the root node of a component,
  19719. // recursively update the HOC el
  19720. if (parentComponent && parentComponent.subTree === vnode) {
  19721. parentComponent.vnode.el = el;
  19722. updateHOCHostEl(parentComponent, el);
  19723. }
  19724. }
  19725. function provide(key, value) {
  19726. if (!currentInstance) {
  19727. if ((true)) {
  19728. warn(`provide() can only be used inside setup().`);
  19729. }
  19730. }
  19731. else {
  19732. let provides = currentInstance.provides;
  19733. // by default an instance inherits its parent's provides object
  19734. // but when it needs to provide values of its own, it creates its
  19735. // own provides object using parent provides object as prototype.
  19736. // this way in `inject` we can simply look up injections from direct
  19737. // parent and let the prototype chain do the work.
  19738. const parentProvides = currentInstance.parent && currentInstance.parent.provides;
  19739. if (parentProvides === provides) {
  19740. provides = currentInstance.provides = Object.create(parentProvides);
  19741. }
  19742. // TS doesn't allow symbol as index type
  19743. provides[key] = value;
  19744. }
  19745. }
  19746. function inject(key, defaultValue, treatDefaultAsFactory = false) {
  19747. // fallback to `currentRenderingInstance` so that this can be called in
  19748. // a functional component
  19749. const instance = currentInstance || currentRenderingInstance;
  19750. if (instance) {
  19751. // #2400
  19752. // to support `app.use` plugins,
  19753. // fallback to appContext's `provides` if the instance is at root
  19754. const provides = instance.parent == null
  19755. ? instance.vnode.appContext && instance.vnode.appContext.provides
  19756. : instance.parent.provides;
  19757. if (provides && key in provides) {
  19758. // TS doesn't allow symbol as index type
  19759. return provides[key];
  19760. }
  19761. else if (arguments.length > 1) {
  19762. return treatDefaultAsFactory && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(defaultValue)
  19763. ? defaultValue.call(instance.proxy)
  19764. : defaultValue;
  19765. }
  19766. else if ((true)) {
  19767. warn(`injection "${String(key)}" not found.`);
  19768. }
  19769. }
  19770. else if ((true)) {
  19771. warn(`inject() can only be used inside setup() or functional components.`);
  19772. }
  19773. }
  19774. // Simple effect.
  19775. function watchEffect(effect, options) {
  19776. return doWatch(effect, null, options);
  19777. }
  19778. function watchPostEffect(effect, options) {
  19779. return doWatch(effect, null, (( true)
  19780. ? Object.assign(options || {}, { flush: 'post' })
  19781. : 0));
  19782. }
  19783. function watchSyncEffect(effect, options) {
  19784. return doWatch(effect, null, (( true)
  19785. ? Object.assign(options || {}, { flush: 'sync' })
  19786. : 0));
  19787. }
  19788. // initial value for watchers to trigger on undefined initial values
  19789. const INITIAL_WATCHER_VALUE = {};
  19790. // implementation
  19791. function watch(source, cb, options) {
  19792. if (( true) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(cb)) {
  19793. warn(`\`watch(fn, options?)\` signature has been moved to a separate API. ` +
  19794. `Use \`watchEffect(fn, options?)\` instead. \`watch\` now only ` +
  19795. `supports \`watch(source, cb, options?) signature.`);
  19796. }
  19797. return doWatch(source, cb, options);
  19798. }
  19799. function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) {
  19800. if (( true) && !cb) {
  19801. if (immediate !== undefined) {
  19802. warn(`watch() "immediate" option is only respected when using the ` +
  19803. `watch(source, callback, options?) signature.`);
  19804. }
  19805. if (deep !== undefined) {
  19806. warn(`watch() "deep" option is only respected when using the ` +
  19807. `watch(source, callback, options?) signature.`);
  19808. }
  19809. }
  19810. const warnInvalidSource = (s) => {
  19811. warn(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, ` +
  19812. `a reactive object, or an array of these types.`);
  19813. };
  19814. const instance = currentInstance;
  19815. let getter;
  19816. let forceTrigger = false;
  19817. let isMultiSource = false;
  19818. if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(source)) {
  19819. getter = () => source.value;
  19820. forceTrigger = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isShallow)(source);
  19821. }
  19822. else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive)(source)) {
  19823. getter = () => source;
  19824. deep = true;
  19825. }
  19826. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(source)) {
  19827. isMultiSource = true;
  19828. forceTrigger = source.some(_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive);
  19829. getter = () => source.map(s => {
  19830. if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(s)) {
  19831. return s.value;
  19832. }
  19833. else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive)(s)) {
  19834. return traverse(s);
  19835. }
  19836. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(s)) {
  19837. return callWithErrorHandling(s, instance, 2 /* WATCH_GETTER */);
  19838. }
  19839. else {
  19840. ( true) && warnInvalidSource(s);
  19841. }
  19842. });
  19843. }
  19844. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(source)) {
  19845. if (cb) {
  19846. // getter with cb
  19847. getter = () => callWithErrorHandling(source, instance, 2 /* WATCH_GETTER */);
  19848. }
  19849. else {
  19850. // no cb -> simple effect
  19851. getter = () => {
  19852. if (instance && instance.isUnmounted) {
  19853. return;
  19854. }
  19855. if (cleanup) {
  19856. cleanup();
  19857. }
  19858. return callWithAsyncErrorHandling(source, instance, 3 /* WATCH_CALLBACK */, [onCleanup]);
  19859. };
  19860. }
  19861. }
  19862. else {
  19863. getter = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP;
  19864. ( true) && warnInvalidSource(source);
  19865. }
  19866. if (cb && deep) {
  19867. const baseGetter = getter;
  19868. getter = () => traverse(baseGetter());
  19869. }
  19870. let cleanup;
  19871. let onCleanup = (fn) => {
  19872. cleanup = effect.onStop = () => {
  19873. callWithErrorHandling(fn, instance, 4 /* WATCH_CLEANUP */);
  19874. };
  19875. };
  19876. // in SSR there is no need to setup an actual effect, and it should be noop
  19877. // unless it's eager
  19878. if (isInSSRComponentSetup) {
  19879. // we will also not call the invalidate callback (+ runner is not set up)
  19880. onCleanup = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP;
  19881. if (!cb) {
  19882. getter();
  19883. }
  19884. else if (immediate) {
  19885. callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [
  19886. getter(),
  19887. isMultiSource ? [] : undefined,
  19888. onCleanup
  19889. ]);
  19890. }
  19891. return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP;
  19892. }
  19893. let oldValue = isMultiSource ? [] : INITIAL_WATCHER_VALUE;
  19894. const job = () => {
  19895. if (!effect.active) {
  19896. return;
  19897. }
  19898. if (cb) {
  19899. // watch(source, cb)
  19900. const newValue = effect.run();
  19901. if (deep ||
  19902. forceTrigger ||
  19903. (isMultiSource
  19904. ? newValue.some((v, i) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(v, oldValue[i]))
  19905. : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasChanged)(newValue, oldValue)) ||
  19906. (false )) {
  19907. // cleanup before running cb again
  19908. if (cleanup) {
  19909. cleanup();
  19910. }
  19911. callWithAsyncErrorHandling(cb, instance, 3 /* WATCH_CALLBACK */, [
  19912. newValue,
  19913. // pass undefined as the old value when it's changed for the first time
  19914. oldValue === INITIAL_WATCHER_VALUE ? undefined : oldValue,
  19915. onCleanup
  19916. ]);
  19917. oldValue = newValue;
  19918. }
  19919. }
  19920. else {
  19921. // watchEffect
  19922. effect.run();
  19923. }
  19924. };
  19925. // important: mark the job as a watcher callback so that scheduler knows
  19926. // it is allowed to self-trigger (#1727)
  19927. job.allowRecurse = !!cb;
  19928. let scheduler;
  19929. if (flush === 'sync') {
  19930. scheduler = job; // the scheduler function gets called directly
  19931. }
  19932. else if (flush === 'post') {
  19933. scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
  19934. }
  19935. else {
  19936. // default: 'pre'
  19937. scheduler = () => {
  19938. if (!instance || instance.isMounted) {
  19939. queuePreFlushCb(job);
  19940. }
  19941. else {
  19942. // with 'pre' option, the first call must happen before
  19943. // the component is mounted so it is called synchronously.
  19944. job();
  19945. }
  19946. };
  19947. }
  19948. const effect = new _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect(getter, scheduler);
  19949. if ((true)) {
  19950. effect.onTrack = onTrack;
  19951. effect.onTrigger = onTrigger;
  19952. }
  19953. // initial run
  19954. if (cb) {
  19955. if (immediate) {
  19956. job();
  19957. }
  19958. else {
  19959. oldValue = effect.run();
  19960. }
  19961. }
  19962. else if (flush === 'post') {
  19963. queuePostRenderEffect(effect.run.bind(effect), instance && instance.suspense);
  19964. }
  19965. else {
  19966. effect.run();
  19967. }
  19968. return () => {
  19969. effect.stop();
  19970. if (instance && instance.scope) {
  19971. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.remove)(instance.scope.effects, effect);
  19972. }
  19973. };
  19974. }
  19975. // this.$watch
  19976. function instanceWatch(source, value, options) {
  19977. const publicThis = this.proxy;
  19978. const getter = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(source)
  19979. ? source.includes('.')
  19980. ? createPathGetter(publicThis, source)
  19981. : () => publicThis[source]
  19982. : source.bind(publicThis, publicThis);
  19983. let cb;
  19984. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value)) {
  19985. cb = value;
  19986. }
  19987. else {
  19988. cb = value.handler;
  19989. options = value;
  19990. }
  19991. const cur = currentInstance;
  19992. setCurrentInstance(this);
  19993. const res = doWatch(getter, cb.bind(publicThis), options);
  19994. if (cur) {
  19995. setCurrentInstance(cur);
  19996. }
  19997. else {
  19998. unsetCurrentInstance();
  19999. }
  20000. return res;
  20001. }
  20002. function createPathGetter(ctx, path) {
  20003. const segments = path.split('.');
  20004. return () => {
  20005. let cur = ctx;
  20006. for (let i = 0; i < segments.length && cur; i++) {
  20007. cur = cur[segments[i]];
  20008. }
  20009. return cur;
  20010. };
  20011. }
  20012. function traverse(value, seen) {
  20013. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(value) || value["__v_skip" /* SKIP */]) {
  20014. return value;
  20015. }
  20016. seen = seen || new Set();
  20017. if (seen.has(value)) {
  20018. return value;
  20019. }
  20020. seen.add(value);
  20021. if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(value)) {
  20022. traverse(value.value, seen);
  20023. }
  20024. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) {
  20025. for (let i = 0; i < value.length; i++) {
  20026. traverse(value[i], seen);
  20027. }
  20028. }
  20029. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isMap)(value)) {
  20030. value.forEach((v) => {
  20031. traverse(v, seen);
  20032. });
  20033. }
  20034. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(value)) {
  20035. for (const key in value) {
  20036. traverse(value[key], seen);
  20037. }
  20038. }
  20039. return value;
  20040. }
  20041. function useTransitionState() {
  20042. const state = {
  20043. isMounted: false,
  20044. isLeaving: false,
  20045. isUnmounting: false,
  20046. leavingVNodes: new Map()
  20047. };
  20048. onMounted(() => {
  20049. state.isMounted = true;
  20050. });
  20051. onBeforeUnmount(() => {
  20052. state.isUnmounting = true;
  20053. });
  20054. return state;
  20055. }
  20056. const TransitionHookValidator = [Function, Array];
  20057. const BaseTransitionImpl = {
  20058. name: `BaseTransition`,
  20059. props: {
  20060. mode: String,
  20061. appear: Boolean,
  20062. persisted: Boolean,
  20063. // enter
  20064. onBeforeEnter: TransitionHookValidator,
  20065. onEnter: TransitionHookValidator,
  20066. onAfterEnter: TransitionHookValidator,
  20067. onEnterCancelled: TransitionHookValidator,
  20068. // leave
  20069. onBeforeLeave: TransitionHookValidator,
  20070. onLeave: TransitionHookValidator,
  20071. onAfterLeave: TransitionHookValidator,
  20072. onLeaveCancelled: TransitionHookValidator,
  20073. // appear
  20074. onBeforeAppear: TransitionHookValidator,
  20075. onAppear: TransitionHookValidator,
  20076. onAfterAppear: TransitionHookValidator,
  20077. onAppearCancelled: TransitionHookValidator
  20078. },
  20079. setup(props, { slots }) {
  20080. const instance = getCurrentInstance();
  20081. const state = useTransitionState();
  20082. let prevTransitionKey;
  20083. return () => {
  20084. const children = slots.default && getTransitionRawChildren(slots.default(), true);
  20085. if (!children || !children.length) {
  20086. return;
  20087. }
  20088. // warn multiple elements
  20089. if (( true) && children.length > 1) {
  20090. warn('<transition> can only be used on a single element or component. Use ' +
  20091. '<transition-group> for lists.');
  20092. }
  20093. // there's no need to track reactivity for these props so use the raw
  20094. // props for a bit better perf
  20095. const rawProps = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(props);
  20096. const { mode } = rawProps;
  20097. // check mode
  20098. if (( true) &&
  20099. mode &&
  20100. mode !== 'in-out' && mode !== 'out-in' && mode !== 'default') {
  20101. warn(`invalid <transition> mode: ${mode}`);
  20102. }
  20103. // at this point children has a guaranteed length of 1.
  20104. const child = children[0];
  20105. if (state.isLeaving) {
  20106. return emptyPlaceholder(child);
  20107. }
  20108. // in the case of <transition><keep-alive/></transition>, we need to
  20109. // compare the type of the kept-alive children.
  20110. const innerChild = getKeepAliveChild(child);
  20111. if (!innerChild) {
  20112. return emptyPlaceholder(child);
  20113. }
  20114. const enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance);
  20115. setTransitionHooks(innerChild, enterHooks);
  20116. const oldChild = instance.subTree;
  20117. const oldInnerChild = oldChild && getKeepAliveChild(oldChild);
  20118. let transitionKeyChanged = false;
  20119. const { getTransitionKey } = innerChild.type;
  20120. if (getTransitionKey) {
  20121. const key = getTransitionKey();
  20122. if (prevTransitionKey === undefined) {
  20123. prevTransitionKey = key;
  20124. }
  20125. else if (key !== prevTransitionKey) {
  20126. prevTransitionKey = key;
  20127. transitionKeyChanged = true;
  20128. }
  20129. }
  20130. // handle mode
  20131. if (oldInnerChild &&
  20132. oldInnerChild.type !== Comment &&
  20133. (!isSameVNodeType(innerChild, oldInnerChild) || transitionKeyChanged)) {
  20134. const leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);
  20135. // update old tree's hooks in case of dynamic transition
  20136. setTransitionHooks(oldInnerChild, leavingHooks);
  20137. // switching between different views
  20138. if (mode === 'out-in') {
  20139. state.isLeaving = true;
  20140. // return placeholder node and queue update when leave finishes
  20141. leavingHooks.afterLeave = () => {
  20142. state.isLeaving = false;
  20143. instance.update();
  20144. };
  20145. return emptyPlaceholder(child);
  20146. }
  20147. else if (mode === 'in-out' && innerChild.type !== Comment) {
  20148. leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
  20149. const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);
  20150. leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
  20151. // early removal callback
  20152. el._leaveCb = () => {
  20153. earlyRemove();
  20154. el._leaveCb = undefined;
  20155. delete enterHooks.delayedLeave;
  20156. };
  20157. enterHooks.delayedLeave = delayedLeave;
  20158. };
  20159. }
  20160. }
  20161. return child;
  20162. };
  20163. }
  20164. };
  20165. // export the public type for h/tsx inference
  20166. // also to avoid inline import() in generated d.ts files
  20167. const BaseTransition = BaseTransitionImpl;
  20168. function getLeavingNodesForType(state, vnode) {
  20169. const { leavingVNodes } = state;
  20170. let leavingVNodesCache = leavingVNodes.get(vnode.type);
  20171. if (!leavingVNodesCache) {
  20172. leavingVNodesCache = Object.create(null);
  20173. leavingVNodes.set(vnode.type, leavingVNodesCache);
  20174. }
  20175. return leavingVNodesCache;
  20176. }
  20177. // The transition hooks are attached to the vnode as vnode.transition
  20178. // and will be called at appropriate timing in the renderer.
  20179. function resolveTransitionHooks(vnode, props, state, instance) {
  20180. const { appear, mode, persisted = false, onBeforeEnter, onEnter, onAfterEnter, onEnterCancelled, onBeforeLeave, onLeave, onAfterLeave, onLeaveCancelled, onBeforeAppear, onAppear, onAfterAppear, onAppearCancelled } = props;
  20181. const key = String(vnode.key);
  20182. const leavingVNodesCache = getLeavingNodesForType(state, vnode);
  20183. const callHook = (hook, args) => {
  20184. hook &&
  20185. callWithAsyncErrorHandling(hook, instance, 9 /* TRANSITION_HOOK */, args);
  20186. };
  20187. const hooks = {
  20188. mode,
  20189. persisted,
  20190. beforeEnter(el) {
  20191. let hook = onBeforeEnter;
  20192. if (!state.isMounted) {
  20193. if (appear) {
  20194. hook = onBeforeAppear || onBeforeEnter;
  20195. }
  20196. else {
  20197. return;
  20198. }
  20199. }
  20200. // for same element (v-show)
  20201. if (el._leaveCb) {
  20202. el._leaveCb(true /* cancelled */);
  20203. }
  20204. // for toggled element with same key (v-if)
  20205. const leavingVNode = leavingVNodesCache[key];
  20206. if (leavingVNode &&
  20207. isSameVNodeType(vnode, leavingVNode) &&
  20208. leavingVNode.el._leaveCb) {
  20209. // force early removal (not cancelled)
  20210. leavingVNode.el._leaveCb();
  20211. }
  20212. callHook(hook, [el]);
  20213. },
  20214. enter(el) {
  20215. let hook = onEnter;
  20216. let afterHook = onAfterEnter;
  20217. let cancelHook = onEnterCancelled;
  20218. if (!state.isMounted) {
  20219. if (appear) {
  20220. hook = onAppear || onEnter;
  20221. afterHook = onAfterAppear || onAfterEnter;
  20222. cancelHook = onAppearCancelled || onEnterCancelled;
  20223. }
  20224. else {
  20225. return;
  20226. }
  20227. }
  20228. let called = false;
  20229. const done = (el._enterCb = (cancelled) => {
  20230. if (called)
  20231. return;
  20232. called = true;
  20233. if (cancelled) {
  20234. callHook(cancelHook, [el]);
  20235. }
  20236. else {
  20237. callHook(afterHook, [el]);
  20238. }
  20239. if (hooks.delayedLeave) {
  20240. hooks.delayedLeave();
  20241. }
  20242. el._enterCb = undefined;
  20243. });
  20244. if (hook) {
  20245. hook(el, done);
  20246. if (hook.length <= 1) {
  20247. done();
  20248. }
  20249. }
  20250. else {
  20251. done();
  20252. }
  20253. },
  20254. leave(el, remove) {
  20255. const key = String(vnode.key);
  20256. if (el._enterCb) {
  20257. el._enterCb(true /* cancelled */);
  20258. }
  20259. if (state.isUnmounting) {
  20260. return remove();
  20261. }
  20262. callHook(onBeforeLeave, [el]);
  20263. let called = false;
  20264. const done = (el._leaveCb = (cancelled) => {
  20265. if (called)
  20266. return;
  20267. called = true;
  20268. remove();
  20269. if (cancelled) {
  20270. callHook(onLeaveCancelled, [el]);
  20271. }
  20272. else {
  20273. callHook(onAfterLeave, [el]);
  20274. }
  20275. el._leaveCb = undefined;
  20276. if (leavingVNodesCache[key] === vnode) {
  20277. delete leavingVNodesCache[key];
  20278. }
  20279. });
  20280. leavingVNodesCache[key] = vnode;
  20281. if (onLeave) {
  20282. onLeave(el, done);
  20283. if (onLeave.length <= 1) {
  20284. done();
  20285. }
  20286. }
  20287. else {
  20288. done();
  20289. }
  20290. },
  20291. clone(vnode) {
  20292. return resolveTransitionHooks(vnode, props, state, instance);
  20293. }
  20294. };
  20295. return hooks;
  20296. }
  20297. // the placeholder really only handles one special case: KeepAlive
  20298. // in the case of a KeepAlive in a leave phase we need to return a KeepAlive
  20299. // placeholder with empty content to avoid the KeepAlive instance from being
  20300. // unmounted.
  20301. function emptyPlaceholder(vnode) {
  20302. if (isKeepAlive(vnode)) {
  20303. vnode = cloneVNode(vnode);
  20304. vnode.children = null;
  20305. return vnode;
  20306. }
  20307. }
  20308. function getKeepAliveChild(vnode) {
  20309. return isKeepAlive(vnode)
  20310. ? vnode.children
  20311. ? vnode.children[0]
  20312. : undefined
  20313. : vnode;
  20314. }
  20315. function setTransitionHooks(vnode, hooks) {
  20316. if (vnode.shapeFlag & 6 /* COMPONENT */ && vnode.component) {
  20317. setTransitionHooks(vnode.component.subTree, hooks);
  20318. }
  20319. else if (vnode.shapeFlag & 128 /* SUSPENSE */) {
  20320. vnode.ssContent.transition = hooks.clone(vnode.ssContent);
  20321. vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
  20322. }
  20323. else {
  20324. vnode.transition = hooks;
  20325. }
  20326. }
  20327. function getTransitionRawChildren(children, keepComment = false) {
  20328. let ret = [];
  20329. let keyedFragmentCount = 0;
  20330. for (let i = 0; i < children.length; i++) {
  20331. const child = children[i];
  20332. // handle fragment children case, e.g. v-for
  20333. if (child.type === Fragment) {
  20334. if (child.patchFlag & 128 /* KEYED_FRAGMENT */)
  20335. keyedFragmentCount++;
  20336. ret = ret.concat(getTransitionRawChildren(child.children, keepComment));
  20337. }
  20338. // comment placeholders should be skipped, e.g. v-if
  20339. else if (keepComment || child.type !== Comment) {
  20340. ret.push(child);
  20341. }
  20342. }
  20343. // #1126 if a transition children list contains multiple sub fragments, these
  20344. // fragments will be merged into a flat children array. Since each v-for
  20345. // fragment may contain different static bindings inside, we need to de-op
  20346. // these children to force full diffs to ensure correct behavior.
  20347. if (keyedFragmentCount > 1) {
  20348. for (let i = 0; i < ret.length; i++) {
  20349. ret[i].patchFlag = -2 /* BAIL */;
  20350. }
  20351. }
  20352. return ret;
  20353. }
  20354. // implementation, close to no-op
  20355. function defineComponent(options) {
  20356. return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(options) ? { setup: options, name: options.name } : options;
  20357. }
  20358. const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
  20359. function defineAsyncComponent(source) {
  20360. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(source)) {
  20361. source = { loader: source };
  20362. }
  20363. const { loader, loadingComponent, errorComponent, delay = 200, timeout, // undefined = never times out
  20364. suspensible = true, onError: userOnError } = source;
  20365. let pendingRequest = null;
  20366. let resolvedComp;
  20367. let retries = 0;
  20368. const retry = () => {
  20369. retries++;
  20370. pendingRequest = null;
  20371. return load();
  20372. };
  20373. const load = () => {
  20374. let thisRequest;
  20375. return (pendingRequest ||
  20376. (thisRequest = pendingRequest =
  20377. loader()
  20378. .catch(err => {
  20379. err = err instanceof Error ? err : new Error(String(err));
  20380. if (userOnError) {
  20381. return new Promise((resolve, reject) => {
  20382. const userRetry = () => resolve(retry());
  20383. const userFail = () => reject(err);
  20384. userOnError(err, userRetry, userFail, retries + 1);
  20385. });
  20386. }
  20387. else {
  20388. throw err;
  20389. }
  20390. })
  20391. .then((comp) => {
  20392. if (thisRequest !== pendingRequest && pendingRequest) {
  20393. return pendingRequest;
  20394. }
  20395. if (( true) && !comp) {
  20396. warn(`Async component loader resolved to undefined. ` +
  20397. `If you are using retry(), make sure to return its return value.`);
  20398. }
  20399. // interop module default
  20400. if (comp &&
  20401. (comp.__esModule || comp[Symbol.toStringTag] === 'Module')) {
  20402. comp = comp.default;
  20403. }
  20404. if (( true) && comp && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(comp) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(comp)) {
  20405. throw new Error(`Invalid async component load result: ${comp}`);
  20406. }
  20407. resolvedComp = comp;
  20408. return comp;
  20409. })));
  20410. };
  20411. return defineComponent({
  20412. name: 'AsyncComponentWrapper',
  20413. __asyncLoader: load,
  20414. get __asyncResolved() {
  20415. return resolvedComp;
  20416. },
  20417. setup() {
  20418. const instance = currentInstance;
  20419. // already resolved
  20420. if (resolvedComp) {
  20421. return () => createInnerComp(resolvedComp, instance);
  20422. }
  20423. const onError = (err) => {
  20424. pendingRequest = null;
  20425. handleError(err, instance, 13 /* ASYNC_COMPONENT_LOADER */, !errorComponent /* do not throw in dev if user provided error component */);
  20426. };
  20427. // suspense-controlled or SSR.
  20428. if ((suspensible && instance.suspense) ||
  20429. (isInSSRComponentSetup)) {
  20430. return load()
  20431. .then(comp => {
  20432. return () => createInnerComp(comp, instance);
  20433. })
  20434. .catch(err => {
  20435. onError(err);
  20436. return () => errorComponent
  20437. ? createVNode(errorComponent, {
  20438. error: err
  20439. })
  20440. : null;
  20441. });
  20442. }
  20443. const loaded = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)(false);
  20444. const error = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)();
  20445. const delayed = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ref)(!!delay);
  20446. if (delay) {
  20447. setTimeout(() => {
  20448. delayed.value = false;
  20449. }, delay);
  20450. }
  20451. if (timeout != null) {
  20452. setTimeout(() => {
  20453. if (!loaded.value && !error.value) {
  20454. const err = new Error(`Async component timed out after ${timeout}ms.`);
  20455. onError(err);
  20456. error.value = err;
  20457. }
  20458. }, timeout);
  20459. }
  20460. load()
  20461. .then(() => {
  20462. loaded.value = true;
  20463. if (instance.parent && isKeepAlive(instance.parent.vnode)) {
  20464. // parent is keep-alive, force update so the loaded component's
  20465. // name is taken into account
  20466. queueJob(instance.parent.update);
  20467. }
  20468. })
  20469. .catch(err => {
  20470. onError(err);
  20471. error.value = err;
  20472. });
  20473. return () => {
  20474. if (loaded.value && resolvedComp) {
  20475. return createInnerComp(resolvedComp, instance);
  20476. }
  20477. else if (error.value && errorComponent) {
  20478. return createVNode(errorComponent, {
  20479. error: error.value
  20480. });
  20481. }
  20482. else if (loadingComponent && !delayed.value) {
  20483. return createVNode(loadingComponent);
  20484. }
  20485. };
  20486. }
  20487. });
  20488. }
  20489. function createInnerComp(comp, { vnode: { ref, props, children } }) {
  20490. const vnode = createVNode(comp, props, children);
  20491. // ensure inner component inherits the async wrapper's ref owner
  20492. vnode.ref = ref;
  20493. return vnode;
  20494. }
  20495. const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
  20496. const KeepAliveImpl = {
  20497. name: `KeepAlive`,
  20498. // Marker for special handling inside the renderer. We are not using a ===
  20499. // check directly on KeepAlive in the renderer, because importing it directly
  20500. // would prevent it from being tree-shaken.
  20501. __isKeepAlive: true,
  20502. props: {
  20503. include: [String, RegExp, Array],
  20504. exclude: [String, RegExp, Array],
  20505. max: [String, Number]
  20506. },
  20507. setup(props, { slots }) {
  20508. const instance = getCurrentInstance();
  20509. // KeepAlive communicates with the instantiated renderer via the
  20510. // ctx where the renderer passes in its internals,
  20511. // and the KeepAlive instance exposes activate/deactivate implementations.
  20512. // The whole point of this is to avoid importing KeepAlive directly in the
  20513. // renderer to facilitate tree-shaking.
  20514. const sharedContext = instance.ctx;
  20515. // if the internal renderer is not registered, it indicates that this is server-side rendering,
  20516. // for KeepAlive, we just need to render its children
  20517. if (!sharedContext.renderer) {
  20518. return slots.default;
  20519. }
  20520. const cache = new Map();
  20521. const keys = new Set();
  20522. let current = null;
  20523. if (true) {
  20524. instance.__v_cache = cache;
  20525. }
  20526. const parentSuspense = instance.suspense;
  20527. const { renderer: { p: patch, m: move, um: _unmount, o: { createElement } } } = sharedContext;
  20528. const storageContainer = createElement('div');
  20529. sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
  20530. const instance = vnode.component;
  20531. move(vnode, container, anchor, 0 /* ENTER */, parentSuspense);
  20532. // in case props have changed
  20533. patch(instance.vnode, vnode, container, anchor, instance, parentSuspense, isSVG, vnode.slotScopeIds, optimized);
  20534. queuePostRenderEffect(() => {
  20535. instance.isDeactivated = false;
  20536. if (instance.a) {
  20537. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(instance.a);
  20538. }
  20539. const vnodeHook = vnode.props && vnode.props.onVnodeMounted;
  20540. if (vnodeHook) {
  20541. invokeVNodeHook(vnodeHook, instance.parent, vnode);
  20542. }
  20543. }, parentSuspense);
  20544. if (true) {
  20545. // Update components tree
  20546. devtoolsComponentAdded(instance);
  20547. }
  20548. };
  20549. sharedContext.deactivate = (vnode) => {
  20550. const instance = vnode.component;
  20551. move(vnode, storageContainer, null, 1 /* LEAVE */, parentSuspense);
  20552. queuePostRenderEffect(() => {
  20553. if (instance.da) {
  20554. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(instance.da);
  20555. }
  20556. const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;
  20557. if (vnodeHook) {
  20558. invokeVNodeHook(vnodeHook, instance.parent, vnode);
  20559. }
  20560. instance.isDeactivated = true;
  20561. }, parentSuspense);
  20562. if (true) {
  20563. // Update components tree
  20564. devtoolsComponentAdded(instance);
  20565. }
  20566. };
  20567. function unmount(vnode) {
  20568. // reset the shapeFlag so it can be properly unmounted
  20569. resetShapeFlag(vnode);
  20570. _unmount(vnode, instance, parentSuspense, true);
  20571. }
  20572. function pruneCache(filter) {
  20573. cache.forEach((vnode, key) => {
  20574. const name = getComponentName(vnode.type);
  20575. if (name && (!filter || !filter(name))) {
  20576. pruneCacheEntry(key);
  20577. }
  20578. });
  20579. }
  20580. function pruneCacheEntry(key) {
  20581. const cached = cache.get(key);
  20582. if (!current || cached.type !== current.type) {
  20583. unmount(cached);
  20584. }
  20585. else if (current) {
  20586. // current active instance should no longer be kept-alive.
  20587. // we can't unmount it now but it might be later, so reset its flag now.
  20588. resetShapeFlag(current);
  20589. }
  20590. cache.delete(key);
  20591. keys.delete(key);
  20592. }
  20593. // prune cache on include/exclude prop change
  20594. watch(() => [props.include, props.exclude], ([include, exclude]) => {
  20595. include && pruneCache(name => matches(include, name));
  20596. exclude && pruneCache(name => !matches(exclude, name));
  20597. },
  20598. // prune post-render after `current` has been updated
  20599. { flush: 'post', deep: true });
  20600. // cache sub tree after render
  20601. let pendingCacheKey = null;
  20602. const cacheSubtree = () => {
  20603. // fix #1621, the pendingCacheKey could be 0
  20604. if (pendingCacheKey != null) {
  20605. cache.set(pendingCacheKey, getInnerChild(instance.subTree));
  20606. }
  20607. };
  20608. onMounted(cacheSubtree);
  20609. onUpdated(cacheSubtree);
  20610. onBeforeUnmount(() => {
  20611. cache.forEach(cached => {
  20612. const { subTree, suspense } = instance;
  20613. const vnode = getInnerChild(subTree);
  20614. if (cached.type === vnode.type) {
  20615. // current instance will be unmounted as part of keep-alive's unmount
  20616. resetShapeFlag(vnode);
  20617. // but invoke its deactivated hook here
  20618. const da = vnode.component.da;
  20619. da && queuePostRenderEffect(da, suspense);
  20620. return;
  20621. }
  20622. unmount(cached);
  20623. });
  20624. });
  20625. return () => {
  20626. pendingCacheKey = null;
  20627. if (!slots.default) {
  20628. return null;
  20629. }
  20630. const children = slots.default();
  20631. const rawVNode = children[0];
  20632. if (children.length > 1) {
  20633. if ((true)) {
  20634. warn(`KeepAlive should contain exactly one component child.`);
  20635. }
  20636. current = null;
  20637. return children;
  20638. }
  20639. else if (!isVNode(rawVNode) ||
  20640. (!(rawVNode.shapeFlag & 4 /* STATEFUL_COMPONENT */) &&
  20641. !(rawVNode.shapeFlag & 128 /* SUSPENSE */))) {
  20642. current = null;
  20643. return rawVNode;
  20644. }
  20645. let vnode = getInnerChild(rawVNode);
  20646. const comp = vnode.type;
  20647. // for async components, name check should be based in its loaded
  20648. // inner component if available
  20649. const name = getComponentName(isAsyncWrapper(vnode)
  20650. ? vnode.type.__asyncResolved || {}
  20651. : comp);
  20652. const { include, exclude, max } = props;
  20653. if ((include && (!name || !matches(include, name))) ||
  20654. (exclude && name && matches(exclude, name))) {
  20655. current = vnode;
  20656. return rawVNode;
  20657. }
  20658. const key = vnode.key == null ? comp : vnode.key;
  20659. const cachedVNode = cache.get(key);
  20660. // clone vnode if it's reused because we are going to mutate it
  20661. if (vnode.el) {
  20662. vnode = cloneVNode(vnode);
  20663. if (rawVNode.shapeFlag & 128 /* SUSPENSE */) {
  20664. rawVNode.ssContent = vnode;
  20665. }
  20666. }
  20667. // #1513 it's possible for the returned vnode to be cloned due to attr
  20668. // fallthrough or scopeId, so the vnode here may not be the final vnode
  20669. // that is mounted. Instead of caching it directly, we store the pending
  20670. // key and cache `instance.subTree` (the normalized vnode) in
  20671. // beforeMount/beforeUpdate hooks.
  20672. pendingCacheKey = key;
  20673. if (cachedVNode) {
  20674. // copy over mounted state
  20675. vnode.el = cachedVNode.el;
  20676. vnode.component = cachedVNode.component;
  20677. if (vnode.transition) {
  20678. // recursively update transition hooks on subTree
  20679. setTransitionHooks(vnode, vnode.transition);
  20680. }
  20681. // avoid vnode being mounted as fresh
  20682. vnode.shapeFlag |= 512 /* COMPONENT_KEPT_ALIVE */;
  20683. // make this key the freshest
  20684. keys.delete(key);
  20685. keys.add(key);
  20686. }
  20687. else {
  20688. keys.add(key);
  20689. // prune oldest entry
  20690. if (max && keys.size > parseInt(max, 10)) {
  20691. pruneCacheEntry(keys.values().next().value);
  20692. }
  20693. }
  20694. // avoid vnode being unmounted
  20695. vnode.shapeFlag |= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;
  20696. current = vnode;
  20697. return rawVNode;
  20698. };
  20699. }
  20700. };
  20701. // export the public type for h/tsx inference
  20702. // also to avoid inline import() in generated d.ts files
  20703. const KeepAlive = KeepAliveImpl;
  20704. function matches(pattern, name) {
  20705. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(pattern)) {
  20706. return pattern.some((p) => matches(p, name));
  20707. }
  20708. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(pattern)) {
  20709. return pattern.split(',').includes(name);
  20710. }
  20711. else if (pattern.test) {
  20712. return pattern.test(name);
  20713. }
  20714. /* istanbul ignore next */
  20715. return false;
  20716. }
  20717. function onActivated(hook, target) {
  20718. registerKeepAliveHook(hook, "a" /* ACTIVATED */, target);
  20719. }
  20720. function onDeactivated(hook, target) {
  20721. registerKeepAliveHook(hook, "da" /* DEACTIVATED */, target);
  20722. }
  20723. function registerKeepAliveHook(hook, type, target = currentInstance) {
  20724. // cache the deactivate branch check wrapper for injected hooks so the same
  20725. // hook can be properly deduped by the scheduler. "__wdc" stands for "with
  20726. // deactivation check".
  20727. const wrappedHook = hook.__wdc ||
  20728. (hook.__wdc = () => {
  20729. // only fire the hook if the target instance is NOT in a deactivated branch.
  20730. let current = target;
  20731. while (current) {
  20732. if (current.isDeactivated) {
  20733. return;
  20734. }
  20735. current = current.parent;
  20736. }
  20737. return hook();
  20738. });
  20739. injectHook(type, wrappedHook, target);
  20740. // In addition to registering it on the target instance, we walk up the parent
  20741. // chain and register it on all ancestor instances that are keep-alive roots.
  20742. // This avoids the need to walk the entire component tree when invoking these
  20743. // hooks, and more importantly, avoids the need to track child components in
  20744. // arrays.
  20745. if (target) {
  20746. let current = target.parent;
  20747. while (current && current.parent) {
  20748. if (isKeepAlive(current.parent.vnode)) {
  20749. injectToKeepAliveRoot(wrappedHook, type, target, current);
  20750. }
  20751. current = current.parent;
  20752. }
  20753. }
  20754. }
  20755. function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
  20756. // injectHook wraps the original for error handling, so make sure to remove
  20757. // the wrapped version.
  20758. const injected = injectHook(type, hook, keepAliveRoot, true /* prepend */);
  20759. onUnmounted(() => {
  20760. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.remove)(keepAliveRoot[type], injected);
  20761. }, target);
  20762. }
  20763. function resetShapeFlag(vnode) {
  20764. let shapeFlag = vnode.shapeFlag;
  20765. if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {
  20766. shapeFlag -= 256 /* COMPONENT_SHOULD_KEEP_ALIVE */;
  20767. }
  20768. if (shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) {
  20769. shapeFlag -= 512 /* COMPONENT_KEPT_ALIVE */;
  20770. }
  20771. vnode.shapeFlag = shapeFlag;
  20772. }
  20773. function getInnerChild(vnode) {
  20774. return vnode.shapeFlag & 128 /* SUSPENSE */ ? vnode.ssContent : vnode;
  20775. }
  20776. function injectHook(type, hook, target = currentInstance, prepend = false) {
  20777. if (target) {
  20778. const hooks = target[type] || (target[type] = []);
  20779. // cache the error handling wrapper for injected hooks so the same hook
  20780. // can be properly deduped by the scheduler. "__weh" stands for "with error
  20781. // handling".
  20782. const wrappedHook = hook.__weh ||
  20783. (hook.__weh = (...args) => {
  20784. if (target.isUnmounted) {
  20785. return;
  20786. }
  20787. // disable tracking inside all lifecycle hooks
  20788. // since they can potentially be called inside effects.
  20789. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)();
  20790. // Set currentInstance during hook invocation.
  20791. // This assumes the hook does not synchronously trigger other hooks, which
  20792. // can only be false when the user does something really funky.
  20793. setCurrentInstance(target);
  20794. const res = callWithAsyncErrorHandling(hook, target, type, args);
  20795. unsetCurrentInstance();
  20796. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)();
  20797. return res;
  20798. });
  20799. if (prepend) {
  20800. hooks.unshift(wrappedHook);
  20801. }
  20802. else {
  20803. hooks.push(wrappedHook);
  20804. }
  20805. return wrappedHook;
  20806. }
  20807. else if ((true)) {
  20808. const apiName = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(ErrorTypeStrings[type].replace(/ hook$/, ''));
  20809. warn(`${apiName} is called when there is no active component instance to be ` +
  20810. `associated with. ` +
  20811. `Lifecycle injection APIs can only be used during execution of setup().` +
  20812. (` If you are using async setup(), make sure to register lifecycle ` +
  20813. `hooks before the first await statement.`
  20814. ));
  20815. }
  20816. }
  20817. const createHook = (lifecycle) => (hook, target = currentInstance) =>
  20818. // post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
  20819. (!isInSSRComponentSetup || lifecycle === "sp" /* SERVER_PREFETCH */) &&
  20820. injectHook(lifecycle, hook, target);
  20821. const onBeforeMount = createHook("bm" /* BEFORE_MOUNT */);
  20822. const onMounted = createHook("m" /* MOUNTED */);
  20823. const onBeforeUpdate = createHook("bu" /* BEFORE_UPDATE */);
  20824. const onUpdated = createHook("u" /* UPDATED */);
  20825. const onBeforeUnmount = createHook("bum" /* BEFORE_UNMOUNT */);
  20826. const onUnmounted = createHook("um" /* UNMOUNTED */);
  20827. const onServerPrefetch = createHook("sp" /* SERVER_PREFETCH */);
  20828. const onRenderTriggered = createHook("rtg" /* RENDER_TRIGGERED */);
  20829. const onRenderTracked = createHook("rtc" /* RENDER_TRACKED */);
  20830. function onErrorCaptured(hook, target = currentInstance) {
  20831. injectHook("ec" /* ERROR_CAPTURED */, hook, target);
  20832. }
  20833. function createDuplicateChecker() {
  20834. const cache = Object.create(null);
  20835. return (type, key) => {
  20836. if (cache[key]) {
  20837. warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
  20838. }
  20839. else {
  20840. cache[key] = type;
  20841. }
  20842. };
  20843. }
  20844. let shouldCacheAccess = true;
  20845. function applyOptions(instance) {
  20846. const options = resolveMergedOptions(instance);
  20847. const publicThis = instance.proxy;
  20848. const ctx = instance.ctx;
  20849. // do not cache property access on public proxy during state initialization
  20850. shouldCacheAccess = false;
  20851. // call beforeCreate first before accessing other options since
  20852. // the hook may mutate resolved options (#2791)
  20853. if (options.beforeCreate) {
  20854. callHook(options.beforeCreate, instance, "bc" /* BEFORE_CREATE */);
  20855. }
  20856. const {
  20857. // state
  20858. data: dataOptions, computed: computedOptions, methods, watch: watchOptions, provide: provideOptions, inject: injectOptions,
  20859. // lifecycle
  20860. created, beforeMount, mounted, beforeUpdate, updated, activated, deactivated, beforeDestroy, beforeUnmount, destroyed, unmounted, render, renderTracked, renderTriggered, errorCaptured, serverPrefetch,
  20861. // public API
  20862. expose, inheritAttrs,
  20863. // assets
  20864. components, directives, filters } = options;
  20865. const checkDuplicateProperties = ( true) ? createDuplicateChecker() : 0;
  20866. if ((true)) {
  20867. const [propsOptions] = instance.propsOptions;
  20868. if (propsOptions) {
  20869. for (const key in propsOptions) {
  20870. checkDuplicateProperties("Props" /* PROPS */, key);
  20871. }
  20872. }
  20873. }
  20874. // options initialization order (to be consistent with Vue 2):
  20875. // - props (already done outside of this function)
  20876. // - inject
  20877. // - methods
  20878. // - data (deferred since it relies on `this` access)
  20879. // - computed
  20880. // - watch (deferred since it relies on `this` access)
  20881. if (injectOptions) {
  20882. resolveInjections(injectOptions, ctx, checkDuplicateProperties, instance.appContext.config.unwrapInjectedRef);
  20883. }
  20884. if (methods) {
  20885. for (const key in methods) {
  20886. const methodHandler = methods[key];
  20887. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(methodHandler)) {
  20888. // In dev mode, we use the `createRenderContext` function to define
  20889. // methods to the proxy target, and those are read-only but
  20890. // reconfigurable, so it needs to be redefined here
  20891. if ((true)) {
  20892. Object.defineProperty(ctx, key, {
  20893. value: methodHandler.bind(publicThis),
  20894. configurable: true,
  20895. enumerable: true,
  20896. writable: true
  20897. });
  20898. }
  20899. else {}
  20900. if ((true)) {
  20901. checkDuplicateProperties("Methods" /* METHODS */, key);
  20902. }
  20903. }
  20904. else if ((true)) {
  20905. warn(`Method "${key}" has type "${typeof methodHandler}" in the component definition. ` +
  20906. `Did you reference the function correctly?`);
  20907. }
  20908. }
  20909. }
  20910. if (dataOptions) {
  20911. if (( true) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(dataOptions)) {
  20912. warn(`The data option must be a function. ` +
  20913. `Plain object usage is no longer supported.`);
  20914. }
  20915. const data = dataOptions.call(publicThis, publicThis);
  20916. if (( true) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPromise)(data)) {
  20917. warn(`data() returned a Promise - note data() cannot be async; If you ` +
  20918. `intend to perform data fetching before component renders, use ` +
  20919. `async setup() + <Suspense>.`);
  20920. }
  20921. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(data)) {
  20922. ( true) && warn(`data() should return an object.`);
  20923. }
  20924. else {
  20925. instance.data = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.reactive)(data);
  20926. if ((true)) {
  20927. for (const key in data) {
  20928. checkDuplicateProperties("Data" /* DATA */, key);
  20929. // expose data on ctx during dev
  20930. if (key[0] !== '$' && key[0] !== '_') {
  20931. Object.defineProperty(ctx, key, {
  20932. configurable: true,
  20933. enumerable: true,
  20934. get: () => data[key],
  20935. set: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP
  20936. });
  20937. }
  20938. }
  20939. }
  20940. }
  20941. }
  20942. // state initialization complete at this point - start caching access
  20943. shouldCacheAccess = true;
  20944. if (computedOptions) {
  20945. for (const key in computedOptions) {
  20946. const opt = computedOptions[key];
  20947. const get = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt)
  20948. ? opt.bind(publicThis, publicThis)
  20949. : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt.get)
  20950. ? opt.get.bind(publicThis, publicThis)
  20951. : _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP;
  20952. if (( true) && get === _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP) {
  20953. warn(`Computed property "${key}" has no getter.`);
  20954. }
  20955. const set = !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt.set)
  20956. ? opt.set.bind(publicThis)
  20957. : ( true)
  20958. ? () => {
  20959. warn(`Write operation failed: computed property "${key}" is readonly.`);
  20960. }
  20961. : 0;
  20962. const c = computed({
  20963. get,
  20964. set
  20965. });
  20966. Object.defineProperty(ctx, key, {
  20967. enumerable: true,
  20968. configurable: true,
  20969. get: () => c.value,
  20970. set: v => (c.value = v)
  20971. });
  20972. if ((true)) {
  20973. checkDuplicateProperties("Computed" /* COMPUTED */, key);
  20974. }
  20975. }
  20976. }
  20977. if (watchOptions) {
  20978. for (const key in watchOptions) {
  20979. createWatcher(watchOptions[key], ctx, publicThis, key);
  20980. }
  20981. }
  20982. if (provideOptions) {
  20983. const provides = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(provideOptions)
  20984. ? provideOptions.call(publicThis)
  20985. : provideOptions;
  20986. Reflect.ownKeys(provides).forEach(key => {
  20987. provide(key, provides[key]);
  20988. });
  20989. }
  20990. if (created) {
  20991. callHook(created, instance, "c" /* CREATED */);
  20992. }
  20993. function registerLifecycleHook(register, hook) {
  20994. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook)) {
  20995. hook.forEach(_hook => register(_hook.bind(publicThis)));
  20996. }
  20997. else if (hook) {
  20998. register(hook.bind(publicThis));
  20999. }
  21000. }
  21001. registerLifecycleHook(onBeforeMount, beforeMount);
  21002. registerLifecycleHook(onMounted, mounted);
  21003. registerLifecycleHook(onBeforeUpdate, beforeUpdate);
  21004. registerLifecycleHook(onUpdated, updated);
  21005. registerLifecycleHook(onActivated, activated);
  21006. registerLifecycleHook(onDeactivated, deactivated);
  21007. registerLifecycleHook(onErrorCaptured, errorCaptured);
  21008. registerLifecycleHook(onRenderTracked, renderTracked);
  21009. registerLifecycleHook(onRenderTriggered, renderTriggered);
  21010. registerLifecycleHook(onBeforeUnmount, beforeUnmount);
  21011. registerLifecycleHook(onUnmounted, unmounted);
  21012. registerLifecycleHook(onServerPrefetch, serverPrefetch);
  21013. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(expose)) {
  21014. if (expose.length) {
  21015. const exposed = instance.exposed || (instance.exposed = {});
  21016. expose.forEach(key => {
  21017. Object.defineProperty(exposed, key, {
  21018. get: () => publicThis[key],
  21019. set: val => (publicThis[key] = val)
  21020. });
  21021. });
  21022. }
  21023. else if (!instance.exposed) {
  21024. instance.exposed = {};
  21025. }
  21026. }
  21027. // options that are handled when creating the instance but also need to be
  21028. // applied from mixins
  21029. if (render && instance.render === _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP) {
  21030. instance.render = render;
  21031. }
  21032. if (inheritAttrs != null) {
  21033. instance.inheritAttrs = inheritAttrs;
  21034. }
  21035. // asset options.
  21036. if (components)
  21037. instance.components = components;
  21038. if (directives)
  21039. instance.directives = directives;
  21040. }
  21041. function resolveInjections(injectOptions, ctx, checkDuplicateProperties = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP, unwrapRef = false) {
  21042. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(injectOptions)) {
  21043. injectOptions = normalizeInject(injectOptions);
  21044. }
  21045. for (const key in injectOptions) {
  21046. const opt = injectOptions[key];
  21047. let injected;
  21048. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(opt)) {
  21049. if ('default' in opt) {
  21050. injected = inject(opt.from || key, opt.default, true /* treat default function as factory */);
  21051. }
  21052. else {
  21053. injected = inject(opt.from || key);
  21054. }
  21055. }
  21056. else {
  21057. injected = inject(opt);
  21058. }
  21059. if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(injected)) {
  21060. // TODO remove the check in 3.3
  21061. if (unwrapRef) {
  21062. Object.defineProperty(ctx, key, {
  21063. enumerable: true,
  21064. configurable: true,
  21065. get: () => injected.value,
  21066. set: v => (injected.value = v)
  21067. });
  21068. }
  21069. else {
  21070. if ((true)) {
  21071. warn(`injected property "${key}" is a ref and will be auto-unwrapped ` +
  21072. `and no longer needs \`.value\` in the next minor release. ` +
  21073. `To opt-in to the new behavior now, ` +
  21074. `set \`app.config.unwrapInjectedRef = true\` (this config is ` +
  21075. `temporary and will not be needed in the future.)`);
  21076. }
  21077. ctx[key] = injected;
  21078. }
  21079. }
  21080. else {
  21081. ctx[key] = injected;
  21082. }
  21083. if ((true)) {
  21084. checkDuplicateProperties("Inject" /* INJECT */, key);
  21085. }
  21086. }
  21087. }
  21088. function callHook(hook, instance, type) {
  21089. callWithAsyncErrorHandling((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook)
  21090. ? hook.map(h => h.bind(instance.proxy))
  21091. : hook.bind(instance.proxy), instance, type);
  21092. }
  21093. function createWatcher(raw, ctx, publicThis, key) {
  21094. const getter = key.includes('.')
  21095. ? createPathGetter(publicThis, key)
  21096. : () => publicThis[key];
  21097. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(raw)) {
  21098. const handler = ctx[raw];
  21099. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) {
  21100. watch(getter, handler);
  21101. }
  21102. else if ((true)) {
  21103. warn(`Invalid watch handler specified by key "${raw}"`, handler);
  21104. }
  21105. }
  21106. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(raw)) {
  21107. watch(getter, raw.bind(publicThis));
  21108. }
  21109. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(raw)) {
  21110. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)) {
  21111. raw.forEach(r => createWatcher(r, ctx, publicThis, key));
  21112. }
  21113. else {
  21114. const handler = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(raw.handler)
  21115. ? raw.handler.bind(publicThis)
  21116. : ctx[raw.handler];
  21117. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) {
  21118. watch(getter, handler, raw);
  21119. }
  21120. else if ((true)) {
  21121. warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
  21122. }
  21123. }
  21124. }
  21125. else if ((true)) {
  21126. warn(`Invalid watch option: "${key}"`, raw);
  21127. }
  21128. }
  21129. /**
  21130. * Resolve merged options and cache it on the component.
  21131. * This is done only once per-component since the merging does not involve
  21132. * instances.
  21133. */
  21134. function resolveMergedOptions(instance) {
  21135. const base = instance.type;
  21136. const { mixins, extends: extendsOptions } = base;
  21137. const { mixins: globalMixins, optionsCache: cache, config: { optionMergeStrategies } } = instance.appContext;
  21138. const cached = cache.get(base);
  21139. let resolved;
  21140. if (cached) {
  21141. resolved = cached;
  21142. }
  21143. else if (!globalMixins.length && !mixins && !extendsOptions) {
  21144. {
  21145. resolved = base;
  21146. }
  21147. }
  21148. else {
  21149. resolved = {};
  21150. if (globalMixins.length) {
  21151. globalMixins.forEach(m => mergeOptions(resolved, m, optionMergeStrategies, true));
  21152. }
  21153. mergeOptions(resolved, base, optionMergeStrategies);
  21154. }
  21155. cache.set(base, resolved);
  21156. return resolved;
  21157. }
  21158. function mergeOptions(to, from, strats, asMixin = false) {
  21159. const { mixins, extends: extendsOptions } = from;
  21160. if (extendsOptions) {
  21161. mergeOptions(to, extendsOptions, strats, true);
  21162. }
  21163. if (mixins) {
  21164. mixins.forEach((m) => mergeOptions(to, m, strats, true));
  21165. }
  21166. for (const key in from) {
  21167. if (asMixin && key === 'expose') {
  21168. ( true) &&
  21169. warn(`"expose" option is ignored when declared in mixins or extends. ` +
  21170. `It should only be declared in the base component itself.`);
  21171. }
  21172. else {
  21173. const strat = internalOptionMergeStrats[key] || (strats && strats[key]);
  21174. to[key] = strat ? strat(to[key], from[key]) : from[key];
  21175. }
  21176. }
  21177. return to;
  21178. }
  21179. const internalOptionMergeStrats = {
  21180. data: mergeDataFn,
  21181. props: mergeObjectOptions,
  21182. emits: mergeObjectOptions,
  21183. // objects
  21184. methods: mergeObjectOptions,
  21185. computed: mergeObjectOptions,
  21186. // lifecycle
  21187. beforeCreate: mergeAsArray,
  21188. created: mergeAsArray,
  21189. beforeMount: mergeAsArray,
  21190. mounted: mergeAsArray,
  21191. beforeUpdate: mergeAsArray,
  21192. updated: mergeAsArray,
  21193. beforeDestroy: mergeAsArray,
  21194. beforeUnmount: mergeAsArray,
  21195. destroyed: mergeAsArray,
  21196. unmounted: mergeAsArray,
  21197. activated: mergeAsArray,
  21198. deactivated: mergeAsArray,
  21199. errorCaptured: mergeAsArray,
  21200. serverPrefetch: mergeAsArray,
  21201. // assets
  21202. components: mergeObjectOptions,
  21203. directives: mergeObjectOptions,
  21204. // watch
  21205. watch: mergeWatchOptions,
  21206. // provide / inject
  21207. provide: mergeDataFn,
  21208. inject: mergeInject
  21209. };
  21210. function mergeDataFn(to, from) {
  21211. if (!from) {
  21212. return to;
  21213. }
  21214. if (!to) {
  21215. return from;
  21216. }
  21217. return function mergedDataFn() {
  21218. return ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend))((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(to) ? to.call(this, this) : to, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(from) ? from.call(this, this) : from);
  21219. };
  21220. }
  21221. function mergeInject(to, from) {
  21222. return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
  21223. }
  21224. function normalizeInject(raw) {
  21225. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)) {
  21226. const res = {};
  21227. for (let i = 0; i < raw.length; i++) {
  21228. res[raw[i]] = raw[i];
  21229. }
  21230. return res;
  21231. }
  21232. return raw;
  21233. }
  21234. function mergeAsArray(to, from) {
  21235. return to ? [...new Set([].concat(to, from))] : from;
  21236. }
  21237. function mergeObjectOptions(to, from) {
  21238. return to ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(Object.create(null), to), from) : from;
  21239. }
  21240. function mergeWatchOptions(to, from) {
  21241. if (!to)
  21242. return from;
  21243. if (!from)
  21244. return to;
  21245. const merged = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(Object.create(null), to);
  21246. for (const key in from) {
  21247. merged[key] = mergeAsArray(to[key], from[key]);
  21248. }
  21249. return merged;
  21250. }
  21251. function initProps(instance, rawProps, isStateful, // result of bitwise flag comparison
  21252. isSSR = false) {
  21253. const props = {};
  21254. const attrs = {};
  21255. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.def)(attrs, InternalObjectKey, 1);
  21256. instance.propsDefaults = Object.create(null);
  21257. setFullProps(instance, rawProps, props, attrs);
  21258. // ensure all declared prop keys are present
  21259. for (const key in instance.propsOptions[0]) {
  21260. if (!(key in props)) {
  21261. props[key] = undefined;
  21262. }
  21263. }
  21264. // validation
  21265. if ((true)) {
  21266. validateProps(rawProps || {}, props, instance);
  21267. }
  21268. if (isStateful) {
  21269. // stateful
  21270. instance.props = isSSR ? props : (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReactive)(props);
  21271. }
  21272. else {
  21273. if (!instance.type.props) {
  21274. // functional w/ optional props, props === attrs
  21275. instance.props = attrs;
  21276. }
  21277. else {
  21278. // functional w/ declared props
  21279. instance.props = props;
  21280. }
  21281. }
  21282. instance.attrs = attrs;
  21283. }
  21284. function updateProps(instance, rawProps, rawPrevProps, optimized) {
  21285. const { props, attrs, vnode: { patchFlag } } = instance;
  21286. const rawCurrentProps = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(props);
  21287. const [options] = instance.propsOptions;
  21288. let hasAttrsChanged = false;
  21289. if (
  21290. // always force full diff in dev
  21291. // - #1942 if hmr is enabled with sfc component
  21292. // - vite#872 non-sfc component used by sfc component
  21293. !(( true) &&
  21294. (instance.type.__hmrId ||
  21295. (instance.parent && instance.parent.type.__hmrId))) &&
  21296. (optimized || patchFlag > 0) &&
  21297. !(patchFlag & 16 /* FULL_PROPS */)) {
  21298. if (patchFlag & 8 /* PROPS */) {
  21299. // Compiler-generated props & no keys change, just set the updated
  21300. // the props.
  21301. const propsToUpdate = instance.vnode.dynamicProps;
  21302. for (let i = 0; i < propsToUpdate.length; i++) {
  21303. let key = propsToUpdate[i];
  21304. // PROPS flag guarantees rawProps to be non-null
  21305. const value = rawProps[key];
  21306. if (options) {
  21307. // attr / props separation was done on init and will be consistent
  21308. // in this code path, so just check if attrs have it.
  21309. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(attrs, key)) {
  21310. if (value !== attrs[key]) {
  21311. attrs[key] = value;
  21312. hasAttrsChanged = true;
  21313. }
  21314. }
  21315. else {
  21316. const camelizedKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key);
  21317. props[camelizedKey] = resolvePropValue(options, rawCurrentProps, camelizedKey, value, instance, false /* isAbsent */);
  21318. }
  21319. }
  21320. else {
  21321. if (value !== attrs[key]) {
  21322. attrs[key] = value;
  21323. hasAttrsChanged = true;
  21324. }
  21325. }
  21326. }
  21327. }
  21328. }
  21329. else {
  21330. // full props update.
  21331. if (setFullProps(instance, rawProps, props, attrs)) {
  21332. hasAttrsChanged = true;
  21333. }
  21334. // in case of dynamic props, check if we need to delete keys from
  21335. // the props object
  21336. let kebabKey;
  21337. for (const key in rawCurrentProps) {
  21338. if (!rawProps ||
  21339. // for camelCase
  21340. (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, key) &&
  21341. // it's possible the original props was passed in as kebab-case
  21342. // and converted to camelCase (#955)
  21343. ((kebabKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key)) === key || !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, kebabKey)))) {
  21344. if (options) {
  21345. if (rawPrevProps &&
  21346. // for camelCase
  21347. (rawPrevProps[key] !== undefined ||
  21348. // for kebab-case
  21349. rawPrevProps[kebabKey] !== undefined)) {
  21350. props[key] = resolvePropValue(options, rawCurrentProps, key, undefined, instance, true /* isAbsent */);
  21351. }
  21352. }
  21353. else {
  21354. delete props[key];
  21355. }
  21356. }
  21357. }
  21358. // in the case of functional component w/o props declaration, props and
  21359. // attrs point to the same object so it should already have been updated.
  21360. if (attrs !== rawCurrentProps) {
  21361. for (const key in attrs) {
  21362. if (!rawProps ||
  21363. (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, key) &&
  21364. (!false ))) {
  21365. delete attrs[key];
  21366. hasAttrsChanged = true;
  21367. }
  21368. }
  21369. }
  21370. }
  21371. // trigger updates for $attrs in case it's used in component slots
  21372. if (hasAttrsChanged) {
  21373. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.trigger)(instance, "set" /* SET */, '$attrs');
  21374. }
  21375. if ((true)) {
  21376. validateProps(rawProps || {}, props, instance);
  21377. }
  21378. }
  21379. function setFullProps(instance, rawProps, props, attrs) {
  21380. const [options, needCastKeys] = instance.propsOptions;
  21381. let hasAttrsChanged = false;
  21382. let rawCastValues;
  21383. if (rawProps) {
  21384. for (let key in rawProps) {
  21385. // key, ref are reserved and never passed down
  21386. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key)) {
  21387. continue;
  21388. }
  21389. const value = rawProps[key];
  21390. // prop option names are camelized during normalization, so to support
  21391. // kebab -> camel conversion here we need to camelize the key.
  21392. let camelKey;
  21393. if (options && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(options, (camelKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key)))) {
  21394. if (!needCastKeys || !needCastKeys.includes(camelKey)) {
  21395. props[camelKey] = value;
  21396. }
  21397. else {
  21398. (rawCastValues || (rawCastValues = {}))[camelKey] = value;
  21399. }
  21400. }
  21401. else if (!isEmitListener(instance.emitsOptions, key)) {
  21402. if (!(key in attrs) || value !== attrs[key]) {
  21403. attrs[key] = value;
  21404. hasAttrsChanged = true;
  21405. }
  21406. }
  21407. }
  21408. }
  21409. if (needCastKeys) {
  21410. const rawCurrentProps = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(props);
  21411. const castValues = rawCastValues || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
  21412. for (let i = 0; i < needCastKeys.length; i++) {
  21413. const key = needCastKeys[i];
  21414. props[key] = resolvePropValue(options, rawCurrentProps, key, castValues[key], instance, !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(castValues, key));
  21415. }
  21416. }
  21417. return hasAttrsChanged;
  21418. }
  21419. function resolvePropValue(options, props, key, value, instance, isAbsent) {
  21420. const opt = options[key];
  21421. if (opt != null) {
  21422. const hasDefault = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(opt, 'default');
  21423. // default values
  21424. if (hasDefault && value === undefined) {
  21425. const defaultValue = opt.default;
  21426. if (opt.type !== Function && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(defaultValue)) {
  21427. const { propsDefaults } = instance;
  21428. if (key in propsDefaults) {
  21429. value = propsDefaults[key];
  21430. }
  21431. else {
  21432. setCurrentInstance(instance);
  21433. value = propsDefaults[key] = defaultValue.call(null, props);
  21434. unsetCurrentInstance();
  21435. }
  21436. }
  21437. else {
  21438. value = defaultValue;
  21439. }
  21440. }
  21441. // boolean casting
  21442. if (opt[0 /* shouldCast */]) {
  21443. if (isAbsent && !hasDefault) {
  21444. value = false;
  21445. }
  21446. else if (opt[1 /* shouldCastTrue */] &&
  21447. (value === '' || value === (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key))) {
  21448. value = true;
  21449. }
  21450. }
  21451. }
  21452. return value;
  21453. }
  21454. function normalizePropsOptions(comp, appContext, asMixin = false) {
  21455. const cache = appContext.propsCache;
  21456. const cached = cache.get(comp);
  21457. if (cached) {
  21458. return cached;
  21459. }
  21460. const raw = comp.props;
  21461. const normalized = {};
  21462. const needCastKeys = [];
  21463. // apply mixin/extends props
  21464. let hasExtends = false;
  21465. if ( true && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(comp)) {
  21466. const extendProps = (raw) => {
  21467. hasExtends = true;
  21468. const [props, keys] = normalizePropsOptions(raw, appContext, true);
  21469. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(normalized, props);
  21470. if (keys)
  21471. needCastKeys.push(...keys);
  21472. };
  21473. if (!asMixin && appContext.mixins.length) {
  21474. appContext.mixins.forEach(extendProps);
  21475. }
  21476. if (comp.extends) {
  21477. extendProps(comp.extends);
  21478. }
  21479. if (comp.mixins) {
  21480. comp.mixins.forEach(extendProps);
  21481. }
  21482. }
  21483. if (!raw && !hasExtends) {
  21484. cache.set(comp, _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR);
  21485. return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR;
  21486. }
  21487. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)) {
  21488. for (let i = 0; i < raw.length; i++) {
  21489. if (( true) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(raw[i])) {
  21490. warn(`props must be strings when using array syntax.`, raw[i]);
  21491. }
  21492. const normalizedKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(raw[i]);
  21493. if (validatePropName(normalizedKey)) {
  21494. normalized[normalizedKey] = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
  21495. }
  21496. }
  21497. }
  21498. else if (raw) {
  21499. if (( true) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(raw)) {
  21500. warn(`invalid props options`, raw);
  21501. }
  21502. for (const key in raw) {
  21503. const normalizedKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key);
  21504. if (validatePropName(normalizedKey)) {
  21505. const opt = raw[key];
  21506. const prop = (normalized[normalizedKey] =
  21507. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(opt) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt) ? { type: opt } : opt);
  21508. if (prop) {
  21509. const booleanIndex = getTypeIndex(Boolean, prop.type);
  21510. const stringIndex = getTypeIndex(String, prop.type);
  21511. prop[0 /* shouldCast */] = booleanIndex > -1;
  21512. prop[1 /* shouldCastTrue */] =
  21513. stringIndex < 0 || booleanIndex < stringIndex;
  21514. // if the prop needs boolean casting or default value
  21515. if (booleanIndex > -1 || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(prop, 'default')) {
  21516. needCastKeys.push(normalizedKey);
  21517. }
  21518. }
  21519. }
  21520. }
  21521. }
  21522. const res = [normalized, needCastKeys];
  21523. cache.set(comp, res);
  21524. return res;
  21525. }
  21526. function validatePropName(key) {
  21527. if (key[0] !== '$') {
  21528. return true;
  21529. }
  21530. else if ((true)) {
  21531. warn(`Invalid prop name: "${key}" is a reserved property.`);
  21532. }
  21533. return false;
  21534. }
  21535. // use function string name to check type constructors
  21536. // so that it works across vms / iframes.
  21537. function getType(ctor) {
  21538. const match = ctor && ctor.toString().match(/^\s*function (\w+)/);
  21539. return match ? match[1] : ctor === null ? 'null' : '';
  21540. }
  21541. function isSameType(a, b) {
  21542. return getType(a) === getType(b);
  21543. }
  21544. function getTypeIndex(type, expectedTypes) {
  21545. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(expectedTypes)) {
  21546. return expectedTypes.findIndex(t => isSameType(t, type));
  21547. }
  21548. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(expectedTypes)) {
  21549. return isSameType(expectedTypes, type) ? 0 : -1;
  21550. }
  21551. return -1;
  21552. }
  21553. /**
  21554. * dev only
  21555. */
  21556. function validateProps(rawProps, props, instance) {
  21557. const resolvedValues = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(props);
  21558. const options = instance.propsOptions[0];
  21559. for (const key in options) {
  21560. let opt = options[key];
  21561. if (opt == null)
  21562. continue;
  21563. validateProp(key, resolvedValues[key], opt, !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, key) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(rawProps, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key)));
  21564. }
  21565. }
  21566. /**
  21567. * dev only
  21568. */
  21569. function validateProp(name, value, prop, isAbsent) {
  21570. const { type, required, validator } = prop;
  21571. // required!
  21572. if (required && isAbsent) {
  21573. warn('Missing required prop: "' + name + '"');
  21574. return;
  21575. }
  21576. // missing but optional
  21577. if (value == null && !prop.required) {
  21578. return;
  21579. }
  21580. // type check
  21581. if (type != null && type !== true) {
  21582. let isValid = false;
  21583. const types = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(type) ? type : [type];
  21584. const expectedTypes = [];
  21585. // value is valid as long as one of the specified types match
  21586. for (let i = 0; i < types.length && !isValid; i++) {
  21587. const { valid, expectedType } = assertType(value, types[i]);
  21588. expectedTypes.push(expectedType || '');
  21589. isValid = valid;
  21590. }
  21591. if (!isValid) {
  21592. warn(getInvalidTypeMessage(name, value, expectedTypes));
  21593. return;
  21594. }
  21595. }
  21596. // custom validator
  21597. if (validator && !validator(value)) {
  21598. warn('Invalid prop: custom validator check failed for prop "' + name + '".');
  21599. }
  21600. }
  21601. const isSimpleType = /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)('String,Number,Boolean,Function,Symbol,BigInt');
  21602. /**
  21603. * dev only
  21604. */
  21605. function assertType(value, type) {
  21606. let valid;
  21607. const expectedType = getType(type);
  21608. if (isSimpleType(expectedType)) {
  21609. const t = typeof value;
  21610. valid = t === expectedType.toLowerCase();
  21611. // for primitive wrapper objects
  21612. if (!valid && t === 'object') {
  21613. valid = value instanceof type;
  21614. }
  21615. }
  21616. else if (expectedType === 'Object') {
  21617. valid = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(value);
  21618. }
  21619. else if (expectedType === 'Array') {
  21620. valid = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value);
  21621. }
  21622. else if (expectedType === 'null') {
  21623. valid = value === null;
  21624. }
  21625. else {
  21626. valid = value instanceof type;
  21627. }
  21628. return {
  21629. valid,
  21630. expectedType
  21631. };
  21632. }
  21633. /**
  21634. * dev only
  21635. */
  21636. function getInvalidTypeMessage(name, value, expectedTypes) {
  21637. let message = `Invalid prop: type check failed for prop "${name}".` +
  21638. ` Expected ${expectedTypes.map(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize).join(' | ')}`;
  21639. const expectedType = expectedTypes[0];
  21640. const receivedType = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toRawType)(value);
  21641. const expectedValue = styleValue(value, expectedType);
  21642. const receivedValue = styleValue(value, receivedType);
  21643. // check if we need to specify expected value
  21644. if (expectedTypes.length === 1 &&
  21645. isExplicable(expectedType) &&
  21646. !isBoolean(expectedType, receivedType)) {
  21647. message += ` with value ${expectedValue}`;
  21648. }
  21649. message += `, got ${receivedType} `;
  21650. // check if we need to specify received value
  21651. if (isExplicable(receivedType)) {
  21652. message += `with value ${receivedValue}.`;
  21653. }
  21654. return message;
  21655. }
  21656. /**
  21657. * dev only
  21658. */
  21659. function styleValue(value, type) {
  21660. if (type === 'String') {
  21661. return `"${value}"`;
  21662. }
  21663. else if (type === 'Number') {
  21664. return `${Number(value)}`;
  21665. }
  21666. else {
  21667. return `${value}`;
  21668. }
  21669. }
  21670. /**
  21671. * dev only
  21672. */
  21673. function isExplicable(type) {
  21674. const explicitTypes = ['string', 'number', 'boolean'];
  21675. return explicitTypes.some(elem => type.toLowerCase() === elem);
  21676. }
  21677. /**
  21678. * dev only
  21679. */
  21680. function isBoolean(...args) {
  21681. return args.some(elem => elem.toLowerCase() === 'boolean');
  21682. }
  21683. const isInternalKey = (key) => key[0] === '_' || key === '$stable';
  21684. const normalizeSlotValue = (value) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)
  21685. ? value.map(normalizeVNode)
  21686. : [normalizeVNode(value)];
  21687. const normalizeSlot = (key, rawSlot, ctx) => {
  21688. const normalized = withCtx((...args) => {
  21689. if (( true) && currentInstance) {
  21690. warn(`Slot "${key}" invoked outside of the render function: ` +
  21691. `this will not track dependencies used in the slot. ` +
  21692. `Invoke the slot function inside the render function instead.`);
  21693. }
  21694. return normalizeSlotValue(rawSlot(...args));
  21695. }, ctx);
  21696. normalized._c = false;
  21697. return normalized;
  21698. };
  21699. const normalizeObjectSlots = (rawSlots, slots, instance) => {
  21700. const ctx = rawSlots._ctx;
  21701. for (const key in rawSlots) {
  21702. if (isInternalKey(key))
  21703. continue;
  21704. const value = rawSlots[key];
  21705. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value)) {
  21706. slots[key] = normalizeSlot(key, value, ctx);
  21707. }
  21708. else if (value != null) {
  21709. if (true) {
  21710. warn(`Non-function value encountered for slot "${key}". ` +
  21711. `Prefer function slots for better performance.`);
  21712. }
  21713. const normalized = normalizeSlotValue(value);
  21714. slots[key] = () => normalized;
  21715. }
  21716. }
  21717. };
  21718. const normalizeVNodeSlots = (instance, children) => {
  21719. if (( true) &&
  21720. !isKeepAlive(instance.vnode) &&
  21721. !(false )) {
  21722. warn(`Non-function value encountered for default slot. ` +
  21723. `Prefer function slots for better performance.`);
  21724. }
  21725. const normalized = normalizeSlotValue(children);
  21726. instance.slots.default = () => normalized;
  21727. };
  21728. const initSlots = (instance, children) => {
  21729. if (instance.vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {
  21730. const type = children._;
  21731. if (type) {
  21732. // users can get the shallow readonly version of the slots object through `this.$slots`,
  21733. // we should avoid the proxy object polluting the slots of the internal instance
  21734. instance.slots = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(children);
  21735. // make compiler marker non-enumerable
  21736. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.def)(children, '_', type);
  21737. }
  21738. else {
  21739. normalizeObjectSlots(children, (instance.slots = {}));
  21740. }
  21741. }
  21742. else {
  21743. instance.slots = {};
  21744. if (children) {
  21745. normalizeVNodeSlots(instance, children);
  21746. }
  21747. }
  21748. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.def)(instance.slots, InternalObjectKey, 1);
  21749. };
  21750. const updateSlots = (instance, children, optimized) => {
  21751. const { vnode, slots } = instance;
  21752. let needDeletionCheck = true;
  21753. let deletionComparisonTarget = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
  21754. if (vnode.shapeFlag & 32 /* SLOTS_CHILDREN */) {
  21755. const type = children._;
  21756. if (type) {
  21757. // compiled slots.
  21758. if (( true) && isHmrUpdating) {
  21759. // Parent was HMR updated so slot content may have changed.
  21760. // force update slots and mark instance for hmr as well
  21761. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(slots, children);
  21762. }
  21763. else if (optimized && type === 1 /* STABLE */) {
  21764. // compiled AND stable.
  21765. // no need to update, and skip stale slots removal.
  21766. needDeletionCheck = false;
  21767. }
  21768. else {
  21769. // compiled but dynamic (v-if/v-for on slots) - update slots, but skip
  21770. // normalization.
  21771. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(slots, children);
  21772. // #2893
  21773. // when rendering the optimized slots by manually written render function,
  21774. // we need to delete the `slots._` flag if necessary to make subsequent updates reliable,
  21775. // i.e. let the `renderSlot` create the bailed Fragment
  21776. if (!optimized && type === 1 /* STABLE */) {
  21777. delete slots._;
  21778. }
  21779. }
  21780. }
  21781. else {
  21782. needDeletionCheck = !children.$stable;
  21783. normalizeObjectSlots(children, slots);
  21784. }
  21785. deletionComparisonTarget = children;
  21786. }
  21787. else if (children) {
  21788. // non slot object children (direct value) passed to a component
  21789. normalizeVNodeSlots(instance, children);
  21790. deletionComparisonTarget = { default: 1 };
  21791. }
  21792. // delete stale slots
  21793. if (needDeletionCheck) {
  21794. for (const key in slots) {
  21795. if (!isInternalKey(key) && !(key in deletionComparisonTarget)) {
  21796. delete slots[key];
  21797. }
  21798. }
  21799. }
  21800. };
  21801. /**
  21802. Runtime helper for applying directives to a vnode. Example usage:
  21803. const comp = resolveComponent('comp')
  21804. const foo = resolveDirective('foo')
  21805. const bar = resolveDirective('bar')
  21806. return withDirectives(h(comp), [
  21807. [foo, this.x],
  21808. [bar, this.y]
  21809. ])
  21810. */
  21811. function validateDirectiveName(name) {
  21812. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isBuiltInDirective)(name)) {
  21813. warn('Do not use built-in directive ids as custom directive id: ' + name);
  21814. }
  21815. }
  21816. /**
  21817. * Adds directives to a VNode.
  21818. */
  21819. function withDirectives(vnode, directives) {
  21820. const internalInstance = currentRenderingInstance;
  21821. if (internalInstance === null) {
  21822. ( true) && warn(`withDirectives can only be used inside render functions.`);
  21823. return vnode;
  21824. }
  21825. const instance = internalInstance.proxy;
  21826. const bindings = vnode.dirs || (vnode.dirs = []);
  21827. for (let i = 0; i < directives.length; i++) {
  21828. let [dir, value, arg, modifiers = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ] = directives[i];
  21829. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(dir)) {
  21830. dir = {
  21831. mounted: dir,
  21832. updated: dir
  21833. };
  21834. }
  21835. if (dir.deep) {
  21836. traverse(value);
  21837. }
  21838. bindings.push({
  21839. dir,
  21840. instance,
  21841. value,
  21842. oldValue: void 0,
  21843. arg,
  21844. modifiers
  21845. });
  21846. }
  21847. return vnode;
  21848. }
  21849. function invokeDirectiveHook(vnode, prevVNode, instance, name) {
  21850. const bindings = vnode.dirs;
  21851. const oldBindings = prevVNode && prevVNode.dirs;
  21852. for (let i = 0; i < bindings.length; i++) {
  21853. const binding = bindings[i];
  21854. if (oldBindings) {
  21855. binding.oldValue = oldBindings[i].value;
  21856. }
  21857. let hook = binding.dir[name];
  21858. if (hook) {
  21859. // disable tracking inside all lifecycle hooks
  21860. // since they can potentially be called inside effects.
  21861. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)();
  21862. callWithAsyncErrorHandling(hook, instance, 8 /* DIRECTIVE_HOOK */, [
  21863. vnode.el,
  21864. binding,
  21865. vnode,
  21866. prevVNode
  21867. ]);
  21868. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)();
  21869. }
  21870. }
  21871. }
  21872. function createAppContext() {
  21873. return {
  21874. app: null,
  21875. config: {
  21876. isNativeTag: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NO,
  21877. performance: false,
  21878. globalProperties: {},
  21879. optionMergeStrategies: {},
  21880. errorHandler: undefined,
  21881. warnHandler: undefined,
  21882. compilerOptions: {}
  21883. },
  21884. mixins: [],
  21885. components: {},
  21886. directives: {},
  21887. provides: Object.create(null),
  21888. optionsCache: new WeakMap(),
  21889. propsCache: new WeakMap(),
  21890. emitsCache: new WeakMap()
  21891. };
  21892. }
  21893. let uid = 0;
  21894. function createAppAPI(render, hydrate) {
  21895. return function createApp(rootComponent, rootProps = null) {
  21896. if (rootProps != null && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(rootProps)) {
  21897. ( true) && warn(`root props passed to app.mount() must be an object.`);
  21898. rootProps = null;
  21899. }
  21900. const context = createAppContext();
  21901. const installedPlugins = new Set();
  21902. let isMounted = false;
  21903. const app = (context.app = {
  21904. _uid: uid++,
  21905. _component: rootComponent,
  21906. _props: rootProps,
  21907. _container: null,
  21908. _context: context,
  21909. _instance: null,
  21910. version,
  21911. get config() {
  21912. return context.config;
  21913. },
  21914. set config(v) {
  21915. if ((true)) {
  21916. warn(`app.config cannot be replaced. Modify individual options instead.`);
  21917. }
  21918. },
  21919. use(plugin, ...options) {
  21920. if (installedPlugins.has(plugin)) {
  21921. ( true) && warn(`Plugin has already been applied to target app.`);
  21922. }
  21923. else if (plugin && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(plugin.install)) {
  21924. installedPlugins.add(plugin);
  21925. plugin.install(app, ...options);
  21926. }
  21927. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(plugin)) {
  21928. installedPlugins.add(plugin);
  21929. plugin(app, ...options);
  21930. }
  21931. else if ((true)) {
  21932. warn(`A plugin must either be a function or an object with an "install" ` +
  21933. `function.`);
  21934. }
  21935. return app;
  21936. },
  21937. mixin(mixin) {
  21938. if (true) {
  21939. if (!context.mixins.includes(mixin)) {
  21940. context.mixins.push(mixin);
  21941. }
  21942. else if ((true)) {
  21943. warn('Mixin has already been applied to target app' +
  21944. (mixin.name ? `: ${mixin.name}` : ''));
  21945. }
  21946. }
  21947. else {}
  21948. return app;
  21949. },
  21950. component(name, component) {
  21951. if ((true)) {
  21952. validateComponentName(name, context.config);
  21953. }
  21954. if (!component) {
  21955. return context.components[name];
  21956. }
  21957. if (( true) && context.components[name]) {
  21958. warn(`Component "${name}" has already been registered in target app.`);
  21959. }
  21960. context.components[name] = component;
  21961. return app;
  21962. },
  21963. directive(name, directive) {
  21964. if ((true)) {
  21965. validateDirectiveName(name);
  21966. }
  21967. if (!directive) {
  21968. return context.directives[name];
  21969. }
  21970. if (( true) && context.directives[name]) {
  21971. warn(`Directive "${name}" has already been registered in target app.`);
  21972. }
  21973. context.directives[name] = directive;
  21974. return app;
  21975. },
  21976. mount(rootContainer, isHydrate, isSVG) {
  21977. if (!isMounted) {
  21978. const vnode = createVNode(rootComponent, rootProps);
  21979. // store app context on the root VNode.
  21980. // this will be set on the root instance on initial mount.
  21981. vnode.appContext = context;
  21982. // HMR root reload
  21983. if ((true)) {
  21984. context.reload = () => {
  21985. render(cloneVNode(vnode), rootContainer, isSVG);
  21986. };
  21987. }
  21988. if (isHydrate && hydrate) {
  21989. hydrate(vnode, rootContainer);
  21990. }
  21991. else {
  21992. render(vnode, rootContainer, isSVG);
  21993. }
  21994. isMounted = true;
  21995. app._container = rootContainer;
  21996. rootContainer.__vue_app__ = app;
  21997. if (true) {
  21998. app._instance = vnode.component;
  21999. devtoolsInitApp(app, version);
  22000. }
  22001. return getExposeProxy(vnode.component) || vnode.component.proxy;
  22002. }
  22003. else if ((true)) {
  22004. warn(`App has already been mounted.\n` +
  22005. `If you want to remount the same app, move your app creation logic ` +
  22006. `into a factory function and create fresh app instances for each ` +
  22007. `mount - e.g. \`const createMyApp = () => createApp(App)\``);
  22008. }
  22009. },
  22010. unmount() {
  22011. if (isMounted) {
  22012. render(null, app._container);
  22013. if (true) {
  22014. app._instance = null;
  22015. devtoolsUnmountApp(app);
  22016. }
  22017. delete app._container.__vue_app__;
  22018. }
  22019. else if ((true)) {
  22020. warn(`Cannot unmount an app that is not mounted.`);
  22021. }
  22022. },
  22023. provide(key, value) {
  22024. if (( true) && key in context.provides) {
  22025. warn(`App already provides property with key "${String(key)}". ` +
  22026. `It will be overwritten with the new value.`);
  22027. }
  22028. // TypeScript doesn't allow symbols as index type
  22029. // https://github.com/Microsoft/TypeScript/issues/24587
  22030. context.provides[key] = value;
  22031. return app;
  22032. }
  22033. });
  22034. return app;
  22035. };
  22036. }
  22037. /**
  22038. * Function for handling a template ref
  22039. */
  22040. function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
  22041. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(rawRef)) {
  22042. rawRef.forEach((r, i) => setRef(r, oldRawRef && ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(oldRawRef) ? oldRawRef[i] : oldRawRef), parentSuspense, vnode, isUnmount));
  22043. return;
  22044. }
  22045. if (isAsyncWrapper(vnode) && !isUnmount) {
  22046. // when mounting async components, nothing needs to be done,
  22047. // because the template ref is forwarded to inner component
  22048. return;
  22049. }
  22050. const refValue = vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */
  22051. ? getExposeProxy(vnode.component) || vnode.component.proxy
  22052. : vnode.el;
  22053. const value = isUnmount ? null : refValue;
  22054. const { i: owner, r: ref } = rawRef;
  22055. if (( true) && !owner) {
  22056. warn(`Missing ref owner context. ref cannot be used on hoisted vnodes. ` +
  22057. `A vnode with ref must be created inside the render function.`);
  22058. return;
  22059. }
  22060. const oldRef = oldRawRef && oldRawRef.r;
  22061. const refs = owner.refs === _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ ? (owner.refs = {}) : owner.refs;
  22062. const setupState = owner.setupState;
  22063. // dynamic ref changed. unset old ref
  22064. if (oldRef != null && oldRef !== ref) {
  22065. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(oldRef)) {
  22066. refs[oldRef] = null;
  22067. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, oldRef)) {
  22068. setupState[oldRef] = null;
  22069. }
  22070. }
  22071. else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(oldRef)) {
  22072. oldRef.value = null;
  22073. }
  22074. }
  22075. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(ref)) {
  22076. callWithErrorHandling(ref, owner, 12 /* FUNCTION_REF */, [value, refs]);
  22077. }
  22078. else {
  22079. const _isString = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(ref);
  22080. const _isRef = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(ref);
  22081. if (_isString || _isRef) {
  22082. const doSet = () => {
  22083. if (rawRef.f) {
  22084. const existing = _isString ? refs[ref] : ref.value;
  22085. if (isUnmount) {
  22086. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(existing) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.remove)(existing, refValue);
  22087. }
  22088. else {
  22089. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(existing)) {
  22090. if (_isString) {
  22091. refs[ref] = [refValue];
  22092. }
  22093. else {
  22094. ref.value = [refValue];
  22095. if (rawRef.k)
  22096. refs[rawRef.k] = ref.value;
  22097. }
  22098. }
  22099. else if (!existing.includes(refValue)) {
  22100. existing.push(refValue);
  22101. }
  22102. }
  22103. }
  22104. else if (_isString) {
  22105. refs[ref] = value;
  22106. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, ref)) {
  22107. setupState[ref] = value;
  22108. }
  22109. }
  22110. else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(ref)) {
  22111. ref.value = value;
  22112. if (rawRef.k)
  22113. refs[rawRef.k] = value;
  22114. }
  22115. else if ((true)) {
  22116. warn('Invalid template ref type:', ref, `(${typeof ref})`);
  22117. }
  22118. };
  22119. if (value) {
  22120. doSet.id = -1;
  22121. queuePostRenderEffect(doSet, parentSuspense);
  22122. }
  22123. else {
  22124. doSet();
  22125. }
  22126. }
  22127. else if ((true)) {
  22128. warn('Invalid template ref type:', ref, `(${typeof ref})`);
  22129. }
  22130. }
  22131. }
  22132. let hasMismatch = false;
  22133. const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== 'foreignObject';
  22134. const isComment = (node) => node.nodeType === 8 /* COMMENT */;
  22135. // Note: hydration is DOM-specific
  22136. // But we have to place it in core due to tight coupling with core - splitting
  22137. // it out creates a ton of unnecessary complexity.
  22138. // Hydration also depends on some renderer internal logic which needs to be
  22139. // passed in via arguments.
  22140. function createHydrationFunctions(rendererInternals) {
  22141. const { mt: mountComponent, p: patch, o: { patchProp, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
  22142. const hydrate = (vnode, container) => {
  22143. if (!container.hasChildNodes()) {
  22144. ( true) &&
  22145. warn(`Attempting to hydrate existing markup but container is empty. ` +
  22146. `Performing full mount instead.`);
  22147. patch(null, vnode, container);
  22148. flushPostFlushCbs();
  22149. return;
  22150. }
  22151. hasMismatch = false;
  22152. hydrateNode(container.firstChild, vnode, null, null, null);
  22153. flushPostFlushCbs();
  22154. if (hasMismatch && !false) {
  22155. // this error should show up in production
  22156. console.error(`Hydration completed but contains mismatches.`);
  22157. }
  22158. };
  22159. const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
  22160. const isFragmentStart = isComment(node) && node.data === '[';
  22161. const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
  22162. const { type, ref, shapeFlag } = vnode;
  22163. const domType = node.nodeType;
  22164. vnode.el = node;
  22165. let nextNode = null;
  22166. switch (type) {
  22167. case Text:
  22168. if (domType !== 3 /* TEXT */) {
  22169. nextNode = onMismatch();
  22170. }
  22171. else {
  22172. if (node.data !== vnode.children) {
  22173. hasMismatch = true;
  22174. ( true) &&
  22175. warn(`Hydration text mismatch:` +
  22176. `\n- Client: ${JSON.stringify(node.data)}` +
  22177. `\n- Server: ${JSON.stringify(vnode.children)}`);
  22178. node.data = vnode.children;
  22179. }
  22180. nextNode = nextSibling(node);
  22181. }
  22182. break;
  22183. case Comment:
  22184. if (domType !== 8 /* COMMENT */ || isFragmentStart) {
  22185. nextNode = onMismatch();
  22186. }
  22187. else {
  22188. nextNode = nextSibling(node);
  22189. }
  22190. break;
  22191. case Static:
  22192. if (domType !== 1 /* ELEMENT */) {
  22193. nextNode = onMismatch();
  22194. }
  22195. else {
  22196. // determine anchor, adopt content
  22197. nextNode = node;
  22198. // if the static vnode has its content stripped during build,
  22199. // adopt it from the server-rendered HTML.
  22200. const needToAdoptContent = !vnode.children.length;
  22201. for (let i = 0; i < vnode.staticCount; i++) {
  22202. if (needToAdoptContent)
  22203. vnode.children += nextNode.outerHTML;
  22204. if (i === vnode.staticCount - 1) {
  22205. vnode.anchor = nextNode;
  22206. }
  22207. nextNode = nextSibling(nextNode);
  22208. }
  22209. return nextNode;
  22210. }
  22211. break;
  22212. case Fragment:
  22213. if (!isFragmentStart) {
  22214. nextNode = onMismatch();
  22215. }
  22216. else {
  22217. nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
  22218. }
  22219. break;
  22220. default:
  22221. if (shapeFlag & 1 /* ELEMENT */) {
  22222. if (domType !== 1 /* ELEMENT */ ||
  22223. vnode.type.toLowerCase() !==
  22224. node.tagName.toLowerCase()) {
  22225. nextNode = onMismatch();
  22226. }
  22227. else {
  22228. nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
  22229. }
  22230. }
  22231. else if (shapeFlag & 6 /* COMPONENT */) {
  22232. // when setting up the render effect, if the initial vnode already
  22233. // has .el set, the component will perform hydration instead of mount
  22234. // on its sub-tree.
  22235. vnode.slotScopeIds = slotScopeIds;
  22236. const container = parentNode(node);
  22237. mountComponent(vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), optimized);
  22238. // component may be async, so in the case of fragments we cannot rely
  22239. // on component's rendered output to determine the end of the fragment
  22240. // instead, we do a lookahead to find the end anchor node.
  22241. nextNode = isFragmentStart
  22242. ? locateClosingAsyncAnchor(node)
  22243. : nextSibling(node);
  22244. // #3787
  22245. // if component is async, it may get moved / unmounted before its
  22246. // inner component is loaded, so we need to give it a placeholder
  22247. // vnode that matches its adopted DOM.
  22248. if (isAsyncWrapper(vnode)) {
  22249. let subTree;
  22250. if (isFragmentStart) {
  22251. subTree = createVNode(Fragment);
  22252. subTree.anchor = nextNode
  22253. ? nextNode.previousSibling
  22254. : container.lastChild;
  22255. }
  22256. else {
  22257. subTree =
  22258. node.nodeType === 3 ? createTextVNode('') : createVNode('div');
  22259. }
  22260. subTree.el = node;
  22261. vnode.component.subTree = subTree;
  22262. }
  22263. }
  22264. else if (shapeFlag & 64 /* TELEPORT */) {
  22265. if (domType !== 8 /* COMMENT */) {
  22266. nextNode = onMismatch();
  22267. }
  22268. else {
  22269. nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
  22270. }
  22271. }
  22272. else if (shapeFlag & 128 /* SUSPENSE */) {
  22273. nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, isSVGContainer(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
  22274. }
  22275. else if ((true)) {
  22276. warn('Invalid HostVNode type:', type, `(${typeof type})`);
  22277. }
  22278. }
  22279. if (ref != null) {
  22280. setRef(ref, null, parentSuspense, vnode);
  22281. }
  22282. return nextNode;
  22283. };
  22284. const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  22285. optimized = optimized || !!vnode.dynamicChildren;
  22286. const { type, props, patchFlag, shapeFlag, dirs } = vnode;
  22287. // #4006 for form elements with non-string v-model value bindings
  22288. // e.g. <option :value="obj">, <input type="checkbox" :true-value="1">
  22289. const forcePatchValue = (type === 'input' && dirs) || type === 'option';
  22290. // skip props & children if this is hoisted static nodes
  22291. // #5405 in dev, always hydrate children for HMR
  22292. if (true /* HOISTED */) {
  22293. if (dirs) {
  22294. invokeDirectiveHook(vnode, null, parentComponent, 'created');
  22295. }
  22296. // props
  22297. if (props) {
  22298. if (forcePatchValue ||
  22299. !optimized ||
  22300. patchFlag & (16 /* FULL_PROPS */ | 32 /* HYDRATE_EVENTS */)) {
  22301. for (const key in props) {
  22302. if ((forcePatchValue && key.endsWith('value')) ||
  22303. ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key))) {
  22304. patchProp(el, key, null, props[key], false, undefined, parentComponent);
  22305. }
  22306. }
  22307. }
  22308. else if (props.onClick) {
  22309. // Fast path for click listeners (which is most often) to avoid
  22310. // iterating through props.
  22311. patchProp(el, 'onClick', null, props.onClick, false, undefined, parentComponent);
  22312. }
  22313. }
  22314. // vnode / directive hooks
  22315. let vnodeHooks;
  22316. if ((vnodeHooks = props && props.onVnodeBeforeMount)) {
  22317. invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  22318. }
  22319. if (dirs) {
  22320. invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount');
  22321. }
  22322. if ((vnodeHooks = props && props.onVnodeMounted) || dirs) {
  22323. queueEffectWithSuspense(() => {
  22324. vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
  22325. dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted');
  22326. }, parentSuspense);
  22327. }
  22328. // children
  22329. if (shapeFlag & 16 /* ARRAY_CHILDREN */ &&
  22330. // skip if element has innerHTML / textContent
  22331. !(props && (props.innerHTML || props.textContent))) {
  22332. let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
  22333. let hasWarned = false;
  22334. while (next) {
  22335. hasMismatch = true;
  22336. if (( true) && !hasWarned) {
  22337. warn(`Hydration children mismatch in <${vnode.type}>: ` +
  22338. `server rendered element contains more child nodes than client vdom.`);
  22339. hasWarned = true;
  22340. }
  22341. // The SSRed DOM contains more nodes than it should. Remove them.
  22342. const cur = next;
  22343. next = next.nextSibling;
  22344. remove(cur);
  22345. }
  22346. }
  22347. else if (shapeFlag & 8 /* TEXT_CHILDREN */) {
  22348. if (el.textContent !== vnode.children) {
  22349. hasMismatch = true;
  22350. ( true) &&
  22351. warn(`Hydration text content mismatch in <${vnode.type}>:\n` +
  22352. `- Client: ${el.textContent}\n` +
  22353. `- Server: ${vnode.children}`);
  22354. el.textContent = vnode.children;
  22355. }
  22356. }
  22357. }
  22358. return el.nextSibling;
  22359. };
  22360. const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  22361. optimized = optimized || !!parentVNode.dynamicChildren;
  22362. const children = parentVNode.children;
  22363. const l = children.length;
  22364. let hasWarned = false;
  22365. for (let i = 0; i < l; i++) {
  22366. const vnode = optimized
  22367. ? children[i]
  22368. : (children[i] = normalizeVNode(children[i]));
  22369. if (node) {
  22370. node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
  22371. }
  22372. else if (vnode.type === Text && !vnode.children) {
  22373. continue;
  22374. }
  22375. else {
  22376. hasMismatch = true;
  22377. if (( true) && !hasWarned) {
  22378. warn(`Hydration children mismatch in <${container.tagName.toLowerCase()}>: ` +
  22379. `server rendered element contains fewer child nodes than client vdom.`);
  22380. hasWarned = true;
  22381. }
  22382. // the SSRed DOM didn't contain enough nodes. Mount the missing ones.
  22383. patch(null, vnode, container, null, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds);
  22384. }
  22385. }
  22386. return node;
  22387. };
  22388. const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
  22389. const { slotScopeIds: fragmentSlotScopeIds } = vnode;
  22390. if (fragmentSlotScopeIds) {
  22391. slotScopeIds = slotScopeIds
  22392. ? slotScopeIds.concat(fragmentSlotScopeIds)
  22393. : fragmentSlotScopeIds;
  22394. }
  22395. const container = parentNode(node);
  22396. const next = hydrateChildren(nextSibling(node), vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
  22397. if (next && isComment(next) && next.data === ']') {
  22398. return nextSibling((vnode.anchor = next));
  22399. }
  22400. else {
  22401. // fragment didn't hydrate successfully, since we didn't get a end anchor
  22402. // back. This should have led to node/children mismatch warnings.
  22403. hasMismatch = true;
  22404. // since the anchor is missing, we need to create one and insert it
  22405. insert((vnode.anchor = createComment(`]`)), container, next);
  22406. return next;
  22407. }
  22408. };
  22409. const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
  22410. hasMismatch = true;
  22411. ( true) &&
  22412. warn(`Hydration node mismatch:\n- Client vnode:`, vnode.type, `\n- Server rendered DOM:`, node, node.nodeType === 3 /* TEXT */
  22413. ? `(text)`
  22414. : isComment(node) && node.data === '['
  22415. ? `(start of fragment)`
  22416. : ``);
  22417. vnode.el = null;
  22418. if (isFragment) {
  22419. // remove excessive fragment nodes
  22420. const end = locateClosingAsyncAnchor(node);
  22421. while (true) {
  22422. const next = nextSibling(node);
  22423. if (next && next !== end) {
  22424. remove(next);
  22425. }
  22426. else {
  22427. break;
  22428. }
  22429. }
  22430. }
  22431. const next = nextSibling(node);
  22432. const container = parentNode(node);
  22433. remove(node);
  22434. patch(null, vnode, container, next, parentComponent, parentSuspense, isSVGContainer(container), slotScopeIds);
  22435. return next;
  22436. };
  22437. const locateClosingAsyncAnchor = (node) => {
  22438. let match = 0;
  22439. while (node) {
  22440. node = nextSibling(node);
  22441. if (node && isComment(node)) {
  22442. if (node.data === '[')
  22443. match++;
  22444. if (node.data === ']') {
  22445. if (match === 0) {
  22446. return nextSibling(node);
  22447. }
  22448. else {
  22449. match--;
  22450. }
  22451. }
  22452. }
  22453. }
  22454. return node;
  22455. };
  22456. return [hydrate, hydrateNode];
  22457. }
  22458. /* eslint-disable no-restricted-globals */
  22459. let supported;
  22460. let perf;
  22461. function startMeasure(instance, type) {
  22462. if (instance.appContext.config.performance && isSupported()) {
  22463. perf.mark(`vue-${type}-${instance.uid}`);
  22464. }
  22465. if (true) {
  22466. devtoolsPerfStart(instance, type, supported ? perf.now() : Date.now());
  22467. }
  22468. }
  22469. function endMeasure(instance, type) {
  22470. if (instance.appContext.config.performance && isSupported()) {
  22471. const startTag = `vue-${type}-${instance.uid}`;
  22472. const endTag = startTag + `:end`;
  22473. perf.mark(endTag);
  22474. perf.measure(`<${formatComponentName(instance, instance.type)}> ${type}`, startTag, endTag);
  22475. perf.clearMarks(startTag);
  22476. perf.clearMarks(endTag);
  22477. }
  22478. if (true) {
  22479. devtoolsPerfEnd(instance, type, supported ? perf.now() : Date.now());
  22480. }
  22481. }
  22482. function isSupported() {
  22483. if (supported !== undefined) {
  22484. return supported;
  22485. }
  22486. if (typeof window !== 'undefined' && window.performance) {
  22487. supported = true;
  22488. perf = window.performance;
  22489. }
  22490. else {
  22491. supported = false;
  22492. }
  22493. return supported;
  22494. }
  22495. /**
  22496. * This is only called in esm-bundler builds.
  22497. * It is called when a renderer is created, in `baseCreateRenderer` so that
  22498. * importing runtime-core is side-effects free.
  22499. *
  22500. * istanbul-ignore-next
  22501. */
  22502. function initFeatureFlags() {
  22503. const needWarn = [];
  22504. if (false) {}
  22505. if (false) {}
  22506. if (( true) && needWarn.length) {
  22507. const multi = needWarn.length > 1;
  22508. console.warn(`Feature flag${multi ? `s` : ``} ${needWarn.join(', ')} ${multi ? `are` : `is`} not explicitly defined. You are running the esm-bundler build of Vue, ` +
  22509. `which expects these compile-time feature flags to be globally injected ` +
  22510. `via the bundler config in order to get better tree-shaking in the ` +
  22511. `production bundle.\n\n` +
  22512. `For more details, see https://link.vuejs.org/feature-flags.`);
  22513. }
  22514. }
  22515. const queuePostRenderEffect = queueEffectWithSuspense
  22516. ;
  22517. /**
  22518. * The createRenderer function accepts two generic arguments:
  22519. * HostNode and HostElement, corresponding to Node and Element types in the
  22520. * host environment. For example, for runtime-dom, HostNode would be the DOM
  22521. * `Node` interface and HostElement would be the DOM `Element` interface.
  22522. *
  22523. * Custom renderers can pass in the platform specific types like this:
  22524. *
  22525. * ``` js
  22526. * const { render, createApp } = createRenderer<Node, Element>({
  22527. * patchProp,
  22528. * ...nodeOps
  22529. * })
  22530. * ```
  22531. */
  22532. function createRenderer(options) {
  22533. return baseCreateRenderer(options);
  22534. }
  22535. // Separate API for creating hydration-enabled renderer.
  22536. // Hydration logic is only used when calling this function, making it
  22537. // tree-shakable.
  22538. function createHydrationRenderer(options) {
  22539. return baseCreateRenderer(options, createHydrationFunctions);
  22540. }
  22541. // implementation
  22542. function baseCreateRenderer(options, createHydrationFns) {
  22543. // compile-time feature flags check
  22544. {
  22545. initFeatureFlags();
  22546. }
  22547. const target = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.getGlobalThis)();
  22548. target.__VUE__ = true;
  22549. if (true) {
  22550. setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
  22551. }
  22552. const { insert: hostInsert, remove: hostRemove, patchProp: hostPatchProp, createElement: hostCreateElement, createText: hostCreateText, createComment: hostCreateComment, setText: hostSetText, setElementText: hostSetElementText, parentNode: hostParentNode, nextSibling: hostNextSibling, setScopeId: hostSetScopeId = _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP, cloneNode: hostCloneNode, insertStaticContent: hostInsertStaticContent } = options;
  22553. // Note: functions inside this closure should use `const xxx = () => {}`
  22554. // style in order to prevent being inlined by minifiers.
  22555. const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = ( true) && isHmrUpdating ? false : !!n2.dynamicChildren) => {
  22556. if (n1 === n2) {
  22557. return;
  22558. }
  22559. // patching & not same type, unmount old tree
  22560. if (n1 && !isSameVNodeType(n1, n2)) {
  22561. anchor = getNextHostNode(n1);
  22562. unmount(n1, parentComponent, parentSuspense, true);
  22563. n1 = null;
  22564. }
  22565. if (n2.patchFlag === -2 /* BAIL */) {
  22566. optimized = false;
  22567. n2.dynamicChildren = null;
  22568. }
  22569. const { type, ref, shapeFlag } = n2;
  22570. switch (type) {
  22571. case Text:
  22572. processText(n1, n2, container, anchor);
  22573. break;
  22574. case Comment:
  22575. processCommentNode(n1, n2, container, anchor);
  22576. break;
  22577. case Static:
  22578. if (n1 == null) {
  22579. mountStaticNode(n2, container, anchor, isSVG);
  22580. }
  22581. else if ((true)) {
  22582. patchStaticNode(n1, n2, container, isSVG);
  22583. }
  22584. break;
  22585. case Fragment:
  22586. processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  22587. break;
  22588. default:
  22589. if (shapeFlag & 1 /* ELEMENT */) {
  22590. processElement(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  22591. }
  22592. else if (shapeFlag & 6 /* COMPONENT */) {
  22593. processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  22594. }
  22595. else if (shapeFlag & 64 /* TELEPORT */) {
  22596. type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
  22597. }
  22598. else if (shapeFlag & 128 /* SUSPENSE */) {
  22599. type.process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals);
  22600. }
  22601. else if ((true)) {
  22602. warn('Invalid VNode type:', type, `(${typeof type})`);
  22603. }
  22604. }
  22605. // set ref
  22606. if (ref != null && parentComponent) {
  22607. setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
  22608. }
  22609. };
  22610. const processText = (n1, n2, container, anchor) => {
  22611. if (n1 == null) {
  22612. hostInsert((n2.el = hostCreateText(n2.children)), container, anchor);
  22613. }
  22614. else {
  22615. const el = (n2.el = n1.el);
  22616. if (n2.children !== n1.children) {
  22617. hostSetText(el, n2.children);
  22618. }
  22619. }
  22620. };
  22621. const processCommentNode = (n1, n2, container, anchor) => {
  22622. if (n1 == null) {
  22623. hostInsert((n2.el = hostCreateComment(n2.children || '')), container, anchor);
  22624. }
  22625. else {
  22626. // there's no support for dynamic comments
  22627. n2.el = n1.el;
  22628. }
  22629. };
  22630. const mountStaticNode = (n2, container, anchor, isSVG) => {
  22631. [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG, n2.el, n2.anchor);
  22632. };
  22633. /**
  22634. * Dev / HMR only
  22635. */
  22636. const patchStaticNode = (n1, n2, container, isSVG) => {
  22637. // static nodes are only patched during dev for HMR
  22638. if (n2.children !== n1.children) {
  22639. const anchor = hostNextSibling(n1.anchor);
  22640. // remove existing
  22641. removeStaticNode(n1);
  22642. [n2.el, n2.anchor] = hostInsertStaticContent(n2.children, container, anchor, isSVG);
  22643. }
  22644. else {
  22645. n2.el = n1.el;
  22646. n2.anchor = n1.anchor;
  22647. }
  22648. };
  22649. const moveStaticNode = ({ el, anchor }, container, nextSibling) => {
  22650. let next;
  22651. while (el && el !== anchor) {
  22652. next = hostNextSibling(el);
  22653. hostInsert(el, container, nextSibling);
  22654. el = next;
  22655. }
  22656. hostInsert(anchor, container, nextSibling);
  22657. };
  22658. const removeStaticNode = ({ el, anchor }) => {
  22659. let next;
  22660. while (el && el !== anchor) {
  22661. next = hostNextSibling(el);
  22662. hostRemove(el);
  22663. el = next;
  22664. }
  22665. hostRemove(anchor);
  22666. };
  22667. const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  22668. isSVG = isSVG || n2.type === 'svg';
  22669. if (n1 == null) {
  22670. mountElement(n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  22671. }
  22672. else {
  22673. patchElement(n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  22674. }
  22675. };
  22676. const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  22677. let el;
  22678. let vnodeHook;
  22679. const { type, props, shapeFlag, transition, patchFlag, dirs } = vnode;
  22680. if (false /* HOISTED */) {}
  22681. else {
  22682. el = vnode.el = hostCreateElement(vnode.type, isSVG, props && props.is, props);
  22683. // mount children first, since some props may rely on child content
  22684. // being already rendered, e.g. `<select value>`
  22685. if (shapeFlag & 8 /* TEXT_CHILDREN */) {
  22686. hostSetElementText(el, vnode.children);
  22687. }
  22688. else if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
  22689. mountChildren(vnode.children, el, null, parentComponent, parentSuspense, isSVG && type !== 'foreignObject', slotScopeIds, optimized);
  22690. }
  22691. if (dirs) {
  22692. invokeDirectiveHook(vnode, null, parentComponent, 'created');
  22693. }
  22694. // props
  22695. if (props) {
  22696. for (const key in props) {
  22697. if (key !== 'value' && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key)) {
  22698. hostPatchProp(el, key, null, props[key], isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren);
  22699. }
  22700. }
  22701. /**
  22702. * Special case for setting value on DOM elements:
  22703. * - it can be order-sensitive (e.g. should be set *after* min/max, #2325, #4024)
  22704. * - it needs to be forced (#1471)
  22705. * #2353 proposes adding another renderer option to configure this, but
  22706. * the properties affects are so finite it is worth special casing it
  22707. * here to reduce the complexity. (Special casing it also should not
  22708. * affect non-DOM renderers)
  22709. */
  22710. if ('value' in props) {
  22711. hostPatchProp(el, 'value', null, props.value);
  22712. }
  22713. if ((vnodeHook = props.onVnodeBeforeMount)) {
  22714. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  22715. }
  22716. }
  22717. // scopeId
  22718. setScopeId(el, vnode, vnode.scopeId, slotScopeIds, parentComponent);
  22719. }
  22720. if (true) {
  22721. Object.defineProperty(el, '__vnode', {
  22722. value: vnode,
  22723. enumerable: false
  22724. });
  22725. Object.defineProperty(el, '__vueParentComponent', {
  22726. value: parentComponent,
  22727. enumerable: false
  22728. });
  22729. }
  22730. if (dirs) {
  22731. invokeDirectiveHook(vnode, null, parentComponent, 'beforeMount');
  22732. }
  22733. // #1583 For inside suspense + suspense not resolved case, enter hook should call when suspense resolved
  22734. // #1689 For inside suspense + suspense resolved case, just call it
  22735. const needCallTransitionHooks = (!parentSuspense || (parentSuspense && !parentSuspense.pendingBranch)) &&
  22736. transition &&
  22737. !transition.persisted;
  22738. if (needCallTransitionHooks) {
  22739. transition.beforeEnter(el);
  22740. }
  22741. hostInsert(el, container, anchor);
  22742. if ((vnodeHook = props && props.onVnodeMounted) ||
  22743. needCallTransitionHooks ||
  22744. dirs) {
  22745. queuePostRenderEffect(() => {
  22746. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  22747. needCallTransitionHooks && transition.enter(el);
  22748. dirs && invokeDirectiveHook(vnode, null, parentComponent, 'mounted');
  22749. }, parentSuspense);
  22750. }
  22751. };
  22752. const setScopeId = (el, vnode, scopeId, slotScopeIds, parentComponent) => {
  22753. if (scopeId) {
  22754. hostSetScopeId(el, scopeId);
  22755. }
  22756. if (slotScopeIds) {
  22757. for (let i = 0; i < slotScopeIds.length; i++) {
  22758. hostSetScopeId(el, slotScopeIds[i]);
  22759. }
  22760. }
  22761. if (parentComponent) {
  22762. let subTree = parentComponent.subTree;
  22763. if (( true) &&
  22764. subTree.patchFlag > 0 &&
  22765. subTree.patchFlag & 2048 /* DEV_ROOT_FRAGMENT */) {
  22766. subTree =
  22767. filterSingleRoot(subTree.children) || subTree;
  22768. }
  22769. if (vnode === subTree) {
  22770. const parentVNode = parentComponent.vnode;
  22771. setScopeId(el, parentVNode, parentVNode.scopeId, parentVNode.slotScopeIds, parentComponent.parent);
  22772. }
  22773. }
  22774. };
  22775. const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => {
  22776. for (let i = start; i < children.length; i++) {
  22777. const child = (children[i] = optimized
  22778. ? cloneIfMounted(children[i])
  22779. : normalizeVNode(children[i]));
  22780. patch(null, child, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  22781. }
  22782. };
  22783. const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  22784. const el = (n2.el = n1.el);
  22785. let { patchFlag, dynamicChildren, dirs } = n2;
  22786. // #1426 take the old vnode's patch flag into account since user may clone a
  22787. // compiler-generated vnode, which de-opts to FULL_PROPS
  22788. patchFlag |= n1.patchFlag & 16 /* FULL_PROPS */;
  22789. const oldProps = n1.props || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
  22790. const newProps = n2.props || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
  22791. let vnodeHook;
  22792. // disable recurse in beforeUpdate hooks
  22793. parentComponent && toggleRecurse(parentComponent, false);
  22794. if ((vnodeHook = newProps.onVnodeBeforeUpdate)) {
  22795. invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  22796. }
  22797. if (dirs) {
  22798. invokeDirectiveHook(n2, n1, parentComponent, 'beforeUpdate');
  22799. }
  22800. parentComponent && toggleRecurse(parentComponent, true);
  22801. if (( true) && isHmrUpdating) {
  22802. // HMR updated, force full diff
  22803. patchFlag = 0;
  22804. optimized = false;
  22805. dynamicChildren = null;
  22806. }
  22807. const areChildrenSVG = isSVG && n2.type !== 'foreignObject';
  22808. if (dynamicChildren) {
  22809. patchBlockChildren(n1.dynamicChildren, dynamicChildren, el, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds);
  22810. if (( true) && parentComponent && parentComponent.type.__hmrId) {
  22811. traverseStaticChildren(n1, n2);
  22812. }
  22813. }
  22814. else if (!optimized) {
  22815. // full diff
  22816. patchChildren(n1, n2, el, null, parentComponent, parentSuspense, areChildrenSVG, slotScopeIds, false);
  22817. }
  22818. if (patchFlag > 0) {
  22819. // the presence of a patchFlag means this element's render code was
  22820. // generated by the compiler and can take the fast path.
  22821. // in this path old node and new node are guaranteed to have the same shape
  22822. // (i.e. at the exact same position in the source template)
  22823. if (patchFlag & 16 /* FULL_PROPS */) {
  22824. // element props contain dynamic keys, full diff needed
  22825. patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
  22826. }
  22827. else {
  22828. // class
  22829. // this flag is matched when the element has dynamic class bindings.
  22830. if (patchFlag & 2 /* CLASS */) {
  22831. if (oldProps.class !== newProps.class) {
  22832. hostPatchProp(el, 'class', null, newProps.class, isSVG);
  22833. }
  22834. }
  22835. // style
  22836. // this flag is matched when the element has dynamic style bindings
  22837. if (patchFlag & 4 /* STYLE */) {
  22838. hostPatchProp(el, 'style', oldProps.style, newProps.style, isSVG);
  22839. }
  22840. // props
  22841. // This flag is matched when the element has dynamic prop/attr bindings
  22842. // other than class and style. The keys of dynamic prop/attrs are saved for
  22843. // faster iteration.
  22844. // Note dynamic keys like :[foo]="bar" will cause this optimization to
  22845. // bail out and go through a full diff because we need to unset the old key
  22846. if (patchFlag & 8 /* PROPS */) {
  22847. // if the flag is present then dynamicProps must be non-null
  22848. const propsToUpdate = n2.dynamicProps;
  22849. for (let i = 0; i < propsToUpdate.length; i++) {
  22850. const key = propsToUpdate[i];
  22851. const prev = oldProps[key];
  22852. const next = newProps[key];
  22853. // #1471 force patch value
  22854. if (next !== prev || key === 'value') {
  22855. hostPatchProp(el, key, prev, next, isSVG, n1.children, parentComponent, parentSuspense, unmountChildren);
  22856. }
  22857. }
  22858. }
  22859. }
  22860. // text
  22861. // This flag is matched when the element has only dynamic text children.
  22862. if (patchFlag & 1 /* TEXT */) {
  22863. if (n1.children !== n2.children) {
  22864. hostSetElementText(el, n2.children);
  22865. }
  22866. }
  22867. }
  22868. else if (!optimized && dynamicChildren == null) {
  22869. // unoptimized, full diff
  22870. patchProps(el, n2, oldProps, newProps, parentComponent, parentSuspense, isSVG);
  22871. }
  22872. if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
  22873. queuePostRenderEffect(() => {
  22874. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
  22875. dirs && invokeDirectiveHook(n2, n1, parentComponent, 'updated');
  22876. }, parentSuspense);
  22877. }
  22878. };
  22879. // The fast path for blocks.
  22880. const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => {
  22881. for (let i = 0; i < newChildren.length; i++) {
  22882. const oldVNode = oldChildren[i];
  22883. const newVNode = newChildren[i];
  22884. // Determine the container (parent element) for the patch.
  22885. const container =
  22886. // oldVNode may be an errored async setup() component inside Suspense
  22887. // which will not have a mounted element
  22888. oldVNode.el &&
  22889. // - In the case of a Fragment, we need to provide the actual parent
  22890. // of the Fragment itself so it can move its children.
  22891. (oldVNode.type === Fragment ||
  22892. // - In the case of different nodes, there is going to be a replacement
  22893. // which also requires the correct parent container
  22894. !isSameVNodeType(oldVNode, newVNode) ||
  22895. // - In the case of a component, it could contain anything.
  22896. oldVNode.shapeFlag & (6 /* COMPONENT */ | 64 /* TELEPORT */))
  22897. ? hostParentNode(oldVNode.el)
  22898. : // In other cases, the parent container is not actually used so we
  22899. // just pass the block element here to avoid a DOM parentNode call.
  22900. fallbackContainer;
  22901. patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, true);
  22902. }
  22903. };
  22904. const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => {
  22905. if (oldProps !== newProps) {
  22906. for (const key in newProps) {
  22907. // empty string is not valid prop
  22908. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key))
  22909. continue;
  22910. const next = newProps[key];
  22911. const prev = oldProps[key];
  22912. // defer patching value
  22913. if (next !== prev && key !== 'value') {
  22914. hostPatchProp(el, key, prev, next, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren);
  22915. }
  22916. }
  22917. if (oldProps !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) {
  22918. for (const key in oldProps) {
  22919. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isReservedProp)(key) && !(key in newProps)) {
  22920. hostPatchProp(el, key, oldProps[key], null, isSVG, vnode.children, parentComponent, parentSuspense, unmountChildren);
  22921. }
  22922. }
  22923. }
  22924. if ('value' in newProps) {
  22925. hostPatchProp(el, 'value', oldProps.value, newProps.value);
  22926. }
  22927. }
  22928. };
  22929. const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  22930. const fragmentStartAnchor = (n2.el = n1 ? n1.el : hostCreateText(''));
  22931. const fragmentEndAnchor = (n2.anchor = n1 ? n1.anchor : hostCreateText(''));
  22932. let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
  22933. if (( true) && isHmrUpdating) {
  22934. // HMR updated, force full diff
  22935. patchFlag = 0;
  22936. optimized = false;
  22937. dynamicChildren = null;
  22938. }
  22939. // check if this is a slot fragment with :slotted scope ids
  22940. if (fragmentSlotScopeIds) {
  22941. slotScopeIds = slotScopeIds
  22942. ? slotScopeIds.concat(fragmentSlotScopeIds)
  22943. : fragmentSlotScopeIds;
  22944. }
  22945. if (n1 == null) {
  22946. hostInsert(fragmentStartAnchor, container, anchor);
  22947. hostInsert(fragmentEndAnchor, container, anchor);
  22948. // a fragment can only have array children
  22949. // since they are either generated by the compiler, or implicitly created
  22950. // from arrays.
  22951. mountChildren(n2.children, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  22952. }
  22953. else {
  22954. if (patchFlag > 0 &&
  22955. patchFlag & 64 /* STABLE_FRAGMENT */ &&
  22956. dynamicChildren &&
  22957. // #2715 the previous fragment could've been a BAILed one as a result
  22958. // of renderSlot() with no valid children
  22959. n1.dynamicChildren) {
  22960. // a stable fragment (template root or <template v-for>) doesn't need to
  22961. // patch children order, but it may contain dynamicChildren.
  22962. patchBlockChildren(n1.dynamicChildren, dynamicChildren, container, parentComponent, parentSuspense, isSVG, slotScopeIds);
  22963. if (( true) && parentComponent && parentComponent.type.__hmrId) {
  22964. traverseStaticChildren(n1, n2);
  22965. }
  22966. else if (
  22967. // #2080 if the stable fragment has a key, it's a <template v-for> that may
  22968. // get moved around. Make sure all root level vnodes inherit el.
  22969. // #2134 or if it's a component root, it may also get moved around
  22970. // as the component is being moved.
  22971. n2.key != null ||
  22972. (parentComponent && n2 === parentComponent.subTree)) {
  22973. traverseStaticChildren(n1, n2, true /* shallow */);
  22974. }
  22975. }
  22976. else {
  22977. // keyed / unkeyed, or manual fragments.
  22978. // for keyed & unkeyed, since they are compiler generated from v-for,
  22979. // each child is guaranteed to be a block so the fragment will never
  22980. // have dynamicChildren.
  22981. patchChildren(n1, n2, container, fragmentEndAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  22982. }
  22983. }
  22984. };
  22985. const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  22986. n2.slotScopeIds = slotScopeIds;
  22987. if (n1 == null) {
  22988. if (n2.shapeFlag & 512 /* COMPONENT_KEPT_ALIVE */) {
  22989. parentComponent.ctx.activate(n2, container, anchor, isSVG, optimized);
  22990. }
  22991. else {
  22992. mountComponent(n2, container, anchor, parentComponent, parentSuspense, isSVG, optimized);
  22993. }
  22994. }
  22995. else {
  22996. updateComponent(n1, n2, optimized);
  22997. }
  22998. };
  22999. const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {
  23000. const instance = (initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense));
  23001. if (( true) && instance.type.__hmrId) {
  23002. registerHMR(instance);
  23003. }
  23004. if ((true)) {
  23005. pushWarningContext(initialVNode);
  23006. startMeasure(instance, `mount`);
  23007. }
  23008. // inject renderer internals for keepAlive
  23009. if (isKeepAlive(initialVNode)) {
  23010. instance.ctx.renderer = internals;
  23011. }
  23012. // resolve props and slots for setup context
  23013. {
  23014. if ((true)) {
  23015. startMeasure(instance, `init`);
  23016. }
  23017. setupComponent(instance);
  23018. if ((true)) {
  23019. endMeasure(instance, `init`);
  23020. }
  23021. }
  23022. // setup() is async. This component relies on async logic to be resolved
  23023. // before proceeding
  23024. if (instance.asyncDep) {
  23025. parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect);
  23026. // Give it a placeholder if this is not hydration
  23027. // TODO handle self-defined fallback
  23028. if (!initialVNode.el) {
  23029. const placeholder = (instance.subTree = createVNode(Comment));
  23030. processCommentNode(null, placeholder, container, anchor);
  23031. }
  23032. return;
  23033. }
  23034. setupRenderEffect(instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized);
  23035. if ((true)) {
  23036. popWarningContext();
  23037. endMeasure(instance, `mount`);
  23038. }
  23039. };
  23040. const updateComponent = (n1, n2, optimized) => {
  23041. const instance = (n2.component = n1.component);
  23042. if (shouldUpdateComponent(n1, n2, optimized)) {
  23043. if (instance.asyncDep &&
  23044. !instance.asyncResolved) {
  23045. // async & still pending - just update props and slots
  23046. // since the component's reactive effect for render isn't set-up yet
  23047. if ((true)) {
  23048. pushWarningContext(n2);
  23049. }
  23050. updateComponentPreRender(instance, n2, optimized);
  23051. if ((true)) {
  23052. popWarningContext();
  23053. }
  23054. return;
  23055. }
  23056. else {
  23057. // normal update
  23058. instance.next = n2;
  23059. // in case the child component is also queued, remove it to avoid
  23060. // double updating the same child component in the same flush.
  23061. invalidateJob(instance.update);
  23062. // instance.update is the reactive effect.
  23063. instance.update();
  23064. }
  23065. }
  23066. else {
  23067. // no update needed. just copy over properties
  23068. n2.component = n1.component;
  23069. n2.el = n1.el;
  23070. instance.vnode = n2;
  23071. }
  23072. };
  23073. const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => {
  23074. const componentUpdateFn = () => {
  23075. if (!instance.isMounted) {
  23076. let vnodeHook;
  23077. const { el, props } = initialVNode;
  23078. const { bm, m, parent } = instance;
  23079. const isAsyncWrapperVNode = isAsyncWrapper(initialVNode);
  23080. toggleRecurse(instance, false);
  23081. // beforeMount hook
  23082. if (bm) {
  23083. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(bm);
  23084. }
  23085. // onVnodeBeforeMount
  23086. if (!isAsyncWrapperVNode &&
  23087. (vnodeHook = props && props.onVnodeBeforeMount)) {
  23088. invokeVNodeHook(vnodeHook, parent, initialVNode);
  23089. }
  23090. toggleRecurse(instance, true);
  23091. if (el && hydrateNode) {
  23092. // vnode has adopted host node - perform hydration instead of mount.
  23093. const hydrateSubTree = () => {
  23094. if ((true)) {
  23095. startMeasure(instance, `render`);
  23096. }
  23097. instance.subTree = renderComponentRoot(instance);
  23098. if ((true)) {
  23099. endMeasure(instance, `render`);
  23100. }
  23101. if ((true)) {
  23102. startMeasure(instance, `hydrate`);
  23103. }
  23104. hydrateNode(el, instance.subTree, instance, parentSuspense, null);
  23105. if ((true)) {
  23106. endMeasure(instance, `hydrate`);
  23107. }
  23108. };
  23109. if (isAsyncWrapperVNode) {
  23110. initialVNode.type.__asyncLoader().then(
  23111. // note: we are moving the render call into an async callback,
  23112. // which means it won't track dependencies - but it's ok because
  23113. // a server-rendered async wrapper is already in resolved state
  23114. // and it will never need to change.
  23115. () => !instance.isUnmounted && hydrateSubTree());
  23116. }
  23117. else {
  23118. hydrateSubTree();
  23119. }
  23120. }
  23121. else {
  23122. if ((true)) {
  23123. startMeasure(instance, `render`);
  23124. }
  23125. const subTree = (instance.subTree = renderComponentRoot(instance));
  23126. if ((true)) {
  23127. endMeasure(instance, `render`);
  23128. }
  23129. if ((true)) {
  23130. startMeasure(instance, `patch`);
  23131. }
  23132. patch(null, subTree, container, anchor, instance, parentSuspense, isSVG);
  23133. if ((true)) {
  23134. endMeasure(instance, `patch`);
  23135. }
  23136. initialVNode.el = subTree.el;
  23137. }
  23138. // mounted hook
  23139. if (m) {
  23140. queuePostRenderEffect(m, parentSuspense);
  23141. }
  23142. // onVnodeMounted
  23143. if (!isAsyncWrapperVNode &&
  23144. (vnodeHook = props && props.onVnodeMounted)) {
  23145. const scopedInitialVNode = initialVNode;
  23146. queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, scopedInitialVNode), parentSuspense);
  23147. }
  23148. // activated hook for keep-alive roots.
  23149. // #1742 activated hook must be accessed after first render
  23150. // since the hook may be injected by a child keep-alive
  23151. if (initialVNode.shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {
  23152. instance.a && queuePostRenderEffect(instance.a, parentSuspense);
  23153. }
  23154. instance.isMounted = true;
  23155. if (true) {
  23156. devtoolsComponentAdded(instance);
  23157. }
  23158. // #2458: deference mount-only object parameters to prevent memleaks
  23159. initialVNode = container = anchor = null;
  23160. }
  23161. else {
  23162. // updateComponent
  23163. // This is triggered by mutation of component's own state (next: null)
  23164. // OR parent calling processComponent (next: VNode)
  23165. let { next, bu, u, parent, vnode } = instance;
  23166. let originNext = next;
  23167. let vnodeHook;
  23168. if ((true)) {
  23169. pushWarningContext(next || instance.vnode);
  23170. }
  23171. // Disallow component effect recursion during pre-lifecycle hooks.
  23172. toggleRecurse(instance, false);
  23173. if (next) {
  23174. next.el = vnode.el;
  23175. updateComponentPreRender(instance, next, optimized);
  23176. }
  23177. else {
  23178. next = vnode;
  23179. }
  23180. // beforeUpdate hook
  23181. if (bu) {
  23182. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(bu);
  23183. }
  23184. // onVnodeBeforeUpdate
  23185. if ((vnodeHook = next.props && next.props.onVnodeBeforeUpdate)) {
  23186. invokeVNodeHook(vnodeHook, parent, next, vnode);
  23187. }
  23188. toggleRecurse(instance, true);
  23189. // render
  23190. if ((true)) {
  23191. startMeasure(instance, `render`);
  23192. }
  23193. const nextTree = renderComponentRoot(instance);
  23194. if ((true)) {
  23195. endMeasure(instance, `render`);
  23196. }
  23197. const prevTree = instance.subTree;
  23198. instance.subTree = nextTree;
  23199. if ((true)) {
  23200. startMeasure(instance, `patch`);
  23201. }
  23202. patch(prevTree, nextTree,
  23203. // parent may have changed if it's in a teleport
  23204. hostParentNode(prevTree.el),
  23205. // anchor may have changed if it's in a fragment
  23206. getNextHostNode(prevTree), instance, parentSuspense, isSVG);
  23207. if ((true)) {
  23208. endMeasure(instance, `patch`);
  23209. }
  23210. next.el = nextTree.el;
  23211. if (originNext === null) {
  23212. // self-triggered update. In case of HOC, update parent component
  23213. // vnode el. HOC is indicated by parent instance's subTree pointing
  23214. // to child component's vnode
  23215. updateHOCHostEl(instance, nextTree.el);
  23216. }
  23217. // updated hook
  23218. if (u) {
  23219. queuePostRenderEffect(u, parentSuspense);
  23220. }
  23221. // onVnodeUpdated
  23222. if ((vnodeHook = next.props && next.props.onVnodeUpdated)) {
  23223. queuePostRenderEffect(() => invokeVNodeHook(vnodeHook, parent, next, vnode), parentSuspense);
  23224. }
  23225. if (true) {
  23226. devtoolsComponentUpdated(instance);
  23227. }
  23228. if ((true)) {
  23229. popWarningContext();
  23230. }
  23231. }
  23232. };
  23233. // create reactive effect for rendering
  23234. const effect = (instance.effect = new _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect(componentUpdateFn, () => queueJob(instance.update), instance.scope // track it in component's effect scope
  23235. ));
  23236. const update = (instance.update = effect.run.bind(effect));
  23237. update.id = instance.uid;
  23238. // allowRecurse
  23239. // #1801, #2043 component render effects should allow recursive updates
  23240. toggleRecurse(instance, true);
  23241. if ((true)) {
  23242. effect.onTrack = instance.rtc
  23243. ? e => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(instance.rtc, e)
  23244. : void 0;
  23245. effect.onTrigger = instance.rtg
  23246. ? e => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(instance.rtg, e)
  23247. : void 0;
  23248. // @ts-ignore (for scheduler)
  23249. update.ownerInstance = instance;
  23250. }
  23251. update();
  23252. };
  23253. const updateComponentPreRender = (instance, nextVNode, optimized) => {
  23254. nextVNode.component = instance;
  23255. const prevProps = instance.vnode.props;
  23256. instance.vnode = nextVNode;
  23257. instance.next = null;
  23258. updateProps(instance, nextVNode.props, prevProps, optimized);
  23259. updateSlots(instance, nextVNode.children, optimized);
  23260. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)();
  23261. // props update may have triggered pre-flush watchers.
  23262. // flush them before the render update.
  23263. flushPreFlushCbs(undefined, instance.update);
  23264. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)();
  23265. };
  23266. const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
  23267. const c1 = n1 && n1.children;
  23268. const prevShapeFlag = n1 ? n1.shapeFlag : 0;
  23269. const c2 = n2.children;
  23270. const { patchFlag, shapeFlag } = n2;
  23271. // fast path
  23272. if (patchFlag > 0) {
  23273. if (patchFlag & 128 /* KEYED_FRAGMENT */) {
  23274. // this could be either fully-keyed or mixed (some keyed some not)
  23275. // presence of patchFlag means children are guaranteed to be arrays
  23276. patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  23277. return;
  23278. }
  23279. else if (patchFlag & 256 /* UNKEYED_FRAGMENT */) {
  23280. // unkeyed
  23281. patchUnkeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  23282. return;
  23283. }
  23284. }
  23285. // children has 3 possibilities: text, array or no children.
  23286. if (shapeFlag & 8 /* TEXT_CHILDREN */) {
  23287. // text children fast path
  23288. if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) {
  23289. unmountChildren(c1, parentComponent, parentSuspense);
  23290. }
  23291. if (c2 !== c1) {
  23292. hostSetElementText(container, c2);
  23293. }
  23294. }
  23295. else {
  23296. if (prevShapeFlag & 16 /* ARRAY_CHILDREN */) {
  23297. // prev children was array
  23298. if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
  23299. // two arrays, cannot assume anything, do full diff
  23300. patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  23301. }
  23302. else {
  23303. // no new children, just unmount old
  23304. unmountChildren(c1, parentComponent, parentSuspense, true);
  23305. }
  23306. }
  23307. else {
  23308. // prev children was text OR null
  23309. // new children is array OR null
  23310. if (prevShapeFlag & 8 /* TEXT_CHILDREN */) {
  23311. hostSetElementText(container, '');
  23312. }
  23313. // mount new if array
  23314. if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
  23315. mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  23316. }
  23317. }
  23318. }
  23319. };
  23320. const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  23321. c1 = c1 || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR;
  23322. c2 = c2 || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR;
  23323. const oldLength = c1.length;
  23324. const newLength = c2.length;
  23325. const commonLength = Math.min(oldLength, newLength);
  23326. let i;
  23327. for (i = 0; i < commonLength; i++) {
  23328. const nextChild = (c2[i] = optimized
  23329. ? cloneIfMounted(c2[i])
  23330. : normalizeVNode(c2[i]));
  23331. patch(c1[i], nextChild, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  23332. }
  23333. if (oldLength > newLength) {
  23334. // remove old
  23335. unmountChildren(c1, parentComponent, parentSuspense, true, false, commonLength);
  23336. }
  23337. else {
  23338. // mount new
  23339. mountChildren(c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, commonLength);
  23340. }
  23341. };
  23342. // can be all-keyed or mixed
  23343. const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
  23344. let i = 0;
  23345. const l2 = c2.length;
  23346. let e1 = c1.length - 1; // prev ending index
  23347. let e2 = l2 - 1; // next ending index
  23348. // 1. sync from start
  23349. // (a b) c
  23350. // (a b) d e
  23351. while (i <= e1 && i <= e2) {
  23352. const n1 = c1[i];
  23353. const n2 = (c2[i] = optimized
  23354. ? cloneIfMounted(c2[i])
  23355. : normalizeVNode(c2[i]));
  23356. if (isSameVNodeType(n1, n2)) {
  23357. patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  23358. }
  23359. else {
  23360. break;
  23361. }
  23362. i++;
  23363. }
  23364. // 2. sync from end
  23365. // a (b c)
  23366. // d e (b c)
  23367. while (i <= e1 && i <= e2) {
  23368. const n1 = c1[e1];
  23369. const n2 = (c2[e2] = optimized
  23370. ? cloneIfMounted(c2[e2])
  23371. : normalizeVNode(c2[e2]));
  23372. if (isSameVNodeType(n1, n2)) {
  23373. patch(n1, n2, container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  23374. }
  23375. else {
  23376. break;
  23377. }
  23378. e1--;
  23379. e2--;
  23380. }
  23381. // 3. common sequence + mount
  23382. // (a b)
  23383. // (a b) c
  23384. // i = 2, e1 = 1, e2 = 2
  23385. // (a b)
  23386. // c (a b)
  23387. // i = 0, e1 = -1, e2 = 0
  23388. if (i > e1) {
  23389. if (i <= e2) {
  23390. const nextPos = e2 + 1;
  23391. const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
  23392. while (i <= e2) {
  23393. patch(null, (c2[i] = optimized
  23394. ? cloneIfMounted(c2[i])
  23395. : normalizeVNode(c2[i])), container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  23396. i++;
  23397. }
  23398. }
  23399. }
  23400. // 4. common sequence + unmount
  23401. // (a b) c
  23402. // (a b)
  23403. // i = 2, e1 = 2, e2 = 1
  23404. // a (b c)
  23405. // (b c)
  23406. // i = 0, e1 = 0, e2 = -1
  23407. else if (i > e2) {
  23408. while (i <= e1) {
  23409. unmount(c1[i], parentComponent, parentSuspense, true);
  23410. i++;
  23411. }
  23412. }
  23413. // 5. unknown sequence
  23414. // [i ... e1 + 1]: a b [c d e] f g
  23415. // [i ... e2 + 1]: a b [e d c h] f g
  23416. // i = 2, e1 = 4, e2 = 5
  23417. else {
  23418. const s1 = i; // prev starting index
  23419. const s2 = i; // next starting index
  23420. // 5.1 build key:index map for newChildren
  23421. const keyToNewIndexMap = new Map();
  23422. for (i = s2; i <= e2; i++) {
  23423. const nextChild = (c2[i] = optimized
  23424. ? cloneIfMounted(c2[i])
  23425. : normalizeVNode(c2[i]));
  23426. if (nextChild.key != null) {
  23427. if (( true) && keyToNewIndexMap.has(nextChild.key)) {
  23428. warn(`Duplicate keys found during update:`, JSON.stringify(nextChild.key), `Make sure keys are unique.`);
  23429. }
  23430. keyToNewIndexMap.set(nextChild.key, i);
  23431. }
  23432. }
  23433. // 5.2 loop through old children left to be patched and try to patch
  23434. // matching nodes & remove nodes that are no longer present
  23435. let j;
  23436. let patched = 0;
  23437. const toBePatched = e2 - s2 + 1;
  23438. let moved = false;
  23439. // used to track whether any node has moved
  23440. let maxNewIndexSoFar = 0;
  23441. // works as Map<newIndex, oldIndex>
  23442. // Note that oldIndex is offset by +1
  23443. // and oldIndex = 0 is a special value indicating the new node has
  23444. // no corresponding old node.
  23445. // used for determining longest stable subsequence
  23446. const newIndexToOldIndexMap = new Array(toBePatched);
  23447. for (i = 0; i < toBePatched; i++)
  23448. newIndexToOldIndexMap[i] = 0;
  23449. for (i = s1; i <= e1; i++) {
  23450. const prevChild = c1[i];
  23451. if (patched >= toBePatched) {
  23452. // all new children have been patched so this can only be a removal
  23453. unmount(prevChild, parentComponent, parentSuspense, true);
  23454. continue;
  23455. }
  23456. let newIndex;
  23457. if (prevChild.key != null) {
  23458. newIndex = keyToNewIndexMap.get(prevChild.key);
  23459. }
  23460. else {
  23461. // key-less node, try to locate a key-less node of the same type
  23462. for (j = s2; j <= e2; j++) {
  23463. if (newIndexToOldIndexMap[j - s2] === 0 &&
  23464. isSameVNodeType(prevChild, c2[j])) {
  23465. newIndex = j;
  23466. break;
  23467. }
  23468. }
  23469. }
  23470. if (newIndex === undefined) {
  23471. unmount(prevChild, parentComponent, parentSuspense, true);
  23472. }
  23473. else {
  23474. newIndexToOldIndexMap[newIndex - s2] = i + 1;
  23475. if (newIndex >= maxNewIndexSoFar) {
  23476. maxNewIndexSoFar = newIndex;
  23477. }
  23478. else {
  23479. moved = true;
  23480. }
  23481. patch(prevChild, c2[newIndex], container, null, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  23482. patched++;
  23483. }
  23484. }
  23485. // 5.3 move and mount
  23486. // generate longest stable subsequence only when nodes have moved
  23487. const increasingNewIndexSequence = moved
  23488. ? getSequence(newIndexToOldIndexMap)
  23489. : _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR;
  23490. j = increasingNewIndexSequence.length - 1;
  23491. // looping backwards so that we can use last patched node as anchor
  23492. for (i = toBePatched - 1; i >= 0; i--) {
  23493. const nextIndex = s2 + i;
  23494. const nextChild = c2[nextIndex];
  23495. const anchor = nextIndex + 1 < l2 ? c2[nextIndex + 1].el : parentAnchor;
  23496. if (newIndexToOldIndexMap[i] === 0) {
  23497. // mount new
  23498. patch(null, nextChild, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  23499. }
  23500. else if (moved) {
  23501. // move if:
  23502. // There is no stable subsequence (e.g. a reverse)
  23503. // OR current node is not among the stable sequence
  23504. if (j < 0 || i !== increasingNewIndexSequence[j]) {
  23505. move(nextChild, container, anchor, 2 /* REORDER */);
  23506. }
  23507. else {
  23508. j--;
  23509. }
  23510. }
  23511. }
  23512. }
  23513. };
  23514. const move = (vnode, container, anchor, moveType, parentSuspense = null) => {
  23515. const { el, type, transition, children, shapeFlag } = vnode;
  23516. if (shapeFlag & 6 /* COMPONENT */) {
  23517. move(vnode.component.subTree, container, anchor, moveType);
  23518. return;
  23519. }
  23520. if (shapeFlag & 128 /* SUSPENSE */) {
  23521. vnode.suspense.move(container, anchor, moveType);
  23522. return;
  23523. }
  23524. if (shapeFlag & 64 /* TELEPORT */) {
  23525. type.move(vnode, container, anchor, internals);
  23526. return;
  23527. }
  23528. if (type === Fragment) {
  23529. hostInsert(el, container, anchor);
  23530. for (let i = 0; i < children.length; i++) {
  23531. move(children[i], container, anchor, moveType);
  23532. }
  23533. hostInsert(vnode.anchor, container, anchor);
  23534. return;
  23535. }
  23536. if (type === Static) {
  23537. moveStaticNode(vnode, container, anchor);
  23538. return;
  23539. }
  23540. // single nodes
  23541. const needTransition = moveType !== 2 /* REORDER */ &&
  23542. shapeFlag & 1 /* ELEMENT */ &&
  23543. transition;
  23544. if (needTransition) {
  23545. if (moveType === 0 /* ENTER */) {
  23546. transition.beforeEnter(el);
  23547. hostInsert(el, container, anchor);
  23548. queuePostRenderEffect(() => transition.enter(el), parentSuspense);
  23549. }
  23550. else {
  23551. const { leave, delayLeave, afterLeave } = transition;
  23552. const remove = () => hostInsert(el, container, anchor);
  23553. const performLeave = () => {
  23554. leave(el, () => {
  23555. remove();
  23556. afterLeave && afterLeave();
  23557. });
  23558. };
  23559. if (delayLeave) {
  23560. delayLeave(el, remove, performLeave);
  23561. }
  23562. else {
  23563. performLeave();
  23564. }
  23565. }
  23566. }
  23567. else {
  23568. hostInsert(el, container, anchor);
  23569. }
  23570. };
  23571. const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
  23572. const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs } = vnode;
  23573. // unset ref
  23574. if (ref != null) {
  23575. setRef(ref, null, parentSuspense, vnode, true);
  23576. }
  23577. if (shapeFlag & 256 /* COMPONENT_SHOULD_KEEP_ALIVE */) {
  23578. parentComponent.ctx.deactivate(vnode);
  23579. return;
  23580. }
  23581. const shouldInvokeDirs = shapeFlag & 1 /* ELEMENT */ && dirs;
  23582. const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
  23583. let vnodeHook;
  23584. if (shouldInvokeVnodeHook &&
  23585. (vnodeHook = props && props.onVnodeBeforeUnmount)) {
  23586. invokeVNodeHook(vnodeHook, parentComponent, vnode);
  23587. }
  23588. if (shapeFlag & 6 /* COMPONENT */) {
  23589. unmountComponent(vnode.component, parentSuspense, doRemove);
  23590. }
  23591. else {
  23592. if (shapeFlag & 128 /* SUSPENSE */) {
  23593. vnode.suspense.unmount(parentSuspense, doRemove);
  23594. return;
  23595. }
  23596. if (shouldInvokeDirs) {
  23597. invokeDirectiveHook(vnode, null, parentComponent, 'beforeUnmount');
  23598. }
  23599. if (shapeFlag & 64 /* TELEPORT */) {
  23600. vnode.type.remove(vnode, parentComponent, parentSuspense, optimized, internals, doRemove);
  23601. }
  23602. else if (dynamicChildren &&
  23603. // #1153: fast path should not be taken for non-stable (v-for) fragments
  23604. (type !== Fragment ||
  23605. (patchFlag > 0 && patchFlag & 64 /* STABLE_FRAGMENT */))) {
  23606. // fast path for block nodes: only need to unmount dynamic children.
  23607. unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
  23608. }
  23609. else if ((type === Fragment &&
  23610. patchFlag &
  23611. (128 /* KEYED_FRAGMENT */ | 256 /* UNKEYED_FRAGMENT */)) ||
  23612. (!optimized && shapeFlag & 16 /* ARRAY_CHILDREN */)) {
  23613. unmountChildren(children, parentComponent, parentSuspense);
  23614. }
  23615. if (doRemove) {
  23616. remove(vnode);
  23617. }
  23618. }
  23619. if ((shouldInvokeVnodeHook &&
  23620. (vnodeHook = props && props.onVnodeUnmounted)) ||
  23621. shouldInvokeDirs) {
  23622. queuePostRenderEffect(() => {
  23623. vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
  23624. shouldInvokeDirs &&
  23625. invokeDirectiveHook(vnode, null, parentComponent, 'unmounted');
  23626. }, parentSuspense);
  23627. }
  23628. };
  23629. const remove = vnode => {
  23630. const { type, el, anchor, transition } = vnode;
  23631. if (type === Fragment) {
  23632. removeFragment(el, anchor);
  23633. return;
  23634. }
  23635. if (type === Static) {
  23636. removeStaticNode(vnode);
  23637. return;
  23638. }
  23639. const performRemove = () => {
  23640. hostRemove(el);
  23641. if (transition && !transition.persisted && transition.afterLeave) {
  23642. transition.afterLeave();
  23643. }
  23644. };
  23645. if (vnode.shapeFlag & 1 /* ELEMENT */ &&
  23646. transition &&
  23647. !transition.persisted) {
  23648. const { leave, delayLeave } = transition;
  23649. const performLeave = () => leave(el, performRemove);
  23650. if (delayLeave) {
  23651. delayLeave(vnode.el, performRemove, performLeave);
  23652. }
  23653. else {
  23654. performLeave();
  23655. }
  23656. }
  23657. else {
  23658. performRemove();
  23659. }
  23660. };
  23661. const removeFragment = (cur, end) => {
  23662. // For fragments, directly remove all contained DOM nodes.
  23663. // (fragment child nodes cannot have transition)
  23664. let next;
  23665. while (cur !== end) {
  23666. next = hostNextSibling(cur);
  23667. hostRemove(cur);
  23668. cur = next;
  23669. }
  23670. hostRemove(end);
  23671. };
  23672. const unmountComponent = (instance, parentSuspense, doRemove) => {
  23673. if (( true) && instance.type.__hmrId) {
  23674. unregisterHMR(instance);
  23675. }
  23676. const { bum, scope, update, subTree, um } = instance;
  23677. // beforeUnmount hook
  23678. if (bum) {
  23679. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(bum);
  23680. }
  23681. // stop effects in component scope
  23682. scope.stop();
  23683. // update may be null if a component is unmounted before its async
  23684. // setup has resolved.
  23685. if (update) {
  23686. // so that scheduler will no longer invoke it
  23687. update.active = false;
  23688. unmount(subTree, instance, parentSuspense, doRemove);
  23689. }
  23690. // unmounted hook
  23691. if (um) {
  23692. queuePostRenderEffect(um, parentSuspense);
  23693. }
  23694. queuePostRenderEffect(() => {
  23695. instance.isUnmounted = true;
  23696. }, parentSuspense);
  23697. // A component with async dep inside a pending suspense is unmounted before
  23698. // its async dep resolves. This should remove the dep from the suspense, and
  23699. // cause the suspense to resolve immediately if that was the last dep.
  23700. if (parentSuspense &&
  23701. parentSuspense.pendingBranch &&
  23702. !parentSuspense.isUnmounted &&
  23703. instance.asyncDep &&
  23704. !instance.asyncResolved &&
  23705. instance.suspenseId === parentSuspense.pendingId) {
  23706. parentSuspense.deps--;
  23707. if (parentSuspense.deps === 0) {
  23708. parentSuspense.resolve();
  23709. }
  23710. }
  23711. if (true) {
  23712. devtoolsComponentRemoved(instance);
  23713. }
  23714. };
  23715. const unmountChildren = (children, parentComponent, parentSuspense, doRemove = false, optimized = false, start = 0) => {
  23716. for (let i = start; i < children.length; i++) {
  23717. unmount(children[i], parentComponent, parentSuspense, doRemove, optimized);
  23718. }
  23719. };
  23720. const getNextHostNode = vnode => {
  23721. if (vnode.shapeFlag & 6 /* COMPONENT */) {
  23722. return getNextHostNode(vnode.component.subTree);
  23723. }
  23724. if (vnode.shapeFlag & 128 /* SUSPENSE */) {
  23725. return vnode.suspense.next();
  23726. }
  23727. return hostNextSibling((vnode.anchor || vnode.el));
  23728. };
  23729. const render = (vnode, container, isSVG) => {
  23730. if (vnode == null) {
  23731. if (container._vnode) {
  23732. unmount(container._vnode, null, null, true);
  23733. }
  23734. }
  23735. else {
  23736. patch(container._vnode || null, vnode, container, null, null, null, isSVG);
  23737. }
  23738. flushPostFlushCbs();
  23739. container._vnode = vnode;
  23740. };
  23741. const internals = {
  23742. p: patch,
  23743. um: unmount,
  23744. m: move,
  23745. r: remove,
  23746. mt: mountComponent,
  23747. mc: mountChildren,
  23748. pc: patchChildren,
  23749. pbc: patchBlockChildren,
  23750. n: getNextHostNode,
  23751. o: options
  23752. };
  23753. let hydrate;
  23754. let hydrateNode;
  23755. if (createHydrationFns) {
  23756. [hydrate, hydrateNode] = createHydrationFns(internals);
  23757. }
  23758. return {
  23759. render,
  23760. hydrate,
  23761. createApp: createAppAPI(render, hydrate)
  23762. };
  23763. }
  23764. function toggleRecurse({ effect, update }, allowed) {
  23765. effect.allowRecurse = update.allowRecurse = allowed;
  23766. }
  23767. /**
  23768. * #1156
  23769. * When a component is HMR-enabled, we need to make sure that all static nodes
  23770. * inside a block also inherit the DOM element from the previous tree so that
  23771. * HMR updates (which are full updates) can retrieve the element for patching.
  23772. *
  23773. * #2080
  23774. * Inside keyed `template` fragment static children, if a fragment is moved,
  23775. * the children will always be moved. Therefore, in order to ensure correct move
  23776. * position, el should be inherited from previous nodes.
  23777. */
  23778. function traverseStaticChildren(n1, n2, shallow = false) {
  23779. const ch1 = n1.children;
  23780. const ch2 = n2.children;
  23781. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(ch1) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(ch2)) {
  23782. for (let i = 0; i < ch1.length; i++) {
  23783. // this is only called in the optimized path so array children are
  23784. // guaranteed to be vnodes
  23785. const c1 = ch1[i];
  23786. let c2 = ch2[i];
  23787. if (c2.shapeFlag & 1 /* ELEMENT */ && !c2.dynamicChildren) {
  23788. if (c2.patchFlag <= 0 || c2.patchFlag === 32 /* HYDRATE_EVENTS */) {
  23789. c2 = ch2[i] = cloneIfMounted(ch2[i]);
  23790. c2.el = c1.el;
  23791. }
  23792. if (!shallow)
  23793. traverseStaticChildren(c1, c2);
  23794. }
  23795. // also inherit for comment nodes, but not placeholders (e.g. v-if which
  23796. // would have received .el during block patch)
  23797. if (( true) && c2.type === Comment && !c2.el) {
  23798. c2.el = c1.el;
  23799. }
  23800. }
  23801. }
  23802. }
  23803. // https://en.wikipedia.org/wiki/Longest_increasing_subsequence
  23804. function getSequence(arr) {
  23805. const p = arr.slice();
  23806. const result = [0];
  23807. let i, j, u, v, c;
  23808. const len = arr.length;
  23809. for (i = 0; i < len; i++) {
  23810. const arrI = arr[i];
  23811. if (arrI !== 0) {
  23812. j = result[result.length - 1];
  23813. if (arr[j] < arrI) {
  23814. p[i] = j;
  23815. result.push(i);
  23816. continue;
  23817. }
  23818. u = 0;
  23819. v = result.length - 1;
  23820. while (u < v) {
  23821. c = (u + v) >> 1;
  23822. if (arr[result[c]] < arrI) {
  23823. u = c + 1;
  23824. }
  23825. else {
  23826. v = c;
  23827. }
  23828. }
  23829. if (arrI < arr[result[u]]) {
  23830. if (u > 0) {
  23831. p[i] = result[u - 1];
  23832. }
  23833. result[u] = i;
  23834. }
  23835. }
  23836. }
  23837. u = result.length;
  23838. v = result[u - 1];
  23839. while (u-- > 0) {
  23840. result[u] = v;
  23841. v = p[v];
  23842. }
  23843. return result;
  23844. }
  23845. const isTeleport = (type) => type.__isTeleport;
  23846. const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === '');
  23847. const isTargetSVG = (target) => typeof SVGElement !== 'undefined' && target instanceof SVGElement;
  23848. const resolveTarget = (props, select) => {
  23849. const targetSelector = props && props.to;
  23850. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(targetSelector)) {
  23851. if (!select) {
  23852. ( true) &&
  23853. warn(`Current renderer does not support string target for Teleports. ` +
  23854. `(missing querySelector renderer option)`);
  23855. return null;
  23856. }
  23857. else {
  23858. const target = select(targetSelector);
  23859. if (!target) {
  23860. ( true) &&
  23861. warn(`Failed to locate Teleport target with selector "${targetSelector}". ` +
  23862. `Note the target element must exist before the component is mounted - ` +
  23863. `i.e. the target cannot be rendered by the component itself, and ` +
  23864. `ideally should be outside of the entire Vue component tree.`);
  23865. }
  23866. return target;
  23867. }
  23868. }
  23869. else {
  23870. if (( true) && !targetSelector && !isTeleportDisabled(props)) {
  23871. warn(`Invalid Teleport target: ${targetSelector}`);
  23872. }
  23873. return targetSelector;
  23874. }
  23875. };
  23876. const TeleportImpl = {
  23877. __isTeleport: true,
  23878. process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
  23879. const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals;
  23880. const disabled = isTeleportDisabled(n2.props);
  23881. let { shapeFlag, children, dynamicChildren } = n2;
  23882. // #3302
  23883. // HMR updated, force full diff
  23884. if (( true) && isHmrUpdating) {
  23885. optimized = false;
  23886. dynamicChildren = null;
  23887. }
  23888. if (n1 == null) {
  23889. // insert anchors in the main view
  23890. const placeholder = (n2.el = ( true)
  23891. ? createComment('teleport start')
  23892. : 0);
  23893. const mainAnchor = (n2.anchor = ( true)
  23894. ? createComment('teleport end')
  23895. : 0);
  23896. insert(placeholder, container, anchor);
  23897. insert(mainAnchor, container, anchor);
  23898. const target = (n2.target = resolveTarget(n2.props, querySelector));
  23899. const targetAnchor = (n2.targetAnchor = createText(''));
  23900. if (target) {
  23901. insert(targetAnchor, target);
  23902. // #2652 we could be teleporting from a non-SVG tree into an SVG tree
  23903. isSVG = isSVG || isTargetSVG(target);
  23904. }
  23905. else if (( true) && !disabled) {
  23906. warn('Invalid Teleport target on mount:', target, `(${typeof target})`);
  23907. }
  23908. const mount = (container, anchor) => {
  23909. // Teleport *always* has Array children. This is enforced in both the
  23910. // compiler and vnode children normalization.
  23911. if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
  23912. mountChildren(children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized);
  23913. }
  23914. };
  23915. if (disabled) {
  23916. mount(container, mainAnchor);
  23917. }
  23918. else if (target) {
  23919. mount(target, targetAnchor);
  23920. }
  23921. }
  23922. else {
  23923. // update content
  23924. n2.el = n1.el;
  23925. const mainAnchor = (n2.anchor = n1.anchor);
  23926. const target = (n2.target = n1.target);
  23927. const targetAnchor = (n2.targetAnchor = n1.targetAnchor);
  23928. const wasDisabled = isTeleportDisabled(n1.props);
  23929. const currentContainer = wasDisabled ? container : target;
  23930. const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
  23931. isSVG = isSVG || isTargetSVG(target);
  23932. if (dynamicChildren) {
  23933. // fast path when the teleport happens to be a block root
  23934. patchBlockChildren(n1.dynamicChildren, dynamicChildren, currentContainer, parentComponent, parentSuspense, isSVG, slotScopeIds);
  23935. // even in block tree mode we need to make sure all root-level nodes
  23936. // in the teleport inherit previous DOM references so that they can
  23937. // be moved in future patches.
  23938. traverseStaticChildren(n1, n2, true);
  23939. }
  23940. else if (!optimized) {
  23941. patchChildren(n1, n2, currentContainer, currentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, false);
  23942. }
  23943. if (disabled) {
  23944. if (!wasDisabled) {
  23945. // enabled -> disabled
  23946. // move into main container
  23947. moveTeleport(n2, container, mainAnchor, internals, 1 /* TOGGLE */);
  23948. }
  23949. }
  23950. else {
  23951. // target changed
  23952. if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
  23953. const nextTarget = (n2.target = resolveTarget(n2.props, querySelector));
  23954. if (nextTarget) {
  23955. moveTeleport(n2, nextTarget, null, internals, 0 /* TARGET_CHANGE */);
  23956. }
  23957. else if ((true)) {
  23958. warn('Invalid Teleport target on update:', target, `(${typeof target})`);
  23959. }
  23960. }
  23961. else if (wasDisabled) {
  23962. // disabled -> enabled
  23963. // move into teleport target
  23964. moveTeleport(n2, target, targetAnchor, internals, 1 /* TOGGLE */);
  23965. }
  23966. }
  23967. }
  23968. },
  23969. remove(vnode, parentComponent, parentSuspense, optimized, { um: unmount, o: { remove: hostRemove } }, doRemove) {
  23970. const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
  23971. if (target) {
  23972. hostRemove(targetAnchor);
  23973. }
  23974. // an unmounted teleport should always remove its children if not disabled
  23975. if (doRemove || !isTeleportDisabled(props)) {
  23976. hostRemove(anchor);
  23977. if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
  23978. for (let i = 0; i < children.length; i++) {
  23979. const child = children[i];
  23980. unmount(child, parentComponent, parentSuspense, true, !!child.dynamicChildren);
  23981. }
  23982. }
  23983. }
  23984. },
  23985. move: moveTeleport,
  23986. hydrate: hydrateTeleport
  23987. };
  23988. function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2 /* REORDER */) {
  23989. // move target anchor if this is a target change.
  23990. if (moveType === 0 /* TARGET_CHANGE */) {
  23991. insert(vnode.targetAnchor, container, parentAnchor);
  23992. }
  23993. const { el, anchor, shapeFlag, children, props } = vnode;
  23994. const isReorder = moveType === 2 /* REORDER */;
  23995. // move main view anchor if this is a re-order.
  23996. if (isReorder) {
  23997. insert(el, container, parentAnchor);
  23998. }
  23999. // if this is a re-order and teleport is enabled (content is in target)
  24000. // do not move children. So the opposite is: only move children if this
  24001. // is not a reorder, or the teleport is disabled
  24002. if (!isReorder || isTeleportDisabled(props)) {
  24003. // Teleport has either Array children or no children.
  24004. if (shapeFlag & 16 /* ARRAY_CHILDREN */) {
  24005. for (let i = 0; i < children.length; i++) {
  24006. move(children[i], container, parentAnchor, 2 /* REORDER */);
  24007. }
  24008. }
  24009. }
  24010. // move main view anchor if this is a re-order.
  24011. if (isReorder) {
  24012. insert(anchor, container, parentAnchor);
  24013. }
  24014. }
  24015. function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, { o: { nextSibling, parentNode, querySelector } }, hydrateChildren) {
  24016. const target = (vnode.target = resolveTarget(vnode.props, querySelector));
  24017. if (target) {
  24018. // if multiple teleports rendered to the same target element, we need to
  24019. // pick up from where the last teleport finished instead of the first node
  24020. const targetNode = target._lpa || target.firstChild;
  24021. if (vnode.shapeFlag & 16 /* ARRAY_CHILDREN */) {
  24022. if (isTeleportDisabled(vnode.props)) {
  24023. vnode.anchor = hydrateChildren(nextSibling(node), vnode, parentNode(node), parentComponent, parentSuspense, slotScopeIds, optimized);
  24024. vnode.targetAnchor = targetNode;
  24025. }
  24026. else {
  24027. vnode.anchor = nextSibling(node);
  24028. vnode.targetAnchor = hydrateChildren(targetNode, vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
  24029. }
  24030. target._lpa =
  24031. vnode.targetAnchor && nextSibling(vnode.targetAnchor);
  24032. }
  24033. }
  24034. return vnode.anchor && nextSibling(vnode.anchor);
  24035. }
  24036. // Force-casted public typing for h and TSX props inference
  24037. const Teleport = TeleportImpl;
  24038. const COMPONENTS = 'components';
  24039. const DIRECTIVES = 'directives';
  24040. /**
  24041. * @private
  24042. */
  24043. function resolveComponent(name, maybeSelfReference) {
  24044. return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
  24045. }
  24046. const NULL_DYNAMIC_COMPONENT = Symbol();
  24047. /**
  24048. * @private
  24049. */
  24050. function resolveDynamicComponent(component) {
  24051. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(component)) {
  24052. return resolveAsset(COMPONENTS, component, false) || component;
  24053. }
  24054. else {
  24055. // invalid types will fallthrough to createVNode and raise warning
  24056. return (component || NULL_DYNAMIC_COMPONENT);
  24057. }
  24058. }
  24059. /**
  24060. * @private
  24061. */
  24062. function resolveDirective(name) {
  24063. return resolveAsset(DIRECTIVES, name);
  24064. }
  24065. // implementation
  24066. function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {
  24067. const instance = currentRenderingInstance || currentInstance;
  24068. if (instance) {
  24069. const Component = instance.type;
  24070. // explicit self name has highest priority
  24071. if (type === COMPONENTS) {
  24072. const selfName = getComponentName(Component);
  24073. if (selfName &&
  24074. (selfName === name ||
  24075. selfName === (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name) ||
  24076. selfName === (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name)))) {
  24077. return Component;
  24078. }
  24079. }
  24080. const res =
  24081. // local registration
  24082. // check instance[type] first which is resolved for options API
  24083. resolve(instance[type] || Component[type], name) ||
  24084. // global registration
  24085. resolve(instance.appContext[type], name);
  24086. if (!res && maybeSelfReference) {
  24087. // fallback to implicit self-reference
  24088. return Component;
  24089. }
  24090. if (( true) && warnMissing && !res) {
  24091. const extra = type === COMPONENTS
  24092. ? `\nIf this is a native custom element, make sure to exclude it from ` +
  24093. `component resolution via compilerOptions.isCustomElement.`
  24094. : ``;
  24095. warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
  24096. }
  24097. return res;
  24098. }
  24099. else if ((true)) {
  24100. warn(`resolve${(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize)(type.slice(0, -1))} ` +
  24101. `can only be used in render() or setup().`);
  24102. }
  24103. }
  24104. function resolve(registry, name) {
  24105. return (registry &&
  24106. (registry[name] ||
  24107. registry[(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name)] ||
  24108. registry[(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(name))]));
  24109. }
  24110. const Fragment = Symbol(( true) ? 'Fragment' : 0);
  24111. const Text = Symbol(( true) ? 'Text' : 0);
  24112. const Comment = Symbol(( true) ? 'Comment' : 0);
  24113. const Static = Symbol(( true) ? 'Static' : 0);
  24114. // Since v-if and v-for are the two possible ways node structure can dynamically
  24115. // change, once we consider v-if branches and each v-for fragment a block, we
  24116. // can divide a template into nested blocks, and within each block the node
  24117. // structure would be stable. This allows us to skip most children diffing
  24118. // and only worry about the dynamic nodes (indicated by patch flags).
  24119. const blockStack = [];
  24120. let currentBlock = null;
  24121. /**
  24122. * Open a block.
  24123. * This must be called before `createBlock`. It cannot be part of `createBlock`
  24124. * because the children of the block are evaluated before `createBlock` itself
  24125. * is called. The generated code typically looks like this:
  24126. *
  24127. * ```js
  24128. * function render() {
  24129. * return (openBlock(),createBlock('div', null, [...]))
  24130. * }
  24131. * ```
  24132. * disableTracking is true when creating a v-for fragment block, since a v-for
  24133. * fragment always diffs its children.
  24134. *
  24135. * @private
  24136. */
  24137. function openBlock(disableTracking = false) {
  24138. blockStack.push((currentBlock = disableTracking ? null : []));
  24139. }
  24140. function closeBlock() {
  24141. blockStack.pop();
  24142. currentBlock = blockStack[blockStack.length - 1] || null;
  24143. }
  24144. // Whether we should be tracking dynamic child nodes inside a block.
  24145. // Only tracks when this value is > 0
  24146. // We are not using a simple boolean because this value may need to be
  24147. // incremented/decremented by nested usage of v-once (see below)
  24148. let isBlockTreeEnabled = 1;
  24149. /**
  24150. * Block tracking sometimes needs to be disabled, for example during the
  24151. * creation of a tree that needs to be cached by v-once. The compiler generates
  24152. * code like this:
  24153. *
  24154. * ``` js
  24155. * _cache[1] || (
  24156. * setBlockTracking(-1),
  24157. * _cache[1] = createVNode(...),
  24158. * setBlockTracking(1),
  24159. * _cache[1]
  24160. * )
  24161. * ```
  24162. *
  24163. * @private
  24164. */
  24165. function setBlockTracking(value) {
  24166. isBlockTreeEnabled += value;
  24167. }
  24168. function setupBlock(vnode) {
  24169. // save current block children on the block vnode
  24170. vnode.dynamicChildren =
  24171. isBlockTreeEnabled > 0 ? currentBlock || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_ARR : null;
  24172. // close block
  24173. closeBlock();
  24174. // a block is always going to be patched, so track it as a child of its
  24175. // parent block
  24176. if (isBlockTreeEnabled > 0 && currentBlock) {
  24177. currentBlock.push(vnode);
  24178. }
  24179. return vnode;
  24180. }
  24181. /**
  24182. * @private
  24183. */
  24184. function createElementBlock(type, props, children, patchFlag, dynamicProps, shapeFlag) {
  24185. return setupBlock(createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, true /* isBlock */));
  24186. }
  24187. /**
  24188. * Create a block root vnode. Takes the same exact arguments as `createVNode`.
  24189. * A block root keeps track of dynamic nodes within the block in the
  24190. * `dynamicChildren` array.
  24191. *
  24192. * @private
  24193. */
  24194. function createBlock(type, props, children, patchFlag, dynamicProps) {
  24195. return setupBlock(createVNode(type, props, children, patchFlag, dynamicProps, true /* isBlock: prevent a block from tracking itself */));
  24196. }
  24197. function isVNode(value) {
  24198. return value ? value.__v_isVNode === true : false;
  24199. }
  24200. function isSameVNodeType(n1, n2) {
  24201. if (( true) &&
  24202. n2.shapeFlag & 6 /* COMPONENT */ &&
  24203. hmrDirtyComponents.has(n2.type)) {
  24204. // HMR only: if the component has been hot-updated, force a reload.
  24205. return false;
  24206. }
  24207. return n1.type === n2.type && n1.key === n2.key;
  24208. }
  24209. let vnodeArgsTransformer;
  24210. /**
  24211. * Internal API for registering an arguments transform for createVNode
  24212. * used for creating stubs in the test-utils
  24213. * It is *internal* but needs to be exposed for test-utils to pick up proper
  24214. * typings
  24215. */
  24216. function transformVNodeArgs(transformer) {
  24217. vnodeArgsTransformer = transformer;
  24218. }
  24219. const createVNodeWithArgsTransform = (...args) => {
  24220. return _createVNode(...(vnodeArgsTransformer
  24221. ? vnodeArgsTransformer(args, currentRenderingInstance)
  24222. : args));
  24223. };
  24224. const InternalObjectKey = `__vInternal`;
  24225. const normalizeKey = ({ key }) => key != null ? key : null;
  24226. const normalizeRef = ({ ref, ref_key, ref_for }) => {
  24227. return (ref != null
  24228. ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(ref) || (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(ref) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(ref)
  24229. ? { i: currentRenderingInstance, r: ref, k: ref_key, f: !!ref_for }
  24230. : ref
  24231. : null);
  24232. };
  24233. function createBaseVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, shapeFlag = type === Fragment ? 0 : 1 /* ELEMENT */, isBlockNode = false, needFullChildrenNormalization = false) {
  24234. const vnode = {
  24235. __v_isVNode: true,
  24236. __v_skip: true,
  24237. type,
  24238. props,
  24239. key: props && normalizeKey(props),
  24240. ref: props && normalizeRef(props),
  24241. scopeId: currentScopeId,
  24242. slotScopeIds: null,
  24243. children,
  24244. component: null,
  24245. suspense: null,
  24246. ssContent: null,
  24247. ssFallback: null,
  24248. dirs: null,
  24249. transition: null,
  24250. el: null,
  24251. anchor: null,
  24252. target: null,
  24253. targetAnchor: null,
  24254. staticCount: 0,
  24255. shapeFlag,
  24256. patchFlag,
  24257. dynamicProps,
  24258. dynamicChildren: null,
  24259. appContext: null
  24260. };
  24261. if (needFullChildrenNormalization) {
  24262. normalizeChildren(vnode, children);
  24263. // normalize suspense children
  24264. if (shapeFlag & 128 /* SUSPENSE */) {
  24265. type.normalize(vnode);
  24266. }
  24267. }
  24268. else if (children) {
  24269. // compiled element vnode - if children is passed, only possible types are
  24270. // string or Array.
  24271. vnode.shapeFlag |= (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(children)
  24272. ? 8 /* TEXT_CHILDREN */
  24273. : 16 /* ARRAY_CHILDREN */;
  24274. }
  24275. // validate key
  24276. if (( true) && vnode.key !== vnode.key) {
  24277. warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
  24278. }
  24279. // track vnode for block tree
  24280. if (isBlockTreeEnabled > 0 &&
  24281. // avoid a block node from tracking itself
  24282. !isBlockNode &&
  24283. // has current parent block
  24284. currentBlock &&
  24285. // presence of a patch flag indicates this node needs patching on updates.
  24286. // component nodes also should always be patched, because even if the
  24287. // component doesn't need to update, it needs to persist the instance on to
  24288. // the next vnode so that it can be properly unmounted later.
  24289. (vnode.patchFlag > 0 || shapeFlag & 6 /* COMPONENT */) &&
  24290. // the EVENTS flag is only for hydration and if it is the only flag, the
  24291. // vnode should not be considered dynamic due to handler caching.
  24292. vnode.patchFlag !== 32 /* HYDRATE_EVENTS */) {
  24293. currentBlock.push(vnode);
  24294. }
  24295. return vnode;
  24296. }
  24297. const createVNode = (( true) ? createVNodeWithArgsTransform : 0);
  24298. function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
  24299. if (!type || type === NULL_DYNAMIC_COMPONENT) {
  24300. if (( true) && !type) {
  24301. warn(`Invalid vnode type when creating vnode: ${type}.`);
  24302. }
  24303. type = Comment;
  24304. }
  24305. if (isVNode(type)) {
  24306. // createVNode receiving an existing vnode. This happens in cases like
  24307. // <component :is="vnode"/>
  24308. // #2078 make sure to merge refs during the clone instead of overwriting it
  24309. const cloned = cloneVNode(type, props, true /* mergeRef: true */);
  24310. if (children) {
  24311. normalizeChildren(cloned, children);
  24312. }
  24313. return cloned;
  24314. }
  24315. // class component normalization.
  24316. if (isClassComponent(type)) {
  24317. type = type.__vccOpts;
  24318. }
  24319. // class & style normalization.
  24320. if (props) {
  24321. // for reactive or proxy objects, we need to clone it to enable mutation.
  24322. props = guardReactiveProps(props);
  24323. let { class: klass, style } = props;
  24324. if (klass && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(klass)) {
  24325. props.class = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)(klass);
  24326. }
  24327. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(style)) {
  24328. // reactive state objects need to be cloned since they are likely to be
  24329. // mutated
  24330. if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isProxy)(style) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(style)) {
  24331. style = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, style);
  24332. }
  24333. props.style = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeStyle)(style);
  24334. }
  24335. }
  24336. // encode the vnode type information into a bitmap
  24337. const shapeFlag = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(type)
  24338. ? 1 /* ELEMENT */
  24339. : isSuspense(type)
  24340. ? 128 /* SUSPENSE */
  24341. : isTeleport(type)
  24342. ? 64 /* TELEPORT */
  24343. : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(type)
  24344. ? 4 /* STATEFUL_COMPONENT */
  24345. : (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(type)
  24346. ? 2 /* FUNCTIONAL_COMPONENT */
  24347. : 0;
  24348. if (( true) && shapeFlag & 4 /* STATEFUL_COMPONENT */ && (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isProxy)(type)) {
  24349. type = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(type);
  24350. warn(`Vue received a Component which was made a reactive object. This can ` +
  24351. `lead to unnecessary performance overhead, and should be avoided by ` +
  24352. `marking the component with \`markRaw\` or using \`shallowRef\` ` +
  24353. `instead of \`ref\`.`, `\nComponent that was made reactive: `, type);
  24354. }
  24355. return createBaseVNode(type, props, children, patchFlag, dynamicProps, shapeFlag, isBlockNode, true);
  24356. }
  24357. function guardReactiveProps(props) {
  24358. if (!props)
  24359. return null;
  24360. return (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isProxy)(props) || InternalObjectKey in props
  24361. ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, props)
  24362. : props;
  24363. }
  24364. function cloneVNode(vnode, extraProps, mergeRef = false) {
  24365. // This is intentionally NOT using spread or extend to avoid the runtime
  24366. // key enumeration cost.
  24367. const { props, ref, patchFlag, children } = vnode;
  24368. const mergedProps = extraProps ? mergeProps(props || {}, extraProps) : props;
  24369. const cloned = {
  24370. __v_isVNode: true,
  24371. __v_skip: true,
  24372. type: vnode.type,
  24373. props: mergedProps,
  24374. key: mergedProps && normalizeKey(mergedProps),
  24375. ref: extraProps && extraProps.ref
  24376. ? // #2078 in the case of <component :is="vnode" ref="extra"/>
  24377. // if the vnode itself already has a ref, cloneVNode will need to merge
  24378. // the refs so the single vnode can be set on multiple refs
  24379. mergeRef && ref
  24380. ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(ref)
  24381. ? ref.concat(normalizeRef(extraProps))
  24382. : [ref, normalizeRef(extraProps)]
  24383. : normalizeRef(extraProps)
  24384. : ref,
  24385. scopeId: vnode.scopeId,
  24386. slotScopeIds: vnode.slotScopeIds,
  24387. children: ( true) && patchFlag === -1 /* HOISTED */ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(children)
  24388. ? children.map(deepCloneVNode)
  24389. : children,
  24390. target: vnode.target,
  24391. targetAnchor: vnode.targetAnchor,
  24392. staticCount: vnode.staticCount,
  24393. shapeFlag: vnode.shapeFlag,
  24394. // if the vnode is cloned with extra props, we can no longer assume its
  24395. // existing patch flag to be reliable and need to add the FULL_PROPS flag.
  24396. // note: preserve flag for fragments since they use the flag for children
  24397. // fast paths only.
  24398. patchFlag: extraProps && vnode.type !== Fragment
  24399. ? patchFlag === -1 // hoisted node
  24400. ? 16 /* FULL_PROPS */
  24401. : patchFlag | 16 /* FULL_PROPS */
  24402. : patchFlag,
  24403. dynamicProps: vnode.dynamicProps,
  24404. dynamicChildren: vnode.dynamicChildren,
  24405. appContext: vnode.appContext,
  24406. dirs: vnode.dirs,
  24407. transition: vnode.transition,
  24408. // These should technically only be non-null on mounted VNodes. However,
  24409. // they *should* be copied for kept-alive vnodes. So we just always copy
  24410. // them since them being non-null during a mount doesn't affect the logic as
  24411. // they will simply be overwritten.
  24412. component: vnode.component,
  24413. suspense: vnode.suspense,
  24414. ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
  24415. ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
  24416. el: vnode.el,
  24417. anchor: vnode.anchor
  24418. };
  24419. return cloned;
  24420. }
  24421. /**
  24422. * Dev only, for HMR of hoisted vnodes reused in v-for
  24423. * https://github.com/vitejs/vite/issues/2022
  24424. */
  24425. function deepCloneVNode(vnode) {
  24426. const cloned = cloneVNode(vnode);
  24427. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(vnode.children)) {
  24428. cloned.children = vnode.children.map(deepCloneVNode);
  24429. }
  24430. return cloned;
  24431. }
  24432. /**
  24433. * @private
  24434. */
  24435. function createTextVNode(text = ' ', flag = 0) {
  24436. return createVNode(Text, null, text, flag);
  24437. }
  24438. /**
  24439. * @private
  24440. */
  24441. function createStaticVNode(content, numberOfNodes) {
  24442. // A static vnode can contain multiple stringified elements, and the number
  24443. // of elements is necessary for hydration.
  24444. const vnode = createVNode(Static, null, content);
  24445. vnode.staticCount = numberOfNodes;
  24446. return vnode;
  24447. }
  24448. /**
  24449. * @private
  24450. */
  24451. function createCommentVNode(text = '',
  24452. // when used as the v-else branch, the comment node must be created as a
  24453. // block to ensure correct updates.
  24454. asBlock = false) {
  24455. return asBlock
  24456. ? (openBlock(), createBlock(Comment, null, text))
  24457. : createVNode(Comment, null, text);
  24458. }
  24459. function normalizeVNode(child) {
  24460. if (child == null || typeof child === 'boolean') {
  24461. // empty placeholder
  24462. return createVNode(Comment);
  24463. }
  24464. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(child)) {
  24465. // fragment
  24466. return createVNode(Fragment, null,
  24467. // #3666, avoid reference pollution when reusing vnode
  24468. child.slice());
  24469. }
  24470. else if (typeof child === 'object') {
  24471. // already vnode, this should be the most common since compiled templates
  24472. // always produce all-vnode children arrays
  24473. return cloneIfMounted(child);
  24474. }
  24475. else {
  24476. // strings and numbers
  24477. return createVNode(Text, null, String(child));
  24478. }
  24479. }
  24480. // optimized normalization for template-compiled render fns
  24481. function cloneIfMounted(child) {
  24482. return child.el === null || child.memo ? child : cloneVNode(child);
  24483. }
  24484. function normalizeChildren(vnode, children) {
  24485. let type = 0;
  24486. const { shapeFlag } = vnode;
  24487. if (children == null) {
  24488. children = null;
  24489. }
  24490. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(children)) {
  24491. type = 16 /* ARRAY_CHILDREN */;
  24492. }
  24493. else if (typeof children === 'object') {
  24494. if (shapeFlag & (1 /* ELEMENT */ | 64 /* TELEPORT */)) {
  24495. // Normalize slot to plain children for plain element and Teleport
  24496. const slot = children.default;
  24497. if (slot) {
  24498. // _c marker is added by withCtx() indicating this is a compiled slot
  24499. slot._c && (slot._d = false);
  24500. normalizeChildren(vnode, slot());
  24501. slot._c && (slot._d = true);
  24502. }
  24503. return;
  24504. }
  24505. else {
  24506. type = 32 /* SLOTS_CHILDREN */;
  24507. const slotFlag = children._;
  24508. if (!slotFlag && !(InternalObjectKey in children)) {
  24509. children._ctx = currentRenderingInstance;
  24510. }
  24511. else if (slotFlag === 3 /* FORWARDED */ && currentRenderingInstance) {
  24512. // a child component receives forwarded slots from the parent.
  24513. // its slot type is determined by its parent's slot type.
  24514. if (currentRenderingInstance.slots._ === 1 /* STABLE */) {
  24515. children._ = 1 /* STABLE */;
  24516. }
  24517. else {
  24518. children._ = 2 /* DYNAMIC */;
  24519. vnode.patchFlag |= 1024 /* DYNAMIC_SLOTS */;
  24520. }
  24521. }
  24522. }
  24523. }
  24524. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(children)) {
  24525. children = { default: children, _ctx: currentRenderingInstance };
  24526. type = 32 /* SLOTS_CHILDREN */;
  24527. }
  24528. else {
  24529. children = String(children);
  24530. // force teleport children to array so it can be moved around
  24531. if (shapeFlag & 64 /* TELEPORT */) {
  24532. type = 16 /* ARRAY_CHILDREN */;
  24533. children = [createTextVNode(children)];
  24534. }
  24535. else {
  24536. type = 8 /* TEXT_CHILDREN */;
  24537. }
  24538. }
  24539. vnode.children = children;
  24540. vnode.shapeFlag |= type;
  24541. }
  24542. function mergeProps(...args) {
  24543. const ret = {};
  24544. for (let i = 0; i < args.length; i++) {
  24545. const toMerge = args[i];
  24546. for (const key in toMerge) {
  24547. if (key === 'class') {
  24548. if (ret.class !== toMerge.class) {
  24549. ret.class = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeClass)([ret.class, toMerge.class]);
  24550. }
  24551. }
  24552. else if (key === 'style') {
  24553. ret.style = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.normalizeStyle)([ret.style, toMerge.style]);
  24554. }
  24555. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) {
  24556. const existing = ret[key];
  24557. const incoming = toMerge[key];
  24558. if (incoming &&
  24559. existing !== incoming &&
  24560. !((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(existing) && existing.includes(incoming))) {
  24561. ret[key] = existing
  24562. ? [].concat(existing, incoming)
  24563. : incoming;
  24564. }
  24565. }
  24566. else if (key !== '') {
  24567. ret[key] = toMerge[key];
  24568. }
  24569. }
  24570. }
  24571. return ret;
  24572. }
  24573. function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
  24574. callWithAsyncErrorHandling(hook, instance, 7 /* VNODE_HOOK */, [
  24575. vnode,
  24576. prevVNode
  24577. ]);
  24578. }
  24579. /**
  24580. * Actual implementation
  24581. */
  24582. function renderList(source, renderItem, cache, index) {
  24583. let ret;
  24584. const cached = (cache && cache[index]);
  24585. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(source) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(source)) {
  24586. ret = new Array(source.length);
  24587. for (let i = 0, l = source.length; i < l; i++) {
  24588. ret[i] = renderItem(source[i], i, undefined, cached && cached[i]);
  24589. }
  24590. }
  24591. else if (typeof source === 'number') {
  24592. if (( true) && !Number.isInteger(source)) {
  24593. warn(`The v-for range expect an integer value but got ${source}.`);
  24594. return [];
  24595. }
  24596. ret = new Array(source);
  24597. for (let i = 0; i < source; i++) {
  24598. ret[i] = renderItem(i + 1, i, undefined, cached && cached[i]);
  24599. }
  24600. }
  24601. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(source)) {
  24602. if (source[Symbol.iterator]) {
  24603. ret = Array.from(source, (item, i) => renderItem(item, i, undefined, cached && cached[i]));
  24604. }
  24605. else {
  24606. const keys = Object.keys(source);
  24607. ret = new Array(keys.length);
  24608. for (let i = 0, l = keys.length; i < l; i++) {
  24609. const key = keys[i];
  24610. ret[i] = renderItem(source[key], key, i, cached && cached[i]);
  24611. }
  24612. }
  24613. }
  24614. else {
  24615. ret = [];
  24616. }
  24617. if (cache) {
  24618. cache[index] = ret;
  24619. }
  24620. return ret;
  24621. }
  24622. /**
  24623. * Compiler runtime helper for creating dynamic slots object
  24624. * @private
  24625. */
  24626. function createSlots(slots, dynamicSlots) {
  24627. for (let i = 0; i < dynamicSlots.length; i++) {
  24628. const slot = dynamicSlots[i];
  24629. // array of dynamic slot generated by <template v-for="..." #[...]>
  24630. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(slot)) {
  24631. for (let j = 0; j < slot.length; j++) {
  24632. slots[slot[j].name] = slot[j].fn;
  24633. }
  24634. }
  24635. else if (slot) {
  24636. // conditional single slot generated by <template v-if="..." #foo>
  24637. slots[slot.name] = slot.fn;
  24638. }
  24639. }
  24640. return slots;
  24641. }
  24642. /**
  24643. * Compiler runtime helper for rendering `<slot/>`
  24644. * @private
  24645. */
  24646. function renderSlot(slots, name, props = {},
  24647. // this is not a user-facing function, so the fallback is always generated by
  24648. // the compiler and guaranteed to be a function returning an array
  24649. fallback, noSlotted) {
  24650. if (currentRenderingInstance.isCE) {
  24651. return createVNode('slot', name === 'default' ? null : { name }, fallback && fallback());
  24652. }
  24653. let slot = slots[name];
  24654. if (( true) && slot && slot.length > 1) {
  24655. warn(`SSR-optimized slot function detected in a non-SSR-optimized render ` +
  24656. `function. You need to mark this component with $dynamic-slots in the ` +
  24657. `parent template.`);
  24658. slot = () => [];
  24659. }
  24660. // a compiled slot disables block tracking by default to avoid manual
  24661. // invocation interfering with template-based block tracking, but in
  24662. // `renderSlot` we can be sure that it's template-based so we can force
  24663. // enable it.
  24664. if (slot && slot._c) {
  24665. slot._d = false;
  24666. }
  24667. openBlock();
  24668. const validSlotContent = slot && ensureValidVNode(slot(props));
  24669. const rendered = createBlock(Fragment, { key: props.key || `_${name}` }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 /* STABLE */
  24670. ? 64 /* STABLE_FRAGMENT */
  24671. : -2 /* BAIL */);
  24672. if (!noSlotted && rendered.scopeId) {
  24673. rendered.slotScopeIds = [rendered.scopeId + '-s'];
  24674. }
  24675. if (slot && slot._c) {
  24676. slot._d = true;
  24677. }
  24678. return rendered;
  24679. }
  24680. function ensureValidVNode(vnodes) {
  24681. return vnodes.some(child => {
  24682. if (!isVNode(child))
  24683. return true;
  24684. if (child.type === Comment)
  24685. return false;
  24686. if (child.type === Fragment &&
  24687. !ensureValidVNode(child.children))
  24688. return false;
  24689. return true;
  24690. })
  24691. ? vnodes
  24692. : null;
  24693. }
  24694. /**
  24695. * For prefixing keys in v-on="obj" with "on"
  24696. * @private
  24697. */
  24698. function toHandlers(obj) {
  24699. const ret = {};
  24700. if (( true) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(obj)) {
  24701. warn(`v-on with no argument expects an object value.`);
  24702. return ret;
  24703. }
  24704. for (const key in obj) {
  24705. ret[(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toHandlerKey)(key)] = obj[key];
  24706. }
  24707. return ret;
  24708. }
  24709. /**
  24710. * #2437 In Vue 3, functional components do not have a public instance proxy but
  24711. * they exist in the internal parent chain. For code that relies on traversing
  24712. * public $parent chains, skip functional ones and go to the parent instead.
  24713. */
  24714. const getPublicInstance = (i) => {
  24715. if (!i)
  24716. return null;
  24717. if (isStatefulComponent(i))
  24718. return getExposeProxy(i) || i.proxy;
  24719. return getPublicInstance(i.parent);
  24720. };
  24721. const publicPropertiesMap = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(Object.create(null), {
  24722. $: i => i,
  24723. $el: i => i.vnode.el,
  24724. $data: i => i.data,
  24725. $props: i => (( true) ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(i.props) : 0),
  24726. $attrs: i => (( true) ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(i.attrs) : 0),
  24727. $slots: i => (( true) ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(i.slots) : 0),
  24728. $refs: i => (( true) ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(i.refs) : 0),
  24729. $parent: i => getPublicInstance(i.parent),
  24730. $root: i => getPublicInstance(i.root),
  24731. $emit: i => i.emit,
  24732. $options: i => ( true ? resolveMergedOptions(i) : 0),
  24733. $forceUpdate: i => () => queueJob(i.update),
  24734. $nextTick: i => nextTick.bind(i.proxy),
  24735. $watch: i => ( true ? instanceWatch.bind(i) : 0)
  24736. });
  24737. const PublicInstanceProxyHandlers = {
  24738. get({ _: instance }, key) {
  24739. const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
  24740. // for internal formatters to know that this is a Vue instance
  24741. if (( true) && key === '__isVue') {
  24742. return true;
  24743. }
  24744. // prioritize <script setup> bindings during dev.
  24745. // this allows even properties that start with _ or $ to be used - so that
  24746. // it aligns with the production behavior where the render fn is inlined and
  24747. // indeed has access to all declared variables.
  24748. if (( true) &&
  24749. setupState !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ &&
  24750. setupState.__isScriptSetup &&
  24751. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, key)) {
  24752. return setupState[key];
  24753. }
  24754. // data / props / ctx
  24755. // This getter gets called for every property access on the render context
  24756. // during render and is a major hotspot. The most expensive part of this
  24757. // is the multiple hasOwn() calls. It's much faster to do a simple property
  24758. // access on a plain object, so we use an accessCache object (with null
  24759. // prototype) to memoize what access type a key corresponds to.
  24760. let normalizedProps;
  24761. if (key[0] !== '$') {
  24762. const n = accessCache[key];
  24763. if (n !== undefined) {
  24764. switch (n) {
  24765. case 1 /* SETUP */:
  24766. return setupState[key];
  24767. case 2 /* DATA */:
  24768. return data[key];
  24769. case 4 /* CONTEXT */:
  24770. return ctx[key];
  24771. case 3 /* PROPS */:
  24772. return props[key];
  24773. // default: just fallthrough
  24774. }
  24775. }
  24776. else if (setupState !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, key)) {
  24777. accessCache[key] = 1 /* SETUP */;
  24778. return setupState[key];
  24779. }
  24780. else if (data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(data, key)) {
  24781. accessCache[key] = 2 /* DATA */;
  24782. return data[key];
  24783. }
  24784. else if (
  24785. // only cache other properties when instance has declared (thus stable)
  24786. // props
  24787. (normalizedProps = instance.propsOptions[0]) &&
  24788. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(normalizedProps, key)) {
  24789. accessCache[key] = 3 /* PROPS */;
  24790. return props[key];
  24791. }
  24792. else if (ctx !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(ctx, key)) {
  24793. accessCache[key] = 4 /* CONTEXT */;
  24794. return ctx[key];
  24795. }
  24796. else if ( false || shouldCacheAccess) {
  24797. accessCache[key] = 0 /* OTHER */;
  24798. }
  24799. }
  24800. const publicGetter = publicPropertiesMap[key];
  24801. let cssModule, globalProperties;
  24802. // public $xxx properties
  24803. if (publicGetter) {
  24804. if (key === '$attrs') {
  24805. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.track)(instance, "get" /* GET */, key);
  24806. ( true) && markAttrsAccessed();
  24807. }
  24808. return publicGetter(instance);
  24809. }
  24810. else if (
  24811. // css module (injected by vue-loader)
  24812. (cssModule = type.__cssModules) &&
  24813. (cssModule = cssModule[key])) {
  24814. return cssModule;
  24815. }
  24816. else if (ctx !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(ctx, key)) {
  24817. // user may set custom properties to `this` that start with `$`
  24818. accessCache[key] = 4 /* CONTEXT */;
  24819. return ctx[key];
  24820. }
  24821. else if (
  24822. // global properties
  24823. ((globalProperties = appContext.config.globalProperties),
  24824. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(globalProperties, key))) {
  24825. {
  24826. return globalProperties[key];
  24827. }
  24828. }
  24829. else if (( true) &&
  24830. currentRenderingInstance &&
  24831. (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(key) ||
  24832. // #1091 avoid internal isRef/isVNode checks on component instance leading
  24833. // to infinite warning loop
  24834. key.indexOf('__v') !== 0)) {
  24835. if (data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ &&
  24836. (key[0] === '$' || key[0] === '_') &&
  24837. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(data, key)) {
  24838. warn(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved ` +
  24839. `character ("$" or "_") and is not proxied on the render context.`);
  24840. }
  24841. else if (instance === currentRenderingInstance) {
  24842. warn(`Property ${JSON.stringify(key)} was accessed during render ` +
  24843. `but is not defined on instance.`);
  24844. }
  24845. }
  24846. },
  24847. set({ _: instance }, key, value) {
  24848. const { data, setupState, ctx } = instance;
  24849. if (setupState !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, key)) {
  24850. setupState[key] = value;
  24851. return true;
  24852. }
  24853. else if (data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(data, key)) {
  24854. data[key] = value;
  24855. return true;
  24856. }
  24857. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(instance.props, key)) {
  24858. ( true) &&
  24859. warn(`Attempting to mutate prop "${key}". Props are readonly.`, instance);
  24860. return false;
  24861. }
  24862. if (key[0] === '$' && key.slice(1) in instance) {
  24863. ( true) &&
  24864. warn(`Attempting to mutate public property "${key}". ` +
  24865. `Properties starting with $ are reserved and readonly.`, instance);
  24866. return false;
  24867. }
  24868. else {
  24869. if (( true) && key in instance.appContext.config.globalProperties) {
  24870. Object.defineProperty(ctx, key, {
  24871. enumerable: true,
  24872. configurable: true,
  24873. value
  24874. });
  24875. }
  24876. else {
  24877. ctx[key] = value;
  24878. }
  24879. }
  24880. return true;
  24881. },
  24882. has({ _: { data, setupState, accessCache, ctx, appContext, propsOptions } }, key) {
  24883. let normalizedProps;
  24884. return (!!accessCache[key] ||
  24885. (data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(data, key)) ||
  24886. (setupState !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(setupState, key)) ||
  24887. ((normalizedProps = propsOptions[0]) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(normalizedProps, key)) ||
  24888. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(ctx, key) ||
  24889. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(publicPropertiesMap, key) ||
  24890. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hasOwn)(appContext.config.globalProperties, key));
  24891. },
  24892. defineProperty(target, key, descriptor) {
  24893. if (descriptor.get != null) {
  24894. this.set(target, key, descriptor.get(), null);
  24895. }
  24896. else if (descriptor.value != null) {
  24897. this.set(target, key, descriptor.value, null);
  24898. }
  24899. return Reflect.defineProperty(target, key, descriptor);
  24900. }
  24901. };
  24902. if (true) {
  24903. PublicInstanceProxyHandlers.ownKeys = (target) => {
  24904. warn(`Avoid app logic that relies on enumerating keys on a component instance. ` +
  24905. `The keys will be empty in production mode to avoid performance overhead.`);
  24906. return Reflect.ownKeys(target);
  24907. };
  24908. }
  24909. const RuntimeCompiledPublicInstanceProxyHandlers = /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, PublicInstanceProxyHandlers, {
  24910. get(target, key) {
  24911. // fast path for unscopables when using `with` block
  24912. if (key === Symbol.unscopables) {
  24913. return;
  24914. }
  24915. return PublicInstanceProxyHandlers.get(target, key, target);
  24916. },
  24917. has(_, key) {
  24918. const has = key[0] !== '_' && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isGloballyWhitelisted)(key);
  24919. if (( true) && !has && PublicInstanceProxyHandlers.has(_, key)) {
  24920. warn(`Property ${JSON.stringify(key)} should not start with _ which is a reserved prefix for Vue internals.`);
  24921. }
  24922. return has;
  24923. }
  24924. });
  24925. // dev only
  24926. // In dev mode, the proxy target exposes the same properties as seen on `this`
  24927. // for easier console inspection. In prod mode it will be an empty object so
  24928. // these properties definitions can be skipped.
  24929. function createDevRenderContext(instance) {
  24930. const target = {};
  24931. // expose internal instance for proxy handlers
  24932. Object.defineProperty(target, `_`, {
  24933. configurable: true,
  24934. enumerable: false,
  24935. get: () => instance
  24936. });
  24937. // expose public properties
  24938. Object.keys(publicPropertiesMap).forEach(key => {
  24939. Object.defineProperty(target, key, {
  24940. configurable: true,
  24941. enumerable: false,
  24942. get: () => publicPropertiesMap[key](instance),
  24943. // intercepted by the proxy so no need for implementation,
  24944. // but needed to prevent set errors
  24945. set: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP
  24946. });
  24947. });
  24948. return target;
  24949. }
  24950. // dev only
  24951. function exposePropsOnRenderContext(instance) {
  24952. const { ctx, propsOptions: [propsOptions] } = instance;
  24953. if (propsOptions) {
  24954. Object.keys(propsOptions).forEach(key => {
  24955. Object.defineProperty(ctx, key, {
  24956. enumerable: true,
  24957. configurable: true,
  24958. get: () => instance.props[key],
  24959. set: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP
  24960. });
  24961. });
  24962. }
  24963. }
  24964. // dev only
  24965. function exposeSetupStateOnRenderContext(instance) {
  24966. const { ctx, setupState } = instance;
  24967. Object.keys((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(setupState)).forEach(key => {
  24968. if (!setupState.__isScriptSetup) {
  24969. if (key[0] === '$' || key[0] === '_') {
  24970. warn(`setup() return property ${JSON.stringify(key)} should not start with "$" or "_" ` +
  24971. `which are reserved prefixes for Vue internals.`);
  24972. return;
  24973. }
  24974. Object.defineProperty(ctx, key, {
  24975. enumerable: true,
  24976. configurable: true,
  24977. get: () => setupState[key],
  24978. set: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP
  24979. });
  24980. }
  24981. });
  24982. }
  24983. const emptyAppContext = createAppContext();
  24984. let uid$1 = 0;
  24985. function createComponentInstance(vnode, parent, suspense) {
  24986. const type = vnode.type;
  24987. // inherit parent app context - or - if root, adopt from root vnode
  24988. const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
  24989. const instance = {
  24990. uid: uid$1++,
  24991. vnode,
  24992. type,
  24993. parent,
  24994. appContext,
  24995. root: null,
  24996. next: null,
  24997. subTree: null,
  24998. effect: null,
  24999. update: null,
  25000. scope: new _vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.EffectScope(true /* detached */),
  25001. render: null,
  25002. proxy: null,
  25003. exposed: null,
  25004. exposeProxy: null,
  25005. withProxy: null,
  25006. provides: parent ? parent.provides : Object.create(appContext.provides),
  25007. accessCache: null,
  25008. renderCache: [],
  25009. // local resovled assets
  25010. components: null,
  25011. directives: null,
  25012. // resolved props and emits options
  25013. propsOptions: normalizePropsOptions(type, appContext),
  25014. emitsOptions: normalizeEmitsOptions(type, appContext),
  25015. // emit
  25016. emit: null,
  25017. emitted: null,
  25018. // props default value
  25019. propsDefaults: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
  25020. // inheritAttrs
  25021. inheritAttrs: type.inheritAttrs,
  25022. // state
  25023. ctx: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
  25024. data: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
  25025. props: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
  25026. attrs: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
  25027. slots: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
  25028. refs: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
  25029. setupState: _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ,
  25030. setupContext: null,
  25031. // suspense related
  25032. suspense,
  25033. suspenseId: suspense ? suspense.pendingId : 0,
  25034. asyncDep: null,
  25035. asyncResolved: false,
  25036. // lifecycle hooks
  25037. // not using enums here because it results in computed properties
  25038. isMounted: false,
  25039. isUnmounted: false,
  25040. isDeactivated: false,
  25041. bc: null,
  25042. c: null,
  25043. bm: null,
  25044. m: null,
  25045. bu: null,
  25046. u: null,
  25047. um: null,
  25048. bum: null,
  25049. da: null,
  25050. a: null,
  25051. rtg: null,
  25052. rtc: null,
  25053. ec: null,
  25054. sp: null
  25055. };
  25056. if ((true)) {
  25057. instance.ctx = createDevRenderContext(instance);
  25058. }
  25059. else {}
  25060. instance.root = parent ? parent.root : instance;
  25061. instance.emit = emit$1.bind(null, instance);
  25062. // apply custom element special handling
  25063. if (vnode.ce) {
  25064. vnode.ce(instance);
  25065. }
  25066. return instance;
  25067. }
  25068. let currentInstance = null;
  25069. const getCurrentInstance = () => currentInstance || currentRenderingInstance;
  25070. const setCurrentInstance = (instance) => {
  25071. currentInstance = instance;
  25072. instance.scope.on();
  25073. };
  25074. const unsetCurrentInstance = () => {
  25075. currentInstance && currentInstance.scope.off();
  25076. currentInstance = null;
  25077. };
  25078. const isBuiltInTag = /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.makeMap)('slot,component');
  25079. function validateComponentName(name, config) {
  25080. const appIsNativeTag = config.isNativeTag || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NO;
  25081. if (isBuiltInTag(name) || appIsNativeTag(name)) {
  25082. warn('Do not use built-in or reserved HTML elements as component id: ' + name);
  25083. }
  25084. }
  25085. function isStatefulComponent(instance) {
  25086. return instance.vnode.shapeFlag & 4 /* STATEFUL_COMPONENT */;
  25087. }
  25088. let isInSSRComponentSetup = false;
  25089. function setupComponent(instance, isSSR = false) {
  25090. isInSSRComponentSetup = isSSR;
  25091. const { props, children } = instance.vnode;
  25092. const isStateful = isStatefulComponent(instance);
  25093. initProps(instance, props, isStateful, isSSR);
  25094. initSlots(instance, children);
  25095. const setupResult = isStateful
  25096. ? setupStatefulComponent(instance, isSSR)
  25097. : undefined;
  25098. isInSSRComponentSetup = false;
  25099. return setupResult;
  25100. }
  25101. function setupStatefulComponent(instance, isSSR) {
  25102. const Component = instance.type;
  25103. if ((true)) {
  25104. if (Component.name) {
  25105. validateComponentName(Component.name, instance.appContext.config);
  25106. }
  25107. if (Component.components) {
  25108. const names = Object.keys(Component.components);
  25109. for (let i = 0; i < names.length; i++) {
  25110. validateComponentName(names[i], instance.appContext.config);
  25111. }
  25112. }
  25113. if (Component.directives) {
  25114. const names = Object.keys(Component.directives);
  25115. for (let i = 0; i < names.length; i++) {
  25116. validateDirectiveName(names[i]);
  25117. }
  25118. }
  25119. if (Component.compilerOptions && isRuntimeOnly()) {
  25120. warn(`"compilerOptions" is only supported when using a build of Vue that ` +
  25121. `includes the runtime compiler. Since you are using a runtime-only ` +
  25122. `build, the options should be passed via your build tool config instead.`);
  25123. }
  25124. }
  25125. // 0. create render proxy property access cache
  25126. instance.accessCache = Object.create(null);
  25127. // 1. create public instance / render proxy
  25128. // also mark it raw so it's never observed
  25129. instance.proxy = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.markRaw)(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
  25130. if ((true)) {
  25131. exposePropsOnRenderContext(instance);
  25132. }
  25133. // 2. call setup()
  25134. const { setup } = Component;
  25135. if (setup) {
  25136. const setupContext = (instance.setupContext =
  25137. setup.length > 1 ? createSetupContext(instance) : null);
  25138. setCurrentInstance(instance);
  25139. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)();
  25140. const setupResult = callWithErrorHandling(setup, instance, 0 /* SETUP_FUNCTION */, [( true) ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(instance.props) : 0, setupContext]);
  25141. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)();
  25142. unsetCurrentInstance();
  25143. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPromise)(setupResult)) {
  25144. setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
  25145. if (isSSR) {
  25146. // return the promise so server-renderer can wait on it
  25147. return setupResult
  25148. .then((resolvedResult) => {
  25149. handleSetupResult(instance, resolvedResult, isSSR);
  25150. })
  25151. .catch(e => {
  25152. handleError(e, instance, 0 /* SETUP_FUNCTION */);
  25153. });
  25154. }
  25155. else {
  25156. // async setup returned Promise.
  25157. // bail here and wait for re-entry.
  25158. instance.asyncDep = setupResult;
  25159. }
  25160. }
  25161. else {
  25162. handleSetupResult(instance, setupResult, isSSR);
  25163. }
  25164. }
  25165. else {
  25166. finishComponentSetup(instance, isSSR);
  25167. }
  25168. }
  25169. function handleSetupResult(instance, setupResult, isSSR) {
  25170. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(setupResult)) {
  25171. // setup returned an inline render function
  25172. if (instance.type.__ssrInlineRender) {
  25173. // when the function's name is `ssrRender` (compiled by SFC inline mode),
  25174. // set it as ssrRender instead.
  25175. instance.ssrRender = setupResult;
  25176. }
  25177. else {
  25178. instance.render = setupResult;
  25179. }
  25180. }
  25181. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(setupResult)) {
  25182. if (( true) && isVNode(setupResult)) {
  25183. warn(`setup() should not return VNodes directly - ` +
  25184. `return a render function instead.`);
  25185. }
  25186. // setup returned bindings.
  25187. // assuming a render function compiled from template is present.
  25188. if (true) {
  25189. instance.devtoolsRawSetupState = setupResult;
  25190. }
  25191. instance.setupState = (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.proxyRefs)(setupResult);
  25192. if ((true)) {
  25193. exposeSetupStateOnRenderContext(instance);
  25194. }
  25195. }
  25196. else if (( true) && setupResult !== undefined) {
  25197. warn(`setup() should return an object. Received: ${setupResult === null ? 'null' : typeof setupResult}`);
  25198. }
  25199. finishComponentSetup(instance, isSSR);
  25200. }
  25201. let compile;
  25202. let installWithProxy;
  25203. /**
  25204. * For runtime-dom to register the compiler.
  25205. * Note the exported method uses any to avoid d.ts relying on the compiler types.
  25206. */
  25207. function registerRuntimeCompiler(_compile) {
  25208. compile = _compile;
  25209. installWithProxy = i => {
  25210. if (i.render._rc) {
  25211. i.withProxy = new Proxy(i.ctx, RuntimeCompiledPublicInstanceProxyHandlers);
  25212. }
  25213. };
  25214. }
  25215. // dev only
  25216. const isRuntimeOnly = () => !compile;
  25217. function finishComponentSetup(instance, isSSR, skipOptions) {
  25218. const Component = instance.type;
  25219. // template / render function normalization
  25220. // could be already set when returned from setup()
  25221. if (!instance.render) {
  25222. // only do on-the-fly compile if not in SSR - SSR on-the-fly compilation
  25223. // is done by server-renderer
  25224. if (!isSSR && compile && !Component.render) {
  25225. const template = Component.template;
  25226. if (template) {
  25227. if ((true)) {
  25228. startMeasure(instance, `compile`);
  25229. }
  25230. const { isCustomElement, compilerOptions } = instance.appContext.config;
  25231. const { delimiters, compilerOptions: componentCompilerOptions } = Component;
  25232. const finalCompilerOptions = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({
  25233. isCustomElement,
  25234. delimiters
  25235. }, compilerOptions), componentCompilerOptions);
  25236. Component.render = compile(template, finalCompilerOptions);
  25237. if ((true)) {
  25238. endMeasure(instance, `compile`);
  25239. }
  25240. }
  25241. }
  25242. instance.render = (Component.render || _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP);
  25243. // for runtime-compiled render functions using `with` blocks, the render
  25244. // proxy used needs a different `has` handler which is more performant and
  25245. // also only allows a whitelist of globals to fallthrough.
  25246. if (installWithProxy) {
  25247. installWithProxy(instance);
  25248. }
  25249. }
  25250. // support for 2.x options
  25251. if (true) {
  25252. setCurrentInstance(instance);
  25253. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.pauseTracking)();
  25254. applyOptions(instance);
  25255. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.resetTracking)();
  25256. unsetCurrentInstance();
  25257. }
  25258. // warn missing template/render
  25259. // the runtime compilation of template in SSR is done by server-render
  25260. if (( true) && !Component.render && instance.render === _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP && !isSSR) {
  25261. /* istanbul ignore if */
  25262. if (!compile && Component.template) {
  25263. warn(`Component provided template option but ` +
  25264. `runtime compilation is not supported in this build of Vue.` +
  25265. (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".`
  25266. ) /* should not happen */);
  25267. }
  25268. else {
  25269. warn(`Component is missing template or render function.`);
  25270. }
  25271. }
  25272. }
  25273. function createAttrsProxy(instance) {
  25274. return new Proxy(instance.attrs, ( true)
  25275. ? {
  25276. get(target, key) {
  25277. markAttrsAccessed();
  25278. (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.track)(instance, "get" /* GET */, '$attrs');
  25279. return target[key];
  25280. },
  25281. set() {
  25282. warn(`setupContext.attrs is readonly.`);
  25283. return false;
  25284. },
  25285. deleteProperty() {
  25286. warn(`setupContext.attrs is readonly.`);
  25287. return false;
  25288. }
  25289. }
  25290. : 0);
  25291. }
  25292. function createSetupContext(instance) {
  25293. const expose = exposed => {
  25294. if (( true) && instance.exposed) {
  25295. warn(`expose() should be called only once per setup().`);
  25296. }
  25297. instance.exposed = exposed || {};
  25298. };
  25299. let attrs;
  25300. if ((true)) {
  25301. // We use getters in dev in case libs like test-utils overwrite instance
  25302. // properties (overwrites should not be done in prod)
  25303. return Object.freeze({
  25304. get attrs() {
  25305. return attrs || (attrs = createAttrsProxy(instance));
  25306. },
  25307. get slots() {
  25308. return (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly)(instance.slots);
  25309. },
  25310. get emit() {
  25311. return (event, ...args) => instance.emit(event, ...args);
  25312. },
  25313. expose
  25314. });
  25315. }
  25316. else {}
  25317. }
  25318. function getExposeProxy(instance) {
  25319. if (instance.exposed) {
  25320. return (instance.exposeProxy ||
  25321. (instance.exposeProxy = new Proxy((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.proxyRefs)((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.markRaw)(instance.exposed)), {
  25322. get(target, key) {
  25323. if (key in target) {
  25324. return target[key];
  25325. }
  25326. else if (key in publicPropertiesMap) {
  25327. return publicPropertiesMap[key](instance);
  25328. }
  25329. }
  25330. })));
  25331. }
  25332. }
  25333. const classifyRE = /(?:^|[-_])(\w)/g;
  25334. const classify = (str) => str.replace(classifyRE, c => c.toUpperCase()).replace(/[-_]/g, '');
  25335. function getComponentName(Component) {
  25336. return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(Component)
  25337. ? Component.displayName || Component.name
  25338. : Component.name;
  25339. }
  25340. /* istanbul ignore next */
  25341. function formatComponentName(instance, Component, isRoot = false) {
  25342. let name = getComponentName(Component);
  25343. if (!name && Component.__file) {
  25344. const match = Component.__file.match(/([^/\\]+)\.\w+$/);
  25345. if (match) {
  25346. name = match[1];
  25347. }
  25348. }
  25349. if (!name && instance && instance.parent) {
  25350. // try to infer the name based on reverse resolution
  25351. const inferFromRegistry = (registry) => {
  25352. for (const key in registry) {
  25353. if (registry[key] === Component) {
  25354. return key;
  25355. }
  25356. }
  25357. };
  25358. name =
  25359. inferFromRegistry(instance.components ||
  25360. instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
  25361. }
  25362. return name ? classify(name) : isRoot ? `App` : `Anonymous`;
  25363. }
  25364. function isClassComponent(value) {
  25365. return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value) && '__vccOpts' in value;
  25366. }
  25367. const computed = ((getterOrOptions, debugOptions) => {
  25368. // @ts-ignore
  25369. return (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.computed)(getterOrOptions, debugOptions, isInSSRComponentSetup);
  25370. });
  25371. // dev only
  25372. const warnRuntimeUsage = (method) => warn(`${method}() is a compiler-hint helper that is only usable inside ` +
  25373. `<script setup> of a single file component. Its arguments should be ` +
  25374. `compiled away and passing it at runtime has no effect.`);
  25375. // implementation
  25376. function defineProps() {
  25377. if ((true)) {
  25378. warnRuntimeUsage(`defineProps`);
  25379. }
  25380. return null;
  25381. }
  25382. // implementation
  25383. function defineEmits() {
  25384. if ((true)) {
  25385. warnRuntimeUsage(`defineEmits`);
  25386. }
  25387. return null;
  25388. }
  25389. /**
  25390. * Vue `<script setup>` compiler macro for declaring a component's exposed
  25391. * instance properties when it is accessed by a parent component via template
  25392. * refs.
  25393. *
  25394. * `<script setup>` components are closed by default - i.e. variables inside
  25395. * the `<script setup>` scope is not exposed to parent unless explicitly exposed
  25396. * via `defineExpose`.
  25397. *
  25398. * This is only usable inside `<script setup>`, is compiled away in the
  25399. * output and should **not** be actually called at runtime.
  25400. */
  25401. function defineExpose(exposed) {
  25402. if ((true)) {
  25403. warnRuntimeUsage(`defineExpose`);
  25404. }
  25405. }
  25406. /**
  25407. * Vue `<script setup>` compiler macro for providing props default values when
  25408. * using type-based `defineProps` declaration.
  25409. *
  25410. * Example usage:
  25411. * ```ts
  25412. * withDefaults(defineProps<{
  25413. * size?: number
  25414. * labels?: string[]
  25415. * }>(), {
  25416. * size: 3,
  25417. * labels: () => ['default label']
  25418. * })
  25419. * ```
  25420. *
  25421. * This is only usable inside `<script setup>`, is compiled away in the output
  25422. * and should **not** be actually called at runtime.
  25423. */
  25424. function withDefaults(props, defaults) {
  25425. if ((true)) {
  25426. warnRuntimeUsage(`withDefaults`);
  25427. }
  25428. return null;
  25429. }
  25430. function useSlots() {
  25431. return getContext().slots;
  25432. }
  25433. function useAttrs() {
  25434. return getContext().attrs;
  25435. }
  25436. function getContext() {
  25437. const i = getCurrentInstance();
  25438. if (( true) && !i) {
  25439. warn(`useContext() called without active instance.`);
  25440. }
  25441. return i.setupContext || (i.setupContext = createSetupContext(i));
  25442. }
  25443. /**
  25444. * Runtime helper for merging default declarations. Imported by compiled code
  25445. * only.
  25446. * @internal
  25447. */
  25448. function mergeDefaults(raw, defaults) {
  25449. const props = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(raw)
  25450. ? raw.reduce((normalized, p) => ((normalized[p] = {}), normalized), {})
  25451. : raw;
  25452. for (const key in defaults) {
  25453. const opt = props[key];
  25454. if (opt) {
  25455. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(opt) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(opt)) {
  25456. props[key] = { type: opt, default: defaults[key] };
  25457. }
  25458. else {
  25459. opt.default = defaults[key];
  25460. }
  25461. }
  25462. else if (opt === null) {
  25463. props[key] = { default: defaults[key] };
  25464. }
  25465. else if ((true)) {
  25466. warn(`props default key "${key}" has no corresponding declaration.`);
  25467. }
  25468. }
  25469. return props;
  25470. }
  25471. /**
  25472. * Used to create a proxy for the rest element when destructuring props with
  25473. * defineProps().
  25474. * @internal
  25475. */
  25476. function createPropsRestProxy(props, excludedKeys) {
  25477. const ret = {};
  25478. for (const key in props) {
  25479. if (!excludedKeys.includes(key)) {
  25480. Object.defineProperty(ret, key, {
  25481. enumerable: true,
  25482. get: () => props[key]
  25483. });
  25484. }
  25485. }
  25486. return ret;
  25487. }
  25488. /**
  25489. * `<script setup>` helper for persisting the current instance context over
  25490. * async/await flows.
  25491. *
  25492. * `@vue/compiler-sfc` converts the following:
  25493. *
  25494. * ```ts
  25495. * const x = await foo()
  25496. * ```
  25497. *
  25498. * into:
  25499. *
  25500. * ```ts
  25501. * let __temp, __restore
  25502. * const x = (([__temp, __restore] = withAsyncContext(() => foo())),__temp=await __temp,__restore(),__temp)
  25503. * ```
  25504. * @internal
  25505. */
  25506. function withAsyncContext(getAwaitable) {
  25507. const ctx = getCurrentInstance();
  25508. if (( true) && !ctx) {
  25509. warn(`withAsyncContext called without active current instance. ` +
  25510. `This is likely a bug.`);
  25511. }
  25512. let awaitable = getAwaitable();
  25513. unsetCurrentInstance();
  25514. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isPromise)(awaitable)) {
  25515. awaitable = awaitable.catch(e => {
  25516. setCurrentInstance(ctx);
  25517. throw e;
  25518. });
  25519. }
  25520. return [awaitable, () => setCurrentInstance(ctx)];
  25521. }
  25522. // Actual implementation
  25523. function h(type, propsOrChildren, children) {
  25524. const l = arguments.length;
  25525. if (l === 2) {
  25526. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(propsOrChildren) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(propsOrChildren)) {
  25527. // single vnode without props
  25528. if (isVNode(propsOrChildren)) {
  25529. return createVNode(type, null, [propsOrChildren]);
  25530. }
  25531. // props without children
  25532. return createVNode(type, propsOrChildren);
  25533. }
  25534. else {
  25535. // omit props
  25536. return createVNode(type, null, propsOrChildren);
  25537. }
  25538. }
  25539. else {
  25540. if (l > 3) {
  25541. children = Array.prototype.slice.call(arguments, 2);
  25542. }
  25543. else if (l === 3 && isVNode(children)) {
  25544. children = [children];
  25545. }
  25546. return createVNode(type, propsOrChildren, children);
  25547. }
  25548. }
  25549. const ssrContextKey = Symbol(( true) ? `ssrContext` : 0);
  25550. const useSSRContext = () => {
  25551. {
  25552. const ctx = inject(ssrContextKey);
  25553. if (!ctx) {
  25554. warn(`Server rendering context not provided. Make sure to only call ` +
  25555. `useSSRContext() conditionally in the server build.`);
  25556. }
  25557. return ctx;
  25558. }
  25559. };
  25560. function isShallow(value) {
  25561. return !!(value && value["__v_isShallow" /* IS_SHALLOW */]);
  25562. }
  25563. function initCustomFormatter() {
  25564. /* eslint-disable no-restricted-globals */
  25565. if ( false || typeof window === 'undefined') {
  25566. return;
  25567. }
  25568. const vueStyle = { style: 'color:#3ba776' };
  25569. const numberStyle = { style: 'color:#0b1bc9' };
  25570. const stringStyle = { style: 'color:#b62e24' };
  25571. const keywordStyle = { style: 'color:#9d288c' };
  25572. // custom formatter for Chrome
  25573. // https://www.mattzeunert.com/2016/02/19/custom-chrome-devtools-object-formatters.html
  25574. const formatter = {
  25575. header(obj) {
  25576. // TODO also format ComponentPublicInstance & ctx.slots/attrs in setup
  25577. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(obj)) {
  25578. return null;
  25579. }
  25580. if (obj.__isVue) {
  25581. return ['div', vueStyle, `VueInstance`];
  25582. }
  25583. else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isRef)(obj)) {
  25584. return [
  25585. 'div',
  25586. {},
  25587. ['span', vueStyle, genRefFlag(obj)],
  25588. '<',
  25589. formatValue(obj.value),
  25590. `>`
  25591. ];
  25592. }
  25593. else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReactive)(obj)) {
  25594. return [
  25595. 'div',
  25596. {},
  25597. ['span', vueStyle, isShallow(obj) ? 'ShallowReactive' : 'Reactive'],
  25598. '<',
  25599. formatValue(obj),
  25600. `>${(0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReadonly)(obj) ? ` (readonly)` : ``}`
  25601. ];
  25602. }
  25603. else if ((0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.isReadonly)(obj)) {
  25604. return [
  25605. 'div',
  25606. {},
  25607. ['span', vueStyle, isShallow(obj) ? 'ShallowReadonly' : 'Readonly'],
  25608. '<',
  25609. formatValue(obj),
  25610. '>'
  25611. ];
  25612. }
  25613. return null;
  25614. },
  25615. hasBody(obj) {
  25616. return obj && obj.__isVue;
  25617. },
  25618. body(obj) {
  25619. if (obj && obj.__isVue) {
  25620. return [
  25621. 'div',
  25622. {},
  25623. ...formatInstance(obj.$)
  25624. ];
  25625. }
  25626. }
  25627. };
  25628. function formatInstance(instance) {
  25629. const blocks = [];
  25630. if (instance.type.props && instance.props) {
  25631. blocks.push(createInstanceBlock('props', (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(instance.props)));
  25632. }
  25633. if (instance.setupState !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) {
  25634. blocks.push(createInstanceBlock('setup', instance.setupState));
  25635. }
  25636. if (instance.data !== _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ) {
  25637. blocks.push(createInstanceBlock('data', (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(instance.data)));
  25638. }
  25639. const computed = extractKeys(instance, 'computed');
  25640. if (computed) {
  25641. blocks.push(createInstanceBlock('computed', computed));
  25642. }
  25643. const injected = extractKeys(instance, 'inject');
  25644. if (injected) {
  25645. blocks.push(createInstanceBlock('injected', injected));
  25646. }
  25647. blocks.push([
  25648. 'div',
  25649. {},
  25650. [
  25651. 'span',
  25652. {
  25653. style: keywordStyle.style + ';opacity:0.66'
  25654. },
  25655. '$ (internal): '
  25656. ],
  25657. ['object', { object: instance }]
  25658. ]);
  25659. return blocks;
  25660. }
  25661. function createInstanceBlock(type, target) {
  25662. target = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, target);
  25663. if (!Object.keys(target).length) {
  25664. return ['span', {}];
  25665. }
  25666. return [
  25667. 'div',
  25668. { style: 'line-height:1.25em;margin-bottom:0.6em' },
  25669. [
  25670. 'div',
  25671. {
  25672. style: 'color:#476582'
  25673. },
  25674. type
  25675. ],
  25676. [
  25677. 'div',
  25678. {
  25679. style: 'padding-left:1.25em'
  25680. },
  25681. ...Object.keys(target).map(key => {
  25682. return [
  25683. 'div',
  25684. {},
  25685. ['span', keywordStyle, key + ': '],
  25686. formatValue(target[key], false)
  25687. ];
  25688. })
  25689. ]
  25690. ];
  25691. }
  25692. function formatValue(v, asRaw = true) {
  25693. if (typeof v === 'number') {
  25694. return ['span', numberStyle, v];
  25695. }
  25696. else if (typeof v === 'string') {
  25697. return ['span', stringStyle, JSON.stringify(v)];
  25698. }
  25699. else if (typeof v === 'boolean') {
  25700. return ['span', keywordStyle, v];
  25701. }
  25702. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(v)) {
  25703. return ['object', { object: asRaw ? (0,_vue_reactivity__WEBPACK_IMPORTED_MODULE_0__.toRaw)(v) : v }];
  25704. }
  25705. else {
  25706. return ['span', stringStyle, String(v)];
  25707. }
  25708. }
  25709. function extractKeys(instance, type) {
  25710. const Comp = instance.type;
  25711. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(Comp)) {
  25712. return;
  25713. }
  25714. const extracted = {};
  25715. for (const key in instance.ctx) {
  25716. if (isKeyOfType(Comp, key, type)) {
  25717. extracted[key] = instance.ctx[key];
  25718. }
  25719. }
  25720. return extracted;
  25721. }
  25722. function isKeyOfType(Comp, key, type) {
  25723. const opts = Comp[type];
  25724. if (((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(opts) && opts.includes(key)) ||
  25725. ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(opts) && key in opts)) {
  25726. return true;
  25727. }
  25728. if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
  25729. return true;
  25730. }
  25731. if (Comp.mixins && Comp.mixins.some(m => isKeyOfType(m, key, type))) {
  25732. return true;
  25733. }
  25734. }
  25735. function genRefFlag(v) {
  25736. if (isShallow(v)) {
  25737. return `ShallowRef`;
  25738. }
  25739. if (v.effect) {
  25740. return `ComputedRef`;
  25741. }
  25742. return `Ref`;
  25743. }
  25744. if (window.devtoolsFormatters) {
  25745. window.devtoolsFormatters.push(formatter);
  25746. }
  25747. else {
  25748. window.devtoolsFormatters = [formatter];
  25749. }
  25750. }
  25751. function withMemo(memo, render, cache, index) {
  25752. const cached = cache[index];
  25753. if (cached && isMemoSame(cached, memo)) {
  25754. return cached;
  25755. }
  25756. const ret = render();
  25757. // shallow clone
  25758. ret.memo = memo.slice();
  25759. return (cache[index] = ret);
  25760. }
  25761. function isMemoSame(cached, memo) {
  25762. const prev = cached.memo;
  25763. if (prev.length != memo.length) {
  25764. return false;
  25765. }
  25766. for (let i = 0; i < prev.length; i++) {
  25767. if (prev[i] !== memo[i]) {
  25768. return false;
  25769. }
  25770. }
  25771. // make sure to let parent block track it when returning cached
  25772. if (isBlockTreeEnabled > 0 && currentBlock) {
  25773. currentBlock.push(cached);
  25774. }
  25775. return true;
  25776. }
  25777. // Core API ------------------------------------------------------------------
  25778. const version = "3.2.31";
  25779. const _ssrUtils = {
  25780. createComponentInstance,
  25781. setupComponent,
  25782. renderComponentRoot,
  25783. setCurrentRenderingInstance,
  25784. isVNode,
  25785. normalizeVNode
  25786. };
  25787. /**
  25788. * SSR utils for \@vue/server-renderer. Only exposed in cjs builds.
  25789. * @internal
  25790. */
  25791. const ssrUtils = (_ssrUtils );
  25792. /**
  25793. * @internal only exposed in compat builds
  25794. */
  25795. const resolveFilter = null;
  25796. /**
  25797. * @internal only exposed in compat builds.
  25798. */
  25799. const compatUtils = (null);
  25800. /***/ }),
  25801. /***/ "./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js":
  25802. /*!***********************************************************************!*\
  25803. !*** ./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js ***!
  25804. \***********************************************************************/
  25805. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  25806. "use strict";
  25807. __webpack_require__.r(__webpack_exports__);
  25808. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  25809. /* harmony export */ "BaseTransition": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.BaseTransition),
  25810. /* harmony export */ "Comment": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Comment),
  25811. /* harmony export */ "EffectScope": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.EffectScope),
  25812. /* harmony export */ "Fragment": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Fragment),
  25813. /* harmony export */ "KeepAlive": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.KeepAlive),
  25814. /* harmony export */ "ReactiveEffect": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect),
  25815. /* harmony export */ "Static": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Static),
  25816. /* harmony export */ "Suspense": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Suspense),
  25817. /* harmony export */ "Teleport": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Teleport),
  25818. /* harmony export */ "Text": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Text),
  25819. /* harmony export */ "callWithAsyncErrorHandling": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling),
  25820. /* harmony export */ "callWithErrorHandling": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.callWithErrorHandling),
  25821. /* harmony export */ "camelize": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.camelize),
  25822. /* harmony export */ "capitalize": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.capitalize),
  25823. /* harmony export */ "cloneVNode": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.cloneVNode),
  25824. /* harmony export */ "compatUtils": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.compatUtils),
  25825. /* harmony export */ "computed": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.computed),
  25826. /* harmony export */ "createBlock": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createBlock),
  25827. /* harmony export */ "createCommentVNode": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode),
  25828. /* harmony export */ "createElementBlock": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createElementBlock),
  25829. /* harmony export */ "createElementVNode": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createElementVNode),
  25830. /* harmony export */ "createHydrationRenderer": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer),
  25831. /* harmony export */ "createPropsRestProxy": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createPropsRestProxy),
  25832. /* harmony export */ "createRenderer": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createRenderer),
  25833. /* harmony export */ "createSlots": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createSlots),
  25834. /* harmony export */ "createStaticVNode": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode),
  25835. /* harmony export */ "createTextVNode": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createTextVNode),
  25836. /* harmony export */ "createVNode": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createVNode),
  25837. /* harmony export */ "customRef": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.customRef),
  25838. /* harmony export */ "defineAsyncComponent": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineAsyncComponent),
  25839. /* harmony export */ "defineComponent": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineComponent),
  25840. /* harmony export */ "defineEmits": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineEmits),
  25841. /* harmony export */ "defineExpose": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineExpose),
  25842. /* harmony export */ "defineProps": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineProps),
  25843. /* harmony export */ "devtools": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.devtools),
  25844. /* harmony export */ "effect": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.effect),
  25845. /* harmony export */ "effectScope": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.effectScope),
  25846. /* harmony export */ "getCurrentInstance": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance),
  25847. /* harmony export */ "getCurrentScope": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope),
  25848. /* harmony export */ "getTransitionRawChildren": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren),
  25849. /* harmony export */ "guardReactiveProps": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps),
  25850. /* harmony export */ "h": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.h),
  25851. /* harmony export */ "handleError": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.handleError),
  25852. /* harmony export */ "initCustomFormatter": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.initCustomFormatter),
  25853. /* harmony export */ "inject": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.inject),
  25854. /* harmony export */ "isMemoSame": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isMemoSame),
  25855. /* harmony export */ "isProxy": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isProxy),
  25856. /* harmony export */ "isReactive": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isReactive),
  25857. /* harmony export */ "isReadonly": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isReadonly),
  25858. /* harmony export */ "isRef": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isRef),
  25859. /* harmony export */ "isRuntimeOnly": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly),
  25860. /* harmony export */ "isShallow": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isShallow),
  25861. /* harmony export */ "isVNode": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isVNode),
  25862. /* harmony export */ "markRaw": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.markRaw),
  25863. /* harmony export */ "mergeDefaults": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.mergeDefaults),
  25864. /* harmony export */ "mergeProps": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.mergeProps),
  25865. /* harmony export */ "nextTick": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.nextTick),
  25866. /* harmony export */ "normalizeClass": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.normalizeClass),
  25867. /* harmony export */ "normalizeProps": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.normalizeProps),
  25868. /* harmony export */ "normalizeStyle": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle),
  25869. /* harmony export */ "onActivated": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onActivated),
  25870. /* harmony export */ "onBeforeMount": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount),
  25871. /* harmony export */ "onBeforeUnmount": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount),
  25872. /* harmony export */ "onBeforeUpdate": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onBeforeUpdate),
  25873. /* harmony export */ "onDeactivated": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onDeactivated),
  25874. /* harmony export */ "onErrorCaptured": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onErrorCaptured),
  25875. /* harmony export */ "onMounted": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onMounted),
  25876. /* harmony export */ "onRenderTracked": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onRenderTracked),
  25877. /* harmony export */ "onRenderTriggered": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onRenderTriggered),
  25878. /* harmony export */ "onScopeDispose": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose),
  25879. /* harmony export */ "onServerPrefetch": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onServerPrefetch),
  25880. /* harmony export */ "onUnmounted": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUnmounted),
  25881. /* harmony export */ "onUpdated": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUpdated),
  25882. /* harmony export */ "openBlock": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.openBlock),
  25883. /* harmony export */ "popScopeId": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.popScopeId),
  25884. /* harmony export */ "provide": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.provide),
  25885. /* harmony export */ "proxyRefs": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.proxyRefs),
  25886. /* harmony export */ "pushScopeId": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.pushScopeId),
  25887. /* harmony export */ "queuePostFlushCb": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.queuePostFlushCb),
  25888. /* harmony export */ "reactive": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.reactive),
  25889. /* harmony export */ "readonly": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.readonly),
  25890. /* harmony export */ "ref": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ref),
  25891. /* harmony export */ "registerRuntimeCompiler": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeCompiler),
  25892. /* harmony export */ "renderList": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.renderList),
  25893. /* harmony export */ "renderSlot": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.renderSlot),
  25894. /* harmony export */ "resolveComponent": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveComponent),
  25895. /* harmony export */ "resolveDirective": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveDirective),
  25896. /* harmony export */ "resolveDynamicComponent": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent),
  25897. /* harmony export */ "resolveFilter": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveFilter),
  25898. /* harmony export */ "resolveTransitionHooks": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks),
  25899. /* harmony export */ "setBlockTracking": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setBlockTracking),
  25900. /* harmony export */ "setDevtoolsHook": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setDevtoolsHook),
  25901. /* harmony export */ "setTransitionHooks": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks),
  25902. /* harmony export */ "shallowReactive": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.shallowReactive),
  25903. /* harmony export */ "shallowReadonly": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly),
  25904. /* harmony export */ "shallowRef": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.shallowRef),
  25905. /* harmony export */ "ssrContextKey": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ssrContextKey),
  25906. /* harmony export */ "ssrUtils": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.ssrUtils),
  25907. /* harmony export */ "stop": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.stop),
  25908. /* harmony export */ "toDisplayString": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toDisplayString),
  25909. /* harmony export */ "toHandlerKey": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey),
  25910. /* harmony export */ "toHandlers": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toHandlers),
  25911. /* harmony export */ "toRaw": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toRaw),
  25912. /* harmony export */ "toRef": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toRef),
  25913. /* harmony export */ "toRefs": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.toRefs),
  25914. /* harmony export */ "transformVNodeArgs": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.transformVNodeArgs),
  25915. /* harmony export */ "triggerRef": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.triggerRef),
  25916. /* harmony export */ "unref": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.unref),
  25917. /* harmony export */ "useAttrs": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useAttrs),
  25918. /* harmony export */ "useSSRContext": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useSSRContext),
  25919. /* harmony export */ "useSlots": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useSlots),
  25920. /* harmony export */ "useTransitionState": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useTransitionState),
  25921. /* harmony export */ "version": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.version),
  25922. /* harmony export */ "warn": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn),
  25923. /* harmony export */ "watch": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watch),
  25924. /* harmony export */ "watchEffect": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watchEffect),
  25925. /* harmony export */ "watchPostEffect": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect),
  25926. /* harmony export */ "watchSyncEffect": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watchSyncEffect),
  25927. /* harmony export */ "withAsyncContext": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withAsyncContext),
  25928. /* harmony export */ "withCtx": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withCtx),
  25929. /* harmony export */ "withDefaults": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withDefaults),
  25930. /* harmony export */ "withDirectives": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withDirectives),
  25931. /* harmony export */ "withMemo": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withMemo),
  25932. /* harmony export */ "withScopeId": () => (/* reexport safe */ _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.withScopeId),
  25933. /* harmony export */ "Transition": () => (/* binding */ Transition),
  25934. /* harmony export */ "TransitionGroup": () => (/* binding */ TransitionGroup),
  25935. /* harmony export */ "VueElement": () => (/* binding */ VueElement),
  25936. /* harmony export */ "createApp": () => (/* binding */ createApp),
  25937. /* harmony export */ "createSSRApp": () => (/* binding */ createSSRApp),
  25938. /* harmony export */ "defineCustomElement": () => (/* binding */ defineCustomElement),
  25939. /* harmony export */ "defineSSRCustomElement": () => (/* binding */ defineSSRCustomElement),
  25940. /* harmony export */ "hydrate": () => (/* binding */ hydrate),
  25941. /* harmony export */ "initDirectivesForSSR": () => (/* binding */ initDirectivesForSSR),
  25942. /* harmony export */ "render": () => (/* binding */ render),
  25943. /* harmony export */ "useCssModule": () => (/* binding */ useCssModule),
  25944. /* harmony export */ "useCssVars": () => (/* binding */ useCssVars),
  25945. /* harmony export */ "vModelCheckbox": () => (/* binding */ vModelCheckbox),
  25946. /* harmony export */ "vModelDynamic": () => (/* binding */ vModelDynamic),
  25947. /* harmony export */ "vModelRadio": () => (/* binding */ vModelRadio),
  25948. /* harmony export */ "vModelSelect": () => (/* binding */ vModelSelect),
  25949. /* harmony export */ "vModelText": () => (/* binding */ vModelText),
  25950. /* harmony export */ "vShow": () => (/* binding */ vShow),
  25951. /* harmony export */ "withKeys": () => (/* binding */ withKeys),
  25952. /* harmony export */ "withModifiers": () => (/* binding */ withModifiers)
  25953. /* harmony export */ });
  25954. /* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
  25955. /* harmony import */ var _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/runtime-core */ "./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js");
  25956. /* harmony import */ var _vue_runtime_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @vue/runtime-core */ "./node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js");
  25957. const svgNS = 'http://www.w3.org/2000/svg';
  25958. const doc = (typeof document !== 'undefined' ? document : null);
  25959. const templateContainer = doc && doc.createElement('template');
  25960. const nodeOps = {
  25961. insert: (child, parent, anchor) => {
  25962. parent.insertBefore(child, anchor || null);
  25963. },
  25964. remove: child => {
  25965. const parent = child.parentNode;
  25966. if (parent) {
  25967. parent.removeChild(child);
  25968. }
  25969. },
  25970. createElement: (tag, isSVG, is, props) => {
  25971. const el = isSVG
  25972. ? doc.createElementNS(svgNS, tag)
  25973. : doc.createElement(tag, is ? { is } : undefined);
  25974. if (tag === 'select' && props && props.multiple != null) {
  25975. el.setAttribute('multiple', props.multiple);
  25976. }
  25977. return el;
  25978. },
  25979. createText: text => doc.createTextNode(text),
  25980. createComment: text => doc.createComment(text),
  25981. setText: (node, text) => {
  25982. node.nodeValue = text;
  25983. },
  25984. setElementText: (el, text) => {
  25985. el.textContent = text;
  25986. },
  25987. parentNode: node => node.parentNode,
  25988. nextSibling: node => node.nextSibling,
  25989. querySelector: selector => doc.querySelector(selector),
  25990. setScopeId(el, id) {
  25991. el.setAttribute(id, '');
  25992. },
  25993. cloneNode(el) {
  25994. const cloned = el.cloneNode(true);
  25995. // #3072
  25996. // - in `patchDOMProp`, we store the actual value in the `el._value` property.
  25997. // - normally, elements using `:value` bindings will not be hoisted, but if
  25998. // the bound value is a constant, e.g. `:value="true"` - they do get
  25999. // hoisted.
  26000. // - in production, hoisted nodes are cloned when subsequent inserts, but
  26001. // cloneNode() does not copy the custom property we attached.
  26002. // - This may need to account for other custom DOM properties we attach to
  26003. // elements in addition to `_value` in the future.
  26004. if (`_value` in el) {
  26005. cloned._value = el._value;
  26006. }
  26007. return cloned;
  26008. },
  26009. // __UNSAFE__
  26010. // Reason: innerHTML.
  26011. // Static content here can only come from compiled templates.
  26012. // As long as the user only uses trusted templates, this is safe.
  26013. insertStaticContent(content, parent, anchor, isSVG, start, end) {
  26014. // <parent> before | first ... last | anchor </parent>
  26015. const before = anchor ? anchor.previousSibling : parent.lastChild;
  26016. // #5308 can only take cached path if:
  26017. // - has a single root node
  26018. // - nextSibling info is still available
  26019. if (start && (start === end || start.nextSibling)) {
  26020. // cached
  26021. while (true) {
  26022. parent.insertBefore(start.cloneNode(true), anchor);
  26023. if (start === end || !(start = start.nextSibling))
  26024. break;
  26025. }
  26026. }
  26027. else {
  26028. // fresh insert
  26029. templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content;
  26030. const template = templateContainer.content;
  26031. if (isSVG) {
  26032. // remove outer svg wrapper
  26033. const wrapper = template.firstChild;
  26034. while (wrapper.firstChild) {
  26035. template.appendChild(wrapper.firstChild);
  26036. }
  26037. template.removeChild(wrapper);
  26038. }
  26039. parent.insertBefore(template, anchor);
  26040. }
  26041. return [
  26042. // first
  26043. before ? before.nextSibling : parent.firstChild,
  26044. // last
  26045. anchor ? anchor.previousSibling : parent.lastChild
  26046. ];
  26047. }
  26048. };
  26049. // compiler should normalize class + :class bindings on the same element
  26050. // into a single binding ['staticClass', dynamic]
  26051. function patchClass(el, value, isSVG) {
  26052. // directly setting className should be faster than setAttribute in theory
  26053. // if this is an element during a transition, take the temporary transition
  26054. // classes into account.
  26055. const transitionClasses = el._vtc;
  26056. if (transitionClasses) {
  26057. value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(' ');
  26058. }
  26059. if (value == null) {
  26060. el.removeAttribute('class');
  26061. }
  26062. else if (isSVG) {
  26063. el.setAttribute('class', value);
  26064. }
  26065. else {
  26066. el.className = value;
  26067. }
  26068. }
  26069. function patchStyle(el, prev, next) {
  26070. const style = el.style;
  26071. const isCssString = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(next);
  26072. if (next && !isCssString) {
  26073. for (const key in next) {
  26074. setStyle(style, key, next[key]);
  26075. }
  26076. if (prev && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(prev)) {
  26077. for (const key in prev) {
  26078. if (next[key] == null) {
  26079. setStyle(style, key, '');
  26080. }
  26081. }
  26082. }
  26083. }
  26084. else {
  26085. const currentDisplay = style.display;
  26086. if (isCssString) {
  26087. if (prev !== next) {
  26088. style.cssText = next;
  26089. }
  26090. }
  26091. else if (prev) {
  26092. el.removeAttribute('style');
  26093. }
  26094. // indicates that the `display` of the element is controlled by `v-show`,
  26095. // so we always keep the current `display` value regardless of the `style`
  26096. // value, thus handing over control to `v-show`.
  26097. if ('_vod' in el) {
  26098. style.display = currentDisplay;
  26099. }
  26100. }
  26101. }
  26102. const importantRE = /\s*!important$/;
  26103. function setStyle(style, name, val) {
  26104. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(val)) {
  26105. val.forEach(v => setStyle(style, name, v));
  26106. }
  26107. else {
  26108. if (name.startsWith('--')) {
  26109. // custom property definition
  26110. style.setProperty(name, val);
  26111. }
  26112. else {
  26113. const prefixed = autoPrefix(style, name);
  26114. if (importantRE.test(val)) {
  26115. // !important
  26116. style.setProperty((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(prefixed), val.replace(importantRE, ''), 'important');
  26117. }
  26118. else {
  26119. style[prefixed] = val;
  26120. }
  26121. }
  26122. }
  26123. }
  26124. const prefixes = ['Webkit', 'Moz', 'ms'];
  26125. const prefixCache = {};
  26126. function autoPrefix(style, rawName) {
  26127. const cached = prefixCache[rawName];
  26128. if (cached) {
  26129. return cached;
  26130. }
  26131. let name = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(rawName);
  26132. if (name !== 'filter' && name in style) {
  26133. return (prefixCache[rawName] = name);
  26134. }
  26135. name = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.capitalize)(name);
  26136. for (let i = 0; i < prefixes.length; i++) {
  26137. const prefixed = prefixes[i] + name;
  26138. if (prefixed in style) {
  26139. return (prefixCache[rawName] = prefixed);
  26140. }
  26141. }
  26142. return rawName;
  26143. }
  26144. const xlinkNS = 'http://www.w3.org/1999/xlink';
  26145. function patchAttr(el, key, value, isSVG, instance) {
  26146. if (isSVG && key.startsWith('xlink:')) {
  26147. if (value == null) {
  26148. el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
  26149. }
  26150. else {
  26151. el.setAttributeNS(xlinkNS, key, value);
  26152. }
  26153. }
  26154. else {
  26155. // note we are only checking boolean attributes that don't have a
  26156. // corresponding dom prop of the same name here.
  26157. const isBoolean = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSpecialBooleanAttr)(key);
  26158. if (value == null || (isBoolean && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.includeBooleanAttr)(value))) {
  26159. el.removeAttribute(key);
  26160. }
  26161. else {
  26162. el.setAttribute(key, isBoolean ? '' : value);
  26163. }
  26164. }
  26165. }
  26166. // __UNSAFE__
  26167. // functions. The user is responsible for using them with only trusted content.
  26168. function patchDOMProp(el, key, value,
  26169. // the following args are passed only due to potential innerHTML/textContent
  26170. // overriding existing VNodes, in which case the old tree must be properly
  26171. // unmounted.
  26172. prevChildren, parentComponent, parentSuspense, unmountChildren) {
  26173. if (key === 'innerHTML' || key === 'textContent') {
  26174. if (prevChildren) {
  26175. unmountChildren(prevChildren, parentComponent, parentSuspense);
  26176. }
  26177. el[key] = value == null ? '' : value;
  26178. return;
  26179. }
  26180. if (key === 'value' &&
  26181. el.tagName !== 'PROGRESS' &&
  26182. // custom elements may use _value internally
  26183. !el.tagName.includes('-')) {
  26184. // store value as _value as well since
  26185. // non-string values will be stringified.
  26186. el._value = value;
  26187. const newValue = value == null ? '' : value;
  26188. if (el.value !== newValue ||
  26189. // #4956: always set for OPTION elements because its value falls back to
  26190. // textContent if no value attribute is present. And setting .value for
  26191. // OPTION has no side effect
  26192. el.tagName === 'OPTION') {
  26193. el.value = newValue;
  26194. }
  26195. if (value == null) {
  26196. el.removeAttribute(key);
  26197. }
  26198. return;
  26199. }
  26200. if (value === '' || value == null) {
  26201. const type = typeof el[key];
  26202. if (type === 'boolean') {
  26203. // e.g. <select multiple> compiles to { multiple: '' }
  26204. el[key] = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.includeBooleanAttr)(value);
  26205. return;
  26206. }
  26207. else if (value == null && type === 'string') {
  26208. // e.g. <div :id="null">
  26209. el[key] = '';
  26210. el.removeAttribute(key);
  26211. return;
  26212. }
  26213. else if (type === 'number') {
  26214. // e.g. <img :width="null">
  26215. // the value of some IDL attr must be greater than 0, e.g. input.size = 0 -> error
  26216. try {
  26217. el[key] = 0;
  26218. }
  26219. catch (_a) { }
  26220. el.removeAttribute(key);
  26221. return;
  26222. }
  26223. }
  26224. // some properties perform value validation and throw
  26225. try {
  26226. el[key] = value;
  26227. }
  26228. catch (e) {
  26229. if ((true)) {
  26230. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed setting prop "${key}" on <${el.tagName.toLowerCase()}>: ` +
  26231. `value ${value} is invalid.`, e);
  26232. }
  26233. }
  26234. }
  26235. // Async edge case fix requires storing an event listener's attach timestamp.
  26236. let _getNow = Date.now;
  26237. let skipTimestampCheck = false;
  26238. if (typeof window !== 'undefined') {
  26239. // Determine what event timestamp the browser is using. Annoyingly, the
  26240. // timestamp can either be hi-res (relative to page load) or low-res
  26241. // (relative to UNIX epoch), so in order to compare time we have to use the
  26242. // same timestamp type when saving the flush timestamp.
  26243. if (_getNow() > document.createEvent('Event').timeStamp) {
  26244. // if the low-res timestamp which is bigger than the event timestamp
  26245. // (which is evaluated AFTER) it means the event is using a hi-res timestamp,
  26246. // and we need to use the hi-res version for event listeners as well.
  26247. _getNow = () => performance.now();
  26248. }
  26249. // #3485: Firefox <= 53 has incorrect Event.timeStamp implementation
  26250. // and does not fire microtasks in between event propagation, so safe to exclude.
  26251. const ffMatch = navigator.userAgent.match(/firefox\/(\d+)/i);
  26252. skipTimestampCheck = !!(ffMatch && Number(ffMatch[1]) <= 53);
  26253. }
  26254. // To avoid the overhead of repeatedly calling performance.now(), we cache
  26255. // and use the same timestamp for all event listeners attached in the same tick.
  26256. let cachedNow = 0;
  26257. const p = Promise.resolve();
  26258. const reset = () => {
  26259. cachedNow = 0;
  26260. };
  26261. const getNow = () => cachedNow || (p.then(reset), (cachedNow = _getNow()));
  26262. function addEventListener(el, event, handler, options) {
  26263. el.addEventListener(event, handler, options);
  26264. }
  26265. function removeEventListener(el, event, handler, options) {
  26266. el.removeEventListener(event, handler, options);
  26267. }
  26268. function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
  26269. // vei = vue event invokers
  26270. const invokers = el._vei || (el._vei = {});
  26271. const existingInvoker = invokers[rawName];
  26272. if (nextValue && existingInvoker) {
  26273. // patch
  26274. existingInvoker.value = nextValue;
  26275. }
  26276. else {
  26277. const [name, options] = parseName(rawName);
  26278. if (nextValue) {
  26279. // add
  26280. const invoker = (invokers[rawName] = createInvoker(nextValue, instance));
  26281. addEventListener(el, name, invoker, options);
  26282. }
  26283. else if (existingInvoker) {
  26284. // remove
  26285. removeEventListener(el, name, existingInvoker, options);
  26286. invokers[rawName] = undefined;
  26287. }
  26288. }
  26289. }
  26290. const optionsModifierRE = /(?:Once|Passive|Capture)$/;
  26291. function parseName(name) {
  26292. let options;
  26293. if (optionsModifierRE.test(name)) {
  26294. options = {};
  26295. let m;
  26296. while ((m = name.match(optionsModifierRE))) {
  26297. name = name.slice(0, name.length - m[0].length);
  26298. options[m[0].toLowerCase()] = true;
  26299. }
  26300. }
  26301. return [(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(name.slice(2)), options];
  26302. }
  26303. function createInvoker(initialValue, instance) {
  26304. const invoker = (e) => {
  26305. // async edge case #6566: inner click event triggers patch, event handler
  26306. // attached to outer element during patch, and triggered again. This
  26307. // happens because browsers fire microtask ticks between event propagation.
  26308. // the solution is simple: we save the timestamp when a handler is attached,
  26309. // and the handler would only fire if the event passed to it was fired
  26310. // AFTER it was attached.
  26311. const timeStamp = e.timeStamp || _getNow();
  26312. if (skipTimestampCheck || timeStamp >= invoker.attached - 1) {
  26313. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling)(patchStopImmediatePropagation(e, invoker.value), instance, 5 /* NATIVE_EVENT_HANDLER */, [e]);
  26314. }
  26315. };
  26316. invoker.value = initialValue;
  26317. invoker.attached = getNow();
  26318. return invoker;
  26319. }
  26320. function patchStopImmediatePropagation(e, value) {
  26321. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) {
  26322. const originalStop = e.stopImmediatePropagation;
  26323. e.stopImmediatePropagation = () => {
  26324. originalStop.call(e);
  26325. e._stopped = true;
  26326. };
  26327. return value.map(fn => (e) => !e._stopped && fn && fn(e));
  26328. }
  26329. else {
  26330. return value;
  26331. }
  26332. }
  26333. const nativeOnRE = /^on[a-z]/;
  26334. const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
  26335. if (key === 'class') {
  26336. patchClass(el, nextValue, isSVG);
  26337. }
  26338. else if (key === 'style') {
  26339. patchStyle(el, prevValue, nextValue);
  26340. }
  26341. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isOn)(key)) {
  26342. // ignore v-model listeners
  26343. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isModelListener)(key)) {
  26344. patchEvent(el, key, prevValue, nextValue, parentComponent);
  26345. }
  26346. }
  26347. else if (key[0] === '.'
  26348. ? ((key = key.slice(1)), true)
  26349. : key[0] === '^'
  26350. ? ((key = key.slice(1)), false)
  26351. : shouldSetAsProp(el, key, nextValue, isSVG)) {
  26352. patchDOMProp(el, key, nextValue, prevChildren, parentComponent, parentSuspense, unmountChildren);
  26353. }
  26354. else {
  26355. // special case for <input v-model type="checkbox"> with
  26356. // :true-value & :false-value
  26357. // store value as dom properties since non-string values will be
  26358. // stringified.
  26359. if (key === 'true-value') {
  26360. el._trueValue = nextValue;
  26361. }
  26362. else if (key === 'false-value') {
  26363. el._falseValue = nextValue;
  26364. }
  26365. patchAttr(el, key, nextValue, isSVG);
  26366. }
  26367. };
  26368. function shouldSetAsProp(el, key, value, isSVG) {
  26369. if (isSVG) {
  26370. // most keys must be set as attribute on svg elements to work
  26371. // ...except innerHTML & textContent
  26372. if (key === 'innerHTML' || key === 'textContent') {
  26373. return true;
  26374. }
  26375. // or native onclick with function values
  26376. if (key in el && nativeOnRE.test(key) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(value)) {
  26377. return true;
  26378. }
  26379. return false;
  26380. }
  26381. // spellcheck and draggable are numerated attrs, however their
  26382. // corresponding DOM properties are actually booleans - this leads to
  26383. // setting it with a string "false" value leading it to be coerced to
  26384. // `true`, so we need to always treat them as attributes.
  26385. // Note that `contentEditable` doesn't have this problem: its DOM
  26386. // property is also enumerated string values.
  26387. if (key === 'spellcheck' || key === 'draggable') {
  26388. return false;
  26389. }
  26390. // #1787, #2840 form property on form elements is readonly and must be set as
  26391. // attribute.
  26392. if (key === 'form') {
  26393. return false;
  26394. }
  26395. // #1526 <input list> must be set as attribute
  26396. if (key === 'list' && el.tagName === 'INPUT') {
  26397. return false;
  26398. }
  26399. // #2766 <textarea type> must be set as attribute
  26400. if (key === 'type' && el.tagName === 'TEXTAREA') {
  26401. return false;
  26402. }
  26403. // native onclick with string value, must be set as attribute
  26404. if (nativeOnRE.test(key) && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(value)) {
  26405. return false;
  26406. }
  26407. return key in el;
  26408. }
  26409. function defineCustomElement(options, hydate) {
  26410. const Comp = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.defineComponent)(options);
  26411. class VueCustomElement extends VueElement {
  26412. constructor(initialProps) {
  26413. super(Comp, initialProps, hydate);
  26414. }
  26415. }
  26416. VueCustomElement.def = Comp;
  26417. return VueCustomElement;
  26418. }
  26419. const defineSSRCustomElement = ((options) => {
  26420. // @ts-ignore
  26421. return defineCustomElement(options, hydrate);
  26422. });
  26423. const BaseClass = (typeof HTMLElement !== 'undefined' ? HTMLElement : class {
  26424. });
  26425. class VueElement extends BaseClass {
  26426. constructor(_def, _props = {}, hydrate) {
  26427. super();
  26428. this._def = _def;
  26429. this._props = _props;
  26430. /**
  26431. * @internal
  26432. */
  26433. this._instance = null;
  26434. this._connected = false;
  26435. this._resolved = false;
  26436. this._numberProps = null;
  26437. if (this.shadowRoot && hydrate) {
  26438. hydrate(this._createVNode(), this.shadowRoot);
  26439. }
  26440. else {
  26441. if (( true) && this.shadowRoot) {
  26442. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Custom element has pre-rendered declarative shadow root but is not ` +
  26443. `defined as hydratable. Use \`defineSSRCustomElement\`.`);
  26444. }
  26445. this.attachShadow({ mode: 'open' });
  26446. }
  26447. }
  26448. connectedCallback() {
  26449. this._connected = true;
  26450. if (!this._instance) {
  26451. this._resolveDef();
  26452. }
  26453. }
  26454. disconnectedCallback() {
  26455. this._connected = false;
  26456. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.nextTick)(() => {
  26457. if (!this._connected) {
  26458. render(null, this.shadowRoot);
  26459. this._instance = null;
  26460. }
  26461. });
  26462. }
  26463. /**
  26464. * resolve inner component definition (handle possible async component)
  26465. */
  26466. _resolveDef() {
  26467. if (this._resolved) {
  26468. return;
  26469. }
  26470. this._resolved = true;
  26471. // set initial attrs
  26472. for (let i = 0; i < this.attributes.length; i++) {
  26473. this._setAttr(this.attributes[i].name);
  26474. }
  26475. // watch future attr changes
  26476. new MutationObserver(mutations => {
  26477. for (const m of mutations) {
  26478. this._setAttr(m.attributeName);
  26479. }
  26480. }).observe(this, { attributes: true });
  26481. const resolve = (def) => {
  26482. const { props, styles } = def;
  26483. const hasOptions = !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(props);
  26484. const rawKeys = props ? (hasOptions ? Object.keys(props) : props) : [];
  26485. // cast Number-type props set before resolve
  26486. let numberProps;
  26487. if (hasOptions) {
  26488. for (const key in this._props) {
  26489. const opt = props[key];
  26490. if (opt === Number || (opt && opt.type === Number)) {
  26491. this._props[key] = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(this._props[key]);
  26492. (numberProps || (numberProps = Object.create(null)))[key] = true;
  26493. }
  26494. }
  26495. }
  26496. this._numberProps = numberProps;
  26497. // check if there are props set pre-upgrade or connect
  26498. for (const key of Object.keys(this)) {
  26499. if (key[0] !== '_') {
  26500. this._setProp(key, this[key], true, false);
  26501. }
  26502. }
  26503. // defining getter/setters on prototype
  26504. for (const key of rawKeys.map(_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)) {
  26505. Object.defineProperty(this, key, {
  26506. get() {
  26507. return this._getProp(key);
  26508. },
  26509. set(val) {
  26510. this._setProp(key, val);
  26511. }
  26512. });
  26513. }
  26514. // apply CSS
  26515. this._applyStyles(styles);
  26516. // initial render
  26517. this._update();
  26518. };
  26519. const asyncDef = this._def.__asyncLoader;
  26520. if (asyncDef) {
  26521. asyncDef().then(resolve);
  26522. }
  26523. else {
  26524. resolve(this._def);
  26525. }
  26526. }
  26527. _setAttr(key) {
  26528. let value = this.getAttribute(key);
  26529. if (this._numberProps && this._numberProps[key]) {
  26530. value = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(value);
  26531. }
  26532. this._setProp((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.camelize)(key), value, false);
  26533. }
  26534. /**
  26535. * @internal
  26536. */
  26537. _getProp(key) {
  26538. return this._props[key];
  26539. }
  26540. /**
  26541. * @internal
  26542. */
  26543. _setProp(key, val, shouldReflect = true, shouldUpdate = true) {
  26544. if (val !== this._props[key]) {
  26545. this._props[key] = val;
  26546. if (shouldUpdate && this._instance) {
  26547. this._update();
  26548. }
  26549. // reflect
  26550. if (shouldReflect) {
  26551. if (val === true) {
  26552. this.setAttribute((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key), '');
  26553. }
  26554. else if (typeof val === 'string' || typeof val === 'number') {
  26555. this.setAttribute((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key), val + '');
  26556. }
  26557. else if (!val) {
  26558. this.removeAttribute((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(key));
  26559. }
  26560. }
  26561. }
  26562. }
  26563. _update() {
  26564. render(this._createVNode(), this.shadowRoot);
  26565. }
  26566. _createVNode() {
  26567. const vnode = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createVNode)(this._def, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, this._props));
  26568. if (!this._instance) {
  26569. vnode.ce = instance => {
  26570. this._instance = instance;
  26571. instance.isCE = true;
  26572. // HMR
  26573. if ((true)) {
  26574. instance.ceReload = newStyles => {
  26575. // always reset styles
  26576. if (this._styles) {
  26577. this._styles.forEach(s => this.shadowRoot.removeChild(s));
  26578. this._styles.length = 0;
  26579. }
  26580. this._applyStyles(newStyles);
  26581. // if this is an async component, ceReload is called from the inner
  26582. // component so no need to reload the async wrapper
  26583. if (!this._def.__asyncLoader) {
  26584. // reload
  26585. this._instance = null;
  26586. this._update();
  26587. }
  26588. };
  26589. }
  26590. // intercept emit
  26591. instance.emit = (event, ...args) => {
  26592. this.dispatchEvent(new CustomEvent(event, {
  26593. detail: args
  26594. }));
  26595. };
  26596. // locate nearest Vue custom element parent for provide/inject
  26597. let parent = this;
  26598. while ((parent =
  26599. parent && (parent.parentNode || parent.host))) {
  26600. if (parent instanceof VueElement) {
  26601. instance.parent = parent._instance;
  26602. break;
  26603. }
  26604. }
  26605. };
  26606. }
  26607. return vnode;
  26608. }
  26609. _applyStyles(styles) {
  26610. if (styles) {
  26611. styles.forEach(css => {
  26612. const s = document.createElement('style');
  26613. s.textContent = css;
  26614. this.shadowRoot.appendChild(s);
  26615. // record for HMR
  26616. if ((true)) {
  26617. (this._styles || (this._styles = [])).push(s);
  26618. }
  26619. });
  26620. }
  26621. }
  26622. }
  26623. function useCssModule(name = '$style') {
  26624. /* istanbul ignore else */
  26625. {
  26626. const instance = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)();
  26627. if (!instance) {
  26628. ( true) && (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`useCssModule must be called inside setup()`);
  26629. return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
  26630. }
  26631. const modules = instance.type.__cssModules;
  26632. if (!modules) {
  26633. ( true) && (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Current instance does not have CSS modules injected.`);
  26634. return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
  26635. }
  26636. const mod = modules[name];
  26637. if (!mod) {
  26638. ( true) &&
  26639. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Current instance does not have CSS module named "${name}".`);
  26640. return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.EMPTY_OBJ;
  26641. }
  26642. return mod;
  26643. }
  26644. }
  26645. /**
  26646. * Runtime helper for SFC's CSS variable injection feature.
  26647. * @private
  26648. */
  26649. function useCssVars(getter) {
  26650. const instance = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)();
  26651. /* istanbul ignore next */
  26652. if (!instance) {
  26653. ( true) &&
  26654. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`useCssVars is called without current active component instance.`);
  26655. return;
  26656. }
  26657. const setVars = () => setVarsOnVNode(instance.subTree, getter(instance.proxy));
  26658. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect)(setVars);
  26659. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onMounted)(() => {
  26660. const ob = new MutationObserver(setVars);
  26661. ob.observe(instance.subTree.el.parentNode, { childList: true });
  26662. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUnmounted)(() => ob.disconnect());
  26663. });
  26664. }
  26665. function setVarsOnVNode(vnode, vars) {
  26666. if (vnode.shapeFlag & 128 /* SUSPENSE */) {
  26667. const suspense = vnode.suspense;
  26668. vnode = suspense.activeBranch;
  26669. if (suspense.pendingBranch && !suspense.isHydrating) {
  26670. suspense.effects.push(() => {
  26671. setVarsOnVNode(suspense.activeBranch, vars);
  26672. });
  26673. }
  26674. }
  26675. // drill down HOCs until it's a non-component vnode
  26676. while (vnode.component) {
  26677. vnode = vnode.component.subTree;
  26678. }
  26679. if (vnode.shapeFlag & 1 /* ELEMENT */ && vnode.el) {
  26680. setVarsOnNode(vnode.el, vars);
  26681. }
  26682. else if (vnode.type === _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Fragment) {
  26683. vnode.children.forEach(c => setVarsOnVNode(c, vars));
  26684. }
  26685. else if (vnode.type === _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Static) {
  26686. let { el, anchor } = vnode;
  26687. while (el) {
  26688. setVarsOnNode(el, vars);
  26689. if (el === anchor)
  26690. break;
  26691. el = el.nextSibling;
  26692. }
  26693. }
  26694. }
  26695. function setVarsOnNode(el, vars) {
  26696. if (el.nodeType === 1) {
  26697. const style = el.style;
  26698. for (const key in vars) {
  26699. style.setProperty(`--${key}`, vars[key]);
  26700. }
  26701. }
  26702. }
  26703. const TRANSITION = 'transition';
  26704. const ANIMATION = 'animation';
  26705. // DOM Transition is a higher-order-component based on the platform-agnostic
  26706. // base Transition component, with DOM-specific logic.
  26707. const Transition = (props, { slots }) => (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.h)(_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.BaseTransition, resolveTransitionProps(props), slots);
  26708. Transition.displayName = 'Transition';
  26709. const DOMTransitionPropsValidators = {
  26710. name: String,
  26711. type: String,
  26712. css: {
  26713. type: Boolean,
  26714. default: true
  26715. },
  26716. duration: [String, Number, Object],
  26717. enterFromClass: String,
  26718. enterActiveClass: String,
  26719. enterToClass: String,
  26720. appearFromClass: String,
  26721. appearActiveClass: String,
  26722. appearToClass: String,
  26723. leaveFromClass: String,
  26724. leaveActiveClass: String,
  26725. leaveToClass: String
  26726. };
  26727. const TransitionPropsValidators = (Transition.props =
  26728. /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.BaseTransition.props, DOMTransitionPropsValidators));
  26729. /**
  26730. * #3227 Incoming hooks may be merged into arrays when wrapping Transition
  26731. * with custom HOCs.
  26732. */
  26733. const callHook = (hook, args = []) => {
  26734. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook)) {
  26735. hook.forEach(h => h(...args));
  26736. }
  26737. else if (hook) {
  26738. hook(...args);
  26739. }
  26740. };
  26741. /**
  26742. * Check if a hook expects a callback (2nd arg), which means the user
  26743. * intends to explicitly control the end of the transition.
  26744. */
  26745. const hasExplicitCallback = (hook) => {
  26746. return hook
  26747. ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(hook)
  26748. ? hook.some(h => h.length > 1)
  26749. : hook.length > 1
  26750. : false;
  26751. };
  26752. function resolveTransitionProps(rawProps) {
  26753. const baseProps = {};
  26754. for (const key in rawProps) {
  26755. if (!(key in DOMTransitionPropsValidators)) {
  26756. baseProps[key] = rawProps[key];
  26757. }
  26758. }
  26759. if (rawProps.css === false) {
  26760. return baseProps;
  26761. }
  26762. const { name = 'v', type, duration, enterFromClass = `${name}-enter-from`, enterActiveClass = `${name}-enter-active`, enterToClass = `${name}-enter-to`, appearFromClass = enterFromClass, appearActiveClass = enterActiveClass, appearToClass = enterToClass, leaveFromClass = `${name}-leave-from`, leaveActiveClass = `${name}-leave-active`, leaveToClass = `${name}-leave-to` } = rawProps;
  26763. const durations = normalizeDuration(duration);
  26764. const enterDuration = durations && durations[0];
  26765. const leaveDuration = durations && durations[1];
  26766. const { onBeforeEnter, onEnter, onEnterCancelled, onLeave, onLeaveCancelled, onBeforeAppear = onBeforeEnter, onAppear = onEnter, onAppearCancelled = onEnterCancelled } = baseProps;
  26767. const finishEnter = (el, isAppear, done) => {
  26768. removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
  26769. removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
  26770. done && done();
  26771. };
  26772. const finishLeave = (el, done) => {
  26773. removeTransitionClass(el, leaveToClass);
  26774. removeTransitionClass(el, leaveActiveClass);
  26775. done && done();
  26776. };
  26777. const makeEnterHook = (isAppear) => {
  26778. return (el, done) => {
  26779. const hook = isAppear ? onAppear : onEnter;
  26780. const resolve = () => finishEnter(el, isAppear, done);
  26781. callHook(hook, [el, resolve]);
  26782. nextFrame(() => {
  26783. removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
  26784. addTransitionClass(el, isAppear ? appearToClass : enterToClass);
  26785. if (!hasExplicitCallback(hook)) {
  26786. whenTransitionEnds(el, type, enterDuration, resolve);
  26787. }
  26788. });
  26789. };
  26790. };
  26791. return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)(baseProps, {
  26792. onBeforeEnter(el) {
  26793. callHook(onBeforeEnter, [el]);
  26794. addTransitionClass(el, enterFromClass);
  26795. addTransitionClass(el, enterActiveClass);
  26796. },
  26797. onBeforeAppear(el) {
  26798. callHook(onBeforeAppear, [el]);
  26799. addTransitionClass(el, appearFromClass);
  26800. addTransitionClass(el, appearActiveClass);
  26801. },
  26802. onEnter: makeEnterHook(false),
  26803. onAppear: makeEnterHook(true),
  26804. onLeave(el, done) {
  26805. const resolve = () => finishLeave(el, done);
  26806. addTransitionClass(el, leaveFromClass);
  26807. // force reflow so *-leave-from classes immediately take effect (#2593)
  26808. forceReflow();
  26809. addTransitionClass(el, leaveActiveClass);
  26810. nextFrame(() => {
  26811. removeTransitionClass(el, leaveFromClass);
  26812. addTransitionClass(el, leaveToClass);
  26813. if (!hasExplicitCallback(onLeave)) {
  26814. whenTransitionEnds(el, type, leaveDuration, resolve);
  26815. }
  26816. });
  26817. callHook(onLeave, [el, resolve]);
  26818. },
  26819. onEnterCancelled(el) {
  26820. finishEnter(el, false);
  26821. callHook(onEnterCancelled, [el]);
  26822. },
  26823. onAppearCancelled(el) {
  26824. finishEnter(el, true);
  26825. callHook(onAppearCancelled, [el]);
  26826. },
  26827. onLeaveCancelled(el) {
  26828. finishLeave(el);
  26829. callHook(onLeaveCancelled, [el]);
  26830. }
  26831. });
  26832. }
  26833. function normalizeDuration(duration) {
  26834. if (duration == null) {
  26835. return null;
  26836. }
  26837. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isObject)(duration)) {
  26838. return [NumberOf(duration.enter), NumberOf(duration.leave)];
  26839. }
  26840. else {
  26841. const n = NumberOf(duration);
  26842. return [n, n];
  26843. }
  26844. }
  26845. function NumberOf(val) {
  26846. const res = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(val);
  26847. if ((true))
  26848. validateDuration(res);
  26849. return res;
  26850. }
  26851. function validateDuration(val) {
  26852. if (typeof val !== 'number') {
  26853. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`<transition> explicit duration is not a valid number - ` +
  26854. `got ${JSON.stringify(val)}.`);
  26855. }
  26856. else if (isNaN(val)) {
  26857. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`<transition> explicit duration is NaN - ` +
  26858. 'the duration expression might be incorrect.');
  26859. }
  26860. }
  26861. function addTransitionClass(el, cls) {
  26862. cls.split(/\s+/).forEach(c => c && el.classList.add(c));
  26863. (el._vtc ||
  26864. (el._vtc = new Set())).add(cls);
  26865. }
  26866. function removeTransitionClass(el, cls) {
  26867. cls.split(/\s+/).forEach(c => c && el.classList.remove(c));
  26868. const { _vtc } = el;
  26869. if (_vtc) {
  26870. _vtc.delete(cls);
  26871. if (!_vtc.size) {
  26872. el._vtc = undefined;
  26873. }
  26874. }
  26875. }
  26876. function nextFrame(cb) {
  26877. requestAnimationFrame(() => {
  26878. requestAnimationFrame(cb);
  26879. });
  26880. }
  26881. let endId = 0;
  26882. function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
  26883. const id = (el._endId = ++endId);
  26884. const resolveIfNotStale = () => {
  26885. if (id === el._endId) {
  26886. resolve();
  26887. }
  26888. };
  26889. if (explicitTimeout) {
  26890. return setTimeout(resolveIfNotStale, explicitTimeout);
  26891. }
  26892. const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
  26893. if (!type) {
  26894. return resolve();
  26895. }
  26896. const endEvent = type + 'end';
  26897. let ended = 0;
  26898. const end = () => {
  26899. el.removeEventListener(endEvent, onEnd);
  26900. resolveIfNotStale();
  26901. };
  26902. const onEnd = (e) => {
  26903. if (e.target === el && ++ended >= propCount) {
  26904. end();
  26905. }
  26906. };
  26907. setTimeout(() => {
  26908. if (ended < propCount) {
  26909. end();
  26910. }
  26911. }, timeout + 1);
  26912. el.addEventListener(endEvent, onEnd);
  26913. }
  26914. function getTransitionInfo(el, expectedType) {
  26915. const styles = window.getComputedStyle(el);
  26916. // JSDOM may return undefined for transition properties
  26917. const getStyleProperties = (key) => (styles[key] || '').split(', ');
  26918. const transitionDelays = getStyleProperties(TRANSITION + 'Delay');
  26919. const transitionDurations = getStyleProperties(TRANSITION + 'Duration');
  26920. const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
  26921. const animationDelays = getStyleProperties(ANIMATION + 'Delay');
  26922. const animationDurations = getStyleProperties(ANIMATION + 'Duration');
  26923. const animationTimeout = getTimeout(animationDelays, animationDurations);
  26924. let type = null;
  26925. let timeout = 0;
  26926. let propCount = 0;
  26927. /* istanbul ignore if */
  26928. if (expectedType === TRANSITION) {
  26929. if (transitionTimeout > 0) {
  26930. type = TRANSITION;
  26931. timeout = transitionTimeout;
  26932. propCount = transitionDurations.length;
  26933. }
  26934. }
  26935. else if (expectedType === ANIMATION) {
  26936. if (animationTimeout > 0) {
  26937. type = ANIMATION;
  26938. timeout = animationTimeout;
  26939. propCount = animationDurations.length;
  26940. }
  26941. }
  26942. else {
  26943. timeout = Math.max(transitionTimeout, animationTimeout);
  26944. type =
  26945. timeout > 0
  26946. ? transitionTimeout > animationTimeout
  26947. ? TRANSITION
  26948. : ANIMATION
  26949. : null;
  26950. propCount = type
  26951. ? type === TRANSITION
  26952. ? transitionDurations.length
  26953. : animationDurations.length
  26954. : 0;
  26955. }
  26956. const hasTransform = type === TRANSITION &&
  26957. /\b(transform|all)(,|$)/.test(styles[TRANSITION + 'Property']);
  26958. return {
  26959. type,
  26960. timeout,
  26961. propCount,
  26962. hasTransform
  26963. };
  26964. }
  26965. function getTimeout(delays, durations) {
  26966. while (delays.length < durations.length) {
  26967. delays = delays.concat(delays);
  26968. }
  26969. return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
  26970. }
  26971. // Old versions of Chromium (below 61.0.3163.100) formats floating pointer
  26972. // numbers in a locale-dependent way, using a comma instead of a dot.
  26973. // If comma is not replaced with a dot, the input will be rounded down
  26974. // (i.e. acting as a floor function) causing unexpected behaviors
  26975. function toMs(s) {
  26976. return Number(s.slice(0, -1).replace(',', '.')) * 1000;
  26977. }
  26978. // synchronously force layout to put elements into a certain state
  26979. function forceReflow() {
  26980. return document.body.offsetHeight;
  26981. }
  26982. const positionMap = new WeakMap();
  26983. const newPositionMap = new WeakMap();
  26984. const TransitionGroupImpl = {
  26985. name: 'TransitionGroup',
  26986. props: /*#__PURE__*/ (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({}, TransitionPropsValidators, {
  26987. tag: String,
  26988. moveClass: String
  26989. }),
  26990. setup(props, { slots }) {
  26991. const instance = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance)();
  26992. const state = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.useTransitionState)();
  26993. let prevChildren;
  26994. let children;
  26995. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.onUpdated)(() => {
  26996. // children is guaranteed to exist after initial render
  26997. if (!prevChildren.length) {
  26998. return;
  26999. }
  27000. const moveClass = props.moveClass || `${props.name || 'v'}-move`;
  27001. if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) {
  27002. return;
  27003. }
  27004. // we divide the work into three loops to avoid mixing DOM reads and writes
  27005. // in each iteration - which helps prevent layout thrashing.
  27006. prevChildren.forEach(callPendingCbs);
  27007. prevChildren.forEach(recordPosition);
  27008. const movedChildren = prevChildren.filter(applyTranslation);
  27009. // force reflow to put everything in position
  27010. forceReflow();
  27011. movedChildren.forEach(c => {
  27012. const el = c.el;
  27013. const style = el.style;
  27014. addTransitionClass(el, moveClass);
  27015. style.transform = style.webkitTransform = style.transitionDuration = '';
  27016. const cb = (el._moveCb = (e) => {
  27017. if (e && e.target !== el) {
  27018. return;
  27019. }
  27020. if (!e || /transform$/.test(e.propertyName)) {
  27021. el.removeEventListener('transitionend', cb);
  27022. el._moveCb = null;
  27023. removeTransitionClass(el, moveClass);
  27024. }
  27025. });
  27026. el.addEventListener('transitionend', cb);
  27027. });
  27028. });
  27029. return () => {
  27030. const rawProps = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_2__.toRaw)(props);
  27031. const cssTransitionProps = resolveTransitionProps(rawProps);
  27032. let tag = rawProps.tag || _vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.Fragment;
  27033. prevChildren = children;
  27034. children = slots.default ? (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren)(slots.default()) : [];
  27035. for (let i = 0; i < children.length; i++) {
  27036. const child = children[i];
  27037. if (child.key != null) {
  27038. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks)(child, (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks)(child, cssTransitionProps, state, instance));
  27039. }
  27040. else if ((true)) {
  27041. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`<TransitionGroup> children must be keyed.`);
  27042. }
  27043. }
  27044. if (prevChildren) {
  27045. for (let i = 0; i < prevChildren.length; i++) {
  27046. const child = prevChildren[i];
  27047. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks)(child, (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks)(child, cssTransitionProps, state, instance));
  27048. positionMap.set(child, child.el.getBoundingClientRect());
  27049. }
  27050. }
  27051. return (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createVNode)(tag, null, children);
  27052. };
  27053. }
  27054. };
  27055. const TransitionGroup = TransitionGroupImpl;
  27056. function callPendingCbs(c) {
  27057. const el = c.el;
  27058. if (el._moveCb) {
  27059. el._moveCb();
  27060. }
  27061. if (el._enterCb) {
  27062. el._enterCb();
  27063. }
  27064. }
  27065. function recordPosition(c) {
  27066. newPositionMap.set(c, c.el.getBoundingClientRect());
  27067. }
  27068. function applyTranslation(c) {
  27069. const oldPos = positionMap.get(c);
  27070. const newPos = newPositionMap.get(c);
  27071. const dx = oldPos.left - newPos.left;
  27072. const dy = oldPos.top - newPos.top;
  27073. if (dx || dy) {
  27074. const s = c.el.style;
  27075. s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
  27076. s.transitionDuration = '0s';
  27077. return c;
  27078. }
  27079. }
  27080. function hasCSSTransform(el, root, moveClass) {
  27081. // Detect whether an element with the move class applied has
  27082. // CSS transitions. Since the element may be inside an entering
  27083. // transition at this very moment, we make a clone of it and remove
  27084. // all other transition classes applied to ensure only the move class
  27085. // is applied.
  27086. const clone = el.cloneNode();
  27087. if (el._vtc) {
  27088. el._vtc.forEach(cls => {
  27089. cls.split(/\s+/).forEach(c => c && clone.classList.remove(c));
  27090. });
  27091. }
  27092. moveClass.split(/\s+/).forEach(c => c && clone.classList.add(c));
  27093. clone.style.display = 'none';
  27094. const container = (root.nodeType === 1 ? root : root.parentNode);
  27095. container.appendChild(clone);
  27096. const { hasTransform } = getTransitionInfo(clone);
  27097. container.removeChild(clone);
  27098. return hasTransform;
  27099. }
  27100. const getModelAssigner = (vnode) => {
  27101. const fn = vnode.props['onUpdate:modelValue'];
  27102. return (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(fn) ? value => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.invokeArrayFns)(fn, value) : fn;
  27103. };
  27104. function onCompositionStart(e) {
  27105. e.target.composing = true;
  27106. }
  27107. function onCompositionEnd(e) {
  27108. const target = e.target;
  27109. if (target.composing) {
  27110. target.composing = false;
  27111. trigger(target, 'input');
  27112. }
  27113. }
  27114. function trigger(el, type) {
  27115. const e = document.createEvent('HTMLEvents');
  27116. e.initEvent(type, true, true);
  27117. el.dispatchEvent(e);
  27118. }
  27119. // We are exporting the v-model runtime directly as vnode hooks so that it can
  27120. // be tree-shaken in case v-model is never used.
  27121. const vModelText = {
  27122. created(el, { modifiers: { lazy, trim, number } }, vnode) {
  27123. el._assign = getModelAssigner(vnode);
  27124. const castToNumber = number || (vnode.props && vnode.props.type === 'number');
  27125. addEventListener(el, lazy ? 'change' : 'input', e => {
  27126. if (e.target.composing)
  27127. return;
  27128. let domValue = el.value;
  27129. if (trim) {
  27130. domValue = domValue.trim();
  27131. }
  27132. else if (castToNumber) {
  27133. domValue = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(domValue);
  27134. }
  27135. el._assign(domValue);
  27136. });
  27137. if (trim) {
  27138. addEventListener(el, 'change', () => {
  27139. el.value = el.value.trim();
  27140. });
  27141. }
  27142. if (!lazy) {
  27143. addEventListener(el, 'compositionstart', onCompositionStart);
  27144. addEventListener(el, 'compositionend', onCompositionEnd);
  27145. // Safari < 10.2 & UIWebView doesn't fire compositionend when
  27146. // switching focus before confirming composition choice
  27147. // this also fixes the issue where some browsers e.g. iOS Chrome
  27148. // fires "change" instead of "input" on autocomplete.
  27149. addEventListener(el, 'change', onCompositionEnd);
  27150. }
  27151. },
  27152. // set value on mounted so it's after min/max for type="range"
  27153. mounted(el, { value }) {
  27154. el.value = value == null ? '' : value;
  27155. },
  27156. beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
  27157. el._assign = getModelAssigner(vnode);
  27158. // avoid clearing unresolved text. #2302
  27159. if (el.composing)
  27160. return;
  27161. if (document.activeElement === el) {
  27162. if (lazy) {
  27163. return;
  27164. }
  27165. if (trim && el.value.trim() === value) {
  27166. return;
  27167. }
  27168. if ((number || el.type === 'number') && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(el.value) === value) {
  27169. return;
  27170. }
  27171. }
  27172. const newValue = value == null ? '' : value;
  27173. if (el.value !== newValue) {
  27174. el.value = newValue;
  27175. }
  27176. }
  27177. };
  27178. const vModelCheckbox = {
  27179. // #4096 array checkboxes need to be deep traversed
  27180. deep: true,
  27181. created(el, _, vnode) {
  27182. el._assign = getModelAssigner(vnode);
  27183. addEventListener(el, 'change', () => {
  27184. const modelValue = el._modelValue;
  27185. const elementValue = getValue(el);
  27186. const checked = el.checked;
  27187. const assign = el._assign;
  27188. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(modelValue)) {
  27189. const index = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseIndexOf)(modelValue, elementValue);
  27190. const found = index !== -1;
  27191. if (checked && !found) {
  27192. assign(modelValue.concat(elementValue));
  27193. }
  27194. else if (!checked && found) {
  27195. const filtered = [...modelValue];
  27196. filtered.splice(index, 1);
  27197. assign(filtered);
  27198. }
  27199. }
  27200. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(modelValue)) {
  27201. const cloned = new Set(modelValue);
  27202. if (checked) {
  27203. cloned.add(elementValue);
  27204. }
  27205. else {
  27206. cloned.delete(elementValue);
  27207. }
  27208. assign(cloned);
  27209. }
  27210. else {
  27211. assign(getCheckboxValue(el, checked));
  27212. }
  27213. });
  27214. },
  27215. // set initial checked on mount to wait for true-value/false-value
  27216. mounted: setChecked,
  27217. beforeUpdate(el, binding, vnode) {
  27218. el._assign = getModelAssigner(vnode);
  27219. setChecked(el, binding, vnode);
  27220. }
  27221. };
  27222. function setChecked(el, { value, oldValue }, vnode) {
  27223. el._modelValue = value;
  27224. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) {
  27225. el.checked = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseIndexOf)(value, vnode.props.value) > -1;
  27226. }
  27227. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value)) {
  27228. el.checked = value.has(vnode.props.value);
  27229. }
  27230. else if (value !== oldValue) {
  27231. el.checked = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(value, getCheckboxValue(el, true));
  27232. }
  27233. }
  27234. const vModelRadio = {
  27235. created(el, { value }, vnode) {
  27236. el.checked = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(value, vnode.props.value);
  27237. el._assign = getModelAssigner(vnode);
  27238. addEventListener(el, 'change', () => {
  27239. el._assign(getValue(el));
  27240. });
  27241. },
  27242. beforeUpdate(el, { value, oldValue }, vnode) {
  27243. el._assign = getModelAssigner(vnode);
  27244. if (value !== oldValue) {
  27245. el.checked = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(value, vnode.props.value);
  27246. }
  27247. }
  27248. };
  27249. const vModelSelect = {
  27250. // <select multiple> value need to be deep traversed
  27251. deep: true,
  27252. created(el, { value, modifiers: { number } }, vnode) {
  27253. const isSetModel = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value);
  27254. addEventListener(el, 'change', () => {
  27255. const selectedVal = Array.prototype.filter
  27256. .call(el.options, (o) => o.selected)
  27257. .map((o) => number ? (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.toNumber)(getValue(o)) : getValue(o));
  27258. el._assign(el.multiple
  27259. ? isSetModel
  27260. ? new Set(selectedVal)
  27261. : selectedVal
  27262. : selectedVal[0]);
  27263. });
  27264. el._assign = getModelAssigner(vnode);
  27265. },
  27266. // set value in mounted & updated because <select> relies on its children
  27267. // <option>s.
  27268. mounted(el, { value }) {
  27269. setSelected(el, value);
  27270. },
  27271. beforeUpdate(el, _binding, vnode) {
  27272. el._assign = getModelAssigner(vnode);
  27273. },
  27274. updated(el, { value }) {
  27275. setSelected(el, value);
  27276. }
  27277. };
  27278. function setSelected(el, value) {
  27279. const isMultiple = el.multiple;
  27280. if (isMultiple && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value) && !(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value)) {
  27281. ( true) &&
  27282. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`<select multiple v-model> expects an Array or Set value for its binding, ` +
  27283. `but got ${Object.prototype.toString.call(value).slice(8, -1)}.`);
  27284. return;
  27285. }
  27286. for (let i = 0, l = el.options.length; i < l; i++) {
  27287. const option = el.options[i];
  27288. const optionValue = getValue(option);
  27289. if (isMultiple) {
  27290. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) {
  27291. option.selected = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseIndexOf)(value, optionValue) > -1;
  27292. }
  27293. else {
  27294. option.selected = value.has(optionValue);
  27295. }
  27296. }
  27297. else {
  27298. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(getValue(option), value)) {
  27299. if (el.selectedIndex !== i)
  27300. el.selectedIndex = i;
  27301. return;
  27302. }
  27303. }
  27304. }
  27305. if (!isMultiple && el.selectedIndex !== -1) {
  27306. el.selectedIndex = -1;
  27307. }
  27308. }
  27309. // retrieve raw value set via :value bindings
  27310. function getValue(el) {
  27311. return '_value' in el ? el._value : el.value;
  27312. }
  27313. // retrieve raw value for true-value and false-value set via :true-value or :false-value bindings
  27314. function getCheckboxValue(el, checked) {
  27315. const key = checked ? '_trueValue' : '_falseValue';
  27316. return key in el ? el[key] : checked;
  27317. }
  27318. const vModelDynamic = {
  27319. created(el, binding, vnode) {
  27320. callModelHook(el, binding, vnode, null, 'created');
  27321. },
  27322. mounted(el, binding, vnode) {
  27323. callModelHook(el, binding, vnode, null, 'mounted');
  27324. },
  27325. beforeUpdate(el, binding, vnode, prevVNode) {
  27326. callModelHook(el, binding, vnode, prevVNode, 'beforeUpdate');
  27327. },
  27328. updated(el, binding, vnode, prevVNode) {
  27329. callModelHook(el, binding, vnode, prevVNode, 'updated');
  27330. }
  27331. };
  27332. function callModelHook(el, binding, vnode, prevVNode, hook) {
  27333. let modelToUse;
  27334. switch (el.tagName) {
  27335. case 'SELECT':
  27336. modelToUse = vModelSelect;
  27337. break;
  27338. case 'TEXTAREA':
  27339. modelToUse = vModelText;
  27340. break;
  27341. default:
  27342. switch (vnode.props && vnode.props.type) {
  27343. case 'checkbox':
  27344. modelToUse = vModelCheckbox;
  27345. break;
  27346. case 'radio':
  27347. modelToUse = vModelRadio;
  27348. break;
  27349. default:
  27350. modelToUse = vModelText;
  27351. }
  27352. }
  27353. const fn = modelToUse[hook];
  27354. fn && fn(el, binding, vnode, prevVNode);
  27355. }
  27356. // SSR vnode transforms, only used when user includes client-oriented render
  27357. // function in SSR
  27358. function initVModelForSSR() {
  27359. vModelText.getSSRProps = ({ value }) => ({ value });
  27360. vModelRadio.getSSRProps = ({ value }, vnode) => {
  27361. if (vnode.props && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseEqual)(vnode.props.value, value)) {
  27362. return { checked: true };
  27363. }
  27364. };
  27365. vModelCheckbox.getSSRProps = ({ value }, vnode) => {
  27366. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isArray)(value)) {
  27367. if (vnode.props && (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.looseIndexOf)(value, vnode.props.value) > -1) {
  27368. return { checked: true };
  27369. }
  27370. }
  27371. else if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSet)(value)) {
  27372. if (vnode.props && value.has(vnode.props.value)) {
  27373. return { checked: true };
  27374. }
  27375. }
  27376. else if (value) {
  27377. return { checked: true };
  27378. }
  27379. };
  27380. }
  27381. const systemModifiers = ['ctrl', 'shift', 'alt', 'meta'];
  27382. const modifierGuards = {
  27383. stop: e => e.stopPropagation(),
  27384. prevent: e => e.preventDefault(),
  27385. self: e => e.target !== e.currentTarget,
  27386. ctrl: e => !e.ctrlKey,
  27387. shift: e => !e.shiftKey,
  27388. alt: e => !e.altKey,
  27389. meta: e => !e.metaKey,
  27390. left: e => 'button' in e && e.button !== 0,
  27391. middle: e => 'button' in e && e.button !== 1,
  27392. right: e => 'button' in e && e.button !== 2,
  27393. exact: (e, modifiers) => systemModifiers.some(m => e[`${m}Key`] && !modifiers.includes(m))
  27394. };
  27395. /**
  27396. * @private
  27397. */
  27398. const withModifiers = (fn, modifiers) => {
  27399. return (event, ...args) => {
  27400. for (let i = 0; i < modifiers.length; i++) {
  27401. const guard = modifierGuards[modifiers[i]];
  27402. if (guard && guard(event, modifiers))
  27403. return;
  27404. }
  27405. return fn(event, ...args);
  27406. };
  27407. };
  27408. // Kept for 2.x compat.
  27409. // Note: IE11 compat for `spacebar` and `del` is removed for now.
  27410. const keyNames = {
  27411. esc: 'escape',
  27412. space: ' ',
  27413. up: 'arrow-up',
  27414. left: 'arrow-left',
  27415. right: 'arrow-right',
  27416. down: 'arrow-down',
  27417. delete: 'backspace'
  27418. };
  27419. /**
  27420. * @private
  27421. */
  27422. const withKeys = (fn, modifiers) => {
  27423. return (event) => {
  27424. if (!('key' in event)) {
  27425. return;
  27426. }
  27427. const eventKey = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.hyphenate)(event.key);
  27428. if (modifiers.some(k => k === eventKey || keyNames[k] === eventKey)) {
  27429. return fn(event);
  27430. }
  27431. };
  27432. };
  27433. const vShow = {
  27434. beforeMount(el, { value }, { transition }) {
  27435. el._vod = el.style.display === 'none' ? '' : el.style.display;
  27436. if (transition && value) {
  27437. transition.beforeEnter(el);
  27438. }
  27439. else {
  27440. setDisplay(el, value);
  27441. }
  27442. },
  27443. mounted(el, { value }, { transition }) {
  27444. if (transition && value) {
  27445. transition.enter(el);
  27446. }
  27447. },
  27448. updated(el, { value, oldValue }, { transition }) {
  27449. if (!value === !oldValue)
  27450. return;
  27451. if (transition) {
  27452. if (value) {
  27453. transition.beforeEnter(el);
  27454. setDisplay(el, true);
  27455. transition.enter(el);
  27456. }
  27457. else {
  27458. transition.leave(el, () => {
  27459. setDisplay(el, false);
  27460. });
  27461. }
  27462. }
  27463. else {
  27464. setDisplay(el, value);
  27465. }
  27466. },
  27467. beforeUnmount(el, { value }) {
  27468. setDisplay(el, value);
  27469. }
  27470. };
  27471. function setDisplay(el, value) {
  27472. el.style.display = value ? el._vod : 'none';
  27473. }
  27474. // SSR vnode transforms, only used when user includes client-oriented render
  27475. // function in SSR
  27476. function initVShowForSSR() {
  27477. vShow.getSSRProps = ({ value }) => {
  27478. if (!value) {
  27479. return { style: { display: 'none' } };
  27480. }
  27481. };
  27482. }
  27483. const rendererOptions = (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({ patchProp }, nodeOps);
  27484. // lazy create the renderer - this makes core renderer logic tree-shakable
  27485. // in case the user only imports reactivity utilities from Vue.
  27486. let renderer;
  27487. let enabledHydration = false;
  27488. function ensureRenderer() {
  27489. return (renderer ||
  27490. (renderer = (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createRenderer)(rendererOptions)));
  27491. }
  27492. function ensureHydrationRenderer() {
  27493. renderer = enabledHydration
  27494. ? renderer
  27495. : (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer)(rendererOptions);
  27496. enabledHydration = true;
  27497. return renderer;
  27498. }
  27499. // use explicit type casts here to avoid import() calls in rolled-up d.ts
  27500. const render = ((...args) => {
  27501. ensureRenderer().render(...args);
  27502. });
  27503. const hydrate = ((...args) => {
  27504. ensureHydrationRenderer().hydrate(...args);
  27505. });
  27506. const createApp = ((...args) => {
  27507. const app = ensureRenderer().createApp(...args);
  27508. if ((true)) {
  27509. injectNativeTagCheck(app);
  27510. injectCompilerOptionsCheck(app);
  27511. }
  27512. const { mount } = app;
  27513. app.mount = (containerOrSelector) => {
  27514. const container = normalizeContainer(containerOrSelector);
  27515. if (!container)
  27516. return;
  27517. const component = app._component;
  27518. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isFunction)(component) && !component.render && !component.template) {
  27519. // __UNSAFE__
  27520. // Reason: potential execution of JS expressions in in-DOM template.
  27521. // The user must make sure the in-DOM template is trusted. If it's
  27522. // rendered by the server, the template should not contain any user data.
  27523. component.template = container.innerHTML;
  27524. }
  27525. // clear content before mounting
  27526. container.innerHTML = '';
  27527. const proxy = mount(container, false, container instanceof SVGElement);
  27528. if (container instanceof Element) {
  27529. container.removeAttribute('v-cloak');
  27530. container.setAttribute('data-v-app', '');
  27531. }
  27532. return proxy;
  27533. };
  27534. return app;
  27535. });
  27536. const createSSRApp = ((...args) => {
  27537. const app = ensureHydrationRenderer().createApp(...args);
  27538. if ((true)) {
  27539. injectNativeTagCheck(app);
  27540. injectCompilerOptionsCheck(app);
  27541. }
  27542. const { mount } = app;
  27543. app.mount = (containerOrSelector) => {
  27544. const container = normalizeContainer(containerOrSelector);
  27545. if (container) {
  27546. return mount(container, true, container instanceof SVGElement);
  27547. }
  27548. };
  27549. return app;
  27550. });
  27551. function injectNativeTagCheck(app) {
  27552. // Inject `isNativeTag`
  27553. // this is used for component name validation (dev only)
  27554. Object.defineProperty(app.config, 'isNativeTag', {
  27555. value: (tag) => (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isHTMLTag)(tag) || (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isSVGTag)(tag),
  27556. writable: false
  27557. });
  27558. }
  27559. // dev only
  27560. function injectCompilerOptionsCheck(app) {
  27561. if ((0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly)()) {
  27562. const isCustomElement = app.config.isCustomElement;
  27563. Object.defineProperty(app.config, 'isCustomElement', {
  27564. get() {
  27565. return isCustomElement;
  27566. },
  27567. set() {
  27568. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`The \`isCustomElement\` config option is deprecated. Use ` +
  27569. `\`compilerOptions.isCustomElement\` instead.`);
  27570. }
  27571. });
  27572. const compilerOptions = app.config.compilerOptions;
  27573. const msg = `The \`compilerOptions\` config option is only respected when using ` +
  27574. `a build of Vue.js that includes the runtime compiler (aka "full build"). ` +
  27575. `Since you are using the runtime-only build, \`compilerOptions\` ` +
  27576. `must be passed to \`@vue/compiler-dom\` in the build setup instead.\n` +
  27577. `- For vue-loader: pass it via vue-loader's \`compilerOptions\` loader option.\n` +
  27578. `- For vue-cli: see https://cli.vuejs.org/guide/webpack.html#modifying-options-of-a-loader\n` +
  27579. `- For vite: pass it via @vitejs/plugin-vue options. See https://github.com/vitejs/vite/tree/main/packages/plugin-vue#example-for-passing-options-to-vuecompiler-dom`;
  27580. Object.defineProperty(app.config, 'compilerOptions', {
  27581. get() {
  27582. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(msg);
  27583. return compilerOptions;
  27584. },
  27585. set() {
  27586. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(msg);
  27587. }
  27588. });
  27589. }
  27590. }
  27591. function normalizeContainer(container) {
  27592. if ((0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(container)) {
  27593. const res = document.querySelector(container);
  27594. if (( true) && !res) {
  27595. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`Failed to mount app: mount target selector "${container}" returned null.`);
  27596. }
  27597. return res;
  27598. }
  27599. if (( true) &&
  27600. window.ShadowRoot &&
  27601. container instanceof window.ShadowRoot &&
  27602. container.mode === 'closed') {
  27603. (0,_vue_runtime_core__WEBPACK_IMPORTED_MODULE_0__.warn)(`mounting on a ShadowRoot with \`{mode: "closed"}\` may lead to unpredictable bugs`);
  27604. }
  27605. return container;
  27606. }
  27607. let ssrDirectiveInitialized = false;
  27608. /**
  27609. * @internal
  27610. */
  27611. const initDirectivesForSSR = () => {
  27612. if (!ssrDirectiveInitialized) {
  27613. ssrDirectiveInitialized = true;
  27614. initVModelForSSR();
  27615. initVShowForSSR();
  27616. }
  27617. }
  27618. ;
  27619. /***/ }),
  27620. /***/ "./node_modules/@vue/shared/dist/shared.esm-bundler.js":
  27621. /*!*************************************************************!*\
  27622. !*** ./node_modules/@vue/shared/dist/shared.esm-bundler.js ***!
  27623. \*************************************************************/
  27624. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  27625. "use strict";
  27626. __webpack_require__.r(__webpack_exports__);
  27627. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  27628. /* harmony export */ "EMPTY_ARR": () => (/* binding */ EMPTY_ARR),
  27629. /* harmony export */ "EMPTY_OBJ": () => (/* binding */ EMPTY_OBJ),
  27630. /* harmony export */ "NO": () => (/* binding */ NO),
  27631. /* harmony export */ "NOOP": () => (/* binding */ NOOP),
  27632. /* harmony export */ "PatchFlagNames": () => (/* binding */ PatchFlagNames),
  27633. /* harmony export */ "camelize": () => (/* binding */ camelize),
  27634. /* harmony export */ "capitalize": () => (/* binding */ capitalize),
  27635. /* harmony export */ "def": () => (/* binding */ def),
  27636. /* harmony export */ "escapeHtml": () => (/* binding */ escapeHtml),
  27637. /* harmony export */ "escapeHtmlComment": () => (/* binding */ escapeHtmlComment),
  27638. /* harmony export */ "extend": () => (/* binding */ extend),
  27639. /* harmony export */ "generateCodeFrame": () => (/* binding */ generateCodeFrame),
  27640. /* harmony export */ "getGlobalThis": () => (/* binding */ getGlobalThis),
  27641. /* harmony export */ "hasChanged": () => (/* binding */ hasChanged),
  27642. /* harmony export */ "hasOwn": () => (/* binding */ hasOwn),
  27643. /* harmony export */ "hyphenate": () => (/* binding */ hyphenate),
  27644. /* harmony export */ "includeBooleanAttr": () => (/* binding */ includeBooleanAttr),
  27645. /* harmony export */ "invokeArrayFns": () => (/* binding */ invokeArrayFns),
  27646. /* harmony export */ "isArray": () => (/* binding */ isArray),
  27647. /* harmony export */ "isBooleanAttr": () => (/* binding */ isBooleanAttr),
  27648. /* harmony export */ "isBuiltInDirective": () => (/* binding */ isBuiltInDirective),
  27649. /* harmony export */ "isDate": () => (/* binding */ isDate),
  27650. /* harmony export */ "isFunction": () => (/* binding */ isFunction),
  27651. /* harmony export */ "isGloballyWhitelisted": () => (/* binding */ isGloballyWhitelisted),
  27652. /* harmony export */ "isHTMLTag": () => (/* binding */ isHTMLTag),
  27653. /* harmony export */ "isIntegerKey": () => (/* binding */ isIntegerKey),
  27654. /* harmony export */ "isKnownHtmlAttr": () => (/* binding */ isKnownHtmlAttr),
  27655. /* harmony export */ "isKnownSvgAttr": () => (/* binding */ isKnownSvgAttr),
  27656. /* harmony export */ "isMap": () => (/* binding */ isMap),
  27657. /* harmony export */ "isModelListener": () => (/* binding */ isModelListener),
  27658. /* harmony export */ "isNoUnitNumericStyleProp": () => (/* binding */ isNoUnitNumericStyleProp),
  27659. /* harmony export */ "isObject": () => (/* binding */ isObject),
  27660. /* harmony export */ "isOn": () => (/* binding */ isOn),
  27661. /* harmony export */ "isPlainObject": () => (/* binding */ isPlainObject),
  27662. /* harmony export */ "isPromise": () => (/* binding */ isPromise),
  27663. /* harmony export */ "isReservedProp": () => (/* binding */ isReservedProp),
  27664. /* harmony export */ "isSSRSafeAttrName": () => (/* binding */ isSSRSafeAttrName),
  27665. /* harmony export */ "isSVGTag": () => (/* binding */ isSVGTag),
  27666. /* harmony export */ "isSet": () => (/* binding */ isSet),
  27667. /* harmony export */ "isSpecialBooleanAttr": () => (/* binding */ isSpecialBooleanAttr),
  27668. /* harmony export */ "isString": () => (/* binding */ isString),
  27669. /* harmony export */ "isSymbol": () => (/* binding */ isSymbol),
  27670. /* harmony export */ "isVoidTag": () => (/* binding */ isVoidTag),
  27671. /* harmony export */ "looseEqual": () => (/* binding */ looseEqual),
  27672. /* harmony export */ "looseIndexOf": () => (/* binding */ looseIndexOf),
  27673. /* harmony export */ "makeMap": () => (/* binding */ makeMap),
  27674. /* harmony export */ "normalizeClass": () => (/* binding */ normalizeClass),
  27675. /* harmony export */ "normalizeProps": () => (/* binding */ normalizeProps),
  27676. /* harmony export */ "normalizeStyle": () => (/* binding */ normalizeStyle),
  27677. /* harmony export */ "objectToString": () => (/* binding */ objectToString),
  27678. /* harmony export */ "parseStringStyle": () => (/* binding */ parseStringStyle),
  27679. /* harmony export */ "propsToAttrMap": () => (/* binding */ propsToAttrMap),
  27680. /* harmony export */ "remove": () => (/* binding */ remove),
  27681. /* harmony export */ "slotFlagsText": () => (/* binding */ slotFlagsText),
  27682. /* harmony export */ "stringifyStyle": () => (/* binding */ stringifyStyle),
  27683. /* harmony export */ "toDisplayString": () => (/* binding */ toDisplayString),
  27684. /* harmony export */ "toHandlerKey": () => (/* binding */ toHandlerKey),
  27685. /* harmony export */ "toNumber": () => (/* binding */ toNumber),
  27686. /* harmony export */ "toRawType": () => (/* binding */ toRawType),
  27687. /* harmony export */ "toTypeString": () => (/* binding */ toTypeString)
  27688. /* harmony export */ });
  27689. /**
  27690. * Make a map and return a function for checking if a key
  27691. * is in that map.
  27692. * IMPORTANT: all calls of this function must be prefixed with
  27693. * \/\*#\_\_PURE\_\_\*\/
  27694. * So that rollup can tree-shake them if necessary.
  27695. */
  27696. function makeMap(str, expectsLowerCase) {
  27697. const map = Object.create(null);
  27698. const list = str.split(',');
  27699. for (let i = 0; i < list.length; i++) {
  27700. map[list[i]] = true;
  27701. }
  27702. return expectsLowerCase ? val => !!map[val.toLowerCase()] : val => !!map[val];
  27703. }
  27704. /**
  27705. * dev only flag -> name mapping
  27706. */
  27707. const PatchFlagNames = {
  27708. [1 /* TEXT */]: `TEXT`,
  27709. [2 /* CLASS */]: `CLASS`,
  27710. [4 /* STYLE */]: `STYLE`,
  27711. [8 /* PROPS */]: `PROPS`,
  27712. [16 /* FULL_PROPS */]: `FULL_PROPS`,
  27713. [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`,
  27714. [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`,
  27715. [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`,
  27716. [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`,
  27717. [512 /* NEED_PATCH */]: `NEED_PATCH`,
  27718. [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`,
  27719. [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`,
  27720. [-1 /* HOISTED */]: `HOISTED`,
  27721. [-2 /* BAIL */]: `BAIL`
  27722. };
  27723. /**
  27724. * Dev only
  27725. */
  27726. const slotFlagsText = {
  27727. [1 /* STABLE */]: 'STABLE',
  27728. [2 /* DYNAMIC */]: 'DYNAMIC',
  27729. [3 /* FORWARDED */]: 'FORWARDED'
  27730. };
  27731. const GLOBALS_WHITE_LISTED = 'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +
  27732. 'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +
  27733. 'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt';
  27734. const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED);
  27735. const range = 2;
  27736. function generateCodeFrame(source, start = 0, end = source.length) {
  27737. // Split the content into individual lines but capture the newline sequence
  27738. // that separated each line. This is important because the actual sequence is
  27739. // needed to properly take into account the full line length for offset
  27740. // comparison
  27741. let lines = source.split(/(\r?\n)/);
  27742. // Separate the lines and newline sequences into separate arrays for easier referencing
  27743. const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);
  27744. lines = lines.filter((_, idx) => idx % 2 === 0);
  27745. let count = 0;
  27746. const res = [];
  27747. for (let i = 0; i < lines.length; i++) {
  27748. count +=
  27749. lines[i].length +
  27750. ((newlineSequences[i] && newlineSequences[i].length) || 0);
  27751. if (count >= start) {
  27752. for (let j = i - range; j <= i + range || end > count; j++) {
  27753. if (j < 0 || j >= lines.length)
  27754. continue;
  27755. const line = j + 1;
  27756. res.push(`${line}${' '.repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`);
  27757. const lineLength = lines[j].length;
  27758. const newLineSeqLength = (newlineSequences[j] && newlineSequences[j].length) || 0;
  27759. if (j === i) {
  27760. // push underline
  27761. const pad = start - (count - (lineLength + newLineSeqLength));
  27762. const length = Math.max(1, end > count ? lineLength - pad : end - start);
  27763. res.push(` | ` + ' '.repeat(pad) + '^'.repeat(length));
  27764. }
  27765. else if (j > i) {
  27766. if (end > count) {
  27767. const length = Math.max(Math.min(end - count, lineLength), 1);
  27768. res.push(` | ` + '^'.repeat(length));
  27769. }
  27770. count += lineLength + newLineSeqLength;
  27771. }
  27772. }
  27773. break;
  27774. }
  27775. }
  27776. return res.join('\n');
  27777. }
  27778. /**
  27779. * On the client we only need to offer special cases for boolean attributes that
  27780. * have different names from their corresponding dom properties:
  27781. * - itemscope -> N/A
  27782. * - allowfullscreen -> allowFullscreen
  27783. * - formnovalidate -> formNoValidate
  27784. * - ismap -> isMap
  27785. * - nomodule -> noModule
  27786. * - novalidate -> noValidate
  27787. * - readonly -> readOnly
  27788. */
  27789. const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
  27790. const isSpecialBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs);
  27791. /**
  27792. * The full list is needed during SSR to produce the correct initial markup.
  27793. */
  27794. const isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs +
  27795. `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,` +
  27796. `loop,open,required,reversed,scoped,seamless,` +
  27797. `checked,muted,multiple,selected`);
  27798. /**
  27799. * Boolean attributes should be included if the value is truthy or ''.
  27800. * e.g. `<select multiple>` compiles to `{ multiple: '' }`
  27801. */
  27802. function includeBooleanAttr(value) {
  27803. return !!value || value === '';
  27804. }
  27805. const unsafeAttrCharRE = /[>/="'\u0009\u000a\u000c\u0020]/;
  27806. const attrValidationCache = {};
  27807. function isSSRSafeAttrName(name) {
  27808. if (attrValidationCache.hasOwnProperty(name)) {
  27809. return attrValidationCache[name];
  27810. }
  27811. const isUnsafe = unsafeAttrCharRE.test(name);
  27812. if (isUnsafe) {
  27813. console.error(`unsafe attribute name: ${name}`);
  27814. }
  27815. return (attrValidationCache[name] = !isUnsafe);
  27816. }
  27817. const propsToAttrMap = {
  27818. acceptCharset: 'accept-charset',
  27819. className: 'class',
  27820. htmlFor: 'for',
  27821. httpEquiv: 'http-equiv'
  27822. };
  27823. /**
  27824. * CSS properties that accept plain numbers
  27825. */
  27826. const isNoUnitNumericStyleProp = /*#__PURE__*/ makeMap(`animation-iteration-count,border-image-outset,border-image-slice,` +
  27827. `border-image-width,box-flex,box-flex-group,box-ordinal-group,column-count,` +
  27828. `columns,flex,flex-grow,flex-positive,flex-shrink,flex-negative,flex-order,` +
  27829. `grid-row,grid-row-end,grid-row-span,grid-row-start,grid-column,` +
  27830. `grid-column-end,grid-column-span,grid-column-start,font-weight,line-clamp,` +
  27831. `line-height,opacity,order,orphans,tab-size,widows,z-index,zoom,` +
  27832. // SVG
  27833. `fill-opacity,flood-opacity,stop-opacity,stroke-dasharray,stroke-dashoffset,` +
  27834. `stroke-miterlimit,stroke-opacity,stroke-width`);
  27835. /**
  27836. * Known attributes, this is used for stringification of runtime static nodes
  27837. * so that we don't stringify bindings that cannot be set from HTML.
  27838. * Don't also forget to allow `data-*` and `aria-*`!
  27839. * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
  27840. */
  27841. const isKnownHtmlAttr = /*#__PURE__*/ makeMap(`accept,accept-charset,accesskey,action,align,allow,alt,async,` +
  27842. `autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,` +
  27843. `border,buffered,capture,challenge,charset,checked,cite,class,code,` +
  27844. `codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,` +
  27845. `coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,` +
  27846. `disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,` +
  27847. `formaction,formenctype,formmethod,formnovalidate,formtarget,headers,` +
  27848. `height,hidden,high,href,hreflang,http-equiv,icon,id,importance,integrity,` +
  27849. `ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,` +
  27850. `manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,` +
  27851. `open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,` +
  27852. `referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,` +
  27853. `selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,` +
  27854. `start,step,style,summary,tabindex,target,title,translate,type,usemap,` +
  27855. `value,width,wrap`);
  27856. /**
  27857. * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
  27858. */
  27859. const isKnownSvgAttr = /*#__PURE__*/ makeMap(`xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,` +
  27860. `arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,` +
  27861. `baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,` +
  27862. `clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,` +
  27863. `color-interpolation-filters,color-profile,color-rendering,` +
  27864. `contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,` +
  27865. `descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,` +
  27866. `dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,` +
  27867. `fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,` +
  27868. `font-family,font-size,font-size-adjust,font-stretch,font-style,` +
  27869. `font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,` +
  27870. `glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,` +
  27871. `gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,` +
  27872. `horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,` +
  27873. `k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,` +
  27874. `lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,` +
  27875. `marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,` +
  27876. `mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,` +
  27877. `name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,` +
  27878. `overflow,overline-position,overline-thickness,panose-1,paint-order,path,` +
  27879. `pathLength,patternContentUnits,patternTransform,patternUnits,ping,` +
  27880. `pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,` +
  27881. `preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,` +
  27882. `rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,` +
  27883. `restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,` +
  27884. `specularConstant,specularExponent,speed,spreadMethod,startOffset,` +
  27885. `stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,` +
  27886. `strikethrough-position,strikethrough-thickness,string,stroke,` +
  27887. `stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,` +
  27888. `stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,` +
  27889. `systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,` +
  27890. `text-decoration,text-rendering,textLength,to,transform,transform-origin,` +
  27891. `type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,` +
  27892. `unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,` +
  27893. `v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,` +
  27894. `vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,` +
  27895. `writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,` +
  27896. `xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,` +
  27897. `xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`);
  27898. function normalizeStyle(value) {
  27899. if (isArray(value)) {
  27900. const res = {};
  27901. for (let i = 0; i < value.length; i++) {
  27902. const item = value[i];
  27903. const normalized = isString(item)
  27904. ? parseStringStyle(item)
  27905. : normalizeStyle(item);
  27906. if (normalized) {
  27907. for (const key in normalized) {
  27908. res[key] = normalized[key];
  27909. }
  27910. }
  27911. }
  27912. return res;
  27913. }
  27914. else if (isString(value)) {
  27915. return value;
  27916. }
  27917. else if (isObject(value)) {
  27918. return value;
  27919. }
  27920. }
  27921. const listDelimiterRE = /;(?![^(]*\))/g;
  27922. const propertyDelimiterRE = /:(.+)/;
  27923. function parseStringStyle(cssText) {
  27924. const ret = {};
  27925. cssText.split(listDelimiterRE).forEach(item => {
  27926. if (item) {
  27927. const tmp = item.split(propertyDelimiterRE);
  27928. tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
  27929. }
  27930. });
  27931. return ret;
  27932. }
  27933. function stringifyStyle(styles) {
  27934. let ret = '';
  27935. if (!styles || isString(styles)) {
  27936. return ret;
  27937. }
  27938. for (const key in styles) {
  27939. const value = styles[key];
  27940. const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
  27941. if (isString(value) ||
  27942. (typeof value === 'number' && isNoUnitNumericStyleProp(normalizedKey))) {
  27943. // only render valid values
  27944. ret += `${normalizedKey}:${value};`;
  27945. }
  27946. }
  27947. return ret;
  27948. }
  27949. function normalizeClass(value) {
  27950. let res = '';
  27951. if (isString(value)) {
  27952. res = value;
  27953. }
  27954. else if (isArray(value)) {
  27955. for (let i = 0; i < value.length; i++) {
  27956. const normalized = normalizeClass(value[i]);
  27957. if (normalized) {
  27958. res += normalized + ' ';
  27959. }
  27960. }
  27961. }
  27962. else if (isObject(value)) {
  27963. for (const name in value) {
  27964. if (value[name]) {
  27965. res += name + ' ';
  27966. }
  27967. }
  27968. }
  27969. return res.trim();
  27970. }
  27971. function normalizeProps(props) {
  27972. if (!props)
  27973. return null;
  27974. let { class: klass, style } = props;
  27975. if (klass && !isString(klass)) {
  27976. props.class = normalizeClass(klass);
  27977. }
  27978. if (style) {
  27979. props.style = normalizeStyle(style);
  27980. }
  27981. return props;
  27982. }
  27983. // These tag configs are shared between compiler-dom and runtime-dom, so they
  27984. // https://developer.mozilla.org/en-US/docs/Web/HTML/Element
  27985. const HTML_TAGS = 'html,body,base,head,link,meta,style,title,address,article,aside,footer,' +
  27986. 'header,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,' +
  27987. 'figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,' +
  27988. 'data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,' +
  27989. 'time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,' +
  27990. 'canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,' +
  27991. 'th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,' +
  27992. 'option,output,progress,select,textarea,details,dialog,menu,' +
  27993. 'summary,template,blockquote,iframe,tfoot';
  27994. // https://developer.mozilla.org/en-US/docs/Web/SVG/Element
  27995. const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,' +
  27996. 'defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,' +
  27997. 'feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,' +
  27998. 'feDistanceLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,' +
  27999. 'feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,' +
  28000. 'fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,' +
  28001. 'foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,' +
  28002. 'mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,' +
  28003. 'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
  28004. 'text,textPath,title,tspan,unknown,use,view';
  28005. const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
  28006. /**
  28007. * Compiler only.
  28008. * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
  28009. */
  28010. const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
  28011. /**
  28012. * Compiler only.
  28013. * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
  28014. */
  28015. const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
  28016. /**
  28017. * Compiler only.
  28018. * Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
  28019. */
  28020. const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
  28021. const escapeRE = /["'&<>]/;
  28022. function escapeHtml(string) {
  28023. const str = '' + string;
  28024. const match = escapeRE.exec(str);
  28025. if (!match) {
  28026. return str;
  28027. }
  28028. let html = '';
  28029. let escaped;
  28030. let index;
  28031. let lastIndex = 0;
  28032. for (index = match.index; index < str.length; index++) {
  28033. switch (str.charCodeAt(index)) {
  28034. case 34: // "
  28035. escaped = '&quot;';
  28036. break;
  28037. case 38: // &
  28038. escaped = '&amp;';
  28039. break;
  28040. case 39: // '
  28041. escaped = '&#39;';
  28042. break;
  28043. case 60: // <
  28044. escaped = '&lt;';
  28045. break;
  28046. case 62: // >
  28047. escaped = '&gt;';
  28048. break;
  28049. default:
  28050. continue;
  28051. }
  28052. if (lastIndex !== index) {
  28053. html += str.slice(lastIndex, index);
  28054. }
  28055. lastIndex = index + 1;
  28056. html += escaped;
  28057. }
  28058. return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
  28059. }
  28060. // https://www.w3.org/TR/html52/syntax.html#comments
  28061. const commentStripRE = /^-?>|<!--|-->|--!>|<!-$/g;
  28062. function escapeHtmlComment(src) {
  28063. return src.replace(commentStripRE, '');
  28064. }
  28065. function looseCompareArrays(a, b) {
  28066. if (a.length !== b.length)
  28067. return false;
  28068. let equal = true;
  28069. for (let i = 0; equal && i < a.length; i++) {
  28070. equal = looseEqual(a[i], b[i]);
  28071. }
  28072. return equal;
  28073. }
  28074. function looseEqual(a, b) {
  28075. if (a === b)
  28076. return true;
  28077. let aValidType = isDate(a);
  28078. let bValidType = isDate(b);
  28079. if (aValidType || bValidType) {
  28080. return aValidType && bValidType ? a.getTime() === b.getTime() : false;
  28081. }
  28082. aValidType = isArray(a);
  28083. bValidType = isArray(b);
  28084. if (aValidType || bValidType) {
  28085. return aValidType && bValidType ? looseCompareArrays(a, b) : false;
  28086. }
  28087. aValidType = isObject(a);
  28088. bValidType = isObject(b);
  28089. if (aValidType || bValidType) {
  28090. /* istanbul ignore if: this if will probably never be called */
  28091. if (!aValidType || !bValidType) {
  28092. return false;
  28093. }
  28094. const aKeysCount = Object.keys(a).length;
  28095. const bKeysCount = Object.keys(b).length;
  28096. if (aKeysCount !== bKeysCount) {
  28097. return false;
  28098. }
  28099. for (const key in a) {
  28100. const aHasKey = a.hasOwnProperty(key);
  28101. const bHasKey = b.hasOwnProperty(key);
  28102. if ((aHasKey && !bHasKey) ||
  28103. (!aHasKey && bHasKey) ||
  28104. !looseEqual(a[key], b[key])) {
  28105. return false;
  28106. }
  28107. }
  28108. }
  28109. return String(a) === String(b);
  28110. }
  28111. function looseIndexOf(arr, val) {
  28112. return arr.findIndex(item => looseEqual(item, val));
  28113. }
  28114. /**
  28115. * For converting {{ interpolation }} values to displayed strings.
  28116. * @private
  28117. */
  28118. const toDisplayString = (val) => {
  28119. return isString(val)
  28120. ? val
  28121. : val == null
  28122. ? ''
  28123. : isArray(val) ||
  28124. (isObject(val) &&
  28125. (val.toString === objectToString || !isFunction(val.toString)))
  28126. ? JSON.stringify(val, replacer, 2)
  28127. : String(val);
  28128. };
  28129. const replacer = (_key, val) => {
  28130. // can't use isRef here since @vue/shared has no deps
  28131. if (val && val.__v_isRef) {
  28132. return replacer(_key, val.value);
  28133. }
  28134. else if (isMap(val)) {
  28135. return {
  28136. [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val]) => {
  28137. entries[`${key} =>`] = val;
  28138. return entries;
  28139. }, {})
  28140. };
  28141. }
  28142. else if (isSet(val)) {
  28143. return {
  28144. [`Set(${val.size})`]: [...val.values()]
  28145. };
  28146. }
  28147. else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
  28148. return String(val);
  28149. }
  28150. return val;
  28151. };
  28152. const EMPTY_OBJ = ( true)
  28153. ? Object.freeze({})
  28154. : 0;
  28155. const EMPTY_ARR = ( true) ? Object.freeze([]) : 0;
  28156. const NOOP = () => { };
  28157. /**
  28158. * Always return false.
  28159. */
  28160. const NO = () => false;
  28161. const onRE = /^on[^a-z]/;
  28162. const isOn = (key) => onRE.test(key);
  28163. const isModelListener = (key) => key.startsWith('onUpdate:');
  28164. const extend = Object.assign;
  28165. const remove = (arr, el) => {
  28166. const i = arr.indexOf(el);
  28167. if (i > -1) {
  28168. arr.splice(i, 1);
  28169. }
  28170. };
  28171. const hasOwnProperty = Object.prototype.hasOwnProperty;
  28172. const hasOwn = (val, key) => hasOwnProperty.call(val, key);
  28173. const isArray = Array.isArray;
  28174. const isMap = (val) => toTypeString(val) === '[object Map]';
  28175. const isSet = (val) => toTypeString(val) === '[object Set]';
  28176. const isDate = (val) => val instanceof Date;
  28177. const isFunction = (val) => typeof val === 'function';
  28178. const isString = (val) => typeof val === 'string';
  28179. const isSymbol = (val) => typeof val === 'symbol';
  28180. const isObject = (val) => val !== null && typeof val === 'object';
  28181. const isPromise = (val) => {
  28182. return isObject(val) && isFunction(val.then) && isFunction(val.catch);
  28183. };
  28184. const objectToString = Object.prototype.toString;
  28185. const toTypeString = (value) => objectToString.call(value);
  28186. const toRawType = (value) => {
  28187. // extract "RawType" from strings like "[object RawType]"
  28188. return toTypeString(value).slice(8, -1);
  28189. };
  28190. const isPlainObject = (val) => toTypeString(val) === '[object Object]';
  28191. const isIntegerKey = (key) => isString(key) &&
  28192. key !== 'NaN' &&
  28193. key[0] !== '-' &&
  28194. '' + parseInt(key, 10) === key;
  28195. const isReservedProp = /*#__PURE__*/ makeMap(
  28196. // the leading comma is intentional so empty string "" is also included
  28197. ',key,ref,ref_for,ref_key,' +
  28198. 'onVnodeBeforeMount,onVnodeMounted,' +
  28199. 'onVnodeBeforeUpdate,onVnodeUpdated,' +
  28200. 'onVnodeBeforeUnmount,onVnodeUnmounted');
  28201. const isBuiltInDirective = /*#__PURE__*/ makeMap('bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo');
  28202. const cacheStringFunction = (fn) => {
  28203. const cache = Object.create(null);
  28204. return ((str) => {
  28205. const hit = cache[str];
  28206. return hit || (cache[str] = fn(str));
  28207. });
  28208. };
  28209. const camelizeRE = /-(\w)/g;
  28210. /**
  28211. * @private
  28212. */
  28213. const camelize = cacheStringFunction((str) => {
  28214. return str.replace(camelizeRE, (_, c) => (c ? c.toUpperCase() : ''));
  28215. });
  28216. const hyphenateRE = /\B([A-Z])/g;
  28217. /**
  28218. * @private
  28219. */
  28220. const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase());
  28221. /**
  28222. * @private
  28223. */
  28224. const capitalize = cacheStringFunction((str) => str.charAt(0).toUpperCase() + str.slice(1));
  28225. /**
  28226. * @private
  28227. */
  28228. const toHandlerKey = cacheStringFunction((str) => str ? `on${capitalize(str)}` : ``);
  28229. // compare whether a value has changed, accounting for NaN.
  28230. const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
  28231. const invokeArrayFns = (fns, arg) => {
  28232. for (let i = 0; i < fns.length; i++) {
  28233. fns[i](arg);
  28234. }
  28235. };
  28236. const def = (obj, key, value) => {
  28237. Object.defineProperty(obj, key, {
  28238. configurable: true,
  28239. enumerable: false,
  28240. value
  28241. });
  28242. };
  28243. const toNumber = (val) => {
  28244. const n = parseFloat(val);
  28245. return isNaN(n) ? val : n;
  28246. };
  28247. let _globalThis;
  28248. const getGlobalThis = () => {
  28249. return (_globalThis ||
  28250. (_globalThis =
  28251. typeof globalThis !== 'undefined'
  28252. ? globalThis
  28253. : typeof self !== 'undefined'
  28254. ? self
  28255. : typeof window !== 'undefined'
  28256. ? window
  28257. : typeof __webpack_require__.g !== 'undefined'
  28258. ? __webpack_require__.g
  28259. : {}));
  28260. };
  28261. /***/ }),
  28262. /***/ "./resources/js/assets/icons/index.js":
  28263. /*!********************************************!*\
  28264. !*** ./resources/js/assets/icons/index.js ***!
  28265. \********************************************/
  28266. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  28267. "use strict";
  28268. __webpack_require__.r(__webpack_exports__);
  28269. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  28270. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  28271. /* harmony export */ });
  28272. /* harmony import */ var _coreui_icons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @coreui/icons */ "./node_modules/@coreui/icons/js/free/cil-circle.js");
  28273. /* harmony import */ var _coreui_icons__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @coreui/icons */ "./node_modules/@coreui/icons/js/free/cil-menu.js");
  28274. /* harmony import */ var _coreui_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @coreui/icons */ "./node_modules/@coreui/icons/js/free/cil-account-logout.js");
  28275. /* harmony import */ var _coreui_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @coreui/icons */ "./node_modules/@coreui/icons/js/free/cil-user.js");
  28276. /* harmony import */ var _coreui_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @coreui/icons */ "./node_modules/@coreui/icons/js/free/cil-pen.js");
  28277. /* harmony import */ var _coreui_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @coreui/icons */ "./node_modules/@coreui/icons/js/free/cil-lock-locked.js");
  28278. /* harmony import */ var _coreui_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @coreui/icons */ "./node_modules/@coreui/icons/js/free/cil-transfer.js");
  28279. /* harmony import */ var _coreui_icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @coreui/icons */ "./node_modules/@coreui/icons/js/free/cil-notes.js");
  28280. /* harmony import */ var _coreui_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @coreui/icons */ "./node_modules/@coreui/icons/js/free/cil-money.js");
  28281. /* harmony import */ var _coreui_icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @coreui/icons */ "./node_modules/@coreui/icons/js/free/cil-wc.js");
  28282. /* harmony import */ var _coreui_icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @coreui/icons */ "./node_modules/@coreui/icons/js/free/cil-sitemap.js");
  28283. /* harmony import */ var _coreui_icons__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @coreui/icons */ "./node_modules/@coreui/icons/js/free/cil-loop-circular.js");
  28284. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
  28285. cilCircle: _coreui_icons__WEBPACK_IMPORTED_MODULE_0__.cilCircle,
  28286. cilMenu: _coreui_icons__WEBPACK_IMPORTED_MODULE_1__.cilMenu,
  28287. cilAccountLogout: _coreui_icons__WEBPACK_IMPORTED_MODULE_2__.cilAccountLogout,
  28288. cilUser: _coreui_icons__WEBPACK_IMPORTED_MODULE_3__.cilUser,
  28289. cilPen: _coreui_icons__WEBPACK_IMPORTED_MODULE_4__.cilPen,
  28290. cilLockLocked: _coreui_icons__WEBPACK_IMPORTED_MODULE_5__.cilLockLocked,
  28291. cilTransfer: _coreui_icons__WEBPACK_IMPORTED_MODULE_6__.cilTransfer,
  28292. cilNotes: _coreui_icons__WEBPACK_IMPORTED_MODULE_7__.cilNotes,
  28293. cilMoney: _coreui_icons__WEBPACK_IMPORTED_MODULE_8__.cilMoney,
  28294. cilWc: _coreui_icons__WEBPACK_IMPORTED_MODULE_9__.cilWc,
  28295. cilSitemap: _coreui_icons__WEBPACK_IMPORTED_MODULE_10__.cilSitemap,
  28296. cilLoopCircular: _coreui_icons__WEBPACK_IMPORTED_MODULE_11__.cilLoopCircular
  28297. });
  28298. /***/ }),
  28299. /***/ "./node_modules/call-bind/callBound.js":
  28300. /*!*********************************************!*\
  28301. !*** ./node_modules/call-bind/callBound.js ***!
  28302. \*********************************************/
  28303. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  28304. "use strict";
  28305. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/get-intrinsic/index.js");
  28306. var callBind = __webpack_require__(/*! ./ */ "./node_modules/call-bind/index.js");
  28307. var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
  28308. module.exports = function callBoundIntrinsic(name, allowMissing) {
  28309. var intrinsic = GetIntrinsic(name, !!allowMissing);
  28310. if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
  28311. return callBind(intrinsic);
  28312. }
  28313. return intrinsic;
  28314. };
  28315. /***/ }),
  28316. /***/ "./node_modules/call-bind/index.js":
  28317. /*!*****************************************!*\
  28318. !*** ./node_modules/call-bind/index.js ***!
  28319. \*****************************************/
  28320. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  28321. "use strict";
  28322. var bind = __webpack_require__(/*! function-bind */ "./node_modules/function-bind/index.js");
  28323. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/get-intrinsic/index.js");
  28324. var $apply = GetIntrinsic('%Function.prototype.apply%');
  28325. var $call = GetIntrinsic('%Function.prototype.call%');
  28326. var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
  28327. var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
  28328. var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
  28329. var $max = GetIntrinsic('%Math.max%');
  28330. if ($defineProperty) {
  28331. try {
  28332. $defineProperty({}, 'a', { value: 1 });
  28333. } catch (e) {
  28334. // IE 8 has a broken defineProperty
  28335. $defineProperty = null;
  28336. }
  28337. }
  28338. module.exports = function callBind(originalFunction) {
  28339. var func = $reflectApply(bind, $call, arguments);
  28340. if ($gOPD && $defineProperty) {
  28341. var desc = $gOPD(func, 'length');
  28342. if (desc.configurable) {
  28343. // original length, plus the receiver, minus any additional arguments (after the receiver)
  28344. $defineProperty(
  28345. func,
  28346. 'length',
  28347. { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
  28348. );
  28349. }
  28350. }
  28351. return func;
  28352. };
  28353. var applyBind = function applyBind() {
  28354. return $reflectApply(bind, $apply, arguments);
  28355. };
  28356. if ($defineProperty) {
  28357. $defineProperty(module.exports, 'apply', { value: applyBind });
  28358. } else {
  28359. module.exports.apply = applyBind;
  28360. }
  28361. /***/ }),
  28362. /***/ "./node_modules/deepmerge/dist/cjs.js":
  28363. /*!********************************************!*\
  28364. !*** ./node_modules/deepmerge/dist/cjs.js ***!
  28365. \********************************************/
  28366. /***/ ((module) => {
  28367. "use strict";
  28368. var isMergeableObject = function isMergeableObject(value) {
  28369. return isNonNullObject(value)
  28370. && !isSpecial(value)
  28371. };
  28372. function isNonNullObject(value) {
  28373. return !!value && typeof value === 'object'
  28374. }
  28375. function isSpecial(value) {
  28376. var stringValue = Object.prototype.toString.call(value);
  28377. return stringValue === '[object RegExp]'
  28378. || stringValue === '[object Date]'
  28379. || isReactElement(value)
  28380. }
  28381. // see https://github.com/facebook/react/blob/b5ac963fb791d1298e7f396236383bc955f916c1/src/isomorphic/classic/element/ReactElement.js#L21-L25
  28382. var canUseSymbol = typeof Symbol === 'function' && Symbol.for;
  28383. var REACT_ELEMENT_TYPE = canUseSymbol ? Symbol.for('react.element') : 0xeac7;
  28384. function isReactElement(value) {
  28385. return value.$$typeof === REACT_ELEMENT_TYPE
  28386. }
  28387. function emptyTarget(val) {
  28388. return Array.isArray(val) ? [] : {}
  28389. }
  28390. function cloneUnlessOtherwiseSpecified(value, options) {
  28391. return (options.clone !== false && options.isMergeableObject(value))
  28392. ? deepmerge(emptyTarget(value), value, options)
  28393. : value
  28394. }
  28395. function defaultArrayMerge(target, source, options) {
  28396. return target.concat(source).map(function(element) {
  28397. return cloneUnlessOtherwiseSpecified(element, options)
  28398. })
  28399. }
  28400. function getMergeFunction(key, options) {
  28401. if (!options.customMerge) {
  28402. return deepmerge
  28403. }
  28404. var customMerge = options.customMerge(key);
  28405. return typeof customMerge === 'function' ? customMerge : deepmerge
  28406. }
  28407. function getEnumerableOwnPropertySymbols(target) {
  28408. return Object.getOwnPropertySymbols
  28409. ? Object.getOwnPropertySymbols(target).filter(function(symbol) {
  28410. return target.propertyIsEnumerable(symbol)
  28411. })
  28412. : []
  28413. }
  28414. function getKeys(target) {
  28415. return Object.keys(target).concat(getEnumerableOwnPropertySymbols(target))
  28416. }
  28417. function propertyIsOnObject(object, property) {
  28418. try {
  28419. return property in object
  28420. } catch(_) {
  28421. return false
  28422. }
  28423. }
  28424. // Protects from prototype poisoning and unexpected merging up the prototype chain.
  28425. function propertyIsUnsafe(target, key) {
  28426. return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,
  28427. && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,
  28428. && Object.propertyIsEnumerable.call(target, key)) // and also unsafe if they're nonenumerable.
  28429. }
  28430. function mergeObject(target, source, options) {
  28431. var destination = {};
  28432. if (options.isMergeableObject(target)) {
  28433. getKeys(target).forEach(function(key) {
  28434. destination[key] = cloneUnlessOtherwiseSpecified(target[key], options);
  28435. });
  28436. }
  28437. getKeys(source).forEach(function(key) {
  28438. if (propertyIsUnsafe(target, key)) {
  28439. return
  28440. }
  28441. if (propertyIsOnObject(target, key) && options.isMergeableObject(source[key])) {
  28442. destination[key] = getMergeFunction(key, options)(target[key], source[key], options);
  28443. } else {
  28444. destination[key] = cloneUnlessOtherwiseSpecified(source[key], options);
  28445. }
  28446. });
  28447. return destination
  28448. }
  28449. function deepmerge(target, source, options) {
  28450. options = options || {};
  28451. options.arrayMerge = options.arrayMerge || defaultArrayMerge;
  28452. options.isMergeableObject = options.isMergeableObject || isMergeableObject;
  28453. // cloneUnlessOtherwiseSpecified is added to `options` so that custom arrayMerge()
  28454. // implementations can use it. The caller may not replace it.
  28455. options.cloneUnlessOtherwiseSpecified = cloneUnlessOtherwiseSpecified;
  28456. var sourceIsArray = Array.isArray(source);
  28457. var targetIsArray = Array.isArray(target);
  28458. var sourceAndTargetTypesMatch = sourceIsArray === targetIsArray;
  28459. if (!sourceAndTargetTypesMatch) {
  28460. return cloneUnlessOtherwiseSpecified(source, options)
  28461. } else if (sourceIsArray) {
  28462. return options.arrayMerge(target, source, options)
  28463. } else {
  28464. return mergeObject(target, source, options)
  28465. }
  28466. }
  28467. deepmerge.all = function deepmergeAll(array, options) {
  28468. if (!Array.isArray(array)) {
  28469. throw new Error('first argument should be an array')
  28470. }
  28471. return array.reduce(function(prev, next) {
  28472. return deepmerge(prev, next, options)
  28473. }, {})
  28474. };
  28475. var deepmerge_1 = deepmerge;
  28476. module.exports = deepmerge_1;
  28477. /***/ }),
  28478. /***/ "./node_modules/function-bind/implementation.js":
  28479. /*!******************************************************!*\
  28480. !*** ./node_modules/function-bind/implementation.js ***!
  28481. \******************************************************/
  28482. /***/ ((module) => {
  28483. "use strict";
  28484. /* eslint no-invalid-this: 1 */
  28485. var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
  28486. var slice = Array.prototype.slice;
  28487. var toStr = Object.prototype.toString;
  28488. var funcType = '[object Function]';
  28489. module.exports = function bind(that) {
  28490. var target = this;
  28491. if (typeof target !== 'function' || toStr.call(target) !== funcType) {
  28492. throw new TypeError(ERROR_MESSAGE + target);
  28493. }
  28494. var args = slice.call(arguments, 1);
  28495. var bound;
  28496. var binder = function () {
  28497. if (this instanceof bound) {
  28498. var result = target.apply(
  28499. this,
  28500. args.concat(slice.call(arguments))
  28501. );
  28502. if (Object(result) === result) {
  28503. return result;
  28504. }
  28505. return this;
  28506. } else {
  28507. return target.apply(
  28508. that,
  28509. args.concat(slice.call(arguments))
  28510. );
  28511. }
  28512. };
  28513. var boundLength = Math.max(0, target.length - args.length);
  28514. var boundArgs = [];
  28515. for (var i = 0; i < boundLength; i++) {
  28516. boundArgs.push('$' + i);
  28517. }
  28518. bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
  28519. if (target.prototype) {
  28520. var Empty = function Empty() {};
  28521. Empty.prototype = target.prototype;
  28522. bound.prototype = new Empty();
  28523. Empty.prototype = null;
  28524. }
  28525. return bound;
  28526. };
  28527. /***/ }),
  28528. /***/ "./node_modules/function-bind/index.js":
  28529. /*!*********************************************!*\
  28530. !*** ./node_modules/function-bind/index.js ***!
  28531. \*********************************************/
  28532. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  28533. "use strict";
  28534. var implementation = __webpack_require__(/*! ./implementation */ "./node_modules/function-bind/implementation.js");
  28535. module.exports = Function.prototype.bind || implementation;
  28536. /***/ }),
  28537. /***/ "./node_modules/get-intrinsic/index.js":
  28538. /*!*********************************************!*\
  28539. !*** ./node_modules/get-intrinsic/index.js ***!
  28540. \*********************************************/
  28541. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  28542. "use strict";
  28543. var undefined;
  28544. var $SyntaxError = SyntaxError;
  28545. var $Function = Function;
  28546. var $TypeError = TypeError;
  28547. // eslint-disable-next-line consistent-return
  28548. var getEvalledConstructor = function (expressionSyntax) {
  28549. try {
  28550. return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
  28551. } catch (e) {}
  28552. };
  28553. var $gOPD = Object.getOwnPropertyDescriptor;
  28554. if ($gOPD) {
  28555. try {
  28556. $gOPD({}, '');
  28557. } catch (e) {
  28558. $gOPD = null; // this is IE 8, which has a broken gOPD
  28559. }
  28560. }
  28561. var throwTypeError = function () {
  28562. throw new $TypeError();
  28563. };
  28564. var ThrowTypeError = $gOPD
  28565. ? (function () {
  28566. try {
  28567. // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
  28568. arguments.callee; // IE 8 does not throw here
  28569. return throwTypeError;
  28570. } catch (calleeThrows) {
  28571. try {
  28572. // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
  28573. return $gOPD(arguments, 'callee').get;
  28574. } catch (gOPDthrows) {
  28575. return throwTypeError;
  28576. }
  28577. }
  28578. }())
  28579. : throwTypeError;
  28580. var hasSymbols = __webpack_require__(/*! has-symbols */ "./node_modules/has-symbols/index.js")();
  28581. var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
  28582. var needsEval = {};
  28583. var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
  28584. var INTRINSICS = {
  28585. '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
  28586. '%Array%': Array,
  28587. '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
  28588. '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
  28589. '%AsyncFromSyncIteratorPrototype%': undefined,
  28590. '%AsyncFunction%': needsEval,
  28591. '%AsyncGenerator%': needsEval,
  28592. '%AsyncGeneratorFunction%': needsEval,
  28593. '%AsyncIteratorPrototype%': needsEval,
  28594. '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
  28595. '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
  28596. '%Boolean%': Boolean,
  28597. '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
  28598. '%Date%': Date,
  28599. '%decodeURI%': decodeURI,
  28600. '%decodeURIComponent%': decodeURIComponent,
  28601. '%encodeURI%': encodeURI,
  28602. '%encodeURIComponent%': encodeURIComponent,
  28603. '%Error%': Error,
  28604. '%eval%': eval, // eslint-disable-line no-eval
  28605. '%EvalError%': EvalError,
  28606. '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
  28607. '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
  28608. '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
  28609. '%Function%': $Function,
  28610. '%GeneratorFunction%': needsEval,
  28611. '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
  28612. '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
  28613. '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
  28614. '%isFinite%': isFinite,
  28615. '%isNaN%': isNaN,
  28616. '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
  28617. '%JSON%': typeof JSON === 'object' ? JSON : undefined,
  28618. '%Map%': typeof Map === 'undefined' ? undefined : Map,
  28619. '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
  28620. '%Math%': Math,
  28621. '%Number%': Number,
  28622. '%Object%': Object,
  28623. '%parseFloat%': parseFloat,
  28624. '%parseInt%': parseInt,
  28625. '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
  28626. '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
  28627. '%RangeError%': RangeError,
  28628. '%ReferenceError%': ReferenceError,
  28629. '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
  28630. '%RegExp%': RegExp,
  28631. '%Set%': typeof Set === 'undefined' ? undefined : Set,
  28632. '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
  28633. '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
  28634. '%String%': String,
  28635. '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
  28636. '%Symbol%': hasSymbols ? Symbol : undefined,
  28637. '%SyntaxError%': $SyntaxError,
  28638. '%ThrowTypeError%': ThrowTypeError,
  28639. '%TypedArray%': TypedArray,
  28640. '%TypeError%': $TypeError,
  28641. '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
  28642. '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
  28643. '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
  28644. '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
  28645. '%URIError%': URIError,
  28646. '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
  28647. '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
  28648. '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
  28649. };
  28650. var doEval = function doEval(name) {
  28651. var value;
  28652. if (name === '%AsyncFunction%') {
  28653. value = getEvalledConstructor('async function () {}');
  28654. } else if (name === '%GeneratorFunction%') {
  28655. value = getEvalledConstructor('function* () {}');
  28656. } else if (name === '%AsyncGeneratorFunction%') {
  28657. value = getEvalledConstructor('async function* () {}');
  28658. } else if (name === '%AsyncGenerator%') {
  28659. var fn = doEval('%AsyncGeneratorFunction%');
  28660. if (fn) {
  28661. value = fn.prototype;
  28662. }
  28663. } else if (name === '%AsyncIteratorPrototype%') {
  28664. var gen = doEval('%AsyncGenerator%');
  28665. if (gen) {
  28666. value = getProto(gen.prototype);
  28667. }
  28668. }
  28669. INTRINSICS[name] = value;
  28670. return value;
  28671. };
  28672. var LEGACY_ALIASES = {
  28673. '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
  28674. '%ArrayPrototype%': ['Array', 'prototype'],
  28675. '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
  28676. '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
  28677. '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
  28678. '%ArrayProto_values%': ['Array', 'prototype', 'values'],
  28679. '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
  28680. '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
  28681. '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
  28682. '%BooleanPrototype%': ['Boolean', 'prototype'],
  28683. '%DataViewPrototype%': ['DataView', 'prototype'],
  28684. '%DatePrototype%': ['Date', 'prototype'],
  28685. '%ErrorPrototype%': ['Error', 'prototype'],
  28686. '%EvalErrorPrototype%': ['EvalError', 'prototype'],
  28687. '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
  28688. '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
  28689. '%FunctionPrototype%': ['Function', 'prototype'],
  28690. '%Generator%': ['GeneratorFunction', 'prototype'],
  28691. '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
  28692. '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
  28693. '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
  28694. '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
  28695. '%JSONParse%': ['JSON', 'parse'],
  28696. '%JSONStringify%': ['JSON', 'stringify'],
  28697. '%MapPrototype%': ['Map', 'prototype'],
  28698. '%NumberPrototype%': ['Number', 'prototype'],
  28699. '%ObjectPrototype%': ['Object', 'prototype'],
  28700. '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
  28701. '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
  28702. '%PromisePrototype%': ['Promise', 'prototype'],
  28703. '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
  28704. '%Promise_all%': ['Promise', 'all'],
  28705. '%Promise_reject%': ['Promise', 'reject'],
  28706. '%Promise_resolve%': ['Promise', 'resolve'],
  28707. '%RangeErrorPrototype%': ['RangeError', 'prototype'],
  28708. '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
  28709. '%RegExpPrototype%': ['RegExp', 'prototype'],
  28710. '%SetPrototype%': ['Set', 'prototype'],
  28711. '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
  28712. '%StringPrototype%': ['String', 'prototype'],
  28713. '%SymbolPrototype%': ['Symbol', 'prototype'],
  28714. '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
  28715. '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
  28716. '%TypeErrorPrototype%': ['TypeError', 'prototype'],
  28717. '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
  28718. '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
  28719. '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
  28720. '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
  28721. '%URIErrorPrototype%': ['URIError', 'prototype'],
  28722. '%WeakMapPrototype%': ['WeakMap', 'prototype'],
  28723. '%WeakSetPrototype%': ['WeakSet', 'prototype']
  28724. };
  28725. var bind = __webpack_require__(/*! function-bind */ "./node_modules/function-bind/index.js");
  28726. var hasOwn = __webpack_require__(/*! has */ "./node_modules/has/src/index.js");
  28727. var $concat = bind.call(Function.call, Array.prototype.concat);
  28728. var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
  28729. var $replace = bind.call(Function.call, String.prototype.replace);
  28730. var $strSlice = bind.call(Function.call, String.prototype.slice);
  28731. /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
  28732. var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
  28733. var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
  28734. var stringToPath = function stringToPath(string) {
  28735. var first = $strSlice(string, 0, 1);
  28736. var last = $strSlice(string, -1);
  28737. if (first === '%' && last !== '%') {
  28738. throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
  28739. } else if (last === '%' && first !== '%') {
  28740. throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
  28741. }
  28742. var result = [];
  28743. $replace(string, rePropName, function (match, number, quote, subString) {
  28744. result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
  28745. });
  28746. return result;
  28747. };
  28748. /* end adaptation */
  28749. var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
  28750. var intrinsicName = name;
  28751. var alias;
  28752. if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
  28753. alias = LEGACY_ALIASES[intrinsicName];
  28754. intrinsicName = '%' + alias[0] + '%';
  28755. }
  28756. if (hasOwn(INTRINSICS, intrinsicName)) {
  28757. var value = INTRINSICS[intrinsicName];
  28758. if (value === needsEval) {
  28759. value = doEval(intrinsicName);
  28760. }
  28761. if (typeof value === 'undefined' && !allowMissing) {
  28762. throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
  28763. }
  28764. return {
  28765. alias: alias,
  28766. name: intrinsicName,
  28767. value: value
  28768. };
  28769. }
  28770. throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
  28771. };
  28772. module.exports = function GetIntrinsic(name, allowMissing) {
  28773. if (typeof name !== 'string' || name.length === 0) {
  28774. throw new $TypeError('intrinsic name must be a non-empty string');
  28775. }
  28776. if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
  28777. throw new $TypeError('"allowMissing" argument must be a boolean');
  28778. }
  28779. var parts = stringToPath(name);
  28780. var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
  28781. var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
  28782. var intrinsicRealName = intrinsic.name;
  28783. var value = intrinsic.value;
  28784. var skipFurtherCaching = false;
  28785. var alias = intrinsic.alias;
  28786. if (alias) {
  28787. intrinsicBaseName = alias[0];
  28788. $spliceApply(parts, $concat([0, 1], alias));
  28789. }
  28790. for (var i = 1, isOwn = true; i < parts.length; i += 1) {
  28791. var part = parts[i];
  28792. var first = $strSlice(part, 0, 1);
  28793. var last = $strSlice(part, -1);
  28794. if (
  28795. (
  28796. (first === '"' || first === "'" || first === '`')
  28797. || (last === '"' || last === "'" || last === '`')
  28798. )
  28799. && first !== last
  28800. ) {
  28801. throw new $SyntaxError('property names with quotes must have matching quotes');
  28802. }
  28803. if (part === 'constructor' || !isOwn) {
  28804. skipFurtherCaching = true;
  28805. }
  28806. intrinsicBaseName += '.' + part;
  28807. intrinsicRealName = '%' + intrinsicBaseName + '%';
  28808. if (hasOwn(INTRINSICS, intrinsicRealName)) {
  28809. value = INTRINSICS[intrinsicRealName];
  28810. } else if (value != null) {
  28811. if (!(part in value)) {
  28812. if (!allowMissing) {
  28813. throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
  28814. }
  28815. return void undefined;
  28816. }
  28817. if ($gOPD && (i + 1) >= parts.length) {
  28818. var desc = $gOPD(value, part);
  28819. isOwn = !!desc;
  28820. // By convention, when a data property is converted to an accessor
  28821. // property to emulate a data property that does not suffer from
  28822. // the override mistake, that accessor's getter is marked with
  28823. // an `originalValue` property. Here, when we detect this, we
  28824. // uphold the illusion by pretending to see that original data
  28825. // property, i.e., returning the value rather than the getter
  28826. // itself.
  28827. if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
  28828. value = desc.get;
  28829. } else {
  28830. value = value[part];
  28831. }
  28832. } else {
  28833. isOwn = hasOwn(value, part);
  28834. value = value[part];
  28835. }
  28836. if (isOwn && !skipFurtherCaching) {
  28837. INTRINSICS[intrinsicRealName] = value;
  28838. }
  28839. }
  28840. }
  28841. return value;
  28842. };
  28843. /***/ }),
  28844. /***/ "./node_modules/has-symbols/index.js":
  28845. /*!*******************************************!*\
  28846. !*** ./node_modules/has-symbols/index.js ***!
  28847. \*******************************************/
  28848. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  28849. "use strict";
  28850. var origSymbol = typeof Symbol !== 'undefined' && Symbol;
  28851. var hasSymbolSham = __webpack_require__(/*! ./shams */ "./node_modules/has-symbols/shams.js");
  28852. module.exports = function hasNativeSymbols() {
  28853. if (typeof origSymbol !== 'function') { return false; }
  28854. if (typeof Symbol !== 'function') { return false; }
  28855. if (typeof origSymbol('foo') !== 'symbol') { return false; }
  28856. if (typeof Symbol('bar') !== 'symbol') { return false; }
  28857. return hasSymbolSham();
  28858. };
  28859. /***/ }),
  28860. /***/ "./node_modules/has-symbols/shams.js":
  28861. /*!*******************************************!*\
  28862. !*** ./node_modules/has-symbols/shams.js ***!
  28863. \*******************************************/
  28864. /***/ ((module) => {
  28865. "use strict";
  28866. /* eslint complexity: [2, 18], max-statements: [2, 33] */
  28867. module.exports = function hasSymbols() {
  28868. if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
  28869. if (typeof Symbol.iterator === 'symbol') { return true; }
  28870. var obj = {};
  28871. var sym = Symbol('test');
  28872. var symObj = Object(sym);
  28873. if (typeof sym === 'string') { return false; }
  28874. if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
  28875. if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
  28876. // temp disabled per https://github.com/ljharb/object.assign/issues/17
  28877. // if (sym instanceof Symbol) { return false; }
  28878. // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
  28879. // if (!(symObj instanceof Symbol)) { return false; }
  28880. // if (typeof Symbol.prototype.toString !== 'function') { return false; }
  28881. // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
  28882. var symVal = 42;
  28883. obj[sym] = symVal;
  28884. for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
  28885. if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
  28886. if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
  28887. var syms = Object.getOwnPropertySymbols(obj);
  28888. if (syms.length !== 1 || syms[0] !== sym) { return false; }
  28889. if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
  28890. if (typeof Object.getOwnPropertyDescriptor === 'function') {
  28891. var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
  28892. if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
  28893. }
  28894. return true;
  28895. };
  28896. /***/ }),
  28897. /***/ "./node_modules/has/src/index.js":
  28898. /*!***************************************!*\
  28899. !*** ./node_modules/has/src/index.js ***!
  28900. \***************************************/
  28901. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  28902. "use strict";
  28903. var bind = __webpack_require__(/*! function-bind */ "./node_modules/function-bind/index.js");
  28904. module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
  28905. /***/ }),
  28906. /***/ "./node_modules/lodash.clonedeep/index.js":
  28907. /*!************************************************!*\
  28908. !*** ./node_modules/lodash.clonedeep/index.js ***!
  28909. \************************************************/
  28910. /***/ ((module, exports, __webpack_require__) => {
  28911. /* module decorator */ module = __webpack_require__.nmd(module);
  28912. /**
  28913. * lodash (Custom Build) <https://lodash.com/>
  28914. * Build: `lodash modularize exports="npm" -o ./`
  28915. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  28916. * Released under MIT license <https://lodash.com/license>
  28917. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  28918. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  28919. */
  28920. /** Used as the size to enable large array optimizations. */
  28921. var LARGE_ARRAY_SIZE = 200;
  28922. /** Used to stand-in for `undefined` hash values. */
  28923. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  28924. /** Used as references for various `Number` constants. */
  28925. var MAX_SAFE_INTEGER = 9007199254740991;
  28926. /** `Object#toString` result references. */
  28927. var argsTag = '[object Arguments]',
  28928. arrayTag = '[object Array]',
  28929. boolTag = '[object Boolean]',
  28930. dateTag = '[object Date]',
  28931. errorTag = '[object Error]',
  28932. funcTag = '[object Function]',
  28933. genTag = '[object GeneratorFunction]',
  28934. mapTag = '[object Map]',
  28935. numberTag = '[object Number]',
  28936. objectTag = '[object Object]',
  28937. promiseTag = '[object Promise]',
  28938. regexpTag = '[object RegExp]',
  28939. setTag = '[object Set]',
  28940. stringTag = '[object String]',
  28941. symbolTag = '[object Symbol]',
  28942. weakMapTag = '[object WeakMap]';
  28943. var arrayBufferTag = '[object ArrayBuffer]',
  28944. dataViewTag = '[object DataView]',
  28945. float32Tag = '[object Float32Array]',
  28946. float64Tag = '[object Float64Array]',
  28947. int8Tag = '[object Int8Array]',
  28948. int16Tag = '[object Int16Array]',
  28949. int32Tag = '[object Int32Array]',
  28950. uint8Tag = '[object Uint8Array]',
  28951. uint8ClampedTag = '[object Uint8ClampedArray]',
  28952. uint16Tag = '[object Uint16Array]',
  28953. uint32Tag = '[object Uint32Array]';
  28954. /**
  28955. * Used to match `RegExp`
  28956. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  28957. */
  28958. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  28959. /** Used to match `RegExp` flags from their coerced string values. */
  28960. var reFlags = /\w*$/;
  28961. /** Used to detect host constructors (Safari). */
  28962. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  28963. /** Used to detect unsigned integer values. */
  28964. var reIsUint = /^(?:0|[1-9]\d*)$/;
  28965. /** Used to identify `toStringTag` values supported by `_.clone`. */
  28966. var cloneableTags = {};
  28967. cloneableTags[argsTag] = cloneableTags[arrayTag] =
  28968. cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
  28969. cloneableTags[boolTag] = cloneableTags[dateTag] =
  28970. cloneableTags[float32Tag] = cloneableTags[float64Tag] =
  28971. cloneableTags[int8Tag] = cloneableTags[int16Tag] =
  28972. cloneableTags[int32Tag] = cloneableTags[mapTag] =
  28973. cloneableTags[numberTag] = cloneableTags[objectTag] =
  28974. cloneableTags[regexpTag] = cloneableTags[setTag] =
  28975. cloneableTags[stringTag] = cloneableTags[symbolTag] =
  28976. cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
  28977. cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
  28978. cloneableTags[errorTag] = cloneableTags[funcTag] =
  28979. cloneableTags[weakMapTag] = false;
  28980. /** Detect free variable `global` from Node.js. */
  28981. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  28982. /** Detect free variable `self`. */
  28983. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  28984. /** Used as a reference to the global object. */
  28985. var root = freeGlobal || freeSelf || Function('return this')();
  28986. /** Detect free variable `exports`. */
  28987. var freeExports = true && exports && !exports.nodeType && exports;
  28988. /** Detect free variable `module`. */
  28989. var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
  28990. /** Detect the popular CommonJS extension `module.exports`. */
  28991. var moduleExports = freeModule && freeModule.exports === freeExports;
  28992. /**
  28993. * Adds the key-value `pair` to `map`.
  28994. *
  28995. * @private
  28996. * @param {Object} map The map to modify.
  28997. * @param {Array} pair The key-value pair to add.
  28998. * @returns {Object} Returns `map`.
  28999. */
  29000. function addMapEntry(map, pair) {
  29001. // Don't return `map.set` because it's not chainable in IE 11.
  29002. map.set(pair[0], pair[1]);
  29003. return map;
  29004. }
  29005. /**
  29006. * Adds `value` to `set`.
  29007. *
  29008. * @private
  29009. * @param {Object} set The set to modify.
  29010. * @param {*} value The value to add.
  29011. * @returns {Object} Returns `set`.
  29012. */
  29013. function addSetEntry(set, value) {
  29014. // Don't return `set.add` because it's not chainable in IE 11.
  29015. set.add(value);
  29016. return set;
  29017. }
  29018. /**
  29019. * A specialized version of `_.forEach` for arrays without support for
  29020. * iteratee shorthands.
  29021. *
  29022. * @private
  29023. * @param {Array} [array] The array to iterate over.
  29024. * @param {Function} iteratee The function invoked per iteration.
  29025. * @returns {Array} Returns `array`.
  29026. */
  29027. function arrayEach(array, iteratee) {
  29028. var index = -1,
  29029. length = array ? array.length : 0;
  29030. while (++index < length) {
  29031. if (iteratee(array[index], index, array) === false) {
  29032. break;
  29033. }
  29034. }
  29035. return array;
  29036. }
  29037. /**
  29038. * Appends the elements of `values` to `array`.
  29039. *
  29040. * @private
  29041. * @param {Array} array The array to modify.
  29042. * @param {Array} values The values to append.
  29043. * @returns {Array} Returns `array`.
  29044. */
  29045. function arrayPush(array, values) {
  29046. var index = -1,
  29047. length = values.length,
  29048. offset = array.length;
  29049. while (++index < length) {
  29050. array[offset + index] = values[index];
  29051. }
  29052. return array;
  29053. }
  29054. /**
  29055. * A specialized version of `_.reduce` for arrays without support for
  29056. * iteratee shorthands.
  29057. *
  29058. * @private
  29059. * @param {Array} [array] The array to iterate over.
  29060. * @param {Function} iteratee The function invoked per iteration.
  29061. * @param {*} [accumulator] The initial value.
  29062. * @param {boolean} [initAccum] Specify using the first element of `array` as
  29063. * the initial value.
  29064. * @returns {*} Returns the accumulated value.
  29065. */
  29066. function arrayReduce(array, iteratee, accumulator, initAccum) {
  29067. var index = -1,
  29068. length = array ? array.length : 0;
  29069. if (initAccum && length) {
  29070. accumulator = array[++index];
  29071. }
  29072. while (++index < length) {
  29073. accumulator = iteratee(accumulator, array[index], index, array);
  29074. }
  29075. return accumulator;
  29076. }
  29077. /**
  29078. * The base implementation of `_.times` without support for iteratee shorthands
  29079. * or max array length checks.
  29080. *
  29081. * @private
  29082. * @param {number} n The number of times to invoke `iteratee`.
  29083. * @param {Function} iteratee The function invoked per iteration.
  29084. * @returns {Array} Returns the array of results.
  29085. */
  29086. function baseTimes(n, iteratee) {
  29087. var index = -1,
  29088. result = Array(n);
  29089. while (++index < n) {
  29090. result[index] = iteratee(index);
  29091. }
  29092. return result;
  29093. }
  29094. /**
  29095. * Gets the value at `key` of `object`.
  29096. *
  29097. * @private
  29098. * @param {Object} [object] The object to query.
  29099. * @param {string} key The key of the property to get.
  29100. * @returns {*} Returns the property value.
  29101. */
  29102. function getValue(object, key) {
  29103. return object == null ? undefined : object[key];
  29104. }
  29105. /**
  29106. * Checks if `value` is a host object in IE < 9.
  29107. *
  29108. * @private
  29109. * @param {*} value The value to check.
  29110. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  29111. */
  29112. function isHostObject(value) {
  29113. // Many host objects are `Object` objects that can coerce to strings
  29114. // despite having improperly defined `toString` methods.
  29115. var result = false;
  29116. if (value != null && typeof value.toString != 'function') {
  29117. try {
  29118. result = !!(value + '');
  29119. } catch (e) {}
  29120. }
  29121. return result;
  29122. }
  29123. /**
  29124. * Converts `map` to its key-value pairs.
  29125. *
  29126. * @private
  29127. * @param {Object} map The map to convert.
  29128. * @returns {Array} Returns the key-value pairs.
  29129. */
  29130. function mapToArray(map) {
  29131. var index = -1,
  29132. result = Array(map.size);
  29133. map.forEach(function(value, key) {
  29134. result[++index] = [key, value];
  29135. });
  29136. return result;
  29137. }
  29138. /**
  29139. * Creates a unary function that invokes `func` with its argument transformed.
  29140. *
  29141. * @private
  29142. * @param {Function} func The function to wrap.
  29143. * @param {Function} transform The argument transform.
  29144. * @returns {Function} Returns the new function.
  29145. */
  29146. function overArg(func, transform) {
  29147. return function(arg) {
  29148. return func(transform(arg));
  29149. };
  29150. }
  29151. /**
  29152. * Converts `set` to an array of its values.
  29153. *
  29154. * @private
  29155. * @param {Object} set The set to convert.
  29156. * @returns {Array} Returns the values.
  29157. */
  29158. function setToArray(set) {
  29159. var index = -1,
  29160. result = Array(set.size);
  29161. set.forEach(function(value) {
  29162. result[++index] = value;
  29163. });
  29164. return result;
  29165. }
  29166. /** Used for built-in method references. */
  29167. var arrayProto = Array.prototype,
  29168. funcProto = Function.prototype,
  29169. objectProto = Object.prototype;
  29170. /** Used to detect overreaching core-js shims. */
  29171. var coreJsData = root['__core-js_shared__'];
  29172. /** Used to detect methods masquerading as native. */
  29173. var maskSrcKey = (function() {
  29174. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  29175. return uid ? ('Symbol(src)_1.' + uid) : '';
  29176. }());
  29177. /** Used to resolve the decompiled source of functions. */
  29178. var funcToString = funcProto.toString;
  29179. /** Used to check objects for own properties. */
  29180. var hasOwnProperty = objectProto.hasOwnProperty;
  29181. /**
  29182. * Used to resolve the
  29183. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  29184. * of values.
  29185. */
  29186. var objectToString = objectProto.toString;
  29187. /** Used to detect if a method is native. */
  29188. var reIsNative = RegExp('^' +
  29189. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  29190. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  29191. );
  29192. /** Built-in value references. */
  29193. var Buffer = moduleExports ? root.Buffer : undefined,
  29194. Symbol = root.Symbol,
  29195. Uint8Array = root.Uint8Array,
  29196. getPrototype = overArg(Object.getPrototypeOf, Object),
  29197. objectCreate = Object.create,
  29198. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  29199. splice = arrayProto.splice;
  29200. /* Built-in method references for those with the same name as other `lodash` methods. */
  29201. var nativeGetSymbols = Object.getOwnPropertySymbols,
  29202. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  29203. nativeKeys = overArg(Object.keys, Object);
  29204. /* Built-in method references that are verified to be native. */
  29205. var DataView = getNative(root, 'DataView'),
  29206. Map = getNative(root, 'Map'),
  29207. Promise = getNative(root, 'Promise'),
  29208. Set = getNative(root, 'Set'),
  29209. WeakMap = getNative(root, 'WeakMap'),
  29210. nativeCreate = getNative(Object, 'create');
  29211. /** Used to detect maps, sets, and weakmaps. */
  29212. var dataViewCtorString = toSource(DataView),
  29213. mapCtorString = toSource(Map),
  29214. promiseCtorString = toSource(Promise),
  29215. setCtorString = toSource(Set),
  29216. weakMapCtorString = toSource(WeakMap);
  29217. /** Used to convert symbols to primitives and strings. */
  29218. var symbolProto = Symbol ? Symbol.prototype : undefined,
  29219. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  29220. /**
  29221. * Creates a hash object.
  29222. *
  29223. * @private
  29224. * @constructor
  29225. * @param {Array} [entries] The key-value pairs to cache.
  29226. */
  29227. function Hash(entries) {
  29228. var index = -1,
  29229. length = entries ? entries.length : 0;
  29230. this.clear();
  29231. while (++index < length) {
  29232. var entry = entries[index];
  29233. this.set(entry[0], entry[1]);
  29234. }
  29235. }
  29236. /**
  29237. * Removes all key-value entries from the hash.
  29238. *
  29239. * @private
  29240. * @name clear
  29241. * @memberOf Hash
  29242. */
  29243. function hashClear() {
  29244. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  29245. }
  29246. /**
  29247. * Removes `key` and its value from the hash.
  29248. *
  29249. * @private
  29250. * @name delete
  29251. * @memberOf Hash
  29252. * @param {Object} hash The hash to modify.
  29253. * @param {string} key The key of the value to remove.
  29254. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  29255. */
  29256. function hashDelete(key) {
  29257. return this.has(key) && delete this.__data__[key];
  29258. }
  29259. /**
  29260. * Gets the hash value for `key`.
  29261. *
  29262. * @private
  29263. * @name get
  29264. * @memberOf Hash
  29265. * @param {string} key The key of the value to get.
  29266. * @returns {*} Returns the entry value.
  29267. */
  29268. function hashGet(key) {
  29269. var data = this.__data__;
  29270. if (nativeCreate) {
  29271. var result = data[key];
  29272. return result === HASH_UNDEFINED ? undefined : result;
  29273. }
  29274. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  29275. }
  29276. /**
  29277. * Checks if a hash value for `key` exists.
  29278. *
  29279. * @private
  29280. * @name has
  29281. * @memberOf Hash
  29282. * @param {string} key The key of the entry to check.
  29283. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  29284. */
  29285. function hashHas(key) {
  29286. var data = this.__data__;
  29287. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  29288. }
  29289. /**
  29290. * Sets the hash `key` to `value`.
  29291. *
  29292. * @private
  29293. * @name set
  29294. * @memberOf Hash
  29295. * @param {string} key The key of the value to set.
  29296. * @param {*} value The value to set.
  29297. * @returns {Object} Returns the hash instance.
  29298. */
  29299. function hashSet(key, value) {
  29300. var data = this.__data__;
  29301. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  29302. return this;
  29303. }
  29304. // Add methods to `Hash`.
  29305. Hash.prototype.clear = hashClear;
  29306. Hash.prototype['delete'] = hashDelete;
  29307. Hash.prototype.get = hashGet;
  29308. Hash.prototype.has = hashHas;
  29309. Hash.prototype.set = hashSet;
  29310. /**
  29311. * Creates an list cache object.
  29312. *
  29313. * @private
  29314. * @constructor
  29315. * @param {Array} [entries] The key-value pairs to cache.
  29316. */
  29317. function ListCache(entries) {
  29318. var index = -1,
  29319. length = entries ? entries.length : 0;
  29320. this.clear();
  29321. while (++index < length) {
  29322. var entry = entries[index];
  29323. this.set(entry[0], entry[1]);
  29324. }
  29325. }
  29326. /**
  29327. * Removes all key-value entries from the list cache.
  29328. *
  29329. * @private
  29330. * @name clear
  29331. * @memberOf ListCache
  29332. */
  29333. function listCacheClear() {
  29334. this.__data__ = [];
  29335. }
  29336. /**
  29337. * Removes `key` and its value from the list cache.
  29338. *
  29339. * @private
  29340. * @name delete
  29341. * @memberOf ListCache
  29342. * @param {string} key The key of the value to remove.
  29343. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  29344. */
  29345. function listCacheDelete(key) {
  29346. var data = this.__data__,
  29347. index = assocIndexOf(data, key);
  29348. if (index < 0) {
  29349. return false;
  29350. }
  29351. var lastIndex = data.length - 1;
  29352. if (index == lastIndex) {
  29353. data.pop();
  29354. } else {
  29355. splice.call(data, index, 1);
  29356. }
  29357. return true;
  29358. }
  29359. /**
  29360. * Gets the list cache value for `key`.
  29361. *
  29362. * @private
  29363. * @name get
  29364. * @memberOf ListCache
  29365. * @param {string} key The key of the value to get.
  29366. * @returns {*} Returns the entry value.
  29367. */
  29368. function listCacheGet(key) {
  29369. var data = this.__data__,
  29370. index = assocIndexOf(data, key);
  29371. return index < 0 ? undefined : data[index][1];
  29372. }
  29373. /**
  29374. * Checks if a list cache value for `key` exists.
  29375. *
  29376. * @private
  29377. * @name has
  29378. * @memberOf ListCache
  29379. * @param {string} key The key of the entry to check.
  29380. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  29381. */
  29382. function listCacheHas(key) {
  29383. return assocIndexOf(this.__data__, key) > -1;
  29384. }
  29385. /**
  29386. * Sets the list cache `key` to `value`.
  29387. *
  29388. * @private
  29389. * @name set
  29390. * @memberOf ListCache
  29391. * @param {string} key The key of the value to set.
  29392. * @param {*} value The value to set.
  29393. * @returns {Object} Returns the list cache instance.
  29394. */
  29395. function listCacheSet(key, value) {
  29396. var data = this.__data__,
  29397. index = assocIndexOf(data, key);
  29398. if (index < 0) {
  29399. data.push([key, value]);
  29400. } else {
  29401. data[index][1] = value;
  29402. }
  29403. return this;
  29404. }
  29405. // Add methods to `ListCache`.
  29406. ListCache.prototype.clear = listCacheClear;
  29407. ListCache.prototype['delete'] = listCacheDelete;
  29408. ListCache.prototype.get = listCacheGet;
  29409. ListCache.prototype.has = listCacheHas;
  29410. ListCache.prototype.set = listCacheSet;
  29411. /**
  29412. * Creates a map cache object to store key-value pairs.
  29413. *
  29414. * @private
  29415. * @constructor
  29416. * @param {Array} [entries] The key-value pairs to cache.
  29417. */
  29418. function MapCache(entries) {
  29419. var index = -1,
  29420. length = entries ? entries.length : 0;
  29421. this.clear();
  29422. while (++index < length) {
  29423. var entry = entries[index];
  29424. this.set(entry[0], entry[1]);
  29425. }
  29426. }
  29427. /**
  29428. * Removes all key-value entries from the map.
  29429. *
  29430. * @private
  29431. * @name clear
  29432. * @memberOf MapCache
  29433. */
  29434. function mapCacheClear() {
  29435. this.__data__ = {
  29436. 'hash': new Hash,
  29437. 'map': new (Map || ListCache),
  29438. 'string': new Hash
  29439. };
  29440. }
  29441. /**
  29442. * Removes `key` and its value from the map.
  29443. *
  29444. * @private
  29445. * @name delete
  29446. * @memberOf MapCache
  29447. * @param {string} key The key of the value to remove.
  29448. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  29449. */
  29450. function mapCacheDelete(key) {
  29451. return getMapData(this, key)['delete'](key);
  29452. }
  29453. /**
  29454. * Gets the map value for `key`.
  29455. *
  29456. * @private
  29457. * @name get
  29458. * @memberOf MapCache
  29459. * @param {string} key The key of the value to get.
  29460. * @returns {*} Returns the entry value.
  29461. */
  29462. function mapCacheGet(key) {
  29463. return getMapData(this, key).get(key);
  29464. }
  29465. /**
  29466. * Checks if a map value for `key` exists.
  29467. *
  29468. * @private
  29469. * @name has
  29470. * @memberOf MapCache
  29471. * @param {string} key The key of the entry to check.
  29472. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  29473. */
  29474. function mapCacheHas(key) {
  29475. return getMapData(this, key).has(key);
  29476. }
  29477. /**
  29478. * Sets the map `key` to `value`.
  29479. *
  29480. * @private
  29481. * @name set
  29482. * @memberOf MapCache
  29483. * @param {string} key The key of the value to set.
  29484. * @param {*} value The value to set.
  29485. * @returns {Object} Returns the map cache instance.
  29486. */
  29487. function mapCacheSet(key, value) {
  29488. getMapData(this, key).set(key, value);
  29489. return this;
  29490. }
  29491. // Add methods to `MapCache`.
  29492. MapCache.prototype.clear = mapCacheClear;
  29493. MapCache.prototype['delete'] = mapCacheDelete;
  29494. MapCache.prototype.get = mapCacheGet;
  29495. MapCache.prototype.has = mapCacheHas;
  29496. MapCache.prototype.set = mapCacheSet;
  29497. /**
  29498. * Creates a stack cache object to store key-value pairs.
  29499. *
  29500. * @private
  29501. * @constructor
  29502. * @param {Array} [entries] The key-value pairs to cache.
  29503. */
  29504. function Stack(entries) {
  29505. this.__data__ = new ListCache(entries);
  29506. }
  29507. /**
  29508. * Removes all key-value entries from the stack.
  29509. *
  29510. * @private
  29511. * @name clear
  29512. * @memberOf Stack
  29513. */
  29514. function stackClear() {
  29515. this.__data__ = new ListCache;
  29516. }
  29517. /**
  29518. * Removes `key` and its value from the stack.
  29519. *
  29520. * @private
  29521. * @name delete
  29522. * @memberOf Stack
  29523. * @param {string} key The key of the value to remove.
  29524. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  29525. */
  29526. function stackDelete(key) {
  29527. return this.__data__['delete'](key);
  29528. }
  29529. /**
  29530. * Gets the stack value for `key`.
  29531. *
  29532. * @private
  29533. * @name get
  29534. * @memberOf Stack
  29535. * @param {string} key The key of the value to get.
  29536. * @returns {*} Returns the entry value.
  29537. */
  29538. function stackGet(key) {
  29539. return this.__data__.get(key);
  29540. }
  29541. /**
  29542. * Checks if a stack value for `key` exists.
  29543. *
  29544. * @private
  29545. * @name has
  29546. * @memberOf Stack
  29547. * @param {string} key The key of the entry to check.
  29548. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  29549. */
  29550. function stackHas(key) {
  29551. return this.__data__.has(key);
  29552. }
  29553. /**
  29554. * Sets the stack `key` to `value`.
  29555. *
  29556. * @private
  29557. * @name set
  29558. * @memberOf Stack
  29559. * @param {string} key The key of the value to set.
  29560. * @param {*} value The value to set.
  29561. * @returns {Object} Returns the stack cache instance.
  29562. */
  29563. function stackSet(key, value) {
  29564. var cache = this.__data__;
  29565. if (cache instanceof ListCache) {
  29566. var pairs = cache.__data__;
  29567. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  29568. pairs.push([key, value]);
  29569. return this;
  29570. }
  29571. cache = this.__data__ = new MapCache(pairs);
  29572. }
  29573. cache.set(key, value);
  29574. return this;
  29575. }
  29576. // Add methods to `Stack`.
  29577. Stack.prototype.clear = stackClear;
  29578. Stack.prototype['delete'] = stackDelete;
  29579. Stack.prototype.get = stackGet;
  29580. Stack.prototype.has = stackHas;
  29581. Stack.prototype.set = stackSet;
  29582. /**
  29583. * Creates an array of the enumerable property names of the array-like `value`.
  29584. *
  29585. * @private
  29586. * @param {*} value The value to query.
  29587. * @param {boolean} inherited Specify returning inherited property names.
  29588. * @returns {Array} Returns the array of property names.
  29589. */
  29590. function arrayLikeKeys(value, inherited) {
  29591. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  29592. // Safari 9 makes `arguments.length` enumerable in strict mode.
  29593. var result = (isArray(value) || isArguments(value))
  29594. ? baseTimes(value.length, String)
  29595. : [];
  29596. var length = result.length,
  29597. skipIndexes = !!length;
  29598. for (var key in value) {
  29599. if ((inherited || hasOwnProperty.call(value, key)) &&
  29600. !(skipIndexes && (key == 'length' || isIndex(key, length)))) {
  29601. result.push(key);
  29602. }
  29603. }
  29604. return result;
  29605. }
  29606. /**
  29607. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  29608. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  29609. * for equality comparisons.
  29610. *
  29611. * @private
  29612. * @param {Object} object The object to modify.
  29613. * @param {string} key The key of the property to assign.
  29614. * @param {*} value The value to assign.
  29615. */
  29616. function assignValue(object, key, value) {
  29617. var objValue = object[key];
  29618. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  29619. (value === undefined && !(key in object))) {
  29620. object[key] = value;
  29621. }
  29622. }
  29623. /**
  29624. * Gets the index at which the `key` is found in `array` of key-value pairs.
  29625. *
  29626. * @private
  29627. * @param {Array} array The array to inspect.
  29628. * @param {*} key The key to search for.
  29629. * @returns {number} Returns the index of the matched value, else `-1`.
  29630. */
  29631. function assocIndexOf(array, key) {
  29632. var length = array.length;
  29633. while (length--) {
  29634. if (eq(array[length][0], key)) {
  29635. return length;
  29636. }
  29637. }
  29638. return -1;
  29639. }
  29640. /**
  29641. * The base implementation of `_.assign` without support for multiple sources
  29642. * or `customizer` functions.
  29643. *
  29644. * @private
  29645. * @param {Object} object The destination object.
  29646. * @param {Object} source The source object.
  29647. * @returns {Object} Returns `object`.
  29648. */
  29649. function baseAssign(object, source) {
  29650. return object && copyObject(source, keys(source), object);
  29651. }
  29652. /**
  29653. * The base implementation of `_.clone` and `_.cloneDeep` which tracks
  29654. * traversed objects.
  29655. *
  29656. * @private
  29657. * @param {*} value The value to clone.
  29658. * @param {boolean} [isDeep] Specify a deep clone.
  29659. * @param {boolean} [isFull] Specify a clone including symbols.
  29660. * @param {Function} [customizer] The function to customize cloning.
  29661. * @param {string} [key] The key of `value`.
  29662. * @param {Object} [object] The parent object of `value`.
  29663. * @param {Object} [stack] Tracks traversed objects and their clone counterparts.
  29664. * @returns {*} Returns the cloned value.
  29665. */
  29666. function baseClone(value, isDeep, isFull, customizer, key, object, stack) {
  29667. var result;
  29668. if (customizer) {
  29669. result = object ? customizer(value, key, object, stack) : customizer(value);
  29670. }
  29671. if (result !== undefined) {
  29672. return result;
  29673. }
  29674. if (!isObject(value)) {
  29675. return value;
  29676. }
  29677. var isArr = isArray(value);
  29678. if (isArr) {
  29679. result = initCloneArray(value);
  29680. if (!isDeep) {
  29681. return copyArray(value, result);
  29682. }
  29683. } else {
  29684. var tag = getTag(value),
  29685. isFunc = tag == funcTag || tag == genTag;
  29686. if (isBuffer(value)) {
  29687. return cloneBuffer(value, isDeep);
  29688. }
  29689. if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
  29690. if (isHostObject(value)) {
  29691. return object ? value : {};
  29692. }
  29693. result = initCloneObject(isFunc ? {} : value);
  29694. if (!isDeep) {
  29695. return copySymbols(value, baseAssign(result, value));
  29696. }
  29697. } else {
  29698. if (!cloneableTags[tag]) {
  29699. return object ? value : {};
  29700. }
  29701. result = initCloneByTag(value, tag, baseClone, isDeep);
  29702. }
  29703. }
  29704. // Check for circular references and return its corresponding clone.
  29705. stack || (stack = new Stack);
  29706. var stacked = stack.get(value);
  29707. if (stacked) {
  29708. return stacked;
  29709. }
  29710. stack.set(value, result);
  29711. if (!isArr) {
  29712. var props = isFull ? getAllKeys(value) : keys(value);
  29713. }
  29714. arrayEach(props || value, function(subValue, key) {
  29715. if (props) {
  29716. key = subValue;
  29717. subValue = value[key];
  29718. }
  29719. // Recursively populate clone (susceptible to call stack limits).
  29720. assignValue(result, key, baseClone(subValue, isDeep, isFull, customizer, key, value, stack));
  29721. });
  29722. return result;
  29723. }
  29724. /**
  29725. * The base implementation of `_.create` without support for assigning
  29726. * properties to the created object.
  29727. *
  29728. * @private
  29729. * @param {Object} prototype The object to inherit from.
  29730. * @returns {Object} Returns the new object.
  29731. */
  29732. function baseCreate(proto) {
  29733. return isObject(proto) ? objectCreate(proto) : {};
  29734. }
  29735. /**
  29736. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  29737. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  29738. * symbols of `object`.
  29739. *
  29740. * @private
  29741. * @param {Object} object The object to query.
  29742. * @param {Function} keysFunc The function to get the keys of `object`.
  29743. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  29744. * @returns {Array} Returns the array of property names and symbols.
  29745. */
  29746. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  29747. var result = keysFunc(object);
  29748. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  29749. }
  29750. /**
  29751. * The base implementation of `getTag`.
  29752. *
  29753. * @private
  29754. * @param {*} value The value to query.
  29755. * @returns {string} Returns the `toStringTag`.
  29756. */
  29757. function baseGetTag(value) {
  29758. return objectToString.call(value);
  29759. }
  29760. /**
  29761. * The base implementation of `_.isNative` without bad shim checks.
  29762. *
  29763. * @private
  29764. * @param {*} value The value to check.
  29765. * @returns {boolean} Returns `true` if `value` is a native function,
  29766. * else `false`.
  29767. */
  29768. function baseIsNative(value) {
  29769. if (!isObject(value) || isMasked(value)) {
  29770. return false;
  29771. }
  29772. var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  29773. return pattern.test(toSource(value));
  29774. }
  29775. /**
  29776. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  29777. *
  29778. * @private
  29779. * @param {Object} object The object to query.
  29780. * @returns {Array} Returns the array of property names.
  29781. */
  29782. function baseKeys(object) {
  29783. if (!isPrototype(object)) {
  29784. return nativeKeys(object);
  29785. }
  29786. var result = [];
  29787. for (var key in Object(object)) {
  29788. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  29789. result.push(key);
  29790. }
  29791. }
  29792. return result;
  29793. }
  29794. /**
  29795. * Creates a clone of `buffer`.
  29796. *
  29797. * @private
  29798. * @param {Buffer} buffer The buffer to clone.
  29799. * @param {boolean} [isDeep] Specify a deep clone.
  29800. * @returns {Buffer} Returns the cloned buffer.
  29801. */
  29802. function cloneBuffer(buffer, isDeep) {
  29803. if (isDeep) {
  29804. return buffer.slice();
  29805. }
  29806. var result = new buffer.constructor(buffer.length);
  29807. buffer.copy(result);
  29808. return result;
  29809. }
  29810. /**
  29811. * Creates a clone of `arrayBuffer`.
  29812. *
  29813. * @private
  29814. * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
  29815. * @returns {ArrayBuffer} Returns the cloned array buffer.
  29816. */
  29817. function cloneArrayBuffer(arrayBuffer) {
  29818. var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
  29819. new Uint8Array(result).set(new Uint8Array(arrayBuffer));
  29820. return result;
  29821. }
  29822. /**
  29823. * Creates a clone of `dataView`.
  29824. *
  29825. * @private
  29826. * @param {Object} dataView The data view to clone.
  29827. * @param {boolean} [isDeep] Specify a deep clone.
  29828. * @returns {Object} Returns the cloned data view.
  29829. */
  29830. function cloneDataView(dataView, isDeep) {
  29831. var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
  29832. return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
  29833. }
  29834. /**
  29835. * Creates a clone of `map`.
  29836. *
  29837. * @private
  29838. * @param {Object} map The map to clone.
  29839. * @param {Function} cloneFunc The function to clone values.
  29840. * @param {boolean} [isDeep] Specify a deep clone.
  29841. * @returns {Object} Returns the cloned map.
  29842. */
  29843. function cloneMap(map, isDeep, cloneFunc) {
  29844. var array = isDeep ? cloneFunc(mapToArray(map), true) : mapToArray(map);
  29845. return arrayReduce(array, addMapEntry, new map.constructor);
  29846. }
  29847. /**
  29848. * Creates a clone of `regexp`.
  29849. *
  29850. * @private
  29851. * @param {Object} regexp The regexp to clone.
  29852. * @returns {Object} Returns the cloned regexp.
  29853. */
  29854. function cloneRegExp(regexp) {
  29855. var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
  29856. result.lastIndex = regexp.lastIndex;
  29857. return result;
  29858. }
  29859. /**
  29860. * Creates a clone of `set`.
  29861. *
  29862. * @private
  29863. * @param {Object} set The set to clone.
  29864. * @param {Function} cloneFunc The function to clone values.
  29865. * @param {boolean} [isDeep] Specify a deep clone.
  29866. * @returns {Object} Returns the cloned set.
  29867. */
  29868. function cloneSet(set, isDeep, cloneFunc) {
  29869. var array = isDeep ? cloneFunc(setToArray(set), true) : setToArray(set);
  29870. return arrayReduce(array, addSetEntry, new set.constructor);
  29871. }
  29872. /**
  29873. * Creates a clone of the `symbol` object.
  29874. *
  29875. * @private
  29876. * @param {Object} symbol The symbol object to clone.
  29877. * @returns {Object} Returns the cloned symbol object.
  29878. */
  29879. function cloneSymbol(symbol) {
  29880. return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
  29881. }
  29882. /**
  29883. * Creates a clone of `typedArray`.
  29884. *
  29885. * @private
  29886. * @param {Object} typedArray The typed array to clone.
  29887. * @param {boolean} [isDeep] Specify a deep clone.
  29888. * @returns {Object} Returns the cloned typed array.
  29889. */
  29890. function cloneTypedArray(typedArray, isDeep) {
  29891. var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  29892. return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
  29893. }
  29894. /**
  29895. * Copies the values of `source` to `array`.
  29896. *
  29897. * @private
  29898. * @param {Array} source The array to copy values from.
  29899. * @param {Array} [array=[]] The array to copy values to.
  29900. * @returns {Array} Returns `array`.
  29901. */
  29902. function copyArray(source, array) {
  29903. var index = -1,
  29904. length = source.length;
  29905. array || (array = Array(length));
  29906. while (++index < length) {
  29907. array[index] = source[index];
  29908. }
  29909. return array;
  29910. }
  29911. /**
  29912. * Copies properties of `source` to `object`.
  29913. *
  29914. * @private
  29915. * @param {Object} source The object to copy properties from.
  29916. * @param {Array} props The property identifiers to copy.
  29917. * @param {Object} [object={}] The object to copy properties to.
  29918. * @param {Function} [customizer] The function to customize copied values.
  29919. * @returns {Object} Returns `object`.
  29920. */
  29921. function copyObject(source, props, object, customizer) {
  29922. object || (object = {});
  29923. var index = -1,
  29924. length = props.length;
  29925. while (++index < length) {
  29926. var key = props[index];
  29927. var newValue = customizer
  29928. ? customizer(object[key], source[key], key, object, source)
  29929. : undefined;
  29930. assignValue(object, key, newValue === undefined ? source[key] : newValue);
  29931. }
  29932. return object;
  29933. }
  29934. /**
  29935. * Copies own symbol properties of `source` to `object`.
  29936. *
  29937. * @private
  29938. * @param {Object} source The object to copy symbols from.
  29939. * @param {Object} [object={}] The object to copy symbols to.
  29940. * @returns {Object} Returns `object`.
  29941. */
  29942. function copySymbols(source, object) {
  29943. return copyObject(source, getSymbols(source), object);
  29944. }
  29945. /**
  29946. * Creates an array of own enumerable property names and symbols of `object`.
  29947. *
  29948. * @private
  29949. * @param {Object} object The object to query.
  29950. * @returns {Array} Returns the array of property names and symbols.
  29951. */
  29952. function getAllKeys(object) {
  29953. return baseGetAllKeys(object, keys, getSymbols);
  29954. }
  29955. /**
  29956. * Gets the data for `map`.
  29957. *
  29958. * @private
  29959. * @param {Object} map The map to query.
  29960. * @param {string} key The reference key.
  29961. * @returns {*} Returns the map data.
  29962. */
  29963. function getMapData(map, key) {
  29964. var data = map.__data__;
  29965. return isKeyable(key)
  29966. ? data[typeof key == 'string' ? 'string' : 'hash']
  29967. : data.map;
  29968. }
  29969. /**
  29970. * Gets the native function at `key` of `object`.
  29971. *
  29972. * @private
  29973. * @param {Object} object The object to query.
  29974. * @param {string} key The key of the method to get.
  29975. * @returns {*} Returns the function if it's native, else `undefined`.
  29976. */
  29977. function getNative(object, key) {
  29978. var value = getValue(object, key);
  29979. return baseIsNative(value) ? value : undefined;
  29980. }
  29981. /**
  29982. * Creates an array of the own enumerable symbol properties of `object`.
  29983. *
  29984. * @private
  29985. * @param {Object} object The object to query.
  29986. * @returns {Array} Returns the array of symbols.
  29987. */
  29988. var getSymbols = nativeGetSymbols ? overArg(nativeGetSymbols, Object) : stubArray;
  29989. /**
  29990. * Gets the `toStringTag` of `value`.
  29991. *
  29992. * @private
  29993. * @param {*} value The value to query.
  29994. * @returns {string} Returns the `toStringTag`.
  29995. */
  29996. var getTag = baseGetTag;
  29997. // Fallback for data views, maps, sets, and weak maps in IE 11,
  29998. // for data views in Edge < 14, and promises in Node.js.
  29999. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  30000. (Map && getTag(new Map) != mapTag) ||
  30001. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  30002. (Set && getTag(new Set) != setTag) ||
  30003. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  30004. getTag = function(value) {
  30005. var result = objectToString.call(value),
  30006. Ctor = result == objectTag ? value.constructor : undefined,
  30007. ctorString = Ctor ? toSource(Ctor) : undefined;
  30008. if (ctorString) {
  30009. switch (ctorString) {
  30010. case dataViewCtorString: return dataViewTag;
  30011. case mapCtorString: return mapTag;
  30012. case promiseCtorString: return promiseTag;
  30013. case setCtorString: return setTag;
  30014. case weakMapCtorString: return weakMapTag;
  30015. }
  30016. }
  30017. return result;
  30018. };
  30019. }
  30020. /**
  30021. * Initializes an array clone.
  30022. *
  30023. * @private
  30024. * @param {Array} array The array to clone.
  30025. * @returns {Array} Returns the initialized clone.
  30026. */
  30027. function initCloneArray(array) {
  30028. var length = array.length,
  30029. result = array.constructor(length);
  30030. // Add properties assigned by `RegExp#exec`.
  30031. if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
  30032. result.index = array.index;
  30033. result.input = array.input;
  30034. }
  30035. return result;
  30036. }
  30037. /**
  30038. * Initializes an object clone.
  30039. *
  30040. * @private
  30041. * @param {Object} object The object to clone.
  30042. * @returns {Object} Returns the initialized clone.
  30043. */
  30044. function initCloneObject(object) {
  30045. return (typeof object.constructor == 'function' && !isPrototype(object))
  30046. ? baseCreate(getPrototype(object))
  30047. : {};
  30048. }
  30049. /**
  30050. * Initializes an object clone based on its `toStringTag`.
  30051. *
  30052. * **Note:** This function only supports cloning values with tags of
  30053. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  30054. *
  30055. * @private
  30056. * @param {Object} object The object to clone.
  30057. * @param {string} tag The `toStringTag` of the object to clone.
  30058. * @param {Function} cloneFunc The function to clone values.
  30059. * @param {boolean} [isDeep] Specify a deep clone.
  30060. * @returns {Object} Returns the initialized clone.
  30061. */
  30062. function initCloneByTag(object, tag, cloneFunc, isDeep) {
  30063. var Ctor = object.constructor;
  30064. switch (tag) {
  30065. case arrayBufferTag:
  30066. return cloneArrayBuffer(object);
  30067. case boolTag:
  30068. case dateTag:
  30069. return new Ctor(+object);
  30070. case dataViewTag:
  30071. return cloneDataView(object, isDeep);
  30072. case float32Tag: case float64Tag:
  30073. case int8Tag: case int16Tag: case int32Tag:
  30074. case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
  30075. return cloneTypedArray(object, isDeep);
  30076. case mapTag:
  30077. return cloneMap(object, isDeep, cloneFunc);
  30078. case numberTag:
  30079. case stringTag:
  30080. return new Ctor(object);
  30081. case regexpTag:
  30082. return cloneRegExp(object);
  30083. case setTag:
  30084. return cloneSet(object, isDeep, cloneFunc);
  30085. case symbolTag:
  30086. return cloneSymbol(object);
  30087. }
  30088. }
  30089. /**
  30090. * Checks if `value` is a valid array-like index.
  30091. *
  30092. * @private
  30093. * @param {*} value The value to check.
  30094. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  30095. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  30096. */
  30097. function isIndex(value, length) {
  30098. length = length == null ? MAX_SAFE_INTEGER : length;
  30099. return !!length &&
  30100. (typeof value == 'number' || reIsUint.test(value)) &&
  30101. (value > -1 && value % 1 == 0 && value < length);
  30102. }
  30103. /**
  30104. * Checks if `value` is suitable for use as unique object key.
  30105. *
  30106. * @private
  30107. * @param {*} value The value to check.
  30108. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  30109. */
  30110. function isKeyable(value) {
  30111. var type = typeof value;
  30112. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  30113. ? (value !== '__proto__')
  30114. : (value === null);
  30115. }
  30116. /**
  30117. * Checks if `func` has its source masked.
  30118. *
  30119. * @private
  30120. * @param {Function} func The function to check.
  30121. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  30122. */
  30123. function isMasked(func) {
  30124. return !!maskSrcKey && (maskSrcKey in func);
  30125. }
  30126. /**
  30127. * Checks if `value` is likely a prototype object.
  30128. *
  30129. * @private
  30130. * @param {*} value The value to check.
  30131. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  30132. */
  30133. function isPrototype(value) {
  30134. var Ctor = value && value.constructor,
  30135. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  30136. return value === proto;
  30137. }
  30138. /**
  30139. * Converts `func` to its source code.
  30140. *
  30141. * @private
  30142. * @param {Function} func The function to process.
  30143. * @returns {string} Returns the source code.
  30144. */
  30145. function toSource(func) {
  30146. if (func != null) {
  30147. try {
  30148. return funcToString.call(func);
  30149. } catch (e) {}
  30150. try {
  30151. return (func + '');
  30152. } catch (e) {}
  30153. }
  30154. return '';
  30155. }
  30156. /**
  30157. * This method is like `_.clone` except that it recursively clones `value`.
  30158. *
  30159. * @static
  30160. * @memberOf _
  30161. * @since 1.0.0
  30162. * @category Lang
  30163. * @param {*} value The value to recursively clone.
  30164. * @returns {*} Returns the deep cloned value.
  30165. * @see _.clone
  30166. * @example
  30167. *
  30168. * var objects = [{ 'a': 1 }, { 'b': 2 }];
  30169. *
  30170. * var deep = _.cloneDeep(objects);
  30171. * console.log(deep[0] === objects[0]);
  30172. * // => false
  30173. */
  30174. function cloneDeep(value) {
  30175. return baseClone(value, true, true);
  30176. }
  30177. /**
  30178. * Performs a
  30179. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  30180. * comparison between two values to determine if they are equivalent.
  30181. *
  30182. * @static
  30183. * @memberOf _
  30184. * @since 4.0.0
  30185. * @category Lang
  30186. * @param {*} value The value to compare.
  30187. * @param {*} other The other value to compare.
  30188. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  30189. * @example
  30190. *
  30191. * var object = { 'a': 1 };
  30192. * var other = { 'a': 1 };
  30193. *
  30194. * _.eq(object, object);
  30195. * // => true
  30196. *
  30197. * _.eq(object, other);
  30198. * // => false
  30199. *
  30200. * _.eq('a', 'a');
  30201. * // => true
  30202. *
  30203. * _.eq('a', Object('a'));
  30204. * // => false
  30205. *
  30206. * _.eq(NaN, NaN);
  30207. * // => true
  30208. */
  30209. function eq(value, other) {
  30210. return value === other || (value !== value && other !== other);
  30211. }
  30212. /**
  30213. * Checks if `value` is likely an `arguments` object.
  30214. *
  30215. * @static
  30216. * @memberOf _
  30217. * @since 0.1.0
  30218. * @category Lang
  30219. * @param {*} value The value to check.
  30220. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  30221. * else `false`.
  30222. * @example
  30223. *
  30224. * _.isArguments(function() { return arguments; }());
  30225. * // => true
  30226. *
  30227. * _.isArguments([1, 2, 3]);
  30228. * // => false
  30229. */
  30230. function isArguments(value) {
  30231. // Safari 8.1 makes `arguments.callee` enumerable in strict mode.
  30232. return isArrayLikeObject(value) && hasOwnProperty.call(value, 'callee') &&
  30233. (!propertyIsEnumerable.call(value, 'callee') || objectToString.call(value) == argsTag);
  30234. }
  30235. /**
  30236. * Checks if `value` is classified as an `Array` object.
  30237. *
  30238. * @static
  30239. * @memberOf _
  30240. * @since 0.1.0
  30241. * @category Lang
  30242. * @param {*} value The value to check.
  30243. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  30244. * @example
  30245. *
  30246. * _.isArray([1, 2, 3]);
  30247. * // => true
  30248. *
  30249. * _.isArray(document.body.children);
  30250. * // => false
  30251. *
  30252. * _.isArray('abc');
  30253. * // => false
  30254. *
  30255. * _.isArray(_.noop);
  30256. * // => false
  30257. */
  30258. var isArray = Array.isArray;
  30259. /**
  30260. * Checks if `value` is array-like. A value is considered array-like if it's
  30261. * not a function and has a `value.length` that's an integer greater than or
  30262. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  30263. *
  30264. * @static
  30265. * @memberOf _
  30266. * @since 4.0.0
  30267. * @category Lang
  30268. * @param {*} value The value to check.
  30269. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  30270. * @example
  30271. *
  30272. * _.isArrayLike([1, 2, 3]);
  30273. * // => true
  30274. *
  30275. * _.isArrayLike(document.body.children);
  30276. * // => true
  30277. *
  30278. * _.isArrayLike('abc');
  30279. * // => true
  30280. *
  30281. * _.isArrayLike(_.noop);
  30282. * // => false
  30283. */
  30284. function isArrayLike(value) {
  30285. return value != null && isLength(value.length) && !isFunction(value);
  30286. }
  30287. /**
  30288. * This method is like `_.isArrayLike` except that it also checks if `value`
  30289. * is an object.
  30290. *
  30291. * @static
  30292. * @memberOf _
  30293. * @since 4.0.0
  30294. * @category Lang
  30295. * @param {*} value The value to check.
  30296. * @returns {boolean} Returns `true` if `value` is an array-like object,
  30297. * else `false`.
  30298. * @example
  30299. *
  30300. * _.isArrayLikeObject([1, 2, 3]);
  30301. * // => true
  30302. *
  30303. * _.isArrayLikeObject(document.body.children);
  30304. * // => true
  30305. *
  30306. * _.isArrayLikeObject('abc');
  30307. * // => false
  30308. *
  30309. * _.isArrayLikeObject(_.noop);
  30310. * // => false
  30311. */
  30312. function isArrayLikeObject(value) {
  30313. return isObjectLike(value) && isArrayLike(value);
  30314. }
  30315. /**
  30316. * Checks if `value` is a buffer.
  30317. *
  30318. * @static
  30319. * @memberOf _
  30320. * @since 4.3.0
  30321. * @category Lang
  30322. * @param {*} value The value to check.
  30323. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  30324. * @example
  30325. *
  30326. * _.isBuffer(new Buffer(2));
  30327. * // => true
  30328. *
  30329. * _.isBuffer(new Uint8Array(2));
  30330. * // => false
  30331. */
  30332. var isBuffer = nativeIsBuffer || stubFalse;
  30333. /**
  30334. * Checks if `value` is classified as a `Function` object.
  30335. *
  30336. * @static
  30337. * @memberOf _
  30338. * @since 0.1.0
  30339. * @category Lang
  30340. * @param {*} value The value to check.
  30341. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  30342. * @example
  30343. *
  30344. * _.isFunction(_);
  30345. * // => true
  30346. *
  30347. * _.isFunction(/abc/);
  30348. * // => false
  30349. */
  30350. function isFunction(value) {
  30351. // The use of `Object#toString` avoids issues with the `typeof` operator
  30352. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  30353. var tag = isObject(value) ? objectToString.call(value) : '';
  30354. return tag == funcTag || tag == genTag;
  30355. }
  30356. /**
  30357. * Checks if `value` is a valid array-like length.
  30358. *
  30359. * **Note:** This method is loosely based on
  30360. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  30361. *
  30362. * @static
  30363. * @memberOf _
  30364. * @since 4.0.0
  30365. * @category Lang
  30366. * @param {*} value The value to check.
  30367. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  30368. * @example
  30369. *
  30370. * _.isLength(3);
  30371. * // => true
  30372. *
  30373. * _.isLength(Number.MIN_VALUE);
  30374. * // => false
  30375. *
  30376. * _.isLength(Infinity);
  30377. * // => false
  30378. *
  30379. * _.isLength('3');
  30380. * // => false
  30381. */
  30382. function isLength(value) {
  30383. return typeof value == 'number' &&
  30384. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  30385. }
  30386. /**
  30387. * Checks if `value` is the
  30388. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  30389. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  30390. *
  30391. * @static
  30392. * @memberOf _
  30393. * @since 0.1.0
  30394. * @category Lang
  30395. * @param {*} value The value to check.
  30396. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  30397. * @example
  30398. *
  30399. * _.isObject({});
  30400. * // => true
  30401. *
  30402. * _.isObject([1, 2, 3]);
  30403. * // => true
  30404. *
  30405. * _.isObject(_.noop);
  30406. * // => true
  30407. *
  30408. * _.isObject(null);
  30409. * // => false
  30410. */
  30411. function isObject(value) {
  30412. var type = typeof value;
  30413. return !!value && (type == 'object' || type == 'function');
  30414. }
  30415. /**
  30416. * Checks if `value` is object-like. A value is object-like if it's not `null`
  30417. * and has a `typeof` result of "object".
  30418. *
  30419. * @static
  30420. * @memberOf _
  30421. * @since 4.0.0
  30422. * @category Lang
  30423. * @param {*} value The value to check.
  30424. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  30425. * @example
  30426. *
  30427. * _.isObjectLike({});
  30428. * // => true
  30429. *
  30430. * _.isObjectLike([1, 2, 3]);
  30431. * // => true
  30432. *
  30433. * _.isObjectLike(_.noop);
  30434. * // => false
  30435. *
  30436. * _.isObjectLike(null);
  30437. * // => false
  30438. */
  30439. function isObjectLike(value) {
  30440. return !!value && typeof value == 'object';
  30441. }
  30442. /**
  30443. * Creates an array of the own enumerable property names of `object`.
  30444. *
  30445. * **Note:** Non-object values are coerced to objects. See the
  30446. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  30447. * for more details.
  30448. *
  30449. * @static
  30450. * @since 0.1.0
  30451. * @memberOf _
  30452. * @category Object
  30453. * @param {Object} object The object to query.
  30454. * @returns {Array} Returns the array of property names.
  30455. * @example
  30456. *
  30457. * function Foo() {
  30458. * this.a = 1;
  30459. * this.b = 2;
  30460. * }
  30461. *
  30462. * Foo.prototype.c = 3;
  30463. *
  30464. * _.keys(new Foo);
  30465. * // => ['a', 'b'] (iteration order is not guaranteed)
  30466. *
  30467. * _.keys('hi');
  30468. * // => ['0', '1']
  30469. */
  30470. function keys(object) {
  30471. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  30472. }
  30473. /**
  30474. * This method returns a new empty array.
  30475. *
  30476. * @static
  30477. * @memberOf _
  30478. * @since 4.13.0
  30479. * @category Util
  30480. * @returns {Array} Returns the new empty array.
  30481. * @example
  30482. *
  30483. * var arrays = _.times(2, _.stubArray);
  30484. *
  30485. * console.log(arrays);
  30486. * // => [[], []]
  30487. *
  30488. * console.log(arrays[0] === arrays[1]);
  30489. * // => false
  30490. */
  30491. function stubArray() {
  30492. return [];
  30493. }
  30494. /**
  30495. * This method returns `false`.
  30496. *
  30497. * @static
  30498. * @memberOf _
  30499. * @since 4.13.0
  30500. * @category Util
  30501. * @returns {boolean} Returns `false`.
  30502. * @example
  30503. *
  30504. * _.times(2, _.stubFalse);
  30505. * // => [false, false]
  30506. */
  30507. function stubFalse() {
  30508. return false;
  30509. }
  30510. module.exports = cloneDeep;
  30511. /***/ }),
  30512. /***/ "./node_modules/lodash.isequal/index.js":
  30513. /*!**********************************************!*\
  30514. !*** ./node_modules/lodash.isequal/index.js ***!
  30515. \**********************************************/
  30516. /***/ ((module, exports, __webpack_require__) => {
  30517. /* module decorator */ module = __webpack_require__.nmd(module);
  30518. /**
  30519. * Lodash (Custom Build) <https://lodash.com/>
  30520. * Build: `lodash modularize exports="npm" -o ./`
  30521. * Copyright JS Foundation and other contributors <https://js.foundation/>
  30522. * Released under MIT license <https://lodash.com/license>
  30523. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  30524. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  30525. */
  30526. /** Used as the size to enable large array optimizations. */
  30527. var LARGE_ARRAY_SIZE = 200;
  30528. /** Used to stand-in for `undefined` hash values. */
  30529. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  30530. /** Used to compose bitmasks for value comparisons. */
  30531. var COMPARE_PARTIAL_FLAG = 1,
  30532. COMPARE_UNORDERED_FLAG = 2;
  30533. /** Used as references for various `Number` constants. */
  30534. var MAX_SAFE_INTEGER = 9007199254740991;
  30535. /** `Object#toString` result references. */
  30536. var argsTag = '[object Arguments]',
  30537. arrayTag = '[object Array]',
  30538. asyncTag = '[object AsyncFunction]',
  30539. boolTag = '[object Boolean]',
  30540. dateTag = '[object Date]',
  30541. errorTag = '[object Error]',
  30542. funcTag = '[object Function]',
  30543. genTag = '[object GeneratorFunction]',
  30544. mapTag = '[object Map]',
  30545. numberTag = '[object Number]',
  30546. nullTag = '[object Null]',
  30547. objectTag = '[object Object]',
  30548. promiseTag = '[object Promise]',
  30549. proxyTag = '[object Proxy]',
  30550. regexpTag = '[object RegExp]',
  30551. setTag = '[object Set]',
  30552. stringTag = '[object String]',
  30553. symbolTag = '[object Symbol]',
  30554. undefinedTag = '[object Undefined]',
  30555. weakMapTag = '[object WeakMap]';
  30556. var arrayBufferTag = '[object ArrayBuffer]',
  30557. dataViewTag = '[object DataView]',
  30558. float32Tag = '[object Float32Array]',
  30559. float64Tag = '[object Float64Array]',
  30560. int8Tag = '[object Int8Array]',
  30561. int16Tag = '[object Int16Array]',
  30562. int32Tag = '[object Int32Array]',
  30563. uint8Tag = '[object Uint8Array]',
  30564. uint8ClampedTag = '[object Uint8ClampedArray]',
  30565. uint16Tag = '[object Uint16Array]',
  30566. uint32Tag = '[object Uint32Array]';
  30567. /**
  30568. * Used to match `RegExp`
  30569. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  30570. */
  30571. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  30572. /** Used to detect host constructors (Safari). */
  30573. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  30574. /** Used to detect unsigned integer values. */
  30575. var reIsUint = /^(?:0|[1-9]\d*)$/;
  30576. /** Used to identify `toStringTag` values of typed arrays. */
  30577. var typedArrayTags = {};
  30578. typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
  30579. typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
  30580. typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
  30581. typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
  30582. typedArrayTags[uint32Tag] = true;
  30583. typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
  30584. typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
  30585. typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
  30586. typedArrayTags[errorTag] = typedArrayTags[funcTag] =
  30587. typedArrayTags[mapTag] = typedArrayTags[numberTag] =
  30588. typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
  30589. typedArrayTags[setTag] = typedArrayTags[stringTag] =
  30590. typedArrayTags[weakMapTag] = false;
  30591. /** Detect free variable `global` from Node.js. */
  30592. var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
  30593. /** Detect free variable `self`. */
  30594. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  30595. /** Used as a reference to the global object. */
  30596. var root = freeGlobal || freeSelf || Function('return this')();
  30597. /** Detect free variable `exports`. */
  30598. var freeExports = true && exports && !exports.nodeType && exports;
  30599. /** Detect free variable `module`. */
  30600. var freeModule = freeExports && "object" == 'object' && module && !module.nodeType && module;
  30601. /** Detect the popular CommonJS extension `module.exports`. */
  30602. var moduleExports = freeModule && freeModule.exports === freeExports;
  30603. /** Detect free variable `process` from Node.js. */
  30604. var freeProcess = moduleExports && freeGlobal.process;
  30605. /** Used to access faster Node.js helpers. */
  30606. var nodeUtil = (function() {
  30607. try {
  30608. return freeProcess && freeProcess.binding && freeProcess.binding('util');
  30609. } catch (e) {}
  30610. }());
  30611. /* Node.js helper references. */
  30612. var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
  30613. /**
  30614. * A specialized version of `_.filter` for arrays without support for
  30615. * iteratee shorthands.
  30616. *
  30617. * @private
  30618. * @param {Array} [array] The array to iterate over.
  30619. * @param {Function} predicate The function invoked per iteration.
  30620. * @returns {Array} Returns the new filtered array.
  30621. */
  30622. function arrayFilter(array, predicate) {
  30623. var index = -1,
  30624. length = array == null ? 0 : array.length,
  30625. resIndex = 0,
  30626. result = [];
  30627. while (++index < length) {
  30628. var value = array[index];
  30629. if (predicate(value, index, array)) {
  30630. result[resIndex++] = value;
  30631. }
  30632. }
  30633. return result;
  30634. }
  30635. /**
  30636. * Appends the elements of `values` to `array`.
  30637. *
  30638. * @private
  30639. * @param {Array} array The array to modify.
  30640. * @param {Array} values The values to append.
  30641. * @returns {Array} Returns `array`.
  30642. */
  30643. function arrayPush(array, values) {
  30644. var index = -1,
  30645. length = values.length,
  30646. offset = array.length;
  30647. while (++index < length) {
  30648. array[offset + index] = values[index];
  30649. }
  30650. return array;
  30651. }
  30652. /**
  30653. * A specialized version of `_.some` for arrays without support for iteratee
  30654. * shorthands.
  30655. *
  30656. * @private
  30657. * @param {Array} [array] The array to iterate over.
  30658. * @param {Function} predicate The function invoked per iteration.
  30659. * @returns {boolean} Returns `true` if any element passes the predicate check,
  30660. * else `false`.
  30661. */
  30662. function arraySome(array, predicate) {
  30663. var index = -1,
  30664. length = array == null ? 0 : array.length;
  30665. while (++index < length) {
  30666. if (predicate(array[index], index, array)) {
  30667. return true;
  30668. }
  30669. }
  30670. return false;
  30671. }
  30672. /**
  30673. * The base implementation of `_.times` without support for iteratee shorthands
  30674. * or max array length checks.
  30675. *
  30676. * @private
  30677. * @param {number} n The number of times to invoke `iteratee`.
  30678. * @param {Function} iteratee The function invoked per iteration.
  30679. * @returns {Array} Returns the array of results.
  30680. */
  30681. function baseTimes(n, iteratee) {
  30682. var index = -1,
  30683. result = Array(n);
  30684. while (++index < n) {
  30685. result[index] = iteratee(index);
  30686. }
  30687. return result;
  30688. }
  30689. /**
  30690. * The base implementation of `_.unary` without support for storing metadata.
  30691. *
  30692. * @private
  30693. * @param {Function} func The function to cap arguments for.
  30694. * @returns {Function} Returns the new capped function.
  30695. */
  30696. function baseUnary(func) {
  30697. return function(value) {
  30698. return func(value);
  30699. };
  30700. }
  30701. /**
  30702. * Checks if a `cache` value for `key` exists.
  30703. *
  30704. * @private
  30705. * @param {Object} cache The cache to query.
  30706. * @param {string} key The key of the entry to check.
  30707. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  30708. */
  30709. function cacheHas(cache, key) {
  30710. return cache.has(key);
  30711. }
  30712. /**
  30713. * Gets the value at `key` of `object`.
  30714. *
  30715. * @private
  30716. * @param {Object} [object] The object to query.
  30717. * @param {string} key The key of the property to get.
  30718. * @returns {*} Returns the property value.
  30719. */
  30720. function getValue(object, key) {
  30721. return object == null ? undefined : object[key];
  30722. }
  30723. /**
  30724. * Converts `map` to its key-value pairs.
  30725. *
  30726. * @private
  30727. * @param {Object} map The map to convert.
  30728. * @returns {Array} Returns the key-value pairs.
  30729. */
  30730. function mapToArray(map) {
  30731. var index = -1,
  30732. result = Array(map.size);
  30733. map.forEach(function(value, key) {
  30734. result[++index] = [key, value];
  30735. });
  30736. return result;
  30737. }
  30738. /**
  30739. * Creates a unary function that invokes `func` with its argument transformed.
  30740. *
  30741. * @private
  30742. * @param {Function} func The function to wrap.
  30743. * @param {Function} transform The argument transform.
  30744. * @returns {Function} Returns the new function.
  30745. */
  30746. function overArg(func, transform) {
  30747. return function(arg) {
  30748. return func(transform(arg));
  30749. };
  30750. }
  30751. /**
  30752. * Converts `set` to an array of its values.
  30753. *
  30754. * @private
  30755. * @param {Object} set The set to convert.
  30756. * @returns {Array} Returns the values.
  30757. */
  30758. function setToArray(set) {
  30759. var index = -1,
  30760. result = Array(set.size);
  30761. set.forEach(function(value) {
  30762. result[++index] = value;
  30763. });
  30764. return result;
  30765. }
  30766. /** Used for built-in method references. */
  30767. var arrayProto = Array.prototype,
  30768. funcProto = Function.prototype,
  30769. objectProto = Object.prototype;
  30770. /** Used to detect overreaching core-js shims. */
  30771. var coreJsData = root['__core-js_shared__'];
  30772. /** Used to resolve the decompiled source of functions. */
  30773. var funcToString = funcProto.toString;
  30774. /** Used to check objects for own properties. */
  30775. var hasOwnProperty = objectProto.hasOwnProperty;
  30776. /** Used to detect methods masquerading as native. */
  30777. var maskSrcKey = (function() {
  30778. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  30779. return uid ? ('Symbol(src)_1.' + uid) : '';
  30780. }());
  30781. /**
  30782. * Used to resolve the
  30783. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  30784. * of values.
  30785. */
  30786. var nativeObjectToString = objectProto.toString;
  30787. /** Used to detect if a method is native. */
  30788. var reIsNative = RegExp('^' +
  30789. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  30790. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  30791. );
  30792. /** Built-in value references. */
  30793. var Buffer = moduleExports ? root.Buffer : undefined,
  30794. Symbol = root.Symbol,
  30795. Uint8Array = root.Uint8Array,
  30796. propertyIsEnumerable = objectProto.propertyIsEnumerable,
  30797. splice = arrayProto.splice,
  30798. symToStringTag = Symbol ? Symbol.toStringTag : undefined;
  30799. /* Built-in method references for those with the same name as other `lodash` methods. */
  30800. var nativeGetSymbols = Object.getOwnPropertySymbols,
  30801. nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
  30802. nativeKeys = overArg(Object.keys, Object);
  30803. /* Built-in method references that are verified to be native. */
  30804. var DataView = getNative(root, 'DataView'),
  30805. Map = getNative(root, 'Map'),
  30806. Promise = getNative(root, 'Promise'),
  30807. Set = getNative(root, 'Set'),
  30808. WeakMap = getNative(root, 'WeakMap'),
  30809. nativeCreate = getNative(Object, 'create');
  30810. /** Used to detect maps, sets, and weakmaps. */
  30811. var dataViewCtorString = toSource(DataView),
  30812. mapCtorString = toSource(Map),
  30813. promiseCtorString = toSource(Promise),
  30814. setCtorString = toSource(Set),
  30815. weakMapCtorString = toSource(WeakMap);
  30816. /** Used to convert symbols to primitives and strings. */
  30817. var symbolProto = Symbol ? Symbol.prototype : undefined,
  30818. symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
  30819. /**
  30820. * Creates a hash object.
  30821. *
  30822. * @private
  30823. * @constructor
  30824. * @param {Array} [entries] The key-value pairs to cache.
  30825. */
  30826. function Hash(entries) {
  30827. var index = -1,
  30828. length = entries == null ? 0 : entries.length;
  30829. this.clear();
  30830. while (++index < length) {
  30831. var entry = entries[index];
  30832. this.set(entry[0], entry[1]);
  30833. }
  30834. }
  30835. /**
  30836. * Removes all key-value entries from the hash.
  30837. *
  30838. * @private
  30839. * @name clear
  30840. * @memberOf Hash
  30841. */
  30842. function hashClear() {
  30843. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  30844. this.size = 0;
  30845. }
  30846. /**
  30847. * Removes `key` and its value from the hash.
  30848. *
  30849. * @private
  30850. * @name delete
  30851. * @memberOf Hash
  30852. * @param {Object} hash The hash to modify.
  30853. * @param {string} key The key of the value to remove.
  30854. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  30855. */
  30856. function hashDelete(key) {
  30857. var result = this.has(key) && delete this.__data__[key];
  30858. this.size -= result ? 1 : 0;
  30859. return result;
  30860. }
  30861. /**
  30862. * Gets the hash value for `key`.
  30863. *
  30864. * @private
  30865. * @name get
  30866. * @memberOf Hash
  30867. * @param {string} key The key of the value to get.
  30868. * @returns {*} Returns the entry value.
  30869. */
  30870. function hashGet(key) {
  30871. var data = this.__data__;
  30872. if (nativeCreate) {
  30873. var result = data[key];
  30874. return result === HASH_UNDEFINED ? undefined : result;
  30875. }
  30876. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  30877. }
  30878. /**
  30879. * Checks if a hash value for `key` exists.
  30880. *
  30881. * @private
  30882. * @name has
  30883. * @memberOf Hash
  30884. * @param {string} key The key of the entry to check.
  30885. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  30886. */
  30887. function hashHas(key) {
  30888. var data = this.__data__;
  30889. return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
  30890. }
  30891. /**
  30892. * Sets the hash `key` to `value`.
  30893. *
  30894. * @private
  30895. * @name set
  30896. * @memberOf Hash
  30897. * @param {string} key The key of the value to set.
  30898. * @param {*} value The value to set.
  30899. * @returns {Object} Returns the hash instance.
  30900. */
  30901. function hashSet(key, value) {
  30902. var data = this.__data__;
  30903. this.size += this.has(key) ? 0 : 1;
  30904. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  30905. return this;
  30906. }
  30907. // Add methods to `Hash`.
  30908. Hash.prototype.clear = hashClear;
  30909. Hash.prototype['delete'] = hashDelete;
  30910. Hash.prototype.get = hashGet;
  30911. Hash.prototype.has = hashHas;
  30912. Hash.prototype.set = hashSet;
  30913. /**
  30914. * Creates an list cache object.
  30915. *
  30916. * @private
  30917. * @constructor
  30918. * @param {Array} [entries] The key-value pairs to cache.
  30919. */
  30920. function ListCache(entries) {
  30921. var index = -1,
  30922. length = entries == null ? 0 : entries.length;
  30923. this.clear();
  30924. while (++index < length) {
  30925. var entry = entries[index];
  30926. this.set(entry[0], entry[1]);
  30927. }
  30928. }
  30929. /**
  30930. * Removes all key-value entries from the list cache.
  30931. *
  30932. * @private
  30933. * @name clear
  30934. * @memberOf ListCache
  30935. */
  30936. function listCacheClear() {
  30937. this.__data__ = [];
  30938. this.size = 0;
  30939. }
  30940. /**
  30941. * Removes `key` and its value from the list cache.
  30942. *
  30943. * @private
  30944. * @name delete
  30945. * @memberOf ListCache
  30946. * @param {string} key The key of the value to remove.
  30947. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  30948. */
  30949. function listCacheDelete(key) {
  30950. var data = this.__data__,
  30951. index = assocIndexOf(data, key);
  30952. if (index < 0) {
  30953. return false;
  30954. }
  30955. var lastIndex = data.length - 1;
  30956. if (index == lastIndex) {
  30957. data.pop();
  30958. } else {
  30959. splice.call(data, index, 1);
  30960. }
  30961. --this.size;
  30962. return true;
  30963. }
  30964. /**
  30965. * Gets the list cache value for `key`.
  30966. *
  30967. * @private
  30968. * @name get
  30969. * @memberOf ListCache
  30970. * @param {string} key The key of the value to get.
  30971. * @returns {*} Returns the entry value.
  30972. */
  30973. function listCacheGet(key) {
  30974. var data = this.__data__,
  30975. index = assocIndexOf(data, key);
  30976. return index < 0 ? undefined : data[index][1];
  30977. }
  30978. /**
  30979. * Checks if a list cache value for `key` exists.
  30980. *
  30981. * @private
  30982. * @name has
  30983. * @memberOf ListCache
  30984. * @param {string} key The key of the entry to check.
  30985. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  30986. */
  30987. function listCacheHas(key) {
  30988. return assocIndexOf(this.__data__, key) > -1;
  30989. }
  30990. /**
  30991. * Sets the list cache `key` to `value`.
  30992. *
  30993. * @private
  30994. * @name set
  30995. * @memberOf ListCache
  30996. * @param {string} key The key of the value to set.
  30997. * @param {*} value The value to set.
  30998. * @returns {Object} Returns the list cache instance.
  30999. */
  31000. function listCacheSet(key, value) {
  31001. var data = this.__data__,
  31002. index = assocIndexOf(data, key);
  31003. if (index < 0) {
  31004. ++this.size;
  31005. data.push([key, value]);
  31006. } else {
  31007. data[index][1] = value;
  31008. }
  31009. return this;
  31010. }
  31011. // Add methods to `ListCache`.
  31012. ListCache.prototype.clear = listCacheClear;
  31013. ListCache.prototype['delete'] = listCacheDelete;
  31014. ListCache.prototype.get = listCacheGet;
  31015. ListCache.prototype.has = listCacheHas;
  31016. ListCache.prototype.set = listCacheSet;
  31017. /**
  31018. * Creates a map cache object to store key-value pairs.
  31019. *
  31020. * @private
  31021. * @constructor
  31022. * @param {Array} [entries] The key-value pairs to cache.
  31023. */
  31024. function MapCache(entries) {
  31025. var index = -1,
  31026. length = entries == null ? 0 : entries.length;
  31027. this.clear();
  31028. while (++index < length) {
  31029. var entry = entries[index];
  31030. this.set(entry[0], entry[1]);
  31031. }
  31032. }
  31033. /**
  31034. * Removes all key-value entries from the map.
  31035. *
  31036. * @private
  31037. * @name clear
  31038. * @memberOf MapCache
  31039. */
  31040. function mapCacheClear() {
  31041. this.size = 0;
  31042. this.__data__ = {
  31043. 'hash': new Hash,
  31044. 'map': new (Map || ListCache),
  31045. 'string': new Hash
  31046. };
  31047. }
  31048. /**
  31049. * Removes `key` and its value from the map.
  31050. *
  31051. * @private
  31052. * @name delete
  31053. * @memberOf MapCache
  31054. * @param {string} key The key of the value to remove.
  31055. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  31056. */
  31057. function mapCacheDelete(key) {
  31058. var result = getMapData(this, key)['delete'](key);
  31059. this.size -= result ? 1 : 0;
  31060. return result;
  31061. }
  31062. /**
  31063. * Gets the map value for `key`.
  31064. *
  31065. * @private
  31066. * @name get
  31067. * @memberOf MapCache
  31068. * @param {string} key The key of the value to get.
  31069. * @returns {*} Returns the entry value.
  31070. */
  31071. function mapCacheGet(key) {
  31072. return getMapData(this, key).get(key);
  31073. }
  31074. /**
  31075. * Checks if a map value for `key` exists.
  31076. *
  31077. * @private
  31078. * @name has
  31079. * @memberOf MapCache
  31080. * @param {string} key The key of the entry to check.
  31081. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  31082. */
  31083. function mapCacheHas(key) {
  31084. return getMapData(this, key).has(key);
  31085. }
  31086. /**
  31087. * Sets the map `key` to `value`.
  31088. *
  31089. * @private
  31090. * @name set
  31091. * @memberOf MapCache
  31092. * @param {string} key The key of the value to set.
  31093. * @param {*} value The value to set.
  31094. * @returns {Object} Returns the map cache instance.
  31095. */
  31096. function mapCacheSet(key, value) {
  31097. var data = getMapData(this, key),
  31098. size = data.size;
  31099. data.set(key, value);
  31100. this.size += data.size == size ? 0 : 1;
  31101. return this;
  31102. }
  31103. // Add methods to `MapCache`.
  31104. MapCache.prototype.clear = mapCacheClear;
  31105. MapCache.prototype['delete'] = mapCacheDelete;
  31106. MapCache.prototype.get = mapCacheGet;
  31107. MapCache.prototype.has = mapCacheHas;
  31108. MapCache.prototype.set = mapCacheSet;
  31109. /**
  31110. *
  31111. * Creates an array cache object to store unique values.
  31112. *
  31113. * @private
  31114. * @constructor
  31115. * @param {Array} [values] The values to cache.
  31116. */
  31117. function SetCache(values) {
  31118. var index = -1,
  31119. length = values == null ? 0 : values.length;
  31120. this.__data__ = new MapCache;
  31121. while (++index < length) {
  31122. this.add(values[index]);
  31123. }
  31124. }
  31125. /**
  31126. * Adds `value` to the array cache.
  31127. *
  31128. * @private
  31129. * @name add
  31130. * @memberOf SetCache
  31131. * @alias push
  31132. * @param {*} value The value to cache.
  31133. * @returns {Object} Returns the cache instance.
  31134. */
  31135. function setCacheAdd(value) {
  31136. this.__data__.set(value, HASH_UNDEFINED);
  31137. return this;
  31138. }
  31139. /**
  31140. * Checks if `value` is in the array cache.
  31141. *
  31142. * @private
  31143. * @name has
  31144. * @memberOf SetCache
  31145. * @param {*} value The value to search for.
  31146. * @returns {number} Returns `true` if `value` is found, else `false`.
  31147. */
  31148. function setCacheHas(value) {
  31149. return this.__data__.has(value);
  31150. }
  31151. // Add methods to `SetCache`.
  31152. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  31153. SetCache.prototype.has = setCacheHas;
  31154. /**
  31155. * Creates a stack cache object to store key-value pairs.
  31156. *
  31157. * @private
  31158. * @constructor
  31159. * @param {Array} [entries] The key-value pairs to cache.
  31160. */
  31161. function Stack(entries) {
  31162. var data = this.__data__ = new ListCache(entries);
  31163. this.size = data.size;
  31164. }
  31165. /**
  31166. * Removes all key-value entries from the stack.
  31167. *
  31168. * @private
  31169. * @name clear
  31170. * @memberOf Stack
  31171. */
  31172. function stackClear() {
  31173. this.__data__ = new ListCache;
  31174. this.size = 0;
  31175. }
  31176. /**
  31177. * Removes `key` and its value from the stack.
  31178. *
  31179. * @private
  31180. * @name delete
  31181. * @memberOf Stack
  31182. * @param {string} key The key of the value to remove.
  31183. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  31184. */
  31185. function stackDelete(key) {
  31186. var data = this.__data__,
  31187. result = data['delete'](key);
  31188. this.size = data.size;
  31189. return result;
  31190. }
  31191. /**
  31192. * Gets the stack value for `key`.
  31193. *
  31194. * @private
  31195. * @name get
  31196. * @memberOf Stack
  31197. * @param {string} key The key of the value to get.
  31198. * @returns {*} Returns the entry value.
  31199. */
  31200. function stackGet(key) {
  31201. return this.__data__.get(key);
  31202. }
  31203. /**
  31204. * Checks if a stack value for `key` exists.
  31205. *
  31206. * @private
  31207. * @name has
  31208. * @memberOf Stack
  31209. * @param {string} key The key of the entry to check.
  31210. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  31211. */
  31212. function stackHas(key) {
  31213. return this.__data__.has(key);
  31214. }
  31215. /**
  31216. * Sets the stack `key` to `value`.
  31217. *
  31218. * @private
  31219. * @name set
  31220. * @memberOf Stack
  31221. * @param {string} key The key of the value to set.
  31222. * @param {*} value The value to set.
  31223. * @returns {Object} Returns the stack cache instance.
  31224. */
  31225. function stackSet(key, value) {
  31226. var data = this.__data__;
  31227. if (data instanceof ListCache) {
  31228. var pairs = data.__data__;
  31229. if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
  31230. pairs.push([key, value]);
  31231. this.size = ++data.size;
  31232. return this;
  31233. }
  31234. data = this.__data__ = new MapCache(pairs);
  31235. }
  31236. data.set(key, value);
  31237. this.size = data.size;
  31238. return this;
  31239. }
  31240. // Add methods to `Stack`.
  31241. Stack.prototype.clear = stackClear;
  31242. Stack.prototype['delete'] = stackDelete;
  31243. Stack.prototype.get = stackGet;
  31244. Stack.prototype.has = stackHas;
  31245. Stack.prototype.set = stackSet;
  31246. /**
  31247. * Creates an array of the enumerable property names of the array-like `value`.
  31248. *
  31249. * @private
  31250. * @param {*} value The value to query.
  31251. * @param {boolean} inherited Specify returning inherited property names.
  31252. * @returns {Array} Returns the array of property names.
  31253. */
  31254. function arrayLikeKeys(value, inherited) {
  31255. var isArr = isArray(value),
  31256. isArg = !isArr && isArguments(value),
  31257. isBuff = !isArr && !isArg && isBuffer(value),
  31258. isType = !isArr && !isArg && !isBuff && isTypedArray(value),
  31259. skipIndexes = isArr || isArg || isBuff || isType,
  31260. result = skipIndexes ? baseTimes(value.length, String) : [],
  31261. length = result.length;
  31262. for (var key in value) {
  31263. if ((inherited || hasOwnProperty.call(value, key)) &&
  31264. !(skipIndexes && (
  31265. // Safari 9 has enumerable `arguments.length` in strict mode.
  31266. key == 'length' ||
  31267. // Node.js 0.10 has enumerable non-index properties on buffers.
  31268. (isBuff && (key == 'offset' || key == 'parent')) ||
  31269. // PhantomJS 2 has enumerable non-index properties on typed arrays.
  31270. (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
  31271. // Skip index properties.
  31272. isIndex(key, length)
  31273. ))) {
  31274. result.push(key);
  31275. }
  31276. }
  31277. return result;
  31278. }
  31279. /**
  31280. * Gets the index at which the `key` is found in `array` of key-value pairs.
  31281. *
  31282. * @private
  31283. * @param {Array} array The array to inspect.
  31284. * @param {*} key The key to search for.
  31285. * @returns {number} Returns the index of the matched value, else `-1`.
  31286. */
  31287. function assocIndexOf(array, key) {
  31288. var length = array.length;
  31289. while (length--) {
  31290. if (eq(array[length][0], key)) {
  31291. return length;
  31292. }
  31293. }
  31294. return -1;
  31295. }
  31296. /**
  31297. * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
  31298. * `keysFunc` and `symbolsFunc` to get the enumerable property names and
  31299. * symbols of `object`.
  31300. *
  31301. * @private
  31302. * @param {Object} object The object to query.
  31303. * @param {Function} keysFunc The function to get the keys of `object`.
  31304. * @param {Function} symbolsFunc The function to get the symbols of `object`.
  31305. * @returns {Array} Returns the array of property names and symbols.
  31306. */
  31307. function baseGetAllKeys(object, keysFunc, symbolsFunc) {
  31308. var result = keysFunc(object);
  31309. return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
  31310. }
  31311. /**
  31312. * The base implementation of `getTag` without fallbacks for buggy environments.
  31313. *
  31314. * @private
  31315. * @param {*} value The value to query.
  31316. * @returns {string} Returns the `toStringTag`.
  31317. */
  31318. function baseGetTag(value) {
  31319. if (value == null) {
  31320. return value === undefined ? undefinedTag : nullTag;
  31321. }
  31322. return (symToStringTag && symToStringTag in Object(value))
  31323. ? getRawTag(value)
  31324. : objectToString(value);
  31325. }
  31326. /**
  31327. * The base implementation of `_.isArguments`.
  31328. *
  31329. * @private
  31330. * @param {*} value The value to check.
  31331. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  31332. */
  31333. function baseIsArguments(value) {
  31334. return isObjectLike(value) && baseGetTag(value) == argsTag;
  31335. }
  31336. /**
  31337. * The base implementation of `_.isEqual` which supports partial comparisons
  31338. * and tracks traversed objects.
  31339. *
  31340. * @private
  31341. * @param {*} value The value to compare.
  31342. * @param {*} other The other value to compare.
  31343. * @param {boolean} bitmask The bitmask flags.
  31344. * 1 - Unordered comparison
  31345. * 2 - Partial comparison
  31346. * @param {Function} [customizer] The function to customize comparisons.
  31347. * @param {Object} [stack] Tracks traversed `value` and `other` objects.
  31348. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  31349. */
  31350. function baseIsEqual(value, other, bitmask, customizer, stack) {
  31351. if (value === other) {
  31352. return true;
  31353. }
  31354. if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
  31355. return value !== value && other !== other;
  31356. }
  31357. return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
  31358. }
  31359. /**
  31360. * A specialized version of `baseIsEqual` for arrays and objects which performs
  31361. * deep comparisons and tracks traversed objects enabling objects with circular
  31362. * references to be compared.
  31363. *
  31364. * @private
  31365. * @param {Object} object The object to compare.
  31366. * @param {Object} other The other object to compare.
  31367. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  31368. * @param {Function} customizer The function to customize comparisons.
  31369. * @param {Function} equalFunc The function to determine equivalents of values.
  31370. * @param {Object} [stack] Tracks traversed `object` and `other` objects.
  31371. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  31372. */
  31373. function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
  31374. var objIsArr = isArray(object),
  31375. othIsArr = isArray(other),
  31376. objTag = objIsArr ? arrayTag : getTag(object),
  31377. othTag = othIsArr ? arrayTag : getTag(other);
  31378. objTag = objTag == argsTag ? objectTag : objTag;
  31379. othTag = othTag == argsTag ? objectTag : othTag;
  31380. var objIsObj = objTag == objectTag,
  31381. othIsObj = othTag == objectTag,
  31382. isSameTag = objTag == othTag;
  31383. if (isSameTag && isBuffer(object)) {
  31384. if (!isBuffer(other)) {
  31385. return false;
  31386. }
  31387. objIsArr = true;
  31388. objIsObj = false;
  31389. }
  31390. if (isSameTag && !objIsObj) {
  31391. stack || (stack = new Stack);
  31392. return (objIsArr || isTypedArray(object))
  31393. ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
  31394. : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
  31395. }
  31396. if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
  31397. var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
  31398. othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
  31399. if (objIsWrapped || othIsWrapped) {
  31400. var objUnwrapped = objIsWrapped ? object.value() : object,
  31401. othUnwrapped = othIsWrapped ? other.value() : other;
  31402. stack || (stack = new Stack);
  31403. return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
  31404. }
  31405. }
  31406. if (!isSameTag) {
  31407. return false;
  31408. }
  31409. stack || (stack = new Stack);
  31410. return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
  31411. }
  31412. /**
  31413. * The base implementation of `_.isNative` without bad shim checks.
  31414. *
  31415. * @private
  31416. * @param {*} value The value to check.
  31417. * @returns {boolean} Returns `true` if `value` is a native function,
  31418. * else `false`.
  31419. */
  31420. function baseIsNative(value) {
  31421. if (!isObject(value) || isMasked(value)) {
  31422. return false;
  31423. }
  31424. var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
  31425. return pattern.test(toSource(value));
  31426. }
  31427. /**
  31428. * The base implementation of `_.isTypedArray` without Node.js optimizations.
  31429. *
  31430. * @private
  31431. * @param {*} value The value to check.
  31432. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  31433. */
  31434. function baseIsTypedArray(value) {
  31435. return isObjectLike(value) &&
  31436. isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
  31437. }
  31438. /**
  31439. * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
  31440. *
  31441. * @private
  31442. * @param {Object} object The object to query.
  31443. * @returns {Array} Returns the array of property names.
  31444. */
  31445. function baseKeys(object) {
  31446. if (!isPrototype(object)) {
  31447. return nativeKeys(object);
  31448. }
  31449. var result = [];
  31450. for (var key in Object(object)) {
  31451. if (hasOwnProperty.call(object, key) && key != 'constructor') {
  31452. result.push(key);
  31453. }
  31454. }
  31455. return result;
  31456. }
  31457. /**
  31458. * A specialized version of `baseIsEqualDeep` for arrays with support for
  31459. * partial deep comparisons.
  31460. *
  31461. * @private
  31462. * @param {Array} array The array to compare.
  31463. * @param {Array} other The other array to compare.
  31464. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  31465. * @param {Function} customizer The function to customize comparisons.
  31466. * @param {Function} equalFunc The function to determine equivalents of values.
  31467. * @param {Object} stack Tracks traversed `array` and `other` objects.
  31468. * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
  31469. */
  31470. function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
  31471. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  31472. arrLength = array.length,
  31473. othLength = other.length;
  31474. if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
  31475. return false;
  31476. }
  31477. // Assume cyclic values are equal.
  31478. var stacked = stack.get(array);
  31479. if (stacked && stack.get(other)) {
  31480. return stacked == other;
  31481. }
  31482. var index = -1,
  31483. result = true,
  31484. seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
  31485. stack.set(array, other);
  31486. stack.set(other, array);
  31487. // Ignore non-index properties.
  31488. while (++index < arrLength) {
  31489. var arrValue = array[index],
  31490. othValue = other[index];
  31491. if (customizer) {
  31492. var compared = isPartial
  31493. ? customizer(othValue, arrValue, index, other, array, stack)
  31494. : customizer(arrValue, othValue, index, array, other, stack);
  31495. }
  31496. if (compared !== undefined) {
  31497. if (compared) {
  31498. continue;
  31499. }
  31500. result = false;
  31501. break;
  31502. }
  31503. // Recursively compare arrays (susceptible to call stack limits).
  31504. if (seen) {
  31505. if (!arraySome(other, function(othValue, othIndex) {
  31506. if (!cacheHas(seen, othIndex) &&
  31507. (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
  31508. return seen.push(othIndex);
  31509. }
  31510. })) {
  31511. result = false;
  31512. break;
  31513. }
  31514. } else if (!(
  31515. arrValue === othValue ||
  31516. equalFunc(arrValue, othValue, bitmask, customizer, stack)
  31517. )) {
  31518. result = false;
  31519. break;
  31520. }
  31521. }
  31522. stack['delete'](array);
  31523. stack['delete'](other);
  31524. return result;
  31525. }
  31526. /**
  31527. * A specialized version of `baseIsEqualDeep` for comparing objects of
  31528. * the same `toStringTag`.
  31529. *
  31530. * **Note:** This function only supports comparing values with tags of
  31531. * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
  31532. *
  31533. * @private
  31534. * @param {Object} object The object to compare.
  31535. * @param {Object} other The other object to compare.
  31536. * @param {string} tag The `toStringTag` of the objects to compare.
  31537. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  31538. * @param {Function} customizer The function to customize comparisons.
  31539. * @param {Function} equalFunc The function to determine equivalents of values.
  31540. * @param {Object} stack Tracks traversed `object` and `other` objects.
  31541. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  31542. */
  31543. function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
  31544. switch (tag) {
  31545. case dataViewTag:
  31546. if ((object.byteLength != other.byteLength) ||
  31547. (object.byteOffset != other.byteOffset)) {
  31548. return false;
  31549. }
  31550. object = object.buffer;
  31551. other = other.buffer;
  31552. case arrayBufferTag:
  31553. if ((object.byteLength != other.byteLength) ||
  31554. !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
  31555. return false;
  31556. }
  31557. return true;
  31558. case boolTag:
  31559. case dateTag:
  31560. case numberTag:
  31561. // Coerce booleans to `1` or `0` and dates to milliseconds.
  31562. // Invalid dates are coerced to `NaN`.
  31563. return eq(+object, +other);
  31564. case errorTag:
  31565. return object.name == other.name && object.message == other.message;
  31566. case regexpTag:
  31567. case stringTag:
  31568. // Coerce regexes to strings and treat strings, primitives and objects,
  31569. // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
  31570. // for more details.
  31571. return object == (other + '');
  31572. case mapTag:
  31573. var convert = mapToArray;
  31574. case setTag:
  31575. var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
  31576. convert || (convert = setToArray);
  31577. if (object.size != other.size && !isPartial) {
  31578. return false;
  31579. }
  31580. // Assume cyclic values are equal.
  31581. var stacked = stack.get(object);
  31582. if (stacked) {
  31583. return stacked == other;
  31584. }
  31585. bitmask |= COMPARE_UNORDERED_FLAG;
  31586. // Recursively compare objects (susceptible to call stack limits).
  31587. stack.set(object, other);
  31588. var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
  31589. stack['delete'](object);
  31590. return result;
  31591. case symbolTag:
  31592. if (symbolValueOf) {
  31593. return symbolValueOf.call(object) == symbolValueOf.call(other);
  31594. }
  31595. }
  31596. return false;
  31597. }
  31598. /**
  31599. * A specialized version of `baseIsEqualDeep` for objects with support for
  31600. * partial deep comparisons.
  31601. *
  31602. * @private
  31603. * @param {Object} object The object to compare.
  31604. * @param {Object} other The other object to compare.
  31605. * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
  31606. * @param {Function} customizer The function to customize comparisons.
  31607. * @param {Function} equalFunc The function to determine equivalents of values.
  31608. * @param {Object} stack Tracks traversed `object` and `other` objects.
  31609. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
  31610. */
  31611. function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
  31612. var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
  31613. objProps = getAllKeys(object),
  31614. objLength = objProps.length,
  31615. othProps = getAllKeys(other),
  31616. othLength = othProps.length;
  31617. if (objLength != othLength && !isPartial) {
  31618. return false;
  31619. }
  31620. var index = objLength;
  31621. while (index--) {
  31622. var key = objProps[index];
  31623. if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
  31624. return false;
  31625. }
  31626. }
  31627. // Assume cyclic values are equal.
  31628. var stacked = stack.get(object);
  31629. if (stacked && stack.get(other)) {
  31630. return stacked == other;
  31631. }
  31632. var result = true;
  31633. stack.set(object, other);
  31634. stack.set(other, object);
  31635. var skipCtor = isPartial;
  31636. while (++index < objLength) {
  31637. key = objProps[index];
  31638. var objValue = object[key],
  31639. othValue = other[key];
  31640. if (customizer) {
  31641. var compared = isPartial
  31642. ? customizer(othValue, objValue, key, other, object, stack)
  31643. : customizer(objValue, othValue, key, object, other, stack);
  31644. }
  31645. // Recursively compare objects (susceptible to call stack limits).
  31646. if (!(compared === undefined
  31647. ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
  31648. : compared
  31649. )) {
  31650. result = false;
  31651. break;
  31652. }
  31653. skipCtor || (skipCtor = key == 'constructor');
  31654. }
  31655. if (result && !skipCtor) {
  31656. var objCtor = object.constructor,
  31657. othCtor = other.constructor;
  31658. // Non `Object` object instances with different constructors are not equal.
  31659. if (objCtor != othCtor &&
  31660. ('constructor' in object && 'constructor' in other) &&
  31661. !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
  31662. typeof othCtor == 'function' && othCtor instanceof othCtor)) {
  31663. result = false;
  31664. }
  31665. }
  31666. stack['delete'](object);
  31667. stack['delete'](other);
  31668. return result;
  31669. }
  31670. /**
  31671. * Creates an array of own enumerable property names and symbols of `object`.
  31672. *
  31673. * @private
  31674. * @param {Object} object The object to query.
  31675. * @returns {Array} Returns the array of property names and symbols.
  31676. */
  31677. function getAllKeys(object) {
  31678. return baseGetAllKeys(object, keys, getSymbols);
  31679. }
  31680. /**
  31681. * Gets the data for `map`.
  31682. *
  31683. * @private
  31684. * @param {Object} map The map to query.
  31685. * @param {string} key The reference key.
  31686. * @returns {*} Returns the map data.
  31687. */
  31688. function getMapData(map, key) {
  31689. var data = map.__data__;
  31690. return isKeyable(key)
  31691. ? data[typeof key == 'string' ? 'string' : 'hash']
  31692. : data.map;
  31693. }
  31694. /**
  31695. * Gets the native function at `key` of `object`.
  31696. *
  31697. * @private
  31698. * @param {Object} object The object to query.
  31699. * @param {string} key The key of the method to get.
  31700. * @returns {*} Returns the function if it's native, else `undefined`.
  31701. */
  31702. function getNative(object, key) {
  31703. var value = getValue(object, key);
  31704. return baseIsNative(value) ? value : undefined;
  31705. }
  31706. /**
  31707. * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
  31708. *
  31709. * @private
  31710. * @param {*} value The value to query.
  31711. * @returns {string} Returns the raw `toStringTag`.
  31712. */
  31713. function getRawTag(value) {
  31714. var isOwn = hasOwnProperty.call(value, symToStringTag),
  31715. tag = value[symToStringTag];
  31716. try {
  31717. value[symToStringTag] = undefined;
  31718. var unmasked = true;
  31719. } catch (e) {}
  31720. var result = nativeObjectToString.call(value);
  31721. if (unmasked) {
  31722. if (isOwn) {
  31723. value[symToStringTag] = tag;
  31724. } else {
  31725. delete value[symToStringTag];
  31726. }
  31727. }
  31728. return result;
  31729. }
  31730. /**
  31731. * Creates an array of the own enumerable symbols of `object`.
  31732. *
  31733. * @private
  31734. * @param {Object} object The object to query.
  31735. * @returns {Array} Returns the array of symbols.
  31736. */
  31737. var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
  31738. if (object == null) {
  31739. return [];
  31740. }
  31741. object = Object(object);
  31742. return arrayFilter(nativeGetSymbols(object), function(symbol) {
  31743. return propertyIsEnumerable.call(object, symbol);
  31744. });
  31745. };
  31746. /**
  31747. * Gets the `toStringTag` of `value`.
  31748. *
  31749. * @private
  31750. * @param {*} value The value to query.
  31751. * @returns {string} Returns the `toStringTag`.
  31752. */
  31753. var getTag = baseGetTag;
  31754. // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
  31755. if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
  31756. (Map && getTag(new Map) != mapTag) ||
  31757. (Promise && getTag(Promise.resolve()) != promiseTag) ||
  31758. (Set && getTag(new Set) != setTag) ||
  31759. (WeakMap && getTag(new WeakMap) != weakMapTag)) {
  31760. getTag = function(value) {
  31761. var result = baseGetTag(value),
  31762. Ctor = result == objectTag ? value.constructor : undefined,
  31763. ctorString = Ctor ? toSource(Ctor) : '';
  31764. if (ctorString) {
  31765. switch (ctorString) {
  31766. case dataViewCtorString: return dataViewTag;
  31767. case mapCtorString: return mapTag;
  31768. case promiseCtorString: return promiseTag;
  31769. case setCtorString: return setTag;
  31770. case weakMapCtorString: return weakMapTag;
  31771. }
  31772. }
  31773. return result;
  31774. };
  31775. }
  31776. /**
  31777. * Checks if `value` is a valid array-like index.
  31778. *
  31779. * @private
  31780. * @param {*} value The value to check.
  31781. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  31782. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  31783. */
  31784. function isIndex(value, length) {
  31785. length = length == null ? MAX_SAFE_INTEGER : length;
  31786. return !!length &&
  31787. (typeof value == 'number' || reIsUint.test(value)) &&
  31788. (value > -1 && value % 1 == 0 && value < length);
  31789. }
  31790. /**
  31791. * Checks if `value` is suitable for use as unique object key.
  31792. *
  31793. * @private
  31794. * @param {*} value The value to check.
  31795. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  31796. */
  31797. function isKeyable(value) {
  31798. var type = typeof value;
  31799. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  31800. ? (value !== '__proto__')
  31801. : (value === null);
  31802. }
  31803. /**
  31804. * Checks if `func` has its source masked.
  31805. *
  31806. * @private
  31807. * @param {Function} func The function to check.
  31808. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  31809. */
  31810. function isMasked(func) {
  31811. return !!maskSrcKey && (maskSrcKey in func);
  31812. }
  31813. /**
  31814. * Checks if `value` is likely a prototype object.
  31815. *
  31816. * @private
  31817. * @param {*} value The value to check.
  31818. * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
  31819. */
  31820. function isPrototype(value) {
  31821. var Ctor = value && value.constructor,
  31822. proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
  31823. return value === proto;
  31824. }
  31825. /**
  31826. * Converts `value` to a string using `Object.prototype.toString`.
  31827. *
  31828. * @private
  31829. * @param {*} value The value to convert.
  31830. * @returns {string} Returns the converted string.
  31831. */
  31832. function objectToString(value) {
  31833. return nativeObjectToString.call(value);
  31834. }
  31835. /**
  31836. * Converts `func` to its source code.
  31837. *
  31838. * @private
  31839. * @param {Function} func The function to convert.
  31840. * @returns {string} Returns the source code.
  31841. */
  31842. function toSource(func) {
  31843. if (func != null) {
  31844. try {
  31845. return funcToString.call(func);
  31846. } catch (e) {}
  31847. try {
  31848. return (func + '');
  31849. } catch (e) {}
  31850. }
  31851. return '';
  31852. }
  31853. /**
  31854. * Performs a
  31855. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  31856. * comparison between two values to determine if they are equivalent.
  31857. *
  31858. * @static
  31859. * @memberOf _
  31860. * @since 4.0.0
  31861. * @category Lang
  31862. * @param {*} value The value to compare.
  31863. * @param {*} other The other value to compare.
  31864. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  31865. * @example
  31866. *
  31867. * var object = { 'a': 1 };
  31868. * var other = { 'a': 1 };
  31869. *
  31870. * _.eq(object, object);
  31871. * // => true
  31872. *
  31873. * _.eq(object, other);
  31874. * // => false
  31875. *
  31876. * _.eq('a', 'a');
  31877. * // => true
  31878. *
  31879. * _.eq('a', Object('a'));
  31880. * // => false
  31881. *
  31882. * _.eq(NaN, NaN);
  31883. * // => true
  31884. */
  31885. function eq(value, other) {
  31886. return value === other || (value !== value && other !== other);
  31887. }
  31888. /**
  31889. * Checks if `value` is likely an `arguments` object.
  31890. *
  31891. * @static
  31892. * @memberOf _
  31893. * @since 0.1.0
  31894. * @category Lang
  31895. * @param {*} value The value to check.
  31896. * @returns {boolean} Returns `true` if `value` is an `arguments` object,
  31897. * else `false`.
  31898. * @example
  31899. *
  31900. * _.isArguments(function() { return arguments; }());
  31901. * // => true
  31902. *
  31903. * _.isArguments([1, 2, 3]);
  31904. * // => false
  31905. */
  31906. var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
  31907. return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
  31908. !propertyIsEnumerable.call(value, 'callee');
  31909. };
  31910. /**
  31911. * Checks if `value` is classified as an `Array` object.
  31912. *
  31913. * @static
  31914. * @memberOf _
  31915. * @since 0.1.0
  31916. * @category Lang
  31917. * @param {*} value The value to check.
  31918. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  31919. * @example
  31920. *
  31921. * _.isArray([1, 2, 3]);
  31922. * // => true
  31923. *
  31924. * _.isArray(document.body.children);
  31925. * // => false
  31926. *
  31927. * _.isArray('abc');
  31928. * // => false
  31929. *
  31930. * _.isArray(_.noop);
  31931. * // => false
  31932. */
  31933. var isArray = Array.isArray;
  31934. /**
  31935. * Checks if `value` is array-like. A value is considered array-like if it's
  31936. * not a function and has a `value.length` that's an integer greater than or
  31937. * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
  31938. *
  31939. * @static
  31940. * @memberOf _
  31941. * @since 4.0.0
  31942. * @category Lang
  31943. * @param {*} value The value to check.
  31944. * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
  31945. * @example
  31946. *
  31947. * _.isArrayLike([1, 2, 3]);
  31948. * // => true
  31949. *
  31950. * _.isArrayLike(document.body.children);
  31951. * // => true
  31952. *
  31953. * _.isArrayLike('abc');
  31954. * // => true
  31955. *
  31956. * _.isArrayLike(_.noop);
  31957. * // => false
  31958. */
  31959. function isArrayLike(value) {
  31960. return value != null && isLength(value.length) && !isFunction(value);
  31961. }
  31962. /**
  31963. * Checks if `value` is a buffer.
  31964. *
  31965. * @static
  31966. * @memberOf _
  31967. * @since 4.3.0
  31968. * @category Lang
  31969. * @param {*} value The value to check.
  31970. * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
  31971. * @example
  31972. *
  31973. * _.isBuffer(new Buffer(2));
  31974. * // => true
  31975. *
  31976. * _.isBuffer(new Uint8Array(2));
  31977. * // => false
  31978. */
  31979. var isBuffer = nativeIsBuffer || stubFalse;
  31980. /**
  31981. * Performs a deep comparison between two values to determine if they are
  31982. * equivalent.
  31983. *
  31984. * **Note:** This method supports comparing arrays, array buffers, booleans,
  31985. * date objects, error objects, maps, numbers, `Object` objects, regexes,
  31986. * sets, strings, symbols, and typed arrays. `Object` objects are compared
  31987. * by their own, not inherited, enumerable properties. Functions and DOM
  31988. * nodes are compared by strict equality, i.e. `===`.
  31989. *
  31990. * @static
  31991. * @memberOf _
  31992. * @since 0.1.0
  31993. * @category Lang
  31994. * @param {*} value The value to compare.
  31995. * @param {*} other The other value to compare.
  31996. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  31997. * @example
  31998. *
  31999. * var object = { 'a': 1 };
  32000. * var other = { 'a': 1 };
  32001. *
  32002. * _.isEqual(object, other);
  32003. * // => true
  32004. *
  32005. * object === other;
  32006. * // => false
  32007. */
  32008. function isEqual(value, other) {
  32009. return baseIsEqual(value, other);
  32010. }
  32011. /**
  32012. * Checks if `value` is classified as a `Function` object.
  32013. *
  32014. * @static
  32015. * @memberOf _
  32016. * @since 0.1.0
  32017. * @category Lang
  32018. * @param {*} value The value to check.
  32019. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  32020. * @example
  32021. *
  32022. * _.isFunction(_);
  32023. * // => true
  32024. *
  32025. * _.isFunction(/abc/);
  32026. * // => false
  32027. */
  32028. function isFunction(value) {
  32029. if (!isObject(value)) {
  32030. return false;
  32031. }
  32032. // The use of `Object#toString` avoids issues with the `typeof` operator
  32033. // in Safari 9 which returns 'object' for typed arrays and other constructors.
  32034. var tag = baseGetTag(value);
  32035. return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
  32036. }
  32037. /**
  32038. * Checks if `value` is a valid array-like length.
  32039. *
  32040. * **Note:** This method is loosely based on
  32041. * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
  32042. *
  32043. * @static
  32044. * @memberOf _
  32045. * @since 4.0.0
  32046. * @category Lang
  32047. * @param {*} value The value to check.
  32048. * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
  32049. * @example
  32050. *
  32051. * _.isLength(3);
  32052. * // => true
  32053. *
  32054. * _.isLength(Number.MIN_VALUE);
  32055. * // => false
  32056. *
  32057. * _.isLength(Infinity);
  32058. * // => false
  32059. *
  32060. * _.isLength('3');
  32061. * // => false
  32062. */
  32063. function isLength(value) {
  32064. return typeof value == 'number' &&
  32065. value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
  32066. }
  32067. /**
  32068. * Checks if `value` is the
  32069. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  32070. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  32071. *
  32072. * @static
  32073. * @memberOf _
  32074. * @since 0.1.0
  32075. * @category Lang
  32076. * @param {*} value The value to check.
  32077. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  32078. * @example
  32079. *
  32080. * _.isObject({});
  32081. * // => true
  32082. *
  32083. * _.isObject([1, 2, 3]);
  32084. * // => true
  32085. *
  32086. * _.isObject(_.noop);
  32087. * // => true
  32088. *
  32089. * _.isObject(null);
  32090. * // => false
  32091. */
  32092. function isObject(value) {
  32093. var type = typeof value;
  32094. return value != null && (type == 'object' || type == 'function');
  32095. }
  32096. /**
  32097. * Checks if `value` is object-like. A value is object-like if it's not `null`
  32098. * and has a `typeof` result of "object".
  32099. *
  32100. * @static
  32101. * @memberOf _
  32102. * @since 4.0.0
  32103. * @category Lang
  32104. * @param {*} value The value to check.
  32105. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  32106. * @example
  32107. *
  32108. * _.isObjectLike({});
  32109. * // => true
  32110. *
  32111. * _.isObjectLike([1, 2, 3]);
  32112. * // => true
  32113. *
  32114. * _.isObjectLike(_.noop);
  32115. * // => false
  32116. *
  32117. * _.isObjectLike(null);
  32118. * // => false
  32119. */
  32120. function isObjectLike(value) {
  32121. return value != null && typeof value == 'object';
  32122. }
  32123. /**
  32124. * Checks if `value` is classified as a typed array.
  32125. *
  32126. * @static
  32127. * @memberOf _
  32128. * @since 3.0.0
  32129. * @category Lang
  32130. * @param {*} value The value to check.
  32131. * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
  32132. * @example
  32133. *
  32134. * _.isTypedArray(new Uint8Array);
  32135. * // => true
  32136. *
  32137. * _.isTypedArray([]);
  32138. * // => false
  32139. */
  32140. var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
  32141. /**
  32142. * Creates an array of the own enumerable property names of `object`.
  32143. *
  32144. * **Note:** Non-object values are coerced to objects. See the
  32145. * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
  32146. * for more details.
  32147. *
  32148. * @static
  32149. * @since 0.1.0
  32150. * @memberOf _
  32151. * @category Object
  32152. * @param {Object} object The object to query.
  32153. * @returns {Array} Returns the array of property names.
  32154. * @example
  32155. *
  32156. * function Foo() {
  32157. * this.a = 1;
  32158. * this.b = 2;
  32159. * }
  32160. *
  32161. * Foo.prototype.c = 3;
  32162. *
  32163. * _.keys(new Foo);
  32164. * // => ['a', 'b'] (iteration order is not guaranteed)
  32165. *
  32166. * _.keys('hi');
  32167. * // => ['0', '1']
  32168. */
  32169. function keys(object) {
  32170. return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
  32171. }
  32172. /**
  32173. * This method returns a new empty array.
  32174. *
  32175. * @static
  32176. * @memberOf _
  32177. * @since 4.13.0
  32178. * @category Util
  32179. * @returns {Array} Returns the new empty array.
  32180. * @example
  32181. *
  32182. * var arrays = _.times(2, _.stubArray);
  32183. *
  32184. * console.log(arrays);
  32185. * // => [[], []]
  32186. *
  32187. * console.log(arrays[0] === arrays[1]);
  32188. * // => false
  32189. */
  32190. function stubArray() {
  32191. return [];
  32192. }
  32193. /**
  32194. * This method returns `false`.
  32195. *
  32196. * @static
  32197. * @memberOf _
  32198. * @since 4.13.0
  32199. * @category Util
  32200. * @returns {boolean} Returns `false`.
  32201. * @example
  32202. *
  32203. * _.times(2, _.stubFalse);
  32204. * // => [false, false]
  32205. */
  32206. function stubFalse() {
  32207. return false;
  32208. }
  32209. module.exports = isEqual;
  32210. /***/ }),
  32211. /***/ "./node_modules/nprogress/nprogress.js":
  32212. /*!*********************************************!*\
  32213. !*** ./node_modules/nprogress/nprogress.js ***!
  32214. \*********************************************/
  32215. /***/ (function(module, exports, __webpack_require__) {
  32216. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
  32217. * @license MIT */
  32218. ;(function(root, factory) {
  32219. if (true) {
  32220. !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  32221. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  32222. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  32223. __WEBPACK_AMD_DEFINE_FACTORY__),
  32224. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  32225. } else {}
  32226. })(this, function() {
  32227. var NProgress = {};
  32228. NProgress.version = '0.2.0';
  32229. var Settings = NProgress.settings = {
  32230. minimum: 0.08,
  32231. easing: 'ease',
  32232. positionUsing: '',
  32233. speed: 200,
  32234. trickle: true,
  32235. trickleRate: 0.02,
  32236. trickleSpeed: 800,
  32237. showSpinner: true,
  32238. barSelector: '[role="bar"]',
  32239. spinnerSelector: '[role="spinner"]',
  32240. parent: 'body',
  32241. template: '<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'
  32242. };
  32243. /**
  32244. * Updates configuration.
  32245. *
  32246. * NProgress.configure({
  32247. * minimum: 0.1
  32248. * });
  32249. */
  32250. NProgress.configure = function(options) {
  32251. var key, value;
  32252. for (key in options) {
  32253. value = options[key];
  32254. if (value !== undefined && options.hasOwnProperty(key)) Settings[key] = value;
  32255. }
  32256. return this;
  32257. };
  32258. /**
  32259. * Last number.
  32260. */
  32261. NProgress.status = null;
  32262. /**
  32263. * Sets the progress bar status, where `n` is a number from `0.0` to `1.0`.
  32264. *
  32265. * NProgress.set(0.4);
  32266. * NProgress.set(1.0);
  32267. */
  32268. NProgress.set = function(n) {
  32269. var started = NProgress.isStarted();
  32270. n = clamp(n, Settings.minimum, 1);
  32271. NProgress.status = (n === 1 ? null : n);
  32272. var progress = NProgress.render(!started),
  32273. bar = progress.querySelector(Settings.barSelector),
  32274. speed = Settings.speed,
  32275. ease = Settings.easing;
  32276. progress.offsetWidth; /* Repaint */
  32277. queue(function(next) {
  32278. // Set positionUsing if it hasn't already been set
  32279. if (Settings.positionUsing === '') Settings.positionUsing = NProgress.getPositioningCSS();
  32280. // Add transition
  32281. css(bar, barPositionCSS(n, speed, ease));
  32282. if (n === 1) {
  32283. // Fade out
  32284. css(progress, {
  32285. transition: 'none',
  32286. opacity: 1
  32287. });
  32288. progress.offsetWidth; /* Repaint */
  32289. setTimeout(function() {
  32290. css(progress, {
  32291. transition: 'all ' + speed + 'ms linear',
  32292. opacity: 0
  32293. });
  32294. setTimeout(function() {
  32295. NProgress.remove();
  32296. next();
  32297. }, speed);
  32298. }, speed);
  32299. } else {
  32300. setTimeout(next, speed);
  32301. }
  32302. });
  32303. return this;
  32304. };
  32305. NProgress.isStarted = function() {
  32306. return typeof NProgress.status === 'number';
  32307. };
  32308. /**
  32309. * Shows the progress bar.
  32310. * This is the same as setting the status to 0%, except that it doesn't go backwards.
  32311. *
  32312. * NProgress.start();
  32313. *
  32314. */
  32315. NProgress.start = function() {
  32316. if (!NProgress.status) NProgress.set(0);
  32317. var work = function() {
  32318. setTimeout(function() {
  32319. if (!NProgress.status) return;
  32320. NProgress.trickle();
  32321. work();
  32322. }, Settings.trickleSpeed);
  32323. };
  32324. if (Settings.trickle) work();
  32325. return this;
  32326. };
  32327. /**
  32328. * Hides the progress bar.
  32329. * This is the *sort of* the same as setting the status to 100%, with the
  32330. * difference being `done()` makes some placebo effect of some realistic motion.
  32331. *
  32332. * NProgress.done();
  32333. *
  32334. * If `true` is passed, it will show the progress bar even if its hidden.
  32335. *
  32336. * NProgress.done(true);
  32337. */
  32338. NProgress.done = function(force) {
  32339. if (!force && !NProgress.status) return this;
  32340. return NProgress.inc(0.3 + 0.5 * Math.random()).set(1);
  32341. };
  32342. /**
  32343. * Increments by a random amount.
  32344. */
  32345. NProgress.inc = function(amount) {
  32346. var n = NProgress.status;
  32347. if (!n) {
  32348. return NProgress.start();
  32349. } else {
  32350. if (typeof amount !== 'number') {
  32351. amount = (1 - n) * clamp(Math.random() * n, 0.1, 0.95);
  32352. }
  32353. n = clamp(n + amount, 0, 0.994);
  32354. return NProgress.set(n);
  32355. }
  32356. };
  32357. NProgress.trickle = function() {
  32358. return NProgress.inc(Math.random() * Settings.trickleRate);
  32359. };
  32360. /**
  32361. * Waits for all supplied jQuery promises and
  32362. * increases the progress as the promises resolve.
  32363. *
  32364. * @param $promise jQUery Promise
  32365. */
  32366. (function() {
  32367. var initial = 0, current = 0;
  32368. NProgress.promise = function($promise) {
  32369. if (!$promise || $promise.state() === "resolved") {
  32370. return this;
  32371. }
  32372. if (current === 0) {
  32373. NProgress.start();
  32374. }
  32375. initial++;
  32376. current++;
  32377. $promise.always(function() {
  32378. current--;
  32379. if (current === 0) {
  32380. initial = 0;
  32381. NProgress.done();
  32382. } else {
  32383. NProgress.set((initial - current) / initial);
  32384. }
  32385. });
  32386. return this;
  32387. };
  32388. })();
  32389. /**
  32390. * (Internal) renders the progress bar markup based on the `template`
  32391. * setting.
  32392. */
  32393. NProgress.render = function(fromStart) {
  32394. if (NProgress.isRendered()) return document.getElementById('nprogress');
  32395. addClass(document.documentElement, 'nprogress-busy');
  32396. var progress = document.createElement('div');
  32397. progress.id = 'nprogress';
  32398. progress.innerHTML = Settings.template;
  32399. var bar = progress.querySelector(Settings.barSelector),
  32400. perc = fromStart ? '-100' : toBarPerc(NProgress.status || 0),
  32401. parent = document.querySelector(Settings.parent),
  32402. spinner;
  32403. css(bar, {
  32404. transition: 'all 0 linear',
  32405. transform: 'translate3d(' + perc + '%,0,0)'
  32406. });
  32407. if (!Settings.showSpinner) {
  32408. spinner = progress.querySelector(Settings.spinnerSelector);
  32409. spinner && removeElement(spinner);
  32410. }
  32411. if (parent != document.body) {
  32412. addClass(parent, 'nprogress-custom-parent');
  32413. }
  32414. parent.appendChild(progress);
  32415. return progress;
  32416. };
  32417. /**
  32418. * Removes the element. Opposite of render().
  32419. */
  32420. NProgress.remove = function() {
  32421. removeClass(document.documentElement, 'nprogress-busy');
  32422. removeClass(document.querySelector(Settings.parent), 'nprogress-custom-parent');
  32423. var progress = document.getElementById('nprogress');
  32424. progress && removeElement(progress);
  32425. };
  32426. /**
  32427. * Checks if the progress bar is rendered.
  32428. */
  32429. NProgress.isRendered = function() {
  32430. return !!document.getElementById('nprogress');
  32431. };
  32432. /**
  32433. * Determine which positioning CSS rule to use.
  32434. */
  32435. NProgress.getPositioningCSS = function() {
  32436. // Sniff on document.body.style
  32437. var bodyStyle = document.body.style;
  32438. // Sniff prefixes
  32439. var vendorPrefix = ('WebkitTransform' in bodyStyle) ? 'Webkit' :
  32440. ('MozTransform' in bodyStyle) ? 'Moz' :
  32441. ('msTransform' in bodyStyle) ? 'ms' :
  32442. ('OTransform' in bodyStyle) ? 'O' : '';
  32443. if (vendorPrefix + 'Perspective' in bodyStyle) {
  32444. // Modern browsers with 3D support, e.g. Webkit, IE10
  32445. return 'translate3d';
  32446. } else if (vendorPrefix + 'Transform' in bodyStyle) {
  32447. // Browsers without 3D support, e.g. IE9
  32448. return 'translate';
  32449. } else {
  32450. // Browsers without translate() support, e.g. IE7-8
  32451. return 'margin';
  32452. }
  32453. };
  32454. /**
  32455. * Helpers
  32456. */
  32457. function clamp(n, min, max) {
  32458. if (n < min) return min;
  32459. if (n > max) return max;
  32460. return n;
  32461. }
  32462. /**
  32463. * (Internal) converts a percentage (`0..1`) to a bar translateX
  32464. * percentage (`-100%..0%`).
  32465. */
  32466. function toBarPerc(n) {
  32467. return (-1 + n) * 100;
  32468. }
  32469. /**
  32470. * (Internal) returns the correct CSS for changing the bar's
  32471. * position given an n percentage, and speed and ease from Settings
  32472. */
  32473. function barPositionCSS(n, speed, ease) {
  32474. var barCSS;
  32475. if (Settings.positionUsing === 'translate3d') {
  32476. barCSS = { transform: 'translate3d('+toBarPerc(n)+'%,0,0)' };
  32477. } else if (Settings.positionUsing === 'translate') {
  32478. barCSS = { transform: 'translate('+toBarPerc(n)+'%,0)' };
  32479. } else {
  32480. barCSS = { 'margin-left': toBarPerc(n)+'%' };
  32481. }
  32482. barCSS.transition = 'all '+speed+'ms '+ease;
  32483. return barCSS;
  32484. }
  32485. /**
  32486. * (Internal) Queues a function to be executed.
  32487. */
  32488. var queue = (function() {
  32489. var pending = [];
  32490. function next() {
  32491. var fn = pending.shift();
  32492. if (fn) {
  32493. fn(next);
  32494. }
  32495. }
  32496. return function(fn) {
  32497. pending.push(fn);
  32498. if (pending.length == 1) next();
  32499. };
  32500. })();
  32501. /**
  32502. * (Internal) Applies css properties to an element, similar to the jQuery
  32503. * css method.
  32504. *
  32505. * While this helper does assist with vendor prefixed property names, it
  32506. * does not perform any manipulation of values prior to setting styles.
  32507. */
  32508. var css = (function() {
  32509. var cssPrefixes = [ 'Webkit', 'O', 'Moz', 'ms' ],
  32510. cssProps = {};
  32511. function camelCase(string) {
  32512. return string.replace(/^-ms-/, 'ms-').replace(/-([\da-z])/gi, function(match, letter) {
  32513. return letter.toUpperCase();
  32514. });
  32515. }
  32516. function getVendorProp(name) {
  32517. var style = document.body.style;
  32518. if (name in style) return name;
  32519. var i = cssPrefixes.length,
  32520. capName = name.charAt(0).toUpperCase() + name.slice(1),
  32521. vendorName;
  32522. while (i--) {
  32523. vendorName = cssPrefixes[i] + capName;
  32524. if (vendorName in style) return vendorName;
  32525. }
  32526. return name;
  32527. }
  32528. function getStyleProp(name) {
  32529. name = camelCase(name);
  32530. return cssProps[name] || (cssProps[name] = getVendorProp(name));
  32531. }
  32532. function applyCss(element, prop, value) {
  32533. prop = getStyleProp(prop);
  32534. element.style[prop] = value;
  32535. }
  32536. return function(element, properties) {
  32537. var args = arguments,
  32538. prop,
  32539. value;
  32540. if (args.length == 2) {
  32541. for (prop in properties) {
  32542. value = properties[prop];
  32543. if (value !== undefined && properties.hasOwnProperty(prop)) applyCss(element, prop, value);
  32544. }
  32545. } else {
  32546. applyCss(element, args[1], args[2]);
  32547. }
  32548. }
  32549. })();
  32550. /**
  32551. * (Internal) Determines if an element or space separated list of class names contains a class name.
  32552. */
  32553. function hasClass(element, name) {
  32554. var list = typeof element == 'string' ? element : classList(element);
  32555. return list.indexOf(' ' + name + ' ') >= 0;
  32556. }
  32557. /**
  32558. * (Internal) Adds a class to an element.
  32559. */
  32560. function addClass(element, name) {
  32561. var oldList = classList(element),
  32562. newList = oldList + name;
  32563. if (hasClass(oldList, name)) return;
  32564. // Trim the opening space.
  32565. element.className = newList.substring(1);
  32566. }
  32567. /**
  32568. * (Internal) Removes a class from an element.
  32569. */
  32570. function removeClass(element, name) {
  32571. var oldList = classList(element),
  32572. newList;
  32573. if (!hasClass(element, name)) return;
  32574. // Replace the class name.
  32575. newList = oldList.replace(' ' + name + ' ', ' ');
  32576. // Trim the opening and closing spaces.
  32577. element.className = newList.substring(1, newList.length - 1);
  32578. }
  32579. /**
  32580. * (Internal) Gets a space separated list of the class names on the element.
  32581. * The list is wrapped with a single space on each end to facilitate finding
  32582. * matches within the list.
  32583. */
  32584. function classList(element) {
  32585. return (' ' + (element.className || '') + ' ').replace(/\s+/gi, ' ');
  32586. }
  32587. /**
  32588. * (Internal) Removes an element from the DOM.
  32589. */
  32590. function removeElement(element) {
  32591. element && element.parentNode && element.parentNode.removeChild(element);
  32592. }
  32593. return NProgress;
  32594. });
  32595. /***/ }),
  32596. /***/ "./node_modules/object-inspect/index.js":
  32597. /*!**********************************************!*\
  32598. !*** ./node_modules/object-inspect/index.js ***!
  32599. \**********************************************/
  32600. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  32601. var hasMap = typeof Map === 'function' && Map.prototype;
  32602. var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
  32603. var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
  32604. var mapForEach = hasMap && Map.prototype.forEach;
  32605. var hasSet = typeof Set === 'function' && Set.prototype;
  32606. var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
  32607. var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
  32608. var setForEach = hasSet && Set.prototype.forEach;
  32609. var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
  32610. var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
  32611. var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
  32612. var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
  32613. var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
  32614. var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
  32615. var booleanValueOf = Boolean.prototype.valueOf;
  32616. var objectToString = Object.prototype.toString;
  32617. var functionToString = Function.prototype.toString;
  32618. var $match = String.prototype.match;
  32619. var $slice = String.prototype.slice;
  32620. var $replace = String.prototype.replace;
  32621. var $toUpperCase = String.prototype.toUpperCase;
  32622. var $toLowerCase = String.prototype.toLowerCase;
  32623. var $test = RegExp.prototype.test;
  32624. var $concat = Array.prototype.concat;
  32625. var $join = Array.prototype.join;
  32626. var $arrSlice = Array.prototype.slice;
  32627. var $floor = Math.floor;
  32628. var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
  32629. var gOPS = Object.getOwnPropertySymbols;
  32630. var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
  32631. var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
  32632. // ie, `has-tostringtag/shams
  32633. var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
  32634. ? Symbol.toStringTag
  32635. : null;
  32636. var isEnumerable = Object.prototype.propertyIsEnumerable;
  32637. var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
  32638. [].__proto__ === Array.prototype // eslint-disable-line no-proto
  32639. ? function (O) {
  32640. return O.__proto__; // eslint-disable-line no-proto
  32641. }
  32642. : null
  32643. );
  32644. function addNumericSeparator(num, str) {
  32645. if (
  32646. num === Infinity
  32647. || num === -Infinity
  32648. || num !== num
  32649. || (num && num > -1000 && num < 1000)
  32650. || $test.call(/e/, str)
  32651. ) {
  32652. return str;
  32653. }
  32654. var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
  32655. if (typeof num === 'number') {
  32656. var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
  32657. if (int !== num) {
  32658. var intStr = String(int);
  32659. var dec = $slice.call(str, intStr.length + 1);
  32660. return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
  32661. }
  32662. }
  32663. return $replace.call(str, sepRegex, '$&_');
  32664. }
  32665. var inspectCustom = (__webpack_require__(/*! ./util.inspect */ "?2128").custom);
  32666. var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
  32667. module.exports = function inspect_(obj, options, depth, seen) {
  32668. var opts = options || {};
  32669. if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
  32670. throw new TypeError('option "quoteStyle" must be "single" or "double"');
  32671. }
  32672. if (
  32673. has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
  32674. ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
  32675. : opts.maxStringLength !== null
  32676. )
  32677. ) {
  32678. throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  32679. }
  32680. var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
  32681. if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
  32682. throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
  32683. }
  32684. if (
  32685. has(opts, 'indent')
  32686. && opts.indent !== null
  32687. && opts.indent !== '\t'
  32688. && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
  32689. ) {
  32690. throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
  32691. }
  32692. if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
  32693. throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
  32694. }
  32695. var numericSeparator = opts.numericSeparator;
  32696. if (typeof obj === 'undefined') {
  32697. return 'undefined';
  32698. }
  32699. if (obj === null) {
  32700. return 'null';
  32701. }
  32702. if (typeof obj === 'boolean') {
  32703. return obj ? 'true' : 'false';
  32704. }
  32705. if (typeof obj === 'string') {
  32706. return inspectString(obj, opts);
  32707. }
  32708. if (typeof obj === 'number') {
  32709. if (obj === 0) {
  32710. return Infinity / obj > 0 ? '0' : '-0';
  32711. }
  32712. var str = String(obj);
  32713. return numericSeparator ? addNumericSeparator(obj, str) : str;
  32714. }
  32715. if (typeof obj === 'bigint') {
  32716. var bigIntStr = String(obj) + 'n';
  32717. return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
  32718. }
  32719. var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
  32720. if (typeof depth === 'undefined') { depth = 0; }
  32721. if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
  32722. return isArray(obj) ? '[Array]' : '[Object]';
  32723. }
  32724. var indent = getIndent(opts, depth);
  32725. if (typeof seen === 'undefined') {
  32726. seen = [];
  32727. } else if (indexOf(seen, obj) >= 0) {
  32728. return '[Circular]';
  32729. }
  32730. function inspect(value, from, noIndent) {
  32731. if (from) {
  32732. seen = $arrSlice.call(seen);
  32733. seen.push(from);
  32734. }
  32735. if (noIndent) {
  32736. var newOpts = {
  32737. depth: opts.depth
  32738. };
  32739. if (has(opts, 'quoteStyle')) {
  32740. newOpts.quoteStyle = opts.quoteStyle;
  32741. }
  32742. return inspect_(value, newOpts, depth + 1, seen);
  32743. }
  32744. return inspect_(value, opts, depth + 1, seen);
  32745. }
  32746. if (typeof obj === 'function') {
  32747. var name = nameOf(obj);
  32748. var keys = arrObjKeys(obj, inspect);
  32749. return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
  32750. }
  32751. if (isSymbol(obj)) {
  32752. var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
  32753. return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
  32754. }
  32755. if (isElement(obj)) {
  32756. var s = '<' + $toLowerCase.call(String(obj.nodeName));
  32757. var attrs = obj.attributes || [];
  32758. for (var i = 0; i < attrs.length; i++) {
  32759. s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
  32760. }
  32761. s += '>';
  32762. if (obj.childNodes && obj.childNodes.length) { s += '...'; }
  32763. s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
  32764. return s;
  32765. }
  32766. if (isArray(obj)) {
  32767. if (obj.length === 0) { return '[]'; }
  32768. var xs = arrObjKeys(obj, inspect);
  32769. if (indent && !singleLineValues(xs)) {
  32770. return '[' + indentedJoin(xs, indent) + ']';
  32771. }
  32772. return '[ ' + $join.call(xs, ', ') + ' ]';
  32773. }
  32774. if (isError(obj)) {
  32775. var parts = arrObjKeys(obj, inspect);
  32776. if ('cause' in obj && !isEnumerable.call(obj, 'cause')) {
  32777. return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
  32778. }
  32779. if (parts.length === 0) { return '[' + String(obj) + ']'; }
  32780. return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
  32781. }
  32782. if (typeof obj === 'object' && customInspect) {
  32783. if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
  32784. return obj[inspectSymbol]();
  32785. } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
  32786. return obj.inspect();
  32787. }
  32788. }
  32789. if (isMap(obj)) {
  32790. var mapParts = [];
  32791. mapForEach.call(obj, function (value, key) {
  32792. mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
  32793. });
  32794. return collectionOf('Map', mapSize.call(obj), mapParts, indent);
  32795. }
  32796. if (isSet(obj)) {
  32797. var setParts = [];
  32798. setForEach.call(obj, function (value) {
  32799. setParts.push(inspect(value, obj));
  32800. });
  32801. return collectionOf('Set', setSize.call(obj), setParts, indent);
  32802. }
  32803. if (isWeakMap(obj)) {
  32804. return weakCollectionOf('WeakMap');
  32805. }
  32806. if (isWeakSet(obj)) {
  32807. return weakCollectionOf('WeakSet');
  32808. }
  32809. if (isWeakRef(obj)) {
  32810. return weakCollectionOf('WeakRef');
  32811. }
  32812. if (isNumber(obj)) {
  32813. return markBoxed(inspect(Number(obj)));
  32814. }
  32815. if (isBigInt(obj)) {
  32816. return markBoxed(inspect(bigIntValueOf.call(obj)));
  32817. }
  32818. if (isBoolean(obj)) {
  32819. return markBoxed(booleanValueOf.call(obj));
  32820. }
  32821. if (isString(obj)) {
  32822. return markBoxed(inspect(String(obj)));
  32823. }
  32824. if (!isDate(obj) && !isRegExp(obj)) {
  32825. var ys = arrObjKeys(obj, inspect);
  32826. var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
  32827. var protoTag = obj instanceof Object ? '' : 'null prototype';
  32828. var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
  32829. var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
  32830. var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
  32831. if (ys.length === 0) { return tag + '{}'; }
  32832. if (indent) {
  32833. return tag + '{' + indentedJoin(ys, indent) + '}';
  32834. }
  32835. return tag + '{ ' + $join.call(ys, ', ') + ' }';
  32836. }
  32837. return String(obj);
  32838. };
  32839. function wrapQuotes(s, defaultStyle, opts) {
  32840. var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
  32841. return quoteChar + s + quoteChar;
  32842. }
  32843. function quote(s) {
  32844. return $replace.call(String(s), /"/g, '&quot;');
  32845. }
  32846. function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  32847. function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  32848. function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  32849. function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  32850. function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  32851. function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  32852. function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  32853. // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
  32854. function isSymbol(obj) {
  32855. if (hasShammedSymbols) {
  32856. return obj && typeof obj === 'object' && obj instanceof Symbol;
  32857. }
  32858. if (typeof obj === 'symbol') {
  32859. return true;
  32860. }
  32861. if (!obj || typeof obj !== 'object' || !symToString) {
  32862. return false;
  32863. }
  32864. try {
  32865. symToString.call(obj);
  32866. return true;
  32867. } catch (e) {}
  32868. return false;
  32869. }
  32870. function isBigInt(obj) {
  32871. if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
  32872. return false;
  32873. }
  32874. try {
  32875. bigIntValueOf.call(obj);
  32876. return true;
  32877. } catch (e) {}
  32878. return false;
  32879. }
  32880. var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
  32881. function has(obj, key) {
  32882. return hasOwn.call(obj, key);
  32883. }
  32884. function toStr(obj) {
  32885. return objectToString.call(obj);
  32886. }
  32887. function nameOf(f) {
  32888. if (f.name) { return f.name; }
  32889. var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
  32890. if (m) { return m[1]; }
  32891. return null;
  32892. }
  32893. function indexOf(xs, x) {
  32894. if (xs.indexOf) { return xs.indexOf(x); }
  32895. for (var i = 0, l = xs.length; i < l; i++) {
  32896. if (xs[i] === x) { return i; }
  32897. }
  32898. return -1;
  32899. }
  32900. function isMap(x) {
  32901. if (!mapSize || !x || typeof x !== 'object') {
  32902. return false;
  32903. }
  32904. try {
  32905. mapSize.call(x);
  32906. try {
  32907. setSize.call(x);
  32908. } catch (s) {
  32909. return true;
  32910. }
  32911. return x instanceof Map; // core-js workaround, pre-v2.5.0
  32912. } catch (e) {}
  32913. return false;
  32914. }
  32915. function isWeakMap(x) {
  32916. if (!weakMapHas || !x || typeof x !== 'object') {
  32917. return false;
  32918. }
  32919. try {
  32920. weakMapHas.call(x, weakMapHas);
  32921. try {
  32922. weakSetHas.call(x, weakSetHas);
  32923. } catch (s) {
  32924. return true;
  32925. }
  32926. return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
  32927. } catch (e) {}
  32928. return false;
  32929. }
  32930. function isWeakRef(x) {
  32931. if (!weakRefDeref || !x || typeof x !== 'object') {
  32932. return false;
  32933. }
  32934. try {
  32935. weakRefDeref.call(x);
  32936. return true;
  32937. } catch (e) {}
  32938. return false;
  32939. }
  32940. function isSet(x) {
  32941. if (!setSize || !x || typeof x !== 'object') {
  32942. return false;
  32943. }
  32944. try {
  32945. setSize.call(x);
  32946. try {
  32947. mapSize.call(x);
  32948. } catch (m) {
  32949. return true;
  32950. }
  32951. return x instanceof Set; // core-js workaround, pre-v2.5.0
  32952. } catch (e) {}
  32953. return false;
  32954. }
  32955. function isWeakSet(x) {
  32956. if (!weakSetHas || !x || typeof x !== 'object') {
  32957. return false;
  32958. }
  32959. try {
  32960. weakSetHas.call(x, weakSetHas);
  32961. try {
  32962. weakMapHas.call(x, weakMapHas);
  32963. } catch (s) {
  32964. return true;
  32965. }
  32966. return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
  32967. } catch (e) {}
  32968. return false;
  32969. }
  32970. function isElement(x) {
  32971. if (!x || typeof x !== 'object') { return false; }
  32972. if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
  32973. return true;
  32974. }
  32975. return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
  32976. }
  32977. function inspectString(str, opts) {
  32978. if (str.length > opts.maxStringLength) {
  32979. var remaining = str.length - opts.maxStringLength;
  32980. var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
  32981. return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
  32982. }
  32983. // eslint-disable-next-line no-control-regex
  32984. var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
  32985. return wrapQuotes(s, 'single', opts);
  32986. }
  32987. function lowbyte(c) {
  32988. var n = c.charCodeAt(0);
  32989. var x = {
  32990. 8: 'b',
  32991. 9: 't',
  32992. 10: 'n',
  32993. 12: 'f',
  32994. 13: 'r'
  32995. }[n];
  32996. if (x) { return '\\' + x; }
  32997. return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
  32998. }
  32999. function markBoxed(str) {
  33000. return 'Object(' + str + ')';
  33001. }
  33002. function weakCollectionOf(type) {
  33003. return type + ' { ? }';
  33004. }
  33005. function collectionOf(type, size, entries, indent) {
  33006. var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
  33007. return type + ' (' + size + ') {' + joinedEntries + '}';
  33008. }
  33009. function singleLineValues(xs) {
  33010. for (var i = 0; i < xs.length; i++) {
  33011. if (indexOf(xs[i], '\n') >= 0) {
  33012. return false;
  33013. }
  33014. }
  33015. return true;
  33016. }
  33017. function getIndent(opts, depth) {
  33018. var baseIndent;
  33019. if (opts.indent === '\t') {
  33020. baseIndent = '\t';
  33021. } else if (typeof opts.indent === 'number' && opts.indent > 0) {
  33022. baseIndent = $join.call(Array(opts.indent + 1), ' ');
  33023. } else {
  33024. return null;
  33025. }
  33026. return {
  33027. base: baseIndent,
  33028. prev: $join.call(Array(depth + 1), baseIndent)
  33029. };
  33030. }
  33031. function indentedJoin(xs, indent) {
  33032. if (xs.length === 0) { return ''; }
  33033. var lineJoiner = '\n' + indent.prev + indent.base;
  33034. return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
  33035. }
  33036. function arrObjKeys(obj, inspect) {
  33037. var isArr = isArray(obj);
  33038. var xs = [];
  33039. if (isArr) {
  33040. xs.length = obj.length;
  33041. for (var i = 0; i < obj.length; i++) {
  33042. xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
  33043. }
  33044. }
  33045. var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
  33046. var symMap;
  33047. if (hasShammedSymbols) {
  33048. symMap = {};
  33049. for (var k = 0; k < syms.length; k++) {
  33050. symMap['$' + syms[k]] = syms[k];
  33051. }
  33052. }
  33053. for (var key in obj) { // eslint-disable-line no-restricted-syntax
  33054. if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
  33055. if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
  33056. if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
  33057. // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
  33058. continue; // eslint-disable-line no-restricted-syntax, no-continue
  33059. } else if ($test.call(/[^\w$]/, key)) {
  33060. xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
  33061. } else {
  33062. xs.push(key + ': ' + inspect(obj[key], obj));
  33063. }
  33064. }
  33065. if (typeof gOPS === 'function') {
  33066. for (var j = 0; j < syms.length; j++) {
  33067. if (isEnumerable.call(obj, syms[j])) {
  33068. xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
  33069. }
  33070. }
  33071. }
  33072. return xs;
  33073. }
  33074. /***/ }),
  33075. /***/ "./node_modules/process/browser.js":
  33076. /*!*****************************************!*\
  33077. !*** ./node_modules/process/browser.js ***!
  33078. \*****************************************/
  33079. /***/ ((module) => {
  33080. // shim for using process in browser
  33081. var process = module.exports = {};
  33082. // cached from whatever global is present so that test runners that stub it
  33083. // don't break things. But we need to wrap it in a try catch in case it is
  33084. // wrapped in strict mode code which doesn't define any globals. It's inside a
  33085. // function because try/catches deoptimize in certain engines.
  33086. var cachedSetTimeout;
  33087. var cachedClearTimeout;
  33088. function defaultSetTimout() {
  33089. throw new Error('setTimeout has not been defined');
  33090. }
  33091. function defaultClearTimeout () {
  33092. throw new Error('clearTimeout has not been defined');
  33093. }
  33094. (function () {
  33095. try {
  33096. if (typeof setTimeout === 'function') {
  33097. cachedSetTimeout = setTimeout;
  33098. } else {
  33099. cachedSetTimeout = defaultSetTimout;
  33100. }
  33101. } catch (e) {
  33102. cachedSetTimeout = defaultSetTimout;
  33103. }
  33104. try {
  33105. if (typeof clearTimeout === 'function') {
  33106. cachedClearTimeout = clearTimeout;
  33107. } else {
  33108. cachedClearTimeout = defaultClearTimeout;
  33109. }
  33110. } catch (e) {
  33111. cachedClearTimeout = defaultClearTimeout;
  33112. }
  33113. } ())
  33114. function runTimeout(fun) {
  33115. if (cachedSetTimeout === setTimeout) {
  33116. //normal enviroments in sane situations
  33117. return setTimeout(fun, 0);
  33118. }
  33119. // if setTimeout wasn't available but was latter defined
  33120. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  33121. cachedSetTimeout = setTimeout;
  33122. return setTimeout(fun, 0);
  33123. }
  33124. try {
  33125. // when when somebody has screwed with setTimeout but no I.E. maddness
  33126. return cachedSetTimeout(fun, 0);
  33127. } catch(e){
  33128. try {
  33129. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  33130. return cachedSetTimeout.call(null, fun, 0);
  33131. } catch(e){
  33132. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  33133. return cachedSetTimeout.call(this, fun, 0);
  33134. }
  33135. }
  33136. }
  33137. function runClearTimeout(marker) {
  33138. if (cachedClearTimeout === clearTimeout) {
  33139. //normal enviroments in sane situations
  33140. return clearTimeout(marker);
  33141. }
  33142. // if clearTimeout wasn't available but was latter defined
  33143. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  33144. cachedClearTimeout = clearTimeout;
  33145. return clearTimeout(marker);
  33146. }
  33147. try {
  33148. // when when somebody has screwed with setTimeout but no I.E. maddness
  33149. return cachedClearTimeout(marker);
  33150. } catch (e){
  33151. try {
  33152. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  33153. return cachedClearTimeout.call(null, marker);
  33154. } catch (e){
  33155. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  33156. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  33157. return cachedClearTimeout.call(this, marker);
  33158. }
  33159. }
  33160. }
  33161. var queue = [];
  33162. var draining = false;
  33163. var currentQueue;
  33164. var queueIndex = -1;
  33165. function cleanUpNextTick() {
  33166. if (!draining || !currentQueue) {
  33167. return;
  33168. }
  33169. draining = false;
  33170. if (currentQueue.length) {
  33171. queue = currentQueue.concat(queue);
  33172. } else {
  33173. queueIndex = -1;
  33174. }
  33175. if (queue.length) {
  33176. drainQueue();
  33177. }
  33178. }
  33179. function drainQueue() {
  33180. if (draining) {
  33181. return;
  33182. }
  33183. var timeout = runTimeout(cleanUpNextTick);
  33184. draining = true;
  33185. var len = queue.length;
  33186. while(len) {
  33187. currentQueue = queue;
  33188. queue = [];
  33189. while (++queueIndex < len) {
  33190. if (currentQueue) {
  33191. currentQueue[queueIndex].run();
  33192. }
  33193. }
  33194. queueIndex = -1;
  33195. len = queue.length;
  33196. }
  33197. currentQueue = null;
  33198. draining = false;
  33199. runClearTimeout(timeout);
  33200. }
  33201. process.nextTick = function (fun) {
  33202. var args = new Array(arguments.length - 1);
  33203. if (arguments.length > 1) {
  33204. for (var i = 1; i < arguments.length; i++) {
  33205. args[i - 1] = arguments[i];
  33206. }
  33207. }
  33208. queue.push(new Item(fun, args));
  33209. if (queue.length === 1 && !draining) {
  33210. runTimeout(drainQueue);
  33211. }
  33212. };
  33213. // v8 likes predictible objects
  33214. function Item(fun, array) {
  33215. this.fun = fun;
  33216. this.array = array;
  33217. }
  33218. Item.prototype.run = function () {
  33219. this.fun.apply(null, this.array);
  33220. };
  33221. process.title = 'browser';
  33222. process.browser = true;
  33223. process.env = {};
  33224. process.argv = [];
  33225. process.version = ''; // empty string to avoid regexp issues
  33226. process.versions = {};
  33227. function noop() {}
  33228. process.on = noop;
  33229. process.addListener = noop;
  33230. process.once = noop;
  33231. process.off = noop;
  33232. process.removeListener = noop;
  33233. process.removeAllListeners = noop;
  33234. process.emit = noop;
  33235. process.prependListener = noop;
  33236. process.prependOnceListener = noop;
  33237. process.listeners = function (name) { return [] }
  33238. process.binding = function (name) {
  33239. throw new Error('process.binding is not supported');
  33240. };
  33241. process.cwd = function () { return '/' };
  33242. process.chdir = function (dir) {
  33243. throw new Error('process.chdir is not supported');
  33244. };
  33245. process.umask = function() { return 0; };
  33246. /***/ }),
  33247. /***/ "./node_modules/side-channel/index.js":
  33248. /*!********************************************!*\
  33249. !*** ./node_modules/side-channel/index.js ***!
  33250. \********************************************/
  33251. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  33252. "use strict";
  33253. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "./node_modules/get-intrinsic/index.js");
  33254. var callBound = __webpack_require__(/*! call-bind/callBound */ "./node_modules/call-bind/callBound.js");
  33255. var inspect = __webpack_require__(/*! object-inspect */ "./node_modules/object-inspect/index.js");
  33256. var $TypeError = GetIntrinsic('%TypeError%');
  33257. var $WeakMap = GetIntrinsic('%WeakMap%', true);
  33258. var $Map = GetIntrinsic('%Map%', true);
  33259. var $weakMapGet = callBound('WeakMap.prototype.get', true);
  33260. var $weakMapSet = callBound('WeakMap.prototype.set', true);
  33261. var $weakMapHas = callBound('WeakMap.prototype.has', true);
  33262. var $mapGet = callBound('Map.prototype.get', true);
  33263. var $mapSet = callBound('Map.prototype.set', true);
  33264. var $mapHas = callBound('Map.prototype.has', true);
  33265. /*
  33266. * This function traverses the list returning the node corresponding to the
  33267. * given key.
  33268. *
  33269. * That node is also moved to the head of the list, so that if it's accessed
  33270. * again we don't need to traverse the whole list. By doing so, all the recently
  33271. * used nodes can be accessed relatively quickly.
  33272. */
  33273. var listGetNode = function (list, key) { // eslint-disable-line consistent-return
  33274. for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
  33275. if (curr.key === key) {
  33276. prev.next = curr.next;
  33277. curr.next = list.next;
  33278. list.next = curr; // eslint-disable-line no-param-reassign
  33279. return curr;
  33280. }
  33281. }
  33282. };
  33283. var listGet = function (objects, key) {
  33284. var node = listGetNode(objects, key);
  33285. return node && node.value;
  33286. };
  33287. var listSet = function (objects, key, value) {
  33288. var node = listGetNode(objects, key);
  33289. if (node) {
  33290. node.value = value;
  33291. } else {
  33292. // Prepend the new node to the beginning of the list
  33293. objects.next = { // eslint-disable-line no-param-reassign
  33294. key: key,
  33295. next: objects.next,
  33296. value: value
  33297. };
  33298. }
  33299. };
  33300. var listHas = function (objects, key) {
  33301. return !!listGetNode(objects, key);
  33302. };
  33303. module.exports = function getSideChannel() {
  33304. var $wm;
  33305. var $m;
  33306. var $o;
  33307. var channel = {
  33308. assert: function (key) {
  33309. if (!channel.has(key)) {
  33310. throw new $TypeError('Side channel does not contain ' + inspect(key));
  33311. }
  33312. },
  33313. get: function (key) { // eslint-disable-line consistent-return
  33314. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  33315. if ($wm) {
  33316. return $weakMapGet($wm, key);
  33317. }
  33318. } else if ($Map) {
  33319. if ($m) {
  33320. return $mapGet($m, key);
  33321. }
  33322. } else {
  33323. if ($o) { // eslint-disable-line no-lonely-if
  33324. return listGet($o, key);
  33325. }
  33326. }
  33327. },
  33328. has: function (key) {
  33329. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  33330. if ($wm) {
  33331. return $weakMapHas($wm, key);
  33332. }
  33333. } else if ($Map) {
  33334. if ($m) {
  33335. return $mapHas($m, key);
  33336. }
  33337. } else {
  33338. if ($o) { // eslint-disable-line no-lonely-if
  33339. return listHas($o, key);
  33340. }
  33341. }
  33342. return false;
  33343. },
  33344. set: function (key, value) {
  33345. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  33346. if (!$wm) {
  33347. $wm = new $WeakMap();
  33348. }
  33349. $weakMapSet($wm, key, value);
  33350. } else if ($Map) {
  33351. if (!$m) {
  33352. $m = new $Map();
  33353. }
  33354. $mapSet($m, key, value);
  33355. } else {
  33356. if (!$o) {
  33357. /*
  33358. * Initialize the linked list as an empty node, so that we don't have
  33359. * to special-case handling of the first node: we can always refer to
  33360. * it as (previous node).next, instead of something like (list).head
  33361. */
  33362. $o = { key: {}, next: null };
  33363. }
  33364. listSet($o, key, value);
  33365. }
  33366. }
  33367. };
  33368. return channel;
  33369. };
  33370. /***/ }),
  33371. /***/ "./node_modules/vue/dist/vue.esm-bundler.js":
  33372. /*!**************************************************!*\
  33373. !*** ./node_modules/vue/dist/vue.esm-bundler.js ***!
  33374. \**************************************************/
  33375. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  33376. "use strict";
  33377. __webpack_require__.r(__webpack_exports__);
  33378. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  33379. /* harmony export */ "BaseTransition": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.BaseTransition),
  33380. /* harmony export */ "Comment": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Comment),
  33381. /* harmony export */ "EffectScope": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.EffectScope),
  33382. /* harmony export */ "Fragment": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Fragment),
  33383. /* harmony export */ "KeepAlive": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.KeepAlive),
  33384. /* harmony export */ "ReactiveEffect": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ReactiveEffect),
  33385. /* harmony export */ "Static": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Static),
  33386. /* harmony export */ "Suspense": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Suspense),
  33387. /* harmony export */ "Teleport": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Teleport),
  33388. /* harmony export */ "Text": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Text),
  33389. /* harmony export */ "Transition": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.Transition),
  33390. /* harmony export */ "TransitionGroup": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.TransitionGroup),
  33391. /* harmony export */ "VueElement": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.VueElement),
  33392. /* harmony export */ "callWithAsyncErrorHandling": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.callWithAsyncErrorHandling),
  33393. /* harmony export */ "callWithErrorHandling": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.callWithErrorHandling),
  33394. /* harmony export */ "camelize": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.camelize),
  33395. /* harmony export */ "capitalize": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.capitalize),
  33396. /* harmony export */ "cloneVNode": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.cloneVNode),
  33397. /* harmony export */ "compatUtils": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.compatUtils),
  33398. /* harmony export */ "computed": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.computed),
  33399. /* harmony export */ "createApp": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createApp),
  33400. /* harmony export */ "createBlock": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createBlock),
  33401. /* harmony export */ "createCommentVNode": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createCommentVNode),
  33402. /* harmony export */ "createElementBlock": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createElementBlock),
  33403. /* harmony export */ "createElementVNode": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createElementVNode),
  33404. /* harmony export */ "createHydrationRenderer": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createHydrationRenderer),
  33405. /* harmony export */ "createPropsRestProxy": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createPropsRestProxy),
  33406. /* harmony export */ "createRenderer": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createRenderer),
  33407. /* harmony export */ "createSSRApp": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createSSRApp),
  33408. /* harmony export */ "createSlots": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createSlots),
  33409. /* harmony export */ "createStaticVNode": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createStaticVNode),
  33410. /* harmony export */ "createTextVNode": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createTextVNode),
  33411. /* harmony export */ "createVNode": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.createVNode),
  33412. /* harmony export */ "customRef": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.customRef),
  33413. /* harmony export */ "defineAsyncComponent": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineAsyncComponent),
  33414. /* harmony export */ "defineComponent": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineComponent),
  33415. /* harmony export */ "defineCustomElement": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineCustomElement),
  33416. /* harmony export */ "defineEmits": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineEmits),
  33417. /* harmony export */ "defineExpose": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineExpose),
  33418. /* harmony export */ "defineProps": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineProps),
  33419. /* harmony export */ "defineSSRCustomElement": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.defineSSRCustomElement),
  33420. /* harmony export */ "devtools": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.devtools),
  33421. /* harmony export */ "effect": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.effect),
  33422. /* harmony export */ "effectScope": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.effectScope),
  33423. /* harmony export */ "getCurrentInstance": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.getCurrentInstance),
  33424. /* harmony export */ "getCurrentScope": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.getCurrentScope),
  33425. /* harmony export */ "getTransitionRawChildren": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.getTransitionRawChildren),
  33426. /* harmony export */ "guardReactiveProps": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.guardReactiveProps),
  33427. /* harmony export */ "h": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.h),
  33428. /* harmony export */ "handleError": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.handleError),
  33429. /* harmony export */ "hydrate": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.hydrate),
  33430. /* harmony export */ "initCustomFormatter": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.initCustomFormatter),
  33431. /* harmony export */ "initDirectivesForSSR": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.initDirectivesForSSR),
  33432. /* harmony export */ "inject": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.inject),
  33433. /* harmony export */ "isMemoSame": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isMemoSame),
  33434. /* harmony export */ "isProxy": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isProxy),
  33435. /* harmony export */ "isReactive": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isReactive),
  33436. /* harmony export */ "isReadonly": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isReadonly),
  33437. /* harmony export */ "isRef": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isRef),
  33438. /* harmony export */ "isRuntimeOnly": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isRuntimeOnly),
  33439. /* harmony export */ "isShallow": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isShallow),
  33440. /* harmony export */ "isVNode": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.isVNode),
  33441. /* harmony export */ "markRaw": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.markRaw),
  33442. /* harmony export */ "mergeDefaults": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.mergeDefaults),
  33443. /* harmony export */ "mergeProps": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.mergeProps),
  33444. /* harmony export */ "nextTick": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.nextTick),
  33445. /* harmony export */ "normalizeClass": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.normalizeClass),
  33446. /* harmony export */ "normalizeProps": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.normalizeProps),
  33447. /* harmony export */ "normalizeStyle": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.normalizeStyle),
  33448. /* harmony export */ "onActivated": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onActivated),
  33449. /* harmony export */ "onBeforeMount": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onBeforeMount),
  33450. /* harmony export */ "onBeforeUnmount": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onBeforeUnmount),
  33451. /* harmony export */ "onBeforeUpdate": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onBeforeUpdate),
  33452. /* harmony export */ "onDeactivated": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onDeactivated),
  33453. /* harmony export */ "onErrorCaptured": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onErrorCaptured),
  33454. /* harmony export */ "onMounted": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onMounted),
  33455. /* harmony export */ "onRenderTracked": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onRenderTracked),
  33456. /* harmony export */ "onRenderTriggered": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onRenderTriggered),
  33457. /* harmony export */ "onScopeDispose": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onScopeDispose),
  33458. /* harmony export */ "onServerPrefetch": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onServerPrefetch),
  33459. /* harmony export */ "onUnmounted": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onUnmounted),
  33460. /* harmony export */ "onUpdated": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.onUpdated),
  33461. /* harmony export */ "openBlock": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.openBlock),
  33462. /* harmony export */ "popScopeId": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.popScopeId),
  33463. /* harmony export */ "provide": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.provide),
  33464. /* harmony export */ "proxyRefs": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.proxyRefs),
  33465. /* harmony export */ "pushScopeId": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.pushScopeId),
  33466. /* harmony export */ "queuePostFlushCb": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.queuePostFlushCb),
  33467. /* harmony export */ "reactive": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.reactive),
  33468. /* harmony export */ "readonly": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.readonly),
  33469. /* harmony export */ "ref": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ref),
  33470. /* harmony export */ "registerRuntimeCompiler": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.registerRuntimeCompiler),
  33471. /* harmony export */ "render": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.render),
  33472. /* harmony export */ "renderList": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.renderList),
  33473. /* harmony export */ "renderSlot": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.renderSlot),
  33474. /* harmony export */ "resolveComponent": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveComponent),
  33475. /* harmony export */ "resolveDirective": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveDirective),
  33476. /* harmony export */ "resolveDynamicComponent": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent),
  33477. /* harmony export */ "resolveFilter": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveFilter),
  33478. /* harmony export */ "resolveTransitionHooks": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.resolveTransitionHooks),
  33479. /* harmony export */ "setBlockTracking": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.setBlockTracking),
  33480. /* harmony export */ "setDevtoolsHook": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.setDevtoolsHook),
  33481. /* harmony export */ "setTransitionHooks": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.setTransitionHooks),
  33482. /* harmony export */ "shallowReactive": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.shallowReactive),
  33483. /* harmony export */ "shallowReadonly": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.shallowReadonly),
  33484. /* harmony export */ "shallowRef": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.shallowRef),
  33485. /* harmony export */ "ssrContextKey": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ssrContextKey),
  33486. /* harmony export */ "ssrUtils": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.ssrUtils),
  33487. /* harmony export */ "stop": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.stop),
  33488. /* harmony export */ "toDisplayString": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toDisplayString),
  33489. /* harmony export */ "toHandlerKey": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toHandlerKey),
  33490. /* harmony export */ "toHandlers": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toHandlers),
  33491. /* harmony export */ "toRaw": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toRaw),
  33492. /* harmony export */ "toRef": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toRef),
  33493. /* harmony export */ "toRefs": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.toRefs),
  33494. /* harmony export */ "transformVNodeArgs": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.transformVNodeArgs),
  33495. /* harmony export */ "triggerRef": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.triggerRef),
  33496. /* harmony export */ "unref": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.unref),
  33497. /* harmony export */ "useAttrs": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useAttrs),
  33498. /* harmony export */ "useCssModule": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useCssModule),
  33499. /* harmony export */ "useCssVars": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useCssVars),
  33500. /* harmony export */ "useSSRContext": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useSSRContext),
  33501. /* harmony export */ "useSlots": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useSlots),
  33502. /* harmony export */ "useTransitionState": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.useTransitionState),
  33503. /* harmony export */ "vModelCheckbox": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelCheckbox),
  33504. /* harmony export */ "vModelDynamic": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelDynamic),
  33505. /* harmony export */ "vModelRadio": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelRadio),
  33506. /* harmony export */ "vModelSelect": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelSelect),
  33507. /* harmony export */ "vModelText": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vModelText),
  33508. /* harmony export */ "vShow": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.vShow),
  33509. /* harmony export */ "version": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.version),
  33510. /* harmony export */ "warn": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.warn),
  33511. /* harmony export */ "watch": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.watch),
  33512. /* harmony export */ "watchEffect": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.watchEffect),
  33513. /* harmony export */ "watchPostEffect": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.watchPostEffect),
  33514. /* harmony export */ "watchSyncEffect": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.watchSyncEffect),
  33515. /* harmony export */ "withAsyncContext": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withAsyncContext),
  33516. /* harmony export */ "withCtx": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withCtx),
  33517. /* harmony export */ "withDefaults": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withDefaults),
  33518. /* harmony export */ "withDirectives": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withDirectives),
  33519. /* harmony export */ "withKeys": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withKeys),
  33520. /* harmony export */ "withMemo": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withMemo),
  33521. /* harmony export */ "withModifiers": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withModifiers),
  33522. /* harmony export */ "withScopeId": () => (/* reexport safe */ _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__.withScopeId),
  33523. /* harmony export */ "compile": () => (/* binding */ compileToFunction)
  33524. /* harmony export */ });
  33525. /* harmony import */ var _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @vue/runtime-dom */ "./node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js");
  33526. /* harmony import */ var _vue_runtime_dom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @vue/runtime-dom */ "./node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js");
  33527. /* harmony import */ var _vue_compiler_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @vue/compiler-dom */ "./node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js");
  33528. /* harmony import */ var _vue_shared__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @vue/shared */ "./node_modules/@vue/shared/dist/shared.esm-bundler.js");
  33529. function initDev() {
  33530. {
  33531. (0,_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_2__.initCustomFormatter)();
  33532. }
  33533. }
  33534. // This entry is the "full-build" that includes both the runtime
  33535. if ((true)) {
  33536. initDev();
  33537. }
  33538. const compileCache = Object.create(null);
  33539. function compileToFunction(template, options) {
  33540. if (!(0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.isString)(template)) {
  33541. if (template.nodeType) {
  33542. template = template.innerHTML;
  33543. }
  33544. else {
  33545. ( true) && (0,_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_2__.warn)(`invalid template option: `, template);
  33546. return _vue_shared__WEBPACK_IMPORTED_MODULE_1__.NOOP;
  33547. }
  33548. }
  33549. const key = template;
  33550. const cached = compileCache[key];
  33551. if (cached) {
  33552. return cached;
  33553. }
  33554. if (template[0] === '#') {
  33555. const el = document.querySelector(template);
  33556. if (( true) && !el) {
  33557. (0,_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_2__.warn)(`Template element not found or is empty: ${template}`);
  33558. }
  33559. // __UNSAFE__
  33560. // Reason: potential execution of JS expressions in in-DOM template.
  33561. // The user must make sure the in-DOM template is trusted. If it's rendered
  33562. // by the server, the template should not contain any user data.
  33563. template = el ? el.innerHTML : ``;
  33564. }
  33565. const { code } = (0,_vue_compiler_dom__WEBPACK_IMPORTED_MODULE_3__.compile)(template, (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.extend)({
  33566. hoistStatic: true,
  33567. onError: ( true) ? onError : 0,
  33568. onWarn: ( true) ? e => onError(e, true) : 0
  33569. }, options));
  33570. function onError(err, asWarning = false) {
  33571. const message = asWarning
  33572. ? err.message
  33573. : `Template compilation error: ${err.message}`;
  33574. const codeFrame = err.loc &&
  33575. (0,_vue_shared__WEBPACK_IMPORTED_MODULE_1__.generateCodeFrame)(template, err.loc.start.offset, err.loc.end.offset);
  33576. (0,_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_2__.warn)(codeFrame ? `${message}\n${codeFrame}` : message);
  33577. }
  33578. // The wildcard import results in a huge object with every export
  33579. // with keys that cannot be mangled, and can be quite heavy size-wise.
  33580. // In the global build we know `Vue` is available globally so we can avoid
  33581. // the wildcard object.
  33582. const render = (new Function('Vue', code)(_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_0__));
  33583. render._rc = true;
  33584. return (compileCache[key] = render);
  33585. }
  33586. (0,_vue_runtime_dom__WEBPACK_IMPORTED_MODULE_2__.registerRuntimeCompiler)(compileToFunction);
  33587. /***/ }),
  33588. /***/ "./resources/js/pages lazy recursive ^\\.\\/.*$":
  33589. /*!************************************************************!*\
  33590. !*** ./resources/js/pages/ lazy ^\.\/.*$ namespace object ***!
  33591. \************************************************************/
  33592. /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
  33593. var map = {
  33594. "./dashboards/Home": [
  33595. "./resources/js/pages/dashboards/Home.vue",
  33596. "resources_js_pages_dashboards_Home_vue"
  33597. ],
  33598. "./dashboards/Home.vue": [
  33599. "./resources/js/pages/dashboards/Home.vue",
  33600. "resources_js_pages_dashboards_Home_vue"
  33601. ]
  33602. };
  33603. function webpackAsyncContext(req) {
  33604. if(!__webpack_require__.o(map, req)) {
  33605. return Promise.resolve().then(() => {
  33606. var e = new Error("Cannot find module '" + req + "'");
  33607. e.code = 'MODULE_NOT_FOUND';
  33608. throw e;
  33609. });
  33610. }
  33611. var ids = map[req], id = ids[0];
  33612. return __webpack_require__.e(ids[1]).then(() => {
  33613. return __webpack_require__(id);
  33614. });
  33615. }
  33616. webpackAsyncContext.keys = () => (Object.keys(map));
  33617. webpackAsyncContext.id = "./resources/js/pages lazy recursive ^\\.\\/.*$";
  33618. module.exports = webpackAsyncContext;
  33619. /***/ }),
  33620. /***/ "?2128":
  33621. /*!********************************!*\
  33622. !*** ./util.inspect (ignored) ***!
  33623. \********************************/
  33624. /***/ (() => {
  33625. /* (ignored) */
  33626. /***/ }),
  33627. /***/ "./node_modules/@inertiajs/inertia/node_modules/axios/package.json":
  33628. /*!*************************************************************************!*\
  33629. !*** ./node_modules/@inertiajs/inertia/node_modules/axios/package.json ***!
  33630. \*************************************************************************/
  33631. /***/ ((module) => {
  33632. "use strict";
  33633. module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}');
  33634. /***/ })
  33635. /******/ });
  33636. /************************************************************************/
  33637. /******/ // The module cache
  33638. /******/ var __webpack_module_cache__ = {};
  33639. /******/
  33640. /******/ // The require function
  33641. /******/ function __webpack_require__(moduleId) {
  33642. /******/ // Check if module is in cache
  33643. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  33644. /******/ if (cachedModule !== undefined) {
  33645. /******/ return cachedModule.exports;
  33646. /******/ }
  33647. /******/ // Create a new module (and put it into the cache)
  33648. /******/ var module = __webpack_module_cache__[moduleId] = {
  33649. /******/ id: moduleId,
  33650. /******/ loaded: false,
  33651. /******/ exports: {}
  33652. /******/ };
  33653. /******/
  33654. /******/ // Execute the module function
  33655. /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  33656. /******/
  33657. /******/ // Flag the module as loaded
  33658. /******/ module.loaded = true;
  33659. /******/
  33660. /******/ // Return the exports of the module
  33661. /******/ return module.exports;
  33662. /******/ }
  33663. /******/
  33664. /******/ // expose the modules object (__webpack_modules__)
  33665. /******/ __webpack_require__.m = __webpack_modules__;
  33666. /******/
  33667. /************************************************************************/
  33668. /******/ /* webpack/runtime/compat get default export */
  33669. /******/ (() => {
  33670. /******/ // getDefaultExport function for compatibility with non-harmony modules
  33671. /******/ __webpack_require__.n = (module) => {
  33672. /******/ var getter = module && module.__esModule ?
  33673. /******/ () => (module['default']) :
  33674. /******/ () => (module);
  33675. /******/ __webpack_require__.d(getter, { a: getter });
  33676. /******/ return getter;
  33677. /******/ };
  33678. /******/ })();
  33679. /******/
  33680. /******/ /* webpack/runtime/define property getters */
  33681. /******/ (() => {
  33682. /******/ // define getter functions for harmony exports
  33683. /******/ __webpack_require__.d = (exports, definition) => {
  33684. /******/ for(var key in definition) {
  33685. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  33686. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  33687. /******/ }
  33688. /******/ }
  33689. /******/ };
  33690. /******/ })();
  33691. /******/
  33692. /******/ /* webpack/runtime/ensure chunk */
  33693. /******/ (() => {
  33694. /******/ __webpack_require__.f = {};
  33695. /******/ // This file contains only the entry chunk.
  33696. /******/ // The chunk loading function for additional chunks
  33697. /******/ __webpack_require__.e = (chunkId) => {
  33698. /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
  33699. /******/ __webpack_require__.f[key](chunkId, promises);
  33700. /******/ return promises;
  33701. /******/ }, []));
  33702. /******/ };
  33703. /******/ })();
  33704. /******/
  33705. /******/ /* webpack/runtime/get javascript chunk filename */
  33706. /******/ (() => {
  33707. /******/ // This function allow to reference async chunks
  33708. /******/ __webpack_require__.u = (chunkId) => {
  33709. /******/ // return url for filenames based on template
  33710. /******/ return "js/" + chunkId + ".js?id=" + "3b48e0dcb227c4d8" + "";
  33711. /******/ };
  33712. /******/ })();
  33713. /******/
  33714. /******/ /* webpack/runtime/get mini-css chunk filename */
  33715. /******/ (() => {
  33716. /******/ // This function allow to reference all chunks
  33717. /******/ __webpack_require__.miniCssF = (chunkId) => {
  33718. /******/ // return url for filenames based on template
  33719. /******/ return undefined;
  33720. /******/ };
  33721. /******/ })();
  33722. /******/
  33723. /******/ /* webpack/runtime/global */
  33724. /******/ (() => {
  33725. /******/ __webpack_require__.g = (function() {
  33726. /******/ if (typeof globalThis === 'object') return globalThis;
  33727. /******/ try {
  33728. /******/ return this || new Function('return this')();
  33729. /******/ } catch (e) {
  33730. /******/ if (typeof window === 'object') return window;
  33731. /******/ }
  33732. /******/ })();
  33733. /******/ })();
  33734. /******/
  33735. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  33736. /******/ (() => {
  33737. /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
  33738. /******/ })();
  33739. /******/
  33740. /******/ /* webpack/runtime/load script */
  33741. /******/ (() => {
  33742. /******/ var inProgress = {};
  33743. /******/ // data-webpack is not used as build has no uniqueName
  33744. /******/ // loadScript function to load a script via script tag
  33745. /******/ __webpack_require__.l = (url, done, key, chunkId) => {
  33746. /******/ if(inProgress[url]) { inProgress[url].push(done); return; }
  33747. /******/ var script, needAttach;
  33748. /******/ if(key !== undefined) {
  33749. /******/ var scripts = document.getElementsByTagName("script");
  33750. /******/ for(var i = 0; i < scripts.length; i++) {
  33751. /******/ var s = scripts[i];
  33752. /******/ if(s.getAttribute("src") == url) { script = s; break; }
  33753. /******/ }
  33754. /******/ }
  33755. /******/ if(!script) {
  33756. /******/ needAttach = true;
  33757. /******/ script = document.createElement('script');
  33758. /******/
  33759. /******/ script.charset = 'utf-8';
  33760. /******/ script.timeout = 120;
  33761. /******/ if (__webpack_require__.nc) {
  33762. /******/ script.setAttribute("nonce", __webpack_require__.nc);
  33763. /******/ }
  33764. /******/
  33765. /******/ script.src = url;
  33766. /******/ }
  33767. /******/ inProgress[url] = [done];
  33768. /******/ var onScriptComplete = (prev, event) => {
  33769. /******/ // avoid mem leaks in IE.
  33770. /******/ script.onerror = script.onload = null;
  33771. /******/ clearTimeout(timeout);
  33772. /******/ var doneFns = inProgress[url];
  33773. /******/ delete inProgress[url];
  33774. /******/ script.parentNode && script.parentNode.removeChild(script);
  33775. /******/ doneFns && doneFns.forEach((fn) => (fn(event)));
  33776. /******/ if(prev) return prev(event);
  33777. /******/ }
  33778. /******/ ;
  33779. /******/ var timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);
  33780. /******/ script.onerror = onScriptComplete.bind(null, script.onerror);
  33781. /******/ script.onload = onScriptComplete.bind(null, script.onload);
  33782. /******/ needAttach && document.head.appendChild(script);
  33783. /******/ };
  33784. /******/ })();
  33785. /******/
  33786. /******/ /* webpack/runtime/make namespace object */
  33787. /******/ (() => {
  33788. /******/ // define __esModule on exports
  33789. /******/ __webpack_require__.r = (exports) => {
  33790. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  33791. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  33792. /******/ }
  33793. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  33794. /******/ };
  33795. /******/ })();
  33796. /******/
  33797. /******/ /* webpack/runtime/node module decorator */
  33798. /******/ (() => {
  33799. /******/ __webpack_require__.nmd = (module) => {
  33800. /******/ module.paths = [];
  33801. /******/ if (!module.children) module.children = [];
  33802. /******/ return module;
  33803. /******/ };
  33804. /******/ })();
  33805. /******/
  33806. /******/ /* webpack/runtime/publicPath */
  33807. /******/ (() => {
  33808. /******/ __webpack_require__.p = "/";
  33809. /******/ })();
  33810. /******/
  33811. /******/ /* webpack/runtime/jsonp chunk loading */
  33812. /******/ (() => {
  33813. /******/ // no baseURI
  33814. /******/
  33815. /******/ // object to store loaded and loading chunks
  33816. /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
  33817. /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
  33818. /******/ var installedChunks = {
  33819. /******/ "/js/vue": 0
  33820. /******/ };
  33821. /******/
  33822. /******/ __webpack_require__.f.j = (chunkId, promises) => {
  33823. /******/ // JSONP chunk loading for javascript
  33824. /******/ var installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;
  33825. /******/ if(installedChunkData !== 0) { // 0 means "already installed".
  33826. /******/
  33827. /******/ // a Promise means "currently loading".
  33828. /******/ if(installedChunkData) {
  33829. /******/ promises.push(installedChunkData[2]);
  33830. /******/ } else {
  33831. /******/ if(true) { // all chunks have JS
  33832. /******/ // setup Promise in chunk cache
  33833. /******/ var promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
  33834. /******/ promises.push(installedChunkData[2] = promise);
  33835. /******/
  33836. /******/ // start chunk loading
  33837. /******/ var url = __webpack_require__.p + __webpack_require__.u(chunkId);
  33838. /******/ // create error before stack unwound to get useful stacktrace later
  33839. /******/ var error = new Error();
  33840. /******/ var loadingEnded = (event) => {
  33841. /******/ if(__webpack_require__.o(installedChunks, chunkId)) {
  33842. /******/ installedChunkData = installedChunks[chunkId];
  33843. /******/ if(installedChunkData !== 0) installedChunks[chunkId] = undefined;
  33844. /******/ if(installedChunkData) {
  33845. /******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
  33846. /******/ var realSrc = event && event.target && event.target.src;
  33847. /******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
  33848. /******/ error.name = 'ChunkLoadError';
  33849. /******/ error.type = errorType;
  33850. /******/ error.request = realSrc;
  33851. /******/ installedChunkData[1](error);
  33852. /******/ }
  33853. /******/ }
  33854. /******/ };
  33855. /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
  33856. /******/ } else installedChunks[chunkId] = 0;
  33857. /******/ }
  33858. /******/ }
  33859. /******/ };
  33860. /******/
  33861. /******/ // no prefetching
  33862. /******/
  33863. /******/ // no preloaded
  33864. /******/
  33865. /******/ // no HMR
  33866. /******/
  33867. /******/ // no HMR manifest
  33868. /******/
  33869. /******/ // no on chunks loaded
  33870. /******/
  33871. /******/ // install a JSONP callback for chunk loading
  33872. /******/ var webpackJsonpCallback = (parentChunkLoadingFunction, data) => {
  33873. /******/ var [chunkIds, moreModules, runtime] = data;
  33874. /******/ // add "moreModules" to the modules object,
  33875. /******/ // then flag all "chunkIds" as loaded and fire callback
  33876. /******/ var moduleId, chunkId, i = 0;
  33877. /******/ if(chunkIds.some((id) => (installedChunks[id] !== 0))) {
  33878. /******/ for(moduleId in moreModules) {
  33879. /******/ if(__webpack_require__.o(moreModules, moduleId)) {
  33880. /******/ __webpack_require__.m[moduleId] = moreModules[moduleId];
  33881. /******/ }
  33882. /******/ }
  33883. /******/ if(runtime) var result = runtime(__webpack_require__);
  33884. /******/ }
  33885. /******/ if(parentChunkLoadingFunction) parentChunkLoadingFunction(data);
  33886. /******/ for(;i < chunkIds.length; i++) {
  33887. /******/ chunkId = chunkIds[i];
  33888. /******/ if(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {
  33889. /******/ installedChunks[chunkId][0]();
  33890. /******/ }
  33891. /******/ installedChunks[chunkId] = 0;
  33892. /******/ }
  33893. /******/
  33894. /******/ }
  33895. /******/
  33896. /******/ var chunkLoadingGlobal = self["webpackChunk"] = self["webpackChunk"] || [];
  33897. /******/ chunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));
  33898. /******/ chunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));
  33899. /******/ })();
  33900. /******/
  33901. /************************************************************************/
  33902. var __webpack_exports__ = {};
  33903. // This entry need to be wrapped in an IIFE because it need to be in strict mode.
  33904. (() => {
  33905. "use strict";
  33906. /*!*****************************!*\
  33907. !*** ./resources/js/vue.js ***!
  33908. \*****************************/
  33909. __webpack_require__.r(__webpack_exports__);
  33910. /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "./node_modules/vue/dist/vue.esm-bundler.js");
  33911. /* harmony import */ var _inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @inertiajs/inertia-vue3 */ "./node_modules/@inertiajs/inertia-vue3/dist/index.js");
  33912. /* harmony import */ var _inertiajs_progress__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @inertiajs/progress */ "./node_modules/@inertiajs/progress/dist/index.js");
  33913. /* harmony import */ var _coreui_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @coreui/vue */ "./node_modules/@coreui/vue/dist/index.es.js");
  33914. /* harmony import */ var _coreui_icons_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @coreui/icons-vue */ "./node_modules/@coreui/icons-vue/dist/index.es.js");
  33915. /* harmony import */ var _assets_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @/assets/icons */ "./resources/js/assets/icons/index.js");
  33916. (0,_inertiajs_inertia_vue3__WEBPACK_IMPORTED_MODULE_1__.createInertiaApp)({
  33917. resolve: function resolve(name) {
  33918. return __webpack_require__("./resources/js/pages lazy recursive ^\\.\\/.*$")("./".concat(name));
  33919. },
  33920. setup: function setup(_ref) {
  33921. var el = _ref.el,
  33922. App = _ref.App,
  33923. props = _ref.props,
  33924. plugin = _ref.plugin;
  33925. (0,vue__WEBPACK_IMPORTED_MODULE_0__.createApp)({
  33926. render: function render() {
  33927. return (0,vue__WEBPACK_IMPORTED_MODULE_0__.h)(App, props);
  33928. }
  33929. }).use(plugin).use(_coreui_vue__WEBPACK_IMPORTED_MODULE_3__["default"]).mixin({
  33930. methods: {
  33931. route: route
  33932. }
  33933. }).provide('icons', _assets_icons__WEBPACK_IMPORTED_MODULE_5__["default"]).component('CIcon', _coreui_icons_vue__WEBPACK_IMPORTED_MODULE_4__["default"]).mount(el);
  33934. }
  33935. });
  33936. _inertiajs_progress__WEBPACK_IMPORTED_MODULE_2__.InertiaProgress.init({
  33937. color: '#eb4432'
  33938. });
  33939. })();
  33940. /******/ })()
  33941. ;