vendor.js 552 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],[
  2. /* 0 */,
  3. /* 1 */
  4. /*!*********************************************************!*\
  5. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  6. \*********************************************************/
  7. /*! no static exports found */
  8. /***/ (function(module, exports, __webpack_require__) {
  9. "use strict";
  10. Object.defineProperty(exports, "__esModule", {
  11. value: true
  12. });
  13. exports.default = void 0;
  14. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  15. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  16. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  17. return this;
  18. }();
  19. var key = ['w', 'x'].join('');
  20. var oldWx = target[key];
  21. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  22. function isWxKey(key) {
  23. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  24. return false;
  25. }
  26. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  27. }
  28. function initWx() {
  29. var newWx = {};
  30. for (var _key in oldWx) {
  31. if (isWxKey(_key)) {
  32. // TODO wrapper function
  33. newWx[_key] = oldWx[_key];
  34. }
  35. }
  36. return newWx;
  37. }
  38. target[key] = initWx();
  39. if (!target[key].canIUse('getAppBaseInfo')) {
  40. target[key].getAppBaseInfo = target[key].getSystemInfoSync;
  41. }
  42. if (!target[key].canIUse('getWindowInfo')) {
  43. target[key].getWindowInfo = target[key].getSystemInfoSync;
  44. }
  45. if (!target[key].canIUse('getDeviceInfo')) {
  46. target[key].getDeviceInfo = target[key].getSystemInfoSync;
  47. }
  48. var _default = target[key];
  49. exports.default = _default;
  50. /***/ }),
  51. /* 2 */
  52. /*!************************************************************!*\
  53. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  54. \************************************************************/
  55. /*! no static exports found */
  56. /***/ (function(module, exports, __webpack_require__) {
  57. "use strict";
  58. /* WEBPACK VAR INJECTION */(function(wx, global) {
  59. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  60. Object.defineProperty(exports, "__esModule", {
  61. value: true
  62. });
  63. exports.createApp = createApp;
  64. exports.createComponent = createComponent;
  65. exports.createPage = createPage;
  66. exports.createPlugin = createPlugin;
  67. exports.createSubpackageApp = createSubpackageApp;
  68. exports.default = void 0;
  69. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  70. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  71. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  72. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  73. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  74. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  75. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  76. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  77. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  78. var realAtob;
  79. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  80. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  81. if (typeof atob !== 'function') {
  82. realAtob = function realAtob(str) {
  83. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  84. if (!b64re.test(str)) {
  85. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  86. }
  87. // Adding the padding if missing, for semplicity
  88. str += '=='.slice(2 - (str.length & 3));
  89. var bitmap;
  90. var result = '';
  91. var r1;
  92. var r2;
  93. var i = 0;
  94. for (; i < str.length;) {
  95. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  96. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  97. }
  98. return result;
  99. };
  100. } else {
  101. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  102. realAtob = atob;
  103. }
  104. function b64DecodeUnicode(str) {
  105. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  106. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  107. }).join(''));
  108. }
  109. function getCurrentUserInfo() {
  110. var token = wx.getStorageSync('uni_id_token') || '';
  111. var tokenArr = token.split('.');
  112. if (!token || tokenArr.length !== 3) {
  113. return {
  114. uid: null,
  115. role: [],
  116. permission: [],
  117. tokenExpired: 0
  118. };
  119. }
  120. var userInfo;
  121. try {
  122. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  123. } catch (error) {
  124. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  125. }
  126. userInfo.tokenExpired = userInfo.exp * 1000;
  127. delete userInfo.exp;
  128. delete userInfo.iat;
  129. return userInfo;
  130. }
  131. function uniIdMixin(Vue) {
  132. Vue.prototype.uniIDHasRole = function (roleId) {
  133. var _getCurrentUserInfo = getCurrentUserInfo(),
  134. role = _getCurrentUserInfo.role;
  135. return role.indexOf(roleId) > -1;
  136. };
  137. Vue.prototype.uniIDHasPermission = function (permissionId) {
  138. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  139. permission = _getCurrentUserInfo2.permission;
  140. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  141. };
  142. Vue.prototype.uniIDTokenValid = function () {
  143. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  144. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  145. return tokenExpired > Date.now();
  146. };
  147. }
  148. var _toString = Object.prototype.toString;
  149. var hasOwnProperty = Object.prototype.hasOwnProperty;
  150. function isFn(fn) {
  151. return typeof fn === 'function';
  152. }
  153. function isStr(str) {
  154. return typeof str === 'string';
  155. }
  156. function isObject(obj) {
  157. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  158. }
  159. function isPlainObject(obj) {
  160. return _toString.call(obj) === '[object Object]';
  161. }
  162. function hasOwn(obj, key) {
  163. return hasOwnProperty.call(obj, key);
  164. }
  165. function noop() {}
  166. /**
  167. * Create a cached version of a pure function.
  168. */
  169. function cached(fn) {
  170. var cache = Object.create(null);
  171. return function cachedFn(str) {
  172. var hit = cache[str];
  173. return hit || (cache[str] = fn(str));
  174. };
  175. }
  176. /**
  177. * Camelize a hyphen-delimited string.
  178. */
  179. var camelizeRE = /-(\w)/g;
  180. var camelize = cached(function (str) {
  181. return str.replace(camelizeRE, function (_, c) {
  182. return c ? c.toUpperCase() : '';
  183. });
  184. });
  185. function sortObject(obj) {
  186. var sortObj = {};
  187. if (isPlainObject(obj)) {
  188. Object.keys(obj).sort().forEach(function (key) {
  189. sortObj[key] = obj[key];
  190. });
  191. }
  192. return !Object.keys(sortObj) ? obj : sortObj;
  193. }
  194. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  195. var globalInterceptors = {};
  196. var scopedInterceptors = {};
  197. function mergeHook(parentVal, childVal) {
  198. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  199. return res ? dedupeHooks(res) : res;
  200. }
  201. function dedupeHooks(hooks) {
  202. var res = [];
  203. for (var i = 0; i < hooks.length; i++) {
  204. if (res.indexOf(hooks[i]) === -1) {
  205. res.push(hooks[i]);
  206. }
  207. }
  208. return res;
  209. }
  210. function removeHook(hooks, hook) {
  211. var index = hooks.indexOf(hook);
  212. if (index !== -1) {
  213. hooks.splice(index, 1);
  214. }
  215. }
  216. function mergeInterceptorHook(interceptor, option) {
  217. Object.keys(option).forEach(function (hook) {
  218. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  219. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  220. }
  221. });
  222. }
  223. function removeInterceptorHook(interceptor, option) {
  224. if (!interceptor || !option) {
  225. return;
  226. }
  227. Object.keys(option).forEach(function (hook) {
  228. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  229. removeHook(interceptor[hook], option[hook]);
  230. }
  231. });
  232. }
  233. function addInterceptor(method, option) {
  234. if (typeof method === 'string' && isPlainObject(option)) {
  235. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  236. } else if (isPlainObject(method)) {
  237. mergeInterceptorHook(globalInterceptors, method);
  238. }
  239. }
  240. function removeInterceptor(method, option) {
  241. if (typeof method === 'string') {
  242. if (isPlainObject(option)) {
  243. removeInterceptorHook(scopedInterceptors[method], option);
  244. } else {
  245. delete scopedInterceptors[method];
  246. }
  247. } else if (isPlainObject(method)) {
  248. removeInterceptorHook(globalInterceptors, method);
  249. }
  250. }
  251. function wrapperHook(hook, params) {
  252. return function (data) {
  253. return hook(data, params) || data;
  254. };
  255. }
  256. function isPromise(obj) {
  257. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  258. }
  259. function queue(hooks, data, params) {
  260. var promise = false;
  261. for (var i = 0; i < hooks.length; i++) {
  262. var hook = hooks[i];
  263. if (promise) {
  264. promise = Promise.resolve(wrapperHook(hook, params));
  265. } else {
  266. var res = hook(data, params);
  267. if (isPromise(res)) {
  268. promise = Promise.resolve(res);
  269. }
  270. if (res === false) {
  271. return {
  272. then: function then() {}
  273. };
  274. }
  275. }
  276. }
  277. return promise || {
  278. then: function then(callback) {
  279. return callback(data);
  280. }
  281. };
  282. }
  283. function wrapperOptions(interceptor) {
  284. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  285. ['success', 'fail', 'complete'].forEach(function (name) {
  286. if (Array.isArray(interceptor[name])) {
  287. var oldCallback = options[name];
  288. options[name] = function callbackInterceptor(res) {
  289. queue(interceptor[name], res, options).then(function (res) {
  290. /* eslint-disable no-mixed-operators */
  291. return isFn(oldCallback) && oldCallback(res) || res;
  292. });
  293. };
  294. }
  295. });
  296. return options;
  297. }
  298. function wrapperReturnValue(method, returnValue) {
  299. var returnValueHooks = [];
  300. if (Array.isArray(globalInterceptors.returnValue)) {
  301. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  302. }
  303. var interceptor = scopedInterceptors[method];
  304. if (interceptor && Array.isArray(interceptor.returnValue)) {
  305. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  306. }
  307. returnValueHooks.forEach(function (hook) {
  308. returnValue = hook(returnValue) || returnValue;
  309. });
  310. return returnValue;
  311. }
  312. function getApiInterceptorHooks(method) {
  313. var interceptor = Object.create(null);
  314. Object.keys(globalInterceptors).forEach(function (hook) {
  315. if (hook !== 'returnValue') {
  316. interceptor[hook] = globalInterceptors[hook].slice();
  317. }
  318. });
  319. var scopedInterceptor = scopedInterceptors[method];
  320. if (scopedInterceptor) {
  321. Object.keys(scopedInterceptor).forEach(function (hook) {
  322. if (hook !== 'returnValue') {
  323. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  324. }
  325. });
  326. }
  327. return interceptor;
  328. }
  329. function invokeApi(method, api, options) {
  330. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  331. params[_key - 3] = arguments[_key];
  332. }
  333. var interceptor = getApiInterceptorHooks(method);
  334. if (interceptor && Object.keys(interceptor).length) {
  335. if (Array.isArray(interceptor.invoke)) {
  336. var res = queue(interceptor.invoke, options);
  337. return res.then(function (options) {
  338. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  339. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  340. });
  341. } else {
  342. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  343. }
  344. }
  345. return api.apply(void 0, [options].concat(params));
  346. }
  347. var promiseInterceptor = {
  348. returnValue: function returnValue(res) {
  349. if (!isPromise(res)) {
  350. return res;
  351. }
  352. return new Promise(function (resolve, reject) {
  353. res.then(function (res) {
  354. if (!res) {
  355. resolve(res);
  356. return;
  357. }
  358. if (res[0]) {
  359. reject(res[0]);
  360. } else {
  361. resolve(res[1]);
  362. }
  363. });
  364. });
  365. }
  366. };
  367. var SYNC_API_RE = /^\$|__f__|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|rpx2px|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  368. var CONTEXT_API_RE = /^create|Manager$/;
  369. // Context例外情况
  370. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  371. // 同步例外情况
  372. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  373. var CALLBACK_API_RE = /^on|^off/;
  374. function isContextApi(name) {
  375. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  376. }
  377. function isSyncApi(name) {
  378. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  379. }
  380. function isCallbackApi(name) {
  381. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  382. }
  383. function handlePromise(promise) {
  384. return promise.then(function (data) {
  385. return [null, data];
  386. }).catch(function (err) {
  387. return [err];
  388. });
  389. }
  390. function shouldPromise(name) {
  391. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  392. return false;
  393. }
  394. return true;
  395. }
  396. /* eslint-disable no-extend-native */
  397. if (!Promise.prototype.finally) {
  398. Promise.prototype.finally = function (callback) {
  399. var promise = this.constructor;
  400. return this.then(function (value) {
  401. return promise.resolve(callback()).then(function () {
  402. return value;
  403. });
  404. }, function (reason) {
  405. return promise.resolve(callback()).then(function () {
  406. throw reason;
  407. });
  408. });
  409. };
  410. }
  411. function promisify(name, api) {
  412. if (!shouldPromise(name) || !isFn(api)) {
  413. return api;
  414. }
  415. return function promiseApi() {
  416. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  417. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  418. params[_key2 - 1] = arguments[_key2];
  419. }
  420. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  421. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  422. }
  423. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  424. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  425. success: resolve,
  426. fail: reject
  427. })].concat(params));
  428. })));
  429. };
  430. }
  431. var EPS = 1e-4;
  432. var BASE_DEVICE_WIDTH = 750;
  433. var isIOS = false;
  434. var deviceWidth = 0;
  435. var deviceDPR = 0;
  436. function checkDeviceWidth() {
  437. var windowWidth, pixelRatio, platform;
  438. {
  439. var windowInfo = typeof wx.getWindowInfo === 'function' && wx.getWindowInfo() ? wx.getWindowInfo() : wx.getSystemInfoSync();
  440. var deviceInfo = typeof wx.getDeviceInfo === 'function' && wx.getDeviceInfo() ? wx.getDeviceInfo() : wx.getSystemInfoSync();
  441. windowWidth = windowInfo.windowWidth;
  442. pixelRatio = windowInfo.pixelRatio;
  443. platform = deviceInfo.platform;
  444. }
  445. deviceWidth = windowWidth;
  446. deviceDPR = pixelRatio;
  447. isIOS = platform === 'ios';
  448. }
  449. function upx2px(number, newDeviceWidth) {
  450. if (deviceWidth === 0) {
  451. checkDeviceWidth();
  452. }
  453. number = Number(number);
  454. if (number === 0) {
  455. return 0;
  456. }
  457. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  458. if (result < 0) {
  459. result = -result;
  460. }
  461. result = Math.floor(result + EPS);
  462. if (result === 0) {
  463. if (deviceDPR === 1 || !isIOS) {
  464. result = 1;
  465. } else {
  466. result = 0.5;
  467. }
  468. }
  469. return number < 0 ? -result : result;
  470. }
  471. var LOCALE_ZH_HANS = 'zh-Hans';
  472. var LOCALE_ZH_HANT = 'zh-Hant';
  473. var LOCALE_EN = 'en';
  474. var LOCALE_FR = 'fr';
  475. var LOCALE_ES = 'es';
  476. var messages = {};
  477. function getLocaleLanguage() {
  478. var localeLanguage = '';
  479. {
  480. var appBaseInfo = typeof wx.getAppBaseInfo === 'function' && wx.getAppBaseInfo() ? wx.getAppBaseInfo() : wx.getSystemInfoSync();
  481. var language = appBaseInfo && appBaseInfo.language ? appBaseInfo.language : LOCALE_EN;
  482. localeLanguage = normalizeLocale(language) || LOCALE_EN;
  483. }
  484. return localeLanguage;
  485. }
  486. var locale;
  487. {
  488. locale = getLocaleLanguage();
  489. }
  490. function initI18nMessages() {
  491. if (!isEnableLocale()) {
  492. return;
  493. }
  494. var localeKeys = Object.keys(__uniConfig.locales);
  495. if (localeKeys.length) {
  496. localeKeys.forEach(function (locale) {
  497. var curMessages = messages[locale];
  498. var userMessages = __uniConfig.locales[locale];
  499. if (curMessages) {
  500. Object.assign(curMessages, userMessages);
  501. } else {
  502. messages[locale] = userMessages;
  503. }
  504. });
  505. }
  506. }
  507. initI18nMessages();
  508. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  509. var t = i18n.t;
  510. var i18nMixin = i18n.mixin = {
  511. beforeCreate: function beforeCreate() {
  512. var _this = this;
  513. var unwatch = i18n.i18n.watchLocale(function () {
  514. _this.$forceUpdate();
  515. });
  516. this.$once('hook:beforeDestroy', function () {
  517. unwatch();
  518. });
  519. },
  520. methods: {
  521. $$t: function $$t(key, values) {
  522. return t(key, values);
  523. }
  524. }
  525. };
  526. var setLocale = i18n.setLocale;
  527. var getLocale = i18n.getLocale;
  528. function initAppLocale(Vue, appVm, locale) {
  529. var state = Vue.observable({
  530. locale: locale || i18n.getLocale()
  531. });
  532. var localeWatchers = [];
  533. appVm.$watchLocale = function (fn) {
  534. localeWatchers.push(fn);
  535. };
  536. Object.defineProperty(appVm, '$locale', {
  537. get: function get() {
  538. return state.locale;
  539. },
  540. set: function set(v) {
  541. state.locale = v;
  542. localeWatchers.forEach(function (watch) {
  543. return watch(v);
  544. });
  545. }
  546. });
  547. }
  548. function isEnableLocale() {
  549. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  550. }
  551. function include(str, parts) {
  552. return !!parts.find(function (part) {
  553. return str.indexOf(part) !== -1;
  554. });
  555. }
  556. function startsWith(str, parts) {
  557. return parts.find(function (part) {
  558. return str.indexOf(part) === 0;
  559. });
  560. }
  561. function normalizeLocale(locale, messages) {
  562. if (!locale) {
  563. return;
  564. }
  565. locale = locale.trim().replace(/_/g, '-');
  566. if (messages && messages[locale]) {
  567. return locale;
  568. }
  569. locale = locale.toLowerCase();
  570. if (locale === 'chinese') {
  571. // 支付宝
  572. return LOCALE_ZH_HANS;
  573. }
  574. if (locale.indexOf('zh') === 0) {
  575. if (locale.indexOf('-hans') > -1) {
  576. return LOCALE_ZH_HANS;
  577. }
  578. if (locale.indexOf('-hant') > -1) {
  579. return LOCALE_ZH_HANT;
  580. }
  581. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  582. return LOCALE_ZH_HANT;
  583. }
  584. return LOCALE_ZH_HANS;
  585. }
  586. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  587. if (lang) {
  588. return lang;
  589. }
  590. }
  591. // export function initI18n() {
  592. // const localeKeys = Object.keys(__uniConfig.locales || {})
  593. // if (localeKeys.length) {
  594. // localeKeys.forEach((locale) =>
  595. // i18n.add(locale, __uniConfig.locales[locale])
  596. // )
  597. // }
  598. // }
  599. function getLocale$1() {
  600. // 优先使用 $locale
  601. if (isFn(getApp)) {
  602. var app = getApp({
  603. allowDefault: true
  604. });
  605. if (app && app.$vm) {
  606. return app.$vm.$locale;
  607. }
  608. }
  609. return getLocaleLanguage();
  610. }
  611. function setLocale$1(locale) {
  612. var app = isFn(getApp) ? getApp() : false;
  613. if (!app) {
  614. return false;
  615. }
  616. var oldLocale = app.$vm.$locale;
  617. if (oldLocale !== locale) {
  618. app.$vm.$locale = locale;
  619. onLocaleChangeCallbacks.forEach(function (fn) {
  620. return fn({
  621. locale: locale
  622. });
  623. });
  624. return true;
  625. }
  626. return false;
  627. }
  628. var onLocaleChangeCallbacks = [];
  629. function onLocaleChange(fn) {
  630. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  631. onLocaleChangeCallbacks.push(fn);
  632. }
  633. }
  634. if (typeof global !== 'undefined') {
  635. global.getLocale = getLocale$1;
  636. }
  637. var interceptors = {
  638. promiseInterceptor: promiseInterceptor
  639. };
  640. var baseApi = /*#__PURE__*/Object.freeze({
  641. __proto__: null,
  642. upx2px: upx2px,
  643. rpx2px: upx2px,
  644. getLocale: getLocale$1,
  645. setLocale: setLocale$1,
  646. onLocaleChange: onLocaleChange,
  647. addInterceptor: addInterceptor,
  648. removeInterceptor: removeInterceptor,
  649. interceptors: interceptors
  650. });
  651. function findExistsPageIndex(url) {
  652. var pages = getCurrentPages();
  653. var len = pages.length;
  654. while (len--) {
  655. var page = pages[len];
  656. if (page.$page && page.$page.fullPath === url) {
  657. return len;
  658. }
  659. }
  660. return -1;
  661. }
  662. var redirectTo = {
  663. name: function name(fromArgs) {
  664. if (fromArgs.exists === 'back' && fromArgs.delta) {
  665. return 'navigateBack';
  666. }
  667. return 'redirectTo';
  668. },
  669. args: function args(fromArgs) {
  670. if (fromArgs.exists === 'back' && fromArgs.url) {
  671. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  672. if (existsPageIndex !== -1) {
  673. var delta = getCurrentPages().length - 1 - existsPageIndex;
  674. if (delta > 0) {
  675. fromArgs.delta = delta;
  676. }
  677. }
  678. }
  679. }
  680. };
  681. var previewImage = {
  682. args: function args(fromArgs) {
  683. var currentIndex = parseInt(fromArgs.current);
  684. if (isNaN(currentIndex)) {
  685. return;
  686. }
  687. var urls = fromArgs.urls;
  688. if (!Array.isArray(urls)) {
  689. return;
  690. }
  691. var len = urls.length;
  692. if (!len) {
  693. return;
  694. }
  695. if (currentIndex < 0) {
  696. currentIndex = 0;
  697. } else if (currentIndex >= len) {
  698. currentIndex = len - 1;
  699. }
  700. if (currentIndex > 0) {
  701. fromArgs.current = urls[currentIndex];
  702. fromArgs.urls = urls.filter(function (item, index) {
  703. return index < currentIndex ? item !== urls[currentIndex] : true;
  704. });
  705. } else {
  706. fromArgs.current = urls[0];
  707. }
  708. return {
  709. indicator: false,
  710. loop: false
  711. };
  712. }
  713. };
  714. var UUID_KEY = '__DC_STAT_UUID';
  715. var deviceId;
  716. function useDeviceId(result) {
  717. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  718. if (!deviceId) {
  719. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  720. wx.setStorage({
  721. key: UUID_KEY,
  722. data: deviceId
  723. });
  724. }
  725. result.deviceId = deviceId;
  726. }
  727. function addSafeAreaInsets(result) {
  728. if (result.safeArea) {
  729. var safeArea = result.safeArea;
  730. result.safeAreaInsets = {
  731. top: safeArea.top,
  732. left: safeArea.left,
  733. right: result.windowWidth - safeArea.right,
  734. bottom: result.screenHeight - safeArea.bottom
  735. };
  736. }
  737. }
  738. function getOSInfo(system, platform) {
  739. var osName = '';
  740. var osVersion = '';
  741. if (platform && "mp-weixin" === 'mp-baidu') {
  742. osName = platform;
  743. osVersion = system;
  744. } else {
  745. osName = system.split(' ')[0] || platform;
  746. osVersion = system.split(' ')[1] || '';
  747. }
  748. osName = osName.toLocaleLowerCase();
  749. switch (osName) {
  750. case 'harmony': // alipay
  751. case 'ohos': // weixin
  752. case 'openharmony':
  753. // feishu
  754. osName = 'harmonyos';
  755. break;
  756. case 'iphone os':
  757. // alipay
  758. osName = 'ios';
  759. break;
  760. case 'mac': // weixin qq
  761. case 'darwin':
  762. // feishu
  763. osName = 'macos';
  764. break;
  765. case 'windows_nt':
  766. // feishu
  767. osName = 'windows';
  768. break;
  769. }
  770. return {
  771. osName: osName,
  772. osVersion: osVersion
  773. };
  774. }
  775. function populateParameters(result) {
  776. var _result$brand = result.brand,
  777. brand = _result$brand === void 0 ? '' : _result$brand,
  778. _result$model = result.model,
  779. model = _result$model === void 0 ? '' : _result$model,
  780. _result$system = result.system,
  781. system = _result$system === void 0 ? '' : _result$system,
  782. _result$language = result.language,
  783. language = _result$language === void 0 ? '' : _result$language,
  784. theme = result.theme,
  785. version = result.version,
  786. platform = result.platform,
  787. fontSizeSetting = result.fontSizeSetting,
  788. SDKVersion = result.SDKVersion,
  789. pixelRatio = result.pixelRatio,
  790. deviceOrientation = result.deviceOrientation;
  791. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  792. var extraParam = {};
  793. // osName osVersion
  794. var _getOSInfo = getOSInfo(system, platform),
  795. osName = _getOSInfo.osName,
  796. osVersion = _getOSInfo.osVersion;
  797. var hostVersion = version;
  798. // deviceType
  799. var deviceType = getGetDeviceType(result, model);
  800. // deviceModel
  801. var deviceBrand = getDeviceBrand(brand);
  802. // hostName
  803. var _hostName = getHostName(result);
  804. // deviceOrientation
  805. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  806. // devicePixelRatio
  807. var _devicePixelRatio = pixelRatio;
  808. // SDKVersion
  809. var _SDKVersion = SDKVersion;
  810. // hostLanguage
  811. var hostLanguage = (language || '').replace(/_/g, '-');
  812. // wx.getAccountInfoSync
  813. var parameters = {
  814. appId: "",
  815. appName: "project3",
  816. appVersion: "1.0.0",
  817. appVersionCode: "100",
  818. appLanguage: getAppLanguage(hostLanguage),
  819. uniCompileVersion: "4.66",
  820. uniCompilerVersion: "4.66",
  821. uniRuntimeVersion: "4.66",
  822. uniPlatform: undefined || "mp-weixin",
  823. deviceBrand: deviceBrand,
  824. deviceModel: model,
  825. deviceType: deviceType,
  826. devicePixelRatio: _devicePixelRatio,
  827. deviceOrientation: _deviceOrientation,
  828. osName: osName.toLocaleLowerCase(),
  829. osVersion: osVersion,
  830. hostTheme: theme,
  831. hostVersion: hostVersion,
  832. hostLanguage: hostLanguage,
  833. hostName: _hostName,
  834. hostSDKVersion: _SDKVersion,
  835. hostFontSizeSetting: fontSizeSetting,
  836. windowTop: 0,
  837. windowBottom: 0,
  838. // TODO
  839. osLanguage: undefined,
  840. osTheme: undefined,
  841. ua: undefined,
  842. hostPackageName: undefined,
  843. browserName: undefined,
  844. browserVersion: undefined,
  845. isUniAppX: false
  846. };
  847. Object.assign(result, parameters, extraParam);
  848. }
  849. function getGetDeviceType(result, model) {
  850. var deviceType = result.deviceType || 'phone';
  851. {
  852. var deviceTypeMaps = {
  853. ipad: 'pad',
  854. windows: 'pc',
  855. mac: 'pc'
  856. };
  857. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  858. var _model = model.toLocaleLowerCase();
  859. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  860. var _m = deviceTypeMapsKeys[index];
  861. if (_model.indexOf(_m) !== -1) {
  862. deviceType = deviceTypeMaps[_m];
  863. break;
  864. }
  865. }
  866. }
  867. return deviceType;
  868. }
  869. function getDeviceBrand(brand) {
  870. var deviceBrand = brand;
  871. if (deviceBrand) {
  872. deviceBrand = brand.toLocaleLowerCase();
  873. }
  874. return deviceBrand;
  875. }
  876. function getAppLanguage(defaultLanguage) {
  877. return getLocale$1 ? getLocale$1() : defaultLanguage;
  878. }
  879. function getHostName(result) {
  880. var _platform = 'WeChat';
  881. var _hostName = result.hostName || _platform; // mp-jd
  882. {
  883. if (result.environment) {
  884. _hostName = result.environment;
  885. } else if (result.host && result.host.env) {
  886. _hostName = result.host.env;
  887. }
  888. }
  889. return _hostName;
  890. }
  891. var getSystemInfo = {
  892. returnValue: function returnValue(result) {
  893. useDeviceId(result);
  894. addSafeAreaInsets(result);
  895. populateParameters(result);
  896. }
  897. };
  898. var showActionSheet = {
  899. args: function args(fromArgs) {
  900. if ((0, _typeof2.default)(fromArgs) === 'object') {
  901. fromArgs.alertText = fromArgs.title;
  902. }
  903. }
  904. };
  905. var getAppBaseInfo = {
  906. returnValue: function returnValue(result) {
  907. var _result = result,
  908. version = _result.version,
  909. language = _result.language,
  910. SDKVersion = _result.SDKVersion,
  911. theme = _result.theme;
  912. var _hostName = getHostName(result);
  913. var hostLanguage = (language || '').replace('_', '-');
  914. result = sortObject(Object.assign(result, {
  915. appId: "",
  916. appName: "project3",
  917. appVersion: "1.0.0",
  918. appVersionCode: "100",
  919. appLanguage: getAppLanguage(hostLanguage),
  920. hostVersion: version,
  921. hostLanguage: hostLanguage,
  922. hostName: _hostName,
  923. hostSDKVersion: SDKVersion,
  924. hostTheme: theme,
  925. isUniAppX: false,
  926. uniPlatform: undefined || "mp-weixin",
  927. uniCompileVersion: "4.66",
  928. uniCompilerVersion: "4.66",
  929. uniRuntimeVersion: "4.66"
  930. }));
  931. }
  932. };
  933. var getDeviceInfo = {
  934. returnValue: function returnValue(result) {
  935. var _result2 = result,
  936. brand = _result2.brand,
  937. model = _result2.model,
  938. _result2$system = _result2.system,
  939. system = _result2$system === void 0 ? '' : _result2$system,
  940. _result2$platform = _result2.platform,
  941. platform = _result2$platform === void 0 ? '' : _result2$platform;
  942. var deviceType = getGetDeviceType(result, model);
  943. var deviceBrand = getDeviceBrand(brand);
  944. useDeviceId(result);
  945. var _getOSInfo2 = getOSInfo(system, platform),
  946. osName = _getOSInfo2.osName,
  947. osVersion = _getOSInfo2.osVersion;
  948. result = sortObject(Object.assign(result, {
  949. deviceType: deviceType,
  950. deviceBrand: deviceBrand,
  951. deviceModel: model,
  952. osName: osName,
  953. osVersion: osVersion
  954. }));
  955. }
  956. };
  957. var getWindowInfo = {
  958. returnValue: function returnValue(result) {
  959. addSafeAreaInsets(result);
  960. result = sortObject(Object.assign(result, {
  961. windowTop: 0,
  962. windowBottom: 0
  963. }));
  964. }
  965. };
  966. var getAppAuthorizeSetting = {
  967. returnValue: function returnValue(result) {
  968. var locationReducedAccuracy = result.locationReducedAccuracy;
  969. result.locationAccuracy = 'unsupported';
  970. if (locationReducedAccuracy === true) {
  971. result.locationAccuracy = 'reduced';
  972. } else if (locationReducedAccuracy === false) {
  973. result.locationAccuracy = 'full';
  974. }
  975. }
  976. };
  977. // import navigateTo from 'uni-helpers/navigate-to'
  978. var compressImage = {
  979. args: function args(fromArgs) {
  980. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  981. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  982. fromArgs.compressHeight = fromArgs.compressedHeight;
  983. }
  984. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  985. fromArgs.compressWidth = fromArgs.compressedWidth;
  986. }
  987. }
  988. };
  989. var protocols = {
  990. redirectTo: redirectTo,
  991. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  992. previewImage: previewImage,
  993. getSystemInfo: getSystemInfo,
  994. getSystemInfoSync: getSystemInfo,
  995. showActionSheet: showActionSheet,
  996. getAppBaseInfo: getAppBaseInfo,
  997. getDeviceInfo: getDeviceInfo,
  998. getWindowInfo: getWindowInfo,
  999. getAppAuthorizeSetting: getAppAuthorizeSetting,
  1000. compressImage: compressImage
  1001. };
  1002. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  1003. var canIUses = [];
  1004. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  1005. function processCallback(methodName, method, returnValue) {
  1006. return function (res) {
  1007. return method(processReturnValue(methodName, res, returnValue));
  1008. };
  1009. }
  1010. function processArgs(methodName, fromArgs) {
  1011. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1012. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  1013. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  1014. if (isPlainObject(fromArgs)) {
  1015. // 一般 api 的参数解析
  1016. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  1017. if (isFn(argsOption)) {
  1018. argsOption = argsOption(fromArgs, toArgs) || {};
  1019. }
  1020. for (var key in fromArgs) {
  1021. if (hasOwn(argsOption, key)) {
  1022. var keyOption = argsOption[key];
  1023. if (isFn(keyOption)) {
  1024. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1025. }
  1026. if (!keyOption) {
  1027. // 不支持的参数
  1028. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  1029. } else if (isStr(keyOption)) {
  1030. // 重写参数 key
  1031. toArgs[keyOption] = fromArgs[key];
  1032. } else if (isPlainObject(keyOption)) {
  1033. // {name:newName,value:value}可重新指定参数 key:value
  1034. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1035. }
  1036. } else if (CALLBACKS.indexOf(key) !== -1) {
  1037. if (isFn(fromArgs[key])) {
  1038. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  1039. }
  1040. } else {
  1041. if (!keepFromArgs) {
  1042. toArgs[key] = fromArgs[key];
  1043. }
  1044. }
  1045. }
  1046. return toArgs;
  1047. } else if (isFn(fromArgs)) {
  1048. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1049. }
  1050. return fromArgs;
  1051. }
  1052. function processReturnValue(methodName, res, returnValue) {
  1053. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  1054. if (isFn(protocols.returnValue)) {
  1055. // 处理通用 returnValue
  1056. res = protocols.returnValue(methodName, res);
  1057. }
  1058. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1059. }
  1060. function wrapper(methodName, method) {
  1061. if (hasOwn(protocols, methodName)) {
  1062. var protocol = protocols[methodName];
  1063. if (!protocol) {
  1064. // 暂不支持的 api
  1065. return function () {
  1066. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  1067. };
  1068. }
  1069. return function (arg1, arg2) {
  1070. // 目前 api 最多两个参数
  1071. var options = protocol;
  1072. if (isFn(protocol)) {
  1073. options = protocol(arg1);
  1074. }
  1075. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1076. var args = [arg1];
  1077. if (typeof arg2 !== 'undefined') {
  1078. args.push(arg2);
  1079. }
  1080. if (isFn(options.name)) {
  1081. methodName = options.name(arg1);
  1082. } else if (isStr(options.name)) {
  1083. methodName = options.name;
  1084. }
  1085. var returnValue = wx[methodName].apply(wx, args);
  1086. if (isSyncApi(methodName)) {
  1087. // 同步 api
  1088. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1089. }
  1090. return returnValue;
  1091. };
  1092. }
  1093. return method;
  1094. }
  1095. var todoApis = Object.create(null);
  1096. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1097. function createTodoApi(name) {
  1098. return function todoApi(_ref) {
  1099. var fail = _ref.fail,
  1100. complete = _ref.complete;
  1101. var res = {
  1102. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1103. };
  1104. isFn(fail) && fail(res);
  1105. isFn(complete) && complete(res);
  1106. };
  1107. }
  1108. TODOS.forEach(function (name) {
  1109. todoApis[name] = createTodoApi(name);
  1110. });
  1111. var providers = {
  1112. oauth: ['weixin'],
  1113. share: ['weixin'],
  1114. payment: ['wxpay'],
  1115. push: ['weixin']
  1116. };
  1117. function getProvider(_ref2) {
  1118. var service = _ref2.service,
  1119. success = _ref2.success,
  1120. fail = _ref2.fail,
  1121. complete = _ref2.complete;
  1122. var res = false;
  1123. if (providers[service]) {
  1124. res = {
  1125. errMsg: 'getProvider:ok',
  1126. service: service,
  1127. provider: providers[service]
  1128. };
  1129. isFn(success) && success(res);
  1130. } else {
  1131. res = {
  1132. errMsg: 'getProvider:fail service not found'
  1133. };
  1134. isFn(fail) && fail(res);
  1135. }
  1136. isFn(complete) && complete(res);
  1137. }
  1138. var extraApi = /*#__PURE__*/Object.freeze({
  1139. __proto__: null,
  1140. getProvider: getProvider
  1141. });
  1142. var getEmitter = function () {
  1143. var Emitter;
  1144. return function getUniEmitter() {
  1145. if (!Emitter) {
  1146. Emitter = new _vue.default();
  1147. }
  1148. return Emitter;
  1149. };
  1150. }();
  1151. function apply(ctx, method, args) {
  1152. return ctx[method].apply(ctx, args);
  1153. }
  1154. function $on() {
  1155. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1156. }
  1157. function $off() {
  1158. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1159. }
  1160. function $once() {
  1161. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1162. }
  1163. function $emit() {
  1164. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1165. }
  1166. var eventApi = /*#__PURE__*/Object.freeze({
  1167. __proto__: null,
  1168. $on: $on,
  1169. $off: $off,
  1170. $once: $once,
  1171. $emit: $emit
  1172. });
  1173. /**
  1174. * 框架内 try-catch
  1175. */
  1176. /**
  1177. * 开发者 try-catch
  1178. */
  1179. function tryCatch(fn) {
  1180. return function () {
  1181. try {
  1182. return fn.apply(fn, arguments);
  1183. } catch (e) {
  1184. // TODO
  1185. console.error(e);
  1186. }
  1187. };
  1188. }
  1189. function getApiCallbacks(params) {
  1190. var apiCallbacks = {};
  1191. for (var name in params) {
  1192. var param = params[name];
  1193. if (isFn(param)) {
  1194. apiCallbacks[name] = tryCatch(param);
  1195. delete params[name];
  1196. }
  1197. }
  1198. return apiCallbacks;
  1199. }
  1200. var cid;
  1201. var cidErrMsg;
  1202. var enabled;
  1203. function normalizePushMessage(message) {
  1204. try {
  1205. return JSON.parse(message);
  1206. } catch (e) {}
  1207. return message;
  1208. }
  1209. function invokePushCallback(args) {
  1210. if (args.type === 'enabled') {
  1211. enabled = true;
  1212. } else if (args.type === 'clientId') {
  1213. cid = args.cid;
  1214. cidErrMsg = args.errMsg;
  1215. invokeGetPushCidCallbacks(cid, args.errMsg);
  1216. } else if (args.type === 'pushMsg') {
  1217. var message = {
  1218. type: 'receive',
  1219. data: normalizePushMessage(args.message)
  1220. };
  1221. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1222. var callback = onPushMessageCallbacks[i];
  1223. callback(message);
  1224. // 该消息已被阻止
  1225. if (message.stopped) {
  1226. break;
  1227. }
  1228. }
  1229. } else if (args.type === 'click') {
  1230. onPushMessageCallbacks.forEach(function (callback) {
  1231. callback({
  1232. type: 'click',
  1233. data: normalizePushMessage(args.message)
  1234. });
  1235. });
  1236. }
  1237. }
  1238. var getPushCidCallbacks = [];
  1239. function invokeGetPushCidCallbacks(cid, errMsg) {
  1240. getPushCidCallbacks.forEach(function (callback) {
  1241. callback(cid, errMsg);
  1242. });
  1243. getPushCidCallbacks.length = 0;
  1244. }
  1245. function getPushClientId(args) {
  1246. if (!isPlainObject(args)) {
  1247. args = {};
  1248. }
  1249. var _getApiCallbacks = getApiCallbacks(args),
  1250. success = _getApiCallbacks.success,
  1251. fail = _getApiCallbacks.fail,
  1252. complete = _getApiCallbacks.complete;
  1253. var hasSuccess = isFn(success);
  1254. var hasFail = isFn(fail);
  1255. var hasComplete = isFn(complete);
  1256. Promise.resolve().then(function () {
  1257. if (typeof enabled === 'undefined') {
  1258. enabled = false;
  1259. cid = '';
  1260. cidErrMsg = 'uniPush is not enabled';
  1261. }
  1262. getPushCidCallbacks.push(function (cid, errMsg) {
  1263. var res;
  1264. if (cid) {
  1265. res = {
  1266. errMsg: 'getPushClientId:ok',
  1267. cid: cid
  1268. };
  1269. hasSuccess && success(res);
  1270. } else {
  1271. res = {
  1272. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1273. };
  1274. hasFail && fail(res);
  1275. }
  1276. hasComplete && complete(res);
  1277. });
  1278. if (typeof cid !== 'undefined') {
  1279. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1280. }
  1281. });
  1282. }
  1283. var onPushMessageCallbacks = [];
  1284. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1285. var onPushMessage = function onPushMessage(fn) {
  1286. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1287. onPushMessageCallbacks.push(fn);
  1288. }
  1289. };
  1290. var offPushMessage = function offPushMessage(fn) {
  1291. if (!fn) {
  1292. onPushMessageCallbacks.length = 0;
  1293. } else {
  1294. var index = onPushMessageCallbacks.indexOf(fn);
  1295. if (index > -1) {
  1296. onPushMessageCallbacks.splice(index, 1);
  1297. }
  1298. }
  1299. };
  1300. function __f__(type) {
  1301. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1302. args[_key3 - 1] = arguments[_key3];
  1303. }
  1304. console[type].apply(console, args);
  1305. }
  1306. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1307. if (!baseInfo) {
  1308. baseInfo = wx.getSystemInfoSync();
  1309. }
  1310. var host = baseInfo ? baseInfo.host : null;
  1311. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1312. var api = /*#__PURE__*/Object.freeze({
  1313. __proto__: null,
  1314. shareVideoMessage: shareVideoMessage,
  1315. getPushClientId: getPushClientId,
  1316. onPushMessage: onPushMessage,
  1317. offPushMessage: offPushMessage,
  1318. invokePushCallback: invokePushCallback,
  1319. __f__: __f__
  1320. });
  1321. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1322. function findVmByVueId(vm, vuePid) {
  1323. var $children = vm.$children;
  1324. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1325. for (var i = $children.length - 1; i >= 0; i--) {
  1326. var childVm = $children[i];
  1327. if (childVm.$scope._$vueId === vuePid) {
  1328. return childVm;
  1329. }
  1330. }
  1331. // 反向递归查找
  1332. var parentVm;
  1333. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1334. parentVm = findVmByVueId($children[_i], vuePid);
  1335. if (parentVm) {
  1336. return parentVm;
  1337. }
  1338. }
  1339. }
  1340. function initBehavior(options) {
  1341. return Behavior(options);
  1342. }
  1343. function isPage() {
  1344. return !!this.route;
  1345. }
  1346. function initRelation(detail) {
  1347. this.triggerEvent('__l', detail);
  1348. }
  1349. function selectAllComponents(mpInstance, selector, $refs) {
  1350. var components = mpInstance.selectAllComponents(selector) || [];
  1351. components.forEach(function (component) {
  1352. var ref = component.dataset.ref;
  1353. $refs[ref] = component.$vm || toSkip(component);
  1354. {
  1355. if (component.dataset.vueGeneric === 'scoped') {
  1356. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1357. selectAllComponents(scopedComponent, selector, $refs);
  1358. });
  1359. }
  1360. }
  1361. });
  1362. }
  1363. function syncRefs(refs, newRefs) {
  1364. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1365. var newKeys = Object.keys(newRefs);
  1366. newKeys.forEach(function (key) {
  1367. var oldValue = refs[key];
  1368. var newValue = newRefs[key];
  1369. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1370. return oldValue.includes(value);
  1371. })) {
  1372. return;
  1373. }
  1374. refs[key] = newValue;
  1375. oldKeys.delete(key);
  1376. });
  1377. oldKeys.forEach(function (key) {
  1378. delete refs[key];
  1379. });
  1380. return refs;
  1381. }
  1382. function initRefs(vm) {
  1383. var mpInstance = vm.$scope;
  1384. var refs = {};
  1385. Object.defineProperty(vm, '$refs', {
  1386. get: function get() {
  1387. var $refs = {};
  1388. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1389. // TODO 暂不考虑 for 中的 scoped
  1390. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1391. forComponents.forEach(function (component) {
  1392. var ref = component.dataset.ref;
  1393. if (!$refs[ref]) {
  1394. $refs[ref] = [];
  1395. }
  1396. $refs[ref].push(component.$vm || toSkip(component));
  1397. });
  1398. return syncRefs(refs, $refs);
  1399. }
  1400. });
  1401. }
  1402. function handleLink(event) {
  1403. var _ref3 = event.detail || event.value,
  1404. vuePid = _ref3.vuePid,
  1405. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1406. var parentVm;
  1407. if (vuePid) {
  1408. parentVm = findVmByVueId(this.$vm, vuePid);
  1409. }
  1410. if (!parentVm) {
  1411. parentVm = this.$vm;
  1412. }
  1413. vueOptions.parent = parentVm;
  1414. }
  1415. function markMPComponent(component) {
  1416. // 在 Vue 中标记为小程序组件
  1417. var IS_MP = '__v_isMPComponent';
  1418. Object.defineProperty(component, IS_MP, {
  1419. configurable: true,
  1420. enumerable: false,
  1421. value: true
  1422. });
  1423. return component;
  1424. }
  1425. function toSkip(obj) {
  1426. var OB = '__ob__';
  1427. var SKIP = '__v_skip';
  1428. if (isObject(obj) && Object.isExtensible(obj)) {
  1429. // 避免被 @vue/composition-api 观测
  1430. Object.defineProperty(obj, OB, {
  1431. configurable: true,
  1432. enumerable: false,
  1433. value: (0, _defineProperty2.default)({}, SKIP, true)
  1434. });
  1435. }
  1436. return obj;
  1437. }
  1438. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1439. function initWorkletMethods(mpMethods, vueMethods) {
  1440. if (vueMethods) {
  1441. Object.keys(vueMethods).forEach(function (name) {
  1442. var matches = name.match(WORKLET_RE);
  1443. if (matches) {
  1444. var workletName = matches[1];
  1445. mpMethods[name] = vueMethods[name];
  1446. mpMethods[workletName] = vueMethods[workletName];
  1447. }
  1448. });
  1449. }
  1450. }
  1451. var MPPage = Page;
  1452. var MPComponent = Component;
  1453. var customizeRE = /:/g;
  1454. var customize = cached(function (str) {
  1455. return camelize(str.replace(customizeRE, '-'));
  1456. });
  1457. function initTriggerEvent(mpInstance) {
  1458. var oldTriggerEvent = mpInstance.triggerEvent;
  1459. var newTriggerEvent = function newTriggerEvent(event) {
  1460. for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  1461. args[_key4 - 1] = arguments[_key4];
  1462. }
  1463. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1464. if (this.$vm || this.dataset && this.dataset.comType) {
  1465. event = customize(event);
  1466. } else {
  1467. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1468. var newEvent = customize(event);
  1469. if (newEvent !== event) {
  1470. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1471. }
  1472. }
  1473. return oldTriggerEvent.apply(this, [event].concat(args));
  1474. };
  1475. try {
  1476. // 京东小程序 triggerEvent 为只读
  1477. mpInstance.triggerEvent = newTriggerEvent;
  1478. } catch (error) {
  1479. mpInstance._triggerEvent = newTriggerEvent;
  1480. }
  1481. }
  1482. function initHook(name, options, isComponent) {
  1483. var oldHook = options[name];
  1484. options[name] = function () {
  1485. markMPComponent(this);
  1486. initTriggerEvent(this);
  1487. if (oldHook) {
  1488. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  1489. args[_key5] = arguments[_key5];
  1490. }
  1491. return oldHook.apply(this, args);
  1492. }
  1493. };
  1494. }
  1495. if (!MPPage.__$wrappered) {
  1496. MPPage.__$wrappered = true;
  1497. Page = function Page() {
  1498. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1499. initHook('onLoad', options);
  1500. return MPPage(options);
  1501. };
  1502. Page.after = MPPage.after;
  1503. Component = function Component() {
  1504. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1505. initHook('created', options);
  1506. return MPComponent(options);
  1507. };
  1508. }
  1509. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1510. function initMocks(vm, mocks) {
  1511. var mpInstance = vm.$mp[vm.mpType];
  1512. mocks.forEach(function (mock) {
  1513. if (hasOwn(mpInstance, mock)) {
  1514. vm[mock] = mpInstance[mock];
  1515. }
  1516. });
  1517. }
  1518. function hasHook(hook, vueOptions) {
  1519. if (!vueOptions) {
  1520. return true;
  1521. }
  1522. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1523. return true;
  1524. }
  1525. vueOptions = vueOptions.default || vueOptions;
  1526. if (isFn(vueOptions)) {
  1527. if (isFn(vueOptions.extendOptions[hook])) {
  1528. return true;
  1529. }
  1530. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1531. return true;
  1532. }
  1533. return false;
  1534. }
  1535. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1536. return true;
  1537. }
  1538. var mixins = vueOptions.mixins;
  1539. if (Array.isArray(mixins)) {
  1540. return !!mixins.find(function (mixin) {
  1541. return hasHook(hook, mixin);
  1542. });
  1543. }
  1544. }
  1545. function initHooks(mpOptions, hooks, vueOptions) {
  1546. hooks.forEach(function (hook) {
  1547. if (hasHook(hook, vueOptions)) {
  1548. mpOptions[hook] = function (args) {
  1549. return this.$vm && this.$vm.__call_hook(hook, args);
  1550. };
  1551. }
  1552. });
  1553. }
  1554. function initUnknownHooks(mpOptions, vueOptions) {
  1555. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1556. findHooks(vueOptions).forEach(function (hook) {
  1557. return initHook$1(mpOptions, hook, excludes);
  1558. });
  1559. }
  1560. function findHooks(vueOptions) {
  1561. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1562. if (vueOptions) {
  1563. Object.keys(vueOptions).forEach(function (name) {
  1564. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1565. hooks.push(name);
  1566. }
  1567. });
  1568. }
  1569. return hooks;
  1570. }
  1571. function initHook$1(mpOptions, hook, excludes) {
  1572. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1573. mpOptions[hook] = function (args) {
  1574. return this.$vm && this.$vm.__call_hook(hook, args);
  1575. };
  1576. }
  1577. }
  1578. function initVueComponent(Vue, vueOptions) {
  1579. vueOptions = vueOptions.default || vueOptions;
  1580. var VueComponent;
  1581. if (isFn(vueOptions)) {
  1582. VueComponent = vueOptions;
  1583. } else {
  1584. VueComponent = Vue.extend(vueOptions);
  1585. }
  1586. vueOptions = VueComponent.options;
  1587. return [VueComponent, vueOptions];
  1588. }
  1589. function initSlots(vm, vueSlots) {
  1590. if (Array.isArray(vueSlots) && vueSlots.length) {
  1591. var $slots = Object.create(null);
  1592. vueSlots.forEach(function (slotName) {
  1593. $slots[slotName] = true;
  1594. });
  1595. vm.$scopedSlots = vm.$slots = $slots;
  1596. }
  1597. }
  1598. function initVueIds(vueIds, mpInstance) {
  1599. vueIds = (vueIds || '').split(',');
  1600. var len = vueIds.length;
  1601. if (len === 1) {
  1602. mpInstance._$vueId = vueIds[0];
  1603. } else if (len === 2) {
  1604. mpInstance._$vueId = vueIds[0];
  1605. mpInstance._$vuePid = vueIds[1];
  1606. }
  1607. }
  1608. function initData(vueOptions, context) {
  1609. var data = vueOptions.data || {};
  1610. var methods = vueOptions.methods || {};
  1611. if (typeof data === 'function') {
  1612. try {
  1613. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1614. } catch (e) {
  1615. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"project3","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1616. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1617. }
  1618. }
  1619. } else {
  1620. try {
  1621. // 对 data 格式化
  1622. data = JSON.parse(JSON.stringify(data));
  1623. } catch (e) {}
  1624. }
  1625. if (!isPlainObject(data)) {
  1626. data = {};
  1627. }
  1628. Object.keys(methods).forEach(function (methodName) {
  1629. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1630. data[methodName] = methods[methodName];
  1631. }
  1632. });
  1633. return data;
  1634. }
  1635. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1636. function createObserver(name) {
  1637. return function observer(newVal, oldVal) {
  1638. if (this.$vm) {
  1639. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1640. }
  1641. };
  1642. }
  1643. function initBehaviors(vueOptions, initBehavior) {
  1644. var vueBehaviors = vueOptions.behaviors;
  1645. var vueExtends = vueOptions.extends;
  1646. var vueMixins = vueOptions.mixins;
  1647. var vueProps = vueOptions.props;
  1648. if (!vueProps) {
  1649. vueOptions.props = vueProps = [];
  1650. }
  1651. var behaviors = [];
  1652. if (Array.isArray(vueBehaviors)) {
  1653. vueBehaviors.forEach(function (behavior) {
  1654. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1655. if (behavior === 'uni://form-field') {
  1656. if (Array.isArray(vueProps)) {
  1657. vueProps.push('name');
  1658. vueProps.push('value');
  1659. } else {
  1660. vueProps.name = {
  1661. type: String,
  1662. default: ''
  1663. };
  1664. vueProps.value = {
  1665. type: [String, Number, Boolean, Array, Object, Date],
  1666. default: ''
  1667. };
  1668. }
  1669. }
  1670. });
  1671. }
  1672. if (isPlainObject(vueExtends) && vueExtends.props) {
  1673. behaviors.push(initBehavior({
  1674. properties: initProperties(vueExtends.props, true)
  1675. }));
  1676. }
  1677. if (Array.isArray(vueMixins)) {
  1678. vueMixins.forEach(function (vueMixin) {
  1679. if (isPlainObject(vueMixin) && vueMixin.props) {
  1680. behaviors.push(initBehavior({
  1681. properties: initProperties(vueMixin.props, true)
  1682. }));
  1683. }
  1684. });
  1685. }
  1686. return behaviors;
  1687. }
  1688. function parsePropType(key, type, defaultValue, file) {
  1689. // [String]=>String
  1690. if (Array.isArray(type) && type.length === 1) {
  1691. return type[0];
  1692. }
  1693. return type;
  1694. }
  1695. function initProperties(props) {
  1696. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1697. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1698. var options = arguments.length > 3 ? arguments[3] : undefined;
  1699. var properties = {};
  1700. if (!isBehavior) {
  1701. properties.vueId = {
  1702. type: String,
  1703. value: ''
  1704. };
  1705. {
  1706. if (options.virtualHost) {
  1707. properties.virtualHostStyle = {
  1708. type: null,
  1709. value: ''
  1710. };
  1711. properties.virtualHostClass = {
  1712. type: null,
  1713. value: ''
  1714. };
  1715. }
  1716. }
  1717. // scopedSlotsCompiler auto
  1718. properties.scopedSlotsCompiler = {
  1719. type: String,
  1720. value: ''
  1721. };
  1722. properties.vueSlots = {
  1723. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1724. type: null,
  1725. value: [],
  1726. observer: function observer(newVal, oldVal) {
  1727. var $slots = Object.create(null);
  1728. newVal.forEach(function (slotName) {
  1729. $slots[slotName] = true;
  1730. });
  1731. this.setData({
  1732. $slots: $slots
  1733. });
  1734. }
  1735. };
  1736. }
  1737. if (Array.isArray(props)) {
  1738. // ['title']
  1739. props.forEach(function (key) {
  1740. properties[key] = {
  1741. type: null,
  1742. observer: createObserver(key)
  1743. };
  1744. });
  1745. } else if (isPlainObject(props)) {
  1746. // {title:{type:String,default:''},content:String}
  1747. Object.keys(props).forEach(function (key) {
  1748. var opts = props[key];
  1749. if (isPlainObject(opts)) {
  1750. // title:{type:String,default:''}
  1751. var value = opts.default;
  1752. if (isFn(value)) {
  1753. value = value();
  1754. }
  1755. opts.type = parsePropType(key, opts.type);
  1756. properties[key] = {
  1757. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1758. value: value,
  1759. observer: createObserver(key)
  1760. };
  1761. } else {
  1762. // content:String
  1763. var type = parsePropType(key, opts);
  1764. properties[key] = {
  1765. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1766. observer: createObserver(key)
  1767. };
  1768. }
  1769. });
  1770. }
  1771. return properties;
  1772. }
  1773. function wrapper$1(event) {
  1774. // TODO 又得兼容 mpvue 的 mp 对象
  1775. try {
  1776. event.mp = JSON.parse(JSON.stringify(event));
  1777. } catch (e) {}
  1778. event.stopPropagation = noop;
  1779. event.preventDefault = noop;
  1780. event.target = event.target || {};
  1781. if (!hasOwn(event, 'detail')) {
  1782. event.detail = {};
  1783. }
  1784. if (hasOwn(event, 'markerId')) {
  1785. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1786. event.detail.markerId = event.markerId;
  1787. }
  1788. if (isPlainObject(event.detail)) {
  1789. event.target = Object.assign({}, event.target, event.detail);
  1790. }
  1791. return event;
  1792. }
  1793. function getExtraValue(vm, dataPathsArray) {
  1794. var context = vm;
  1795. dataPathsArray.forEach(function (dataPathArray) {
  1796. var dataPath = dataPathArray[0];
  1797. var value = dataPathArray[2];
  1798. if (dataPath || typeof value !== 'undefined') {
  1799. // ['','',index,'disable']
  1800. var propPath = dataPathArray[1];
  1801. var valuePath = dataPathArray[3];
  1802. var vFor;
  1803. if (Number.isInteger(dataPath)) {
  1804. vFor = dataPath;
  1805. } else if (!dataPath) {
  1806. vFor = context;
  1807. } else if (typeof dataPath === 'string' && dataPath) {
  1808. if (dataPath.indexOf('#s#') === 0) {
  1809. vFor = dataPath.substr(3);
  1810. } else {
  1811. vFor = vm.__get_value(dataPath, context);
  1812. }
  1813. }
  1814. if (Number.isInteger(vFor)) {
  1815. context = value;
  1816. } else if (!propPath) {
  1817. context = vFor[value];
  1818. } else {
  1819. if (Array.isArray(vFor)) {
  1820. context = vFor.find(function (vForItem) {
  1821. return vm.__get_value(propPath, vForItem) === value;
  1822. });
  1823. } else if (isPlainObject(vFor)) {
  1824. context = Object.keys(vFor).find(function (vForKey) {
  1825. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1826. });
  1827. } else {
  1828. console.error('v-for 暂不支持循环数据:', vFor);
  1829. }
  1830. }
  1831. if (valuePath) {
  1832. context = vm.__get_value(valuePath, context);
  1833. }
  1834. }
  1835. });
  1836. return context;
  1837. }
  1838. function processEventExtra(vm, extra, event, __args__) {
  1839. var extraObj = {};
  1840. if (Array.isArray(extra) && extra.length) {
  1841. /**
  1842. *[
  1843. * ['data.items', 'data.id', item.data.id],
  1844. * ['metas', 'id', meta.id]
  1845. *],
  1846. *[
  1847. * ['data.items', 'data.id', item.data.id],
  1848. * ['metas', 'id', meta.id]
  1849. *],
  1850. *'test'
  1851. */
  1852. extra.forEach(function (dataPath, index) {
  1853. if (typeof dataPath === 'string') {
  1854. if (!dataPath) {
  1855. // model,prop.sync
  1856. extraObj['$' + index] = vm;
  1857. } else {
  1858. if (dataPath === '$event') {
  1859. // $event
  1860. extraObj['$' + index] = event;
  1861. } else if (dataPath === 'arguments') {
  1862. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1863. } else if (dataPath.indexOf('$event.') === 0) {
  1864. // $event.target.value
  1865. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1866. } else {
  1867. extraObj['$' + index] = vm.__get_value(dataPath);
  1868. }
  1869. }
  1870. } else {
  1871. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1872. }
  1873. });
  1874. }
  1875. return extraObj;
  1876. }
  1877. function getObjByArray(arr) {
  1878. var obj = {};
  1879. for (var i = 1; i < arr.length; i++) {
  1880. var element = arr[i];
  1881. obj[element[0]] = element[1];
  1882. }
  1883. return obj;
  1884. }
  1885. function processEventArgs(vm, event) {
  1886. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1887. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1888. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1889. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1890. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1891. // fixed 用户直接触发 mpInstance.triggerEvent
  1892. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1893. if (isCustom) {
  1894. // 自定义事件
  1895. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1896. if (!args.length) {
  1897. // 无参数,直接传入 event 或 detail 数组
  1898. if (isCustomMPEvent) {
  1899. return [event];
  1900. }
  1901. return __args__;
  1902. }
  1903. }
  1904. var extraObj = processEventExtra(vm, extra, event, __args__);
  1905. var ret = [];
  1906. args.forEach(function (arg) {
  1907. if (arg === '$event') {
  1908. if (methodName === '__set_model' && !isCustom) {
  1909. // input v-model value
  1910. ret.push(event.target.value);
  1911. } else {
  1912. if (isCustom && !isCustomMPEvent) {
  1913. ret.push(__args__[0]);
  1914. } else {
  1915. // wxcomponent 组件或内置组件
  1916. ret.push(event);
  1917. }
  1918. }
  1919. } else {
  1920. if (Array.isArray(arg) && arg[0] === 'o') {
  1921. ret.push(getObjByArray(arg));
  1922. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1923. ret.push(extraObj[arg]);
  1924. } else {
  1925. ret.push(arg);
  1926. }
  1927. }
  1928. });
  1929. return ret;
  1930. }
  1931. var ONCE = '~';
  1932. var CUSTOM = '^';
  1933. function isMatchEventType(eventType, optType) {
  1934. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  1935. }
  1936. function getContextVm(vm) {
  1937. var $parent = vm.$parent;
  1938. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1939. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1940. $parent = $parent.$parent;
  1941. }
  1942. return $parent && $parent.$parent;
  1943. }
  1944. function handleEvent(event) {
  1945. var _this2 = this;
  1946. event = wrapper$1(event);
  1947. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1948. var dataset = (event.currentTarget || event.target).dataset;
  1949. if (!dataset) {
  1950. return console.warn('事件信息不存在');
  1951. }
  1952. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1953. if (!eventOpts) {
  1954. return console.warn('事件信息不存在');
  1955. }
  1956. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1957. var eventType = event.type;
  1958. var ret = [];
  1959. eventOpts.forEach(function (eventOpt) {
  1960. var type = eventOpt[0];
  1961. var eventsArray = eventOpt[1];
  1962. var isCustom = type.charAt(0) === CUSTOM;
  1963. type = isCustom ? type.slice(1) : type;
  1964. var isOnce = type.charAt(0) === ONCE;
  1965. type = isOnce ? type.slice(1) : type;
  1966. if (eventsArray && isMatchEventType(eventType, type)) {
  1967. eventsArray.forEach(function (eventArray) {
  1968. var methodName = eventArray[0];
  1969. if (methodName) {
  1970. var handlerCtx = _this2.$vm;
  1971. if (handlerCtx.$options.generic) {
  1972. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1973. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1974. }
  1975. if (methodName === '$emit') {
  1976. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  1977. return;
  1978. }
  1979. var handler = handlerCtx[methodName];
  1980. if (!isFn(handler)) {
  1981. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  1982. var path = _this2.route || _this2.is;
  1983. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  1984. }
  1985. if (isOnce) {
  1986. if (handler.once) {
  1987. return;
  1988. }
  1989. handler.once = true;
  1990. }
  1991. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  1992. params = Array.isArray(params) ? params : [];
  1993. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1994. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1995. // eslint-disable-next-line no-sparse-arrays
  1996. params = params.concat([,,,,,,,,,, event]);
  1997. }
  1998. ret.push(handler.apply(handlerCtx, params));
  1999. }
  2000. });
  2001. }
  2002. });
  2003. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  2004. return ret[0];
  2005. }
  2006. }
  2007. var eventChannels = {};
  2008. function getEventChannel(id) {
  2009. var eventChannel = eventChannels[id];
  2010. delete eventChannels[id];
  2011. return eventChannel;
  2012. }
  2013. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  2014. function initEventChannel() {
  2015. _vue.default.prototype.getOpenerEventChannel = function () {
  2016. // 微信小程序使用自身getOpenerEventChannel
  2017. {
  2018. return this.$scope.getOpenerEventChannel();
  2019. }
  2020. };
  2021. var callHook = _vue.default.prototype.__call_hook;
  2022. _vue.default.prototype.__call_hook = function (hook, args) {
  2023. if (hook === 'onLoad' && args && args.__id__) {
  2024. this.__eventChannel__ = getEventChannel(args.__id__);
  2025. delete args.__id__;
  2026. }
  2027. return callHook.call(this, hook, args);
  2028. };
  2029. }
  2030. function initScopedSlotsParams() {
  2031. var center = {};
  2032. var parents = {};
  2033. function currentId(fn) {
  2034. var vueIds = this.$options.propsData.vueId;
  2035. if (vueIds) {
  2036. var vueId = vueIds.split(',')[0];
  2037. fn(vueId);
  2038. }
  2039. }
  2040. _vue.default.prototype.$hasSSP = function (vueId) {
  2041. var slot = center[vueId];
  2042. if (!slot) {
  2043. parents[vueId] = this;
  2044. this.$on('hook:destroyed', function () {
  2045. delete parents[vueId];
  2046. });
  2047. }
  2048. return slot;
  2049. };
  2050. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  2051. var slot = center[vueId];
  2052. if (slot) {
  2053. var params = slot[name] || [];
  2054. if (needAll) {
  2055. return params;
  2056. }
  2057. return params[0];
  2058. }
  2059. };
  2060. _vue.default.prototype.$setSSP = function (name, value) {
  2061. var index = 0;
  2062. currentId.call(this, function (vueId) {
  2063. var slot = center[vueId];
  2064. var params = slot[name] = slot[name] || [];
  2065. params.push(value);
  2066. index = params.length - 1;
  2067. });
  2068. return index;
  2069. };
  2070. _vue.default.prototype.$initSSP = function () {
  2071. currentId.call(this, function (vueId) {
  2072. center[vueId] = {};
  2073. });
  2074. };
  2075. _vue.default.prototype.$callSSP = function () {
  2076. currentId.call(this, function (vueId) {
  2077. if (parents[vueId]) {
  2078. parents[vueId].$forceUpdate();
  2079. }
  2080. });
  2081. };
  2082. _vue.default.mixin({
  2083. destroyed: function destroyed() {
  2084. var propsData = this.$options.propsData;
  2085. var vueId = propsData && propsData.vueId;
  2086. if (vueId) {
  2087. delete center[vueId];
  2088. delete parents[vueId];
  2089. }
  2090. }
  2091. });
  2092. }
  2093. function parseBaseApp(vm, _ref4) {
  2094. var mocks = _ref4.mocks,
  2095. initRefs = _ref4.initRefs;
  2096. initEventChannel();
  2097. {
  2098. initScopedSlotsParams();
  2099. }
  2100. if (vm.$options.store) {
  2101. _vue.default.prototype.$store = vm.$options.store;
  2102. }
  2103. uniIdMixin(_vue.default);
  2104. _vue.default.prototype.mpHost = "mp-weixin";
  2105. _vue.default.mixin({
  2106. beforeCreate: function beforeCreate() {
  2107. if (!this.$options.mpType) {
  2108. return;
  2109. }
  2110. this.mpType = this.$options.mpType;
  2111. this.$mp = (0, _defineProperty2.default)({
  2112. data: {}
  2113. }, this.mpType, this.$options.mpInstance);
  2114. this.$scope = this.$options.mpInstance;
  2115. delete this.$options.mpType;
  2116. delete this.$options.mpInstance;
  2117. if (this.mpType === 'page' && typeof getApp === 'function') {
  2118. // hack vue-i18n
  2119. var app = getApp();
  2120. if (app.$vm && app.$vm.$i18n) {
  2121. this._i18n = app.$vm.$i18n;
  2122. }
  2123. }
  2124. if (this.mpType !== 'app') {
  2125. initRefs(this);
  2126. initMocks(this, mocks);
  2127. }
  2128. }
  2129. });
  2130. var appOptions = {
  2131. onLaunch: function onLaunch(args) {
  2132. if (this.$vm) {
  2133. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2134. return;
  2135. }
  2136. {
  2137. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2138. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2139. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2140. }
  2141. }
  2142. this.$vm = vm;
  2143. this.$vm.$mp = {
  2144. app: this
  2145. };
  2146. this.$vm.$scope = this;
  2147. // vm 上也挂载 globalData
  2148. this.$vm.globalData = this.globalData;
  2149. this.$vm._isMounted = true;
  2150. this.$vm.__call_hook('mounted', args);
  2151. this.$vm.__call_hook('onLaunch', args);
  2152. }
  2153. };
  2154. // 兼容旧版本 globalData
  2155. appOptions.globalData = vm.$options.globalData || {};
  2156. // 将 methods 中的方法挂在 getApp() 中
  2157. var methods = vm.$options.methods;
  2158. if (methods) {
  2159. Object.keys(methods).forEach(function (name) {
  2160. appOptions[name] = methods[name];
  2161. });
  2162. }
  2163. initAppLocale(_vue.default, vm, getLocaleLanguage$1());
  2164. initHooks(appOptions, hooks);
  2165. initUnknownHooks(appOptions, vm.$options);
  2166. return appOptions;
  2167. }
  2168. function getLocaleLanguage$1() {
  2169. var localeLanguage = '';
  2170. {
  2171. var appBaseInfo = wx.getAppBaseInfo();
  2172. var language = appBaseInfo && appBaseInfo.language ? appBaseInfo.language : LOCALE_EN;
  2173. localeLanguage = normalizeLocale(language) || LOCALE_EN;
  2174. }
  2175. return localeLanguage;
  2176. }
  2177. function parseApp(vm) {
  2178. return parseBaseApp(vm, {
  2179. mocks: mocks,
  2180. initRefs: initRefs
  2181. });
  2182. }
  2183. function createApp(vm) {
  2184. App(parseApp(vm));
  2185. return vm;
  2186. }
  2187. var encodeReserveRE = /[!'()*]/g;
  2188. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2189. return '%' + c.charCodeAt(0).toString(16);
  2190. };
  2191. var commaRE = /%2C/g;
  2192. // fixed encodeURIComponent which is more conformant to RFC3986:
  2193. // - escapes [!'()*]
  2194. // - preserve commas
  2195. var encode = function encode(str) {
  2196. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2197. };
  2198. function stringifyQuery(obj) {
  2199. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2200. var res = obj ? Object.keys(obj).map(function (key) {
  2201. var val = obj[key];
  2202. if (val === undefined) {
  2203. return '';
  2204. }
  2205. if (val === null) {
  2206. return encodeStr(key);
  2207. }
  2208. if (Array.isArray(val)) {
  2209. var result = [];
  2210. val.forEach(function (val2) {
  2211. if (val2 === undefined) {
  2212. return;
  2213. }
  2214. if (val2 === null) {
  2215. result.push(encodeStr(key));
  2216. } else {
  2217. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2218. }
  2219. });
  2220. return result.join('&');
  2221. }
  2222. return encodeStr(key) + '=' + encodeStr(val);
  2223. }).filter(function (x) {
  2224. return x.length > 0;
  2225. }).join('&') : null;
  2226. return res ? "?".concat(res) : '';
  2227. }
  2228. function parseBaseComponent(vueComponentOptions) {
  2229. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2230. isPage = _ref5.isPage,
  2231. initRelation = _ref5.initRelation;
  2232. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2233. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2234. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2235. VueComponent = _initVueComponent2[0],
  2236. vueOptions = _initVueComponent2[1];
  2237. var options = _objectSpread({
  2238. multipleSlots: true,
  2239. // styleIsolation: 'apply-shared',
  2240. addGlobalClass: true
  2241. }, vueOptions.options || {});
  2242. {
  2243. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2244. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2245. Object.assign(options, vueOptions['mp-weixin'].options);
  2246. }
  2247. }
  2248. var componentOptions = {
  2249. options: options,
  2250. data: initData(vueOptions, _vue.default.prototype),
  2251. behaviors: initBehaviors(vueOptions, initBehavior),
  2252. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2253. lifetimes: {
  2254. attached: function attached() {
  2255. var properties = this.properties;
  2256. var options = {
  2257. mpType: isPage.call(this) ? 'page' : 'component',
  2258. mpInstance: this,
  2259. propsData: properties
  2260. };
  2261. initVueIds(properties.vueId, this);
  2262. // 处理父子关系
  2263. initRelation.call(this, {
  2264. vuePid: this._$vuePid,
  2265. vueOptions: options
  2266. });
  2267. // 初始化 vue 实例
  2268. this.$vm = new VueComponent(options);
  2269. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2270. initSlots(this.$vm, properties.vueSlots);
  2271. // 触发首次 setData
  2272. this.$vm.$mount();
  2273. },
  2274. ready: function ready() {
  2275. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2276. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2277. if (this.$vm) {
  2278. this.$vm._isMounted = true;
  2279. this.$vm.__call_hook('mounted');
  2280. this.$vm.__call_hook('onReady');
  2281. }
  2282. },
  2283. detached: function detached() {
  2284. this.$vm && this.$vm.$destroy();
  2285. }
  2286. },
  2287. pageLifetimes: {
  2288. show: function show(args) {
  2289. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2290. },
  2291. hide: function hide() {
  2292. this.$vm && this.$vm.__call_hook('onPageHide');
  2293. },
  2294. resize: function resize(size) {
  2295. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2296. }
  2297. },
  2298. methods: {
  2299. __l: handleLink,
  2300. __e: handleEvent
  2301. }
  2302. };
  2303. // externalClasses
  2304. if (vueOptions.externalClasses) {
  2305. componentOptions.externalClasses = vueOptions.externalClasses;
  2306. }
  2307. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2308. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2309. componentOptions.methods[callMethod] = function (args) {
  2310. return this.$vm[callMethod](args);
  2311. };
  2312. });
  2313. }
  2314. if (needVueOptions) {
  2315. return [componentOptions, vueOptions, VueComponent];
  2316. }
  2317. if (isPage) {
  2318. return componentOptions;
  2319. }
  2320. return [componentOptions, VueComponent];
  2321. }
  2322. function parseComponent(vueComponentOptions, needVueOptions) {
  2323. return parseBaseComponent(vueComponentOptions, {
  2324. isPage: isPage,
  2325. initRelation: initRelation
  2326. }, needVueOptions);
  2327. }
  2328. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2329. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2330. function parseBasePage(vuePageOptions) {
  2331. var _parseComponent = parseComponent(vuePageOptions, true),
  2332. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2333. pageOptions = _parseComponent2[0],
  2334. vueOptions = _parseComponent2[1];
  2335. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2336. pageOptions.methods.onLoad = function (query) {
  2337. this.options = query;
  2338. var copyQuery = Object.assign({}, query);
  2339. delete copyQuery.__id__;
  2340. this.$page = {
  2341. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2342. };
  2343. this.$vm.$mp.query = query; // 兼容 mpvue
  2344. this.$vm.__call_hook('onLoad', query);
  2345. };
  2346. {
  2347. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2348. }
  2349. {
  2350. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2351. }
  2352. return pageOptions;
  2353. }
  2354. function parsePage(vuePageOptions) {
  2355. return parseBasePage(vuePageOptions);
  2356. }
  2357. function createPage(vuePageOptions) {
  2358. {
  2359. return Component(parsePage(vuePageOptions));
  2360. }
  2361. }
  2362. function createComponent(vueOptions) {
  2363. {
  2364. return Component(parseComponent(vueOptions));
  2365. }
  2366. }
  2367. function createSubpackageApp(vm) {
  2368. var appOptions = parseApp(vm);
  2369. var app = getApp({
  2370. allowDefault: true
  2371. });
  2372. vm.$scope = app;
  2373. var globalData = app.globalData;
  2374. if (globalData) {
  2375. Object.keys(appOptions.globalData).forEach(function (name) {
  2376. if (!hasOwn(globalData, name)) {
  2377. globalData[name] = appOptions.globalData[name];
  2378. }
  2379. });
  2380. }
  2381. Object.keys(appOptions).forEach(function (name) {
  2382. if (!hasOwn(app, name)) {
  2383. app[name] = appOptions[name];
  2384. }
  2385. });
  2386. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2387. wx.onAppShow(function () {
  2388. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2389. args[_key6] = arguments[_key6];
  2390. }
  2391. vm.__call_hook('onShow', args);
  2392. });
  2393. }
  2394. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2395. wx.onAppHide(function () {
  2396. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2397. args[_key7] = arguments[_key7];
  2398. }
  2399. vm.__call_hook('onHide', args);
  2400. });
  2401. }
  2402. if (isFn(appOptions.onLaunch)) {
  2403. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2404. vm.__call_hook('onLaunch', args);
  2405. }
  2406. return vm;
  2407. }
  2408. function createPlugin(vm) {
  2409. var appOptions = parseApp(vm);
  2410. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2411. wx.onAppShow(function () {
  2412. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2413. args[_key8] = arguments[_key8];
  2414. }
  2415. vm.__call_hook('onShow', args);
  2416. });
  2417. }
  2418. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2419. wx.onAppHide(function () {
  2420. for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
  2421. args[_key9] = arguments[_key9];
  2422. }
  2423. vm.__call_hook('onHide', args);
  2424. });
  2425. }
  2426. if (isFn(appOptions.onLaunch)) {
  2427. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2428. vm.__call_hook('onLaunch', args);
  2429. }
  2430. return vm;
  2431. }
  2432. todos.forEach(function (todoApi) {
  2433. protocols[todoApi] = false;
  2434. });
  2435. canIUses.forEach(function (canIUseApi) {
  2436. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2437. if (!wx.canIUse(apiName)) {
  2438. protocols[canIUseApi] = false;
  2439. }
  2440. });
  2441. var uni = {};
  2442. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2443. uni = new Proxy({}, {
  2444. get: function get(target, name) {
  2445. if (hasOwn(target, name)) {
  2446. return target[name];
  2447. }
  2448. if (baseApi[name]) {
  2449. return baseApi[name];
  2450. }
  2451. if (api[name]) {
  2452. return promisify(name, api[name]);
  2453. }
  2454. {
  2455. if (extraApi[name]) {
  2456. return promisify(name, extraApi[name]);
  2457. }
  2458. if (todoApis[name]) {
  2459. return promisify(name, todoApis[name]);
  2460. }
  2461. }
  2462. if (eventApi[name]) {
  2463. return eventApi[name];
  2464. }
  2465. return promisify(name, wrapper(name, wx[name]));
  2466. },
  2467. set: function set(target, name, value) {
  2468. target[name] = value;
  2469. return true;
  2470. }
  2471. });
  2472. } else {
  2473. Object.keys(baseApi).forEach(function (name) {
  2474. uni[name] = baseApi[name];
  2475. });
  2476. {
  2477. Object.keys(todoApis).forEach(function (name) {
  2478. uni[name] = promisify(name, todoApis[name]);
  2479. });
  2480. Object.keys(extraApi).forEach(function (name) {
  2481. uni[name] = promisify(name, extraApi[name]);
  2482. });
  2483. }
  2484. Object.keys(eventApi).forEach(function (name) {
  2485. uni[name] = eventApi[name];
  2486. });
  2487. Object.keys(api).forEach(function (name) {
  2488. uni[name] = promisify(name, api[name]);
  2489. });
  2490. Object.keys(wx).forEach(function (name) {
  2491. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2492. uni[name] = promisify(name, wrapper(name, wx[name]));
  2493. }
  2494. });
  2495. }
  2496. wx.createApp = createApp;
  2497. wx.createPage = createPage;
  2498. wx.createComponent = createComponent;
  2499. wx.createSubpackageApp = createSubpackageApp;
  2500. wx.createPlugin = createPlugin;
  2501. var uni$1 = uni;
  2502. var _default = uni$1;
  2503. exports.default = _default;
  2504. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  2505. /***/ }),
  2506. /* 3 */
  2507. /*!***********************************!*\
  2508. !*** (webpack)/buildin/global.js ***!
  2509. \***********************************/
  2510. /*! no static exports found */
  2511. /***/ (function(module, exports) {
  2512. var g;
  2513. // This works in non-strict mode
  2514. g = (function() {
  2515. return this;
  2516. })();
  2517. try {
  2518. // This works if eval is allowed (see CSP)
  2519. g = g || new Function("return this")();
  2520. } catch (e) {
  2521. // This works if the window reference is available
  2522. if (typeof window === "object") g = window;
  2523. }
  2524. // g can still be undefined, but nothing to do about it...
  2525. // We return undefined, instead of nothing here, so it's
  2526. // easier to handle this case. if(!global) { ...}
  2527. module.exports = g;
  2528. /***/ }),
  2529. /* 4 */
  2530. /*!**********************************************************************!*\
  2531. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  2532. \**********************************************************************/
  2533. /*! no static exports found */
  2534. /***/ (function(module, exports) {
  2535. function _interopRequireDefault(obj) {
  2536. return obj && obj.__esModule ? obj : {
  2537. "default": obj
  2538. };
  2539. }
  2540. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2541. /***/ }),
  2542. /* 5 */
  2543. /*!**************************************************************!*\
  2544. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  2545. \**************************************************************/
  2546. /*! no static exports found */
  2547. /***/ (function(module, exports, __webpack_require__) {
  2548. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  2549. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  2550. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2551. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  2552. function _slicedToArray(arr, i) {
  2553. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  2554. }
  2555. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2556. /***/ }),
  2557. /* 6 */
  2558. /*!***************************************************************!*\
  2559. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  2560. \***************************************************************/
  2561. /*! no static exports found */
  2562. /***/ (function(module, exports) {
  2563. function _arrayWithHoles(arr) {
  2564. if (Array.isArray(arr)) return arr;
  2565. }
  2566. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2567. /***/ }),
  2568. /* 7 */
  2569. /*!*********************************************************************!*\
  2570. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  2571. \*********************************************************************/
  2572. /*! no static exports found */
  2573. /***/ (function(module, exports) {
  2574. function _iterableToArrayLimit(r, l) {
  2575. var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
  2576. if (null != t) {
  2577. var e,
  2578. n,
  2579. i,
  2580. u,
  2581. a = [],
  2582. f = !0,
  2583. o = !1;
  2584. try {
  2585. if (i = (t = t.call(r)).next, 0 === l) {
  2586. if (Object(t) !== t) return;
  2587. f = !1;
  2588. } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0) {
  2589. ;
  2590. }
  2591. } catch (r) {
  2592. o = !0, n = r;
  2593. } finally {
  2594. try {
  2595. if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
  2596. } finally {
  2597. if (o) throw n;
  2598. }
  2599. }
  2600. return a;
  2601. }
  2602. }
  2603. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2604. /***/ }),
  2605. /* 8 */
  2606. /*!***************************************************************************!*\
  2607. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  2608. \***************************************************************************/
  2609. /*! no static exports found */
  2610. /***/ (function(module, exports, __webpack_require__) {
  2611. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2612. function _unsupportedIterableToArray(o, minLen) {
  2613. if (!o) return;
  2614. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  2615. var n = Object.prototype.toString.call(o).slice(8, -1);
  2616. if (n === "Object" && o.constructor) n = o.constructor.name;
  2617. if (n === "Map" || n === "Set") return Array.from(o);
  2618. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  2619. }
  2620. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2621. /***/ }),
  2622. /* 9 */
  2623. /*!*****************************************************************!*\
  2624. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  2625. \*****************************************************************/
  2626. /*! no static exports found */
  2627. /***/ (function(module, exports) {
  2628. function _arrayLikeToArray(arr, len) {
  2629. if (len == null || len > arr.length) len = arr.length;
  2630. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  2631. arr2[i] = arr[i];
  2632. }
  2633. return arr2;
  2634. }
  2635. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2636. /***/ }),
  2637. /* 10 */
  2638. /*!****************************************************************!*\
  2639. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  2640. \****************************************************************/
  2641. /*! no static exports found */
  2642. /***/ (function(module, exports) {
  2643. function _nonIterableRest() {
  2644. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2645. }
  2646. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2647. /***/ }),
  2648. /* 11 */
  2649. /*!***************************************************************!*\
  2650. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  2651. \***************************************************************/
  2652. /*! no static exports found */
  2653. /***/ (function(module, exports, __webpack_require__) {
  2654. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  2655. function _defineProperty(obj, key, value) {
  2656. key = toPropertyKey(key);
  2657. if (key in obj) {
  2658. Object.defineProperty(obj, key, {
  2659. value: value,
  2660. enumerable: true,
  2661. configurable: true,
  2662. writable: true
  2663. });
  2664. } else {
  2665. obj[key] = value;
  2666. }
  2667. return obj;
  2668. }
  2669. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2670. /***/ }),
  2671. /* 12 */
  2672. /*!**************************************************************!*\
  2673. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  2674. \**************************************************************/
  2675. /*! no static exports found */
  2676. /***/ (function(module, exports, __webpack_require__) {
  2677. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2678. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  2679. function toPropertyKey(t) {
  2680. var i = toPrimitive(t, "string");
  2681. return "symbol" == _typeof(i) ? i : i + "";
  2682. }
  2683. module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2684. /***/ }),
  2685. /* 13 */
  2686. /*!*******************************************************!*\
  2687. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  2688. \*******************************************************/
  2689. /*! no static exports found */
  2690. /***/ (function(module, exports) {
  2691. function _typeof(o) {
  2692. "@babel/helpers - typeof";
  2693. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
  2694. return typeof o;
  2695. } : function (o) {
  2696. return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
  2697. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
  2698. }
  2699. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2700. /***/ }),
  2701. /* 14 */
  2702. /*!************************************************************!*\
  2703. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  2704. \************************************************************/
  2705. /*! no static exports found */
  2706. /***/ (function(module, exports, __webpack_require__) {
  2707. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2708. function toPrimitive(t, r) {
  2709. if ("object" != _typeof(t) || !t) return t;
  2710. var e = t[Symbol.toPrimitive];
  2711. if (void 0 !== e) {
  2712. var i = e.call(t, r || "default");
  2713. if ("object" != _typeof(i)) return i;
  2714. throw new TypeError("@@toPrimitive must return a primitive value.");
  2715. }
  2716. return ("string" === r ? String : Number)(t);
  2717. }
  2718. module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2719. /***/ }),
  2720. /* 15 */
  2721. /*!**********************************************************!*\
  2722. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  2723. \**********************************************************/
  2724. /*! no static exports found */
  2725. /***/ (function(module, exports, __webpack_require__) {
  2726. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  2727. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  2728. function _construct(t, e, r) {
  2729. if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
  2730. var o = [null];
  2731. o.push.apply(o, e);
  2732. var p = new (t.bind.apply(t, o))();
  2733. return r && setPrototypeOf(p, r.prototype), p;
  2734. }
  2735. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2736. /***/ }),
  2737. /* 16 */
  2738. /*!***************************************************************!*\
  2739. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  2740. \***************************************************************/
  2741. /*! no static exports found */
  2742. /***/ (function(module, exports) {
  2743. function _setPrototypeOf(o, p) {
  2744. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2745. o.__proto__ = p;
  2746. return o;
  2747. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2748. return _setPrototypeOf(o, p);
  2749. }
  2750. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2751. /***/ }),
  2752. /* 17 */
  2753. /*!*************************************************************************!*\
  2754. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  2755. \*************************************************************************/
  2756. /*! no static exports found */
  2757. /***/ (function(module, exports) {
  2758. function _isNativeReflectConstruct() {
  2759. try {
  2760. var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  2761. } catch (t) {}
  2762. return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
  2763. return !!t;
  2764. }, module.exports.__esModule = true, module.exports["default"] = module.exports)();
  2765. }
  2766. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2767. /***/ }),
  2768. /* 18 */
  2769. /*!******************************************************************!*\
  2770. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  2771. \******************************************************************/
  2772. /*! no static exports found */
  2773. /***/ (function(module, exports, __webpack_require__) {
  2774. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  2775. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  2776. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2777. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  2778. function _toConsumableArray(arr) {
  2779. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  2780. }
  2781. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2782. /***/ }),
  2783. /* 19 */
  2784. /*!******************************************************************!*\
  2785. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  2786. \******************************************************************/
  2787. /*! no static exports found */
  2788. /***/ (function(module, exports, __webpack_require__) {
  2789. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2790. function _arrayWithoutHoles(arr) {
  2791. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  2792. }
  2793. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2794. /***/ }),
  2795. /* 20 */
  2796. /*!****************************************************************!*\
  2797. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2798. \****************************************************************/
  2799. /*! no static exports found */
  2800. /***/ (function(module, exports) {
  2801. function _iterableToArray(iter) {
  2802. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2803. }
  2804. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2805. /***/ }),
  2806. /* 21 */
  2807. /*!******************************************************************!*\
  2808. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2809. \******************************************************************/
  2810. /*! no static exports found */
  2811. /***/ (function(module, exports) {
  2812. function _nonIterableSpread() {
  2813. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2814. }
  2815. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2816. /***/ }),
  2817. /* 22 */
  2818. /*!*************************************************************!*\
  2819. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2820. \*************************************************************/
  2821. /*! no static exports found */
  2822. /***/ (function(module, exports, __webpack_require__) {
  2823. "use strict";
  2824. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2825. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2826. Object.defineProperty(exports, "__esModule", {
  2827. value: true
  2828. });
  2829. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2830. exports.compileI18nJsonStr = compileI18nJsonStr;
  2831. exports.hasI18nJson = hasI18nJson;
  2832. exports.initVueI18n = initVueI18n;
  2833. exports.isI18nStr = isI18nStr;
  2834. exports.isString = void 0;
  2835. exports.normalizeLocale = normalizeLocale;
  2836. exports.parseI18nJson = parseI18nJson;
  2837. exports.resolveLocale = resolveLocale;
  2838. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2839. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2840. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2841. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2842. var isObject = function isObject(val) {
  2843. return val !== null && (0, _typeof2.default)(val) === 'object';
  2844. };
  2845. var defaultDelimiters = ['{', '}'];
  2846. var BaseFormatter = /*#__PURE__*/function () {
  2847. function BaseFormatter() {
  2848. (0, _classCallCheck2.default)(this, BaseFormatter);
  2849. this._caches = Object.create(null);
  2850. }
  2851. (0, _createClass2.default)(BaseFormatter, [{
  2852. key: "interpolate",
  2853. value: function interpolate(message, values) {
  2854. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2855. if (!values) {
  2856. return [message];
  2857. }
  2858. var tokens = this._caches[message];
  2859. if (!tokens) {
  2860. tokens = parse(message, delimiters);
  2861. this._caches[message] = tokens;
  2862. }
  2863. return compile(tokens, values);
  2864. }
  2865. }]);
  2866. return BaseFormatter;
  2867. }();
  2868. exports.Formatter = BaseFormatter;
  2869. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2870. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2871. function parse(format, _ref) {
  2872. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2873. startDelimiter = _ref2[0],
  2874. endDelimiter = _ref2[1];
  2875. var tokens = [];
  2876. var position = 0;
  2877. var text = '';
  2878. while (position < format.length) {
  2879. var char = format[position++];
  2880. if (char === startDelimiter) {
  2881. if (text) {
  2882. tokens.push({
  2883. type: 'text',
  2884. value: text
  2885. });
  2886. }
  2887. text = '';
  2888. var sub = '';
  2889. char = format[position++];
  2890. while (char !== undefined && char !== endDelimiter) {
  2891. sub += char;
  2892. char = format[position++];
  2893. }
  2894. var isClosed = char === endDelimiter;
  2895. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2896. tokens.push({
  2897. value: sub,
  2898. type: type
  2899. });
  2900. }
  2901. // else if (char === '%') {
  2902. // // when found rails i18n syntax, skip text capture
  2903. // if (format[position] !== '{') {
  2904. // text += char
  2905. // }
  2906. // }
  2907. else {
  2908. text += char;
  2909. }
  2910. }
  2911. text && tokens.push({
  2912. type: 'text',
  2913. value: text
  2914. });
  2915. return tokens;
  2916. }
  2917. function compile(tokens, values) {
  2918. var compiled = [];
  2919. var index = 0;
  2920. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2921. if (mode === 'unknown') {
  2922. return compiled;
  2923. }
  2924. while (index < tokens.length) {
  2925. var token = tokens[index];
  2926. switch (token.type) {
  2927. case 'text':
  2928. compiled.push(token.value);
  2929. break;
  2930. case 'list':
  2931. compiled.push(values[parseInt(token.value, 10)]);
  2932. break;
  2933. case 'named':
  2934. if (mode === 'named') {
  2935. compiled.push(values[token.value]);
  2936. } else {
  2937. if (true) {
  2938. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2939. }
  2940. }
  2941. break;
  2942. case 'unknown':
  2943. if (true) {
  2944. console.warn("Detect 'unknown' type of token!");
  2945. }
  2946. break;
  2947. }
  2948. index++;
  2949. }
  2950. return compiled;
  2951. }
  2952. var LOCALE_ZH_HANS = 'zh-Hans';
  2953. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2954. var LOCALE_ZH_HANT = 'zh-Hant';
  2955. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2956. var LOCALE_EN = 'en';
  2957. exports.LOCALE_EN = LOCALE_EN;
  2958. var LOCALE_FR = 'fr';
  2959. exports.LOCALE_FR = LOCALE_FR;
  2960. var LOCALE_ES = 'es';
  2961. exports.LOCALE_ES = LOCALE_ES;
  2962. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2963. var hasOwn = function hasOwn(val, key) {
  2964. return hasOwnProperty.call(val, key);
  2965. };
  2966. var defaultFormatter = new BaseFormatter();
  2967. function include(str, parts) {
  2968. return !!parts.find(function (part) {
  2969. return str.indexOf(part) !== -1;
  2970. });
  2971. }
  2972. function startsWith(str, parts) {
  2973. return parts.find(function (part) {
  2974. return str.indexOf(part) === 0;
  2975. });
  2976. }
  2977. function normalizeLocale(locale, messages) {
  2978. if (!locale) {
  2979. return;
  2980. }
  2981. locale = locale.trim().replace(/_/g, '-');
  2982. if (messages && messages[locale]) {
  2983. return locale;
  2984. }
  2985. locale = locale.toLowerCase();
  2986. if (locale === 'chinese') {
  2987. // 支付宝
  2988. return LOCALE_ZH_HANS;
  2989. }
  2990. if (locale.indexOf('zh') === 0) {
  2991. if (locale.indexOf('-hans') > -1) {
  2992. return LOCALE_ZH_HANS;
  2993. }
  2994. if (locale.indexOf('-hant') > -1) {
  2995. return LOCALE_ZH_HANT;
  2996. }
  2997. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2998. return LOCALE_ZH_HANT;
  2999. }
  3000. return LOCALE_ZH_HANS;
  3001. }
  3002. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  3003. if (messages && Object.keys(messages).length > 0) {
  3004. locales = Object.keys(messages);
  3005. }
  3006. var lang = startsWith(locale, locales);
  3007. if (lang) {
  3008. return lang;
  3009. }
  3010. }
  3011. var I18n = /*#__PURE__*/function () {
  3012. function I18n(_ref3) {
  3013. var locale = _ref3.locale,
  3014. fallbackLocale = _ref3.fallbackLocale,
  3015. messages = _ref3.messages,
  3016. watcher = _ref3.watcher,
  3017. formater = _ref3.formater;
  3018. (0, _classCallCheck2.default)(this, I18n);
  3019. this.locale = LOCALE_EN;
  3020. this.fallbackLocale = LOCALE_EN;
  3021. this.message = {};
  3022. this.messages = {};
  3023. this.watchers = [];
  3024. if (fallbackLocale) {
  3025. this.fallbackLocale = fallbackLocale;
  3026. }
  3027. this.formater = formater || defaultFormatter;
  3028. this.messages = messages || {};
  3029. this.setLocale(locale || LOCALE_EN);
  3030. if (watcher) {
  3031. this.watchLocale(watcher);
  3032. }
  3033. }
  3034. (0, _createClass2.default)(I18n, [{
  3035. key: "setLocale",
  3036. value: function setLocale(locale) {
  3037. var _this = this;
  3038. var oldLocale = this.locale;
  3039. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  3040. if (!this.messages[this.locale]) {
  3041. // 可能初始化时不存在
  3042. this.messages[this.locale] = {};
  3043. }
  3044. this.message = this.messages[this.locale];
  3045. // 仅发生变化时,通知
  3046. if (oldLocale !== this.locale) {
  3047. this.watchers.forEach(function (watcher) {
  3048. watcher(_this.locale, oldLocale);
  3049. });
  3050. }
  3051. }
  3052. }, {
  3053. key: "getLocale",
  3054. value: function getLocale() {
  3055. return this.locale;
  3056. }
  3057. }, {
  3058. key: "watchLocale",
  3059. value: function watchLocale(fn) {
  3060. var _this2 = this;
  3061. var index = this.watchers.push(fn) - 1;
  3062. return function () {
  3063. _this2.watchers.splice(index, 1);
  3064. };
  3065. }
  3066. }, {
  3067. key: "add",
  3068. value: function add(locale, message) {
  3069. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3070. var curMessages = this.messages[locale];
  3071. if (curMessages) {
  3072. if (override) {
  3073. Object.assign(curMessages, message);
  3074. } else {
  3075. Object.keys(message).forEach(function (key) {
  3076. if (!hasOwn(curMessages, key)) {
  3077. curMessages[key] = message[key];
  3078. }
  3079. });
  3080. }
  3081. } else {
  3082. this.messages[locale] = message;
  3083. }
  3084. }
  3085. }, {
  3086. key: "f",
  3087. value: function f(message, values, delimiters) {
  3088. return this.formater.interpolate(message, values, delimiters).join('');
  3089. }
  3090. }, {
  3091. key: "t",
  3092. value: function t(key, locale, values) {
  3093. var message = this.message;
  3094. if (typeof locale === 'string') {
  3095. locale = normalizeLocale(locale, this.messages);
  3096. locale && (message = this.messages[locale]);
  3097. } else {
  3098. values = locale;
  3099. }
  3100. if (!hasOwn(message, key)) {
  3101. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  3102. return key;
  3103. }
  3104. return this.formater.interpolate(message[key], values).join('');
  3105. }
  3106. }]);
  3107. return I18n;
  3108. }();
  3109. exports.I18n = I18n;
  3110. function watchAppLocale(appVm, i18n) {
  3111. // 需要保证 watch 的触发在组件渲染之前
  3112. if (appVm.$watchLocale) {
  3113. // vue2
  3114. appVm.$watchLocale(function (newLocale) {
  3115. i18n.setLocale(newLocale);
  3116. });
  3117. } else {
  3118. appVm.$watch(function () {
  3119. return appVm.$locale;
  3120. }, function (newLocale) {
  3121. i18n.setLocale(newLocale);
  3122. });
  3123. }
  3124. }
  3125. function getDefaultLocale() {
  3126. if (typeof uni !== 'undefined' && uni.getLocale) {
  3127. return uni.getLocale();
  3128. }
  3129. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  3130. if (typeof global !== 'undefined' && global.getLocale) {
  3131. return global.getLocale();
  3132. }
  3133. return LOCALE_EN;
  3134. }
  3135. function initVueI18n(locale) {
  3136. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3137. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  3138. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  3139. // 兼容旧版本入参
  3140. if (typeof locale !== 'string') {
  3141. var _ref4 = [messages, locale];
  3142. locale = _ref4[0];
  3143. messages = _ref4[1];
  3144. }
  3145. if (typeof locale !== 'string') {
  3146. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  3147. locale = getDefaultLocale();
  3148. }
  3149. if (typeof fallbackLocale !== 'string') {
  3150. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  3151. }
  3152. var i18n = new I18n({
  3153. locale: locale,
  3154. fallbackLocale: fallbackLocale,
  3155. messages: messages,
  3156. watcher: watcher
  3157. });
  3158. var _t = function t(key, values) {
  3159. if (typeof getApp !== 'function') {
  3160. // app view
  3161. /* eslint-disable no-func-assign */
  3162. _t = function t(key, values) {
  3163. return i18n.t(key, values);
  3164. };
  3165. } else {
  3166. var isWatchedAppLocale = false;
  3167. _t = function t(key, values) {
  3168. var appVm = getApp().$vm;
  3169. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  3170. // options: {
  3171. // type: Array,
  3172. // default () {
  3173. // return [{
  3174. // icon: 'shop',
  3175. // text: t("uni-goods-nav.options.shop"),
  3176. // }, {
  3177. // icon: 'cart',
  3178. // text: t("uni-goods-nav.options.cart")
  3179. // }]
  3180. // }
  3181. // },
  3182. if (appVm) {
  3183. // 触发响应式
  3184. appVm.$locale;
  3185. if (!isWatchedAppLocale) {
  3186. isWatchedAppLocale = true;
  3187. watchAppLocale(appVm, i18n);
  3188. }
  3189. }
  3190. return i18n.t(key, values);
  3191. };
  3192. }
  3193. return _t(key, values);
  3194. };
  3195. return {
  3196. i18n: i18n,
  3197. f: function f(message, values, delimiters) {
  3198. return i18n.f(message, values, delimiters);
  3199. },
  3200. t: function t(key, values) {
  3201. return _t(key, values);
  3202. },
  3203. add: function add(locale, message) {
  3204. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3205. return i18n.add(locale, message, override);
  3206. },
  3207. watch: function watch(fn) {
  3208. return i18n.watchLocale(fn);
  3209. },
  3210. getLocale: function getLocale() {
  3211. return i18n.getLocale();
  3212. },
  3213. setLocale: function setLocale(newLocale) {
  3214. return i18n.setLocale(newLocale);
  3215. }
  3216. };
  3217. }
  3218. var isString = function isString(val) {
  3219. return typeof val === 'string';
  3220. };
  3221. exports.isString = isString;
  3222. var formater;
  3223. function hasI18nJson(jsonObj, delimiters) {
  3224. if (!formater) {
  3225. formater = new BaseFormatter();
  3226. }
  3227. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3228. var value = jsonObj[key];
  3229. if (isString(value)) {
  3230. if (isI18nStr(value, delimiters)) {
  3231. return true;
  3232. }
  3233. } else {
  3234. return hasI18nJson(value, delimiters);
  3235. }
  3236. });
  3237. }
  3238. function parseI18nJson(jsonObj, values, delimiters) {
  3239. if (!formater) {
  3240. formater = new BaseFormatter();
  3241. }
  3242. walkJsonObj(jsonObj, function (jsonObj, key) {
  3243. var value = jsonObj[key];
  3244. if (isString(value)) {
  3245. if (isI18nStr(value, delimiters)) {
  3246. jsonObj[key] = compileStr(value, values, delimiters);
  3247. }
  3248. } else {
  3249. parseI18nJson(value, values, delimiters);
  3250. }
  3251. });
  3252. return jsonObj;
  3253. }
  3254. function compileI18nJsonStr(jsonStr, _ref5) {
  3255. var locale = _ref5.locale,
  3256. locales = _ref5.locales,
  3257. delimiters = _ref5.delimiters;
  3258. if (!isI18nStr(jsonStr, delimiters)) {
  3259. return jsonStr;
  3260. }
  3261. if (!formater) {
  3262. formater = new BaseFormatter();
  3263. }
  3264. var localeValues = [];
  3265. Object.keys(locales).forEach(function (name) {
  3266. if (name !== locale) {
  3267. localeValues.push({
  3268. locale: name,
  3269. values: locales[name]
  3270. });
  3271. }
  3272. });
  3273. localeValues.unshift({
  3274. locale: locale,
  3275. values: locales[locale]
  3276. });
  3277. try {
  3278. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3279. } catch (e) {}
  3280. return jsonStr;
  3281. }
  3282. function isI18nStr(value, delimiters) {
  3283. return value.indexOf(delimiters[0]) > -1;
  3284. }
  3285. function compileStr(value, values, delimiters) {
  3286. return formater.interpolate(value, values, delimiters).join('');
  3287. }
  3288. function compileValue(jsonObj, key, localeValues, delimiters) {
  3289. var value = jsonObj[key];
  3290. if (isString(value)) {
  3291. // 存在国际化
  3292. if (isI18nStr(value, delimiters)) {
  3293. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3294. if (localeValues.length > 1) {
  3295. // 格式化国际化语言
  3296. var valueLocales = jsonObj[key + 'Locales'] = {};
  3297. localeValues.forEach(function (localValue) {
  3298. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3299. });
  3300. }
  3301. }
  3302. } else {
  3303. compileJsonObj(value, localeValues, delimiters);
  3304. }
  3305. }
  3306. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3307. walkJsonObj(jsonObj, function (jsonObj, key) {
  3308. compileValue(jsonObj, key, localeValues, delimiters);
  3309. });
  3310. return jsonObj;
  3311. }
  3312. function walkJsonObj(jsonObj, walk) {
  3313. if (Array.isArray(jsonObj)) {
  3314. for (var i = 0; i < jsonObj.length; i++) {
  3315. if (walk(jsonObj, i)) {
  3316. return true;
  3317. }
  3318. }
  3319. } else if (isObject(jsonObj)) {
  3320. for (var key in jsonObj) {
  3321. if (walk(jsonObj, key)) {
  3322. return true;
  3323. }
  3324. }
  3325. }
  3326. return false;
  3327. }
  3328. function resolveLocale(locales) {
  3329. return function (locale) {
  3330. if (!locale) {
  3331. return locale;
  3332. }
  3333. locale = normalizeLocale(locale) || locale;
  3334. return resolveLocaleChain(locale).find(function (locale) {
  3335. return locales.indexOf(locale) > -1;
  3336. });
  3337. };
  3338. }
  3339. function resolveLocaleChain(locale) {
  3340. var chain = [];
  3341. var tokens = locale.split('-');
  3342. while (tokens.length) {
  3343. chain.push(tokens.join('-'));
  3344. tokens.pop();
  3345. }
  3346. return chain;
  3347. }
  3348. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  3349. /***/ }),
  3350. /* 23 */
  3351. /*!***************************************************************!*\
  3352. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3353. \***************************************************************/
  3354. /*! no static exports found */
  3355. /***/ (function(module, exports) {
  3356. function _classCallCheck(instance, Constructor) {
  3357. if (!(instance instanceof Constructor)) {
  3358. throw new TypeError("Cannot call a class as a function");
  3359. }
  3360. }
  3361. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3362. /***/ }),
  3363. /* 24 */
  3364. /*!************************************************************!*\
  3365. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3366. \************************************************************/
  3367. /*! no static exports found */
  3368. /***/ (function(module, exports, __webpack_require__) {
  3369. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3370. function _defineProperties(target, props) {
  3371. for (var i = 0; i < props.length; i++) {
  3372. var descriptor = props[i];
  3373. descriptor.enumerable = descriptor.enumerable || false;
  3374. descriptor.configurable = true;
  3375. if ("value" in descriptor) descriptor.writable = true;
  3376. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3377. }
  3378. }
  3379. function _createClass(Constructor, protoProps, staticProps) {
  3380. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3381. if (staticProps) _defineProperties(Constructor, staticProps);
  3382. Object.defineProperty(Constructor, "prototype", {
  3383. writable: false
  3384. });
  3385. return Constructor;
  3386. }
  3387. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3388. /***/ }),
  3389. /* 25 */
  3390. /*!******************************************************************************************!*\
  3391. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3392. \******************************************************************************************/
  3393. /*! exports provided: default */
  3394. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3395. "use strict";
  3396. __webpack_require__.r(__webpack_exports__);
  3397. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3398. * Vue.js v2.6.11
  3399. * (c) 2014-2024 Evan You
  3400. * Released under the MIT License.
  3401. */
  3402. /* */
  3403. var emptyObject = Object.freeze({});
  3404. // These helpers produce better VM code in JS engines due to their
  3405. // explicitness and function inlining.
  3406. function isUndef (v) {
  3407. return v === undefined || v === null
  3408. }
  3409. function isDef (v) {
  3410. return v !== undefined && v !== null
  3411. }
  3412. function isTrue (v) {
  3413. return v === true
  3414. }
  3415. function isFalse (v) {
  3416. return v === false
  3417. }
  3418. /**
  3419. * Check if value is primitive.
  3420. */
  3421. function isPrimitive (value) {
  3422. return (
  3423. typeof value === 'string' ||
  3424. typeof value === 'number' ||
  3425. // $flow-disable-line
  3426. typeof value === 'symbol' ||
  3427. typeof value === 'boolean'
  3428. )
  3429. }
  3430. /**
  3431. * Quick object check - this is primarily used to tell
  3432. * Objects from primitive values when we know the value
  3433. * is a JSON-compliant type.
  3434. */
  3435. function isObject (obj) {
  3436. return obj !== null && typeof obj === 'object'
  3437. }
  3438. /**
  3439. * Get the raw type string of a value, e.g., [object Object].
  3440. */
  3441. var _toString = Object.prototype.toString;
  3442. function toRawType (value) {
  3443. return _toString.call(value).slice(8, -1)
  3444. }
  3445. /**
  3446. * Strict object type check. Only returns true
  3447. * for plain JavaScript objects.
  3448. */
  3449. function isPlainObject (obj) {
  3450. return _toString.call(obj) === '[object Object]'
  3451. }
  3452. function isRegExp (v) {
  3453. return _toString.call(v) === '[object RegExp]'
  3454. }
  3455. /**
  3456. * Check if val is a valid array index.
  3457. */
  3458. function isValidArrayIndex (val) {
  3459. var n = parseFloat(String(val));
  3460. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3461. }
  3462. function isPromise (val) {
  3463. return (
  3464. isDef(val) &&
  3465. typeof val.then === 'function' &&
  3466. typeof val.catch === 'function'
  3467. )
  3468. }
  3469. /**
  3470. * Convert a value to a string that is actually rendered.
  3471. */
  3472. function toString (val) {
  3473. return val == null
  3474. ? ''
  3475. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3476. ? JSON.stringify(val, null, 2)
  3477. : String(val)
  3478. }
  3479. /**
  3480. * Convert an input value to a number for persistence.
  3481. * If the conversion fails, return original string.
  3482. */
  3483. function toNumber (val) {
  3484. var n = parseFloat(val);
  3485. return isNaN(n) ? val : n
  3486. }
  3487. /**
  3488. * Make a map and return a function for checking if a key
  3489. * is in that map.
  3490. */
  3491. function makeMap (
  3492. str,
  3493. expectsLowerCase
  3494. ) {
  3495. var map = Object.create(null);
  3496. var list = str.split(',');
  3497. for (var i = 0; i < list.length; i++) {
  3498. map[list[i]] = true;
  3499. }
  3500. return expectsLowerCase
  3501. ? function (val) { return map[val.toLowerCase()]; }
  3502. : function (val) { return map[val]; }
  3503. }
  3504. /**
  3505. * Check if a tag is a built-in tag.
  3506. */
  3507. var isBuiltInTag = makeMap('slot,component', true);
  3508. /**
  3509. * Check if an attribute is a reserved attribute.
  3510. */
  3511. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3512. /**
  3513. * Remove an item from an array.
  3514. */
  3515. function remove (arr, item) {
  3516. if (arr.length) {
  3517. var index = arr.indexOf(item);
  3518. if (index > -1) {
  3519. return arr.splice(index, 1)
  3520. }
  3521. }
  3522. }
  3523. /**
  3524. * Check whether an object has the property.
  3525. */
  3526. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3527. function hasOwn (obj, key) {
  3528. return hasOwnProperty.call(obj, key)
  3529. }
  3530. /**
  3531. * Create a cached version of a pure function.
  3532. */
  3533. function cached (fn) {
  3534. var cache = Object.create(null);
  3535. return (function cachedFn (str) {
  3536. var hit = cache[str];
  3537. return hit || (cache[str] = fn(str))
  3538. })
  3539. }
  3540. /**
  3541. * Camelize a hyphen-delimited string.
  3542. */
  3543. var camelizeRE = /-(\w)/g;
  3544. var camelize = cached(function (str) {
  3545. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3546. });
  3547. /**
  3548. * Capitalize a string.
  3549. */
  3550. var capitalize = cached(function (str) {
  3551. return str.charAt(0).toUpperCase() + str.slice(1)
  3552. });
  3553. /**
  3554. * Hyphenate a camelCase string.
  3555. */
  3556. var hyphenateRE = /\B([A-Z])/g;
  3557. var hyphenate = cached(function (str) {
  3558. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3559. });
  3560. /**
  3561. * Simple bind polyfill for environments that do not support it,
  3562. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3563. * since native bind is now performant enough in most browsers.
  3564. * But removing it would mean breaking code that was able to run in
  3565. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3566. */
  3567. /* istanbul ignore next */
  3568. function polyfillBind (fn, ctx) {
  3569. function boundFn (a) {
  3570. var l = arguments.length;
  3571. return l
  3572. ? l > 1
  3573. ? fn.apply(ctx, arguments)
  3574. : fn.call(ctx, a)
  3575. : fn.call(ctx)
  3576. }
  3577. boundFn._length = fn.length;
  3578. return boundFn
  3579. }
  3580. function nativeBind (fn, ctx) {
  3581. return fn.bind(ctx)
  3582. }
  3583. var bind = Function.prototype.bind
  3584. ? nativeBind
  3585. : polyfillBind;
  3586. /**
  3587. * Convert an Array-like object to a real Array.
  3588. */
  3589. function toArray (list, start) {
  3590. start = start || 0;
  3591. var i = list.length - start;
  3592. var ret = new Array(i);
  3593. while (i--) {
  3594. ret[i] = list[i + start];
  3595. }
  3596. return ret
  3597. }
  3598. /**
  3599. * Mix properties into target object.
  3600. */
  3601. function extend (to, _from) {
  3602. for (var key in _from) {
  3603. to[key] = _from[key];
  3604. }
  3605. return to
  3606. }
  3607. /**
  3608. * Merge an Array of Objects into a single Object.
  3609. */
  3610. function toObject (arr) {
  3611. var res = {};
  3612. for (var i = 0; i < arr.length; i++) {
  3613. if (arr[i]) {
  3614. extend(res, arr[i]);
  3615. }
  3616. }
  3617. return res
  3618. }
  3619. /* eslint-disable no-unused-vars */
  3620. /**
  3621. * Perform no operation.
  3622. * Stubbing args to make Flow happy without leaving useless transpiled code
  3623. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3624. */
  3625. function noop (a, b, c) {}
  3626. /**
  3627. * Always return false.
  3628. */
  3629. var no = function (a, b, c) { return false; };
  3630. /* eslint-enable no-unused-vars */
  3631. /**
  3632. * Return the same value.
  3633. */
  3634. var identity = function (_) { return _; };
  3635. /**
  3636. * Check if two values are loosely equal - that is,
  3637. * if they are plain objects, do they have the same shape?
  3638. */
  3639. function looseEqual (a, b) {
  3640. if (a === b) { return true }
  3641. var isObjectA = isObject(a);
  3642. var isObjectB = isObject(b);
  3643. if (isObjectA && isObjectB) {
  3644. try {
  3645. var isArrayA = Array.isArray(a);
  3646. var isArrayB = Array.isArray(b);
  3647. if (isArrayA && isArrayB) {
  3648. return a.length === b.length && a.every(function (e, i) {
  3649. return looseEqual(e, b[i])
  3650. })
  3651. } else if (a instanceof Date && b instanceof Date) {
  3652. return a.getTime() === b.getTime()
  3653. } else if (!isArrayA && !isArrayB) {
  3654. var keysA = Object.keys(a);
  3655. var keysB = Object.keys(b);
  3656. return keysA.length === keysB.length && keysA.every(function (key) {
  3657. return looseEqual(a[key], b[key])
  3658. })
  3659. } else {
  3660. /* istanbul ignore next */
  3661. return false
  3662. }
  3663. } catch (e) {
  3664. /* istanbul ignore next */
  3665. return false
  3666. }
  3667. } else if (!isObjectA && !isObjectB) {
  3668. return String(a) === String(b)
  3669. } else {
  3670. return false
  3671. }
  3672. }
  3673. /**
  3674. * Return the first index at which a loosely equal value can be
  3675. * found in the array (if value is a plain object, the array must
  3676. * contain an object of the same shape), or -1 if it is not present.
  3677. */
  3678. function looseIndexOf (arr, val) {
  3679. for (var i = 0; i < arr.length; i++) {
  3680. if (looseEqual(arr[i], val)) { return i }
  3681. }
  3682. return -1
  3683. }
  3684. /**
  3685. * Ensure a function is called only once.
  3686. */
  3687. function once (fn) {
  3688. var called = false;
  3689. return function () {
  3690. if (!called) {
  3691. called = true;
  3692. fn.apply(this, arguments);
  3693. }
  3694. }
  3695. }
  3696. var ASSET_TYPES = [
  3697. 'component',
  3698. 'directive',
  3699. 'filter'
  3700. ];
  3701. var LIFECYCLE_HOOKS = [
  3702. 'beforeCreate',
  3703. 'created',
  3704. 'beforeMount',
  3705. 'mounted',
  3706. 'beforeUpdate',
  3707. 'updated',
  3708. 'beforeDestroy',
  3709. 'destroyed',
  3710. 'activated',
  3711. 'deactivated',
  3712. 'errorCaptured',
  3713. 'serverPrefetch'
  3714. ];
  3715. /* */
  3716. var config = ({
  3717. /**
  3718. * Option merge strategies (used in core/util/options)
  3719. */
  3720. // $flow-disable-line
  3721. optionMergeStrategies: Object.create(null),
  3722. /**
  3723. * Whether to suppress warnings.
  3724. */
  3725. silent: false,
  3726. /**
  3727. * Show production mode tip message on boot?
  3728. */
  3729. productionTip: "development" !== 'production',
  3730. /**
  3731. * Whether to enable devtools
  3732. */
  3733. devtools: "development" !== 'production',
  3734. /**
  3735. * Whether to record perf
  3736. */
  3737. performance: false,
  3738. /**
  3739. * Error handler for watcher errors
  3740. */
  3741. errorHandler: null,
  3742. /**
  3743. * Warn handler for watcher warns
  3744. */
  3745. warnHandler: null,
  3746. /**
  3747. * Ignore certain custom elements
  3748. */
  3749. ignoredElements: [],
  3750. /**
  3751. * Custom user key aliases for v-on
  3752. */
  3753. // $flow-disable-line
  3754. keyCodes: Object.create(null),
  3755. /**
  3756. * Check if a tag is reserved so that it cannot be registered as a
  3757. * component. This is platform-dependent and may be overwritten.
  3758. */
  3759. isReservedTag: no,
  3760. /**
  3761. * Check if an attribute is reserved so that it cannot be used as a component
  3762. * prop. This is platform-dependent and may be overwritten.
  3763. */
  3764. isReservedAttr: no,
  3765. /**
  3766. * Check if a tag is an unknown element.
  3767. * Platform-dependent.
  3768. */
  3769. isUnknownElement: no,
  3770. /**
  3771. * Get the namespace of an element
  3772. */
  3773. getTagNamespace: noop,
  3774. /**
  3775. * Parse the real tag name for the specific platform.
  3776. */
  3777. parsePlatformTagName: identity,
  3778. /**
  3779. * Check if an attribute must be bound using property, e.g. value
  3780. * Platform-dependent.
  3781. */
  3782. mustUseProp: no,
  3783. /**
  3784. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3785. * This will significantly reduce performance if set to false.
  3786. */
  3787. async: true,
  3788. /**
  3789. * Exposed for legacy reasons
  3790. */
  3791. _lifecycleHooks: LIFECYCLE_HOOKS
  3792. });
  3793. /* */
  3794. /**
  3795. * unicode letters used for parsing html tags, component names and property paths.
  3796. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3797. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3798. */
  3799. var unicodeRegExp = /a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;
  3800. /**
  3801. * Check if a string starts with $ or _
  3802. */
  3803. function isReserved (str) {
  3804. var c = (str + '').charCodeAt(0);
  3805. return c === 0x24 || c === 0x5F
  3806. }
  3807. /**
  3808. * Define a property.
  3809. */
  3810. function def (obj, key, val, enumerable) {
  3811. Object.defineProperty(obj, key, {
  3812. value: val,
  3813. enumerable: !!enumerable,
  3814. writable: true,
  3815. configurable: true
  3816. });
  3817. }
  3818. /**
  3819. * Parse simple path.
  3820. */
  3821. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3822. function parsePath (path) {
  3823. if (bailRE.test(path)) {
  3824. return
  3825. }
  3826. var segments = path.split('.');
  3827. return function (obj) {
  3828. for (var i = 0; i < segments.length; i++) {
  3829. if (!obj) { return }
  3830. obj = obj[segments[i]];
  3831. }
  3832. return obj
  3833. }
  3834. }
  3835. /* */
  3836. // can we use __proto__?
  3837. var hasProto = '__proto__' in {};
  3838. // Browser environment sniffing
  3839. var inBrowser = typeof window !== 'undefined';
  3840. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3841. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3842. var UA = inBrowser && window.navigator && window.navigator.userAgent.toLowerCase();
  3843. var isIE = UA && /msie|trident/.test(UA);
  3844. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3845. var isEdge = UA && UA.indexOf('edge/') > 0;
  3846. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3847. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3848. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3849. var isPhantomJS = UA && /phantomjs/.test(UA);
  3850. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3851. // Firefox has a "watch" function on Object.prototype...
  3852. var nativeWatch = ({}).watch;
  3853. if (inBrowser) {
  3854. try {
  3855. var opts = {};
  3856. Object.defineProperty(opts, 'passive', ({
  3857. get: function get () {
  3858. }
  3859. })); // https://github.com/facebook/flow/issues/285
  3860. window.addEventListener('test-passive', null, opts);
  3861. } catch (e) {}
  3862. }
  3863. // this needs to be lazy-evaled because vue may be required before
  3864. // vue-server-renderer can set VUE_ENV
  3865. var _isServer;
  3866. var isServerRendering = function () {
  3867. if (_isServer === undefined) {
  3868. /* istanbul ignore if */
  3869. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3870. // detect presence of vue-server-renderer and avoid
  3871. // Webpack shimming the process
  3872. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3873. } else {
  3874. _isServer = false;
  3875. }
  3876. }
  3877. return _isServer
  3878. };
  3879. // detect devtools
  3880. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3881. /* istanbul ignore next */
  3882. function isNative (Ctor) {
  3883. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3884. }
  3885. var hasSymbol =
  3886. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3887. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3888. var _Set;
  3889. /* istanbul ignore if */ // $flow-disable-line
  3890. if (typeof Set !== 'undefined' && isNative(Set)) {
  3891. // use native Set when available.
  3892. _Set = Set;
  3893. } else {
  3894. // a non-standard Set polyfill that only works with primitive keys.
  3895. _Set = /*@__PURE__*/(function () {
  3896. function Set () {
  3897. this.set = Object.create(null);
  3898. }
  3899. Set.prototype.has = function has (key) {
  3900. return this.set[key] === true
  3901. };
  3902. Set.prototype.add = function add (key) {
  3903. this.set[key] = true;
  3904. };
  3905. Set.prototype.clear = function clear () {
  3906. this.set = Object.create(null);
  3907. };
  3908. return Set;
  3909. }());
  3910. }
  3911. /* */
  3912. var warn = noop;
  3913. var tip = noop;
  3914. var generateComponentTrace = (noop); // work around flow check
  3915. var formatComponentName = (noop);
  3916. if (true) {
  3917. var hasConsole = typeof console !== 'undefined';
  3918. var classifyRE = /(?:^|[-_])(\w)/g;
  3919. var classify = function (str) { return str
  3920. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3921. .replace(/[-_]/g, ''); };
  3922. warn = function (msg, vm) {
  3923. var trace = vm ? generateComponentTrace(vm) : '';
  3924. if (config.warnHandler) {
  3925. config.warnHandler.call(null, msg, vm, trace);
  3926. } else if (hasConsole && (!config.silent)) {
  3927. console.error(("[Vue warn]: " + msg + trace));
  3928. }
  3929. };
  3930. tip = function (msg, vm) {
  3931. if (hasConsole && (!config.silent)) {
  3932. console.warn("[Vue tip]: " + msg + (
  3933. vm ? generateComponentTrace(vm) : ''
  3934. ));
  3935. }
  3936. };
  3937. formatComponentName = function (vm, includeFile) {
  3938. if (vm.$root === vm) {
  3939. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3940. return ('') + vm.$options.__file
  3941. }
  3942. return '<Root>'
  3943. }
  3944. var options = typeof vm === 'function' && vm.cid != null
  3945. ? vm.options
  3946. : vm._isVue
  3947. ? vm.$options || vm.constructor.options
  3948. : vm;
  3949. var name = options.name || options._componentTag;
  3950. var file = options.__file;
  3951. if (!name && file) {
  3952. var match = file.match(/([^/\\]+)\.vue$/);
  3953. name = match && match[1];
  3954. }
  3955. return (
  3956. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3957. (file && includeFile !== false ? (" at " + file) : '')
  3958. )
  3959. };
  3960. var repeat = function (str, n) {
  3961. var res = '';
  3962. while (n) {
  3963. if (n % 2 === 1) { res += str; }
  3964. if (n > 1) { str += str; }
  3965. n >>= 1;
  3966. }
  3967. return res
  3968. };
  3969. generateComponentTrace = function (vm) {
  3970. if (vm._isVue && vm.$parent) {
  3971. var tree = [];
  3972. var currentRecursiveSequence = 0;
  3973. while (vm && vm.$options.name !== 'PageBody') {
  3974. if (tree.length > 0) {
  3975. var last = tree[tree.length - 1];
  3976. if (last.constructor === vm.constructor) {
  3977. currentRecursiveSequence++;
  3978. vm = vm.$parent;
  3979. continue
  3980. } else if (currentRecursiveSequence > 0) {
  3981. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3982. currentRecursiveSequence = 0;
  3983. }
  3984. }
  3985. !vm.$options.isReserved && tree.push(vm);
  3986. vm = vm.$parent;
  3987. }
  3988. return '\n\nfound in\n\n' + tree
  3989. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3990. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3991. : formatComponentName(vm))); })
  3992. .join('\n')
  3993. } else {
  3994. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3995. }
  3996. };
  3997. }
  3998. /* */
  3999. var uid = 0;
  4000. /**
  4001. * A dep is an observable that can have multiple
  4002. * directives subscribing to it.
  4003. */
  4004. var Dep = function Dep () {
  4005. this.id = uid++;
  4006. this.subs = [];
  4007. };
  4008. Dep.prototype.addSub = function addSub (sub) {
  4009. this.subs.push(sub);
  4010. };
  4011. Dep.prototype.removeSub = function removeSub (sub) {
  4012. remove(this.subs, sub);
  4013. };
  4014. Dep.prototype.depend = function depend () {
  4015. if (Dep.SharedObject.target) {
  4016. Dep.SharedObject.target.addDep(this);
  4017. }
  4018. };
  4019. Dep.prototype.notify = function notify () {
  4020. // stabilize the subscriber list first
  4021. var subs = this.subs.slice();
  4022. if ( true && !config.async) {
  4023. // subs aren't sorted in scheduler if not running async
  4024. // we need to sort them now to make sure they fire in correct
  4025. // order
  4026. subs.sort(function (a, b) { return a.id - b.id; });
  4027. }
  4028. for (var i = 0, l = subs.length; i < l; i++) {
  4029. subs[i].update();
  4030. }
  4031. };
  4032. // The current target watcher being evaluated.
  4033. // This is globally unique because only one watcher
  4034. // can be evaluated at a time.
  4035. // fixed by xxxxxx (nvue shared vuex)
  4036. /* eslint-disable no-undef */
  4037. Dep.SharedObject = {};
  4038. Dep.SharedObject.target = null;
  4039. Dep.SharedObject.targetStack = [];
  4040. function pushTarget (target) {
  4041. Dep.SharedObject.targetStack.push(target);
  4042. Dep.SharedObject.target = target;
  4043. Dep.target = target;
  4044. }
  4045. function popTarget () {
  4046. Dep.SharedObject.targetStack.pop();
  4047. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  4048. Dep.target = Dep.SharedObject.target;
  4049. }
  4050. /* */
  4051. var VNode = function VNode (
  4052. tag,
  4053. data,
  4054. children,
  4055. text,
  4056. elm,
  4057. context,
  4058. componentOptions,
  4059. asyncFactory
  4060. ) {
  4061. this.tag = tag;
  4062. this.data = data;
  4063. this.children = children;
  4064. this.text = text;
  4065. this.elm = elm;
  4066. this.ns = undefined;
  4067. this.context = context;
  4068. this.fnContext = undefined;
  4069. this.fnOptions = undefined;
  4070. this.fnScopeId = undefined;
  4071. this.key = data && data.key;
  4072. this.componentOptions = componentOptions;
  4073. this.componentInstance = undefined;
  4074. this.parent = undefined;
  4075. this.raw = false;
  4076. this.isStatic = false;
  4077. this.isRootInsert = true;
  4078. this.isComment = false;
  4079. this.isCloned = false;
  4080. this.isOnce = false;
  4081. this.asyncFactory = asyncFactory;
  4082. this.asyncMeta = undefined;
  4083. this.isAsyncPlaceholder = false;
  4084. };
  4085. var prototypeAccessors = { child: { configurable: true } };
  4086. // DEPRECATED: alias for componentInstance for backwards compat.
  4087. /* istanbul ignore next */
  4088. prototypeAccessors.child.get = function () {
  4089. return this.componentInstance
  4090. };
  4091. Object.defineProperties( VNode.prototype, prototypeAccessors );
  4092. var createEmptyVNode = function (text) {
  4093. if ( text === void 0 ) text = '';
  4094. var node = new VNode();
  4095. node.text = text;
  4096. node.isComment = true;
  4097. return node
  4098. };
  4099. function createTextVNode (val) {
  4100. return new VNode(undefined, undefined, undefined, String(val))
  4101. }
  4102. // optimized shallow clone
  4103. // used for static nodes and slot nodes because they may be reused across
  4104. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4105. // on their elm reference.
  4106. function cloneVNode (vnode) {
  4107. var cloned = new VNode(
  4108. vnode.tag,
  4109. vnode.data,
  4110. // #7975
  4111. // clone children array to avoid mutating original in case of cloning
  4112. // a child.
  4113. vnode.children && vnode.children.slice(),
  4114. vnode.text,
  4115. vnode.elm,
  4116. vnode.context,
  4117. vnode.componentOptions,
  4118. vnode.asyncFactory
  4119. );
  4120. cloned.ns = vnode.ns;
  4121. cloned.isStatic = vnode.isStatic;
  4122. cloned.key = vnode.key;
  4123. cloned.isComment = vnode.isComment;
  4124. cloned.fnContext = vnode.fnContext;
  4125. cloned.fnOptions = vnode.fnOptions;
  4126. cloned.fnScopeId = vnode.fnScopeId;
  4127. cloned.asyncMeta = vnode.asyncMeta;
  4128. cloned.isCloned = true;
  4129. return cloned
  4130. }
  4131. /*
  4132. * not type checking this file because flow doesn't play well with
  4133. * dynamically accessing methods on Array prototype
  4134. */
  4135. var arrayProto = Array.prototype;
  4136. var arrayMethods = Object.create(arrayProto);
  4137. var methodsToPatch = [
  4138. 'push',
  4139. 'pop',
  4140. 'shift',
  4141. 'unshift',
  4142. 'splice',
  4143. 'sort',
  4144. 'reverse'
  4145. ];
  4146. /**
  4147. * Intercept mutating methods and emit events
  4148. */
  4149. methodsToPatch.forEach(function (method) {
  4150. // cache original method
  4151. var original = arrayProto[method];
  4152. def(arrayMethods, method, function mutator () {
  4153. var args = [], len = arguments.length;
  4154. while ( len-- ) args[ len ] = arguments[ len ];
  4155. var result = original.apply(this, args);
  4156. var ob = this.__ob__;
  4157. var inserted;
  4158. switch (method) {
  4159. case 'push':
  4160. case 'unshift':
  4161. inserted = args;
  4162. break
  4163. case 'splice':
  4164. inserted = args.slice(2);
  4165. break
  4166. }
  4167. if (inserted) { ob.observeArray(inserted); }
  4168. // notify change
  4169. ob.dep.notify();
  4170. return result
  4171. });
  4172. });
  4173. /* */
  4174. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4175. /**
  4176. * In some cases we may want to disable observation inside a component's
  4177. * update computation.
  4178. */
  4179. var shouldObserve = true;
  4180. function toggleObserving (value) {
  4181. shouldObserve = value;
  4182. }
  4183. /**
  4184. * Observer class that is attached to each observed
  4185. * object. Once attached, the observer converts the target
  4186. * object's property keys into getter/setters that
  4187. * collect dependencies and dispatch updates.
  4188. */
  4189. var Observer = function Observer (value) {
  4190. this.value = value;
  4191. this.dep = new Dep();
  4192. this.vmCount = 0;
  4193. def(value, '__ob__', this);
  4194. if (Array.isArray(value)) {
  4195. if (hasProto) {
  4196. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4197. if(value.push !== value.__proto__.push){
  4198. copyAugment(value, arrayMethods, arrayKeys);
  4199. } else {
  4200. protoAugment(value, arrayMethods);
  4201. }
  4202. }
  4203. } else {
  4204. copyAugment(value, arrayMethods, arrayKeys);
  4205. }
  4206. this.observeArray(value);
  4207. } else {
  4208. this.walk(value);
  4209. }
  4210. };
  4211. /**
  4212. * Walk through all properties and convert them into
  4213. * getter/setters. This method should only be called when
  4214. * value type is Object.
  4215. */
  4216. Observer.prototype.walk = function walk (obj) {
  4217. var keys = Object.keys(obj);
  4218. for (var i = 0; i < keys.length; i++) {
  4219. defineReactive$$1(obj, keys[i]);
  4220. }
  4221. };
  4222. /**
  4223. * Observe a list of Array items.
  4224. */
  4225. Observer.prototype.observeArray = function observeArray (items) {
  4226. for (var i = 0, l = items.length; i < l; i++) {
  4227. observe(items[i]);
  4228. }
  4229. };
  4230. // helpers
  4231. /**
  4232. * Augment a target Object or Array by intercepting
  4233. * the prototype chain using __proto__
  4234. */
  4235. function protoAugment (target, src) {
  4236. /* eslint-disable no-proto */
  4237. target.__proto__ = src;
  4238. /* eslint-enable no-proto */
  4239. }
  4240. /**
  4241. * Augment a target Object or Array by defining
  4242. * hidden properties.
  4243. */
  4244. /* istanbul ignore next */
  4245. function copyAugment (target, src, keys) {
  4246. for (var i = 0, l = keys.length; i < l; i++) {
  4247. var key = keys[i];
  4248. def(target, key, src[key]);
  4249. }
  4250. }
  4251. /**
  4252. * Attempt to create an observer instance for a value,
  4253. * returns the new observer if successfully observed,
  4254. * or the existing observer if the value already has one.
  4255. */
  4256. function observe (value, asRootData) {
  4257. if (!isObject(value) || value instanceof VNode) {
  4258. return
  4259. }
  4260. var ob;
  4261. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4262. ob = value.__ob__;
  4263. } else if (
  4264. shouldObserve &&
  4265. !isServerRendering() &&
  4266. (Array.isArray(value) || isPlainObject(value)) &&
  4267. Object.isExtensible(value) &&
  4268. !value._isVue &&
  4269. !value.__v_isMPComponent
  4270. ) {
  4271. ob = new Observer(value);
  4272. }
  4273. if (asRootData && ob) {
  4274. ob.vmCount++;
  4275. }
  4276. return ob
  4277. }
  4278. /**
  4279. * Define a reactive property on an Object.
  4280. */
  4281. function defineReactive$$1 (
  4282. obj,
  4283. key,
  4284. val,
  4285. customSetter,
  4286. shallow
  4287. ) {
  4288. var dep = new Dep();
  4289. var property = Object.getOwnPropertyDescriptor(obj, key);
  4290. if (property && property.configurable === false) {
  4291. return
  4292. }
  4293. // cater for pre-defined getter/setters
  4294. var getter = property && property.get;
  4295. var setter = property && property.set;
  4296. if ((!getter || setter) && arguments.length === 2) {
  4297. val = obj[key];
  4298. }
  4299. var childOb = !shallow && observe(val);
  4300. Object.defineProperty(obj, key, {
  4301. enumerable: true,
  4302. configurable: true,
  4303. get: function reactiveGetter () {
  4304. var value = getter ? getter.call(obj) : val;
  4305. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4306. dep.depend();
  4307. if (childOb) {
  4308. childOb.dep.depend();
  4309. if (Array.isArray(value)) {
  4310. dependArray(value);
  4311. }
  4312. }
  4313. }
  4314. return value
  4315. },
  4316. set: function reactiveSetter (newVal) {
  4317. var value = getter ? getter.call(obj) : val;
  4318. /* eslint-disable no-self-compare */
  4319. if (newVal === value || (newVal !== newVal && value !== value)) {
  4320. return
  4321. }
  4322. /* eslint-enable no-self-compare */
  4323. if ( true && customSetter) {
  4324. customSetter();
  4325. }
  4326. // #7981: for accessor properties without setter
  4327. if (getter && !setter) { return }
  4328. if (setter) {
  4329. setter.call(obj, newVal);
  4330. } else {
  4331. val = newVal;
  4332. }
  4333. childOb = !shallow && observe(newVal);
  4334. dep.notify();
  4335. }
  4336. });
  4337. }
  4338. /**
  4339. * Set a property on an object. Adds the new property and
  4340. * triggers change notification if the property doesn't
  4341. * already exist.
  4342. */
  4343. function set (target, key, val) {
  4344. if ( true &&
  4345. (isUndef(target) || isPrimitive(target))
  4346. ) {
  4347. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4348. }
  4349. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4350. target.length = Math.max(target.length, key);
  4351. target.splice(key, 1, val);
  4352. return val
  4353. }
  4354. if (key in target && !(key in Object.prototype)) {
  4355. target[key] = val;
  4356. return val
  4357. }
  4358. var ob = (target).__ob__;
  4359. if (target._isVue || (ob && ob.vmCount)) {
  4360. true && warn(
  4361. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4362. 'at runtime - declare it upfront in the data option.'
  4363. );
  4364. return val
  4365. }
  4366. if (!ob) {
  4367. target[key] = val;
  4368. return val
  4369. }
  4370. defineReactive$$1(ob.value, key, val);
  4371. ob.dep.notify();
  4372. return val
  4373. }
  4374. /**
  4375. * Delete a property and trigger change if necessary.
  4376. */
  4377. function del (target, key) {
  4378. if ( true &&
  4379. (isUndef(target) || isPrimitive(target))
  4380. ) {
  4381. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4382. }
  4383. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4384. target.splice(key, 1);
  4385. return
  4386. }
  4387. var ob = (target).__ob__;
  4388. if (target._isVue || (ob && ob.vmCount)) {
  4389. true && warn(
  4390. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4391. '- just set it to null.'
  4392. );
  4393. return
  4394. }
  4395. if (!hasOwn(target, key)) {
  4396. return
  4397. }
  4398. delete target[key];
  4399. if (!ob) {
  4400. return
  4401. }
  4402. ob.dep.notify();
  4403. }
  4404. /**
  4405. * Collect dependencies on array elements when the array is touched, since
  4406. * we cannot intercept array element access like property getters.
  4407. */
  4408. function dependArray (value) {
  4409. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4410. e = value[i];
  4411. e && e.__ob__ && e.__ob__.dep.depend();
  4412. if (Array.isArray(e)) {
  4413. dependArray(e);
  4414. }
  4415. }
  4416. }
  4417. /* */
  4418. /**
  4419. * Option overwriting strategies are functions that handle
  4420. * how to merge a parent option value and a child option
  4421. * value into the final value.
  4422. */
  4423. var strats = config.optionMergeStrategies;
  4424. /**
  4425. * Options with restrictions
  4426. */
  4427. if (true) {
  4428. strats.el = strats.propsData = function (parent, child, vm, key) {
  4429. if (!vm) {
  4430. warn(
  4431. "option \"" + key + "\" can only be used during instance " +
  4432. 'creation with the `new` keyword.'
  4433. );
  4434. }
  4435. return defaultStrat(parent, child)
  4436. };
  4437. }
  4438. /**
  4439. * Helper that recursively merges two data objects together.
  4440. */
  4441. function mergeData (to, from) {
  4442. if (!from) { return to }
  4443. var key, toVal, fromVal;
  4444. var keys = hasSymbol
  4445. ? Reflect.ownKeys(from)
  4446. : Object.keys(from);
  4447. for (var i = 0; i < keys.length; i++) {
  4448. key = keys[i];
  4449. // in case the object is already observed...
  4450. if (key === '__ob__') { continue }
  4451. toVal = to[key];
  4452. fromVal = from[key];
  4453. if (!hasOwn(to, key)) {
  4454. set(to, key, fromVal);
  4455. } else if (
  4456. toVal !== fromVal &&
  4457. isPlainObject(toVal) &&
  4458. isPlainObject(fromVal)
  4459. ) {
  4460. mergeData(toVal, fromVal);
  4461. }
  4462. }
  4463. return to
  4464. }
  4465. /**
  4466. * Data
  4467. */
  4468. function mergeDataOrFn (
  4469. parentVal,
  4470. childVal,
  4471. vm
  4472. ) {
  4473. if (!vm) {
  4474. // in a Vue.extend merge, both should be functions
  4475. if (!childVal) {
  4476. return parentVal
  4477. }
  4478. if (!parentVal) {
  4479. return childVal
  4480. }
  4481. // when parentVal & childVal are both present,
  4482. // we need to return a function that returns the
  4483. // merged result of both functions... no need to
  4484. // check if parentVal is a function here because
  4485. // it has to be a function to pass previous merges.
  4486. return function mergedDataFn () {
  4487. return mergeData(
  4488. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4489. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4490. )
  4491. }
  4492. } else {
  4493. return function mergedInstanceDataFn () {
  4494. // instance merge
  4495. var instanceData = typeof childVal === 'function'
  4496. ? childVal.call(vm, vm)
  4497. : childVal;
  4498. var defaultData = typeof parentVal === 'function'
  4499. ? parentVal.call(vm, vm)
  4500. : parentVal;
  4501. if (instanceData) {
  4502. return mergeData(instanceData, defaultData)
  4503. } else {
  4504. return defaultData
  4505. }
  4506. }
  4507. }
  4508. }
  4509. strats.data = function (
  4510. parentVal,
  4511. childVal,
  4512. vm
  4513. ) {
  4514. if (!vm) {
  4515. if (childVal && typeof childVal !== 'function') {
  4516. true && warn(
  4517. 'The "data" option should be a function ' +
  4518. 'that returns a per-instance value in component ' +
  4519. 'definitions.',
  4520. vm
  4521. );
  4522. return parentVal
  4523. }
  4524. return mergeDataOrFn(parentVal, childVal)
  4525. }
  4526. return mergeDataOrFn(parentVal, childVal, vm)
  4527. };
  4528. /**
  4529. * Hooks and props are merged as arrays.
  4530. */
  4531. function mergeHook (
  4532. parentVal,
  4533. childVal
  4534. ) {
  4535. var res = childVal
  4536. ? parentVal
  4537. ? parentVal.concat(childVal)
  4538. : Array.isArray(childVal)
  4539. ? childVal
  4540. : [childVal]
  4541. : parentVal;
  4542. return res
  4543. ? dedupeHooks(res)
  4544. : res
  4545. }
  4546. function dedupeHooks (hooks) {
  4547. var res = [];
  4548. for (var i = 0; i < hooks.length; i++) {
  4549. if (res.indexOf(hooks[i]) === -1) {
  4550. res.push(hooks[i]);
  4551. }
  4552. }
  4553. return res
  4554. }
  4555. LIFECYCLE_HOOKS.forEach(function (hook) {
  4556. strats[hook] = mergeHook;
  4557. });
  4558. /**
  4559. * Assets
  4560. *
  4561. * When a vm is present (instance creation), we need to do
  4562. * a three-way merge between constructor options, instance
  4563. * options and parent options.
  4564. */
  4565. function mergeAssets (
  4566. parentVal,
  4567. childVal,
  4568. vm,
  4569. key
  4570. ) {
  4571. var res = Object.create(parentVal || null);
  4572. if (childVal) {
  4573. true && assertObjectType(key, childVal, vm);
  4574. return extend(res, childVal)
  4575. } else {
  4576. return res
  4577. }
  4578. }
  4579. ASSET_TYPES.forEach(function (type) {
  4580. strats[type + 's'] = mergeAssets;
  4581. });
  4582. /**
  4583. * Watchers.
  4584. *
  4585. * Watchers hashes should not overwrite one
  4586. * another, so we merge them as arrays.
  4587. */
  4588. strats.watch = function (
  4589. parentVal,
  4590. childVal,
  4591. vm,
  4592. key
  4593. ) {
  4594. // work around Firefox's Object.prototype.watch...
  4595. if (parentVal === nativeWatch) { parentVal = undefined; }
  4596. if (childVal === nativeWatch) { childVal = undefined; }
  4597. /* istanbul ignore if */
  4598. if (!childVal) { return Object.create(parentVal || null) }
  4599. if (true) {
  4600. assertObjectType(key, childVal, vm);
  4601. }
  4602. if (!parentVal) { return childVal }
  4603. var ret = {};
  4604. extend(ret, parentVal);
  4605. for (var key$1 in childVal) {
  4606. var parent = ret[key$1];
  4607. var child = childVal[key$1];
  4608. if (parent && !Array.isArray(parent)) {
  4609. parent = [parent];
  4610. }
  4611. ret[key$1] = parent
  4612. ? parent.concat(child)
  4613. : Array.isArray(child) ? child : [child];
  4614. }
  4615. return ret
  4616. };
  4617. /**
  4618. * Other object hashes.
  4619. */
  4620. strats.props =
  4621. strats.methods =
  4622. strats.inject =
  4623. strats.computed = function (
  4624. parentVal,
  4625. childVal,
  4626. vm,
  4627. key
  4628. ) {
  4629. if (childVal && "development" !== 'production') {
  4630. assertObjectType(key, childVal, vm);
  4631. }
  4632. if (!parentVal) { return childVal }
  4633. var ret = Object.create(null);
  4634. extend(ret, parentVal);
  4635. if (childVal) { extend(ret, childVal); }
  4636. return ret
  4637. };
  4638. strats.provide = mergeDataOrFn;
  4639. /**
  4640. * Default strategy.
  4641. */
  4642. var defaultStrat = function (parentVal, childVal) {
  4643. return childVal === undefined
  4644. ? parentVal
  4645. : childVal
  4646. };
  4647. /**
  4648. * Validate component names
  4649. */
  4650. function checkComponents (options) {
  4651. for (var key in options.components) {
  4652. validateComponentName(key);
  4653. }
  4654. }
  4655. function validateComponentName (name) {
  4656. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4657. warn(
  4658. 'Invalid component name: "' + name + '". Component names ' +
  4659. 'should conform to valid custom element name in html5 specification.'
  4660. );
  4661. }
  4662. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4663. warn(
  4664. 'Do not use built-in or reserved HTML elements as component ' +
  4665. 'id: ' + name
  4666. );
  4667. }
  4668. }
  4669. /**
  4670. * Ensure all props option syntax are normalized into the
  4671. * Object-based format.
  4672. */
  4673. function normalizeProps (options, vm) {
  4674. var props = options.props;
  4675. if (!props) { return }
  4676. var res = {};
  4677. var i, val, name;
  4678. if (Array.isArray(props)) {
  4679. i = props.length;
  4680. while (i--) {
  4681. val = props[i];
  4682. if (typeof val === 'string') {
  4683. name = camelize(val);
  4684. res[name] = { type: null };
  4685. } else if (true) {
  4686. warn('props must be strings when using array syntax.');
  4687. }
  4688. }
  4689. } else if (isPlainObject(props)) {
  4690. for (var key in props) {
  4691. val = props[key];
  4692. name = camelize(key);
  4693. res[name] = isPlainObject(val)
  4694. ? val
  4695. : { type: val };
  4696. }
  4697. } else if (true) {
  4698. warn(
  4699. "Invalid value for option \"props\": expected an Array or an Object, " +
  4700. "but got " + (toRawType(props)) + ".",
  4701. vm
  4702. );
  4703. }
  4704. options.props = res;
  4705. }
  4706. /**
  4707. * Normalize all injections into Object-based format
  4708. */
  4709. function normalizeInject (options, vm) {
  4710. var inject = options.inject;
  4711. if (!inject) { return }
  4712. var normalized = options.inject = {};
  4713. if (Array.isArray(inject)) {
  4714. for (var i = 0; i < inject.length; i++) {
  4715. normalized[inject[i]] = { from: inject[i] };
  4716. }
  4717. } else if (isPlainObject(inject)) {
  4718. for (var key in inject) {
  4719. var val = inject[key];
  4720. normalized[key] = isPlainObject(val)
  4721. ? extend({ from: key }, val)
  4722. : { from: val };
  4723. }
  4724. } else if (true) {
  4725. warn(
  4726. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4727. "but got " + (toRawType(inject)) + ".",
  4728. vm
  4729. );
  4730. }
  4731. }
  4732. /**
  4733. * Normalize raw function directives into object format.
  4734. */
  4735. function normalizeDirectives (options) {
  4736. var dirs = options.directives;
  4737. if (dirs) {
  4738. for (var key in dirs) {
  4739. var def$$1 = dirs[key];
  4740. if (typeof def$$1 === 'function') {
  4741. dirs[key] = { bind: def$$1, update: def$$1 };
  4742. }
  4743. }
  4744. }
  4745. }
  4746. function assertObjectType (name, value, vm) {
  4747. if (!isPlainObject(value)) {
  4748. warn(
  4749. "Invalid value for option \"" + name + "\": expected an Object, " +
  4750. "but got " + (toRawType(value)) + ".",
  4751. vm
  4752. );
  4753. }
  4754. }
  4755. /**
  4756. * Merge two option objects into a new one.
  4757. * Core utility used in both instantiation and inheritance.
  4758. */
  4759. function mergeOptions (
  4760. parent,
  4761. child,
  4762. vm
  4763. ) {
  4764. if (true) {
  4765. checkComponents(child);
  4766. }
  4767. if (typeof child === 'function') {
  4768. child = child.options;
  4769. }
  4770. normalizeProps(child, vm);
  4771. normalizeInject(child, vm);
  4772. normalizeDirectives(child);
  4773. // Apply extends and mixins on the child options,
  4774. // but only if it is a raw options object that isn't
  4775. // the result of another mergeOptions call.
  4776. // Only merged options has the _base property.
  4777. if (!child._base) {
  4778. if (child.extends) {
  4779. parent = mergeOptions(parent, child.extends, vm);
  4780. }
  4781. if (child.mixins) {
  4782. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4783. parent = mergeOptions(parent, child.mixins[i], vm);
  4784. }
  4785. }
  4786. }
  4787. var options = {};
  4788. var key;
  4789. for (key in parent) {
  4790. mergeField(key);
  4791. }
  4792. for (key in child) {
  4793. if (!hasOwn(parent, key)) {
  4794. mergeField(key);
  4795. }
  4796. }
  4797. function mergeField (key) {
  4798. var strat = strats[key] || defaultStrat;
  4799. options[key] = strat(parent[key], child[key], vm, key);
  4800. }
  4801. return options
  4802. }
  4803. /**
  4804. * Resolve an asset.
  4805. * This function is used because child instances need access
  4806. * to assets defined in its ancestor chain.
  4807. */
  4808. function resolveAsset (
  4809. options,
  4810. type,
  4811. id,
  4812. warnMissing
  4813. ) {
  4814. /* istanbul ignore if */
  4815. if (typeof id !== 'string') {
  4816. return
  4817. }
  4818. var assets = options[type];
  4819. // check local registration variations first
  4820. if (hasOwn(assets, id)) { return assets[id] }
  4821. var camelizedId = camelize(id);
  4822. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4823. var PascalCaseId = capitalize(camelizedId);
  4824. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4825. // fallback to prototype chain
  4826. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4827. if ( true && warnMissing && !res) {
  4828. warn(
  4829. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4830. options
  4831. );
  4832. }
  4833. return res
  4834. }
  4835. /* */
  4836. function validateProp (
  4837. key,
  4838. propOptions,
  4839. propsData,
  4840. vm
  4841. ) {
  4842. var prop = propOptions[key];
  4843. var absent = !hasOwn(propsData, key);
  4844. var value = propsData[key];
  4845. // boolean casting
  4846. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4847. if (booleanIndex > -1) {
  4848. if (absent && !hasOwn(prop, 'default')) {
  4849. value = false;
  4850. } else if (value === '' || value === hyphenate(key)) {
  4851. // only cast empty string / same name to boolean if
  4852. // boolean has higher priority
  4853. var stringIndex = getTypeIndex(String, prop.type);
  4854. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4855. value = true;
  4856. }
  4857. }
  4858. }
  4859. // check default value
  4860. if (value === undefined) {
  4861. value = getPropDefaultValue(vm, prop, key);
  4862. // since the default value is a fresh copy,
  4863. // make sure to observe it.
  4864. var prevShouldObserve = shouldObserve;
  4865. toggleObserving(true);
  4866. observe(value);
  4867. toggleObserving(prevShouldObserve);
  4868. }
  4869. if (
  4870. true
  4871. ) {
  4872. assertProp(prop, key, value, vm, absent);
  4873. }
  4874. return value
  4875. }
  4876. /**
  4877. * Get the default value of a prop.
  4878. */
  4879. function getPropDefaultValue (vm, prop, key) {
  4880. // no default, return undefined
  4881. if (!hasOwn(prop, 'default')) {
  4882. return undefined
  4883. }
  4884. var def = prop.default;
  4885. // warn against non-factory defaults for Object & Array
  4886. if ( true && isObject(def)) {
  4887. warn(
  4888. 'Invalid default value for prop "' + key + '": ' +
  4889. 'Props with type Object/Array must use a factory function ' +
  4890. 'to return the default value.',
  4891. vm
  4892. );
  4893. }
  4894. // the raw prop value was also undefined from previous render,
  4895. // return previous default value to avoid unnecessary watcher trigger
  4896. if (vm && vm.$options.propsData &&
  4897. vm.$options.propsData[key] === undefined &&
  4898. vm._props[key] !== undefined
  4899. ) {
  4900. return vm._props[key]
  4901. }
  4902. // call factory function for non-Function types
  4903. // a value is Function if its prototype is function even across different execution context
  4904. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4905. ? def.call(vm)
  4906. : def
  4907. }
  4908. /**
  4909. * Assert whether a prop is valid.
  4910. */
  4911. function assertProp (
  4912. prop,
  4913. name,
  4914. value,
  4915. vm,
  4916. absent
  4917. ) {
  4918. if (prop.required && absent) {
  4919. warn(
  4920. 'Missing required prop: "' + name + '"',
  4921. vm
  4922. );
  4923. return
  4924. }
  4925. if (value == null && !prop.required) {
  4926. return
  4927. }
  4928. var type = prop.type;
  4929. var valid = !type || type === true;
  4930. var expectedTypes = [];
  4931. if (type) {
  4932. if (!Array.isArray(type)) {
  4933. type = [type];
  4934. }
  4935. for (var i = 0; i < type.length && !valid; i++) {
  4936. var assertedType = assertType(value, type[i]);
  4937. expectedTypes.push(assertedType.expectedType || '');
  4938. valid = assertedType.valid;
  4939. }
  4940. }
  4941. if (!valid) {
  4942. warn(
  4943. getInvalidTypeMessage(name, value, expectedTypes),
  4944. vm
  4945. );
  4946. return
  4947. }
  4948. var validator = prop.validator;
  4949. if (validator) {
  4950. if (!validator(value)) {
  4951. warn(
  4952. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4953. vm
  4954. );
  4955. }
  4956. }
  4957. }
  4958. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4959. function assertType (value, type) {
  4960. var valid;
  4961. var expectedType = getType(type);
  4962. if (simpleCheckRE.test(expectedType)) {
  4963. var t = typeof value;
  4964. valid = t === expectedType.toLowerCase();
  4965. // for primitive wrapper objects
  4966. if (!valid && t === 'object') {
  4967. valid = value instanceof type;
  4968. }
  4969. } else if (expectedType === 'Object') {
  4970. valid = isPlainObject(value);
  4971. } else if (expectedType === 'Array') {
  4972. valid = Array.isArray(value);
  4973. } else {
  4974. valid = value instanceof type;
  4975. }
  4976. return {
  4977. valid: valid,
  4978. expectedType: expectedType
  4979. }
  4980. }
  4981. /**
  4982. * Use function string name to check built-in types,
  4983. * because a simple equality check will fail when running
  4984. * across different vms / iframes.
  4985. */
  4986. function getType (fn) {
  4987. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4988. return match ? match[1] : ''
  4989. }
  4990. function isSameType (a, b) {
  4991. return getType(a) === getType(b)
  4992. }
  4993. function getTypeIndex (type, expectedTypes) {
  4994. if (!Array.isArray(expectedTypes)) {
  4995. return isSameType(expectedTypes, type) ? 0 : -1
  4996. }
  4997. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4998. if (isSameType(expectedTypes[i], type)) {
  4999. return i
  5000. }
  5001. }
  5002. return -1
  5003. }
  5004. function getInvalidTypeMessage (name, value, expectedTypes) {
  5005. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  5006. " Expected " + (expectedTypes.map(capitalize).join(', '));
  5007. var expectedType = expectedTypes[0];
  5008. var receivedType = toRawType(value);
  5009. var expectedValue = styleValue(value, expectedType);
  5010. var receivedValue = styleValue(value, receivedType);
  5011. // check if we need to specify expected value
  5012. if (expectedTypes.length === 1 &&
  5013. isExplicable(expectedType) &&
  5014. !isBoolean(expectedType, receivedType)) {
  5015. message += " with value " + expectedValue;
  5016. }
  5017. message += ", got " + receivedType + " ";
  5018. // check if we need to specify received value
  5019. if (isExplicable(receivedType)) {
  5020. message += "with value " + receivedValue + ".";
  5021. }
  5022. return message
  5023. }
  5024. function styleValue (value, type) {
  5025. if (type === 'String') {
  5026. return ("\"" + value + "\"")
  5027. } else if (type === 'Number') {
  5028. return ("" + (Number(value)))
  5029. } else {
  5030. return ("" + value)
  5031. }
  5032. }
  5033. function isExplicable (value) {
  5034. var explicitTypes = ['string', 'number', 'boolean'];
  5035. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  5036. }
  5037. function isBoolean () {
  5038. var args = [], len = arguments.length;
  5039. while ( len-- ) args[ len ] = arguments[ len ];
  5040. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  5041. }
  5042. /* */
  5043. function handleError (err, vm, info) {
  5044. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  5045. // See: https://github.com/vuejs/vuex/issues/1505
  5046. pushTarget();
  5047. try {
  5048. if (vm) {
  5049. var cur = vm;
  5050. while ((cur = cur.$parent)) {
  5051. var hooks = cur.$options.errorCaptured;
  5052. if (hooks) {
  5053. for (var i = 0; i < hooks.length; i++) {
  5054. try {
  5055. var capture = hooks[i].call(cur, err, vm, info) === false;
  5056. if (capture) { return }
  5057. } catch (e) {
  5058. globalHandleError(e, cur, 'errorCaptured hook');
  5059. }
  5060. }
  5061. }
  5062. }
  5063. }
  5064. globalHandleError(err, vm, info);
  5065. } finally {
  5066. popTarget();
  5067. }
  5068. }
  5069. function invokeWithErrorHandling (
  5070. handler,
  5071. context,
  5072. args,
  5073. vm,
  5074. info
  5075. ) {
  5076. var res;
  5077. try {
  5078. res = args ? handler.apply(context, args) : handler.call(context);
  5079. if (res && !res._isVue && isPromise(res) && !res._handled) {
  5080. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  5081. // issue #9511
  5082. // avoid catch triggering multiple times when nested calls
  5083. res._handled = true;
  5084. }
  5085. } catch (e) {
  5086. handleError(e, vm, info);
  5087. }
  5088. return res
  5089. }
  5090. function globalHandleError (err, vm, info) {
  5091. if (config.errorHandler) {
  5092. try {
  5093. return config.errorHandler.call(null, err, vm, info)
  5094. } catch (e) {
  5095. // if the user intentionally throws the original error in the handler,
  5096. // do not log it twice
  5097. if (e !== err) {
  5098. logError(e, null, 'config.errorHandler');
  5099. }
  5100. }
  5101. }
  5102. logError(err, vm, info);
  5103. }
  5104. function logError (err, vm, info) {
  5105. if (true) {
  5106. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5107. }
  5108. /* istanbul ignore else */
  5109. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5110. console.error(err);
  5111. } else {
  5112. throw err
  5113. }
  5114. }
  5115. /* */
  5116. var callbacks = [];
  5117. var pending = false;
  5118. function flushCallbacks () {
  5119. pending = false;
  5120. var copies = callbacks.slice(0);
  5121. callbacks.length = 0;
  5122. for (var i = 0; i < copies.length; i++) {
  5123. copies[i]();
  5124. }
  5125. }
  5126. // Here we have async deferring wrappers using microtasks.
  5127. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5128. // However, it has subtle problems when state is changed right before repaint
  5129. // (e.g. #6813, out-in transitions).
  5130. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5131. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5132. // So we now use microtasks everywhere, again.
  5133. // A major drawback of this tradeoff is that there are some scenarios
  5134. // where microtasks have too high a priority and fire in between supposedly
  5135. // sequential events (e.g. #4521, #6690, which have workarounds)
  5136. // or even between bubbling of the same event (#6566).
  5137. var timerFunc;
  5138. // The nextTick behavior leverages the microtask queue, which can be accessed
  5139. // via either native Promise.then or MutationObserver.
  5140. // MutationObserver has wider support, however it is seriously bugged in
  5141. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5142. // completely stops working after triggering a few times... so, if native
  5143. // Promise is available, we will use it:
  5144. /* istanbul ignore next, $flow-disable-line */
  5145. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5146. var p = Promise.resolve();
  5147. timerFunc = function () {
  5148. p.then(flushCallbacks);
  5149. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5150. // it can get stuck in a weird state where callbacks are pushed into the
  5151. // microtask queue but the queue isn't being flushed, until the browser
  5152. // needs to do some other work, e.g. handle a timer. Therefore we can
  5153. // "force" the microtask queue to be flushed by adding an empty timer.
  5154. if (isIOS) { setTimeout(noop); }
  5155. };
  5156. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5157. isNative(MutationObserver) ||
  5158. // PhantomJS and iOS 7.x
  5159. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5160. )) {
  5161. // Use MutationObserver where native Promise is not available,
  5162. // e.g. PhantomJS, iOS7, Android 4.4
  5163. // (#6466 MutationObserver is unreliable in IE11)
  5164. var counter = 1;
  5165. var observer = new MutationObserver(flushCallbacks);
  5166. var textNode = document.createTextNode(String(counter));
  5167. observer.observe(textNode, {
  5168. characterData: true
  5169. });
  5170. timerFunc = function () {
  5171. counter = (counter + 1) % 2;
  5172. textNode.data = String(counter);
  5173. };
  5174. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5175. // Fallback to setImmediate.
  5176. // Technically it leverages the (macro) task queue,
  5177. // but it is still a better choice than setTimeout.
  5178. timerFunc = function () {
  5179. setImmediate(flushCallbacks);
  5180. };
  5181. } else {
  5182. // Fallback to setTimeout.
  5183. timerFunc = function () {
  5184. setTimeout(flushCallbacks, 0);
  5185. };
  5186. }
  5187. function nextTick (cb, ctx) {
  5188. var _resolve;
  5189. callbacks.push(function () {
  5190. if (cb) {
  5191. try {
  5192. cb.call(ctx);
  5193. } catch (e) {
  5194. handleError(e, ctx, 'nextTick');
  5195. }
  5196. } else if (_resolve) {
  5197. _resolve(ctx);
  5198. }
  5199. });
  5200. if (!pending) {
  5201. pending = true;
  5202. timerFunc();
  5203. }
  5204. // $flow-disable-line
  5205. if (!cb && typeof Promise !== 'undefined') {
  5206. return new Promise(function (resolve) {
  5207. _resolve = resolve;
  5208. })
  5209. }
  5210. }
  5211. /* */
  5212. /* not type checking this file because flow doesn't play well with Proxy */
  5213. var initProxy;
  5214. if (true) {
  5215. var allowedGlobals = makeMap(
  5216. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5217. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5218. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5219. 'require' // for Webpack/Browserify
  5220. );
  5221. var warnNonPresent = function (target, key) {
  5222. warn(
  5223. "Property or method \"" + key + "\" is not defined on the instance but " +
  5224. 'referenced during render. Make sure that this property is reactive, ' +
  5225. 'either in the data option, or for class-based components, by ' +
  5226. 'initializing the property. ' +
  5227. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5228. target
  5229. );
  5230. };
  5231. var warnReservedPrefix = function (target, key) {
  5232. warn(
  5233. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5234. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5235. 'prevent conflicts with Vue internals. ' +
  5236. 'See: https://vuejs.org/v2/api/#data',
  5237. target
  5238. );
  5239. };
  5240. var hasProxy =
  5241. typeof Proxy !== 'undefined' && isNative(Proxy);
  5242. if (hasProxy) {
  5243. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5244. config.keyCodes = new Proxy(config.keyCodes, {
  5245. set: function set (target, key, value) {
  5246. if (isBuiltInModifier(key)) {
  5247. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5248. return false
  5249. } else {
  5250. target[key] = value;
  5251. return true
  5252. }
  5253. }
  5254. });
  5255. }
  5256. var hasHandler = {
  5257. has: function has (target, key) {
  5258. var has = key in target;
  5259. var isAllowed = allowedGlobals(key) ||
  5260. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5261. if (!has && !isAllowed) {
  5262. if (key in target.$data) { warnReservedPrefix(target, key); }
  5263. else { warnNonPresent(target, key); }
  5264. }
  5265. return has || !isAllowed
  5266. }
  5267. };
  5268. var getHandler = {
  5269. get: function get (target, key) {
  5270. if (typeof key === 'string' && !(key in target)) {
  5271. if (key in target.$data) { warnReservedPrefix(target, key); }
  5272. else { warnNonPresent(target, key); }
  5273. }
  5274. return target[key]
  5275. }
  5276. };
  5277. initProxy = function initProxy (vm) {
  5278. if (hasProxy) {
  5279. // determine which proxy handler to use
  5280. var options = vm.$options;
  5281. var handlers = options.render && options.render._withStripped
  5282. ? getHandler
  5283. : hasHandler;
  5284. vm._renderProxy = new Proxy(vm, handlers);
  5285. } else {
  5286. vm._renderProxy = vm;
  5287. }
  5288. };
  5289. }
  5290. /* */
  5291. var seenObjects = new _Set();
  5292. /**
  5293. * Recursively traverse an object to evoke all converted
  5294. * getters, so that every nested property inside the object
  5295. * is collected as a "deep" dependency.
  5296. */
  5297. function traverse (val) {
  5298. _traverse(val, seenObjects);
  5299. seenObjects.clear();
  5300. }
  5301. function _traverse (val, seen) {
  5302. var i, keys;
  5303. var isA = Array.isArray(val);
  5304. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5305. return
  5306. }
  5307. if (val.__ob__) {
  5308. var depId = val.__ob__.dep.id;
  5309. if (seen.has(depId)) {
  5310. return
  5311. }
  5312. seen.add(depId);
  5313. }
  5314. if (isA) {
  5315. i = val.length;
  5316. while (i--) { _traverse(val[i], seen); }
  5317. } else {
  5318. keys = Object.keys(val);
  5319. i = keys.length;
  5320. while (i--) { _traverse(val[keys[i]], seen); }
  5321. }
  5322. }
  5323. var mark;
  5324. var measure;
  5325. if (true) {
  5326. var perf = inBrowser && window.performance;
  5327. /* istanbul ignore if */
  5328. if (
  5329. perf &&
  5330. perf.mark &&
  5331. perf.measure &&
  5332. perf.clearMarks &&
  5333. perf.clearMeasures
  5334. ) {
  5335. mark = function (tag) { return perf.mark(tag); };
  5336. measure = function (name, startTag, endTag) {
  5337. perf.measure(name, startTag, endTag);
  5338. perf.clearMarks(startTag);
  5339. perf.clearMarks(endTag);
  5340. // perf.clearMeasures(name)
  5341. };
  5342. }
  5343. }
  5344. /* */
  5345. var normalizeEvent = cached(function (name) {
  5346. var passive = name.charAt(0) === '&';
  5347. name = passive ? name.slice(1) : name;
  5348. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5349. name = once$$1 ? name.slice(1) : name;
  5350. var capture = name.charAt(0) === '!';
  5351. name = capture ? name.slice(1) : name;
  5352. return {
  5353. name: name,
  5354. once: once$$1,
  5355. capture: capture,
  5356. passive: passive
  5357. }
  5358. });
  5359. function createFnInvoker (fns, vm) {
  5360. function invoker () {
  5361. var arguments$1 = arguments;
  5362. var fns = invoker.fns;
  5363. if (Array.isArray(fns)) {
  5364. var cloned = fns.slice();
  5365. for (var i = 0; i < cloned.length; i++) {
  5366. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5367. }
  5368. } else {
  5369. // return handler return value for single handlers
  5370. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5371. }
  5372. }
  5373. invoker.fns = fns;
  5374. return invoker
  5375. }
  5376. function updateListeners (
  5377. on,
  5378. oldOn,
  5379. add,
  5380. remove$$1,
  5381. createOnceHandler,
  5382. vm
  5383. ) {
  5384. var name, def$$1, cur, old, event;
  5385. for (name in on) {
  5386. def$$1 = cur = on[name];
  5387. old = oldOn[name];
  5388. event = normalizeEvent(name);
  5389. if (isUndef(cur)) {
  5390. true && warn(
  5391. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5392. vm
  5393. );
  5394. } else if (isUndef(old)) {
  5395. if (isUndef(cur.fns)) {
  5396. cur = on[name] = createFnInvoker(cur, vm);
  5397. }
  5398. if (isTrue(event.once)) {
  5399. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5400. }
  5401. add(event.name, cur, event.capture, event.passive, event.params);
  5402. } else if (cur !== old) {
  5403. old.fns = cur;
  5404. on[name] = old;
  5405. }
  5406. }
  5407. for (name in oldOn) {
  5408. if (isUndef(on[name])) {
  5409. event = normalizeEvent(name);
  5410. remove$$1(event.name, oldOn[name], event.capture);
  5411. }
  5412. }
  5413. }
  5414. /* */
  5415. /* */
  5416. // fixed by xxxxxx (mp properties)
  5417. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5418. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5419. if (isUndef(propOptions)) {
  5420. return res
  5421. }
  5422. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5423. var attrs = data.attrs;
  5424. var props = data.props;
  5425. if (isDef(attrs) || isDef(props)) {
  5426. for (var key in propOptions) {
  5427. var altKey = hyphenate(key);
  5428. var result = checkProp(res, props, key, altKey, true) ||
  5429. checkProp(res, attrs, key, altKey, false);
  5430. // externalClass
  5431. if (
  5432. result &&
  5433. res[key] &&
  5434. externalClasses.indexOf(altKey) !== -1 &&
  5435. context[camelize(res[key])]
  5436. ) {
  5437. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5438. res[key] = context[camelize(res[key])];
  5439. }
  5440. }
  5441. }
  5442. return res
  5443. }
  5444. function extractPropsFromVNodeData (
  5445. data,
  5446. Ctor,
  5447. tag,
  5448. context// fixed by xxxxxx
  5449. ) {
  5450. // we are only extracting raw values here.
  5451. // validation and default values are handled in the child
  5452. // component itself.
  5453. var propOptions = Ctor.options.props;
  5454. if (isUndef(propOptions)) {
  5455. // fixed by xxxxxx
  5456. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5457. }
  5458. var res = {};
  5459. var attrs = data.attrs;
  5460. var props = data.props;
  5461. if (isDef(attrs) || isDef(props)) {
  5462. for (var key in propOptions) {
  5463. var altKey = hyphenate(key);
  5464. if (true) {
  5465. var keyInLowerCase = key.toLowerCase();
  5466. if (
  5467. key !== keyInLowerCase &&
  5468. attrs && hasOwn(attrs, keyInLowerCase)
  5469. ) {
  5470. tip(
  5471. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5472. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5473. " \"" + key + "\". " +
  5474. "Note that HTML attributes are case-insensitive and camelCased " +
  5475. "props need to use their kebab-case equivalents when using in-DOM " +
  5476. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5477. );
  5478. }
  5479. }
  5480. checkProp(res, props, key, altKey, true) ||
  5481. checkProp(res, attrs, key, altKey, false);
  5482. }
  5483. }
  5484. // fixed by xxxxxx
  5485. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5486. }
  5487. function checkProp (
  5488. res,
  5489. hash,
  5490. key,
  5491. altKey,
  5492. preserve
  5493. ) {
  5494. if (isDef(hash)) {
  5495. if (hasOwn(hash, key)) {
  5496. res[key] = hash[key];
  5497. if (!preserve) {
  5498. delete hash[key];
  5499. }
  5500. return true
  5501. } else if (hasOwn(hash, altKey)) {
  5502. res[key] = hash[altKey];
  5503. if (!preserve) {
  5504. delete hash[altKey];
  5505. }
  5506. return true
  5507. }
  5508. }
  5509. return false
  5510. }
  5511. /* */
  5512. // The template compiler attempts to minimize the need for normalization by
  5513. // statically analyzing the template at compile time.
  5514. //
  5515. // For plain HTML markup, normalization can be completely skipped because the
  5516. // generated render function is guaranteed to return Array<VNode>. There are
  5517. // two cases where extra normalization is needed:
  5518. // 1. When the children contains components - because a functional component
  5519. // may return an Array instead of a single root. In this case, just a simple
  5520. // normalization is needed - if any child is an Array, we flatten the whole
  5521. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5522. // because functional components already normalize their own children.
  5523. function simpleNormalizeChildren (children) {
  5524. for (var i = 0; i < children.length; i++) {
  5525. if (Array.isArray(children[i])) {
  5526. return Array.prototype.concat.apply([], children)
  5527. }
  5528. }
  5529. return children
  5530. }
  5531. // 2. When the children contains constructs that always generated nested Arrays,
  5532. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5533. // with hand-written render functions / JSX. In such cases a full normalization
  5534. // is needed to cater to all possible types of children values.
  5535. function normalizeChildren (children) {
  5536. return isPrimitive(children)
  5537. ? [createTextVNode(children)]
  5538. : Array.isArray(children)
  5539. ? normalizeArrayChildren(children)
  5540. : undefined
  5541. }
  5542. function isTextNode (node) {
  5543. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5544. }
  5545. function normalizeArrayChildren (children, nestedIndex) {
  5546. var res = [];
  5547. var i, c, lastIndex, last;
  5548. for (i = 0; i < children.length; i++) {
  5549. c = children[i];
  5550. if (isUndef(c) || typeof c === 'boolean') { continue }
  5551. lastIndex = res.length - 1;
  5552. last = res[lastIndex];
  5553. // nested
  5554. if (Array.isArray(c)) {
  5555. if (c.length > 0) {
  5556. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5557. // merge adjacent text nodes
  5558. if (isTextNode(c[0]) && isTextNode(last)) {
  5559. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5560. c.shift();
  5561. }
  5562. res.push.apply(res, c);
  5563. }
  5564. } else if (isPrimitive(c)) {
  5565. if (isTextNode(last)) {
  5566. // merge adjacent text nodes
  5567. // this is necessary for SSR hydration because text nodes are
  5568. // essentially merged when rendered to HTML strings
  5569. res[lastIndex] = createTextVNode(last.text + c);
  5570. } else if (c !== '') {
  5571. // convert primitive to vnode
  5572. res.push(createTextVNode(c));
  5573. }
  5574. } else {
  5575. if (isTextNode(c) && isTextNode(last)) {
  5576. // merge adjacent text nodes
  5577. res[lastIndex] = createTextVNode(last.text + c.text);
  5578. } else {
  5579. // default key for nested array children (likely generated by v-for)
  5580. if (isTrue(children._isVList) &&
  5581. isDef(c.tag) &&
  5582. isUndef(c.key) &&
  5583. isDef(nestedIndex)) {
  5584. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5585. }
  5586. res.push(c);
  5587. }
  5588. }
  5589. }
  5590. return res
  5591. }
  5592. /* */
  5593. function initProvide (vm) {
  5594. var provide = vm.$options.provide;
  5595. if (provide) {
  5596. vm._provided = typeof provide === 'function'
  5597. ? provide.call(vm)
  5598. : provide;
  5599. }
  5600. }
  5601. function initInjections (vm) {
  5602. var result = resolveInject(vm.$options.inject, vm);
  5603. if (result) {
  5604. toggleObserving(false);
  5605. Object.keys(result).forEach(function (key) {
  5606. /* istanbul ignore else */
  5607. if (true) {
  5608. defineReactive$$1(vm, key, result[key], function () {
  5609. warn(
  5610. "Avoid mutating an injected value directly since the changes will be " +
  5611. "overwritten whenever the provided component re-renders. " +
  5612. "injection being mutated: \"" + key + "\"",
  5613. vm
  5614. );
  5615. });
  5616. } else {}
  5617. });
  5618. toggleObserving(true);
  5619. }
  5620. }
  5621. function resolveInject (inject, vm) {
  5622. if (inject) {
  5623. // inject is :any because flow is not smart enough to figure out cached
  5624. var result = Object.create(null);
  5625. var keys = hasSymbol
  5626. ? Reflect.ownKeys(inject)
  5627. : Object.keys(inject);
  5628. for (var i = 0; i < keys.length; i++) {
  5629. var key = keys[i];
  5630. // #6574 in case the inject object is observed...
  5631. if (key === '__ob__') { continue }
  5632. var provideKey = inject[key].from;
  5633. var source = vm;
  5634. while (source) {
  5635. if (source._provided && hasOwn(source._provided, provideKey)) {
  5636. result[key] = source._provided[provideKey];
  5637. break
  5638. }
  5639. source = source.$parent;
  5640. }
  5641. if (!source) {
  5642. if ('default' in inject[key]) {
  5643. var provideDefault = inject[key].default;
  5644. result[key] = typeof provideDefault === 'function'
  5645. ? provideDefault.call(vm)
  5646. : provideDefault;
  5647. } else if (true) {
  5648. warn(("Injection \"" + key + "\" not found"), vm);
  5649. }
  5650. }
  5651. }
  5652. return result
  5653. }
  5654. }
  5655. /* */
  5656. /**
  5657. * Runtime helper for resolving raw children VNodes into a slot object.
  5658. */
  5659. function resolveSlots (
  5660. children,
  5661. context
  5662. ) {
  5663. if (!children || !children.length) {
  5664. return {}
  5665. }
  5666. var slots = {};
  5667. for (var i = 0, l = children.length; i < l; i++) {
  5668. var child = children[i];
  5669. var data = child.data;
  5670. // remove slot attribute if the node is resolved as a Vue slot node
  5671. if (data && data.attrs && data.attrs.slot) {
  5672. delete data.attrs.slot;
  5673. }
  5674. // named slots should only be respected if the vnode was rendered in the
  5675. // same context.
  5676. if ((child.context === context || child.fnContext === context) &&
  5677. data && data.slot != null
  5678. ) {
  5679. var name = data.slot;
  5680. var slot = (slots[name] || (slots[name] = []));
  5681. if (child.tag === 'template') {
  5682. slot.push.apply(slot, child.children || []);
  5683. } else {
  5684. slot.push(child);
  5685. }
  5686. } else {
  5687. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5688. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5689. (slots['page'] || (slots['page'] = [])).push(child);
  5690. }else{
  5691. (slots.default || (slots.default = [])).push(child);
  5692. }
  5693. }
  5694. }
  5695. // ignore slots that contains only whitespace
  5696. for (var name$1 in slots) {
  5697. if (slots[name$1].every(isWhitespace)) {
  5698. delete slots[name$1];
  5699. }
  5700. }
  5701. return slots
  5702. }
  5703. function isWhitespace (node) {
  5704. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5705. }
  5706. /* */
  5707. function normalizeScopedSlots (
  5708. slots,
  5709. normalSlots,
  5710. prevSlots
  5711. ) {
  5712. var res;
  5713. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5714. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5715. var key = slots && slots.$key;
  5716. if (!slots) {
  5717. res = {};
  5718. } else if (slots._normalized) {
  5719. // fast path 1: child component re-render only, parent did not change
  5720. return slots._normalized
  5721. } else if (
  5722. isStable &&
  5723. prevSlots &&
  5724. prevSlots !== emptyObject &&
  5725. key === prevSlots.$key &&
  5726. !hasNormalSlots &&
  5727. !prevSlots.$hasNormal
  5728. ) {
  5729. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5730. // only need to normalize once
  5731. return prevSlots
  5732. } else {
  5733. res = {};
  5734. for (var key$1 in slots) {
  5735. if (slots[key$1] && key$1[0] !== '$') {
  5736. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5737. }
  5738. }
  5739. }
  5740. // expose normal slots on scopedSlots
  5741. for (var key$2 in normalSlots) {
  5742. if (!(key$2 in res)) {
  5743. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5744. }
  5745. }
  5746. // avoriaz seems to mock a non-extensible $scopedSlots object
  5747. // and when that is passed down this would cause an error
  5748. if (slots && Object.isExtensible(slots)) {
  5749. (slots)._normalized = res;
  5750. }
  5751. def(res, '$stable', isStable);
  5752. def(res, '$key', key);
  5753. def(res, '$hasNormal', hasNormalSlots);
  5754. return res
  5755. }
  5756. function normalizeScopedSlot(normalSlots, key, fn) {
  5757. var normalized = function () {
  5758. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5759. res = res && typeof res === 'object' && !Array.isArray(res)
  5760. ? [res] // single vnode
  5761. : normalizeChildren(res);
  5762. return res && (
  5763. res.length === 0 ||
  5764. (res.length === 1 && res[0].isComment) // #9658
  5765. ) ? undefined
  5766. : res
  5767. };
  5768. // this is a slot using the new v-slot syntax without scope. although it is
  5769. // compiled as a scoped slot, render fn users would expect it to be present
  5770. // on this.$slots because the usage is semantically a normal slot.
  5771. if (fn.proxy) {
  5772. Object.defineProperty(normalSlots, key, {
  5773. get: normalized,
  5774. enumerable: true,
  5775. configurable: true
  5776. });
  5777. }
  5778. return normalized
  5779. }
  5780. function proxyNormalSlot(slots, key) {
  5781. return function () { return slots[key]; }
  5782. }
  5783. /* */
  5784. /**
  5785. * Runtime helper for rendering v-for lists.
  5786. */
  5787. function renderList (
  5788. val,
  5789. render
  5790. ) {
  5791. var ret, i, l, keys, key;
  5792. if (Array.isArray(val) || typeof val === 'string') {
  5793. ret = new Array(val.length);
  5794. for (i = 0, l = val.length; i < l; i++) {
  5795. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5796. }
  5797. } else if (typeof val === 'number') {
  5798. ret = new Array(val);
  5799. for (i = 0; i < val; i++) {
  5800. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5801. }
  5802. } else if (isObject(val)) {
  5803. if (hasSymbol && val[Symbol.iterator]) {
  5804. ret = [];
  5805. var iterator = val[Symbol.iterator]();
  5806. var result = iterator.next();
  5807. while (!result.done) {
  5808. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  5809. result = iterator.next();
  5810. }
  5811. } else {
  5812. keys = Object.keys(val);
  5813. ret = new Array(keys.length);
  5814. for (i = 0, l = keys.length; i < l; i++) {
  5815. key = keys[i];
  5816. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5817. }
  5818. }
  5819. }
  5820. if (!isDef(ret)) {
  5821. ret = [];
  5822. }
  5823. (ret)._isVList = true;
  5824. return ret
  5825. }
  5826. /* */
  5827. /**
  5828. * Runtime helper for rendering <slot>
  5829. */
  5830. function renderSlot (
  5831. name,
  5832. fallback,
  5833. props,
  5834. bindObject
  5835. ) {
  5836. var scopedSlotFn = this.$scopedSlots[name];
  5837. var nodes;
  5838. if (scopedSlotFn) { // scoped slot
  5839. props = props || {};
  5840. if (bindObject) {
  5841. if ( true && !isObject(bindObject)) {
  5842. warn(
  5843. 'slot v-bind without argument expects an Object',
  5844. this
  5845. );
  5846. }
  5847. props = extend(extend({}, bindObject), props);
  5848. }
  5849. // fixed by xxxxxx app-plus scopedSlot
  5850. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5851. } else {
  5852. nodes = this.$slots[name] || fallback;
  5853. }
  5854. var target = props && props.slot;
  5855. if (target) {
  5856. return this.$createElement('template', { slot: target }, nodes)
  5857. } else {
  5858. return nodes
  5859. }
  5860. }
  5861. /* */
  5862. /**
  5863. * Runtime helper for resolving filters
  5864. */
  5865. function resolveFilter (id) {
  5866. return resolveAsset(this.$options, 'filters', id, true) || identity
  5867. }
  5868. /* */
  5869. function isKeyNotMatch (expect, actual) {
  5870. if (Array.isArray(expect)) {
  5871. return expect.indexOf(actual) === -1
  5872. } else {
  5873. return expect !== actual
  5874. }
  5875. }
  5876. /**
  5877. * Runtime helper for checking keyCodes from config.
  5878. * exposed as Vue.prototype._k
  5879. * passing in eventKeyName as last argument separately for backwards compat
  5880. */
  5881. function checkKeyCodes (
  5882. eventKeyCode,
  5883. key,
  5884. builtInKeyCode,
  5885. eventKeyName,
  5886. builtInKeyName
  5887. ) {
  5888. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5889. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5890. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5891. } else if (mappedKeyCode) {
  5892. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5893. } else if (eventKeyName) {
  5894. return hyphenate(eventKeyName) !== key
  5895. }
  5896. }
  5897. /* */
  5898. /**
  5899. * Runtime helper for merging v-bind="object" into a VNode's data.
  5900. */
  5901. function bindObjectProps (
  5902. data,
  5903. tag,
  5904. value,
  5905. asProp,
  5906. isSync
  5907. ) {
  5908. if (value) {
  5909. if (!isObject(value)) {
  5910. true && warn(
  5911. 'v-bind without argument expects an Object or Array value',
  5912. this
  5913. );
  5914. } else {
  5915. if (Array.isArray(value)) {
  5916. value = toObject(value);
  5917. }
  5918. var hash;
  5919. var loop = function ( key ) {
  5920. if (
  5921. key === 'class' ||
  5922. key === 'style' ||
  5923. isReservedAttribute(key)
  5924. ) {
  5925. hash = data;
  5926. } else {
  5927. var type = data.attrs && data.attrs.type;
  5928. hash = asProp || config.mustUseProp(tag, type, key)
  5929. ? data.domProps || (data.domProps = {})
  5930. : data.attrs || (data.attrs = {});
  5931. }
  5932. var camelizedKey = camelize(key);
  5933. var hyphenatedKey = hyphenate(key);
  5934. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5935. hash[key] = value[key];
  5936. if (isSync) {
  5937. var on = data.on || (data.on = {});
  5938. on[("update:" + key)] = function ($event) {
  5939. value[key] = $event;
  5940. };
  5941. }
  5942. }
  5943. };
  5944. for (var key in value) loop( key );
  5945. }
  5946. }
  5947. return data
  5948. }
  5949. /* */
  5950. /**
  5951. * Runtime helper for rendering static trees.
  5952. */
  5953. function renderStatic (
  5954. index,
  5955. isInFor
  5956. ) {
  5957. var cached = this._staticTrees || (this._staticTrees = []);
  5958. var tree = cached[index];
  5959. // if has already-rendered static tree and not inside v-for,
  5960. // we can reuse the same tree.
  5961. if (tree && !isInFor) {
  5962. return tree
  5963. }
  5964. // otherwise, render a fresh tree.
  5965. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5966. this._renderProxy,
  5967. null,
  5968. this // for render fns generated for functional component templates
  5969. );
  5970. markStatic(tree, ("__static__" + index), false);
  5971. return tree
  5972. }
  5973. /**
  5974. * Runtime helper for v-once.
  5975. * Effectively it means marking the node as static with a unique key.
  5976. */
  5977. function markOnce (
  5978. tree,
  5979. index,
  5980. key
  5981. ) {
  5982. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5983. return tree
  5984. }
  5985. function markStatic (
  5986. tree,
  5987. key,
  5988. isOnce
  5989. ) {
  5990. if (Array.isArray(tree)) {
  5991. for (var i = 0; i < tree.length; i++) {
  5992. if (tree[i] && typeof tree[i] !== 'string') {
  5993. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5994. }
  5995. }
  5996. } else {
  5997. markStaticNode(tree, key, isOnce);
  5998. }
  5999. }
  6000. function markStaticNode (node, key, isOnce) {
  6001. node.isStatic = true;
  6002. node.key = key;
  6003. node.isOnce = isOnce;
  6004. }
  6005. /* */
  6006. function bindObjectListeners (data, value) {
  6007. if (value) {
  6008. if (!isPlainObject(value)) {
  6009. true && warn(
  6010. 'v-on without argument expects an Object value',
  6011. this
  6012. );
  6013. } else {
  6014. var on = data.on = data.on ? extend({}, data.on) : {};
  6015. for (var key in value) {
  6016. var existing = on[key];
  6017. var ours = value[key];
  6018. on[key] = existing ? [].concat(existing, ours) : ours;
  6019. }
  6020. }
  6021. }
  6022. return data
  6023. }
  6024. /* */
  6025. function resolveScopedSlots (
  6026. fns, // see flow/vnode
  6027. res,
  6028. // the following are added in 2.6
  6029. hasDynamicKeys,
  6030. contentHashKey
  6031. ) {
  6032. res = res || { $stable: !hasDynamicKeys };
  6033. for (var i = 0; i < fns.length; i++) {
  6034. var slot = fns[i];
  6035. if (Array.isArray(slot)) {
  6036. resolveScopedSlots(slot, res, hasDynamicKeys);
  6037. } else if (slot) {
  6038. // marker for reverse proxying v-slot without scope on this.$slots
  6039. if (slot.proxy) {
  6040. slot.fn.proxy = true;
  6041. }
  6042. res[slot.key] = slot.fn;
  6043. }
  6044. }
  6045. if (contentHashKey) {
  6046. (res).$key = contentHashKey;
  6047. }
  6048. return res
  6049. }
  6050. /* */
  6051. function bindDynamicKeys (baseObj, values) {
  6052. for (var i = 0; i < values.length; i += 2) {
  6053. var key = values[i];
  6054. if (typeof key === 'string' && key) {
  6055. baseObj[values[i]] = values[i + 1];
  6056. } else if ( true && key !== '' && key !== null) {
  6057. // null is a special value for explicitly removing a binding
  6058. warn(
  6059. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  6060. this
  6061. );
  6062. }
  6063. }
  6064. return baseObj
  6065. }
  6066. // helper to dynamically append modifier runtime markers to event names.
  6067. // ensure only append when value is already string, otherwise it will be cast
  6068. // to string and cause the type check to miss.
  6069. function prependModifier (value, symbol) {
  6070. return typeof value === 'string' ? symbol + value : value
  6071. }
  6072. /* */
  6073. function installRenderHelpers (target) {
  6074. target._o = markOnce;
  6075. target._n = toNumber;
  6076. target._s = toString;
  6077. target._l = renderList;
  6078. target._t = renderSlot;
  6079. target._q = looseEqual;
  6080. target._i = looseIndexOf;
  6081. target._m = renderStatic;
  6082. target._f = resolveFilter;
  6083. target._k = checkKeyCodes;
  6084. target._b = bindObjectProps;
  6085. target._v = createTextVNode;
  6086. target._e = createEmptyVNode;
  6087. target._u = resolveScopedSlots;
  6088. target._g = bindObjectListeners;
  6089. target._d = bindDynamicKeys;
  6090. target._p = prependModifier;
  6091. }
  6092. /* */
  6093. function FunctionalRenderContext (
  6094. data,
  6095. props,
  6096. children,
  6097. parent,
  6098. Ctor
  6099. ) {
  6100. var this$1 = this;
  6101. var options = Ctor.options;
  6102. // ensure the createElement function in functional components
  6103. // gets a unique context - this is necessary for correct named slot check
  6104. var contextVm;
  6105. if (hasOwn(parent, '_uid')) {
  6106. contextVm = Object.create(parent);
  6107. // $flow-disable-line
  6108. contextVm._original = parent;
  6109. } else {
  6110. // the context vm passed in is a functional context as well.
  6111. // in this case we want to make sure we are able to get a hold to the
  6112. // real context instance.
  6113. contextVm = parent;
  6114. // $flow-disable-line
  6115. parent = parent._original;
  6116. }
  6117. var isCompiled = isTrue(options._compiled);
  6118. var needNormalization = !isCompiled;
  6119. this.data = data;
  6120. this.props = props;
  6121. this.children = children;
  6122. this.parent = parent;
  6123. this.listeners = data.on || emptyObject;
  6124. this.injections = resolveInject(options.inject, parent);
  6125. this.slots = function () {
  6126. if (!this$1.$slots) {
  6127. normalizeScopedSlots(
  6128. data.scopedSlots,
  6129. this$1.$slots = resolveSlots(children, parent)
  6130. );
  6131. }
  6132. return this$1.$slots
  6133. };
  6134. Object.defineProperty(this, 'scopedSlots', ({
  6135. enumerable: true,
  6136. get: function get () {
  6137. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6138. }
  6139. }));
  6140. // support for compiled functional template
  6141. if (isCompiled) {
  6142. // exposing $options for renderStatic()
  6143. this.$options = options;
  6144. // pre-resolve slots for renderSlot()
  6145. this.$slots = this.slots();
  6146. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6147. }
  6148. if (options._scopeId) {
  6149. this._c = function (a, b, c, d) {
  6150. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6151. if (vnode && !Array.isArray(vnode)) {
  6152. vnode.fnScopeId = options._scopeId;
  6153. vnode.fnContext = parent;
  6154. }
  6155. return vnode
  6156. };
  6157. } else {
  6158. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6159. }
  6160. }
  6161. installRenderHelpers(FunctionalRenderContext.prototype);
  6162. function createFunctionalComponent (
  6163. Ctor,
  6164. propsData,
  6165. data,
  6166. contextVm,
  6167. children
  6168. ) {
  6169. var options = Ctor.options;
  6170. var props = {};
  6171. var propOptions = options.props;
  6172. if (isDef(propOptions)) {
  6173. for (var key in propOptions) {
  6174. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6175. }
  6176. } else {
  6177. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6178. if (isDef(data.props)) { mergeProps(props, data.props); }
  6179. }
  6180. var renderContext = new FunctionalRenderContext(
  6181. data,
  6182. props,
  6183. children,
  6184. contextVm,
  6185. Ctor
  6186. );
  6187. var vnode = options.render.call(null, renderContext._c, renderContext);
  6188. if (vnode instanceof VNode) {
  6189. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6190. } else if (Array.isArray(vnode)) {
  6191. var vnodes = normalizeChildren(vnode) || [];
  6192. var res = new Array(vnodes.length);
  6193. for (var i = 0; i < vnodes.length; i++) {
  6194. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6195. }
  6196. return res
  6197. }
  6198. }
  6199. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6200. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6201. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6202. // that should not be matched to match.
  6203. var clone = cloneVNode(vnode);
  6204. clone.fnContext = contextVm;
  6205. clone.fnOptions = options;
  6206. if (true) {
  6207. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6208. }
  6209. if (data.slot) {
  6210. (clone.data || (clone.data = {})).slot = data.slot;
  6211. }
  6212. return clone
  6213. }
  6214. function mergeProps (to, from) {
  6215. for (var key in from) {
  6216. to[camelize(key)] = from[key];
  6217. }
  6218. }
  6219. /* */
  6220. /* */
  6221. /* */
  6222. /* */
  6223. // inline hooks to be invoked on component VNodes during patch
  6224. var componentVNodeHooks = {
  6225. init: function init (vnode, hydrating) {
  6226. if (
  6227. vnode.componentInstance &&
  6228. !vnode.componentInstance._isDestroyed &&
  6229. vnode.data.keepAlive
  6230. ) {
  6231. // kept-alive components, treat as a patch
  6232. var mountedNode = vnode; // work around flow
  6233. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6234. } else {
  6235. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6236. vnode,
  6237. activeInstance
  6238. );
  6239. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6240. }
  6241. },
  6242. prepatch: function prepatch (oldVnode, vnode) {
  6243. var options = vnode.componentOptions;
  6244. var child = vnode.componentInstance = oldVnode.componentInstance;
  6245. updateChildComponent(
  6246. child,
  6247. options.propsData, // updated props
  6248. options.listeners, // updated listeners
  6249. vnode, // new parent vnode
  6250. options.children // new children
  6251. );
  6252. },
  6253. insert: function insert (vnode) {
  6254. var context = vnode.context;
  6255. var componentInstance = vnode.componentInstance;
  6256. if (!componentInstance._isMounted) {
  6257. callHook(componentInstance, 'onServiceCreated');
  6258. callHook(componentInstance, 'onServiceAttached');
  6259. componentInstance._isMounted = true;
  6260. callHook(componentInstance, 'mounted');
  6261. }
  6262. if (vnode.data.keepAlive) {
  6263. if (context._isMounted) {
  6264. // vue-router#1212
  6265. // During updates, a kept-alive component's child components may
  6266. // change, so directly walking the tree here may call activated hooks
  6267. // on incorrect children. Instead we push them into a queue which will
  6268. // be processed after the whole patch process ended.
  6269. queueActivatedComponent(componentInstance);
  6270. } else {
  6271. activateChildComponent(componentInstance, true /* direct */);
  6272. }
  6273. }
  6274. },
  6275. destroy: function destroy (vnode) {
  6276. var componentInstance = vnode.componentInstance;
  6277. if (!componentInstance._isDestroyed) {
  6278. if (!vnode.data.keepAlive) {
  6279. componentInstance.$destroy();
  6280. } else {
  6281. deactivateChildComponent(componentInstance, true /* direct */);
  6282. }
  6283. }
  6284. }
  6285. };
  6286. var hooksToMerge = Object.keys(componentVNodeHooks);
  6287. function createComponent (
  6288. Ctor,
  6289. data,
  6290. context,
  6291. children,
  6292. tag
  6293. ) {
  6294. if (isUndef(Ctor)) {
  6295. return
  6296. }
  6297. var baseCtor = context.$options._base;
  6298. // plain options object: turn it into a constructor
  6299. if (isObject(Ctor)) {
  6300. Ctor = baseCtor.extend(Ctor);
  6301. }
  6302. // if at this stage it's not a constructor or an async component factory,
  6303. // reject.
  6304. if (typeof Ctor !== 'function') {
  6305. if (true) {
  6306. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6307. }
  6308. return
  6309. }
  6310. // async component
  6311. var asyncFactory;
  6312. if (isUndef(Ctor.cid)) {
  6313. asyncFactory = Ctor;
  6314. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6315. if (Ctor === undefined) {
  6316. // return a placeholder node for async component, which is rendered
  6317. // as a comment node but preserves all the raw information for the node.
  6318. // the information will be used for async server-rendering and hydration.
  6319. return createAsyncPlaceholder(
  6320. asyncFactory,
  6321. data,
  6322. context,
  6323. children,
  6324. tag
  6325. )
  6326. }
  6327. }
  6328. data = data || {};
  6329. // resolve constructor options in case global mixins are applied after
  6330. // component constructor creation
  6331. resolveConstructorOptions(Ctor);
  6332. // transform component v-model data into props & events
  6333. if (isDef(data.model)) {
  6334. transformModel(Ctor.options, data);
  6335. }
  6336. // extract props
  6337. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6338. // functional component
  6339. if (isTrue(Ctor.options.functional)) {
  6340. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6341. }
  6342. // extract listeners, since these needs to be treated as
  6343. // child component listeners instead of DOM listeners
  6344. var listeners = data.on;
  6345. // replace with listeners with .native modifier
  6346. // so it gets processed during parent component patch.
  6347. data.on = data.nativeOn;
  6348. if (isTrue(Ctor.options.abstract)) {
  6349. // abstract components do not keep anything
  6350. // other than props & listeners & slot
  6351. // work around flow
  6352. var slot = data.slot;
  6353. data = {};
  6354. if (slot) {
  6355. data.slot = slot;
  6356. }
  6357. }
  6358. // install component management hooks onto the placeholder node
  6359. installComponentHooks(data);
  6360. // return a placeholder vnode
  6361. var name = Ctor.options.name || tag;
  6362. var vnode = new VNode(
  6363. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6364. data, undefined, undefined, undefined, context,
  6365. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6366. asyncFactory
  6367. );
  6368. return vnode
  6369. }
  6370. function createComponentInstanceForVnode (
  6371. vnode, // we know it's MountedComponentVNode but flow doesn't
  6372. parent // activeInstance in lifecycle state
  6373. ) {
  6374. var options = {
  6375. _isComponent: true,
  6376. _parentVnode: vnode,
  6377. parent: parent
  6378. };
  6379. // check inline-template render functions
  6380. var inlineTemplate = vnode.data.inlineTemplate;
  6381. if (isDef(inlineTemplate)) {
  6382. options.render = inlineTemplate.render;
  6383. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6384. }
  6385. return new vnode.componentOptions.Ctor(options)
  6386. }
  6387. function installComponentHooks (data) {
  6388. var hooks = data.hook || (data.hook = {});
  6389. for (var i = 0; i < hooksToMerge.length; i++) {
  6390. var key = hooksToMerge[i];
  6391. var existing = hooks[key];
  6392. var toMerge = componentVNodeHooks[key];
  6393. if (existing !== toMerge && !(existing && existing._merged)) {
  6394. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6395. }
  6396. }
  6397. }
  6398. function mergeHook$1 (f1, f2) {
  6399. var merged = function (a, b) {
  6400. // flow complains about extra args which is why we use any
  6401. f1(a, b);
  6402. f2(a, b);
  6403. };
  6404. merged._merged = true;
  6405. return merged
  6406. }
  6407. // transform component v-model info (value and callback) into
  6408. // prop and event handler respectively.
  6409. function transformModel (options, data) {
  6410. var prop = (options.model && options.model.prop) || 'value';
  6411. var event = (options.model && options.model.event) || 'input'
  6412. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6413. var on = data.on || (data.on = {});
  6414. var existing = on[event];
  6415. var callback = data.model.callback;
  6416. if (isDef(existing)) {
  6417. if (
  6418. Array.isArray(existing)
  6419. ? existing.indexOf(callback) === -1
  6420. : existing !== callback
  6421. ) {
  6422. on[event] = [callback].concat(existing);
  6423. }
  6424. } else {
  6425. on[event] = callback;
  6426. }
  6427. }
  6428. /* */
  6429. var SIMPLE_NORMALIZE = 1;
  6430. var ALWAYS_NORMALIZE = 2;
  6431. // wrapper function for providing a more flexible interface
  6432. // without getting yelled at by flow
  6433. function createElement (
  6434. context,
  6435. tag,
  6436. data,
  6437. children,
  6438. normalizationType,
  6439. alwaysNormalize
  6440. ) {
  6441. if (Array.isArray(data) || isPrimitive(data)) {
  6442. normalizationType = children;
  6443. children = data;
  6444. data = undefined;
  6445. }
  6446. if (isTrue(alwaysNormalize)) {
  6447. normalizationType = ALWAYS_NORMALIZE;
  6448. }
  6449. return _createElement(context, tag, data, children, normalizationType)
  6450. }
  6451. function _createElement (
  6452. context,
  6453. tag,
  6454. data,
  6455. children,
  6456. normalizationType
  6457. ) {
  6458. if (isDef(data) && isDef((data).__ob__)) {
  6459. true && warn(
  6460. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6461. 'Always create fresh vnode data objects in each render!',
  6462. context
  6463. );
  6464. return createEmptyVNode()
  6465. }
  6466. // object syntax in v-bind
  6467. if (isDef(data) && isDef(data.is)) {
  6468. tag = data.is;
  6469. }
  6470. if (!tag) {
  6471. // in case of component :is set to falsy value
  6472. return createEmptyVNode()
  6473. }
  6474. // warn against non-primitive key
  6475. if ( true &&
  6476. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6477. ) {
  6478. {
  6479. warn(
  6480. 'Avoid using non-primitive value as key, ' +
  6481. 'use string/number value instead.',
  6482. context
  6483. );
  6484. }
  6485. }
  6486. // support single function children as default scoped slot
  6487. if (Array.isArray(children) &&
  6488. typeof children[0] === 'function'
  6489. ) {
  6490. data = data || {};
  6491. data.scopedSlots = { default: children[0] };
  6492. children.length = 0;
  6493. }
  6494. if (normalizationType === ALWAYS_NORMALIZE) {
  6495. children = normalizeChildren(children);
  6496. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6497. children = simpleNormalizeChildren(children);
  6498. }
  6499. var vnode, ns;
  6500. if (typeof tag === 'string') {
  6501. var Ctor;
  6502. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6503. if (config.isReservedTag(tag)) {
  6504. // platform built-in elements
  6505. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6506. warn(
  6507. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6508. context
  6509. );
  6510. }
  6511. vnode = new VNode(
  6512. config.parsePlatformTagName(tag), data, children,
  6513. undefined, undefined, context
  6514. );
  6515. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6516. // component
  6517. vnode = createComponent(Ctor, data, context, children, tag);
  6518. } else {
  6519. // unknown or unlisted namespaced elements
  6520. // check at runtime because it may get assigned a namespace when its
  6521. // parent normalizes children
  6522. vnode = new VNode(
  6523. tag, data, children,
  6524. undefined, undefined, context
  6525. );
  6526. }
  6527. } else {
  6528. // direct component options / constructor
  6529. vnode = createComponent(tag, data, context, children);
  6530. }
  6531. if (Array.isArray(vnode)) {
  6532. return vnode
  6533. } else if (isDef(vnode)) {
  6534. if (isDef(ns)) { applyNS(vnode, ns); }
  6535. if (isDef(data)) { registerDeepBindings(data); }
  6536. return vnode
  6537. } else {
  6538. return createEmptyVNode()
  6539. }
  6540. }
  6541. function applyNS (vnode, ns, force) {
  6542. vnode.ns = ns;
  6543. if (vnode.tag === 'foreignObject') {
  6544. // use default namespace inside foreignObject
  6545. ns = undefined;
  6546. force = true;
  6547. }
  6548. if (isDef(vnode.children)) {
  6549. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6550. var child = vnode.children[i];
  6551. if (isDef(child.tag) && (
  6552. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6553. applyNS(child, ns, force);
  6554. }
  6555. }
  6556. }
  6557. }
  6558. // ref #5318
  6559. // necessary to ensure parent re-render when deep bindings like :style and
  6560. // :class are used on slot nodes
  6561. function registerDeepBindings (data) {
  6562. if (isObject(data.style)) {
  6563. traverse(data.style);
  6564. }
  6565. if (isObject(data.class)) {
  6566. traverse(data.class);
  6567. }
  6568. }
  6569. /* */
  6570. function initRender (vm) {
  6571. vm._vnode = null; // the root of the child tree
  6572. vm._staticTrees = null; // v-once cached trees
  6573. var options = vm.$options;
  6574. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6575. var renderContext = parentVnode && parentVnode.context;
  6576. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6577. vm.$scopedSlots = emptyObject;
  6578. // bind the createElement fn to this instance
  6579. // so that we get proper render context inside it.
  6580. // args order: tag, data, children, normalizationType, alwaysNormalize
  6581. // internal version is used by render functions compiled from templates
  6582. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6583. // normalization is always applied for the public version, used in
  6584. // user-written render functions.
  6585. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6586. // $attrs & $listeners are exposed for easier HOC creation.
  6587. // they need to be reactive so that HOCs using them are always updated
  6588. var parentData = parentVnode && parentVnode.data;
  6589. /* istanbul ignore else */
  6590. if (true) {
  6591. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6592. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6593. }, true);
  6594. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6595. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6596. }, true);
  6597. } else {}
  6598. }
  6599. var currentRenderingInstance = null;
  6600. function renderMixin (Vue) {
  6601. // install runtime convenience helpers
  6602. installRenderHelpers(Vue.prototype);
  6603. Vue.prototype.$nextTick = function (fn) {
  6604. return nextTick(fn, this)
  6605. };
  6606. Vue.prototype._render = function () {
  6607. var vm = this;
  6608. var ref = vm.$options;
  6609. var render = ref.render;
  6610. var _parentVnode = ref._parentVnode;
  6611. if (_parentVnode) {
  6612. vm.$scopedSlots = normalizeScopedSlots(
  6613. _parentVnode.data.scopedSlots,
  6614. vm.$slots,
  6615. vm.$scopedSlots
  6616. );
  6617. }
  6618. // set parent vnode. this allows render functions to have access
  6619. // to the data on the placeholder node.
  6620. vm.$vnode = _parentVnode;
  6621. // render self
  6622. var vnode;
  6623. try {
  6624. // There's no need to maintain a stack because all render fns are called
  6625. // separately from one another. Nested component's render fns are called
  6626. // when parent component is patched.
  6627. currentRenderingInstance = vm;
  6628. vnode = render.call(vm._renderProxy, vm.$createElement);
  6629. } catch (e) {
  6630. handleError(e, vm, "render");
  6631. // return error render result,
  6632. // or previous vnode to prevent render error causing blank component
  6633. /* istanbul ignore else */
  6634. if ( true && vm.$options.renderError) {
  6635. try {
  6636. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6637. } catch (e) {
  6638. handleError(e, vm, "renderError");
  6639. vnode = vm._vnode;
  6640. }
  6641. } else {
  6642. vnode = vm._vnode;
  6643. }
  6644. } finally {
  6645. currentRenderingInstance = null;
  6646. }
  6647. // if the returned array contains only a single node, allow it
  6648. if (Array.isArray(vnode) && vnode.length === 1) {
  6649. vnode = vnode[0];
  6650. }
  6651. // return empty vnode in case the render function errored out
  6652. if (!(vnode instanceof VNode)) {
  6653. if ( true && Array.isArray(vnode)) {
  6654. warn(
  6655. 'Multiple root nodes returned from render function. Render function ' +
  6656. 'should return a single root node.',
  6657. vm
  6658. );
  6659. }
  6660. vnode = createEmptyVNode();
  6661. }
  6662. // set parent
  6663. vnode.parent = _parentVnode;
  6664. return vnode
  6665. };
  6666. }
  6667. /* */
  6668. function ensureCtor (comp, base) {
  6669. if (
  6670. comp.__esModule ||
  6671. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6672. ) {
  6673. comp = comp.default;
  6674. }
  6675. return isObject(comp)
  6676. ? base.extend(comp)
  6677. : comp
  6678. }
  6679. function createAsyncPlaceholder (
  6680. factory,
  6681. data,
  6682. context,
  6683. children,
  6684. tag
  6685. ) {
  6686. var node = createEmptyVNode();
  6687. node.asyncFactory = factory;
  6688. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6689. return node
  6690. }
  6691. function resolveAsyncComponent (
  6692. factory,
  6693. baseCtor
  6694. ) {
  6695. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6696. return factory.errorComp
  6697. }
  6698. if (isDef(factory.resolved)) {
  6699. return factory.resolved
  6700. }
  6701. var owner = currentRenderingInstance;
  6702. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6703. // already pending
  6704. factory.owners.push(owner);
  6705. }
  6706. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6707. return factory.loadingComp
  6708. }
  6709. if (owner && !isDef(factory.owners)) {
  6710. var owners = factory.owners = [owner];
  6711. var sync = true;
  6712. var timerLoading = null;
  6713. var timerTimeout = null
  6714. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6715. var forceRender = function (renderCompleted) {
  6716. for (var i = 0, l = owners.length; i < l; i++) {
  6717. (owners[i]).$forceUpdate();
  6718. }
  6719. if (renderCompleted) {
  6720. owners.length = 0;
  6721. if (timerLoading !== null) {
  6722. clearTimeout(timerLoading);
  6723. timerLoading = null;
  6724. }
  6725. if (timerTimeout !== null) {
  6726. clearTimeout(timerTimeout);
  6727. timerTimeout = null;
  6728. }
  6729. }
  6730. };
  6731. var resolve = once(function (res) {
  6732. // cache resolved
  6733. factory.resolved = ensureCtor(res, baseCtor);
  6734. // invoke callbacks only if this is not a synchronous resolve
  6735. // (async resolves are shimmed as synchronous during SSR)
  6736. if (!sync) {
  6737. forceRender(true);
  6738. } else {
  6739. owners.length = 0;
  6740. }
  6741. });
  6742. var reject = once(function (reason) {
  6743. true && warn(
  6744. "Failed to resolve async component: " + (String(factory)) +
  6745. (reason ? ("\nReason: " + reason) : '')
  6746. );
  6747. if (isDef(factory.errorComp)) {
  6748. factory.error = true;
  6749. forceRender(true);
  6750. }
  6751. });
  6752. var res = factory(resolve, reject);
  6753. if (isObject(res)) {
  6754. if (isPromise(res)) {
  6755. // () => Promise
  6756. if (isUndef(factory.resolved)) {
  6757. res.then(resolve, reject);
  6758. }
  6759. } else if (isPromise(res.component)) {
  6760. res.component.then(resolve, reject);
  6761. if (isDef(res.error)) {
  6762. factory.errorComp = ensureCtor(res.error, baseCtor);
  6763. }
  6764. if (isDef(res.loading)) {
  6765. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6766. if (res.delay === 0) {
  6767. factory.loading = true;
  6768. } else {
  6769. timerLoading = setTimeout(function () {
  6770. timerLoading = null;
  6771. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6772. factory.loading = true;
  6773. forceRender(false);
  6774. }
  6775. }, res.delay || 200);
  6776. }
  6777. }
  6778. if (isDef(res.timeout)) {
  6779. timerTimeout = setTimeout(function () {
  6780. timerTimeout = null;
  6781. if (isUndef(factory.resolved)) {
  6782. reject(
  6783. true
  6784. ? ("timeout (" + (res.timeout) + "ms)")
  6785. : undefined
  6786. );
  6787. }
  6788. }, res.timeout);
  6789. }
  6790. }
  6791. }
  6792. sync = false;
  6793. // return in case resolved synchronously
  6794. return factory.loading
  6795. ? factory.loadingComp
  6796. : factory.resolved
  6797. }
  6798. }
  6799. /* */
  6800. function isAsyncPlaceholder (node) {
  6801. return node.isComment && node.asyncFactory
  6802. }
  6803. /* */
  6804. function getFirstComponentChild (children) {
  6805. if (Array.isArray(children)) {
  6806. for (var i = 0; i < children.length; i++) {
  6807. var c = children[i];
  6808. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6809. return c
  6810. }
  6811. }
  6812. }
  6813. }
  6814. /* */
  6815. /* */
  6816. function initEvents (vm) {
  6817. vm._events = Object.create(null);
  6818. vm._hasHookEvent = false;
  6819. // init parent attached events
  6820. var listeners = vm.$options._parentListeners;
  6821. if (listeners) {
  6822. updateComponentListeners(vm, listeners);
  6823. }
  6824. }
  6825. var target;
  6826. function add (event, fn) {
  6827. target.$on(event, fn);
  6828. }
  6829. function remove$1 (event, fn) {
  6830. target.$off(event, fn);
  6831. }
  6832. function createOnceHandler (event, fn) {
  6833. var _target = target;
  6834. return function onceHandler () {
  6835. var res = fn.apply(null, arguments);
  6836. if (res !== null) {
  6837. _target.$off(event, onceHandler);
  6838. }
  6839. }
  6840. }
  6841. function updateComponentListeners (
  6842. vm,
  6843. listeners,
  6844. oldListeners
  6845. ) {
  6846. target = vm;
  6847. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6848. target = undefined;
  6849. }
  6850. function eventsMixin (Vue) {
  6851. var hookRE = /^hook:/;
  6852. Vue.prototype.$on = function (event, fn) {
  6853. var vm = this;
  6854. if (Array.isArray(event)) {
  6855. for (var i = 0, l = event.length; i < l; i++) {
  6856. vm.$on(event[i], fn);
  6857. }
  6858. } else {
  6859. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6860. // optimize hook:event cost by using a boolean flag marked at registration
  6861. // instead of a hash lookup
  6862. if (hookRE.test(event)) {
  6863. vm._hasHookEvent = true;
  6864. }
  6865. }
  6866. return vm
  6867. };
  6868. Vue.prototype.$once = function (event, fn) {
  6869. var vm = this;
  6870. function on () {
  6871. vm.$off(event, on);
  6872. fn.apply(vm, arguments);
  6873. }
  6874. on.fn = fn;
  6875. vm.$on(event, on);
  6876. return vm
  6877. };
  6878. Vue.prototype.$off = function (event, fn) {
  6879. var vm = this;
  6880. // all
  6881. if (!arguments.length) {
  6882. vm._events = Object.create(null);
  6883. return vm
  6884. }
  6885. // array of events
  6886. if (Array.isArray(event)) {
  6887. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6888. vm.$off(event[i$1], fn);
  6889. }
  6890. return vm
  6891. }
  6892. // specific event
  6893. var cbs = vm._events[event];
  6894. if (!cbs) {
  6895. return vm
  6896. }
  6897. if (!fn) {
  6898. vm._events[event] = null;
  6899. return vm
  6900. }
  6901. // specific handler
  6902. var cb;
  6903. var i = cbs.length;
  6904. while (i--) {
  6905. cb = cbs[i];
  6906. if (cb === fn || cb.fn === fn) {
  6907. cbs.splice(i, 1);
  6908. break
  6909. }
  6910. }
  6911. return vm
  6912. };
  6913. Vue.prototype.$emit = function (event) {
  6914. var vm = this;
  6915. if (true) {
  6916. var lowerCaseEvent = event.toLowerCase();
  6917. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6918. tip(
  6919. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6920. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6921. "Note that HTML attributes are case-insensitive and you cannot use " +
  6922. "v-on to listen to camelCase events when using in-DOM templates. " +
  6923. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6924. );
  6925. }
  6926. }
  6927. var cbs = vm._events[event];
  6928. if (cbs) {
  6929. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6930. var args = toArray(arguments, 1);
  6931. var info = "event handler for \"" + event + "\"";
  6932. for (var i = 0, l = cbs.length; i < l; i++) {
  6933. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6934. }
  6935. }
  6936. return vm
  6937. };
  6938. }
  6939. /* */
  6940. var activeInstance = null;
  6941. var isUpdatingChildComponent = false;
  6942. function setActiveInstance(vm) {
  6943. var prevActiveInstance = activeInstance;
  6944. activeInstance = vm;
  6945. return function () {
  6946. activeInstance = prevActiveInstance;
  6947. }
  6948. }
  6949. function initLifecycle (vm) {
  6950. var options = vm.$options;
  6951. // locate first non-abstract parent
  6952. var parent = options.parent;
  6953. if (parent && !options.abstract) {
  6954. while (parent.$options.abstract && parent.$parent) {
  6955. parent = parent.$parent;
  6956. }
  6957. parent.$children.push(vm);
  6958. }
  6959. vm.$parent = parent;
  6960. vm.$root = parent ? parent.$root : vm;
  6961. vm.$children = [];
  6962. vm.$refs = {};
  6963. vm._watcher = null;
  6964. vm._inactive = null;
  6965. vm._directInactive = false;
  6966. vm._isMounted = false;
  6967. vm._isDestroyed = false;
  6968. vm._isBeingDestroyed = false;
  6969. }
  6970. function lifecycleMixin (Vue) {
  6971. Vue.prototype._update = function (vnode, hydrating) {
  6972. var vm = this;
  6973. var prevEl = vm.$el;
  6974. var prevVnode = vm._vnode;
  6975. var restoreActiveInstance = setActiveInstance(vm);
  6976. vm._vnode = vnode;
  6977. // Vue.prototype.__patch__ is injected in entry points
  6978. // based on the rendering backend used.
  6979. if (!prevVnode) {
  6980. // initial render
  6981. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6982. } else {
  6983. // updates
  6984. vm.$el = vm.__patch__(prevVnode, vnode);
  6985. }
  6986. restoreActiveInstance();
  6987. // update __vue__ reference
  6988. if (prevEl) {
  6989. prevEl.__vue__ = null;
  6990. }
  6991. if (vm.$el) {
  6992. vm.$el.__vue__ = vm;
  6993. }
  6994. // if parent is an HOC, update its $el as well
  6995. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6996. vm.$parent.$el = vm.$el;
  6997. }
  6998. // updated hook is called by the scheduler to ensure that children are
  6999. // updated in a parent's updated hook.
  7000. };
  7001. Vue.prototype.$forceUpdate = function () {
  7002. var vm = this;
  7003. if (vm._watcher) {
  7004. vm._watcher.update();
  7005. }
  7006. };
  7007. Vue.prototype.$destroy = function () {
  7008. var vm = this;
  7009. if (vm._isBeingDestroyed) {
  7010. return
  7011. }
  7012. callHook(vm, 'beforeDestroy');
  7013. vm._isBeingDestroyed = true;
  7014. // remove self from parent
  7015. var parent = vm.$parent;
  7016. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  7017. remove(parent.$children, vm);
  7018. }
  7019. // teardown watchers
  7020. if (vm._watcher) {
  7021. vm._watcher.teardown();
  7022. }
  7023. var i = vm._watchers.length;
  7024. while (i--) {
  7025. vm._watchers[i].teardown();
  7026. }
  7027. // remove reference from data ob
  7028. // frozen object may not have observer.
  7029. if (vm._data.__ob__) {
  7030. vm._data.__ob__.vmCount--;
  7031. }
  7032. // call the last hook...
  7033. vm._isDestroyed = true;
  7034. // invoke destroy hooks on current rendered tree
  7035. vm.__patch__(vm._vnode, null);
  7036. // fire destroyed hook
  7037. callHook(vm, 'destroyed');
  7038. // turn off all instance listeners.
  7039. vm.$off();
  7040. // remove __vue__ reference
  7041. if (vm.$el) {
  7042. vm.$el.__vue__ = null;
  7043. }
  7044. // release circular reference (#6759)
  7045. if (vm.$vnode) {
  7046. vm.$vnode.parent = null;
  7047. }
  7048. };
  7049. }
  7050. function updateChildComponent (
  7051. vm,
  7052. propsData,
  7053. listeners,
  7054. parentVnode,
  7055. renderChildren
  7056. ) {
  7057. if (true) {
  7058. isUpdatingChildComponent = true;
  7059. }
  7060. // determine whether component has slot children
  7061. // we need to do this before overwriting $options._renderChildren.
  7062. // check if there are dynamic scopedSlots (hand-written or compiled but with
  7063. // dynamic slot names). Static scoped slots compiled from template has the
  7064. // "$stable" marker.
  7065. var newScopedSlots = parentVnode.data.scopedSlots;
  7066. var oldScopedSlots = vm.$scopedSlots;
  7067. var hasDynamicScopedSlot = !!(
  7068. (newScopedSlots && !newScopedSlots.$stable) ||
  7069. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  7070. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  7071. );
  7072. // Any static slot children from the parent may have changed during parent's
  7073. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  7074. // update is necessary to ensure correctness.
  7075. var needsForceUpdate = !!(
  7076. renderChildren || // has new static slots
  7077. vm.$options._renderChildren || // has old static slots
  7078. hasDynamicScopedSlot
  7079. );
  7080. vm.$options._parentVnode = parentVnode;
  7081. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  7082. if (vm._vnode) { // update child tree's parent
  7083. vm._vnode.parent = parentVnode;
  7084. }
  7085. vm.$options._renderChildren = renderChildren;
  7086. // update $attrs and $listeners hash
  7087. // these are also reactive so they may trigger child update if the child
  7088. // used them during render
  7089. vm.$attrs = parentVnode.data.attrs || emptyObject;
  7090. vm.$listeners = listeners || emptyObject;
  7091. // update props
  7092. if (propsData && vm.$options.props) {
  7093. toggleObserving(false);
  7094. var props = vm._props;
  7095. var propKeys = vm.$options._propKeys || [];
  7096. for (var i = 0; i < propKeys.length; i++) {
  7097. var key = propKeys[i];
  7098. var propOptions = vm.$options.props; // wtf flow?
  7099. props[key] = validateProp(key, propOptions, propsData, vm);
  7100. }
  7101. toggleObserving(true);
  7102. // keep a copy of raw propsData
  7103. vm.$options.propsData = propsData;
  7104. }
  7105. // fixed by xxxxxx update properties(mp runtime)
  7106. vm._$updateProperties && vm._$updateProperties(vm);
  7107. // update listeners
  7108. listeners = listeners || emptyObject;
  7109. var oldListeners = vm.$options._parentListeners;
  7110. vm.$options._parentListeners = listeners;
  7111. updateComponentListeners(vm, listeners, oldListeners);
  7112. // resolve slots + force update if has children
  7113. if (needsForceUpdate) {
  7114. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7115. vm.$forceUpdate();
  7116. }
  7117. if (true) {
  7118. isUpdatingChildComponent = false;
  7119. }
  7120. }
  7121. function isInInactiveTree (vm) {
  7122. while (vm && (vm = vm.$parent)) {
  7123. if (vm._inactive) { return true }
  7124. }
  7125. return false
  7126. }
  7127. function activateChildComponent (vm, direct) {
  7128. if (direct) {
  7129. vm._directInactive = false;
  7130. if (isInInactiveTree(vm)) {
  7131. return
  7132. }
  7133. } else if (vm._directInactive) {
  7134. return
  7135. }
  7136. if (vm._inactive || vm._inactive === null) {
  7137. vm._inactive = false;
  7138. for (var i = 0; i < vm.$children.length; i++) {
  7139. activateChildComponent(vm.$children[i]);
  7140. }
  7141. callHook(vm, 'activated');
  7142. }
  7143. }
  7144. function deactivateChildComponent (vm, direct) {
  7145. if (direct) {
  7146. vm._directInactive = true;
  7147. if (isInInactiveTree(vm)) {
  7148. return
  7149. }
  7150. }
  7151. if (!vm._inactive) {
  7152. vm._inactive = true;
  7153. for (var i = 0; i < vm.$children.length; i++) {
  7154. deactivateChildComponent(vm.$children[i]);
  7155. }
  7156. callHook(vm, 'deactivated');
  7157. }
  7158. }
  7159. function callHook (vm, hook) {
  7160. // #7573 disable dep collection when invoking lifecycle hooks
  7161. pushTarget();
  7162. var handlers = vm.$options[hook];
  7163. var info = hook + " hook";
  7164. if (handlers) {
  7165. for (var i = 0, j = handlers.length; i < j; i++) {
  7166. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7167. }
  7168. }
  7169. if (vm._hasHookEvent) {
  7170. vm.$emit('hook:' + hook);
  7171. }
  7172. popTarget();
  7173. }
  7174. /* */
  7175. var MAX_UPDATE_COUNT = 100;
  7176. var queue = [];
  7177. var activatedChildren = [];
  7178. var has = {};
  7179. var circular = {};
  7180. var waiting = false;
  7181. var flushing = false;
  7182. var index = 0;
  7183. /**
  7184. * Reset the scheduler's state.
  7185. */
  7186. function resetSchedulerState () {
  7187. index = queue.length = activatedChildren.length = 0;
  7188. has = {};
  7189. if (true) {
  7190. circular = {};
  7191. }
  7192. waiting = flushing = false;
  7193. }
  7194. // Async edge case #6566 requires saving the timestamp when event listeners are
  7195. // attached. However, calling performance.now() has a perf overhead especially
  7196. // if the page has thousands of event listeners. Instead, we take a timestamp
  7197. // every time the scheduler flushes and use that for all event listeners
  7198. // attached during that flush.
  7199. var currentFlushTimestamp = 0;
  7200. // Async edge case fix requires storing an event listener's attach timestamp.
  7201. var getNow = Date.now;
  7202. // Determine what event timestamp the browser is using. Annoyingly, the
  7203. // timestamp can either be hi-res (relative to page load) or low-res
  7204. // (relative to UNIX epoch), so in order to compare time we have to use the
  7205. // same timestamp type when saving the flush timestamp.
  7206. // All IE versions use low-res event timestamps, and have problematic clock
  7207. // implementations (#9632)
  7208. if (inBrowser && !isIE) {
  7209. var performance = window.performance;
  7210. if (
  7211. performance &&
  7212. typeof performance.now === 'function' &&
  7213. getNow() > document.createEvent('Event').timeStamp
  7214. ) {
  7215. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7216. // smaller than it, it means the event is using a hi-res timestamp,
  7217. // and we need to use the hi-res version for event listener timestamps as
  7218. // well.
  7219. getNow = function () { return performance.now(); };
  7220. }
  7221. }
  7222. /**
  7223. * Flush both queues and run the watchers.
  7224. */
  7225. function flushSchedulerQueue () {
  7226. currentFlushTimestamp = getNow();
  7227. flushing = true;
  7228. var watcher, id;
  7229. // Sort queue before flush.
  7230. // This ensures that:
  7231. // 1. Components are updated from parent to child. (because parent is always
  7232. // created before the child)
  7233. // 2. A component's user watchers are run before its render watcher (because
  7234. // user watchers are created before the render watcher)
  7235. // 3. If a component is destroyed during a parent component's watcher run,
  7236. // its watchers can be skipped.
  7237. queue.sort(function (a, b) { return a.id - b.id; });
  7238. // do not cache length because more watchers might be pushed
  7239. // as we run existing watchers
  7240. for (index = 0; index < queue.length; index++) {
  7241. watcher = queue[index];
  7242. if (watcher.before) {
  7243. watcher.before();
  7244. }
  7245. id = watcher.id;
  7246. has[id] = null;
  7247. watcher.run();
  7248. // in dev build, check and stop circular updates.
  7249. if ( true && has[id] != null) {
  7250. circular[id] = (circular[id] || 0) + 1;
  7251. if (circular[id] > MAX_UPDATE_COUNT) {
  7252. warn(
  7253. 'You may have an infinite update loop ' + (
  7254. watcher.user
  7255. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7256. : "in a component render function."
  7257. ),
  7258. watcher.vm
  7259. );
  7260. break
  7261. }
  7262. }
  7263. }
  7264. // keep copies of post queues before resetting state
  7265. var activatedQueue = activatedChildren.slice();
  7266. var updatedQueue = queue.slice();
  7267. resetSchedulerState();
  7268. // call component updated and activated hooks
  7269. callActivatedHooks(activatedQueue);
  7270. callUpdatedHooks(updatedQueue);
  7271. // devtool hook
  7272. /* istanbul ignore if */
  7273. if (devtools && config.devtools) {
  7274. devtools.emit('flush');
  7275. }
  7276. }
  7277. function callUpdatedHooks (queue) {
  7278. var i = queue.length;
  7279. while (i--) {
  7280. var watcher = queue[i];
  7281. var vm = watcher.vm;
  7282. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7283. callHook(vm, 'updated');
  7284. }
  7285. }
  7286. }
  7287. /**
  7288. * Queue a kept-alive component that was activated during patch.
  7289. * The queue will be processed after the entire tree has been patched.
  7290. */
  7291. function queueActivatedComponent (vm) {
  7292. // setting _inactive to false here so that a render function can
  7293. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7294. vm._inactive = false;
  7295. activatedChildren.push(vm);
  7296. }
  7297. function callActivatedHooks (queue) {
  7298. for (var i = 0; i < queue.length; i++) {
  7299. queue[i]._inactive = true;
  7300. activateChildComponent(queue[i], true /* true */);
  7301. }
  7302. }
  7303. /**
  7304. * Push a watcher into the watcher queue.
  7305. * Jobs with duplicate IDs will be skipped unless it's
  7306. * pushed when the queue is being flushed.
  7307. */
  7308. function queueWatcher (watcher) {
  7309. var id = watcher.id;
  7310. if (has[id] == null) {
  7311. has[id] = true;
  7312. if (!flushing) {
  7313. queue.push(watcher);
  7314. } else {
  7315. // if already flushing, splice the watcher based on its id
  7316. // if already past its id, it will be run next immediately.
  7317. var i = queue.length - 1;
  7318. while (i > index && queue[i].id > watcher.id) {
  7319. i--;
  7320. }
  7321. queue.splice(i + 1, 0, watcher);
  7322. }
  7323. // queue the flush
  7324. if (!waiting) {
  7325. waiting = true;
  7326. if ( true && !config.async) {
  7327. flushSchedulerQueue();
  7328. return
  7329. }
  7330. nextTick(flushSchedulerQueue);
  7331. }
  7332. }
  7333. }
  7334. /* */
  7335. var uid$2 = 0;
  7336. /**
  7337. * A watcher parses an expression, collects dependencies,
  7338. * and fires callback when the expression value changes.
  7339. * This is used for both the $watch() api and directives.
  7340. */
  7341. var Watcher = function Watcher (
  7342. vm,
  7343. expOrFn,
  7344. cb,
  7345. options,
  7346. isRenderWatcher
  7347. ) {
  7348. this.vm = vm;
  7349. if (isRenderWatcher) {
  7350. vm._watcher = this;
  7351. }
  7352. vm._watchers.push(this);
  7353. // options
  7354. if (options) {
  7355. this.deep = !!options.deep;
  7356. this.user = !!options.user;
  7357. this.lazy = !!options.lazy;
  7358. this.sync = !!options.sync;
  7359. this.before = options.before;
  7360. } else {
  7361. this.deep = this.user = this.lazy = this.sync = false;
  7362. }
  7363. this.cb = cb;
  7364. this.id = ++uid$2; // uid for batching
  7365. this.active = true;
  7366. this.dirty = this.lazy; // for lazy watchers
  7367. this.deps = [];
  7368. this.newDeps = [];
  7369. this.depIds = new _Set();
  7370. this.newDepIds = new _Set();
  7371. this.expression = true
  7372. ? expOrFn.toString()
  7373. : undefined;
  7374. // parse expression for getter
  7375. if (typeof expOrFn === 'function') {
  7376. this.getter = expOrFn;
  7377. } else {
  7378. this.getter = parsePath(expOrFn);
  7379. if (!this.getter) {
  7380. this.getter = noop;
  7381. true && warn(
  7382. "Failed watching path: \"" + expOrFn + "\" " +
  7383. 'Watcher only accepts simple dot-delimited paths. ' +
  7384. 'For full control, use a function instead.',
  7385. vm
  7386. );
  7387. }
  7388. }
  7389. this.value = this.lazy
  7390. ? undefined
  7391. : this.get();
  7392. };
  7393. /**
  7394. * Evaluate the getter, and re-collect dependencies.
  7395. */
  7396. Watcher.prototype.get = function get () {
  7397. pushTarget(this);
  7398. var value;
  7399. var vm = this.vm;
  7400. try {
  7401. value = this.getter.call(vm, vm);
  7402. } catch (e) {
  7403. if (this.user) {
  7404. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7405. } else {
  7406. throw e
  7407. }
  7408. } finally {
  7409. // "touch" every property so they are all tracked as
  7410. // dependencies for deep watching
  7411. if (this.deep) {
  7412. traverse(value);
  7413. }
  7414. popTarget();
  7415. this.cleanupDeps();
  7416. }
  7417. return value
  7418. };
  7419. /**
  7420. * Add a dependency to this directive.
  7421. */
  7422. Watcher.prototype.addDep = function addDep (dep) {
  7423. var id = dep.id;
  7424. if (!this.newDepIds.has(id)) {
  7425. this.newDepIds.add(id);
  7426. this.newDeps.push(dep);
  7427. if (!this.depIds.has(id)) {
  7428. dep.addSub(this);
  7429. }
  7430. }
  7431. };
  7432. /**
  7433. * Clean up for dependency collection.
  7434. */
  7435. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7436. var i = this.deps.length;
  7437. while (i--) {
  7438. var dep = this.deps[i];
  7439. if (!this.newDepIds.has(dep.id)) {
  7440. dep.removeSub(this);
  7441. }
  7442. }
  7443. var tmp = this.depIds;
  7444. this.depIds = this.newDepIds;
  7445. this.newDepIds = tmp;
  7446. this.newDepIds.clear();
  7447. tmp = this.deps;
  7448. this.deps = this.newDeps;
  7449. this.newDeps = tmp;
  7450. this.newDeps.length = 0;
  7451. };
  7452. /**
  7453. * Subscriber interface.
  7454. * Will be called when a dependency changes.
  7455. */
  7456. Watcher.prototype.update = function update () {
  7457. /* istanbul ignore else */
  7458. if (this.lazy) {
  7459. this.dirty = true;
  7460. } else if (this.sync) {
  7461. this.run();
  7462. } else {
  7463. queueWatcher(this);
  7464. }
  7465. };
  7466. /**
  7467. * Scheduler job interface.
  7468. * Will be called by the scheduler.
  7469. */
  7470. Watcher.prototype.run = function run () {
  7471. if (this.active) {
  7472. var value = this.get();
  7473. if (
  7474. value !== this.value ||
  7475. // Deep watchers and watchers on Object/Arrays should fire even
  7476. // when the value is the same, because the value may
  7477. // have mutated.
  7478. isObject(value) ||
  7479. this.deep
  7480. ) {
  7481. // set new value
  7482. var oldValue = this.value;
  7483. this.value = value;
  7484. if (this.user) {
  7485. try {
  7486. this.cb.call(this.vm, value, oldValue);
  7487. } catch (e) {
  7488. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7489. }
  7490. } else {
  7491. this.cb.call(this.vm, value, oldValue);
  7492. }
  7493. }
  7494. }
  7495. };
  7496. /**
  7497. * Evaluate the value of the watcher.
  7498. * This only gets called for lazy watchers.
  7499. */
  7500. Watcher.prototype.evaluate = function evaluate () {
  7501. this.value = this.get();
  7502. this.dirty = false;
  7503. };
  7504. /**
  7505. * Depend on all deps collected by this watcher.
  7506. */
  7507. Watcher.prototype.depend = function depend () {
  7508. var i = this.deps.length;
  7509. while (i--) {
  7510. this.deps[i].depend();
  7511. }
  7512. };
  7513. /**
  7514. * Remove self from all dependencies' subscriber list.
  7515. */
  7516. Watcher.prototype.teardown = function teardown () {
  7517. if (this.active) {
  7518. // remove self from vm's watcher list
  7519. // this is a somewhat expensive operation so we skip it
  7520. // if the vm is being destroyed.
  7521. if (!this.vm._isBeingDestroyed) {
  7522. remove(this.vm._watchers, this);
  7523. }
  7524. var i = this.deps.length;
  7525. while (i--) {
  7526. this.deps[i].removeSub(this);
  7527. }
  7528. this.active = false;
  7529. }
  7530. };
  7531. /* */
  7532. var sharedPropertyDefinition = {
  7533. enumerable: true,
  7534. configurable: true,
  7535. get: noop,
  7536. set: noop
  7537. };
  7538. function proxy (target, sourceKey, key) {
  7539. sharedPropertyDefinition.get = function proxyGetter () {
  7540. return this[sourceKey][key]
  7541. };
  7542. sharedPropertyDefinition.set = function proxySetter (val) {
  7543. this[sourceKey][key] = val;
  7544. };
  7545. Object.defineProperty(target, key, sharedPropertyDefinition);
  7546. }
  7547. function initState (vm) {
  7548. vm._watchers = [];
  7549. var opts = vm.$options;
  7550. if (opts.props) { initProps(vm, opts.props); }
  7551. if (opts.methods) { initMethods(vm, opts.methods); }
  7552. if (opts.data) {
  7553. initData(vm);
  7554. } else {
  7555. observe(vm._data = {}, true /* asRootData */);
  7556. }
  7557. if (opts.computed) { initComputed(vm, opts.computed); }
  7558. if (opts.watch && opts.watch !== nativeWatch) {
  7559. initWatch(vm, opts.watch);
  7560. }
  7561. }
  7562. function initProps (vm, propsOptions) {
  7563. var propsData = vm.$options.propsData || {};
  7564. var props = vm._props = {};
  7565. // cache prop keys so that future props updates can iterate using Array
  7566. // instead of dynamic object key enumeration.
  7567. var keys = vm.$options._propKeys = [];
  7568. var isRoot = !vm.$parent;
  7569. // root instance props should be converted
  7570. if (!isRoot) {
  7571. toggleObserving(false);
  7572. }
  7573. var loop = function ( key ) {
  7574. keys.push(key);
  7575. var value = validateProp(key, propsOptions, propsData, vm);
  7576. /* istanbul ignore else */
  7577. if (true) {
  7578. var hyphenatedKey = hyphenate(key);
  7579. if (isReservedAttribute(hyphenatedKey) ||
  7580. config.isReservedAttr(hyphenatedKey)) {
  7581. warn(
  7582. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7583. vm
  7584. );
  7585. }
  7586. defineReactive$$1(props, key, value, function () {
  7587. if (!isRoot && !isUpdatingChildComponent) {
  7588. {
  7589. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  7590. return
  7591. }
  7592. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7593. if(
  7594. key === 'value' &&
  7595. Array.isArray(vm.$options.behaviors) &&
  7596. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7597. ){
  7598. return
  7599. }
  7600. if(vm._getFormData){
  7601. return
  7602. }
  7603. var $parent = vm.$parent;
  7604. while($parent){
  7605. if($parent.__next_tick_pending){
  7606. return
  7607. }
  7608. $parent = $parent.$parent;
  7609. }
  7610. }
  7611. warn(
  7612. "Avoid mutating a prop directly since the value will be " +
  7613. "overwritten whenever the parent component re-renders. " +
  7614. "Instead, use a data or computed property based on the prop's " +
  7615. "value. Prop being mutated: \"" + key + "\"",
  7616. vm
  7617. );
  7618. }
  7619. });
  7620. } else {}
  7621. // static props are already proxied on the component's prototype
  7622. // during Vue.extend(). We only need to proxy props defined at
  7623. // instantiation here.
  7624. if (!(key in vm)) {
  7625. proxy(vm, "_props", key);
  7626. }
  7627. };
  7628. for (var key in propsOptions) loop( key );
  7629. toggleObserving(true);
  7630. }
  7631. function initData (vm) {
  7632. var data = vm.$options.data;
  7633. data = vm._data = typeof data === 'function'
  7634. ? getData(data, vm)
  7635. : data || {};
  7636. if (!isPlainObject(data)) {
  7637. data = {};
  7638. true && warn(
  7639. 'data functions should return an object:\n' +
  7640. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7641. vm
  7642. );
  7643. }
  7644. // proxy data on instance
  7645. var keys = Object.keys(data);
  7646. var props = vm.$options.props;
  7647. var methods = vm.$options.methods;
  7648. var i = keys.length;
  7649. while (i--) {
  7650. var key = keys[i];
  7651. if (true) {
  7652. if (methods && hasOwn(methods, key)) {
  7653. warn(
  7654. ("Method \"" + key + "\" has already been defined as a data property."),
  7655. vm
  7656. );
  7657. }
  7658. }
  7659. if (props && hasOwn(props, key)) {
  7660. true && warn(
  7661. "The data property \"" + key + "\" is already declared as a prop. " +
  7662. "Use prop default value instead.",
  7663. vm
  7664. );
  7665. } else if (!isReserved(key)) {
  7666. proxy(vm, "_data", key);
  7667. }
  7668. }
  7669. // observe data
  7670. observe(data, true /* asRootData */);
  7671. }
  7672. function getData (data, vm) {
  7673. // #7573 disable dep collection when invoking data getters
  7674. pushTarget();
  7675. try {
  7676. return data.call(vm, vm)
  7677. } catch (e) {
  7678. handleError(e, vm, "data()");
  7679. return {}
  7680. } finally {
  7681. popTarget();
  7682. }
  7683. }
  7684. var computedWatcherOptions = { lazy: true };
  7685. function initComputed (vm, computed) {
  7686. // $flow-disable-line
  7687. var watchers = vm._computedWatchers = Object.create(null);
  7688. // computed properties are just getters during SSR
  7689. var isSSR = isServerRendering();
  7690. for (var key in computed) {
  7691. var userDef = computed[key];
  7692. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7693. if ( true && getter == null) {
  7694. warn(
  7695. ("Getter is missing for computed property \"" + key + "\"."),
  7696. vm
  7697. );
  7698. }
  7699. if (!isSSR) {
  7700. // create internal watcher for the computed property.
  7701. watchers[key] = new Watcher(
  7702. vm,
  7703. getter || noop,
  7704. noop,
  7705. computedWatcherOptions
  7706. );
  7707. }
  7708. // component-defined computed properties are already defined on the
  7709. // component prototype. We only need to define computed properties defined
  7710. // at instantiation here.
  7711. if (!(key in vm)) {
  7712. defineComputed(vm, key, userDef);
  7713. } else if (true) {
  7714. if (key in vm.$data) {
  7715. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7716. } else if (vm.$options.props && key in vm.$options.props) {
  7717. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7718. }
  7719. }
  7720. }
  7721. }
  7722. function defineComputed (
  7723. target,
  7724. key,
  7725. userDef
  7726. ) {
  7727. var shouldCache = !isServerRendering();
  7728. if (typeof userDef === 'function') {
  7729. sharedPropertyDefinition.get = shouldCache
  7730. ? createComputedGetter(key)
  7731. : createGetterInvoker(userDef);
  7732. sharedPropertyDefinition.set = noop;
  7733. } else {
  7734. sharedPropertyDefinition.get = userDef.get
  7735. ? shouldCache && userDef.cache !== false
  7736. ? createComputedGetter(key)
  7737. : createGetterInvoker(userDef.get)
  7738. : noop;
  7739. sharedPropertyDefinition.set = userDef.set || noop;
  7740. }
  7741. if ( true &&
  7742. sharedPropertyDefinition.set === noop) {
  7743. sharedPropertyDefinition.set = function () {
  7744. warn(
  7745. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7746. this
  7747. );
  7748. };
  7749. }
  7750. Object.defineProperty(target, key, sharedPropertyDefinition);
  7751. }
  7752. function createComputedGetter (key) {
  7753. return function computedGetter () {
  7754. var watcher = this._computedWatchers && this._computedWatchers[key];
  7755. if (watcher) {
  7756. if (watcher.dirty) {
  7757. watcher.evaluate();
  7758. }
  7759. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7760. watcher.depend();
  7761. }
  7762. return watcher.value
  7763. }
  7764. }
  7765. }
  7766. function createGetterInvoker(fn) {
  7767. return function computedGetter () {
  7768. return fn.call(this, this)
  7769. }
  7770. }
  7771. function initMethods (vm, methods) {
  7772. var props = vm.$options.props;
  7773. for (var key in methods) {
  7774. if (true) {
  7775. if (typeof methods[key] !== 'function') {
  7776. warn(
  7777. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7778. "Did you reference the function correctly?",
  7779. vm
  7780. );
  7781. }
  7782. if (props && hasOwn(props, key)) {
  7783. warn(
  7784. ("Method \"" + key + "\" has already been defined as a prop."),
  7785. vm
  7786. );
  7787. }
  7788. if ((key in vm) && isReserved(key)) {
  7789. warn(
  7790. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7791. "Avoid defining component methods that start with _ or $."
  7792. );
  7793. }
  7794. }
  7795. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7796. }
  7797. }
  7798. function initWatch (vm, watch) {
  7799. for (var key in watch) {
  7800. var handler = watch[key];
  7801. if (Array.isArray(handler)) {
  7802. for (var i = 0; i < handler.length; i++) {
  7803. createWatcher(vm, key, handler[i]);
  7804. }
  7805. } else {
  7806. createWatcher(vm, key, handler);
  7807. }
  7808. }
  7809. }
  7810. function createWatcher (
  7811. vm,
  7812. expOrFn,
  7813. handler,
  7814. options
  7815. ) {
  7816. if (isPlainObject(handler)) {
  7817. options = handler;
  7818. handler = handler.handler;
  7819. }
  7820. if (typeof handler === 'string') {
  7821. handler = vm[handler];
  7822. }
  7823. return vm.$watch(expOrFn, handler, options)
  7824. }
  7825. function stateMixin (Vue) {
  7826. // flow somehow has problems with directly declared definition object
  7827. // when using Object.defineProperty, so we have to procedurally build up
  7828. // the object here.
  7829. var dataDef = {};
  7830. dataDef.get = function () { return this._data };
  7831. var propsDef = {};
  7832. propsDef.get = function () { return this._props };
  7833. if (true) {
  7834. dataDef.set = function () {
  7835. warn(
  7836. 'Avoid replacing instance root $data. ' +
  7837. 'Use nested data properties instead.',
  7838. this
  7839. );
  7840. };
  7841. propsDef.set = function () {
  7842. warn("$props is readonly.", this);
  7843. };
  7844. }
  7845. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7846. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7847. Vue.prototype.$set = set;
  7848. Vue.prototype.$delete = del;
  7849. Vue.prototype.$watch = function (
  7850. expOrFn,
  7851. cb,
  7852. options
  7853. ) {
  7854. var vm = this;
  7855. if (isPlainObject(cb)) {
  7856. return createWatcher(vm, expOrFn, cb, options)
  7857. }
  7858. options = options || {};
  7859. options.user = true;
  7860. var watcher = new Watcher(vm, expOrFn, cb, options);
  7861. if (options.immediate) {
  7862. try {
  7863. cb.call(vm, watcher.value);
  7864. } catch (error) {
  7865. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7866. }
  7867. }
  7868. return function unwatchFn () {
  7869. watcher.teardown();
  7870. }
  7871. };
  7872. }
  7873. /* */
  7874. var uid$3 = 0;
  7875. function initMixin (Vue) {
  7876. Vue.prototype._init = function (options) {
  7877. var vm = this;
  7878. // a uid
  7879. vm._uid = uid$3++;
  7880. var startTag, endTag;
  7881. /* istanbul ignore if */
  7882. if ( true && config.performance && mark) {
  7883. startTag = "vue-perf-start:" + (vm._uid);
  7884. endTag = "vue-perf-end:" + (vm._uid);
  7885. mark(startTag);
  7886. }
  7887. // a flag to avoid this being observed
  7888. vm._isVue = true;
  7889. // merge options
  7890. if (options && options._isComponent) {
  7891. // optimize internal component instantiation
  7892. // since dynamic options merging is pretty slow, and none of the
  7893. // internal component options needs special treatment.
  7894. initInternalComponent(vm, options);
  7895. } else {
  7896. vm.$options = mergeOptions(
  7897. resolveConstructorOptions(vm.constructor),
  7898. options || {},
  7899. vm
  7900. );
  7901. }
  7902. /* istanbul ignore else */
  7903. if (true) {
  7904. initProxy(vm);
  7905. } else {}
  7906. // expose real self
  7907. vm._self = vm;
  7908. initLifecycle(vm);
  7909. initEvents(vm);
  7910. initRender(vm);
  7911. callHook(vm, 'beforeCreate');
  7912. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7913. initState(vm);
  7914. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7915. !vm._$fallback && callHook(vm, 'created');
  7916. /* istanbul ignore if */
  7917. if ( true && config.performance && mark) {
  7918. vm._name = formatComponentName(vm, false);
  7919. mark(endTag);
  7920. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7921. }
  7922. if (vm.$options.el) {
  7923. vm.$mount(vm.$options.el);
  7924. }
  7925. };
  7926. }
  7927. function initInternalComponent (vm, options) {
  7928. var opts = vm.$options = Object.create(vm.constructor.options);
  7929. // doing this because it's faster than dynamic enumeration.
  7930. var parentVnode = options._parentVnode;
  7931. opts.parent = options.parent;
  7932. opts._parentVnode = parentVnode;
  7933. var vnodeComponentOptions = parentVnode.componentOptions;
  7934. opts.propsData = vnodeComponentOptions.propsData;
  7935. opts._parentListeners = vnodeComponentOptions.listeners;
  7936. opts._renderChildren = vnodeComponentOptions.children;
  7937. opts._componentTag = vnodeComponentOptions.tag;
  7938. if (options.render) {
  7939. opts.render = options.render;
  7940. opts.staticRenderFns = options.staticRenderFns;
  7941. }
  7942. }
  7943. function resolveConstructorOptions (Ctor) {
  7944. var options = Ctor.options;
  7945. if (Ctor.super) {
  7946. var superOptions = resolveConstructorOptions(Ctor.super);
  7947. var cachedSuperOptions = Ctor.superOptions;
  7948. if (superOptions !== cachedSuperOptions) {
  7949. // super option changed,
  7950. // need to resolve new options.
  7951. Ctor.superOptions = superOptions;
  7952. // check if there are any late-modified/attached options (#4976)
  7953. var modifiedOptions = resolveModifiedOptions(Ctor);
  7954. // update base extend options
  7955. if (modifiedOptions) {
  7956. extend(Ctor.extendOptions, modifiedOptions);
  7957. }
  7958. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7959. if (options.name) {
  7960. options.components[options.name] = Ctor;
  7961. }
  7962. }
  7963. }
  7964. return options
  7965. }
  7966. function resolveModifiedOptions (Ctor) {
  7967. var modified;
  7968. var latest = Ctor.options;
  7969. var sealed = Ctor.sealedOptions;
  7970. for (var key in latest) {
  7971. if (latest[key] !== sealed[key]) {
  7972. if (!modified) { modified = {}; }
  7973. modified[key] = latest[key];
  7974. }
  7975. }
  7976. return modified
  7977. }
  7978. function Vue (options) {
  7979. if ( true &&
  7980. !(this instanceof Vue)
  7981. ) {
  7982. warn('Vue is a constructor and should be called with the `new` keyword');
  7983. }
  7984. this._init(options);
  7985. }
  7986. initMixin(Vue);
  7987. stateMixin(Vue);
  7988. eventsMixin(Vue);
  7989. lifecycleMixin(Vue);
  7990. renderMixin(Vue);
  7991. /* */
  7992. function initUse (Vue) {
  7993. Vue.use = function (plugin) {
  7994. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7995. if (installedPlugins.indexOf(plugin) > -1) {
  7996. return this
  7997. }
  7998. // additional parameters
  7999. var args = toArray(arguments, 1);
  8000. args.unshift(this);
  8001. if (typeof plugin.install === 'function') {
  8002. plugin.install.apply(plugin, args);
  8003. } else if (typeof plugin === 'function') {
  8004. plugin.apply(null, args);
  8005. }
  8006. installedPlugins.push(plugin);
  8007. return this
  8008. };
  8009. }
  8010. /* */
  8011. function initMixin$1 (Vue) {
  8012. Vue.mixin = function (mixin) {
  8013. this.options = mergeOptions(this.options, mixin);
  8014. return this
  8015. };
  8016. }
  8017. /* */
  8018. function initExtend (Vue) {
  8019. /**
  8020. * Each instance constructor, including Vue, has a unique
  8021. * cid. This enables us to create wrapped "child
  8022. * constructors" for prototypal inheritance and cache them.
  8023. */
  8024. Vue.cid = 0;
  8025. var cid = 1;
  8026. /**
  8027. * Class inheritance
  8028. */
  8029. Vue.extend = function (extendOptions) {
  8030. extendOptions = extendOptions || {};
  8031. var Super = this;
  8032. var SuperId = Super.cid;
  8033. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  8034. if (cachedCtors[SuperId]) {
  8035. return cachedCtors[SuperId]
  8036. }
  8037. var name = extendOptions.name || Super.options.name;
  8038. if ( true && name) {
  8039. validateComponentName(name);
  8040. }
  8041. var Sub = function VueComponent (options) {
  8042. this._init(options);
  8043. };
  8044. Sub.prototype = Object.create(Super.prototype);
  8045. Sub.prototype.constructor = Sub;
  8046. Sub.cid = cid++;
  8047. Sub.options = mergeOptions(
  8048. Super.options,
  8049. extendOptions
  8050. );
  8051. Sub['super'] = Super;
  8052. // For props and computed properties, we define the proxy getters on
  8053. // the Vue instances at extension time, on the extended prototype. This
  8054. // avoids Object.defineProperty calls for each instance created.
  8055. if (Sub.options.props) {
  8056. initProps$1(Sub);
  8057. }
  8058. if (Sub.options.computed) {
  8059. initComputed$1(Sub);
  8060. }
  8061. // allow further extension/mixin/plugin usage
  8062. Sub.extend = Super.extend;
  8063. Sub.mixin = Super.mixin;
  8064. Sub.use = Super.use;
  8065. // create asset registers, so extended classes
  8066. // can have their private assets too.
  8067. ASSET_TYPES.forEach(function (type) {
  8068. Sub[type] = Super[type];
  8069. });
  8070. // enable recursive self-lookup
  8071. if (name) {
  8072. Sub.options.components[name] = Sub;
  8073. }
  8074. // keep a reference to the super options at extension time.
  8075. // later at instantiation we can check if Super's options have
  8076. // been updated.
  8077. Sub.superOptions = Super.options;
  8078. Sub.extendOptions = extendOptions;
  8079. Sub.sealedOptions = extend({}, Sub.options);
  8080. // cache constructor
  8081. cachedCtors[SuperId] = Sub;
  8082. return Sub
  8083. };
  8084. }
  8085. function initProps$1 (Comp) {
  8086. var props = Comp.options.props;
  8087. for (var key in props) {
  8088. proxy(Comp.prototype, "_props", key);
  8089. }
  8090. }
  8091. function initComputed$1 (Comp) {
  8092. var computed = Comp.options.computed;
  8093. for (var key in computed) {
  8094. defineComputed(Comp.prototype, key, computed[key]);
  8095. }
  8096. }
  8097. /* */
  8098. function initAssetRegisters (Vue) {
  8099. /**
  8100. * Create asset registration methods.
  8101. */
  8102. ASSET_TYPES.forEach(function (type) {
  8103. Vue[type] = function (
  8104. id,
  8105. definition
  8106. ) {
  8107. if (!definition) {
  8108. return this.options[type + 's'][id]
  8109. } else {
  8110. /* istanbul ignore if */
  8111. if ( true && type === 'component') {
  8112. validateComponentName(id);
  8113. }
  8114. if (type === 'component' && isPlainObject(definition)) {
  8115. definition.name = definition.name || id;
  8116. definition = this.options._base.extend(definition);
  8117. }
  8118. if (type === 'directive' && typeof definition === 'function') {
  8119. definition = { bind: definition, update: definition };
  8120. }
  8121. this.options[type + 's'][id] = definition;
  8122. return definition
  8123. }
  8124. };
  8125. });
  8126. }
  8127. /* */
  8128. function getComponentName (opts) {
  8129. return opts && (opts.Ctor.options.name || opts.tag)
  8130. }
  8131. function matches (pattern, name) {
  8132. if (Array.isArray(pattern)) {
  8133. return pattern.indexOf(name) > -1
  8134. } else if (typeof pattern === 'string') {
  8135. return pattern.split(',').indexOf(name) > -1
  8136. } else if (isRegExp(pattern)) {
  8137. return pattern.test(name)
  8138. }
  8139. /* istanbul ignore next */
  8140. return false
  8141. }
  8142. function pruneCache (keepAliveInstance, filter) {
  8143. var cache = keepAliveInstance.cache;
  8144. var keys = keepAliveInstance.keys;
  8145. var _vnode = keepAliveInstance._vnode;
  8146. for (var key in cache) {
  8147. var cachedNode = cache[key];
  8148. if (cachedNode) {
  8149. var name = getComponentName(cachedNode.componentOptions);
  8150. if (name && !filter(name)) {
  8151. pruneCacheEntry(cache, key, keys, _vnode);
  8152. }
  8153. }
  8154. }
  8155. }
  8156. function pruneCacheEntry (
  8157. cache,
  8158. key,
  8159. keys,
  8160. current
  8161. ) {
  8162. var cached$$1 = cache[key];
  8163. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8164. cached$$1.componentInstance.$destroy();
  8165. }
  8166. cache[key] = null;
  8167. remove(keys, key);
  8168. }
  8169. var patternTypes = [String, RegExp, Array];
  8170. var KeepAlive = {
  8171. name: 'keep-alive',
  8172. abstract: true,
  8173. props: {
  8174. include: patternTypes,
  8175. exclude: patternTypes,
  8176. max: [String, Number]
  8177. },
  8178. created: function created () {
  8179. this.cache = Object.create(null);
  8180. this.keys = [];
  8181. },
  8182. destroyed: function destroyed () {
  8183. for (var key in this.cache) {
  8184. pruneCacheEntry(this.cache, key, this.keys);
  8185. }
  8186. },
  8187. mounted: function mounted () {
  8188. var this$1 = this;
  8189. this.$watch('include', function (val) {
  8190. pruneCache(this$1, function (name) { return matches(val, name); });
  8191. });
  8192. this.$watch('exclude', function (val) {
  8193. pruneCache(this$1, function (name) { return !matches(val, name); });
  8194. });
  8195. },
  8196. render: function render () {
  8197. var slot = this.$slots.default;
  8198. var vnode = getFirstComponentChild(slot);
  8199. var componentOptions = vnode && vnode.componentOptions;
  8200. if (componentOptions) {
  8201. // check pattern
  8202. var name = getComponentName(componentOptions);
  8203. var ref = this;
  8204. var include = ref.include;
  8205. var exclude = ref.exclude;
  8206. if (
  8207. // not included
  8208. (include && (!name || !matches(include, name))) ||
  8209. // excluded
  8210. (exclude && name && matches(exclude, name))
  8211. ) {
  8212. return vnode
  8213. }
  8214. var ref$1 = this;
  8215. var cache = ref$1.cache;
  8216. var keys = ref$1.keys;
  8217. var key = vnode.key == null
  8218. // same constructor may get registered as different local components
  8219. // so cid alone is not enough (#3269)
  8220. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8221. : vnode.key;
  8222. if (cache[key]) {
  8223. vnode.componentInstance = cache[key].componentInstance;
  8224. // make current key freshest
  8225. remove(keys, key);
  8226. keys.push(key);
  8227. } else {
  8228. cache[key] = vnode;
  8229. keys.push(key);
  8230. // prune oldest entry
  8231. if (this.max && keys.length > parseInt(this.max)) {
  8232. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8233. }
  8234. }
  8235. vnode.data.keepAlive = true;
  8236. }
  8237. return vnode || (slot && slot[0])
  8238. }
  8239. };
  8240. var builtInComponents = {
  8241. KeepAlive: KeepAlive
  8242. };
  8243. /* */
  8244. function initGlobalAPI (Vue) {
  8245. // config
  8246. var configDef = {};
  8247. configDef.get = function () { return config; };
  8248. if (true) {
  8249. configDef.set = function () {
  8250. warn(
  8251. 'Do not replace the Vue.config object, set individual fields instead.'
  8252. );
  8253. };
  8254. }
  8255. Object.defineProperty(Vue, 'config', configDef);
  8256. // exposed util methods.
  8257. // NOTE: these are not considered part of the public API - avoid relying on
  8258. // them unless you are aware of the risk.
  8259. Vue.util = {
  8260. warn: warn,
  8261. extend: extend,
  8262. mergeOptions: mergeOptions,
  8263. defineReactive: defineReactive$$1
  8264. };
  8265. Vue.set = set;
  8266. Vue.delete = del;
  8267. Vue.nextTick = nextTick;
  8268. // 2.6 explicit observable API
  8269. Vue.observable = function (obj) {
  8270. observe(obj);
  8271. return obj
  8272. };
  8273. Vue.options = Object.create(null);
  8274. ASSET_TYPES.forEach(function (type) {
  8275. Vue.options[type + 's'] = Object.create(null);
  8276. });
  8277. // this is used to identify the "base" constructor to extend all plain-object
  8278. // components with in Weex's multi-instance scenarios.
  8279. Vue.options._base = Vue;
  8280. extend(Vue.options.components, builtInComponents);
  8281. initUse(Vue);
  8282. initMixin$1(Vue);
  8283. initExtend(Vue);
  8284. initAssetRegisters(Vue);
  8285. }
  8286. initGlobalAPI(Vue);
  8287. Object.defineProperty(Vue.prototype, '$isServer', {
  8288. get: isServerRendering
  8289. });
  8290. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8291. get: function get () {
  8292. /* istanbul ignore next */
  8293. return this.$vnode && this.$vnode.ssrContext
  8294. }
  8295. });
  8296. // expose FunctionalRenderContext for ssr runtime helper installation
  8297. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8298. value: FunctionalRenderContext
  8299. });
  8300. Vue.version = '2.6.11';
  8301. /**
  8302. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8303. */
  8304. var ARRAYTYPE = '[object Array]';
  8305. var OBJECTTYPE = '[object Object]';
  8306. var NULLTYPE = '[object Null]';
  8307. var UNDEFINEDTYPE = '[object Undefined]';
  8308. // const FUNCTIONTYPE = '[object Function]'
  8309. function diff(current, pre) {
  8310. var result = {};
  8311. syncKeys(current, pre);
  8312. _diff(current, pre, '', result);
  8313. return result
  8314. }
  8315. function syncKeys(current, pre) {
  8316. if (current === pre) { return }
  8317. var rootCurrentType = type(current);
  8318. var rootPreType = type(pre);
  8319. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8320. if(Object.keys(current).length >= Object.keys(pre).length){
  8321. for (var key in pre) {
  8322. var currentValue = current[key];
  8323. if (currentValue === undefined) {
  8324. current[key] = null;
  8325. } else {
  8326. syncKeys(currentValue, pre[key]);
  8327. }
  8328. }
  8329. }
  8330. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8331. if (current.length >= pre.length) {
  8332. pre.forEach(function (item, index) {
  8333. syncKeys(current[index], item);
  8334. });
  8335. }
  8336. }
  8337. }
  8338. function nullOrUndefined(currentType, preType) {
  8339. if(
  8340. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8341. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8342. ) {
  8343. return false
  8344. }
  8345. return true
  8346. }
  8347. function _diff(current, pre, path, result) {
  8348. if (current === pre) { return }
  8349. var rootCurrentType = type(current);
  8350. var rootPreType = type(pre);
  8351. if (rootCurrentType == OBJECTTYPE) {
  8352. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8353. setResult(result, path, current);
  8354. } else {
  8355. var loop = function ( key ) {
  8356. var currentValue = current[key];
  8357. var preValue = pre[key];
  8358. var currentType = type(currentValue);
  8359. var preType = type(preValue);
  8360. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8361. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8362. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8363. }
  8364. } else if (currentType == ARRAYTYPE) {
  8365. if (preType != ARRAYTYPE) {
  8366. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8367. } else {
  8368. if (currentValue.length < preValue.length) {
  8369. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8370. } else {
  8371. currentValue.forEach(function (item, index) {
  8372. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8373. });
  8374. }
  8375. }
  8376. } else if (currentType == OBJECTTYPE) {
  8377. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8378. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8379. } else {
  8380. for (var subKey in currentValue) {
  8381. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8382. }
  8383. }
  8384. }
  8385. };
  8386. for (var key in current) loop( key );
  8387. }
  8388. } else if (rootCurrentType == ARRAYTYPE) {
  8389. if (rootPreType != ARRAYTYPE) {
  8390. setResult(result, path, current);
  8391. } else {
  8392. if (current.length < pre.length) {
  8393. setResult(result, path, current);
  8394. } else {
  8395. current.forEach(function (item, index) {
  8396. _diff(item, pre[index], path + '[' + index + ']', result);
  8397. });
  8398. }
  8399. }
  8400. } else {
  8401. setResult(result, path, current);
  8402. }
  8403. }
  8404. function setResult(result, k, v) {
  8405. // if (type(v) != FUNCTIONTYPE) {
  8406. result[k] = v;
  8407. // }
  8408. }
  8409. function type(obj) {
  8410. return Object.prototype.toString.call(obj)
  8411. }
  8412. /* */
  8413. function flushCallbacks$1(vm) {
  8414. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8415. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"project3","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8416. var mpInstance = vm.$scope;
  8417. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8418. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8419. }
  8420. var copies = vm.__next_tick_callbacks.slice(0);
  8421. vm.__next_tick_callbacks.length = 0;
  8422. for (var i = 0; i < copies.length; i++) {
  8423. copies[i]();
  8424. }
  8425. }
  8426. }
  8427. function hasRenderWatcher(vm) {
  8428. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8429. }
  8430. function nextTick$1(vm, cb) {
  8431. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8432. //2.nextTick 之前存在 render watcher
  8433. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8434. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"project3","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8435. var mpInstance = vm.$scope;
  8436. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8437. ']:nextVueTick');
  8438. }
  8439. return nextTick(cb, vm)
  8440. }else{
  8441. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"project3","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8442. var mpInstance$1 = vm.$scope;
  8443. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8444. ']:nextMPTick');
  8445. }
  8446. }
  8447. var _resolve;
  8448. if (!vm.__next_tick_callbacks) {
  8449. vm.__next_tick_callbacks = [];
  8450. }
  8451. vm.__next_tick_callbacks.push(function () {
  8452. if (cb) {
  8453. try {
  8454. cb.call(vm);
  8455. } catch (e) {
  8456. handleError(e, vm, 'nextTick');
  8457. }
  8458. } else if (_resolve) {
  8459. _resolve(vm);
  8460. }
  8461. });
  8462. // $flow-disable-line
  8463. if (!cb && typeof Promise !== 'undefined') {
  8464. return new Promise(function (resolve) {
  8465. _resolve = resolve;
  8466. })
  8467. }
  8468. }
  8469. /* */
  8470. function clearInstance(key, value) {
  8471. // 简易去除 Vue 和小程序组件实例
  8472. if (value) {
  8473. if (value._isVue || value.__v_isMPComponent) {
  8474. return {}
  8475. }
  8476. }
  8477. return value
  8478. }
  8479. function cloneWithData(vm) {
  8480. // 确保当前 vm 所有数据被同步
  8481. var ret = Object.create(null);
  8482. var dataKeys = [].concat(
  8483. Object.keys(vm._data || {}),
  8484. Object.keys(vm._computedWatchers || {}));
  8485. dataKeys.reduce(function(ret, key) {
  8486. ret[key] = vm[key];
  8487. return ret
  8488. }, ret);
  8489. // vue-composition-api
  8490. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8491. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8492. if (rawBindings) {
  8493. Object.keys(rawBindings).forEach(function (key) {
  8494. ret[key] = vm[key];
  8495. });
  8496. }
  8497. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8498. Object.assign(ret, vm.$mp.data || {});
  8499. if (
  8500. Array.isArray(vm.$options.behaviors) &&
  8501. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8502. ) { //form-field
  8503. ret['name'] = vm.name;
  8504. ret['value'] = vm.value;
  8505. }
  8506. return JSON.parse(JSON.stringify(ret, clearInstance))
  8507. }
  8508. var patch = function(oldVnode, vnode) {
  8509. var this$1 = this;
  8510. if (vnode === null) { //destroy
  8511. return
  8512. }
  8513. if (this.mpType === 'page' || this.mpType === 'component') {
  8514. var mpInstance = this.$scope;
  8515. var data = Object.create(null);
  8516. try {
  8517. data = cloneWithData(this);
  8518. } catch (err) {
  8519. console.error(err);
  8520. }
  8521. data.__webviewId__ = mpInstance.data.__webviewId__;
  8522. var mpData = Object.create(null);
  8523. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8524. mpData[key] = mpInstance.data[key];
  8525. });
  8526. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8527. if (Object.keys(diffData).length) {
  8528. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"project3","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8529. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8530. ']差量更新',
  8531. JSON.stringify(diffData));
  8532. }
  8533. this.__next_tick_pending = true;
  8534. mpInstance.setData(diffData, function () {
  8535. this$1.__next_tick_pending = false;
  8536. flushCallbacks$1(this$1);
  8537. });
  8538. } else {
  8539. flushCallbacks$1(this);
  8540. }
  8541. }
  8542. };
  8543. /* */
  8544. function createEmptyRender() {
  8545. }
  8546. function mountComponent$1(
  8547. vm,
  8548. el,
  8549. hydrating
  8550. ) {
  8551. if (!vm.mpType) {//main.js 中的 new Vue
  8552. return vm
  8553. }
  8554. if (vm.mpType === 'app') {
  8555. vm.$options.render = createEmptyRender;
  8556. }
  8557. if (!vm.$options.render) {
  8558. vm.$options.render = createEmptyRender;
  8559. if (true) {
  8560. /* istanbul ignore if */
  8561. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8562. vm.$options.el || el) {
  8563. warn(
  8564. 'You are using the runtime-only build of Vue where the template ' +
  8565. 'compiler is not available. Either pre-compile the templates into ' +
  8566. 'render functions, or use the compiler-included build.',
  8567. vm
  8568. );
  8569. } else {
  8570. warn(
  8571. 'Failed to mount component: template or render function not defined.',
  8572. vm
  8573. );
  8574. }
  8575. }
  8576. }
  8577. !vm._$fallback && callHook(vm, 'beforeMount');
  8578. var updateComponent = function () {
  8579. vm._update(vm._render(), hydrating);
  8580. };
  8581. // we set this to vm._watcher inside the watcher's constructor
  8582. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8583. // component's mounted hook), which relies on vm._watcher being already defined
  8584. new Watcher(vm, updateComponent, noop, {
  8585. before: function before() {
  8586. if (vm._isMounted && !vm._isDestroyed) {
  8587. callHook(vm, 'beforeUpdate');
  8588. }
  8589. }
  8590. }, true /* isRenderWatcher */);
  8591. hydrating = false;
  8592. return vm
  8593. }
  8594. /* */
  8595. function renderClass (
  8596. staticClass,
  8597. dynamicClass
  8598. ) {
  8599. if (isDef(staticClass) || isDef(dynamicClass)) {
  8600. return concat(staticClass, stringifyClass(dynamicClass))
  8601. }
  8602. /* istanbul ignore next */
  8603. return ''
  8604. }
  8605. function concat (a, b) {
  8606. return a ? b ? (a + ' ' + b) : a : (b || '')
  8607. }
  8608. function stringifyClass (value) {
  8609. if (Array.isArray(value)) {
  8610. return stringifyArray(value)
  8611. }
  8612. if (isObject(value)) {
  8613. return stringifyObject(value)
  8614. }
  8615. if (typeof value === 'string') {
  8616. return value
  8617. }
  8618. /* istanbul ignore next */
  8619. return ''
  8620. }
  8621. function stringifyArray (value) {
  8622. var res = '';
  8623. var stringified;
  8624. for (var i = 0, l = value.length; i < l; i++) {
  8625. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8626. if (res) { res += ' '; }
  8627. res += stringified;
  8628. }
  8629. }
  8630. return res
  8631. }
  8632. function stringifyObject (value) {
  8633. var res = '';
  8634. for (var key in value) {
  8635. if (value[key]) {
  8636. if (res) { res += ' '; }
  8637. res += key;
  8638. }
  8639. }
  8640. return res
  8641. }
  8642. /* */
  8643. var parseStyleText = cached(function (cssText) {
  8644. var res = {};
  8645. var listDelimiter = /;(?![^(]*\))/g;
  8646. var propertyDelimiter = /:(.+)/;
  8647. cssText.split(listDelimiter).forEach(function (item) {
  8648. if (item) {
  8649. var tmp = item.split(propertyDelimiter);
  8650. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8651. }
  8652. });
  8653. return res
  8654. });
  8655. // normalize possible array / string values into Object
  8656. function normalizeStyleBinding (bindingStyle) {
  8657. if (Array.isArray(bindingStyle)) {
  8658. return toObject(bindingStyle)
  8659. }
  8660. if (typeof bindingStyle === 'string') {
  8661. return parseStyleText(bindingStyle)
  8662. }
  8663. return bindingStyle
  8664. }
  8665. /* */
  8666. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8667. function getTarget(obj, path) {
  8668. var parts = path.split('.');
  8669. var key = parts[0];
  8670. if (key.indexOf('__$n') === 0) { //number index
  8671. key = parseInt(key.replace('__$n', ''));
  8672. }
  8673. if (parts.length === 1) {
  8674. return obj[key]
  8675. }
  8676. return getTarget(obj[key], parts.slice(1).join('.'))
  8677. }
  8678. function internalMixin(Vue) {
  8679. Vue.config.errorHandler = function(err, vm, info) {
  8680. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8681. console.error(err);
  8682. /* eslint-disable no-undef */
  8683. var app = typeof getApp === 'function' && getApp();
  8684. if (app && app.onError) {
  8685. app.onError(err);
  8686. }
  8687. };
  8688. var oldEmit = Vue.prototype.$emit;
  8689. Vue.prototype.$emit = function(event) {
  8690. if (this.$scope && event) {
  8691. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  8692. if (triggerEvent) {
  8693. try {
  8694. triggerEvent.call(this.$scope, event, {
  8695. __args__: toArray(arguments, 1)
  8696. });
  8697. } catch (error) {
  8698. }
  8699. }
  8700. }
  8701. return oldEmit.apply(this, arguments)
  8702. };
  8703. Vue.prototype.$nextTick = function(fn) {
  8704. return nextTick$1(this, fn)
  8705. };
  8706. MP_METHODS.forEach(function (method) {
  8707. Vue.prototype[method] = function(args) {
  8708. if (this.$scope && this.$scope[method]) {
  8709. return this.$scope[method](args)
  8710. }
  8711. // mp-alipay
  8712. if (typeof my === 'undefined') {
  8713. return
  8714. }
  8715. if (method === 'createSelectorQuery') {
  8716. /* eslint-disable no-undef */
  8717. return my.createSelectorQuery(args)
  8718. } else if (method === 'createIntersectionObserver') {
  8719. /* eslint-disable no-undef */
  8720. return my.createIntersectionObserver(args)
  8721. }
  8722. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8723. };
  8724. });
  8725. Vue.prototype.__init_provide = initProvide;
  8726. Vue.prototype.__init_injections = initInjections;
  8727. Vue.prototype.__call_hook = function(hook, args) {
  8728. var vm = this;
  8729. // #7573 disable dep collection when invoking lifecycle hooks
  8730. pushTarget();
  8731. var handlers = vm.$options[hook];
  8732. var info = hook + " hook";
  8733. var ret;
  8734. if (handlers) {
  8735. for (var i = 0, j = handlers.length; i < j; i++) {
  8736. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8737. }
  8738. }
  8739. if (vm._hasHookEvent) {
  8740. vm.$emit('hook:' + hook, args);
  8741. }
  8742. popTarget();
  8743. return ret
  8744. };
  8745. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8746. if (Array.isArray(modifiers)) {
  8747. if (modifiers.indexOf('trim') !== -1) {
  8748. value = value.trim();
  8749. }
  8750. if (modifiers.indexOf('number') !== -1) {
  8751. value = this._n(value);
  8752. }
  8753. }
  8754. if (!target) {
  8755. target = this;
  8756. }
  8757. // 解决动态属性添加
  8758. Vue.set(target, key, value);
  8759. };
  8760. Vue.prototype.__set_sync = function(target, key, value) {
  8761. if (!target) {
  8762. target = this;
  8763. }
  8764. // 解决动态属性添加
  8765. Vue.set(target, key, value);
  8766. };
  8767. Vue.prototype.__get_orig = function(item) {
  8768. if (isPlainObject(item)) {
  8769. return item['$orig'] || item
  8770. }
  8771. return item
  8772. };
  8773. Vue.prototype.__get_value = function(dataPath, target) {
  8774. return getTarget(target || this, dataPath)
  8775. };
  8776. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8777. return renderClass(staticClass, dynamicClass)
  8778. };
  8779. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8780. if (!dynamicStyle && !staticStyle) {
  8781. return ''
  8782. }
  8783. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8784. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8785. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8786. };
  8787. Vue.prototype.__map = function(val, iteratee) {
  8788. //TODO 暂不考虑 string
  8789. var ret, i, l, keys, key;
  8790. if (Array.isArray(val)) {
  8791. ret = new Array(val.length);
  8792. for (i = 0, l = val.length; i < l; i++) {
  8793. ret[i] = iteratee(val[i], i);
  8794. }
  8795. return ret
  8796. } else if (isObject(val)) {
  8797. keys = Object.keys(val);
  8798. ret = Object.create(null);
  8799. for (i = 0, l = keys.length; i < l; i++) {
  8800. key = keys[i];
  8801. ret[key] = iteratee(val[key], key, i);
  8802. }
  8803. return ret
  8804. } else if (typeof val === 'number') {
  8805. ret = new Array(val);
  8806. for (i = 0, l = val; i < l; i++) {
  8807. // 第一个参数暂时仍和小程序一致
  8808. ret[i] = iteratee(i, i);
  8809. }
  8810. return ret
  8811. }
  8812. return []
  8813. };
  8814. }
  8815. /* */
  8816. var LIFECYCLE_HOOKS$1 = [
  8817. //App
  8818. 'onLaunch',
  8819. 'onShow',
  8820. 'onHide',
  8821. 'onUniNViewMessage',
  8822. 'onPageNotFound',
  8823. 'onThemeChange',
  8824. 'onError',
  8825. 'onUnhandledRejection',
  8826. //Page
  8827. 'onInit',
  8828. 'onLoad',
  8829. // 'onShow',
  8830. 'onReady',
  8831. // 'onHide',
  8832. 'onUnload',
  8833. 'onPullDownRefresh',
  8834. 'onReachBottom',
  8835. 'onTabItemTap',
  8836. 'onAddToFavorites',
  8837. 'onShareTimeline',
  8838. 'onShareAppMessage',
  8839. 'onResize',
  8840. 'onPageScroll',
  8841. 'onNavigationBarButtonTap',
  8842. 'onBackPress',
  8843. 'onNavigationBarSearchInputChanged',
  8844. 'onNavigationBarSearchInputConfirmed',
  8845. 'onNavigationBarSearchInputClicked',
  8846. 'onUploadDouyinVideo',
  8847. 'onNFCReadMessage',
  8848. //Component
  8849. // 'onReady', // 兼容旧版本,应该移除该事件
  8850. 'onPageShow',
  8851. 'onPageHide',
  8852. 'onPageResize'
  8853. ];
  8854. function lifecycleMixin$1(Vue) {
  8855. //fixed vue-class-component
  8856. var oldExtend = Vue.extend;
  8857. Vue.extend = function(extendOptions) {
  8858. extendOptions = extendOptions || {};
  8859. var methods = extendOptions.methods;
  8860. if (methods) {
  8861. Object.keys(methods).forEach(function (methodName) {
  8862. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8863. extendOptions[methodName] = methods[methodName];
  8864. delete methods[methodName];
  8865. }
  8866. });
  8867. }
  8868. return oldExtend.call(this, extendOptions)
  8869. };
  8870. var strategies = Vue.config.optionMergeStrategies;
  8871. var mergeHook = strategies.created;
  8872. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8873. strategies[hook] = mergeHook;
  8874. });
  8875. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8876. }
  8877. /* */
  8878. // install platform patch function
  8879. Vue.prototype.__patch__ = patch;
  8880. // public mount method
  8881. Vue.prototype.$mount = function(
  8882. el ,
  8883. hydrating
  8884. ) {
  8885. return mountComponent$1(this, el, hydrating)
  8886. };
  8887. lifecycleMixin$1(Vue);
  8888. internalMixin(Vue);
  8889. /* */
  8890. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8891. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  8892. /***/ }),
  8893. /* 26 */
  8894. /*!***********************************************************************!*\
  8895. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/pages.json ***!
  8896. \***********************************************************************/
  8897. /*! no static exports found */
  8898. /***/ (function(module, exports) {
  8899. /***/ }),
  8900. /* 27 */,
  8901. /* 28 */,
  8902. /* 29 */,
  8903. /* 30 */,
  8904. /* 31 */,
  8905. /* 32 */
  8906. /*!**********************************************************************************************************!*\
  8907. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  8908. \**********************************************************************************************************/
  8909. /*! exports provided: default */
  8910. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  8911. "use strict";
  8912. __webpack_require__.r(__webpack_exports__);
  8913. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  8914. /* globals __VUE_SSR_CONTEXT__ */
  8915. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  8916. // This module is a runtime utility for cleaner component module output and will
  8917. // be included in the final webpack user bundle.
  8918. function normalizeComponent (
  8919. scriptExports,
  8920. render,
  8921. staticRenderFns,
  8922. functionalTemplate,
  8923. injectStyles,
  8924. scopeId,
  8925. moduleIdentifier, /* server only */
  8926. shadowMode, /* vue-cli only */
  8927. components, // fixed by xxxxxx auto components
  8928. renderjs // fixed by xxxxxx renderjs
  8929. ) {
  8930. // Vue.extend constructor export interop
  8931. var options = typeof scriptExports === 'function'
  8932. ? scriptExports.options
  8933. : scriptExports
  8934. // fixed by xxxxxx auto components
  8935. if (components) {
  8936. if (!options.components) {
  8937. options.components = {}
  8938. }
  8939. var hasOwn = Object.prototype.hasOwnProperty
  8940. for (var name in components) {
  8941. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  8942. options.components[name] = components[name]
  8943. }
  8944. }
  8945. }
  8946. // fixed by xxxxxx renderjs
  8947. if (renderjs) {
  8948. if(typeof renderjs.beforeCreate === 'function'){
  8949. renderjs.beforeCreate = [renderjs.beforeCreate]
  8950. }
  8951. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  8952. this[renderjs.__module] = this
  8953. });
  8954. (options.mixins || (options.mixins = [])).push(renderjs)
  8955. }
  8956. // render functions
  8957. if (render) {
  8958. options.render = render
  8959. options.staticRenderFns = staticRenderFns
  8960. options._compiled = true
  8961. }
  8962. // functional template
  8963. if (functionalTemplate) {
  8964. options.functional = true
  8965. }
  8966. // scopedId
  8967. if (scopeId) {
  8968. options._scopeId = 'data-v-' + scopeId
  8969. }
  8970. var hook
  8971. if (moduleIdentifier) { // server build
  8972. hook = function (context) {
  8973. // 2.3 injection
  8974. context =
  8975. context || // cached call
  8976. (this.$vnode && this.$vnode.ssrContext) || // stateful
  8977. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  8978. // 2.2 with runInNewContext: true
  8979. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  8980. context = __VUE_SSR_CONTEXT__
  8981. }
  8982. // inject component styles
  8983. if (injectStyles) {
  8984. injectStyles.call(this, context)
  8985. }
  8986. // register component module identifier for async chunk inferrence
  8987. if (context && context._registeredComponents) {
  8988. context._registeredComponents.add(moduleIdentifier)
  8989. }
  8990. }
  8991. // used by ssr in case component is cached and beforeCreate
  8992. // never gets called
  8993. options._ssrRegister = hook
  8994. } else if (injectStyles) {
  8995. hook = shadowMode
  8996. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  8997. : injectStyles
  8998. }
  8999. if (hook) {
  9000. if (options.functional) {
  9001. // for template-only hot-reload because in that case the render fn doesn't
  9002. // go through the normalizer
  9003. options._injectStyles = hook
  9004. // register for functioal component in vue file
  9005. var originalRender = options.render
  9006. options.render = function renderWithStyleInjection (h, context) {
  9007. hook.call(context)
  9008. return originalRender(h, context)
  9009. }
  9010. } else {
  9011. // inject component registration as beforeCreate hook
  9012. var existing = options.beforeCreate
  9013. options.beforeCreate = existing
  9014. ? [].concat(existing, hook)
  9015. : [hook]
  9016. }
  9017. }
  9018. return {
  9019. exports: scriptExports,
  9020. options: options
  9021. }
  9022. }
  9023. /***/ }),
  9024. /* 33 */
  9025. /*!*************************************************************************************!*\
  9026. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/uni.promisify.adaptor.js ***!
  9027. \*************************************************************************************/
  9028. /*! no static exports found */
  9029. /***/ (function(module, exports, __webpack_require__) {
  9030. /* WEBPACK VAR INJECTION */(function(uni) {var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  9031. uni.addInterceptor({
  9032. returnValue: function returnValue(res) {
  9033. if (!(!!res && (_typeof(res) === "object" || typeof res === "function") && typeof res.then === "function")) {
  9034. return res;
  9035. }
  9036. return new Promise(function (resolve, reject) {
  9037. res.then(function (res) {
  9038. if (!res) return resolve(res);
  9039. return res[0] ? reject(res[0]) : resolve(res[1]);
  9040. });
  9041. });
  9042. }
  9043. });
  9044. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9045. /***/ }),
  9046. /* 34 */,
  9047. /* 35 */,
  9048. /* 36 */,
  9049. /* 37 */,
  9050. /* 38 */,
  9051. /* 39 */,
  9052. /* 40 */
  9053. /*!************************************************************************!*\
  9054. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/api/user.js ***!
  9055. \************************************************************************/
  9056. /*! no static exports found */
  9057. /***/ (function(module, exports, __webpack_require__) {
  9058. "use strict";
  9059. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9060. Object.defineProperty(exports, "__esModule", {
  9061. value: true
  9062. });
  9063. exports.American = American;
  9064. exports.Domestic = Domestic;
  9065. exports.Variety = Variety;
  9066. var _request = _interopRequireDefault(__webpack_require__(/*! ../utils/request */ 41));
  9067. // 国产剧
  9068. function Domestic() {
  9069. return (0, _request.default)({
  9070. url: "rexxar/api/v2/subject_collection/tv_domestic/items",
  9071. method: 'get'
  9072. });
  9073. }
  9074. // 综艺
  9075. function Variety() {
  9076. return (0, _request.default)({
  9077. url: "rexxar/api/v2/subject_collection/tv_variety_show/items",
  9078. method: 'get'
  9079. });
  9080. }
  9081. // 美剧
  9082. function American() {
  9083. return (0, _request.default)({
  9084. url: "rexxar/api/v2/subject_collection/tv_domestic/items",
  9085. method: 'get'
  9086. });
  9087. }
  9088. /***/ }),
  9089. /* 41 */
  9090. /*!*****************************************************************************!*\
  9091. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/utils/request.js ***!
  9092. \*****************************************************************************/
  9093. /*! no static exports found */
  9094. /***/ (function(module, exports, __webpack_require__) {
  9095. "use strict";
  9096. /* WEBPACK VAR INJECTION */(function(uni) {
  9097. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9098. Object.defineProperty(exports, "__esModule", {
  9099. value: true
  9100. });
  9101. exports.default = void 0;
  9102. var _axios = _interopRequireDefault(__webpack_require__(/*! axios */ 42));
  9103. var uniAdapter = function uniAdapter(config) {
  9104. return new Promise(function (resolve, reject) {
  9105. uni.request({
  9106. method: config.method.toUpperCase(),
  9107. url: config.baseURL + config.url,
  9108. data: config.data,
  9109. header: config.headers,
  9110. timeout: config.timeout,
  9111. success: function success(res) {
  9112. resolve({
  9113. data: res.data,
  9114. status: res.statusCode,
  9115. config: config,
  9116. headers: res.header
  9117. });
  9118. },
  9119. fail: function fail(err) {
  9120. reject(new Error(err.errMsg || '请求失败'));
  9121. }
  9122. });
  9123. });
  9124. };
  9125. var instance = _axios.default.create({
  9126. baseURL: 'https://m.douban.com/',
  9127. timeout: 100000,
  9128. adapter: uniAdapter
  9129. });
  9130. // 添加请求拦截器
  9131. instance.interceptors.request.use(function (config) {
  9132. // 在发送请求之前做些什么
  9133. return config;
  9134. }, function (error) {
  9135. // 对请求错误做些什么
  9136. return Promise.reject(error);
  9137. });
  9138. // 添加响应拦截器
  9139. instance.interceptors.response.use(function (response) {
  9140. // 2xx 范围内的状态码都会触发该函数。
  9141. // 对响应数据做点什么
  9142. return response;
  9143. }, function (error) {
  9144. // 超出 2xx 范围的状态码都会触发该函数。
  9145. // 对响应错误做点什么
  9146. return Promise.reject(error);
  9147. });
  9148. var _default = instance;
  9149. exports.default = _default;
  9150. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9151. /***/ }),
  9152. /* 42 */
  9153. /*!****************************************************************************************!*\
  9154. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/index.js ***!
  9155. \****************************************************************************************/
  9156. /*! no static exports found */
  9157. /***/ (function(module, exports, __webpack_require__) {
  9158. "use strict";
  9159. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9160. Object.defineProperty(exports, "__esModule", {
  9161. value: true
  9162. });
  9163. exports.all = exports.VERSION = exports.HttpStatusCode = exports.CanceledError = exports.CancelToken = exports.Cancel = exports.AxiosHeaders = exports.AxiosError = exports.Axios = void 0;
  9164. Object.defineProperty(exports, "default", {
  9165. enumerable: true,
  9166. get: function get() {
  9167. return _axios.default;
  9168. }
  9169. });
  9170. exports.toFormData = exports.spread = exports.mergeConfig = exports.isCancel = exports.isAxiosError = exports.getAdapter = exports.formToJSON = void 0;
  9171. var _axios = _interopRequireDefault(__webpack_require__(/*! ./lib/axios.js */ 43));
  9172. // This module is intended to unwrap Axios default export as named.
  9173. // Keep top-level export same with static properties
  9174. // so that it can keep same with es module or cjs
  9175. var Axios = _axios.default.Axios,
  9176. AxiosError = _axios.default.AxiosError,
  9177. CanceledError = _axios.default.CanceledError,
  9178. isCancel = _axios.default.isCancel,
  9179. CancelToken = _axios.default.CancelToken,
  9180. VERSION = _axios.default.VERSION,
  9181. all = _axios.default.all,
  9182. Cancel = _axios.default.Cancel,
  9183. isAxiosError = _axios.default.isAxiosError,
  9184. spread = _axios.default.spread,
  9185. toFormData = _axios.default.toFormData,
  9186. AxiosHeaders = _axios.default.AxiosHeaders,
  9187. HttpStatusCode = _axios.default.HttpStatusCode,
  9188. formToJSON = _axios.default.formToJSON,
  9189. getAdapter = _axios.default.getAdapter,
  9190. mergeConfig = _axios.default.mergeConfig;
  9191. exports.mergeConfig = mergeConfig;
  9192. exports.getAdapter = getAdapter;
  9193. exports.formToJSON = formToJSON;
  9194. exports.HttpStatusCode = HttpStatusCode;
  9195. exports.AxiosHeaders = AxiosHeaders;
  9196. exports.toFormData = toFormData;
  9197. exports.spread = spread;
  9198. exports.isAxiosError = isAxiosError;
  9199. exports.Cancel = Cancel;
  9200. exports.all = all;
  9201. exports.VERSION = VERSION;
  9202. exports.CancelToken = CancelToken;
  9203. exports.isCancel = isCancel;
  9204. exports.CanceledError = CanceledError;
  9205. exports.AxiosError = AxiosError;
  9206. exports.Axios = Axios;
  9207. /***/ }),
  9208. /* 43 */
  9209. /*!********************************************************************************************!*\
  9210. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/axios.js ***!
  9211. \********************************************************************************************/
  9212. /*! no static exports found */
  9213. /***/ (function(module, exports, __webpack_require__) {
  9214. "use strict";
  9215. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9216. Object.defineProperty(exports, "__esModule", {
  9217. value: true
  9218. });
  9219. exports.default = void 0;
  9220. var _utils = _interopRequireDefault(__webpack_require__(/*! ./utils.js */ 44));
  9221. var _bind = _interopRequireDefault(__webpack_require__(/*! ./helpers/bind.js */ 47));
  9222. var _Axios = _interopRequireDefault(__webpack_require__(/*! ./core/Axios.js */ 48));
  9223. var _mergeConfig = _interopRequireDefault(__webpack_require__(/*! ./core/mergeConfig.js */ 97));
  9224. var _index = _interopRequireDefault(__webpack_require__(/*! ./defaults/index.js */ 70));
  9225. var _formDataToJSON = _interopRequireDefault(__webpack_require__(/*! ./helpers/formDataToJSON.js */ 79));
  9226. var _CanceledError = _interopRequireDefault(__webpack_require__(/*! ./cancel/CanceledError.js */ 83));
  9227. var _CancelToken = _interopRequireDefault(__webpack_require__(/*! ./cancel/CancelToken.js */ 108));
  9228. var _isCancel = _interopRequireDefault(__webpack_require__(/*! ./cancel/isCancel.js */ 82));
  9229. var _data = __webpack_require__(/*! ./env/data.js */ 107);
  9230. var _toFormData = _interopRequireDefault(__webpack_require__(/*! ./helpers/toFormData.js */ 54));
  9231. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ./core/AxiosError.js */ 59));
  9232. var _spread = _interopRequireDefault(__webpack_require__(/*! ./helpers/spread.js */ 109));
  9233. var _isAxiosError = _interopRequireDefault(__webpack_require__(/*! ./helpers/isAxiosError.js */ 110));
  9234. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ./core/AxiosHeaders.js */ 80));
  9235. var _adapters = _interopRequireDefault(__webpack_require__(/*! ./adapters/adapters.js */ 84));
  9236. var _HttpStatusCode = _interopRequireDefault(__webpack_require__(/*! ./helpers/HttpStatusCode.js */ 111));
  9237. /**
  9238. * Create an instance of Axios
  9239. *
  9240. * @param {Object} defaultConfig The default config for the instance
  9241. *
  9242. * @returns {Axios} A new instance of Axios
  9243. */
  9244. function createInstance(defaultConfig) {
  9245. var context = new _Axios.default(defaultConfig);
  9246. var instance = (0, _bind.default)(_Axios.default.prototype.request, context);
  9247. // Copy axios.prototype to instance
  9248. _utils.default.extend(instance, _Axios.default.prototype, context, {
  9249. allOwnKeys: true
  9250. });
  9251. // Copy context to instance
  9252. _utils.default.extend(instance, context, null, {
  9253. allOwnKeys: true
  9254. });
  9255. // Factory for creating new instances
  9256. instance.create = function create(instanceConfig) {
  9257. return createInstance((0, _mergeConfig.default)(defaultConfig, instanceConfig));
  9258. };
  9259. return instance;
  9260. }
  9261. // Create the default instance to be exported
  9262. var axios = createInstance(_index.default);
  9263. // Expose Axios class to allow class inheritance
  9264. axios.Axios = _Axios.default;
  9265. // Expose Cancel & CancelToken
  9266. axios.CanceledError = _CanceledError.default;
  9267. axios.CancelToken = _CancelToken.default;
  9268. axios.isCancel = _isCancel.default;
  9269. axios.VERSION = _data.VERSION;
  9270. axios.toFormData = _toFormData.default;
  9271. // Expose AxiosError class
  9272. axios.AxiosError = _AxiosError.default;
  9273. // alias for CanceledError for backward compatibility
  9274. axios.Cancel = axios.CanceledError;
  9275. // Expose all/spread
  9276. axios.all = function all(promises) {
  9277. return Promise.all(promises);
  9278. };
  9279. axios.spread = _spread.default;
  9280. // Expose isAxiosError
  9281. axios.isAxiosError = _isAxiosError.default;
  9282. // Expose mergeConfig
  9283. axios.mergeConfig = _mergeConfig.default;
  9284. axios.AxiosHeaders = _AxiosHeaders.default;
  9285. axios.formToJSON = function (thing) {
  9286. return (0, _formDataToJSON.default)(_utils.default.isHTMLForm(thing) ? new FormData(thing) : thing);
  9287. };
  9288. axios.getAdapter = _adapters.default.getAdapter;
  9289. axios.HttpStatusCode = _HttpStatusCode.default;
  9290. axios.default = axios;
  9291. // this module should only have a default export
  9292. var _default = axios;
  9293. exports.default = _default;
  9294. /***/ }),
  9295. /* 44 */
  9296. /*!********************************************************************************************!*\
  9297. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/utils.js ***!
  9298. \********************************************************************************************/
  9299. /*! no static exports found */
  9300. /***/ (function(module, exports, __webpack_require__) {
  9301. "use strict";
  9302. /* WEBPACK VAR INJECTION */(function(global, process) {
  9303. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9304. Object.defineProperty(exports, "__esModule", {
  9305. value: true
  9306. });
  9307. exports.default = void 0;
  9308. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  9309. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  9310. var _bind = _interopRequireDefault(__webpack_require__(/*! ./helpers/bind.js */ 47));
  9311. // utils is a library of generic helper functions non-specific to axios
  9312. var toString = Object.prototype.toString;
  9313. var getPrototypeOf = Object.getPrototypeOf;
  9314. var iterator = Symbol.iterator,
  9315. toStringTag = Symbol.toStringTag;
  9316. var kindOf = function (cache) {
  9317. return function (thing) {
  9318. var str = toString.call(thing);
  9319. return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
  9320. };
  9321. }(Object.create(null));
  9322. var kindOfTest = function kindOfTest(type) {
  9323. type = type.toLowerCase();
  9324. return function (thing) {
  9325. return kindOf(thing) === type;
  9326. };
  9327. };
  9328. var typeOfTest = function typeOfTest(type) {
  9329. return function (thing) {
  9330. return (0, _typeof2.default)(thing) === type;
  9331. };
  9332. };
  9333. /**
  9334. * Determine if a value is a non-null object
  9335. *
  9336. * @param {Object} val The value to test
  9337. *
  9338. * @returns {boolean} True if value is an Array, otherwise false
  9339. */
  9340. var isArray = Array.isArray;
  9341. /**
  9342. * Determine if a value is undefined
  9343. *
  9344. * @param {*} val The value to test
  9345. *
  9346. * @returns {boolean} True if the value is undefined, otherwise false
  9347. */
  9348. var isUndefined = typeOfTest('undefined');
  9349. /**
  9350. * Determine if a value is a Buffer
  9351. *
  9352. * @param {*} val The value to test
  9353. *
  9354. * @returns {boolean} True if value is a Buffer, otherwise false
  9355. */
  9356. function isBuffer(val) {
  9357. return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
  9358. }
  9359. /**
  9360. * Determine if a value is an ArrayBuffer
  9361. *
  9362. * @param {*} val The value to test
  9363. *
  9364. * @returns {boolean} True if value is an ArrayBuffer, otherwise false
  9365. */
  9366. var isArrayBuffer = kindOfTest('ArrayBuffer');
  9367. /**
  9368. * Determine if a value is a view on an ArrayBuffer
  9369. *
  9370. * @param {*} val The value to test
  9371. *
  9372. * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
  9373. */
  9374. function isArrayBufferView(val) {
  9375. var result;
  9376. if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
  9377. result = ArrayBuffer.isView(val);
  9378. } else {
  9379. result = val && val.buffer && isArrayBuffer(val.buffer);
  9380. }
  9381. return result;
  9382. }
  9383. /**
  9384. * Determine if a value is a String
  9385. *
  9386. * @param {*} val The value to test
  9387. *
  9388. * @returns {boolean} True if value is a String, otherwise false
  9389. */
  9390. var isString = typeOfTest('string');
  9391. /**
  9392. * Determine if a value is a Function
  9393. *
  9394. * @param {*} val The value to test
  9395. * @returns {boolean} True if value is a Function, otherwise false
  9396. */
  9397. var isFunction = typeOfTest('function');
  9398. /**
  9399. * Determine if a value is a Number
  9400. *
  9401. * @param {*} val The value to test
  9402. *
  9403. * @returns {boolean} True if value is a Number, otherwise false
  9404. */
  9405. var isNumber = typeOfTest('number');
  9406. /**
  9407. * Determine if a value is an Object
  9408. *
  9409. * @param {*} thing The value to test
  9410. *
  9411. * @returns {boolean} True if value is an Object, otherwise false
  9412. */
  9413. var isObject = function isObject(thing) {
  9414. return thing !== null && (0, _typeof2.default)(thing) === 'object';
  9415. };
  9416. /**
  9417. * Determine if a value is a Boolean
  9418. *
  9419. * @param {*} thing The value to test
  9420. * @returns {boolean} True if value is a Boolean, otherwise false
  9421. */
  9422. var isBoolean = function isBoolean(thing) {
  9423. return thing === true || thing === false;
  9424. };
  9425. /**
  9426. * Determine if a value is a plain Object
  9427. *
  9428. * @param {*} val The value to test
  9429. *
  9430. * @returns {boolean} True if value is a plain Object, otherwise false
  9431. */
  9432. var isPlainObject = function isPlainObject(val) {
  9433. if (kindOf(val) !== 'object') {
  9434. return false;
  9435. }
  9436. var prototype = getPrototypeOf(val);
  9437. return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
  9438. };
  9439. /**
  9440. * Determine if a value is an empty object (safely handles Buffers)
  9441. *
  9442. * @param {*} val The value to test
  9443. *
  9444. * @returns {boolean} True if value is an empty object, otherwise false
  9445. */
  9446. var isEmptyObject = function isEmptyObject(val) {
  9447. // Early return for non-objects or Buffers to prevent RangeError
  9448. if (!isObject(val) || isBuffer(val)) {
  9449. return false;
  9450. }
  9451. try {
  9452. return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
  9453. } catch (e) {
  9454. // Fallback for any other objects that might cause RangeError with Object.keys()
  9455. return false;
  9456. }
  9457. };
  9458. /**
  9459. * Determine if a value is a Date
  9460. *
  9461. * @param {*} val The value to test
  9462. *
  9463. * @returns {boolean} True if value is a Date, otherwise false
  9464. */
  9465. var isDate = kindOfTest('Date');
  9466. /**
  9467. * Determine if a value is a File
  9468. *
  9469. * @param {*} val The value to test
  9470. *
  9471. * @returns {boolean} True if value is a File, otherwise false
  9472. */
  9473. var isFile = kindOfTest('File');
  9474. /**
  9475. * Determine if a value is a React Native Blob
  9476. * React Native "blob": an object with a `uri` attribute. Optionally, it can
  9477. * also have a `name` and `type` attribute to specify filename and content type
  9478. *
  9479. * @see https://github.com/facebook/react-native/blob/26684cf3adf4094eb6c405d345a75bf8c7c0bf88/Libraries/Network/FormData.js#L68-L71
  9480. *
  9481. * @param {*} value The value to test
  9482. *
  9483. * @returns {boolean} True if value is a React Native Blob, otherwise false
  9484. */
  9485. var isReactNativeBlob = function isReactNativeBlob(value) {
  9486. return !!(value && typeof value.uri !== 'undefined');
  9487. };
  9488. /**
  9489. * Determine if environment is React Native
  9490. * ReactNative `FormData` has a non-standard `getParts()` method
  9491. *
  9492. * @param {*} formData The formData to test
  9493. *
  9494. * @returns {boolean} True if environment is React Native, otherwise false
  9495. */
  9496. var isReactNative = function isReactNative(formData) {
  9497. return formData && typeof formData.getParts !== 'undefined';
  9498. };
  9499. /**
  9500. * Determine if a value is a Blob
  9501. *
  9502. * @param {*} val The value to test
  9503. *
  9504. * @returns {boolean} True if value is a Blob, otherwise false
  9505. */
  9506. var isBlob = kindOfTest('Blob');
  9507. /**
  9508. * Determine if a value is a FileList
  9509. *
  9510. * @param {*} val The value to test
  9511. *
  9512. * @returns {boolean} True if value is a File, otherwise false
  9513. */
  9514. var isFileList = kindOfTest('FileList');
  9515. /**
  9516. * Determine if a value is a Stream
  9517. *
  9518. * @param {*} val The value to test
  9519. *
  9520. * @returns {boolean} True if value is a Stream, otherwise false
  9521. */
  9522. var isStream = function isStream(val) {
  9523. return isObject(val) && isFunction(val.pipe);
  9524. };
  9525. /**
  9526. * Determine if a value is a FormData
  9527. *
  9528. * @param {*} thing The value to test
  9529. *
  9530. * @returns {boolean} True if value is an FormData, otherwise false
  9531. */
  9532. function getGlobal() {
  9533. if (typeof globalThis !== 'undefined') return globalThis;
  9534. if (typeof self !== 'undefined') return self;
  9535. if (typeof window !== 'undefined') return window;
  9536. if (typeof global !== 'undefined') return global;
  9537. return {};
  9538. }
  9539. var G = getGlobal();
  9540. var FormDataCtor = typeof G.FormData !== 'undefined' ? G.FormData : undefined;
  9541. var isFormData = function isFormData(thing) {
  9542. if (!thing) return false;
  9543. if (FormDataCtor && thing instanceof FormDataCtor) return true;
  9544. // Reject plain objects inheriting directly from Object.prototype so prototype-pollution gadgets can't spoof FormData (GHSA-6chq-wfr3-2hj9).
  9545. var proto = getPrototypeOf(thing);
  9546. if (!proto || proto === Object.prototype) return false;
  9547. if (!isFunction(thing.append)) return false;
  9548. var kind = kindOf(thing);
  9549. return kind === 'formdata' ||
  9550. // detect form-data instance
  9551. kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]';
  9552. };
  9553. /**
  9554. * Determine if a value is a URLSearchParams object
  9555. *
  9556. * @param {*} val The value to test
  9557. *
  9558. * @returns {boolean} True if value is a URLSearchParams object, otherwise false
  9559. */
  9560. var isURLSearchParams = kindOfTest('URLSearchParams');
  9561. var _map = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest),
  9562. _map2 = (0, _slicedToArray2.default)(_map, 4),
  9563. isReadableStream = _map2[0],
  9564. isRequest = _map2[1],
  9565. isResponse = _map2[2],
  9566. isHeaders = _map2[3];
  9567. /**
  9568. * Trim excess whitespace off the beginning and end of a string
  9569. *
  9570. * @param {String} str The String to trim
  9571. *
  9572. * @returns {String} The String freed of excess whitespace
  9573. */
  9574. var trim = function trim(str) {
  9575. return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
  9576. };
  9577. /**
  9578. * Iterate over an Array or an Object invoking a function for each item.
  9579. *
  9580. * If `obj` is an Array callback will be called passing
  9581. * the value, index, and complete array for each item.
  9582. *
  9583. * If 'obj' is an Object callback will be called passing
  9584. * the value, key, and complete object for each property.
  9585. *
  9586. * @param {Object|Array<unknown>} obj The object to iterate
  9587. * @param {Function} fn The callback to invoke for each item
  9588. *
  9589. * @param {Object} [options]
  9590. * @param {Boolean} [options.allOwnKeys = false]
  9591. * @returns {any}
  9592. */
  9593. function forEach(obj, fn) {
  9594. var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
  9595. _ref$allOwnKeys = _ref.allOwnKeys,
  9596. allOwnKeys = _ref$allOwnKeys === void 0 ? false : _ref$allOwnKeys;
  9597. // Don't bother if no value provided
  9598. if (obj === null || typeof obj === 'undefined') {
  9599. return;
  9600. }
  9601. var i;
  9602. var l;
  9603. // Force an array if not already something iterable
  9604. if ((0, _typeof2.default)(obj) !== 'object') {
  9605. /*eslint no-param-reassign:0*/
  9606. obj = [obj];
  9607. }
  9608. if (isArray(obj)) {
  9609. // Iterate over array values
  9610. for (i = 0, l = obj.length; i < l; i++) {
  9611. fn.call(null, obj[i], i, obj);
  9612. }
  9613. } else {
  9614. // Buffer check
  9615. if (isBuffer(obj)) {
  9616. return;
  9617. }
  9618. // Iterate over object keys
  9619. var keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
  9620. var len = keys.length;
  9621. var key;
  9622. for (i = 0; i < len; i++) {
  9623. key = keys[i];
  9624. fn.call(null, obj[key], key, obj);
  9625. }
  9626. }
  9627. }
  9628. /**
  9629. * Finds a key in an object, case-insensitive, returning the actual key name.
  9630. * Returns null if the object is a Buffer or if no match is found.
  9631. *
  9632. * @param {Object} obj - The object to search.
  9633. * @param {string} key - The key to find (case-insensitive).
  9634. * @returns {?string} The actual key name if found, otherwise null.
  9635. */
  9636. function findKey(obj, key) {
  9637. if (isBuffer(obj)) {
  9638. return null;
  9639. }
  9640. key = key.toLowerCase();
  9641. var keys = Object.keys(obj);
  9642. var i = keys.length;
  9643. var _key;
  9644. while (i-- > 0) {
  9645. _key = keys[i];
  9646. if (key === _key.toLowerCase()) {
  9647. return _key;
  9648. }
  9649. }
  9650. return null;
  9651. }
  9652. var _global = function () {
  9653. /*eslint no-undef:0*/
  9654. if (typeof globalThis !== 'undefined') return globalThis;
  9655. return typeof self !== 'undefined' ? self : typeof window !== 'undefined' ? window : global;
  9656. }();
  9657. var isContextDefined = function isContextDefined(context) {
  9658. return !isUndefined(context) && context !== _global;
  9659. };
  9660. /**
  9661. * Accepts varargs expecting each argument to be an object, then
  9662. * immutably merges the properties of each object and returns result.
  9663. *
  9664. * When multiple objects contain the same key the later object in
  9665. * the arguments list will take precedence.
  9666. *
  9667. * Example:
  9668. *
  9669. * ```js
  9670. * const result = merge({foo: 123}, {foo: 456});
  9671. * console.log(result.foo); // outputs 456
  9672. * ```
  9673. *
  9674. * @param {Object} obj1 Object to merge
  9675. *
  9676. * @returns {Object} Result of all merge properties
  9677. */
  9678. function merge( /* obj1, obj2, obj3, ... */
  9679. ) {
  9680. var _ref2 = isContextDefined(this) && this || {},
  9681. caseless = _ref2.caseless,
  9682. skipUndefined = _ref2.skipUndefined;
  9683. var result = {};
  9684. var assignValue = function assignValue(val, key) {
  9685. // Skip dangerous property names to prevent prototype pollution
  9686. if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
  9687. return;
  9688. }
  9689. var targetKey = caseless && findKey(result, key) || key;
  9690. if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
  9691. result[targetKey] = merge(result[targetKey], val);
  9692. } else if (isPlainObject(val)) {
  9693. result[targetKey] = merge({}, val);
  9694. } else if (isArray(val)) {
  9695. result[targetKey] = val.slice();
  9696. } else if (!skipUndefined || !isUndefined(val)) {
  9697. result[targetKey] = val;
  9698. }
  9699. };
  9700. for (var i = 0, l = arguments.length; i < l; i++) {
  9701. arguments[i] && forEach(arguments[i], assignValue);
  9702. }
  9703. return result;
  9704. }
  9705. /**
  9706. * Extends object a by mutably adding to it the properties of object b.
  9707. *
  9708. * @param {Object} a The object to be extended
  9709. * @param {Object} b The object to copy properties from
  9710. * @param {Object} thisArg The object to bind function to
  9711. *
  9712. * @param {Object} [options]
  9713. * @param {Boolean} [options.allOwnKeys]
  9714. * @returns {Object} The resulting value of object a
  9715. */
  9716. var extend = function extend(a, b, thisArg) {
  9717. var _ref3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
  9718. allOwnKeys = _ref3.allOwnKeys;
  9719. forEach(b, function (val, key) {
  9720. if (thisArg && isFunction(val)) {
  9721. Object.defineProperty(a, key, {
  9722. value: (0, _bind.default)(val, thisArg),
  9723. writable: true,
  9724. enumerable: true,
  9725. configurable: true
  9726. });
  9727. } else {
  9728. Object.defineProperty(a, key, {
  9729. value: val,
  9730. writable: true,
  9731. enumerable: true,
  9732. configurable: true
  9733. });
  9734. }
  9735. }, {
  9736. allOwnKeys: allOwnKeys
  9737. });
  9738. return a;
  9739. };
  9740. /**
  9741. * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
  9742. *
  9743. * @param {string} content with BOM
  9744. *
  9745. * @returns {string} content value without BOM
  9746. */
  9747. var stripBOM = function stripBOM(content) {
  9748. if (content.charCodeAt(0) === 0xfeff) {
  9749. content = content.slice(1);
  9750. }
  9751. return content;
  9752. };
  9753. /**
  9754. * Inherit the prototype methods from one constructor into another
  9755. * @param {function} constructor
  9756. * @param {function} superConstructor
  9757. * @param {object} [props]
  9758. * @param {object} [descriptors]
  9759. *
  9760. * @returns {void}
  9761. */
  9762. var inherits = function inherits(constructor, superConstructor, props, descriptors) {
  9763. constructor.prototype = Object.create(superConstructor.prototype, descriptors);
  9764. Object.defineProperty(constructor.prototype, 'constructor', {
  9765. value: constructor,
  9766. writable: true,
  9767. enumerable: false,
  9768. configurable: true
  9769. });
  9770. Object.defineProperty(constructor, 'super', {
  9771. value: superConstructor.prototype
  9772. });
  9773. props && Object.assign(constructor.prototype, props);
  9774. };
  9775. /**
  9776. * Resolve object with deep prototype chain to a flat object
  9777. * @param {Object} sourceObj source object
  9778. * @param {Object} [destObj]
  9779. * @param {Function|Boolean} [filter]
  9780. * @param {Function} [propFilter]
  9781. *
  9782. * @returns {Object}
  9783. */
  9784. var toFlatObject = function toFlatObject(sourceObj, destObj, filter, propFilter) {
  9785. var props;
  9786. var i;
  9787. var prop;
  9788. var merged = {};
  9789. destObj = destObj || {};
  9790. // eslint-disable-next-line no-eq-null,eqeqeq
  9791. if (sourceObj == null) return destObj;
  9792. do {
  9793. props = Object.getOwnPropertyNames(sourceObj);
  9794. i = props.length;
  9795. while (i-- > 0) {
  9796. prop = props[i];
  9797. if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
  9798. destObj[prop] = sourceObj[prop];
  9799. merged[prop] = true;
  9800. }
  9801. }
  9802. sourceObj = filter !== false && getPrototypeOf(sourceObj);
  9803. } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
  9804. return destObj;
  9805. };
  9806. /**
  9807. * Determines whether a string ends with the characters of a specified string
  9808. *
  9809. * @param {String} str
  9810. * @param {String} searchString
  9811. * @param {Number} [position= 0]
  9812. *
  9813. * @returns {boolean}
  9814. */
  9815. var endsWith = function endsWith(str, searchString, position) {
  9816. str = String(str);
  9817. if (position === undefined || position > str.length) {
  9818. position = str.length;
  9819. }
  9820. position -= searchString.length;
  9821. var lastIndex = str.indexOf(searchString, position);
  9822. return lastIndex !== -1 && lastIndex === position;
  9823. };
  9824. /**
  9825. * Returns new array from array like object or null if failed
  9826. *
  9827. * @param {*} [thing]
  9828. *
  9829. * @returns {?Array}
  9830. */
  9831. var toArray = function toArray(thing) {
  9832. if (!thing) return null;
  9833. if (isArray(thing)) return thing;
  9834. var i = thing.length;
  9835. if (!isNumber(i)) return null;
  9836. var arr = new Array(i);
  9837. while (i-- > 0) {
  9838. arr[i] = thing[i];
  9839. }
  9840. return arr;
  9841. };
  9842. /**
  9843. * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
  9844. * thing passed in is an instance of Uint8Array
  9845. *
  9846. * @param {TypedArray}
  9847. *
  9848. * @returns {Array}
  9849. */
  9850. // eslint-disable-next-line func-names
  9851. var isTypedArray = function (TypedArray) {
  9852. // eslint-disable-next-line func-names
  9853. return function (thing) {
  9854. return TypedArray && thing instanceof TypedArray;
  9855. };
  9856. }(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
  9857. /**
  9858. * For each entry in the object, call the function with the key and value.
  9859. *
  9860. * @param {Object<any, any>} obj - The object to iterate over.
  9861. * @param {Function} fn - The function to call for each entry.
  9862. *
  9863. * @returns {void}
  9864. */
  9865. var forEachEntry = function forEachEntry(obj, fn) {
  9866. var generator = obj && obj[iterator];
  9867. var _iterator = generator.call(obj);
  9868. var result;
  9869. while ((result = _iterator.next()) && !result.done) {
  9870. var pair = result.value;
  9871. fn.call(obj, pair[0], pair[1]);
  9872. }
  9873. };
  9874. /**
  9875. * It takes a regular expression and a string, and returns an array of all the matches
  9876. *
  9877. * @param {string} regExp - The regular expression to match against.
  9878. * @param {string} str - The string to search.
  9879. *
  9880. * @returns {Array<boolean>}
  9881. */
  9882. var matchAll = function matchAll(regExp, str) {
  9883. var matches;
  9884. var arr = [];
  9885. while ((matches = regExp.exec(str)) !== null) {
  9886. arr.push(matches);
  9887. }
  9888. return arr;
  9889. };
  9890. /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
  9891. var isHTMLForm = kindOfTest('HTMLFormElement');
  9892. var toCamelCase = function toCamelCase(str) {
  9893. return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
  9894. return p1.toUpperCase() + p2;
  9895. });
  9896. };
  9897. /* Creating a function that will check if an object has a property. */
  9898. var hasOwnProperty = function (_ref4) {
  9899. var hasOwnProperty = _ref4.hasOwnProperty;
  9900. return function (obj, prop) {
  9901. return hasOwnProperty.call(obj, prop);
  9902. };
  9903. }(Object.prototype);
  9904. /**
  9905. * Determine if a value is a RegExp object
  9906. *
  9907. * @param {*} val The value to test
  9908. *
  9909. * @returns {boolean} True if value is a RegExp object, otherwise false
  9910. */
  9911. var isRegExp = kindOfTest('RegExp');
  9912. var reduceDescriptors = function reduceDescriptors(obj, reducer) {
  9913. var descriptors = Object.getOwnPropertyDescriptors(obj);
  9914. var reducedDescriptors = {};
  9915. forEach(descriptors, function (descriptor, name) {
  9916. var ret;
  9917. if ((ret = reducer(descriptor, name, obj)) !== false) {
  9918. reducedDescriptors[name] = ret || descriptor;
  9919. }
  9920. });
  9921. Object.defineProperties(obj, reducedDescriptors);
  9922. };
  9923. /**
  9924. * Makes all methods read-only
  9925. * @param {Object} obj
  9926. */
  9927. var freezeMethods = function freezeMethods(obj) {
  9928. reduceDescriptors(obj, function (descriptor, name) {
  9929. // skip restricted props in strict mode
  9930. if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
  9931. return false;
  9932. }
  9933. var value = obj[name];
  9934. if (!isFunction(value)) return;
  9935. descriptor.enumerable = false;
  9936. if ('writable' in descriptor) {
  9937. descriptor.writable = false;
  9938. return;
  9939. }
  9940. if (!descriptor.set) {
  9941. descriptor.set = function () {
  9942. throw Error("Can not rewrite read-only method '" + name + "'");
  9943. };
  9944. }
  9945. });
  9946. };
  9947. /**
  9948. * Converts an array or a delimited string into an object set with values as keys and true as values.
  9949. * Useful for fast membership checks.
  9950. *
  9951. * @param {Array|string} arrayOrString - The array or string to convert.
  9952. * @param {string} delimiter - The delimiter to use if input is a string.
  9953. * @returns {Object} An object with keys from the array or string, values set to true.
  9954. */
  9955. var toObjectSet = function toObjectSet(arrayOrString, delimiter) {
  9956. var obj = {};
  9957. var define = function define(arr) {
  9958. arr.forEach(function (value) {
  9959. obj[value] = true;
  9960. });
  9961. };
  9962. isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
  9963. return obj;
  9964. };
  9965. var noop = function noop() {};
  9966. var toFiniteNumber = function toFiniteNumber(value, defaultValue) {
  9967. return value != null && Number.isFinite(value = +value) ? value : defaultValue;
  9968. };
  9969. /**
  9970. * If the thing is a FormData object, return true, otherwise return false.
  9971. *
  9972. * @param {unknown} thing - The thing to check.
  9973. *
  9974. * @returns {boolean}
  9975. */
  9976. function isSpecCompliantForm(thing) {
  9977. return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
  9978. }
  9979. /**
  9980. * Recursively converts an object to a JSON-compatible object, handling circular references and Buffers.
  9981. *
  9982. * @param {Object} obj - The object to convert.
  9983. * @returns {Object} The JSON-compatible object.
  9984. */
  9985. var toJSONObject = function toJSONObject(obj) {
  9986. var stack = new Array(10);
  9987. var visit = function visit(source, i) {
  9988. if (isObject(source)) {
  9989. if (stack.indexOf(source) >= 0) {
  9990. return;
  9991. }
  9992. //Buffer check
  9993. if (isBuffer(source)) {
  9994. return source;
  9995. }
  9996. if (!('toJSON' in source)) {
  9997. stack[i] = source;
  9998. var target = isArray(source) ? [] : {};
  9999. forEach(source, function (value, key) {
  10000. var reducedValue = visit(value, i + 1);
  10001. !isUndefined(reducedValue) && (target[key] = reducedValue);
  10002. });
  10003. stack[i] = undefined;
  10004. return target;
  10005. }
  10006. }
  10007. return source;
  10008. };
  10009. return visit(obj, 0);
  10010. };
  10011. /**
  10012. * Determines if a value is an async function.
  10013. *
  10014. * @param {*} thing - The value to test.
  10015. * @returns {boolean} True if value is an async function, otherwise false.
  10016. */
  10017. var isAsyncFn = kindOfTest('AsyncFunction');
  10018. /**
  10019. * Determines if a value is thenable (has then and catch methods).
  10020. *
  10021. * @param {*} thing - The value to test.
  10022. * @returns {boolean} True if value is thenable, otherwise false.
  10023. */
  10024. var isThenable = function isThenable(thing) {
  10025. return thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
  10026. };
  10027. // original code
  10028. // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
  10029. /**
  10030. * Provides a cross-platform setImmediate implementation.
  10031. * Uses native setImmediate if available, otherwise falls back to postMessage or setTimeout.
  10032. *
  10033. * @param {boolean} setImmediateSupported - Whether setImmediate is supported.
  10034. * @param {boolean} postMessageSupported - Whether postMessage is supported.
  10035. * @returns {Function} A function to schedule a callback asynchronously.
  10036. */
  10037. var _setImmediate = function (setImmediateSupported, postMessageSupported) {
  10038. if (setImmediateSupported) {
  10039. return setImmediate;
  10040. }
  10041. return postMessageSupported ? function (token, callbacks) {
  10042. _global.addEventListener('message', function (_ref5) {
  10043. var source = _ref5.source,
  10044. data = _ref5.data;
  10045. if (source === _global && data === token) {
  10046. callbacks.length && callbacks.shift()();
  10047. }
  10048. }, false);
  10049. return function (cb) {
  10050. callbacks.push(cb);
  10051. _global.postMessage(token, '*');
  10052. };
  10053. }("axios@".concat(Math.random()), []) : function (cb) {
  10054. return setTimeout(cb);
  10055. };
  10056. }(typeof setImmediate === 'function', isFunction(_global.postMessage));
  10057. /**
  10058. * Schedules a microtask or asynchronous callback as soon as possible.
  10059. * Uses queueMicrotask if available, otherwise falls back to process.nextTick or _setImmediate.
  10060. *
  10061. * @type {Function}
  10062. */
  10063. var asap = typeof queueMicrotask !== 'undefined' ? queueMicrotask.bind(_global) : typeof process !== 'undefined' && process.nextTick || _setImmediate;
  10064. // *********************
  10065. var isIterable = function isIterable(thing) {
  10066. return thing != null && isFunction(thing[iterator]);
  10067. };
  10068. var _default = {
  10069. isArray: isArray,
  10070. isArrayBuffer: isArrayBuffer,
  10071. isBuffer: isBuffer,
  10072. isFormData: isFormData,
  10073. isArrayBufferView: isArrayBufferView,
  10074. isString: isString,
  10075. isNumber: isNumber,
  10076. isBoolean: isBoolean,
  10077. isObject: isObject,
  10078. isPlainObject: isPlainObject,
  10079. isEmptyObject: isEmptyObject,
  10080. isReadableStream: isReadableStream,
  10081. isRequest: isRequest,
  10082. isResponse: isResponse,
  10083. isHeaders: isHeaders,
  10084. isUndefined: isUndefined,
  10085. isDate: isDate,
  10086. isFile: isFile,
  10087. isReactNativeBlob: isReactNativeBlob,
  10088. isReactNative: isReactNative,
  10089. isBlob: isBlob,
  10090. isRegExp: isRegExp,
  10091. isFunction: isFunction,
  10092. isStream: isStream,
  10093. isURLSearchParams: isURLSearchParams,
  10094. isTypedArray: isTypedArray,
  10095. isFileList: isFileList,
  10096. forEach: forEach,
  10097. merge: merge,
  10098. extend: extend,
  10099. trim: trim,
  10100. stripBOM: stripBOM,
  10101. inherits: inherits,
  10102. toFlatObject: toFlatObject,
  10103. kindOf: kindOf,
  10104. kindOfTest: kindOfTest,
  10105. endsWith: endsWith,
  10106. toArray: toArray,
  10107. forEachEntry: forEachEntry,
  10108. matchAll: matchAll,
  10109. isHTMLForm: isHTMLForm,
  10110. hasOwnProperty: hasOwnProperty,
  10111. hasOwnProp: hasOwnProperty,
  10112. // an alias to avoid ESLint no-prototype-builtins detection
  10113. reduceDescriptors: reduceDescriptors,
  10114. freezeMethods: freezeMethods,
  10115. toObjectSet: toObjectSet,
  10116. toCamelCase: toCamelCase,
  10117. noop: noop,
  10118. toFiniteNumber: toFiniteNumber,
  10119. findKey: findKey,
  10120. global: _global,
  10121. isContextDefined: isContextDefined,
  10122. isSpecCompliantForm: isSpecCompliantForm,
  10123. toJSONObject: toJSONObject,
  10124. isAsyncFn: isAsyncFn,
  10125. isThenable: isThenable,
  10126. setImmediate: _setImmediate,
  10127. asap: asap,
  10128. isIterable: isIterable
  10129. };
  10130. exports.default = _default;
  10131. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../../../../HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/webpack/buildin/global.js */ 3), __webpack_require__(/*! ./../../../../../../../../../HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/node-libs-browser/mock/process.js */ 45)))
  10132. /***/ }),
  10133. /* 45 */
  10134. /*!********************************************************!*\
  10135. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  10136. \********************************************************/
  10137. /*! no static exports found */
  10138. /***/ (function(module, exports, __webpack_require__) {
  10139. exports.nextTick = function nextTick(fn) {
  10140. var args = Array.prototype.slice.call(arguments);
  10141. args.shift();
  10142. setTimeout(function () {
  10143. fn.apply(null, args);
  10144. }, 0);
  10145. };
  10146. exports.platform = exports.arch =
  10147. exports.execPath = exports.title = 'browser';
  10148. exports.pid = 1;
  10149. exports.browser = true;
  10150. exports.env = {};
  10151. exports.argv = [];
  10152. exports.binding = function (name) {
  10153. throw new Error('No such module. (Possibly not yet loaded)')
  10154. };
  10155. (function () {
  10156. var cwd = '/';
  10157. var path;
  10158. exports.cwd = function () { return cwd };
  10159. exports.chdir = function (dir) {
  10160. if (!path) path = __webpack_require__(/*! path */ 46);
  10161. cwd = path.resolve(dir, cwd);
  10162. };
  10163. })();
  10164. exports.exit = exports.kill =
  10165. exports.umask = exports.dlopen =
  10166. exports.uptime = exports.memoryUsage =
  10167. exports.uvCounters = function() {};
  10168. exports.features = {};
  10169. /***/ }),
  10170. /* 46 */
  10171. /*!***********************************************!*\
  10172. !*** ./node_modules/path-browserify/index.js ***!
  10173. \***********************************************/
  10174. /*! no static exports found */
  10175. /***/ (function(module, exports, __webpack_require__) {
  10176. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  10177. // backported and transplited with Babel, with backwards-compat fixes
  10178. // Copyright Joyent, Inc. and other Node contributors.
  10179. //
  10180. // Permission is hereby granted, free of charge, to any person obtaining a
  10181. // copy of this software and associated documentation files (the
  10182. // "Software"), to deal in the Software without restriction, including
  10183. // without limitation the rights to use, copy, modify, merge, publish,
  10184. // distribute, sublicense, and/or sell copies of the Software, and to permit
  10185. // persons to whom the Software is furnished to do so, subject to the
  10186. // following conditions:
  10187. //
  10188. // The above copyright notice and this permission notice shall be included
  10189. // in all copies or substantial portions of the Software.
  10190. //
  10191. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  10192. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  10193. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  10194. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  10195. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  10196. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  10197. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  10198. // resolves . and .. elements in a path array with directory names there
  10199. // must be no slashes, empty elements, or device names (c:\) in the array
  10200. // (so also no leading and trailing slashes - it does not distinguish
  10201. // relative and absolute paths)
  10202. function normalizeArray(parts, allowAboveRoot) {
  10203. // if the path tries to go above the root, `up` ends up > 0
  10204. var up = 0;
  10205. for (var i = parts.length - 1; i >= 0; i--) {
  10206. var last = parts[i];
  10207. if (last === '.') {
  10208. parts.splice(i, 1);
  10209. } else if (last === '..') {
  10210. parts.splice(i, 1);
  10211. up++;
  10212. } else if (up) {
  10213. parts.splice(i, 1);
  10214. up--;
  10215. }
  10216. }
  10217. // if the path is allowed to go above the root, restore leading ..s
  10218. if (allowAboveRoot) {
  10219. for (; up--; up) {
  10220. parts.unshift('..');
  10221. }
  10222. }
  10223. return parts;
  10224. }
  10225. // path.resolve([from ...], to)
  10226. // posix version
  10227. exports.resolve = function() {
  10228. var resolvedPath = '',
  10229. resolvedAbsolute = false;
  10230. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  10231. var path = (i >= 0) ? arguments[i] : process.cwd();
  10232. // Skip empty and invalid entries
  10233. if (typeof path !== 'string') {
  10234. throw new TypeError('Arguments to path.resolve must be strings');
  10235. } else if (!path) {
  10236. continue;
  10237. }
  10238. resolvedPath = path + '/' + resolvedPath;
  10239. resolvedAbsolute = path.charAt(0) === '/';
  10240. }
  10241. // At this point the path should be resolved to a full absolute path, but
  10242. // handle relative paths to be safe (might happen when process.cwd() fails)
  10243. // Normalize the path
  10244. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  10245. return !!p;
  10246. }), !resolvedAbsolute).join('/');
  10247. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  10248. };
  10249. // path.normalize(path)
  10250. // posix version
  10251. exports.normalize = function(path) {
  10252. var isAbsolute = exports.isAbsolute(path),
  10253. trailingSlash = substr(path, -1) === '/';
  10254. // Normalize the path
  10255. path = normalizeArray(filter(path.split('/'), function(p) {
  10256. return !!p;
  10257. }), !isAbsolute).join('/');
  10258. if (!path && !isAbsolute) {
  10259. path = '.';
  10260. }
  10261. if (path && trailingSlash) {
  10262. path += '/';
  10263. }
  10264. return (isAbsolute ? '/' : '') + path;
  10265. };
  10266. // posix version
  10267. exports.isAbsolute = function(path) {
  10268. return path.charAt(0) === '/';
  10269. };
  10270. // posix version
  10271. exports.join = function() {
  10272. var paths = Array.prototype.slice.call(arguments, 0);
  10273. return exports.normalize(filter(paths, function(p, index) {
  10274. if (typeof p !== 'string') {
  10275. throw new TypeError('Arguments to path.join must be strings');
  10276. }
  10277. return p;
  10278. }).join('/'));
  10279. };
  10280. // path.relative(from, to)
  10281. // posix version
  10282. exports.relative = function(from, to) {
  10283. from = exports.resolve(from).substr(1);
  10284. to = exports.resolve(to).substr(1);
  10285. function trim(arr) {
  10286. var start = 0;
  10287. for (; start < arr.length; start++) {
  10288. if (arr[start] !== '') break;
  10289. }
  10290. var end = arr.length - 1;
  10291. for (; end >= 0; end--) {
  10292. if (arr[end] !== '') break;
  10293. }
  10294. if (start > end) return [];
  10295. return arr.slice(start, end - start + 1);
  10296. }
  10297. var fromParts = trim(from.split('/'));
  10298. var toParts = trim(to.split('/'));
  10299. var length = Math.min(fromParts.length, toParts.length);
  10300. var samePartsLength = length;
  10301. for (var i = 0; i < length; i++) {
  10302. if (fromParts[i] !== toParts[i]) {
  10303. samePartsLength = i;
  10304. break;
  10305. }
  10306. }
  10307. var outputParts = [];
  10308. for (var i = samePartsLength; i < fromParts.length; i++) {
  10309. outputParts.push('..');
  10310. }
  10311. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  10312. return outputParts.join('/');
  10313. };
  10314. exports.sep = '/';
  10315. exports.delimiter = ':';
  10316. exports.dirname = function (path) {
  10317. if (typeof path !== 'string') path = path + '';
  10318. if (path.length === 0) return '.';
  10319. var code = path.charCodeAt(0);
  10320. var hasRoot = code === 47 /*/*/;
  10321. var end = -1;
  10322. var matchedSlash = true;
  10323. for (var i = path.length - 1; i >= 1; --i) {
  10324. code = path.charCodeAt(i);
  10325. if (code === 47 /*/*/) {
  10326. if (!matchedSlash) {
  10327. end = i;
  10328. break;
  10329. }
  10330. } else {
  10331. // We saw the first non-path separator
  10332. matchedSlash = false;
  10333. }
  10334. }
  10335. if (end === -1) return hasRoot ? '/' : '.';
  10336. if (hasRoot && end === 1) {
  10337. // return '//';
  10338. // Backwards-compat fix:
  10339. return '/';
  10340. }
  10341. return path.slice(0, end);
  10342. };
  10343. function basename(path) {
  10344. if (typeof path !== 'string') path = path + '';
  10345. var start = 0;
  10346. var end = -1;
  10347. var matchedSlash = true;
  10348. var i;
  10349. for (i = path.length - 1; i >= 0; --i) {
  10350. if (path.charCodeAt(i) === 47 /*/*/) {
  10351. // If we reached a path separator that was not part of a set of path
  10352. // separators at the end of the string, stop now
  10353. if (!matchedSlash) {
  10354. start = i + 1;
  10355. break;
  10356. }
  10357. } else if (end === -1) {
  10358. // We saw the first non-path separator, mark this as the end of our
  10359. // path component
  10360. matchedSlash = false;
  10361. end = i + 1;
  10362. }
  10363. }
  10364. if (end === -1) return '';
  10365. return path.slice(start, end);
  10366. }
  10367. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  10368. // in new Node.js versions, so only basename() above is backported here
  10369. exports.basename = function (path, ext) {
  10370. var f = basename(path);
  10371. if (ext && f.substr(-1 * ext.length) === ext) {
  10372. f = f.substr(0, f.length - ext.length);
  10373. }
  10374. return f;
  10375. };
  10376. exports.extname = function (path) {
  10377. if (typeof path !== 'string') path = path + '';
  10378. var startDot = -1;
  10379. var startPart = 0;
  10380. var end = -1;
  10381. var matchedSlash = true;
  10382. // Track the state of characters (if any) we see before our first dot and
  10383. // after any path separator we find
  10384. var preDotState = 0;
  10385. for (var i = path.length - 1; i >= 0; --i) {
  10386. var code = path.charCodeAt(i);
  10387. if (code === 47 /*/*/) {
  10388. // If we reached a path separator that was not part of a set of path
  10389. // separators at the end of the string, stop now
  10390. if (!matchedSlash) {
  10391. startPart = i + 1;
  10392. break;
  10393. }
  10394. continue;
  10395. }
  10396. if (end === -1) {
  10397. // We saw the first non-path separator, mark this as the end of our
  10398. // extension
  10399. matchedSlash = false;
  10400. end = i + 1;
  10401. }
  10402. if (code === 46 /*.*/) {
  10403. // If this is our first dot, mark it as the start of our extension
  10404. if (startDot === -1)
  10405. startDot = i;
  10406. else if (preDotState !== 1)
  10407. preDotState = 1;
  10408. } else if (startDot !== -1) {
  10409. // We saw a non-dot and non-path separator before our dot, so we should
  10410. // have a good chance at having a non-empty extension
  10411. preDotState = -1;
  10412. }
  10413. }
  10414. if (startDot === -1 || end === -1 ||
  10415. // We saw a non-dot character immediately before the dot
  10416. preDotState === 0 ||
  10417. // The (right-most) trimmed path component is exactly '..'
  10418. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  10419. return '';
  10420. }
  10421. return path.slice(startDot, end);
  10422. };
  10423. function filter (xs, f) {
  10424. if (xs.filter) return xs.filter(f);
  10425. var res = [];
  10426. for (var i = 0; i < xs.length; i++) {
  10427. if (f(xs[i], i, xs)) res.push(xs[i]);
  10428. }
  10429. return res;
  10430. }
  10431. // String.prototype.substr - negative index don't work in IE8
  10432. var substr = 'ab'.substr(-1) === 'b'
  10433. ? function (str, start, len) { return str.substr(start, len) }
  10434. : function (str, start, len) {
  10435. if (start < 0) start = str.length + start;
  10436. return str.substr(start, len);
  10437. }
  10438. ;
  10439. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 45)))
  10440. /***/ }),
  10441. /* 47 */
  10442. /*!***************************************************************************************************!*\
  10443. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/bind.js ***!
  10444. \***************************************************************************************************/
  10445. /*! no static exports found */
  10446. /***/ (function(module, exports, __webpack_require__) {
  10447. "use strict";
  10448. /**
  10449. * Create a bound version of a function with a specified `this` context
  10450. *
  10451. * @param {Function} fn - The function to bind
  10452. * @param {*} thisArg - The value to be passed as the `this` parameter
  10453. * @returns {Function} A new function that will call the original function with the specified `this` context
  10454. */
  10455. Object.defineProperty(exports, "__esModule", {
  10456. value: true
  10457. });
  10458. exports.default = bind;
  10459. function bind(fn, thisArg) {
  10460. return function wrap() {
  10461. return fn.apply(thisArg, arguments);
  10462. };
  10463. }
  10464. /***/ }),
  10465. /* 48 */
  10466. /*!*************************************************************************************************!*\
  10467. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/core/Axios.js ***!
  10468. \*************************************************************************************************/
  10469. /*! no static exports found */
  10470. /***/ (function(module, exports, __webpack_require__) {
  10471. "use strict";
  10472. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10473. Object.defineProperty(exports, "__esModule", {
  10474. value: true
  10475. });
  10476. exports.default = void 0;
  10477. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 49));
  10478. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 51));
  10479. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  10480. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  10481. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  10482. var _buildURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/buildURL.js */ 52));
  10483. var _InterceptorManager = _interopRequireDefault(__webpack_require__(/*! ./InterceptorManager.js */ 67));
  10484. var _dispatchRequest = _interopRequireDefault(__webpack_require__(/*! ./dispatchRequest.js */ 68));
  10485. var _mergeConfig = _interopRequireDefault(__webpack_require__(/*! ./mergeConfig.js */ 97));
  10486. var _buildFullPath = _interopRequireDefault(__webpack_require__(/*! ./buildFullPath.js */ 94));
  10487. var _validator = _interopRequireDefault(__webpack_require__(/*! ../helpers/validator.js */ 106));
  10488. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ./AxiosHeaders.js */ 80));
  10489. var _transitional = _interopRequireDefault(__webpack_require__(/*! ../defaults/transitional.js */ 71));
  10490. var validators = _validator.default.validators;
  10491. /**
  10492. * Create a new instance of Axios
  10493. *
  10494. * @param {Object} instanceConfig The default config for the instance
  10495. *
  10496. * @return {Axios} A new instance of Axios
  10497. */
  10498. var Axios = /*#__PURE__*/function () {
  10499. function Axios(instanceConfig) {
  10500. (0, _classCallCheck2.default)(this, Axios);
  10501. this.defaults = instanceConfig || {};
  10502. this.interceptors = {
  10503. request: new _InterceptorManager.default(),
  10504. response: new _InterceptorManager.default()
  10505. };
  10506. }
  10507. /**
  10508. * Dispatch a request
  10509. *
  10510. * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
  10511. * @param {?Object} config
  10512. *
  10513. * @returns {Promise} The Promise to be fulfilled
  10514. */
  10515. (0, _createClass2.default)(Axios, [{
  10516. key: "request",
  10517. value: function () {
  10518. var _request2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(configOrUrl, config) {
  10519. var dummy, stack, firstNewlineIndex, secondNewlineIndex, stackWithoutTwoTopLines;
  10520. return _regenerator.default.wrap(function _callee$(_context) {
  10521. while (1) {
  10522. switch (_context.prev = _context.next) {
  10523. case 0:
  10524. _context.prev = 0;
  10525. _context.next = 3;
  10526. return this._request(configOrUrl, config);
  10527. case 3:
  10528. return _context.abrupt("return", _context.sent);
  10529. case 6:
  10530. _context.prev = 6;
  10531. _context.t0 = _context["catch"](0);
  10532. if (_context.t0 instanceof Error) {
  10533. dummy = {};
  10534. Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
  10535. // slice off the Error: ... line
  10536. stack = function () {
  10537. if (!dummy.stack) {
  10538. return '';
  10539. }
  10540. var firstNewlineIndex = dummy.stack.indexOf('\n');
  10541. return firstNewlineIndex === -1 ? '' : dummy.stack.slice(firstNewlineIndex + 1);
  10542. }();
  10543. try {
  10544. if (!_context.t0.stack) {
  10545. _context.t0.stack = stack;
  10546. // match without the 2 top stack lines
  10547. } else if (stack) {
  10548. firstNewlineIndex = stack.indexOf('\n');
  10549. secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf('\n', firstNewlineIndex + 1);
  10550. stackWithoutTwoTopLines = secondNewlineIndex === -1 ? '' : stack.slice(secondNewlineIndex + 1);
  10551. if (!String(_context.t0.stack).endsWith(stackWithoutTwoTopLines)) {
  10552. _context.t0.stack += '\n' + stack;
  10553. }
  10554. }
  10555. } catch (e) {
  10556. // ignore the case where "stack" is an un-writable property
  10557. }
  10558. }
  10559. throw _context.t0;
  10560. case 10:
  10561. case "end":
  10562. return _context.stop();
  10563. }
  10564. }
  10565. }, _callee, this, [[0, 6]]);
  10566. }));
  10567. function request(_x, _x2) {
  10568. return _request2.apply(this, arguments);
  10569. }
  10570. return request;
  10571. }()
  10572. }, {
  10573. key: "_request",
  10574. value: function _request(configOrUrl, config) {
  10575. /*eslint no-param-reassign:0*/
  10576. // Allow for axios('example/url'[, config]) a la fetch API
  10577. if (typeof configOrUrl === 'string') {
  10578. config = config || {};
  10579. config.url = configOrUrl;
  10580. } else {
  10581. config = configOrUrl || {};
  10582. }
  10583. config = (0, _mergeConfig.default)(this.defaults, config);
  10584. var _config = config,
  10585. transitional = _config.transitional,
  10586. paramsSerializer = _config.paramsSerializer,
  10587. headers = _config.headers;
  10588. if (transitional !== undefined) {
  10589. _validator.default.assertOptions(transitional, {
  10590. silentJSONParsing: validators.transitional(validators.boolean),
  10591. forcedJSONParsing: validators.transitional(validators.boolean),
  10592. clarifyTimeoutError: validators.transitional(validators.boolean),
  10593. legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
  10594. }, false);
  10595. }
  10596. if (paramsSerializer != null) {
  10597. if (_utils.default.isFunction(paramsSerializer)) {
  10598. config.paramsSerializer = {
  10599. serialize: paramsSerializer
  10600. };
  10601. } else {
  10602. _validator.default.assertOptions(paramsSerializer, {
  10603. encode: validators.function,
  10604. serialize: validators.function
  10605. }, true);
  10606. }
  10607. }
  10608. // Set config.allowAbsoluteUrls
  10609. if (config.allowAbsoluteUrls !== undefined) {
  10610. // do nothing
  10611. } else if (this.defaults.allowAbsoluteUrls !== undefined) {
  10612. config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
  10613. } else {
  10614. config.allowAbsoluteUrls = true;
  10615. }
  10616. _validator.default.assertOptions(config, {
  10617. baseUrl: validators.spelling('baseURL'),
  10618. withXsrfToken: validators.spelling('withXSRFToken')
  10619. }, true);
  10620. // Set config.method
  10621. config.method = (config.method || this.defaults.method || 'get').toLowerCase();
  10622. // Flatten headers
  10623. var contextHeaders = headers && _utils.default.merge(headers.common, headers[config.method]);
  10624. headers && _utils.default.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
  10625. delete headers[method];
  10626. });
  10627. config.headers = _AxiosHeaders.default.concat(contextHeaders, headers);
  10628. // filter out skipped interceptors
  10629. var requestInterceptorChain = [];
  10630. var synchronousRequestInterceptors = true;
  10631. this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
  10632. if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
  10633. return;
  10634. }
  10635. synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
  10636. var transitional = config.transitional || _transitional.default;
  10637. var legacyInterceptorReqResOrdering = transitional && transitional.legacyInterceptorReqResOrdering;
  10638. if (legacyInterceptorReqResOrdering) {
  10639. requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
  10640. } else {
  10641. requestInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
  10642. }
  10643. });
  10644. var responseInterceptorChain = [];
  10645. this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
  10646. responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
  10647. });
  10648. var promise;
  10649. var i = 0;
  10650. var len;
  10651. if (!synchronousRequestInterceptors) {
  10652. var chain = [_dispatchRequest.default.bind(this), undefined];
  10653. chain.unshift.apply(chain, requestInterceptorChain);
  10654. chain.push.apply(chain, responseInterceptorChain);
  10655. len = chain.length;
  10656. promise = Promise.resolve(config);
  10657. while (i < len) {
  10658. promise = promise.then(chain[i++], chain[i++]);
  10659. }
  10660. return promise;
  10661. }
  10662. len = requestInterceptorChain.length;
  10663. var newConfig = config;
  10664. while (i < len) {
  10665. var onFulfilled = requestInterceptorChain[i++];
  10666. var onRejected = requestInterceptorChain[i++];
  10667. try {
  10668. newConfig = onFulfilled(newConfig);
  10669. } catch (error) {
  10670. onRejected.call(this, error);
  10671. break;
  10672. }
  10673. }
  10674. try {
  10675. promise = _dispatchRequest.default.call(this, newConfig);
  10676. } catch (error) {
  10677. return Promise.reject(error);
  10678. }
  10679. i = 0;
  10680. len = responseInterceptorChain.length;
  10681. while (i < len) {
  10682. promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
  10683. }
  10684. return promise;
  10685. }
  10686. }, {
  10687. key: "getUri",
  10688. value: function getUri(config) {
  10689. config = (0, _mergeConfig.default)(this.defaults, config);
  10690. var fullPath = (0, _buildFullPath.default)(config.baseURL, config.url, config.allowAbsoluteUrls);
  10691. return (0, _buildURL.default)(fullPath, config.params, config.paramsSerializer);
  10692. }
  10693. }]);
  10694. return Axios;
  10695. }(); // Provide aliases for supported request methods
  10696. _utils.default.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
  10697. /*eslint func-names:0*/
  10698. Axios.prototype[method] = function (url, config) {
  10699. return this.request((0, _mergeConfig.default)(config || {}, {
  10700. method: method,
  10701. url: url,
  10702. data: (config || {}).data
  10703. }));
  10704. };
  10705. });
  10706. _utils.default.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  10707. function generateHTTPMethod(isForm) {
  10708. return function httpMethod(url, data, config) {
  10709. return this.request((0, _mergeConfig.default)(config || {}, {
  10710. method: method,
  10711. headers: isForm ? {
  10712. 'Content-Type': 'multipart/form-data'
  10713. } : {},
  10714. url: url,
  10715. data: data
  10716. }));
  10717. };
  10718. }
  10719. Axios.prototype[method] = generateHTTPMethod();
  10720. Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
  10721. });
  10722. var _default = Axios;
  10723. exports.default = _default;
  10724. /***/ }),
  10725. /* 49 */
  10726. /*!************************************************************************************************!*\
  10727. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  10728. \************************************************************************************************/
  10729. /*! no static exports found */
  10730. /***/ (function(module, exports, __webpack_require__) {
  10731. // TODO(Babel 8): Remove this file.
  10732. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 50)();
  10733. module.exports = runtime;
  10734. /***/ }),
  10735. /* 50 */
  10736. /*!*******************************************************************!*\
  10737. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  10738. \*******************************************************************/
  10739. /*! no static exports found */
  10740. /***/ (function(module, exports, __webpack_require__) {
  10741. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  10742. function _regeneratorRuntime() {
  10743. "use strict";
  10744. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  10745. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  10746. return e;
  10747. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10748. var t,
  10749. e = {},
  10750. r = Object.prototype,
  10751. n = r.hasOwnProperty,
  10752. o = Object.defineProperty || function (t, e, r) {
  10753. t[e] = r.value;
  10754. },
  10755. i = "function" == typeof Symbol ? Symbol : {},
  10756. a = i.iterator || "@@iterator",
  10757. c = i.asyncIterator || "@@asyncIterator",
  10758. u = i.toStringTag || "@@toStringTag";
  10759. function define(t, e, r) {
  10760. return Object.defineProperty(t, e, {
  10761. value: r,
  10762. enumerable: !0,
  10763. configurable: !0,
  10764. writable: !0
  10765. }), t[e];
  10766. }
  10767. try {
  10768. define({}, "");
  10769. } catch (t) {
  10770. define = function define(t, e, r) {
  10771. return t[e] = r;
  10772. };
  10773. }
  10774. function wrap(t, e, r, n) {
  10775. var i = e && e.prototype instanceof Generator ? e : Generator,
  10776. a = Object.create(i.prototype),
  10777. c = new Context(n || []);
  10778. return o(a, "_invoke", {
  10779. value: makeInvokeMethod(t, r, c)
  10780. }), a;
  10781. }
  10782. function tryCatch(t, e, r) {
  10783. try {
  10784. return {
  10785. type: "normal",
  10786. arg: t.call(e, r)
  10787. };
  10788. } catch (t) {
  10789. return {
  10790. type: "throw",
  10791. arg: t
  10792. };
  10793. }
  10794. }
  10795. e.wrap = wrap;
  10796. var h = "suspendedStart",
  10797. l = "suspendedYield",
  10798. f = "executing",
  10799. s = "completed",
  10800. y = {};
  10801. function Generator() {}
  10802. function GeneratorFunction() {}
  10803. function GeneratorFunctionPrototype() {}
  10804. var p = {};
  10805. define(p, a, function () {
  10806. return this;
  10807. });
  10808. var d = Object.getPrototypeOf,
  10809. v = d && d(d(values([])));
  10810. v && v !== r && n.call(v, a) && (p = v);
  10811. var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
  10812. function defineIteratorMethods(t) {
  10813. ["next", "throw", "return"].forEach(function (e) {
  10814. define(t, e, function (t) {
  10815. return this._invoke(e, t);
  10816. });
  10817. });
  10818. }
  10819. function AsyncIterator(t, e) {
  10820. function invoke(r, o, i, a) {
  10821. var c = tryCatch(t[r], t, o);
  10822. if ("throw" !== c.type) {
  10823. var u = c.arg,
  10824. h = u.value;
  10825. return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
  10826. invoke("next", t, i, a);
  10827. }, function (t) {
  10828. invoke("throw", t, i, a);
  10829. }) : e.resolve(h).then(function (t) {
  10830. u.value = t, i(u);
  10831. }, function (t) {
  10832. return invoke("throw", t, i, a);
  10833. });
  10834. }
  10835. a(c.arg);
  10836. }
  10837. var r;
  10838. o(this, "_invoke", {
  10839. value: function value(t, n) {
  10840. function callInvokeWithMethodAndArg() {
  10841. return new e(function (e, r) {
  10842. invoke(t, n, e, r);
  10843. });
  10844. }
  10845. return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  10846. }
  10847. });
  10848. }
  10849. function makeInvokeMethod(e, r, n) {
  10850. var o = h;
  10851. return function (i, a) {
  10852. if (o === f) throw Error("Generator is already running");
  10853. if (o === s) {
  10854. if ("throw" === i) throw a;
  10855. return {
  10856. value: t,
  10857. done: !0
  10858. };
  10859. }
  10860. for (n.method = i, n.arg = a;;) {
  10861. var c = n.delegate;
  10862. if (c) {
  10863. var u = maybeInvokeDelegate(c, n);
  10864. if (u) {
  10865. if (u === y) continue;
  10866. return u;
  10867. }
  10868. }
  10869. if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
  10870. if (o === h) throw o = s, n.arg;
  10871. n.dispatchException(n.arg);
  10872. } else "return" === n.method && n.abrupt("return", n.arg);
  10873. o = f;
  10874. var p = tryCatch(e, r, n);
  10875. if ("normal" === p.type) {
  10876. if (o = n.done ? s : l, p.arg === y) continue;
  10877. return {
  10878. value: p.arg,
  10879. done: n.done
  10880. };
  10881. }
  10882. "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
  10883. }
  10884. };
  10885. }
  10886. function maybeInvokeDelegate(e, r) {
  10887. var n = r.method,
  10888. o = e.iterator[n];
  10889. if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
  10890. var i = tryCatch(o, e.iterator, r.arg);
  10891. if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
  10892. var a = i.arg;
  10893. return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
  10894. }
  10895. function pushTryEntry(t) {
  10896. var e = {
  10897. tryLoc: t[0]
  10898. };
  10899. 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
  10900. }
  10901. function resetTryEntry(t) {
  10902. var e = t.completion || {};
  10903. e.type = "normal", delete e.arg, t.completion = e;
  10904. }
  10905. function Context(t) {
  10906. this.tryEntries = [{
  10907. tryLoc: "root"
  10908. }], t.forEach(pushTryEntry, this), this.reset(!0);
  10909. }
  10910. function values(e) {
  10911. if (e || "" === e) {
  10912. var r = e[a];
  10913. if (r) return r.call(e);
  10914. if ("function" == typeof e.next) return e;
  10915. if (!isNaN(e.length)) {
  10916. var o = -1,
  10917. i = function next() {
  10918. for (; ++o < e.length;) {
  10919. if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
  10920. }
  10921. return next.value = t, next.done = !0, next;
  10922. };
  10923. return i.next = i;
  10924. }
  10925. }
  10926. throw new TypeError(_typeof(e) + " is not iterable");
  10927. }
  10928. return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
  10929. value: GeneratorFunctionPrototype,
  10930. configurable: !0
  10931. }), o(GeneratorFunctionPrototype, "constructor", {
  10932. value: GeneratorFunction,
  10933. configurable: !0
  10934. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
  10935. var e = "function" == typeof t && t.constructor;
  10936. return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
  10937. }, e.mark = function (t) {
  10938. return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
  10939. }, e.awrap = function (t) {
  10940. return {
  10941. __await: t
  10942. };
  10943. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
  10944. return this;
  10945. }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
  10946. void 0 === i && (i = Promise);
  10947. var a = new AsyncIterator(wrap(t, r, n, o), i);
  10948. return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
  10949. return t.done ? t.value : a.next();
  10950. });
  10951. }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
  10952. return this;
  10953. }), define(g, "toString", function () {
  10954. return "[object Generator]";
  10955. }), e.keys = function (t) {
  10956. var e = Object(t),
  10957. r = [];
  10958. for (var n in e) {
  10959. r.push(n);
  10960. }
  10961. return r.reverse(), function next() {
  10962. for (; r.length;) {
  10963. var t = r.pop();
  10964. if (t in e) return next.value = t, next.done = !1, next;
  10965. }
  10966. return next.done = !0, next;
  10967. };
  10968. }, e.values = values, Context.prototype = {
  10969. constructor: Context,
  10970. reset: function reset(e) {
  10971. if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) {
  10972. "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
  10973. }
  10974. },
  10975. stop: function stop() {
  10976. this.done = !0;
  10977. var t = this.tryEntries[0].completion;
  10978. if ("throw" === t.type) throw t.arg;
  10979. return this.rval;
  10980. },
  10981. dispatchException: function dispatchException(e) {
  10982. if (this.done) throw e;
  10983. var r = this;
  10984. function handle(n, o) {
  10985. return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
  10986. }
  10987. for (var o = this.tryEntries.length - 1; o >= 0; --o) {
  10988. var i = this.tryEntries[o],
  10989. a = i.completion;
  10990. if ("root" === i.tryLoc) return handle("end");
  10991. if (i.tryLoc <= this.prev) {
  10992. var c = n.call(i, "catchLoc"),
  10993. u = n.call(i, "finallyLoc");
  10994. if (c && u) {
  10995. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  10996. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  10997. } else if (c) {
  10998. if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
  10999. } else {
  11000. if (!u) throw Error("try statement without catch or finally");
  11001. if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
  11002. }
  11003. }
  11004. }
  11005. },
  11006. abrupt: function abrupt(t, e) {
  11007. for (var r = this.tryEntries.length - 1; r >= 0; --r) {
  11008. var o = this.tryEntries[r];
  11009. if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
  11010. var i = o;
  11011. break;
  11012. }
  11013. }
  11014. i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
  11015. var a = i ? i.completion : {};
  11016. return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
  11017. },
  11018. complete: function complete(t, e) {
  11019. if ("throw" === t.type) throw t.arg;
  11020. return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
  11021. },
  11022. finish: function finish(t) {
  11023. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  11024. var r = this.tryEntries[e];
  11025. if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
  11026. }
  11027. },
  11028. "catch": function _catch(t) {
  11029. for (var e = this.tryEntries.length - 1; e >= 0; --e) {
  11030. var r = this.tryEntries[e];
  11031. if (r.tryLoc === t) {
  11032. var n = r.completion;
  11033. if ("throw" === n.type) {
  11034. var o = n.arg;
  11035. resetTryEntry(r);
  11036. }
  11037. return o;
  11038. }
  11039. }
  11040. throw Error("illegal catch attempt");
  11041. },
  11042. delegateYield: function delegateYield(e, r, n) {
  11043. return this.delegate = {
  11044. iterator: values(e),
  11045. resultName: r,
  11046. nextLoc: n
  11047. }, "next" === this.method && (this.arg = t), y;
  11048. }
  11049. }, e;
  11050. }
  11051. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11052. /***/ }),
  11053. /* 51 */
  11054. /*!*****************************************************************!*\
  11055. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  11056. \*****************************************************************/
  11057. /*! no static exports found */
  11058. /***/ (function(module, exports) {
  11059. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  11060. try {
  11061. var info = gen[key](arg);
  11062. var value = info.value;
  11063. } catch (error) {
  11064. reject(error);
  11065. return;
  11066. }
  11067. if (info.done) {
  11068. resolve(value);
  11069. } else {
  11070. Promise.resolve(value).then(_next, _throw);
  11071. }
  11072. }
  11073. function _asyncToGenerator(fn) {
  11074. return function () {
  11075. var self = this,
  11076. args = arguments;
  11077. return new Promise(function (resolve, reject) {
  11078. var gen = fn.apply(self, args);
  11079. function _next(value) {
  11080. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  11081. }
  11082. function _throw(err) {
  11083. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  11084. }
  11085. _next(undefined);
  11086. });
  11087. };
  11088. }
  11089. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11090. /***/ }),
  11091. /* 52 */
  11092. /*!*******************************************************************************************************!*\
  11093. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/buildURL.js ***!
  11094. \*******************************************************************************************************/
  11095. /*! no static exports found */
  11096. /***/ (function(module, exports, __webpack_require__) {
  11097. "use strict";
  11098. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11099. Object.defineProperty(exports, "__esModule", {
  11100. value: true
  11101. });
  11102. exports.default = buildURL;
  11103. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  11104. var _AxiosURLSearchParams = _interopRequireDefault(__webpack_require__(/*! ../helpers/AxiosURLSearchParams.js */ 53));
  11105. /**
  11106. * It replaces URL-encoded forms of `:`, `$`, `,`, and spaces with
  11107. * their plain counterparts (`:`, `$`, `,`, `+`).
  11108. *
  11109. * @param {string} val The value to be encoded.
  11110. *
  11111. * @returns {string} The encoded value.
  11112. */
  11113. function encode(val) {
  11114. return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+');
  11115. }
  11116. /**
  11117. * Build a URL by appending params to the end
  11118. *
  11119. * @param {string} url The base of the url (e.g., http://www.google.com)
  11120. * @param {object} [params] The params to be appended
  11121. * @param {?(object|Function)} options
  11122. *
  11123. * @returns {string} The formatted url
  11124. */
  11125. function buildURL(url, params, options) {
  11126. if (!params) {
  11127. return url;
  11128. }
  11129. var _encode = options && options.encode || encode;
  11130. var _options = _utils.default.isFunction(options) ? {
  11131. serialize: options
  11132. } : options;
  11133. var serializeFn = _options && _options.serialize;
  11134. var serializedParams;
  11135. if (serializeFn) {
  11136. serializedParams = serializeFn(params, _options);
  11137. } else {
  11138. serializedParams = _utils.default.isURLSearchParams(params) ? params.toString() : new _AxiosURLSearchParams.default(params, _options).toString(_encode);
  11139. }
  11140. if (serializedParams) {
  11141. var hashmarkIndex = url.indexOf('#');
  11142. if (hashmarkIndex !== -1) {
  11143. url = url.slice(0, hashmarkIndex);
  11144. }
  11145. url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  11146. }
  11147. return url;
  11148. }
  11149. /***/ }),
  11150. /* 53 */
  11151. /*!*******************************************************************************************************************!*\
  11152. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/AxiosURLSearchParams.js ***!
  11153. \*******************************************************************************************************************/
  11154. /*! no static exports found */
  11155. /***/ (function(module, exports, __webpack_require__) {
  11156. "use strict";
  11157. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11158. Object.defineProperty(exports, "__esModule", {
  11159. value: true
  11160. });
  11161. exports.default = void 0;
  11162. var _toFormData = _interopRequireDefault(__webpack_require__(/*! ./toFormData.js */ 54));
  11163. /**
  11164. * It encodes a string by replacing all characters that are not in the unreserved set with
  11165. * their percent-encoded equivalents
  11166. *
  11167. * @param {string} str - The string to encode.
  11168. *
  11169. * @returns {string} The encoded string.
  11170. */
  11171. function encode(str) {
  11172. var charMap = {
  11173. '!': '%21',
  11174. "'": '%27',
  11175. '(': '%28',
  11176. ')': '%29',
  11177. '~': '%7E',
  11178. '%20': '+'
  11179. };
  11180. return encodeURIComponent(str).replace(/[!'()~]|%20/g, function replacer(match) {
  11181. return charMap[match];
  11182. });
  11183. }
  11184. /**
  11185. * It takes a params object and converts it to a FormData object
  11186. *
  11187. * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
  11188. * @param {Object<string, any>} options - The options object passed to the Axios constructor.
  11189. *
  11190. * @returns {void}
  11191. */
  11192. function AxiosURLSearchParams(params, options) {
  11193. this._pairs = [];
  11194. params && (0, _toFormData.default)(params, this, options);
  11195. }
  11196. var prototype = AxiosURLSearchParams.prototype;
  11197. prototype.append = function append(name, value) {
  11198. this._pairs.push([name, value]);
  11199. };
  11200. prototype.toString = function toString(encoder) {
  11201. var _encode = encoder ? function (value) {
  11202. return encoder.call(this, value, encode);
  11203. } : encode;
  11204. return this._pairs.map(function each(pair) {
  11205. return _encode(pair[0]) + '=' + _encode(pair[1]);
  11206. }, '').join('&');
  11207. };
  11208. var _default = AxiosURLSearchParams;
  11209. exports.default = _default;
  11210. /***/ }),
  11211. /* 54 */
  11212. /*!*********************************************************************************************************!*\
  11213. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/toFormData.js ***!
  11214. \*********************************************************************************************************/
  11215. /*! no static exports found */
  11216. /***/ (function(module, exports, __webpack_require__) {
  11217. "use strict";
  11218. /* WEBPACK VAR INJECTION */(function(Buffer) {
  11219. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11220. Object.defineProperty(exports, "__esModule", {
  11221. value: true
  11222. });
  11223. exports.default = void 0;
  11224. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  11225. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  11226. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 59));
  11227. var _FormData = _interopRequireDefault(__webpack_require__(/*! ../platform/node/classes/FormData.js */ 66));
  11228. // temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
  11229. /**
  11230. * Determines if the given thing is a array or js object.
  11231. *
  11232. * @param {string} thing - The object or array to be visited.
  11233. *
  11234. * @returns {boolean}
  11235. */
  11236. function isVisitable(thing) {
  11237. return _utils.default.isPlainObject(thing) || _utils.default.isArray(thing);
  11238. }
  11239. /**
  11240. * It removes the brackets from the end of a string
  11241. *
  11242. * @param {string} key - The key of the parameter.
  11243. *
  11244. * @returns {string} the key without the brackets.
  11245. */
  11246. function removeBrackets(key) {
  11247. return _utils.default.endsWith(key, '[]') ? key.slice(0, -2) : key;
  11248. }
  11249. /**
  11250. * It takes a path, a key, and a boolean, and returns a string
  11251. *
  11252. * @param {string} path - The path to the current key.
  11253. * @param {string} key - The key of the current object being iterated over.
  11254. * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
  11255. *
  11256. * @returns {string} The path to the current key.
  11257. */
  11258. function renderKey(path, key, dots) {
  11259. if (!path) return key;
  11260. return path.concat(key).map(function each(token, i) {
  11261. // eslint-disable-next-line no-param-reassign
  11262. token = removeBrackets(token);
  11263. return !dots && i ? '[' + token + ']' : token;
  11264. }).join(dots ? '.' : '');
  11265. }
  11266. /**
  11267. * If the array is an array and none of its elements are visitable, then it's a flat array.
  11268. *
  11269. * @param {Array<any>} arr - The array to check
  11270. *
  11271. * @returns {boolean}
  11272. */
  11273. function isFlatArray(arr) {
  11274. return _utils.default.isArray(arr) && !arr.some(isVisitable);
  11275. }
  11276. var predicates = _utils.default.toFlatObject(_utils.default, {}, null, function filter(prop) {
  11277. return /^is[A-Z]/.test(prop);
  11278. });
  11279. /**
  11280. * Convert a data object to FormData
  11281. *
  11282. * @param {Object} obj
  11283. * @param {?Object} [formData]
  11284. * @param {?Object} [options]
  11285. * @param {Function} [options.visitor]
  11286. * @param {Boolean} [options.metaTokens = true]
  11287. * @param {Boolean} [options.dots = false]
  11288. * @param {?Boolean} [options.indexes = false]
  11289. *
  11290. * @returns {Object}
  11291. **/
  11292. /**
  11293. * It converts an object into a FormData object
  11294. *
  11295. * @param {Object<any, any>} obj - The object to convert to form data.
  11296. * @param {string} formData - The FormData object to append to.
  11297. * @param {Object<string, any>} options
  11298. *
  11299. * @returns
  11300. */
  11301. function toFormData(obj, formData, options) {
  11302. if (!_utils.default.isObject(obj)) {
  11303. throw new TypeError('target must be an object');
  11304. }
  11305. // eslint-disable-next-line no-param-reassign
  11306. formData = formData || new (_FormData.default || FormData)();
  11307. // eslint-disable-next-line no-param-reassign
  11308. options = _utils.default.toFlatObject(options, {
  11309. metaTokens: true,
  11310. dots: false,
  11311. indexes: false
  11312. }, false, function defined(option, source) {
  11313. // eslint-disable-next-line no-eq-null,eqeqeq
  11314. return !_utils.default.isUndefined(source[option]);
  11315. });
  11316. var metaTokens = options.metaTokens;
  11317. // eslint-disable-next-line no-use-before-define
  11318. var visitor = options.visitor || defaultVisitor;
  11319. var dots = options.dots;
  11320. var indexes = options.indexes;
  11321. var _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
  11322. var maxDepth = options.maxDepth === undefined ? 100 : options.maxDepth;
  11323. var useBlob = _Blob && _utils.default.isSpecCompliantForm(formData);
  11324. if (!_utils.default.isFunction(visitor)) {
  11325. throw new TypeError('visitor must be a function');
  11326. }
  11327. function convertValue(value) {
  11328. if (value === null) return '';
  11329. if (_utils.default.isDate(value)) {
  11330. return value.toISOString();
  11331. }
  11332. if (_utils.default.isBoolean(value)) {
  11333. return value.toString();
  11334. }
  11335. if (!useBlob && _utils.default.isBlob(value)) {
  11336. throw new _AxiosError.default('Blob is not supported. Use a Buffer instead.');
  11337. }
  11338. if (_utils.default.isArrayBuffer(value) || _utils.default.isTypedArray(value)) {
  11339. return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
  11340. }
  11341. return value;
  11342. }
  11343. /**
  11344. * Default visitor.
  11345. *
  11346. * @param {*} value
  11347. * @param {String|Number} key
  11348. * @param {Array<String|Number>} path
  11349. * @this {FormData}
  11350. *
  11351. * @returns {boolean} return true to visit the each prop of the value recursively
  11352. */
  11353. function defaultVisitor(value, key, path) {
  11354. var arr = value;
  11355. if (_utils.default.isReactNative(formData) && _utils.default.isReactNativeBlob(value)) {
  11356. formData.append(renderKey(path, key, dots), convertValue(value));
  11357. return false;
  11358. }
  11359. if (value && !path && (0, _typeof2.default)(value) === 'object') {
  11360. if (_utils.default.endsWith(key, '{}')) {
  11361. // eslint-disable-next-line no-param-reassign
  11362. key = metaTokens ? key : key.slice(0, -2);
  11363. // eslint-disable-next-line no-param-reassign
  11364. value = JSON.stringify(value);
  11365. } else if (_utils.default.isArray(value) && isFlatArray(value) || (_utils.default.isFileList(value) || _utils.default.endsWith(key, '[]')) && (arr = _utils.default.toArray(value))) {
  11366. // eslint-disable-next-line no-param-reassign
  11367. key = removeBrackets(key);
  11368. arr.forEach(function each(el, index) {
  11369. !(_utils.default.isUndefined(el) || el === null) && formData.append(
  11370. // eslint-disable-next-line no-nested-ternary
  11371. indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + '[]', convertValue(el));
  11372. });
  11373. return false;
  11374. }
  11375. }
  11376. if (isVisitable(value)) {
  11377. return true;
  11378. }
  11379. formData.append(renderKey(path, key, dots), convertValue(value));
  11380. return false;
  11381. }
  11382. var stack = [];
  11383. var exposedHelpers = Object.assign(predicates, {
  11384. defaultVisitor: defaultVisitor,
  11385. convertValue: convertValue,
  11386. isVisitable: isVisitable
  11387. });
  11388. function build(value, path) {
  11389. var depth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
  11390. if (_utils.default.isUndefined(value)) return;
  11391. if (depth > maxDepth) {
  11392. throw new _AxiosError.default('Object is too deeply nested (' + depth + ' levels). Max depth: ' + maxDepth, _AxiosError.default.ERR_FORM_DATA_DEPTH_EXCEEDED);
  11393. }
  11394. if (stack.indexOf(value) !== -1) {
  11395. throw Error('Circular reference detected in ' + path.join('.'));
  11396. }
  11397. stack.push(value);
  11398. _utils.default.forEach(value, function each(el, key) {
  11399. var result = !(_utils.default.isUndefined(el) || el === null) && visitor.call(formData, el, _utils.default.isString(key) ? key.trim() : key, path, exposedHelpers);
  11400. if (result === true) {
  11401. build(el, path ? path.concat(key) : [key], depth + 1);
  11402. }
  11403. });
  11404. stack.pop();
  11405. }
  11406. if (!_utils.default.isObject(obj)) {
  11407. throw new TypeError('data must be an object');
  11408. }
  11409. build(obj);
  11410. return formData;
  11411. }
  11412. var _default = toFormData;
  11413. exports.default = _default;
  11414. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../../../../../HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/buffer/index.js */ 55).Buffer))
  11415. /***/ }),
  11416. /* 55 */
  11417. /*!**************************************!*\
  11418. !*** ./node_modules/buffer/index.js ***!
  11419. \**************************************/
  11420. /*! no static exports found */
  11421. /***/ (function(module, exports, __webpack_require__) {
  11422. "use strict";
  11423. /* WEBPACK VAR INJECTION */(function(global) {/*!
  11424. * The buffer module from node.js, for the browser.
  11425. *
  11426. * @author Feross Aboukhadijeh <http://feross.org>
  11427. * @license MIT
  11428. */
  11429. /* eslint-disable no-proto */
  11430. var base64 = __webpack_require__(/*! base64-js */ 56)
  11431. var ieee754 = __webpack_require__(/*! ieee754 */ 57)
  11432. var isArray = __webpack_require__(/*! isarray */ 58)
  11433. exports.Buffer = Buffer
  11434. exports.SlowBuffer = SlowBuffer
  11435. exports.INSPECT_MAX_BYTES = 50
  11436. /**
  11437. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  11438. * === true Use Uint8Array implementation (fastest)
  11439. * === false Use Object implementation (most compatible, even IE6)
  11440. *
  11441. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  11442. * Opera 11.6+, iOS 4.2+.
  11443. *
  11444. * Due to various browser bugs, sometimes the Object implementation will be used even
  11445. * when the browser supports typed arrays.
  11446. *
  11447. * Note:
  11448. *
  11449. * - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
  11450. * See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
  11451. *
  11452. * - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
  11453. *
  11454. * - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
  11455. * incorrect length in some situations.
  11456. * We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
  11457. * get the Object implementation, which is slower but behaves correctly.
  11458. */
  11459. Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
  11460. ? global.TYPED_ARRAY_SUPPORT
  11461. : typedArraySupport()
  11462. /*
  11463. * Export kMaxLength after typed array support is determined.
  11464. */
  11465. exports.kMaxLength = kMaxLength()
  11466. function typedArraySupport () {
  11467. try {
  11468. var arr = new Uint8Array(1)
  11469. arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
  11470. return arr.foo() === 42 && // typed array instances can be augmented
  11471. typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
  11472. arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
  11473. } catch (e) {
  11474. return false
  11475. }
  11476. }
  11477. function kMaxLength () {
  11478. return Buffer.TYPED_ARRAY_SUPPORT
  11479. ? 0x7fffffff
  11480. : 0x3fffffff
  11481. }
  11482. function createBuffer (that, length) {
  11483. if (kMaxLength() < length) {
  11484. throw new RangeError('Invalid typed array length')
  11485. }
  11486. if (Buffer.TYPED_ARRAY_SUPPORT) {
  11487. // Return an augmented `Uint8Array` instance, for best performance
  11488. that = new Uint8Array(length)
  11489. that.__proto__ = Buffer.prototype
  11490. } else {
  11491. // Fallback: Return an object instance of the Buffer class
  11492. if (that === null) {
  11493. that = new Buffer(length)
  11494. }
  11495. that.length = length
  11496. }
  11497. return that
  11498. }
  11499. /**
  11500. * The Buffer constructor returns instances of `Uint8Array` that have their
  11501. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  11502. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  11503. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  11504. * returns a single octet.
  11505. *
  11506. * The `Uint8Array` prototype remains unmodified.
  11507. */
  11508. function Buffer (arg, encodingOrOffset, length) {
  11509. if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
  11510. return new Buffer(arg, encodingOrOffset, length)
  11511. }
  11512. // Common case.
  11513. if (typeof arg === 'number') {
  11514. if (typeof encodingOrOffset === 'string') {
  11515. throw new Error(
  11516. 'If encoding is specified then the first argument must be a string'
  11517. )
  11518. }
  11519. return allocUnsafe(this, arg)
  11520. }
  11521. return from(this, arg, encodingOrOffset, length)
  11522. }
  11523. Buffer.poolSize = 8192 // not used by this implementation
  11524. // TODO: Legacy, not needed anymore. Remove in next major version.
  11525. Buffer._augment = function (arr) {
  11526. arr.__proto__ = Buffer.prototype
  11527. return arr
  11528. }
  11529. function from (that, value, encodingOrOffset, length) {
  11530. if (typeof value === 'number') {
  11531. throw new TypeError('"value" argument must not be a number')
  11532. }
  11533. if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
  11534. return fromArrayBuffer(that, value, encodingOrOffset, length)
  11535. }
  11536. if (typeof value === 'string') {
  11537. return fromString(that, value, encodingOrOffset)
  11538. }
  11539. return fromObject(that, value)
  11540. }
  11541. /**
  11542. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  11543. * if value is a number.
  11544. * Buffer.from(str[, encoding])
  11545. * Buffer.from(array)
  11546. * Buffer.from(buffer)
  11547. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  11548. **/
  11549. Buffer.from = function (value, encodingOrOffset, length) {
  11550. return from(null, value, encodingOrOffset, length)
  11551. }
  11552. if (Buffer.TYPED_ARRAY_SUPPORT) {
  11553. Buffer.prototype.__proto__ = Uint8Array.prototype
  11554. Buffer.__proto__ = Uint8Array
  11555. if (typeof Symbol !== 'undefined' && Symbol.species &&
  11556. Buffer[Symbol.species] === Buffer) {
  11557. // Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
  11558. Object.defineProperty(Buffer, Symbol.species, {
  11559. value: null,
  11560. configurable: true
  11561. })
  11562. }
  11563. }
  11564. function assertSize (size) {
  11565. if (typeof size !== 'number') {
  11566. throw new TypeError('"size" argument must be a number')
  11567. } else if (size < 0) {
  11568. throw new RangeError('"size" argument must not be negative')
  11569. }
  11570. }
  11571. function alloc (that, size, fill, encoding) {
  11572. assertSize(size)
  11573. if (size <= 0) {
  11574. return createBuffer(that, size)
  11575. }
  11576. if (fill !== undefined) {
  11577. // Only pay attention to encoding if it's a string. This
  11578. // prevents accidentally sending in a number that would
  11579. // be interpretted as a start offset.
  11580. return typeof encoding === 'string'
  11581. ? createBuffer(that, size).fill(fill, encoding)
  11582. : createBuffer(that, size).fill(fill)
  11583. }
  11584. return createBuffer(that, size)
  11585. }
  11586. /**
  11587. * Creates a new filled Buffer instance.
  11588. * alloc(size[, fill[, encoding]])
  11589. **/
  11590. Buffer.alloc = function (size, fill, encoding) {
  11591. return alloc(null, size, fill, encoding)
  11592. }
  11593. function allocUnsafe (that, size) {
  11594. assertSize(size)
  11595. that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
  11596. if (!Buffer.TYPED_ARRAY_SUPPORT) {
  11597. for (var i = 0; i < size; ++i) {
  11598. that[i] = 0
  11599. }
  11600. }
  11601. return that
  11602. }
  11603. /**
  11604. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  11605. * */
  11606. Buffer.allocUnsafe = function (size) {
  11607. return allocUnsafe(null, size)
  11608. }
  11609. /**
  11610. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  11611. */
  11612. Buffer.allocUnsafeSlow = function (size) {
  11613. return allocUnsafe(null, size)
  11614. }
  11615. function fromString (that, string, encoding) {
  11616. if (typeof encoding !== 'string' || encoding === '') {
  11617. encoding = 'utf8'
  11618. }
  11619. if (!Buffer.isEncoding(encoding)) {
  11620. throw new TypeError('"encoding" must be a valid string encoding')
  11621. }
  11622. var length = byteLength(string, encoding) | 0
  11623. that = createBuffer(that, length)
  11624. var actual = that.write(string, encoding)
  11625. if (actual !== length) {
  11626. // Writing a hex string, for example, that contains invalid characters will
  11627. // cause everything after the first invalid character to be ignored. (e.g.
  11628. // 'abxxcd' will be treated as 'ab')
  11629. that = that.slice(0, actual)
  11630. }
  11631. return that
  11632. }
  11633. function fromArrayLike (that, array) {
  11634. var length = array.length < 0 ? 0 : checked(array.length) | 0
  11635. that = createBuffer(that, length)
  11636. for (var i = 0; i < length; i += 1) {
  11637. that[i] = array[i] & 255
  11638. }
  11639. return that
  11640. }
  11641. function fromArrayBuffer (that, array, byteOffset, length) {
  11642. array.byteLength // this throws if `array` is not a valid ArrayBuffer
  11643. if (byteOffset < 0 || array.byteLength < byteOffset) {
  11644. throw new RangeError('\'offset\' is out of bounds')
  11645. }
  11646. if (array.byteLength < byteOffset + (length || 0)) {
  11647. throw new RangeError('\'length\' is out of bounds')
  11648. }
  11649. if (byteOffset === undefined && length === undefined) {
  11650. array = new Uint8Array(array)
  11651. } else if (length === undefined) {
  11652. array = new Uint8Array(array, byteOffset)
  11653. } else {
  11654. array = new Uint8Array(array, byteOffset, length)
  11655. }
  11656. if (Buffer.TYPED_ARRAY_SUPPORT) {
  11657. // Return an augmented `Uint8Array` instance, for best performance
  11658. that = array
  11659. that.__proto__ = Buffer.prototype
  11660. } else {
  11661. // Fallback: Return an object instance of the Buffer class
  11662. that = fromArrayLike(that, array)
  11663. }
  11664. return that
  11665. }
  11666. function fromObject (that, obj) {
  11667. if (Buffer.isBuffer(obj)) {
  11668. var len = checked(obj.length) | 0
  11669. that = createBuffer(that, len)
  11670. if (that.length === 0) {
  11671. return that
  11672. }
  11673. obj.copy(that, 0, 0, len)
  11674. return that
  11675. }
  11676. if (obj) {
  11677. if ((typeof ArrayBuffer !== 'undefined' &&
  11678. obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
  11679. if (typeof obj.length !== 'number' || isnan(obj.length)) {
  11680. return createBuffer(that, 0)
  11681. }
  11682. return fromArrayLike(that, obj)
  11683. }
  11684. if (obj.type === 'Buffer' && isArray(obj.data)) {
  11685. return fromArrayLike(that, obj.data)
  11686. }
  11687. }
  11688. throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
  11689. }
  11690. function checked (length) {
  11691. // Note: cannot use `length < kMaxLength()` here because that fails when
  11692. // length is NaN (which is otherwise coerced to zero.)
  11693. if (length >= kMaxLength()) {
  11694. throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
  11695. 'size: 0x' + kMaxLength().toString(16) + ' bytes')
  11696. }
  11697. return length | 0
  11698. }
  11699. function SlowBuffer (length) {
  11700. if (+length != length) { // eslint-disable-line eqeqeq
  11701. length = 0
  11702. }
  11703. return Buffer.alloc(+length)
  11704. }
  11705. Buffer.isBuffer = function isBuffer (b) {
  11706. return !!(b != null && b._isBuffer)
  11707. }
  11708. Buffer.compare = function compare (a, b) {
  11709. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  11710. throw new TypeError('Arguments must be Buffers')
  11711. }
  11712. if (a === b) return 0
  11713. var x = a.length
  11714. var y = b.length
  11715. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  11716. if (a[i] !== b[i]) {
  11717. x = a[i]
  11718. y = b[i]
  11719. break
  11720. }
  11721. }
  11722. if (x < y) return -1
  11723. if (y < x) return 1
  11724. return 0
  11725. }
  11726. Buffer.isEncoding = function isEncoding (encoding) {
  11727. switch (String(encoding).toLowerCase()) {
  11728. case 'hex':
  11729. case 'utf8':
  11730. case 'utf-8':
  11731. case 'ascii':
  11732. case 'latin1':
  11733. case 'binary':
  11734. case 'base64':
  11735. case 'ucs2':
  11736. case 'ucs-2':
  11737. case 'utf16le':
  11738. case 'utf-16le':
  11739. return true
  11740. default:
  11741. return false
  11742. }
  11743. }
  11744. Buffer.concat = function concat (list, length) {
  11745. if (!isArray(list)) {
  11746. throw new TypeError('"list" argument must be an Array of Buffers')
  11747. }
  11748. if (list.length === 0) {
  11749. return Buffer.alloc(0)
  11750. }
  11751. var i
  11752. if (length === undefined) {
  11753. length = 0
  11754. for (i = 0; i < list.length; ++i) {
  11755. length += list[i].length
  11756. }
  11757. }
  11758. var buffer = Buffer.allocUnsafe(length)
  11759. var pos = 0
  11760. for (i = 0; i < list.length; ++i) {
  11761. var buf = list[i]
  11762. if (!Buffer.isBuffer(buf)) {
  11763. throw new TypeError('"list" argument must be an Array of Buffers')
  11764. }
  11765. buf.copy(buffer, pos)
  11766. pos += buf.length
  11767. }
  11768. return buffer
  11769. }
  11770. function byteLength (string, encoding) {
  11771. if (Buffer.isBuffer(string)) {
  11772. return string.length
  11773. }
  11774. if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
  11775. (ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
  11776. return string.byteLength
  11777. }
  11778. if (typeof string !== 'string') {
  11779. string = '' + string
  11780. }
  11781. var len = string.length
  11782. if (len === 0) return 0
  11783. // Use a for loop to avoid recursion
  11784. var loweredCase = false
  11785. for (;;) {
  11786. switch (encoding) {
  11787. case 'ascii':
  11788. case 'latin1':
  11789. case 'binary':
  11790. return len
  11791. case 'utf8':
  11792. case 'utf-8':
  11793. case undefined:
  11794. return utf8ToBytes(string).length
  11795. case 'ucs2':
  11796. case 'ucs-2':
  11797. case 'utf16le':
  11798. case 'utf-16le':
  11799. return len * 2
  11800. case 'hex':
  11801. return len >>> 1
  11802. case 'base64':
  11803. return base64ToBytes(string).length
  11804. default:
  11805. if (loweredCase) return utf8ToBytes(string).length // assume utf8
  11806. encoding = ('' + encoding).toLowerCase()
  11807. loweredCase = true
  11808. }
  11809. }
  11810. }
  11811. Buffer.byteLength = byteLength
  11812. function slowToString (encoding, start, end) {
  11813. var loweredCase = false
  11814. // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  11815. // property of a typed array.
  11816. // This behaves neither like String nor Uint8Array in that we set start/end
  11817. // to their upper/lower bounds if the value passed is out of range.
  11818. // undefined is handled specially as per ECMA-262 6th Edition,
  11819. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  11820. if (start === undefined || start < 0) {
  11821. start = 0
  11822. }
  11823. // Return early if start > this.length. Done here to prevent potential uint32
  11824. // coercion fail below.
  11825. if (start > this.length) {
  11826. return ''
  11827. }
  11828. if (end === undefined || end > this.length) {
  11829. end = this.length
  11830. }
  11831. if (end <= 0) {
  11832. return ''
  11833. }
  11834. // Force coersion to uint32. This will also coerce falsey/NaN values to 0.
  11835. end >>>= 0
  11836. start >>>= 0
  11837. if (end <= start) {
  11838. return ''
  11839. }
  11840. if (!encoding) encoding = 'utf8'
  11841. while (true) {
  11842. switch (encoding) {
  11843. case 'hex':
  11844. return hexSlice(this, start, end)
  11845. case 'utf8':
  11846. case 'utf-8':
  11847. return utf8Slice(this, start, end)
  11848. case 'ascii':
  11849. return asciiSlice(this, start, end)
  11850. case 'latin1':
  11851. case 'binary':
  11852. return latin1Slice(this, start, end)
  11853. case 'base64':
  11854. return base64Slice(this, start, end)
  11855. case 'ucs2':
  11856. case 'ucs-2':
  11857. case 'utf16le':
  11858. case 'utf-16le':
  11859. return utf16leSlice(this, start, end)
  11860. default:
  11861. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  11862. encoding = (encoding + '').toLowerCase()
  11863. loweredCase = true
  11864. }
  11865. }
  11866. }
  11867. // The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
  11868. // Buffer instances.
  11869. Buffer.prototype._isBuffer = true
  11870. function swap (b, n, m) {
  11871. var i = b[n]
  11872. b[n] = b[m]
  11873. b[m] = i
  11874. }
  11875. Buffer.prototype.swap16 = function swap16 () {
  11876. var len = this.length
  11877. if (len % 2 !== 0) {
  11878. throw new RangeError('Buffer size must be a multiple of 16-bits')
  11879. }
  11880. for (var i = 0; i < len; i += 2) {
  11881. swap(this, i, i + 1)
  11882. }
  11883. return this
  11884. }
  11885. Buffer.prototype.swap32 = function swap32 () {
  11886. var len = this.length
  11887. if (len % 4 !== 0) {
  11888. throw new RangeError('Buffer size must be a multiple of 32-bits')
  11889. }
  11890. for (var i = 0; i < len; i += 4) {
  11891. swap(this, i, i + 3)
  11892. swap(this, i + 1, i + 2)
  11893. }
  11894. return this
  11895. }
  11896. Buffer.prototype.swap64 = function swap64 () {
  11897. var len = this.length
  11898. if (len % 8 !== 0) {
  11899. throw new RangeError('Buffer size must be a multiple of 64-bits')
  11900. }
  11901. for (var i = 0; i < len; i += 8) {
  11902. swap(this, i, i + 7)
  11903. swap(this, i + 1, i + 6)
  11904. swap(this, i + 2, i + 5)
  11905. swap(this, i + 3, i + 4)
  11906. }
  11907. return this
  11908. }
  11909. Buffer.prototype.toString = function toString () {
  11910. var length = this.length | 0
  11911. if (length === 0) return ''
  11912. if (arguments.length === 0) return utf8Slice(this, 0, length)
  11913. return slowToString.apply(this, arguments)
  11914. }
  11915. Buffer.prototype.equals = function equals (b) {
  11916. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
  11917. if (this === b) return true
  11918. return Buffer.compare(this, b) === 0
  11919. }
  11920. Buffer.prototype.inspect = function inspect () {
  11921. var str = ''
  11922. var max = exports.INSPECT_MAX_BYTES
  11923. if (this.length > 0) {
  11924. str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
  11925. if (this.length > max) str += ' ... '
  11926. }
  11927. return '<Buffer ' + str + '>'
  11928. }
  11929. Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
  11930. if (!Buffer.isBuffer(target)) {
  11931. throw new TypeError('Argument must be a Buffer')
  11932. }
  11933. if (start === undefined) {
  11934. start = 0
  11935. }
  11936. if (end === undefined) {
  11937. end = target ? target.length : 0
  11938. }
  11939. if (thisStart === undefined) {
  11940. thisStart = 0
  11941. }
  11942. if (thisEnd === undefined) {
  11943. thisEnd = this.length
  11944. }
  11945. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  11946. throw new RangeError('out of range index')
  11947. }
  11948. if (thisStart >= thisEnd && start >= end) {
  11949. return 0
  11950. }
  11951. if (thisStart >= thisEnd) {
  11952. return -1
  11953. }
  11954. if (start >= end) {
  11955. return 1
  11956. }
  11957. start >>>= 0
  11958. end >>>= 0
  11959. thisStart >>>= 0
  11960. thisEnd >>>= 0
  11961. if (this === target) return 0
  11962. var x = thisEnd - thisStart
  11963. var y = end - start
  11964. var len = Math.min(x, y)
  11965. var thisCopy = this.slice(thisStart, thisEnd)
  11966. var targetCopy = target.slice(start, end)
  11967. for (var i = 0; i < len; ++i) {
  11968. if (thisCopy[i] !== targetCopy[i]) {
  11969. x = thisCopy[i]
  11970. y = targetCopy[i]
  11971. break
  11972. }
  11973. }
  11974. if (x < y) return -1
  11975. if (y < x) return 1
  11976. return 0
  11977. }
  11978. // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  11979. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  11980. //
  11981. // Arguments:
  11982. // - buffer - a Buffer to search
  11983. // - val - a string, Buffer, or number
  11984. // - byteOffset - an index into `buffer`; will be clamped to an int32
  11985. // - encoding - an optional encoding, relevant is val is a string
  11986. // - dir - true for indexOf, false for lastIndexOf
  11987. function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
  11988. // Empty buffer means no match
  11989. if (buffer.length === 0) return -1
  11990. // Normalize byteOffset
  11991. if (typeof byteOffset === 'string') {
  11992. encoding = byteOffset
  11993. byteOffset = 0
  11994. } else if (byteOffset > 0x7fffffff) {
  11995. byteOffset = 0x7fffffff
  11996. } else if (byteOffset < -0x80000000) {
  11997. byteOffset = -0x80000000
  11998. }
  11999. byteOffset = +byteOffset // Coerce to Number.
  12000. if (isNaN(byteOffset)) {
  12001. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  12002. byteOffset = dir ? 0 : (buffer.length - 1)
  12003. }
  12004. // Normalize byteOffset: negative offsets start from the end of the buffer
  12005. if (byteOffset < 0) byteOffset = buffer.length + byteOffset
  12006. if (byteOffset >= buffer.length) {
  12007. if (dir) return -1
  12008. else byteOffset = buffer.length - 1
  12009. } else if (byteOffset < 0) {
  12010. if (dir) byteOffset = 0
  12011. else return -1
  12012. }
  12013. // Normalize val
  12014. if (typeof val === 'string') {
  12015. val = Buffer.from(val, encoding)
  12016. }
  12017. // Finally, search either indexOf (if dir is true) or lastIndexOf
  12018. if (Buffer.isBuffer(val)) {
  12019. // Special case: looking for empty string/buffer always fails
  12020. if (val.length === 0) {
  12021. return -1
  12022. }
  12023. return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
  12024. } else if (typeof val === 'number') {
  12025. val = val & 0xFF // Search for a byte value [0-255]
  12026. if (Buffer.TYPED_ARRAY_SUPPORT &&
  12027. typeof Uint8Array.prototype.indexOf === 'function') {
  12028. if (dir) {
  12029. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
  12030. } else {
  12031. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
  12032. }
  12033. }
  12034. return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
  12035. }
  12036. throw new TypeError('val must be string, number or Buffer')
  12037. }
  12038. function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
  12039. var indexSize = 1
  12040. var arrLength = arr.length
  12041. var valLength = val.length
  12042. if (encoding !== undefined) {
  12043. encoding = String(encoding).toLowerCase()
  12044. if (encoding === 'ucs2' || encoding === 'ucs-2' ||
  12045. encoding === 'utf16le' || encoding === 'utf-16le') {
  12046. if (arr.length < 2 || val.length < 2) {
  12047. return -1
  12048. }
  12049. indexSize = 2
  12050. arrLength /= 2
  12051. valLength /= 2
  12052. byteOffset /= 2
  12053. }
  12054. }
  12055. function read (buf, i) {
  12056. if (indexSize === 1) {
  12057. return buf[i]
  12058. } else {
  12059. return buf.readUInt16BE(i * indexSize)
  12060. }
  12061. }
  12062. var i
  12063. if (dir) {
  12064. var foundIndex = -1
  12065. for (i = byteOffset; i < arrLength; i++) {
  12066. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  12067. if (foundIndex === -1) foundIndex = i
  12068. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
  12069. } else {
  12070. if (foundIndex !== -1) i -= i - foundIndex
  12071. foundIndex = -1
  12072. }
  12073. }
  12074. } else {
  12075. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
  12076. for (i = byteOffset; i >= 0; i--) {
  12077. var found = true
  12078. for (var j = 0; j < valLength; j++) {
  12079. if (read(arr, i + j) !== read(val, j)) {
  12080. found = false
  12081. break
  12082. }
  12083. }
  12084. if (found) return i
  12085. }
  12086. }
  12087. return -1
  12088. }
  12089. Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
  12090. return this.indexOf(val, byteOffset, encoding) !== -1
  12091. }
  12092. Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
  12093. return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
  12094. }
  12095. Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
  12096. return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
  12097. }
  12098. function hexWrite (buf, string, offset, length) {
  12099. offset = Number(offset) || 0
  12100. var remaining = buf.length - offset
  12101. if (!length) {
  12102. length = remaining
  12103. } else {
  12104. length = Number(length)
  12105. if (length > remaining) {
  12106. length = remaining
  12107. }
  12108. }
  12109. // must be an even number of digits
  12110. var strLen = string.length
  12111. if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
  12112. if (length > strLen / 2) {
  12113. length = strLen / 2
  12114. }
  12115. for (var i = 0; i < length; ++i) {
  12116. var parsed = parseInt(string.substr(i * 2, 2), 16)
  12117. if (isNaN(parsed)) return i
  12118. buf[offset + i] = parsed
  12119. }
  12120. return i
  12121. }
  12122. function utf8Write (buf, string, offset, length) {
  12123. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
  12124. }
  12125. function asciiWrite (buf, string, offset, length) {
  12126. return blitBuffer(asciiToBytes(string), buf, offset, length)
  12127. }
  12128. function latin1Write (buf, string, offset, length) {
  12129. return asciiWrite(buf, string, offset, length)
  12130. }
  12131. function base64Write (buf, string, offset, length) {
  12132. return blitBuffer(base64ToBytes(string), buf, offset, length)
  12133. }
  12134. function ucs2Write (buf, string, offset, length) {
  12135. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
  12136. }
  12137. Buffer.prototype.write = function write (string, offset, length, encoding) {
  12138. // Buffer#write(string)
  12139. if (offset === undefined) {
  12140. encoding = 'utf8'
  12141. length = this.length
  12142. offset = 0
  12143. // Buffer#write(string, encoding)
  12144. } else if (length === undefined && typeof offset === 'string') {
  12145. encoding = offset
  12146. length = this.length
  12147. offset = 0
  12148. // Buffer#write(string, offset[, length][, encoding])
  12149. } else if (isFinite(offset)) {
  12150. offset = offset | 0
  12151. if (isFinite(length)) {
  12152. length = length | 0
  12153. if (encoding === undefined) encoding = 'utf8'
  12154. } else {
  12155. encoding = length
  12156. length = undefined
  12157. }
  12158. // legacy write(string, encoding, offset, length) - remove in v0.13
  12159. } else {
  12160. throw new Error(
  12161. 'Buffer.write(string, encoding, offset[, length]) is no longer supported'
  12162. )
  12163. }
  12164. var remaining = this.length - offset
  12165. if (length === undefined || length > remaining) length = remaining
  12166. if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
  12167. throw new RangeError('Attempt to write outside buffer bounds')
  12168. }
  12169. if (!encoding) encoding = 'utf8'
  12170. var loweredCase = false
  12171. for (;;) {
  12172. switch (encoding) {
  12173. case 'hex':
  12174. return hexWrite(this, string, offset, length)
  12175. case 'utf8':
  12176. case 'utf-8':
  12177. return utf8Write(this, string, offset, length)
  12178. case 'ascii':
  12179. return asciiWrite(this, string, offset, length)
  12180. case 'latin1':
  12181. case 'binary':
  12182. return latin1Write(this, string, offset, length)
  12183. case 'base64':
  12184. // Warning: maxLength not taken into account in base64Write
  12185. return base64Write(this, string, offset, length)
  12186. case 'ucs2':
  12187. case 'ucs-2':
  12188. case 'utf16le':
  12189. case 'utf-16le':
  12190. return ucs2Write(this, string, offset, length)
  12191. default:
  12192. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
  12193. encoding = ('' + encoding).toLowerCase()
  12194. loweredCase = true
  12195. }
  12196. }
  12197. }
  12198. Buffer.prototype.toJSON = function toJSON () {
  12199. return {
  12200. type: 'Buffer',
  12201. data: Array.prototype.slice.call(this._arr || this, 0)
  12202. }
  12203. }
  12204. function base64Slice (buf, start, end) {
  12205. if (start === 0 && end === buf.length) {
  12206. return base64.fromByteArray(buf)
  12207. } else {
  12208. return base64.fromByteArray(buf.slice(start, end))
  12209. }
  12210. }
  12211. function utf8Slice (buf, start, end) {
  12212. end = Math.min(buf.length, end)
  12213. var res = []
  12214. var i = start
  12215. while (i < end) {
  12216. var firstByte = buf[i]
  12217. var codePoint = null
  12218. var bytesPerSequence = (firstByte > 0xEF) ? 4
  12219. : (firstByte > 0xDF) ? 3
  12220. : (firstByte > 0xBF) ? 2
  12221. : 1
  12222. if (i + bytesPerSequence <= end) {
  12223. var secondByte, thirdByte, fourthByte, tempCodePoint
  12224. switch (bytesPerSequence) {
  12225. case 1:
  12226. if (firstByte < 0x80) {
  12227. codePoint = firstByte
  12228. }
  12229. break
  12230. case 2:
  12231. secondByte = buf[i + 1]
  12232. if ((secondByte & 0xC0) === 0x80) {
  12233. tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
  12234. if (tempCodePoint > 0x7F) {
  12235. codePoint = tempCodePoint
  12236. }
  12237. }
  12238. break
  12239. case 3:
  12240. secondByte = buf[i + 1]
  12241. thirdByte = buf[i + 2]
  12242. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  12243. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
  12244. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  12245. codePoint = tempCodePoint
  12246. }
  12247. }
  12248. break
  12249. case 4:
  12250. secondByte = buf[i + 1]
  12251. thirdByte = buf[i + 2]
  12252. fourthByte = buf[i + 3]
  12253. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  12254. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
  12255. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  12256. codePoint = tempCodePoint
  12257. }
  12258. }
  12259. }
  12260. }
  12261. if (codePoint === null) {
  12262. // we did not generate a valid codePoint so insert a
  12263. // replacement char (U+FFFD) and advance only 1 byte
  12264. codePoint = 0xFFFD
  12265. bytesPerSequence = 1
  12266. } else if (codePoint > 0xFFFF) {
  12267. // encode to utf16 (surrogate pair dance)
  12268. codePoint -= 0x10000
  12269. res.push(codePoint >>> 10 & 0x3FF | 0xD800)
  12270. codePoint = 0xDC00 | codePoint & 0x3FF
  12271. }
  12272. res.push(codePoint)
  12273. i += bytesPerSequence
  12274. }
  12275. return decodeCodePointsArray(res)
  12276. }
  12277. // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  12278. // the lowest limit is Chrome, with 0x10000 args.
  12279. // We go 1 magnitude less, for safety
  12280. var MAX_ARGUMENTS_LENGTH = 0x1000
  12281. function decodeCodePointsArray (codePoints) {
  12282. var len = codePoints.length
  12283. if (len <= MAX_ARGUMENTS_LENGTH) {
  12284. return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
  12285. }
  12286. // Decode in chunks to avoid "call stack size exceeded".
  12287. var res = ''
  12288. var i = 0
  12289. while (i < len) {
  12290. res += String.fromCharCode.apply(
  12291. String,
  12292. codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
  12293. )
  12294. }
  12295. return res
  12296. }
  12297. function asciiSlice (buf, start, end) {
  12298. var ret = ''
  12299. end = Math.min(buf.length, end)
  12300. for (var i = start; i < end; ++i) {
  12301. ret += String.fromCharCode(buf[i] & 0x7F)
  12302. }
  12303. return ret
  12304. }
  12305. function latin1Slice (buf, start, end) {
  12306. var ret = ''
  12307. end = Math.min(buf.length, end)
  12308. for (var i = start; i < end; ++i) {
  12309. ret += String.fromCharCode(buf[i])
  12310. }
  12311. return ret
  12312. }
  12313. function hexSlice (buf, start, end) {
  12314. var len = buf.length
  12315. if (!start || start < 0) start = 0
  12316. if (!end || end < 0 || end > len) end = len
  12317. var out = ''
  12318. for (var i = start; i < end; ++i) {
  12319. out += toHex(buf[i])
  12320. }
  12321. return out
  12322. }
  12323. function utf16leSlice (buf, start, end) {
  12324. var bytes = buf.slice(start, end)
  12325. var res = ''
  12326. for (var i = 0; i < bytes.length; i += 2) {
  12327. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
  12328. }
  12329. return res
  12330. }
  12331. Buffer.prototype.slice = function slice (start, end) {
  12332. var len = this.length
  12333. start = ~~start
  12334. end = end === undefined ? len : ~~end
  12335. if (start < 0) {
  12336. start += len
  12337. if (start < 0) start = 0
  12338. } else if (start > len) {
  12339. start = len
  12340. }
  12341. if (end < 0) {
  12342. end += len
  12343. if (end < 0) end = 0
  12344. } else if (end > len) {
  12345. end = len
  12346. }
  12347. if (end < start) end = start
  12348. var newBuf
  12349. if (Buffer.TYPED_ARRAY_SUPPORT) {
  12350. newBuf = this.subarray(start, end)
  12351. newBuf.__proto__ = Buffer.prototype
  12352. } else {
  12353. var sliceLen = end - start
  12354. newBuf = new Buffer(sliceLen, undefined)
  12355. for (var i = 0; i < sliceLen; ++i) {
  12356. newBuf[i] = this[i + start]
  12357. }
  12358. }
  12359. return newBuf
  12360. }
  12361. /*
  12362. * Need to make sure that buffer isn't trying to write out of bounds.
  12363. */
  12364. function checkOffset (offset, ext, length) {
  12365. if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
  12366. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
  12367. }
  12368. Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
  12369. offset = offset | 0
  12370. byteLength = byteLength | 0
  12371. if (!noAssert) checkOffset(offset, byteLength, this.length)
  12372. var val = this[offset]
  12373. var mul = 1
  12374. var i = 0
  12375. while (++i < byteLength && (mul *= 0x100)) {
  12376. val += this[offset + i] * mul
  12377. }
  12378. return val
  12379. }
  12380. Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
  12381. offset = offset | 0
  12382. byteLength = byteLength | 0
  12383. if (!noAssert) {
  12384. checkOffset(offset, byteLength, this.length)
  12385. }
  12386. var val = this[offset + --byteLength]
  12387. var mul = 1
  12388. while (byteLength > 0 && (mul *= 0x100)) {
  12389. val += this[offset + --byteLength] * mul
  12390. }
  12391. return val
  12392. }
  12393. Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
  12394. if (!noAssert) checkOffset(offset, 1, this.length)
  12395. return this[offset]
  12396. }
  12397. Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
  12398. if (!noAssert) checkOffset(offset, 2, this.length)
  12399. return this[offset] | (this[offset + 1] << 8)
  12400. }
  12401. Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
  12402. if (!noAssert) checkOffset(offset, 2, this.length)
  12403. return (this[offset] << 8) | this[offset + 1]
  12404. }
  12405. Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
  12406. if (!noAssert) checkOffset(offset, 4, this.length)
  12407. return ((this[offset]) |
  12408. (this[offset + 1] << 8) |
  12409. (this[offset + 2] << 16)) +
  12410. (this[offset + 3] * 0x1000000)
  12411. }
  12412. Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
  12413. if (!noAssert) checkOffset(offset, 4, this.length)
  12414. return (this[offset] * 0x1000000) +
  12415. ((this[offset + 1] << 16) |
  12416. (this[offset + 2] << 8) |
  12417. this[offset + 3])
  12418. }
  12419. Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
  12420. offset = offset | 0
  12421. byteLength = byteLength | 0
  12422. if (!noAssert) checkOffset(offset, byteLength, this.length)
  12423. var val = this[offset]
  12424. var mul = 1
  12425. var i = 0
  12426. while (++i < byteLength && (mul *= 0x100)) {
  12427. val += this[offset + i] * mul
  12428. }
  12429. mul *= 0x80
  12430. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  12431. return val
  12432. }
  12433. Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
  12434. offset = offset | 0
  12435. byteLength = byteLength | 0
  12436. if (!noAssert) checkOffset(offset, byteLength, this.length)
  12437. var i = byteLength
  12438. var mul = 1
  12439. var val = this[offset + --i]
  12440. while (i > 0 && (mul *= 0x100)) {
  12441. val += this[offset + --i] * mul
  12442. }
  12443. mul *= 0x80
  12444. if (val >= mul) val -= Math.pow(2, 8 * byteLength)
  12445. return val
  12446. }
  12447. Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
  12448. if (!noAssert) checkOffset(offset, 1, this.length)
  12449. if (!(this[offset] & 0x80)) return (this[offset])
  12450. return ((0xff - this[offset] + 1) * -1)
  12451. }
  12452. Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
  12453. if (!noAssert) checkOffset(offset, 2, this.length)
  12454. var val = this[offset] | (this[offset + 1] << 8)
  12455. return (val & 0x8000) ? val | 0xFFFF0000 : val
  12456. }
  12457. Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
  12458. if (!noAssert) checkOffset(offset, 2, this.length)
  12459. var val = this[offset + 1] | (this[offset] << 8)
  12460. return (val & 0x8000) ? val | 0xFFFF0000 : val
  12461. }
  12462. Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
  12463. if (!noAssert) checkOffset(offset, 4, this.length)
  12464. return (this[offset]) |
  12465. (this[offset + 1] << 8) |
  12466. (this[offset + 2] << 16) |
  12467. (this[offset + 3] << 24)
  12468. }
  12469. Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
  12470. if (!noAssert) checkOffset(offset, 4, this.length)
  12471. return (this[offset] << 24) |
  12472. (this[offset + 1] << 16) |
  12473. (this[offset + 2] << 8) |
  12474. (this[offset + 3])
  12475. }
  12476. Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
  12477. if (!noAssert) checkOffset(offset, 4, this.length)
  12478. return ieee754.read(this, offset, true, 23, 4)
  12479. }
  12480. Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
  12481. if (!noAssert) checkOffset(offset, 4, this.length)
  12482. return ieee754.read(this, offset, false, 23, 4)
  12483. }
  12484. Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
  12485. if (!noAssert) checkOffset(offset, 8, this.length)
  12486. return ieee754.read(this, offset, true, 52, 8)
  12487. }
  12488. Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
  12489. if (!noAssert) checkOffset(offset, 8, this.length)
  12490. return ieee754.read(this, offset, false, 52, 8)
  12491. }
  12492. function checkInt (buf, value, offset, ext, max, min) {
  12493. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
  12494. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
  12495. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  12496. }
  12497. Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
  12498. value = +value
  12499. offset = offset | 0
  12500. byteLength = byteLength | 0
  12501. if (!noAssert) {
  12502. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  12503. checkInt(this, value, offset, byteLength, maxBytes, 0)
  12504. }
  12505. var mul = 1
  12506. var i = 0
  12507. this[offset] = value & 0xFF
  12508. while (++i < byteLength && (mul *= 0x100)) {
  12509. this[offset + i] = (value / mul) & 0xFF
  12510. }
  12511. return offset + byteLength
  12512. }
  12513. Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
  12514. value = +value
  12515. offset = offset | 0
  12516. byteLength = byteLength | 0
  12517. if (!noAssert) {
  12518. var maxBytes = Math.pow(2, 8 * byteLength) - 1
  12519. checkInt(this, value, offset, byteLength, maxBytes, 0)
  12520. }
  12521. var i = byteLength - 1
  12522. var mul = 1
  12523. this[offset + i] = value & 0xFF
  12524. while (--i >= 0 && (mul *= 0x100)) {
  12525. this[offset + i] = (value / mul) & 0xFF
  12526. }
  12527. return offset + byteLength
  12528. }
  12529. Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
  12530. value = +value
  12531. offset = offset | 0
  12532. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
  12533. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  12534. this[offset] = (value & 0xff)
  12535. return offset + 1
  12536. }
  12537. function objectWriteUInt16 (buf, value, offset, littleEndian) {
  12538. if (value < 0) value = 0xffff + value + 1
  12539. for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
  12540. buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
  12541. (littleEndian ? i : 1 - i) * 8
  12542. }
  12543. }
  12544. Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
  12545. value = +value
  12546. offset = offset | 0
  12547. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  12548. if (Buffer.TYPED_ARRAY_SUPPORT) {
  12549. this[offset] = (value & 0xff)
  12550. this[offset + 1] = (value >>> 8)
  12551. } else {
  12552. objectWriteUInt16(this, value, offset, true)
  12553. }
  12554. return offset + 2
  12555. }
  12556. Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
  12557. value = +value
  12558. offset = offset | 0
  12559. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
  12560. if (Buffer.TYPED_ARRAY_SUPPORT) {
  12561. this[offset] = (value >>> 8)
  12562. this[offset + 1] = (value & 0xff)
  12563. } else {
  12564. objectWriteUInt16(this, value, offset, false)
  12565. }
  12566. return offset + 2
  12567. }
  12568. function objectWriteUInt32 (buf, value, offset, littleEndian) {
  12569. if (value < 0) value = 0xffffffff + value + 1
  12570. for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
  12571. buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
  12572. }
  12573. }
  12574. Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
  12575. value = +value
  12576. offset = offset | 0
  12577. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  12578. if (Buffer.TYPED_ARRAY_SUPPORT) {
  12579. this[offset + 3] = (value >>> 24)
  12580. this[offset + 2] = (value >>> 16)
  12581. this[offset + 1] = (value >>> 8)
  12582. this[offset] = (value & 0xff)
  12583. } else {
  12584. objectWriteUInt32(this, value, offset, true)
  12585. }
  12586. return offset + 4
  12587. }
  12588. Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
  12589. value = +value
  12590. offset = offset | 0
  12591. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
  12592. if (Buffer.TYPED_ARRAY_SUPPORT) {
  12593. this[offset] = (value >>> 24)
  12594. this[offset + 1] = (value >>> 16)
  12595. this[offset + 2] = (value >>> 8)
  12596. this[offset + 3] = (value & 0xff)
  12597. } else {
  12598. objectWriteUInt32(this, value, offset, false)
  12599. }
  12600. return offset + 4
  12601. }
  12602. Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
  12603. value = +value
  12604. offset = offset | 0
  12605. if (!noAssert) {
  12606. var limit = Math.pow(2, 8 * byteLength - 1)
  12607. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  12608. }
  12609. var i = 0
  12610. var mul = 1
  12611. var sub = 0
  12612. this[offset] = value & 0xFF
  12613. while (++i < byteLength && (mul *= 0x100)) {
  12614. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  12615. sub = 1
  12616. }
  12617. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  12618. }
  12619. return offset + byteLength
  12620. }
  12621. Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
  12622. value = +value
  12623. offset = offset | 0
  12624. if (!noAssert) {
  12625. var limit = Math.pow(2, 8 * byteLength - 1)
  12626. checkInt(this, value, offset, byteLength, limit - 1, -limit)
  12627. }
  12628. var i = byteLength - 1
  12629. var mul = 1
  12630. var sub = 0
  12631. this[offset + i] = value & 0xFF
  12632. while (--i >= 0 && (mul *= 0x100)) {
  12633. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  12634. sub = 1
  12635. }
  12636. this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
  12637. }
  12638. return offset + byteLength
  12639. }
  12640. Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
  12641. value = +value
  12642. offset = offset | 0
  12643. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
  12644. if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
  12645. if (value < 0) value = 0xff + value + 1
  12646. this[offset] = (value & 0xff)
  12647. return offset + 1
  12648. }
  12649. Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
  12650. value = +value
  12651. offset = offset | 0
  12652. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  12653. if (Buffer.TYPED_ARRAY_SUPPORT) {
  12654. this[offset] = (value & 0xff)
  12655. this[offset + 1] = (value >>> 8)
  12656. } else {
  12657. objectWriteUInt16(this, value, offset, true)
  12658. }
  12659. return offset + 2
  12660. }
  12661. Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
  12662. value = +value
  12663. offset = offset | 0
  12664. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
  12665. if (Buffer.TYPED_ARRAY_SUPPORT) {
  12666. this[offset] = (value >>> 8)
  12667. this[offset + 1] = (value & 0xff)
  12668. } else {
  12669. objectWriteUInt16(this, value, offset, false)
  12670. }
  12671. return offset + 2
  12672. }
  12673. Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
  12674. value = +value
  12675. offset = offset | 0
  12676. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  12677. if (Buffer.TYPED_ARRAY_SUPPORT) {
  12678. this[offset] = (value & 0xff)
  12679. this[offset + 1] = (value >>> 8)
  12680. this[offset + 2] = (value >>> 16)
  12681. this[offset + 3] = (value >>> 24)
  12682. } else {
  12683. objectWriteUInt32(this, value, offset, true)
  12684. }
  12685. return offset + 4
  12686. }
  12687. Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
  12688. value = +value
  12689. offset = offset | 0
  12690. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
  12691. if (value < 0) value = 0xffffffff + value + 1
  12692. if (Buffer.TYPED_ARRAY_SUPPORT) {
  12693. this[offset] = (value >>> 24)
  12694. this[offset + 1] = (value >>> 16)
  12695. this[offset + 2] = (value >>> 8)
  12696. this[offset + 3] = (value & 0xff)
  12697. } else {
  12698. objectWriteUInt32(this, value, offset, false)
  12699. }
  12700. return offset + 4
  12701. }
  12702. function checkIEEE754 (buf, value, offset, ext, max, min) {
  12703. if (offset + ext > buf.length) throw new RangeError('Index out of range')
  12704. if (offset < 0) throw new RangeError('Index out of range')
  12705. }
  12706. function writeFloat (buf, value, offset, littleEndian, noAssert) {
  12707. if (!noAssert) {
  12708. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
  12709. }
  12710. ieee754.write(buf, value, offset, littleEndian, 23, 4)
  12711. return offset + 4
  12712. }
  12713. Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
  12714. return writeFloat(this, value, offset, true, noAssert)
  12715. }
  12716. Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
  12717. return writeFloat(this, value, offset, false, noAssert)
  12718. }
  12719. function writeDouble (buf, value, offset, littleEndian, noAssert) {
  12720. if (!noAssert) {
  12721. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
  12722. }
  12723. ieee754.write(buf, value, offset, littleEndian, 52, 8)
  12724. return offset + 8
  12725. }
  12726. Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
  12727. return writeDouble(this, value, offset, true, noAssert)
  12728. }
  12729. Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
  12730. return writeDouble(this, value, offset, false, noAssert)
  12731. }
  12732. // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  12733. Buffer.prototype.copy = function copy (target, targetStart, start, end) {
  12734. if (!start) start = 0
  12735. if (!end && end !== 0) end = this.length
  12736. if (targetStart >= target.length) targetStart = target.length
  12737. if (!targetStart) targetStart = 0
  12738. if (end > 0 && end < start) end = start
  12739. // Copy 0 bytes; we're done
  12740. if (end === start) return 0
  12741. if (target.length === 0 || this.length === 0) return 0
  12742. // Fatal error conditions
  12743. if (targetStart < 0) {
  12744. throw new RangeError('targetStart out of bounds')
  12745. }
  12746. if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
  12747. if (end < 0) throw new RangeError('sourceEnd out of bounds')
  12748. // Are we oob?
  12749. if (end > this.length) end = this.length
  12750. if (target.length - targetStart < end - start) {
  12751. end = target.length - targetStart + start
  12752. }
  12753. var len = end - start
  12754. var i
  12755. if (this === target && start < targetStart && targetStart < end) {
  12756. // descending copy from end
  12757. for (i = len - 1; i >= 0; --i) {
  12758. target[i + targetStart] = this[i + start]
  12759. }
  12760. } else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
  12761. // ascending copy from start
  12762. for (i = 0; i < len; ++i) {
  12763. target[i + targetStart] = this[i + start]
  12764. }
  12765. } else {
  12766. Uint8Array.prototype.set.call(
  12767. target,
  12768. this.subarray(start, start + len),
  12769. targetStart
  12770. )
  12771. }
  12772. return len
  12773. }
  12774. // Usage:
  12775. // buffer.fill(number[, offset[, end]])
  12776. // buffer.fill(buffer[, offset[, end]])
  12777. // buffer.fill(string[, offset[, end]][, encoding])
  12778. Buffer.prototype.fill = function fill (val, start, end, encoding) {
  12779. // Handle string cases:
  12780. if (typeof val === 'string') {
  12781. if (typeof start === 'string') {
  12782. encoding = start
  12783. start = 0
  12784. end = this.length
  12785. } else if (typeof end === 'string') {
  12786. encoding = end
  12787. end = this.length
  12788. }
  12789. if (val.length === 1) {
  12790. var code = val.charCodeAt(0)
  12791. if (code < 256) {
  12792. val = code
  12793. }
  12794. }
  12795. if (encoding !== undefined && typeof encoding !== 'string') {
  12796. throw new TypeError('encoding must be a string')
  12797. }
  12798. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  12799. throw new TypeError('Unknown encoding: ' + encoding)
  12800. }
  12801. } else if (typeof val === 'number') {
  12802. val = val & 255
  12803. }
  12804. // Invalid ranges are not set to a default, so can range check early.
  12805. if (start < 0 || this.length < start || this.length < end) {
  12806. throw new RangeError('Out of range index')
  12807. }
  12808. if (end <= start) {
  12809. return this
  12810. }
  12811. start = start >>> 0
  12812. end = end === undefined ? this.length : end >>> 0
  12813. if (!val) val = 0
  12814. var i
  12815. if (typeof val === 'number') {
  12816. for (i = start; i < end; ++i) {
  12817. this[i] = val
  12818. }
  12819. } else {
  12820. var bytes = Buffer.isBuffer(val)
  12821. ? val
  12822. : utf8ToBytes(new Buffer(val, encoding).toString())
  12823. var len = bytes.length
  12824. for (i = 0; i < end - start; ++i) {
  12825. this[i + start] = bytes[i % len]
  12826. }
  12827. }
  12828. return this
  12829. }
  12830. // HELPER FUNCTIONS
  12831. // ================
  12832. var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
  12833. function base64clean (str) {
  12834. // Node strips out invalid characters like \n and \t from the string, base64-js does not
  12835. str = stringtrim(str).replace(INVALID_BASE64_RE, '')
  12836. // Node converts strings with length < 2 to ''
  12837. if (str.length < 2) return ''
  12838. // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  12839. while (str.length % 4 !== 0) {
  12840. str = str + '='
  12841. }
  12842. return str
  12843. }
  12844. function stringtrim (str) {
  12845. if (str.trim) return str.trim()
  12846. return str.replace(/^\s+|\s+$/g, '')
  12847. }
  12848. function toHex (n) {
  12849. if (n < 16) return '0' + n.toString(16)
  12850. return n.toString(16)
  12851. }
  12852. function utf8ToBytes (string, units) {
  12853. units = units || Infinity
  12854. var codePoint
  12855. var length = string.length
  12856. var leadSurrogate = null
  12857. var bytes = []
  12858. for (var i = 0; i < length; ++i) {
  12859. codePoint = string.charCodeAt(i)
  12860. // is surrogate component
  12861. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  12862. // last char was a lead
  12863. if (!leadSurrogate) {
  12864. // no lead yet
  12865. if (codePoint > 0xDBFF) {
  12866. // unexpected trail
  12867. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  12868. continue
  12869. } else if (i + 1 === length) {
  12870. // unpaired lead
  12871. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  12872. continue
  12873. }
  12874. // valid lead
  12875. leadSurrogate = codePoint
  12876. continue
  12877. }
  12878. // 2 leads in a row
  12879. if (codePoint < 0xDC00) {
  12880. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  12881. leadSurrogate = codePoint
  12882. continue
  12883. }
  12884. // valid surrogate pair
  12885. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
  12886. } else if (leadSurrogate) {
  12887. // valid bmp char, but last char was a lead
  12888. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
  12889. }
  12890. leadSurrogate = null
  12891. // encode utf8
  12892. if (codePoint < 0x80) {
  12893. if ((units -= 1) < 0) break
  12894. bytes.push(codePoint)
  12895. } else if (codePoint < 0x800) {
  12896. if ((units -= 2) < 0) break
  12897. bytes.push(
  12898. codePoint >> 0x6 | 0xC0,
  12899. codePoint & 0x3F | 0x80
  12900. )
  12901. } else if (codePoint < 0x10000) {
  12902. if ((units -= 3) < 0) break
  12903. bytes.push(
  12904. codePoint >> 0xC | 0xE0,
  12905. codePoint >> 0x6 & 0x3F | 0x80,
  12906. codePoint & 0x3F | 0x80
  12907. )
  12908. } else if (codePoint < 0x110000) {
  12909. if ((units -= 4) < 0) break
  12910. bytes.push(
  12911. codePoint >> 0x12 | 0xF0,
  12912. codePoint >> 0xC & 0x3F | 0x80,
  12913. codePoint >> 0x6 & 0x3F | 0x80,
  12914. codePoint & 0x3F | 0x80
  12915. )
  12916. } else {
  12917. throw new Error('Invalid code point')
  12918. }
  12919. }
  12920. return bytes
  12921. }
  12922. function asciiToBytes (str) {
  12923. var byteArray = []
  12924. for (var i = 0; i < str.length; ++i) {
  12925. // Node's code seems to be doing this and not & 0x7F..
  12926. byteArray.push(str.charCodeAt(i) & 0xFF)
  12927. }
  12928. return byteArray
  12929. }
  12930. function utf16leToBytes (str, units) {
  12931. var c, hi, lo
  12932. var byteArray = []
  12933. for (var i = 0; i < str.length; ++i) {
  12934. if ((units -= 2) < 0) break
  12935. c = str.charCodeAt(i)
  12936. hi = c >> 8
  12937. lo = c % 256
  12938. byteArray.push(lo)
  12939. byteArray.push(hi)
  12940. }
  12941. return byteArray
  12942. }
  12943. function base64ToBytes (str) {
  12944. return base64.toByteArray(base64clean(str))
  12945. }
  12946. function blitBuffer (src, dst, offset, length) {
  12947. for (var i = 0; i < length; ++i) {
  12948. if ((i + offset >= dst.length) || (i >= src.length)) break
  12949. dst[i + offset] = src[i]
  12950. }
  12951. return i
  12952. }
  12953. function isnan (val) {
  12954. return val !== val // eslint-disable-line no-self-compare
  12955. }
  12956. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ 3)))
  12957. /***/ }),
  12958. /* 56 */
  12959. /*!*****************************************!*\
  12960. !*** ./node_modules/base64-js/index.js ***!
  12961. \*****************************************/
  12962. /*! no static exports found */
  12963. /***/ (function(module, exports, __webpack_require__) {
  12964. "use strict";
  12965. exports.byteLength = byteLength
  12966. exports.toByteArray = toByteArray
  12967. exports.fromByteArray = fromByteArray
  12968. var lookup = []
  12969. var revLookup = []
  12970. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
  12971. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  12972. for (var i = 0, len = code.length; i < len; ++i) {
  12973. lookup[i] = code[i]
  12974. revLookup[code.charCodeAt(i)] = i
  12975. }
  12976. // Support decoding URL-safe base64 strings, as Node.js does.
  12977. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  12978. revLookup['-'.charCodeAt(0)] = 62
  12979. revLookup['_'.charCodeAt(0)] = 63
  12980. function getLens (b64) {
  12981. var len = b64.length
  12982. if (len % 4 > 0) {
  12983. throw new Error('Invalid string. Length must be a multiple of 4')
  12984. }
  12985. // Trim off extra bytes after placeholder bytes are found
  12986. // See: https://github.com/beatgammit/base64-js/issues/42
  12987. var validLen = b64.indexOf('=')
  12988. if (validLen === -1) validLen = len
  12989. var placeHoldersLen = validLen === len
  12990. ? 0
  12991. : 4 - (validLen % 4)
  12992. return [validLen, placeHoldersLen]
  12993. }
  12994. // base64 is 4/3 + up to two characters of the original data
  12995. function byteLength (b64) {
  12996. var lens = getLens(b64)
  12997. var validLen = lens[0]
  12998. var placeHoldersLen = lens[1]
  12999. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  13000. }
  13001. function _byteLength (b64, validLen, placeHoldersLen) {
  13002. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  13003. }
  13004. function toByteArray (b64) {
  13005. var tmp
  13006. var lens = getLens(b64)
  13007. var validLen = lens[0]
  13008. var placeHoldersLen = lens[1]
  13009. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
  13010. var curByte = 0
  13011. // if there are placeholders, only get up to the last complete 4 chars
  13012. var len = placeHoldersLen > 0
  13013. ? validLen - 4
  13014. : validLen
  13015. var i
  13016. for (i = 0; i < len; i += 4) {
  13017. tmp =
  13018. (revLookup[b64.charCodeAt(i)] << 18) |
  13019. (revLookup[b64.charCodeAt(i + 1)] << 12) |
  13020. (revLookup[b64.charCodeAt(i + 2)] << 6) |
  13021. revLookup[b64.charCodeAt(i + 3)]
  13022. arr[curByte++] = (tmp >> 16) & 0xFF
  13023. arr[curByte++] = (tmp >> 8) & 0xFF
  13024. arr[curByte++] = tmp & 0xFF
  13025. }
  13026. if (placeHoldersLen === 2) {
  13027. tmp =
  13028. (revLookup[b64.charCodeAt(i)] << 2) |
  13029. (revLookup[b64.charCodeAt(i + 1)] >> 4)
  13030. arr[curByte++] = tmp & 0xFF
  13031. }
  13032. if (placeHoldersLen === 1) {
  13033. tmp =
  13034. (revLookup[b64.charCodeAt(i)] << 10) |
  13035. (revLookup[b64.charCodeAt(i + 1)] << 4) |
  13036. (revLookup[b64.charCodeAt(i + 2)] >> 2)
  13037. arr[curByte++] = (tmp >> 8) & 0xFF
  13038. arr[curByte++] = tmp & 0xFF
  13039. }
  13040. return arr
  13041. }
  13042. function tripletToBase64 (num) {
  13043. return lookup[num >> 18 & 0x3F] +
  13044. lookup[num >> 12 & 0x3F] +
  13045. lookup[num >> 6 & 0x3F] +
  13046. lookup[num & 0x3F]
  13047. }
  13048. function encodeChunk (uint8, start, end) {
  13049. var tmp
  13050. var output = []
  13051. for (var i = start; i < end; i += 3) {
  13052. tmp =
  13053. ((uint8[i] << 16) & 0xFF0000) +
  13054. ((uint8[i + 1] << 8) & 0xFF00) +
  13055. (uint8[i + 2] & 0xFF)
  13056. output.push(tripletToBase64(tmp))
  13057. }
  13058. return output.join('')
  13059. }
  13060. function fromByteArray (uint8) {
  13061. var tmp
  13062. var len = uint8.length
  13063. var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
  13064. var parts = []
  13065. var maxChunkLength = 16383 // must be multiple of 3
  13066. // go through the array every three bytes, we'll deal with trailing stuff later
  13067. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  13068. parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
  13069. }
  13070. // pad the end with zeros, but make sure to not forget the extra bytes
  13071. if (extraBytes === 1) {
  13072. tmp = uint8[len - 1]
  13073. parts.push(
  13074. lookup[tmp >> 2] +
  13075. lookup[(tmp << 4) & 0x3F] +
  13076. '=='
  13077. )
  13078. } else if (extraBytes === 2) {
  13079. tmp = (uint8[len - 2] << 8) + uint8[len - 1]
  13080. parts.push(
  13081. lookup[tmp >> 10] +
  13082. lookup[(tmp >> 4) & 0x3F] +
  13083. lookup[(tmp << 2) & 0x3F] +
  13084. '='
  13085. )
  13086. }
  13087. return parts.join('')
  13088. }
  13089. /***/ }),
  13090. /* 57 */
  13091. /*!***************************************!*\
  13092. !*** ./node_modules/ieee754/index.js ***!
  13093. \***************************************/
  13094. /*! no static exports found */
  13095. /***/ (function(module, exports) {
  13096. /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
  13097. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  13098. var e, m
  13099. var eLen = (nBytes * 8) - mLen - 1
  13100. var eMax = (1 << eLen) - 1
  13101. var eBias = eMax >> 1
  13102. var nBits = -7
  13103. var i = isLE ? (nBytes - 1) : 0
  13104. var d = isLE ? -1 : 1
  13105. var s = buffer[offset + i]
  13106. i += d
  13107. e = s & ((1 << (-nBits)) - 1)
  13108. s >>= (-nBits)
  13109. nBits += eLen
  13110. for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  13111. m = e & ((1 << (-nBits)) - 1)
  13112. e >>= (-nBits)
  13113. nBits += mLen
  13114. for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  13115. if (e === 0) {
  13116. e = 1 - eBias
  13117. } else if (e === eMax) {
  13118. return m ? NaN : ((s ? -1 : 1) * Infinity)
  13119. } else {
  13120. m = m + Math.pow(2, mLen)
  13121. e = e - eBias
  13122. }
  13123. return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  13124. }
  13125. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  13126. var e, m, c
  13127. var eLen = (nBytes * 8) - mLen - 1
  13128. var eMax = (1 << eLen) - 1
  13129. var eBias = eMax >> 1
  13130. var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
  13131. var i = isLE ? 0 : (nBytes - 1)
  13132. var d = isLE ? 1 : -1
  13133. var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  13134. value = Math.abs(value)
  13135. if (isNaN(value) || value === Infinity) {
  13136. m = isNaN(value) ? 1 : 0
  13137. e = eMax
  13138. } else {
  13139. e = Math.floor(Math.log(value) / Math.LN2)
  13140. if (value * (c = Math.pow(2, -e)) < 1) {
  13141. e--
  13142. c *= 2
  13143. }
  13144. if (e + eBias >= 1) {
  13145. value += rt / c
  13146. } else {
  13147. value += rt * Math.pow(2, 1 - eBias)
  13148. }
  13149. if (value * c >= 2) {
  13150. e++
  13151. c /= 2
  13152. }
  13153. if (e + eBias >= eMax) {
  13154. m = 0
  13155. e = eMax
  13156. } else if (e + eBias >= 1) {
  13157. m = ((value * c) - 1) * Math.pow(2, mLen)
  13158. e = e + eBias
  13159. } else {
  13160. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
  13161. e = 0
  13162. }
  13163. }
  13164. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  13165. e = (e << mLen) | m
  13166. eLen += mLen
  13167. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  13168. buffer[offset + i - d] |= s * 128
  13169. }
  13170. /***/ }),
  13171. /* 58 */
  13172. /*!***************************************!*\
  13173. !*** ./node_modules/isarray/index.js ***!
  13174. \***************************************/
  13175. /*! no static exports found */
  13176. /***/ (function(module, exports) {
  13177. var toString = {}.toString;
  13178. module.exports = Array.isArray || function (arr) {
  13179. return toString.call(arr) == '[object Array]';
  13180. };
  13181. /***/ }),
  13182. /* 59 */
  13183. /*!******************************************************************************************************!*\
  13184. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/core/AxiosError.js ***!
  13185. \******************************************************************************************************/
  13186. /*! no static exports found */
  13187. /***/ (function(module, exports, __webpack_require__) {
  13188. "use strict";
  13189. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13190. Object.defineProperty(exports, "__esModule", {
  13191. value: true
  13192. });
  13193. exports.default = void 0;
  13194. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  13195. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  13196. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 60));
  13197. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 61));
  13198. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 62));
  13199. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 63));
  13200. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 64));
  13201. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  13202. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
  13203. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  13204. var AxiosError = /*#__PURE__*/function (_Error) {
  13205. (0, _inherits2.default)(AxiosError, _Error);
  13206. var _super = _createSuper(AxiosError);
  13207. /**
  13208. * Create an Error with the specified message, config, error code, request and response.
  13209. *
  13210. * @param {string} message The error message.
  13211. * @param {string} [code] The error code (for example, 'ECONNABORTED').
  13212. * @param {Object} [config] The config.
  13213. * @param {Object} [request] The request.
  13214. * @param {Object} [response] The response.
  13215. *
  13216. * @returns {Error} The created error.
  13217. */
  13218. function AxiosError(message, code, config, request, response) {
  13219. var _this;
  13220. (0, _classCallCheck2.default)(this, AxiosError);
  13221. _this = _super.call(this, message);
  13222. // Make message enumerable to maintain backward compatibility
  13223. // The native Error constructor sets message as non-enumerable,
  13224. // but axios < v1.13.3 had it as enumerable
  13225. Object.defineProperty((0, _assertThisInitialized2.default)(_this), 'message', {
  13226. value: message,
  13227. enumerable: true,
  13228. writable: true,
  13229. configurable: true
  13230. });
  13231. _this.name = 'AxiosError';
  13232. _this.isAxiosError = true;
  13233. code && (_this.code = code);
  13234. config && (_this.config = config);
  13235. request && (_this.request = request);
  13236. if (response) {
  13237. _this.response = response;
  13238. _this.status = response.status;
  13239. }
  13240. return _this;
  13241. }
  13242. (0, _createClass2.default)(AxiosError, [{
  13243. key: "toJSON",
  13244. value: function toJSON() {
  13245. return {
  13246. // Standard
  13247. message: this.message,
  13248. name: this.name,
  13249. // Microsoft
  13250. description: this.description,
  13251. number: this.number,
  13252. // Mozilla
  13253. fileName: this.fileName,
  13254. lineNumber: this.lineNumber,
  13255. columnNumber: this.columnNumber,
  13256. stack: this.stack,
  13257. // Axios
  13258. config: _utils.default.toJSONObject(this.config),
  13259. code: this.code,
  13260. status: this.status
  13261. };
  13262. }
  13263. }], [{
  13264. key: "from",
  13265. value: function from(error, code, config, request, response, customProps) {
  13266. var axiosError = new AxiosError(error.message, code || error.code, config, request, response);
  13267. axiosError.cause = error;
  13268. axiosError.name = error.name;
  13269. // Preserve status from the original error if not already set from response
  13270. if (error.status != null && axiosError.status == null) {
  13271. axiosError.status = error.status;
  13272. }
  13273. customProps && Object.assign(axiosError, customProps);
  13274. return axiosError;
  13275. }
  13276. }]);
  13277. return AxiosError;
  13278. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error)); // This can be changed to static properties as soon as the parser options in .eslint.cjs are updated.
  13279. AxiosError.ERR_BAD_OPTION_VALUE = 'ERR_BAD_OPTION_VALUE';
  13280. AxiosError.ERR_BAD_OPTION = 'ERR_BAD_OPTION';
  13281. AxiosError.ECONNABORTED = 'ECONNABORTED';
  13282. AxiosError.ETIMEDOUT = 'ETIMEDOUT';
  13283. AxiosError.ERR_NETWORK = 'ERR_NETWORK';
  13284. AxiosError.ERR_FR_TOO_MANY_REDIRECTS = 'ERR_FR_TOO_MANY_REDIRECTS';
  13285. AxiosError.ERR_DEPRECATED = 'ERR_DEPRECATED';
  13286. AxiosError.ERR_BAD_RESPONSE = 'ERR_BAD_RESPONSE';
  13287. AxiosError.ERR_BAD_REQUEST = 'ERR_BAD_REQUEST';
  13288. AxiosError.ERR_CANCELED = 'ERR_CANCELED';
  13289. AxiosError.ERR_NOT_SUPPORT = 'ERR_NOT_SUPPORT';
  13290. AxiosError.ERR_INVALID_URL = 'ERR_INVALID_URL';
  13291. AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = 'ERR_FORM_DATA_DEPTH_EXCEEDED';
  13292. var _default = AxiosError;
  13293. exports.default = _default;
  13294. /***/ }),
  13295. /* 60 */
  13296. /*!**********************************************************************!*\
  13297. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  13298. \**********************************************************************/
  13299. /*! no static exports found */
  13300. /***/ (function(module, exports) {
  13301. function _assertThisInitialized(self) {
  13302. if (self === void 0) {
  13303. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  13304. }
  13305. return self;
  13306. }
  13307. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13308. /***/ }),
  13309. /* 61 */
  13310. /*!*********************************************************!*\
  13311. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  13312. \*********************************************************/
  13313. /*! no static exports found */
  13314. /***/ (function(module, exports, __webpack_require__) {
  13315. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  13316. function _inherits(subClass, superClass) {
  13317. if (typeof superClass !== "function" && superClass !== null) {
  13318. throw new TypeError("Super expression must either be null or a function");
  13319. }
  13320. subClass.prototype = Object.create(superClass && superClass.prototype, {
  13321. constructor: {
  13322. value: subClass,
  13323. writable: true,
  13324. configurable: true
  13325. }
  13326. });
  13327. Object.defineProperty(subClass, "prototype", {
  13328. writable: false
  13329. });
  13330. if (superClass) setPrototypeOf(subClass, superClass);
  13331. }
  13332. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13333. /***/ }),
  13334. /* 62 */
  13335. /*!**************************************************************************!*\
  13336. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  13337. \**************************************************************************/
  13338. /*! no static exports found */
  13339. /***/ (function(module, exports, __webpack_require__) {
  13340. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  13341. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 60);
  13342. function _possibleConstructorReturn(self, call) {
  13343. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  13344. return call;
  13345. } else if (call !== void 0) {
  13346. throw new TypeError("Derived constructors may only return object or undefined");
  13347. }
  13348. return assertThisInitialized(self);
  13349. }
  13350. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13351. /***/ }),
  13352. /* 63 */
  13353. /*!***************************************************************!*\
  13354. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  13355. \***************************************************************/
  13356. /*! no static exports found */
  13357. /***/ (function(module, exports) {
  13358. function _getPrototypeOf(o) {
  13359. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  13360. return o.__proto__ || Object.getPrototypeOf(o);
  13361. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13362. return _getPrototypeOf(o);
  13363. }
  13364. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13365. /***/ }),
  13366. /* 64 */
  13367. /*!****************************************************************!*\
  13368. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  13369. \****************************************************************/
  13370. /*! no static exports found */
  13371. /***/ (function(module, exports, __webpack_require__) {
  13372. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 63);
  13373. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  13374. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 65);
  13375. var construct = __webpack_require__(/*! ./construct.js */ 15);
  13376. function _wrapNativeSuper(Class) {
  13377. var _cache = typeof Map === "function" ? new Map() : undefined;
  13378. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  13379. if (Class === null || !isNativeFunction(Class)) return Class;
  13380. if (typeof Class !== "function") {
  13381. throw new TypeError("Super expression must either be null or a function");
  13382. }
  13383. if (typeof _cache !== "undefined") {
  13384. if (_cache.has(Class)) return _cache.get(Class);
  13385. _cache.set(Class, Wrapper);
  13386. }
  13387. function Wrapper() {
  13388. return construct(Class, arguments, getPrototypeOf(this).constructor);
  13389. }
  13390. Wrapper.prototype = Object.create(Class.prototype, {
  13391. constructor: {
  13392. value: Wrapper,
  13393. enumerable: false,
  13394. writable: true,
  13395. configurable: true
  13396. }
  13397. });
  13398. return setPrototypeOf(Wrapper, Class);
  13399. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13400. return _wrapNativeSuper(Class);
  13401. }
  13402. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13403. /***/ }),
  13404. /* 65 */
  13405. /*!*****************************************************************!*\
  13406. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  13407. \*****************************************************************/
  13408. /*! no static exports found */
  13409. /***/ (function(module, exports) {
  13410. function _isNativeFunction(fn) {
  13411. try {
  13412. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  13413. } catch (e) {
  13414. return typeof fn === "function";
  13415. }
  13416. }
  13417. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  13418. /***/ }),
  13419. /* 66 */
  13420. /*!***************************************************************************************************!*\
  13421. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/null.js ***!
  13422. \***************************************************************************************************/
  13423. /*! no static exports found */
  13424. /***/ (function(module, exports, __webpack_require__) {
  13425. "use strict";
  13426. Object.defineProperty(exports, "__esModule", {
  13427. value: true
  13428. });
  13429. exports.default = void 0;
  13430. // eslint-disable-next-line strict
  13431. var _default = null;
  13432. exports.default = _default;
  13433. /***/ }),
  13434. /* 67 */
  13435. /*!**************************************************************************************************************!*\
  13436. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/core/InterceptorManager.js ***!
  13437. \**************************************************************************************************************/
  13438. /*! no static exports found */
  13439. /***/ (function(module, exports, __webpack_require__) {
  13440. "use strict";
  13441. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13442. Object.defineProperty(exports, "__esModule", {
  13443. value: true
  13444. });
  13445. exports.default = void 0;
  13446. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  13447. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  13448. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  13449. var InterceptorManager = /*#__PURE__*/function () {
  13450. function InterceptorManager() {
  13451. (0, _classCallCheck2.default)(this, InterceptorManager);
  13452. this.handlers = [];
  13453. }
  13454. /**
  13455. * Add a new interceptor to the stack
  13456. *
  13457. * @param {Function} fulfilled The function to handle `then` for a `Promise`
  13458. * @param {Function} rejected The function to handle `reject` for a `Promise`
  13459. * @param {Object} options The options for the interceptor, synchronous and runWhen
  13460. *
  13461. * @return {Number} An ID used to remove interceptor later
  13462. */
  13463. (0, _createClass2.default)(InterceptorManager, [{
  13464. key: "use",
  13465. value: function use(fulfilled, rejected, options) {
  13466. this.handlers.push({
  13467. fulfilled: fulfilled,
  13468. rejected: rejected,
  13469. synchronous: options ? options.synchronous : false,
  13470. runWhen: options ? options.runWhen : null
  13471. });
  13472. return this.handlers.length - 1;
  13473. }
  13474. /**
  13475. * Remove an interceptor from the stack
  13476. *
  13477. * @param {Number} id The ID that was returned by `use`
  13478. *
  13479. * @returns {void}
  13480. */
  13481. }, {
  13482. key: "eject",
  13483. value: function eject(id) {
  13484. if (this.handlers[id]) {
  13485. this.handlers[id] = null;
  13486. }
  13487. }
  13488. /**
  13489. * Clear all interceptors from the stack
  13490. *
  13491. * @returns {void}
  13492. */
  13493. }, {
  13494. key: "clear",
  13495. value: function clear() {
  13496. if (this.handlers) {
  13497. this.handlers = [];
  13498. }
  13499. }
  13500. /**
  13501. * Iterate over all the registered interceptors
  13502. *
  13503. * This method is particularly useful for skipping over any
  13504. * interceptors that may have become `null` calling `eject`.
  13505. *
  13506. * @param {Function} fn The function to call for each interceptor
  13507. *
  13508. * @returns {void}
  13509. */
  13510. }, {
  13511. key: "forEach",
  13512. value: function forEach(fn) {
  13513. _utils.default.forEach(this.handlers, function forEachHandler(h) {
  13514. if (h !== null) {
  13515. fn(h);
  13516. }
  13517. });
  13518. }
  13519. }]);
  13520. return InterceptorManager;
  13521. }();
  13522. var _default = InterceptorManager;
  13523. exports.default = _default;
  13524. /***/ }),
  13525. /* 68 */
  13526. /*!***********************************************************************************************************!*\
  13527. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/core/dispatchRequest.js ***!
  13528. \***********************************************************************************************************/
  13529. /*! no static exports found */
  13530. /***/ (function(module, exports, __webpack_require__) {
  13531. "use strict";
  13532. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13533. Object.defineProperty(exports, "__esModule", {
  13534. value: true
  13535. });
  13536. exports.default = dispatchRequest;
  13537. var _transformData = _interopRequireDefault(__webpack_require__(/*! ./transformData.js */ 69));
  13538. var _isCancel = _interopRequireDefault(__webpack_require__(/*! ../cancel/isCancel.js */ 82));
  13539. var _index = _interopRequireDefault(__webpack_require__(/*! ../defaults/index.js */ 70));
  13540. var _CanceledError = _interopRequireDefault(__webpack_require__(/*! ../cancel/CanceledError.js */ 83));
  13541. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosHeaders.js */ 80));
  13542. var _adapters = _interopRequireDefault(__webpack_require__(/*! ../adapters/adapters.js */ 84));
  13543. /**
  13544. * Throws a `CanceledError` if cancellation has been requested.
  13545. *
  13546. * @param {Object} config The config that is to be used for the request
  13547. *
  13548. * @returns {void}
  13549. */
  13550. function throwIfCancellationRequested(config) {
  13551. if (config.cancelToken) {
  13552. config.cancelToken.throwIfRequested();
  13553. }
  13554. if (config.signal && config.signal.aborted) {
  13555. throw new _CanceledError.default(null, config);
  13556. }
  13557. }
  13558. /**
  13559. * Dispatch a request to the server using the configured adapter.
  13560. *
  13561. * @param {object} config The config that is to be used for the request
  13562. *
  13563. * @returns {Promise} The Promise to be fulfilled
  13564. */
  13565. function dispatchRequest(config) {
  13566. throwIfCancellationRequested(config);
  13567. config.headers = _AxiosHeaders.default.from(config.headers);
  13568. // Transform request data
  13569. config.data = _transformData.default.call(config, config.transformRequest);
  13570. if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
  13571. config.headers.setContentType('application/x-www-form-urlencoded', false);
  13572. }
  13573. var adapter = _adapters.default.getAdapter(config.adapter || _index.default.adapter, config);
  13574. return adapter(config).then(function onAdapterResolution(response) {
  13575. throwIfCancellationRequested(config);
  13576. // Transform response data
  13577. response.data = _transformData.default.call(config, config.transformResponse, response);
  13578. response.headers = _AxiosHeaders.default.from(response.headers);
  13579. return response;
  13580. }, function onAdapterRejection(reason) {
  13581. if (!(0, _isCancel.default)(reason)) {
  13582. throwIfCancellationRequested(config);
  13583. // Transform response data
  13584. if (reason && reason.response) {
  13585. reason.response.data = _transformData.default.call(config, config.transformResponse, reason.response);
  13586. reason.response.headers = _AxiosHeaders.default.from(reason.response.headers);
  13587. }
  13588. }
  13589. return Promise.reject(reason);
  13590. });
  13591. }
  13592. /***/ }),
  13593. /* 69 */
  13594. /*!*********************************************************************************************************!*\
  13595. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/core/transformData.js ***!
  13596. \*********************************************************************************************************/
  13597. /*! no static exports found */
  13598. /***/ (function(module, exports, __webpack_require__) {
  13599. "use strict";
  13600. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13601. Object.defineProperty(exports, "__esModule", {
  13602. value: true
  13603. });
  13604. exports.default = transformData;
  13605. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  13606. var _index = _interopRequireDefault(__webpack_require__(/*! ../defaults/index.js */ 70));
  13607. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosHeaders.js */ 80));
  13608. /**
  13609. * Transform the data for a request or a response
  13610. *
  13611. * @param {Array|Function} fns A single function or Array of functions
  13612. * @param {?Object} response The response object
  13613. *
  13614. * @returns {*} The resulting transformed data
  13615. */
  13616. function transformData(fns, response) {
  13617. var config = this || _index.default;
  13618. var context = response || config;
  13619. var headers = _AxiosHeaders.default.from(context.headers);
  13620. var data = context.data;
  13621. _utils.default.forEach(fns, function transform(fn) {
  13622. data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
  13623. });
  13624. headers.normalize();
  13625. return data;
  13626. }
  13627. /***/ }),
  13628. /* 70 */
  13629. /*!*****************************************************************************************************!*\
  13630. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/defaults/index.js ***!
  13631. \*****************************************************************************************************/
  13632. /*! no static exports found */
  13633. /***/ (function(module, exports, __webpack_require__) {
  13634. "use strict";
  13635. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13636. Object.defineProperty(exports, "__esModule", {
  13637. value: true
  13638. });
  13639. exports.default = void 0;
  13640. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  13641. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 59));
  13642. var _transitional = _interopRequireDefault(__webpack_require__(/*! ./transitional.js */ 71));
  13643. var _toFormData = _interopRequireDefault(__webpack_require__(/*! ../helpers/toFormData.js */ 54));
  13644. var _toURLEncodedForm = _interopRequireDefault(__webpack_require__(/*! ../helpers/toURLEncodedForm.js */ 72));
  13645. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 73));
  13646. var _formDataToJSON = _interopRequireDefault(__webpack_require__(/*! ../helpers/formDataToJSON.js */ 79));
  13647. var own = function own(obj, key) {
  13648. return obj != null && _utils.default.hasOwnProp(obj, key) ? obj[key] : undefined;
  13649. };
  13650. /**
  13651. * It takes a string, tries to parse it, and if it fails, it returns the stringified version
  13652. * of the input
  13653. *
  13654. * @param {any} rawValue - The value to be stringified.
  13655. * @param {Function} parser - A function that parses a string into a JavaScript object.
  13656. * @param {Function} encoder - A function that takes a value and returns a string.
  13657. *
  13658. * @returns {string} A stringified version of the rawValue.
  13659. */
  13660. function stringifySafely(rawValue, parser, encoder) {
  13661. if (_utils.default.isString(rawValue)) {
  13662. try {
  13663. (parser || JSON.parse)(rawValue);
  13664. return _utils.default.trim(rawValue);
  13665. } catch (e) {
  13666. if (e.name !== 'SyntaxError') {
  13667. throw e;
  13668. }
  13669. }
  13670. }
  13671. return (encoder || JSON.stringify)(rawValue);
  13672. }
  13673. var defaults = {
  13674. transitional: _transitional.default,
  13675. adapter: ['xhr', 'http', 'fetch'],
  13676. transformRequest: [function transformRequest(data, headers) {
  13677. var contentType = headers.getContentType() || '';
  13678. var hasJSONContentType = contentType.indexOf('application/json') > -1;
  13679. var isObjectPayload = _utils.default.isObject(data);
  13680. if (isObjectPayload && _utils.default.isHTMLForm(data)) {
  13681. data = new FormData(data);
  13682. }
  13683. var isFormData = _utils.default.isFormData(data);
  13684. if (isFormData) {
  13685. return hasJSONContentType ? JSON.stringify((0, _formDataToJSON.default)(data)) : data;
  13686. }
  13687. if (_utils.default.isArrayBuffer(data) || _utils.default.isBuffer(data) || _utils.default.isStream(data) || _utils.default.isFile(data) || _utils.default.isBlob(data) || _utils.default.isReadableStream(data)) {
  13688. return data;
  13689. }
  13690. if (_utils.default.isArrayBufferView(data)) {
  13691. return data.buffer;
  13692. }
  13693. if (_utils.default.isURLSearchParams(data)) {
  13694. headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
  13695. return data.toString();
  13696. }
  13697. var isFileList;
  13698. if (isObjectPayload) {
  13699. var formSerializer = own(this, 'formSerializer');
  13700. if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
  13701. return (0, _toURLEncodedForm.default)(data, formSerializer).toString();
  13702. }
  13703. if ((isFileList = _utils.default.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
  13704. var env = own(this, 'env');
  13705. var _FormData = env && env.FormData;
  13706. return (0, _toFormData.default)(isFileList ? {
  13707. 'files[]': data
  13708. } : data, _FormData && new _FormData(), formSerializer);
  13709. }
  13710. }
  13711. if (isObjectPayload || hasJSONContentType) {
  13712. headers.setContentType('application/json', false);
  13713. return stringifySafely(data);
  13714. }
  13715. return data;
  13716. }],
  13717. transformResponse: [function transformResponse(data) {
  13718. var transitional = own(this, 'transitional') || defaults.transitional;
  13719. var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
  13720. var responseType = own(this, 'responseType');
  13721. var JSONRequested = responseType === 'json';
  13722. if (_utils.default.isResponse(data) || _utils.default.isReadableStream(data)) {
  13723. return data;
  13724. }
  13725. if (data && _utils.default.isString(data) && (forcedJSONParsing && !responseType || JSONRequested)) {
  13726. var silentJSONParsing = transitional && transitional.silentJSONParsing;
  13727. var strictJSONParsing = !silentJSONParsing && JSONRequested;
  13728. try {
  13729. return JSON.parse(data, own(this, 'parseReviver'));
  13730. } catch (e) {
  13731. if (strictJSONParsing) {
  13732. if (e.name === 'SyntaxError') {
  13733. throw _AxiosError.default.from(e, _AxiosError.default.ERR_BAD_RESPONSE, this, null, own(this, 'response'));
  13734. }
  13735. throw e;
  13736. }
  13737. }
  13738. }
  13739. return data;
  13740. }],
  13741. /**
  13742. * A timeout in milliseconds to abort a request. If set to 0 (default) a
  13743. * timeout is not created.
  13744. */
  13745. timeout: 0,
  13746. xsrfCookieName: 'XSRF-TOKEN',
  13747. xsrfHeaderName: 'X-XSRF-TOKEN',
  13748. maxContentLength: -1,
  13749. maxBodyLength: -1,
  13750. env: {
  13751. FormData: _index.default.classes.FormData,
  13752. Blob: _index.default.classes.Blob
  13753. },
  13754. validateStatus: function validateStatus(status) {
  13755. return status >= 200 && status < 300;
  13756. },
  13757. headers: {
  13758. common: {
  13759. Accept: 'application/json, text/plain, */*',
  13760. 'Content-Type': undefined
  13761. }
  13762. }
  13763. };
  13764. _utils.default.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], function (method) {
  13765. defaults.headers[method] = {};
  13766. });
  13767. var _default = defaults;
  13768. exports.default = _default;
  13769. /***/ }),
  13770. /* 71 */
  13771. /*!************************************************************************************************************!*\
  13772. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/defaults/transitional.js ***!
  13773. \************************************************************************************************************/
  13774. /*! no static exports found */
  13775. /***/ (function(module, exports, __webpack_require__) {
  13776. "use strict";
  13777. Object.defineProperty(exports, "__esModule", {
  13778. value: true
  13779. });
  13780. exports.default = void 0;
  13781. var _default = {
  13782. silentJSONParsing: true,
  13783. forcedJSONParsing: true,
  13784. clarifyTimeoutError: false,
  13785. legacyInterceptorReqResOrdering: true
  13786. };
  13787. exports.default = _default;
  13788. /***/ }),
  13789. /* 72 */
  13790. /*!***************************************************************************************************************!*\
  13791. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/toURLEncodedForm.js ***!
  13792. \***************************************************************************************************************/
  13793. /*! no static exports found */
  13794. /***/ (function(module, exports, __webpack_require__) {
  13795. "use strict";
  13796. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13797. Object.defineProperty(exports, "__esModule", {
  13798. value: true
  13799. });
  13800. exports.default = toURLEncodedForm;
  13801. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  13802. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  13803. var _toFormData = _interopRequireDefault(__webpack_require__(/*! ./toFormData.js */ 54));
  13804. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 73));
  13805. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  13806. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  13807. function toURLEncodedForm(data, options) {
  13808. return (0, _toFormData.default)(data, new _index.default.classes.URLSearchParams(), _objectSpread({
  13809. visitor: function visitor(value, key, path, helpers) {
  13810. if (_index.default.isNode && _utils.default.isBuffer(value)) {
  13811. this.append(key, value.toString('base64'));
  13812. return false;
  13813. }
  13814. return helpers.defaultVisitor.apply(this, arguments);
  13815. }
  13816. }, options));
  13817. }
  13818. /***/ }),
  13819. /* 73 */
  13820. /*!*****************************************************************************************************!*\
  13821. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/platform/index.js ***!
  13822. \*****************************************************************************************************/
  13823. /*! no static exports found */
  13824. /***/ (function(module, exports, __webpack_require__) {
  13825. "use strict";
  13826. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13827. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  13828. Object.defineProperty(exports, "__esModule", {
  13829. value: true
  13830. });
  13831. exports.default = void 0;
  13832. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  13833. var _index = _interopRequireDefault(__webpack_require__(/*! ./node/index.js */ 74));
  13834. var utils = _interopRequireWildcard(__webpack_require__(/*! ./common/utils.js */ 78));
  13835. function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
  13836. function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
  13837. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  13838. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  13839. var _default = _objectSpread(_objectSpread({}, utils), _index.default);
  13840. exports.default = _default;
  13841. /***/ }),
  13842. /* 74 */
  13843. /*!*************************************************************************************************************!*\
  13844. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/platform/browser/index.js ***!
  13845. \*************************************************************************************************************/
  13846. /*! no static exports found */
  13847. /***/ (function(module, exports, __webpack_require__) {
  13848. "use strict";
  13849. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13850. Object.defineProperty(exports, "__esModule", {
  13851. value: true
  13852. });
  13853. exports.default = void 0;
  13854. var _URLSearchParams = _interopRequireDefault(__webpack_require__(/*! ./classes/URLSearchParams.js */ 75));
  13855. var _FormData = _interopRequireDefault(__webpack_require__(/*! ./classes/FormData.js */ 76));
  13856. var _Blob = _interopRequireDefault(__webpack_require__(/*! ./classes/Blob.js */ 77));
  13857. var _default = {
  13858. isBrowser: true,
  13859. classes: {
  13860. URLSearchParams: _URLSearchParams.default,
  13861. FormData: _FormData.default,
  13862. Blob: _Blob.default
  13863. },
  13864. protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
  13865. };
  13866. exports.default = _default;
  13867. /***/ }),
  13868. /* 75 */
  13869. /*!*******************************************************************************************************************************!*\
  13870. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js ***!
  13871. \*******************************************************************************************************************************/
  13872. /*! no static exports found */
  13873. /***/ (function(module, exports, __webpack_require__) {
  13874. "use strict";
  13875. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13876. Object.defineProperty(exports, "__esModule", {
  13877. value: true
  13878. });
  13879. exports.default = void 0;
  13880. var _AxiosURLSearchParams = _interopRequireDefault(__webpack_require__(/*! ../../../helpers/AxiosURLSearchParams.js */ 53));
  13881. var _default = typeof URLSearchParams !== 'undefined' ? URLSearchParams : _AxiosURLSearchParams.default;
  13882. exports.default = _default;
  13883. /***/ }),
  13884. /* 76 */
  13885. /*!************************************************************************************************************************!*\
  13886. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/platform/browser/classes/FormData.js ***!
  13887. \************************************************************************************************************************/
  13888. /*! no static exports found */
  13889. /***/ (function(module, exports, __webpack_require__) {
  13890. "use strict";
  13891. Object.defineProperty(exports, "__esModule", {
  13892. value: true
  13893. });
  13894. exports.default = void 0;
  13895. var _default = typeof FormData !== 'undefined' ? FormData : null;
  13896. exports.default = _default;
  13897. /***/ }),
  13898. /* 77 */
  13899. /*!********************************************************************************************************************!*\
  13900. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/platform/browser/classes/Blob.js ***!
  13901. \********************************************************************************************************************/
  13902. /*! no static exports found */
  13903. /***/ (function(module, exports, __webpack_require__) {
  13904. "use strict";
  13905. Object.defineProperty(exports, "__esModule", {
  13906. value: true
  13907. });
  13908. exports.default = void 0;
  13909. var _default = typeof Blob !== 'undefined' ? Blob : null;
  13910. exports.default = _default;
  13911. /***/ }),
  13912. /* 78 */
  13913. /*!************************************************************************************************************!*\
  13914. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/platform/common/utils.js ***!
  13915. \************************************************************************************************************/
  13916. /*! no static exports found */
  13917. /***/ (function(module, exports, __webpack_require__) {
  13918. "use strict";
  13919. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13920. Object.defineProperty(exports, "__esModule", {
  13921. value: true
  13922. });
  13923. exports.origin = exports.navigator = exports.hasStandardBrowserWebWorkerEnv = exports.hasStandardBrowserEnv = exports.hasBrowserEnv = void 0;
  13924. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  13925. var hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
  13926. exports.hasBrowserEnv = hasBrowserEnv;
  13927. var _navigator = (typeof navigator === "undefined" ? "undefined" : (0, _typeof2.default)(navigator)) === 'object' && navigator || undefined;
  13928. /**
  13929. * Determine if we're running in a standard browser environment
  13930. *
  13931. * This allows axios to run in a web worker, and react-native.
  13932. * Both environments support XMLHttpRequest, but not fully standard globals.
  13933. *
  13934. * web workers:
  13935. * typeof window -> undefined
  13936. * typeof document -> undefined
  13937. *
  13938. * react-native:
  13939. * navigator.product -> 'ReactNative'
  13940. * nativescript
  13941. * navigator.product -> 'NativeScript' or 'NS'
  13942. *
  13943. * @returns {boolean}
  13944. */
  13945. exports.navigator = _navigator;
  13946. var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
  13947. /**
  13948. * Determine if we're running in a standard browser webWorker environment
  13949. *
  13950. * Although the `isStandardBrowserEnv` method indicates that
  13951. * `allows axios to run in a web worker`, the WebWorker will still be
  13952. * filtered out due to its judgment standard
  13953. * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
  13954. * This leads to a problem when axios post `FormData` in webWorker
  13955. */
  13956. exports.hasStandardBrowserEnv = hasStandardBrowserEnv;
  13957. var hasStandardBrowserWebWorkerEnv = function () {
  13958. return typeof WorkerGlobalScope !== 'undefined' &&
  13959. // eslint-disable-next-line no-undef
  13960. self instanceof WorkerGlobalScope && typeof self.importScripts === 'function';
  13961. }();
  13962. exports.hasStandardBrowserWebWorkerEnv = hasStandardBrowserWebWorkerEnv;
  13963. var origin = hasBrowserEnv && window.location.href || 'http://localhost';
  13964. exports.origin = origin;
  13965. /***/ }),
  13966. /* 79 */
  13967. /*!*************************************************************************************************************!*\
  13968. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/formDataToJSON.js ***!
  13969. \*************************************************************************************************************/
  13970. /*! no static exports found */
  13971. /***/ (function(module, exports, __webpack_require__) {
  13972. "use strict";
  13973. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  13974. Object.defineProperty(exports, "__esModule", {
  13975. value: true
  13976. });
  13977. exports.default = void 0;
  13978. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  13979. /**
  13980. * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
  13981. *
  13982. * @param {string} name - The name of the property to get.
  13983. *
  13984. * @returns An array of strings.
  13985. */
  13986. function parsePropPath(name) {
  13987. // foo[x][y][z]
  13988. // foo.x.y.z
  13989. // foo-x-y-z
  13990. // foo x y z
  13991. return _utils.default.matchAll(/\w+|\[(\w*)]/g, name).map(function (match) {
  13992. return match[0] === '[]' ? '' : match[1] || match[0];
  13993. });
  13994. }
  13995. /**
  13996. * Convert an array to an object.
  13997. *
  13998. * @param {Array<any>} arr - The array to convert to an object.
  13999. *
  14000. * @returns An object with the same keys and values as the array.
  14001. */
  14002. function arrayToObject(arr) {
  14003. var obj = {};
  14004. var keys = Object.keys(arr);
  14005. var i;
  14006. var len = keys.length;
  14007. var key;
  14008. for (i = 0; i < len; i++) {
  14009. key = keys[i];
  14010. obj[key] = arr[key];
  14011. }
  14012. return obj;
  14013. }
  14014. /**
  14015. * It takes a FormData object and returns a JavaScript object
  14016. *
  14017. * @param {string} formData The FormData object to convert to JSON.
  14018. *
  14019. * @returns {Object<string, any> | null} The converted object.
  14020. */
  14021. function formDataToJSON(formData) {
  14022. function buildPath(path, value, target, index) {
  14023. var name = path[index++];
  14024. if (name === '__proto__') return true;
  14025. var isNumericKey = Number.isFinite(+name);
  14026. var isLast = index >= path.length;
  14027. name = !name && _utils.default.isArray(target) ? target.length : name;
  14028. if (isLast) {
  14029. if (_utils.default.hasOwnProp(target, name)) {
  14030. target[name] = _utils.default.isArray(target[name]) ? target[name].concat(value) : [target[name], value];
  14031. } else {
  14032. target[name] = value;
  14033. }
  14034. return !isNumericKey;
  14035. }
  14036. if (!target[name] || !_utils.default.isObject(target[name])) {
  14037. target[name] = [];
  14038. }
  14039. var result = buildPath(path, value, target[name], index);
  14040. if (result && _utils.default.isArray(target[name])) {
  14041. target[name] = arrayToObject(target[name]);
  14042. }
  14043. return !isNumericKey;
  14044. }
  14045. if (_utils.default.isFormData(formData) && _utils.default.isFunction(formData.entries)) {
  14046. var obj = {};
  14047. _utils.default.forEachEntry(formData, function (name, value) {
  14048. buildPath(parsePropPath(name), value, obj, 0);
  14049. });
  14050. return obj;
  14051. }
  14052. return null;
  14053. }
  14054. var _default = formDataToJSON;
  14055. exports.default = _default;
  14056. /***/ }),
  14057. /* 80 */
  14058. /*!********************************************************************************************************!*\
  14059. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/core/AxiosHeaders.js ***!
  14060. \********************************************************************************************************/
  14061. /*! no static exports found */
  14062. /***/ (function(module, exports, __webpack_require__) {
  14063. "use strict";
  14064. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14065. Object.defineProperty(exports, "__esModule", {
  14066. value: true
  14067. });
  14068. exports.default = void 0;
  14069. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  14070. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  14071. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  14072. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  14073. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  14074. var _parseHeaders = _interopRequireDefault(__webpack_require__(/*! ../helpers/parseHeaders.js */ 81));
  14075. function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  14076. function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  14077. function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  14078. var $internals = Symbol('internals');
  14079. var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
  14080. function trimSPorHTAB(str) {
  14081. var start = 0;
  14082. var end = str.length;
  14083. while (start < end) {
  14084. var code = str.charCodeAt(start);
  14085. if (code !== 0x09 && code !== 0x20) {
  14086. break;
  14087. }
  14088. start += 1;
  14089. }
  14090. while (end > start) {
  14091. var _code = str.charCodeAt(end - 1);
  14092. if (_code !== 0x09 && _code !== 0x20) {
  14093. break;
  14094. }
  14095. end -= 1;
  14096. }
  14097. return start === 0 && end === str.length ? str : str.slice(start, end);
  14098. }
  14099. function normalizeHeader(header) {
  14100. return header && String(header).trim().toLowerCase();
  14101. }
  14102. function sanitizeHeaderValue(str) {
  14103. return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ''));
  14104. }
  14105. function normalizeValue(value) {
  14106. if (value === false || value == null) {
  14107. return value;
  14108. }
  14109. return _utils.default.isArray(value) ? value.map(normalizeValue) : sanitizeHeaderValue(String(value));
  14110. }
  14111. function parseTokens(str) {
  14112. var tokens = Object.create(null);
  14113. var tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
  14114. var match;
  14115. while (match = tokensRE.exec(str)) {
  14116. tokens[match[1]] = match[2];
  14117. }
  14118. return tokens;
  14119. }
  14120. var isValidHeaderName = function isValidHeaderName(str) {
  14121. return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
  14122. };
  14123. function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
  14124. if (_utils.default.isFunction(filter)) {
  14125. return filter.call(this, value, header);
  14126. }
  14127. if (isHeaderNameFilter) {
  14128. value = header;
  14129. }
  14130. if (!_utils.default.isString(value)) return;
  14131. if (_utils.default.isString(filter)) {
  14132. return value.indexOf(filter) !== -1;
  14133. }
  14134. if (_utils.default.isRegExp(filter)) {
  14135. return filter.test(value);
  14136. }
  14137. }
  14138. function formatHeader(header) {
  14139. return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, function (w, char, str) {
  14140. return char.toUpperCase() + str;
  14141. });
  14142. }
  14143. function buildAccessors(obj, header) {
  14144. var accessorName = _utils.default.toCamelCase(' ' + header);
  14145. ['get', 'set', 'has'].forEach(function (methodName) {
  14146. Object.defineProperty(obj, methodName + accessorName, {
  14147. value: function value(arg1, arg2, arg3) {
  14148. return this[methodName].call(this, header, arg1, arg2, arg3);
  14149. },
  14150. configurable: true
  14151. });
  14152. });
  14153. }
  14154. var AxiosHeaders = /*#__PURE__*/function (_Symbol$iterator, _Symbol$toStringTag) {
  14155. function AxiosHeaders(headers) {
  14156. (0, _classCallCheck2.default)(this, AxiosHeaders);
  14157. headers && this.set(headers);
  14158. }
  14159. (0, _createClass2.default)(AxiosHeaders, [{
  14160. key: "set",
  14161. value: function set(header, valueOrRewrite, rewrite) {
  14162. var self = this;
  14163. function setHeader(_value, _header, _rewrite) {
  14164. var lHeader = normalizeHeader(_header);
  14165. if (!lHeader) {
  14166. throw new Error('header name must be a non-empty string');
  14167. }
  14168. var key = _utils.default.findKey(self, lHeader);
  14169. if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) {
  14170. self[key || _header] = normalizeValue(_value);
  14171. }
  14172. }
  14173. var setHeaders = function setHeaders(headers, _rewrite) {
  14174. return _utils.default.forEach(headers, function (_value, _header) {
  14175. return setHeader(_value, _header, _rewrite);
  14176. });
  14177. };
  14178. if (_utils.default.isPlainObject(header) || header instanceof this.constructor) {
  14179. setHeaders(header, valueOrRewrite);
  14180. } else if (_utils.default.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
  14181. setHeaders((0, _parseHeaders.default)(header), valueOrRewrite);
  14182. } else if (_utils.default.isObject(header) && _utils.default.isIterable(header)) {
  14183. var obj = {},
  14184. dest,
  14185. key;
  14186. var _iterator = _createForOfIteratorHelper(header),
  14187. _step;
  14188. try {
  14189. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  14190. var entry = _step.value;
  14191. if (!_utils.default.isArray(entry)) {
  14192. throw TypeError('Object iterator must return a key-value pair');
  14193. }
  14194. obj[key = entry[0]] = (dest = obj[key]) ? _utils.default.isArray(dest) ? [].concat((0, _toConsumableArray2.default)(dest), [entry[1]]) : [dest, entry[1]] : entry[1];
  14195. }
  14196. } catch (err) {
  14197. _iterator.e(err);
  14198. } finally {
  14199. _iterator.f();
  14200. }
  14201. setHeaders(obj, valueOrRewrite);
  14202. } else {
  14203. header != null && setHeader(valueOrRewrite, header, rewrite);
  14204. }
  14205. return this;
  14206. }
  14207. }, {
  14208. key: "get",
  14209. value: function get(header, parser) {
  14210. header = normalizeHeader(header);
  14211. if (header) {
  14212. var key = _utils.default.findKey(this, header);
  14213. if (key) {
  14214. var value = this[key];
  14215. if (!parser) {
  14216. return value;
  14217. }
  14218. if (parser === true) {
  14219. return parseTokens(value);
  14220. }
  14221. if (_utils.default.isFunction(parser)) {
  14222. return parser.call(this, value, key);
  14223. }
  14224. if (_utils.default.isRegExp(parser)) {
  14225. return parser.exec(value);
  14226. }
  14227. throw new TypeError('parser must be boolean|regexp|function');
  14228. }
  14229. }
  14230. }
  14231. }, {
  14232. key: "has",
  14233. value: function has(header, matcher) {
  14234. header = normalizeHeader(header);
  14235. if (header) {
  14236. var key = _utils.default.findKey(this, header);
  14237. return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
  14238. }
  14239. return false;
  14240. }
  14241. }, {
  14242. key: "delete",
  14243. value: function _delete(header, matcher) {
  14244. var self = this;
  14245. var deleted = false;
  14246. function deleteHeader(_header) {
  14247. _header = normalizeHeader(_header);
  14248. if (_header) {
  14249. var key = _utils.default.findKey(self, _header);
  14250. if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
  14251. delete self[key];
  14252. deleted = true;
  14253. }
  14254. }
  14255. }
  14256. if (_utils.default.isArray(header)) {
  14257. header.forEach(deleteHeader);
  14258. } else {
  14259. deleteHeader(header);
  14260. }
  14261. return deleted;
  14262. }
  14263. }, {
  14264. key: "clear",
  14265. value: function clear(matcher) {
  14266. var keys = Object.keys(this);
  14267. var i = keys.length;
  14268. var deleted = false;
  14269. while (i--) {
  14270. var key = keys[i];
  14271. if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
  14272. delete this[key];
  14273. deleted = true;
  14274. }
  14275. }
  14276. return deleted;
  14277. }
  14278. }, {
  14279. key: "normalize",
  14280. value: function normalize(format) {
  14281. var self = this;
  14282. var headers = {};
  14283. _utils.default.forEach(this, function (value, header) {
  14284. var key = _utils.default.findKey(headers, header);
  14285. if (key) {
  14286. self[key] = normalizeValue(value);
  14287. delete self[header];
  14288. return;
  14289. }
  14290. var normalized = format ? formatHeader(header) : String(header).trim();
  14291. if (normalized !== header) {
  14292. delete self[header];
  14293. }
  14294. self[normalized] = normalizeValue(value);
  14295. headers[normalized] = true;
  14296. });
  14297. return this;
  14298. }
  14299. }, {
  14300. key: "concat",
  14301. value: function concat() {
  14302. var _this$constructor;
  14303. for (var _len = arguments.length, targets = new Array(_len), _key = 0; _key < _len; _key++) {
  14304. targets[_key] = arguments[_key];
  14305. }
  14306. return (_this$constructor = this.constructor).concat.apply(_this$constructor, [this].concat(targets));
  14307. }
  14308. }, {
  14309. key: "toJSON",
  14310. value: function toJSON(asStrings) {
  14311. var obj = Object.create(null);
  14312. _utils.default.forEach(this, function (value, header) {
  14313. value != null && value !== false && (obj[header] = asStrings && _utils.default.isArray(value) ? value.join(', ') : value);
  14314. });
  14315. return obj;
  14316. }
  14317. }, {
  14318. key: _Symbol$iterator,
  14319. value: function value() {
  14320. return Object.entries(this.toJSON())[Symbol.iterator]();
  14321. }
  14322. }, {
  14323. key: "toString",
  14324. value: function toString() {
  14325. return Object.entries(this.toJSON()).map(function (_ref) {
  14326. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  14327. header = _ref2[0],
  14328. value = _ref2[1];
  14329. return header + ': ' + value;
  14330. }).join('\n');
  14331. }
  14332. }, {
  14333. key: "getSetCookie",
  14334. value: function getSetCookie() {
  14335. return this.get('set-cookie') || [];
  14336. }
  14337. }, {
  14338. key: _Symbol$toStringTag,
  14339. get: function get() {
  14340. return 'AxiosHeaders';
  14341. }
  14342. }], [{
  14343. key: "from",
  14344. value: function from(thing) {
  14345. return thing instanceof this ? thing : new this(thing);
  14346. }
  14347. }, {
  14348. key: "concat",
  14349. value: function concat(first) {
  14350. var computed = new this(first);
  14351. for (var _len2 = arguments.length, targets = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  14352. targets[_key2 - 1] = arguments[_key2];
  14353. }
  14354. targets.forEach(function (target) {
  14355. return computed.set(target);
  14356. });
  14357. return computed;
  14358. }
  14359. }, {
  14360. key: "accessor",
  14361. value: function accessor(header) {
  14362. var internals = this[$internals] = this[$internals] = {
  14363. accessors: {}
  14364. };
  14365. var accessors = internals.accessors;
  14366. var prototype = this.prototype;
  14367. function defineAccessor(_header) {
  14368. var lHeader = normalizeHeader(_header);
  14369. if (!accessors[lHeader]) {
  14370. buildAccessors(prototype, _header);
  14371. accessors[lHeader] = true;
  14372. }
  14373. }
  14374. _utils.default.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
  14375. return this;
  14376. }
  14377. }]);
  14378. return AxiosHeaders;
  14379. }(Symbol.iterator, Symbol.toStringTag);
  14380. AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
  14381. // reserved names hotfix
  14382. _utils.default.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) {
  14383. var value = _ref3.value;
  14384. var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
  14385. return {
  14386. get: function get() {
  14387. return value;
  14388. },
  14389. set: function set(headerValue) {
  14390. this[mapped] = headerValue;
  14391. }
  14392. };
  14393. });
  14394. _utils.default.freezeMethods(AxiosHeaders);
  14395. var _default = AxiosHeaders;
  14396. exports.default = _default;
  14397. /***/ }),
  14398. /* 81 */
  14399. /*!***********************************************************************************************************!*\
  14400. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/parseHeaders.js ***!
  14401. \***********************************************************************************************************/
  14402. /*! no static exports found */
  14403. /***/ (function(module, exports, __webpack_require__) {
  14404. "use strict";
  14405. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14406. Object.defineProperty(exports, "__esModule", {
  14407. value: true
  14408. });
  14409. exports.default = void 0;
  14410. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  14411. // RawAxiosHeaders whose duplicates are ignored by node
  14412. // c.f. https://nodejs.org/api/http.html#http_message_headers
  14413. var ignoreDuplicateOf = _utils.default.toObjectSet(['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent']);
  14414. /**
  14415. * Parse headers into an object
  14416. *
  14417. * ```
  14418. * Date: Wed, 27 Aug 2014 08:58:49 GMT
  14419. * Content-Type: application/json
  14420. * Connection: keep-alive
  14421. * Transfer-Encoding: chunked
  14422. * ```
  14423. *
  14424. * @param {String} rawHeaders Headers needing to be parsed
  14425. *
  14426. * @returns {Object} Headers parsed into an object
  14427. */
  14428. var _default = function _default(rawHeaders) {
  14429. var parsed = {};
  14430. var key;
  14431. var val;
  14432. var i;
  14433. rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
  14434. i = line.indexOf(':');
  14435. key = line.substring(0, i).trim().toLowerCase();
  14436. val = line.substring(i + 1).trim();
  14437. if (!key || parsed[key] && ignoreDuplicateOf[key]) {
  14438. return;
  14439. }
  14440. if (key === 'set-cookie') {
  14441. if (parsed[key]) {
  14442. parsed[key].push(val);
  14443. } else {
  14444. parsed[key] = [val];
  14445. }
  14446. } else {
  14447. parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
  14448. }
  14449. });
  14450. return parsed;
  14451. };
  14452. exports.default = _default;
  14453. /***/ }),
  14454. /* 82 */
  14455. /*!******************************************************************************************************!*\
  14456. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/cancel/isCancel.js ***!
  14457. \******************************************************************************************************/
  14458. /*! no static exports found */
  14459. /***/ (function(module, exports, __webpack_require__) {
  14460. "use strict";
  14461. Object.defineProperty(exports, "__esModule", {
  14462. value: true
  14463. });
  14464. exports.default = isCancel;
  14465. function isCancel(value) {
  14466. return !!(value && value.__CANCEL__);
  14467. }
  14468. /***/ }),
  14469. /* 83 */
  14470. /*!***********************************************************************************************************!*\
  14471. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/cancel/CanceledError.js ***!
  14472. \***********************************************************************************************************/
  14473. /*! no static exports found */
  14474. /***/ (function(module, exports, __webpack_require__) {
  14475. "use strict";
  14476. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14477. Object.defineProperty(exports, "__esModule", {
  14478. value: true
  14479. });
  14480. exports.default = void 0;
  14481. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  14482. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  14483. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 61));
  14484. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 62));
  14485. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 63));
  14486. var _AxiosError2 = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 59));
  14487. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
  14488. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  14489. var CanceledError = /*#__PURE__*/function (_AxiosError) {
  14490. (0, _inherits2.default)(CanceledError, _AxiosError);
  14491. var _super = _createSuper(CanceledError);
  14492. /**
  14493. * A `CanceledError` is an object that is thrown when an operation is canceled.
  14494. *
  14495. * @param {string=} message The message.
  14496. * @param {Object=} config The config.
  14497. * @param {Object=} request The request.
  14498. *
  14499. * @returns {CanceledError} The created error.
  14500. */
  14501. function CanceledError(message, config, request) {
  14502. var _this;
  14503. (0, _classCallCheck2.default)(this, CanceledError);
  14504. _this = _super.call(this, message == null ? 'canceled' : message, _AxiosError2.default.ERR_CANCELED, config, request);
  14505. _this.name = 'CanceledError';
  14506. _this.__CANCEL__ = true;
  14507. return _this;
  14508. }
  14509. return (0, _createClass2.default)(CanceledError);
  14510. }(_AxiosError2.default);
  14511. var _default = CanceledError;
  14512. exports.default = _default;
  14513. /***/ }),
  14514. /* 84 */
  14515. /*!********************************************************************************************************!*\
  14516. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/adapters/adapters.js ***!
  14517. \********************************************************************************************************/
  14518. /*! no static exports found */
  14519. /***/ (function(module, exports, __webpack_require__) {
  14520. "use strict";
  14521. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14522. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  14523. Object.defineProperty(exports, "__esModule", {
  14524. value: true
  14525. });
  14526. exports.default = void 0;
  14527. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  14528. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  14529. var _http = _interopRequireDefault(__webpack_require__(/*! ./http.js */ 66));
  14530. var _xhr = _interopRequireDefault(__webpack_require__(/*! ./xhr.js */ 85));
  14531. var fetchAdapter = _interopRequireWildcard(__webpack_require__(/*! ./fetch.js */ 98));
  14532. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 59));
  14533. function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
  14534. function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
  14535. /**
  14536. * Known adapters mapping.
  14537. * Provides environment-specific adapters for Axios:
  14538. * - `http` for Node.js
  14539. * - `xhr` for browsers
  14540. * - `fetch` for fetch API-based requests
  14541. *
  14542. * @type {Object<string, Function|Object>}
  14543. */
  14544. var knownAdapters = {
  14545. http: _http.default,
  14546. xhr: _xhr.default,
  14547. fetch: {
  14548. get: fetchAdapter.getFetch
  14549. }
  14550. };
  14551. // Assign adapter names for easier debugging and identification
  14552. _utils.default.forEach(knownAdapters, function (fn, value) {
  14553. if (fn) {
  14554. try {
  14555. Object.defineProperty(fn, 'name', {
  14556. value: value
  14557. });
  14558. } catch (e) {
  14559. // eslint-disable-next-line no-empty
  14560. }
  14561. Object.defineProperty(fn, 'adapterName', {
  14562. value: value
  14563. });
  14564. }
  14565. });
  14566. /**
  14567. * Render a rejection reason string for unknown or unsupported adapters
  14568. *
  14569. * @param {string} reason
  14570. * @returns {string}
  14571. */
  14572. var renderReason = function renderReason(reason) {
  14573. return "- ".concat(reason);
  14574. };
  14575. /**
  14576. * Check if the adapter is resolved (function, null, or false)
  14577. *
  14578. * @param {Function|null|false} adapter
  14579. * @returns {boolean}
  14580. */
  14581. var isResolvedHandle = function isResolvedHandle(adapter) {
  14582. return _utils.default.isFunction(adapter) || adapter === null || adapter === false;
  14583. };
  14584. /**
  14585. * Get the first suitable adapter from the provided list.
  14586. * Tries each adapter in order until a supported one is found.
  14587. * Throws an AxiosError if no adapter is suitable.
  14588. *
  14589. * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
  14590. * @param {Object} config - Axios request configuration
  14591. * @throws {AxiosError} If no suitable adapter is available
  14592. * @returns {Function} The resolved adapter function
  14593. */
  14594. function getAdapter(adapters, config) {
  14595. adapters = _utils.default.isArray(adapters) ? adapters : [adapters];
  14596. var _adapters = adapters,
  14597. length = _adapters.length;
  14598. var nameOrAdapter;
  14599. var adapter;
  14600. var rejectedReasons = {};
  14601. for (var i = 0; i < length; i++) {
  14602. nameOrAdapter = adapters[i];
  14603. var id = void 0;
  14604. adapter = nameOrAdapter;
  14605. if (!isResolvedHandle(nameOrAdapter)) {
  14606. adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
  14607. if (adapter === undefined) {
  14608. throw new _AxiosError.default("Unknown adapter '".concat(id, "'"));
  14609. }
  14610. }
  14611. if (adapter && (_utils.default.isFunction(adapter) || (adapter = adapter.get(config)))) {
  14612. break;
  14613. }
  14614. rejectedReasons[id || '#' + i] = adapter;
  14615. }
  14616. if (!adapter) {
  14617. var reasons = Object.entries(rejectedReasons).map(function (_ref) {
  14618. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  14619. id = _ref2[0],
  14620. state = _ref2[1];
  14621. return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
  14622. });
  14623. var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
  14624. throw new _AxiosError.default("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
  14625. }
  14626. return adapter;
  14627. }
  14628. /**
  14629. * Exports Axios adapters and utility to resolve an adapter
  14630. */
  14631. var _default = {
  14632. /**
  14633. * Resolve an adapter from a list of adapter names or functions.
  14634. * @type {Function}
  14635. */
  14636. getAdapter: getAdapter,
  14637. /**
  14638. * Exposes all known adapters
  14639. * @type {Object<string, Function|Object>}
  14640. */
  14641. adapters: knownAdapters
  14642. };
  14643. exports.default = _default;
  14644. /***/ }),
  14645. /* 85 */
  14646. /*!***************************************************************************************************!*\
  14647. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/adapters/xhr.js ***!
  14648. \***************************************************************************************************/
  14649. /*! no static exports found */
  14650. /***/ (function(module, exports, __webpack_require__) {
  14651. "use strict";
  14652. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14653. Object.defineProperty(exports, "__esModule", {
  14654. value: true
  14655. });
  14656. exports.default = void 0;
  14657. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  14658. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  14659. var _settle = _interopRequireDefault(__webpack_require__(/*! ../core/settle.js */ 86));
  14660. var _transitional = _interopRequireDefault(__webpack_require__(/*! ../defaults/transitional.js */ 71));
  14661. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 59));
  14662. var _CanceledError = _interopRequireDefault(__webpack_require__(/*! ../cancel/CanceledError.js */ 83));
  14663. var _parseProtocol = _interopRequireDefault(__webpack_require__(/*! ../helpers/parseProtocol.js */ 87));
  14664. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 73));
  14665. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosHeaders.js */ 80));
  14666. var _progressEventReducer5 = __webpack_require__(/*! ../helpers/progressEventReducer.js */ 88);
  14667. var _resolveConfig = _interopRequireDefault(__webpack_require__(/*! ../helpers/resolveConfig.js */ 91));
  14668. var isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
  14669. var _default = isXHRAdapterSupported && function (config) {
  14670. return new Promise(function dispatchXhrRequest(resolve, reject) {
  14671. var _config = (0, _resolveConfig.default)(config);
  14672. var requestData = _config.data;
  14673. var requestHeaders = _AxiosHeaders.default.from(_config.headers).normalize();
  14674. var responseType = _config.responseType,
  14675. onUploadProgress = _config.onUploadProgress,
  14676. onDownloadProgress = _config.onDownloadProgress;
  14677. var onCanceled;
  14678. var uploadThrottled, downloadThrottled;
  14679. var flushUpload, flushDownload;
  14680. function done() {
  14681. flushUpload && flushUpload(); // flush events
  14682. flushDownload && flushDownload(); // flush events
  14683. _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
  14684. _config.signal && _config.signal.removeEventListener('abort', onCanceled);
  14685. }
  14686. var request = new XMLHttpRequest();
  14687. request.open(_config.method.toUpperCase(), _config.url, true);
  14688. // Set the request timeout in MS
  14689. request.timeout = _config.timeout;
  14690. function onloadend() {
  14691. if (!request) {
  14692. return;
  14693. }
  14694. // Prepare the response
  14695. var responseHeaders = _AxiosHeaders.default.from('getAllResponseHeaders' in request && request.getAllResponseHeaders());
  14696. var responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response;
  14697. var response = {
  14698. data: responseData,
  14699. status: request.status,
  14700. statusText: request.statusText,
  14701. headers: responseHeaders,
  14702. config: config,
  14703. request: request
  14704. };
  14705. (0, _settle.default)(function _resolve(value) {
  14706. resolve(value);
  14707. done();
  14708. }, function _reject(err) {
  14709. reject(err);
  14710. done();
  14711. }, response);
  14712. // Clean up request
  14713. request = null;
  14714. }
  14715. if ('onloadend' in request) {
  14716. // Use onloadend if available
  14717. request.onloadend = onloadend;
  14718. } else {
  14719. // Listen for ready state to emulate onloadend
  14720. request.onreadystatechange = function handleLoad() {
  14721. if (!request || request.readyState !== 4) {
  14722. return;
  14723. }
  14724. // The request errored out and we didn't get a response, this will be
  14725. // handled by onerror instead
  14726. // With one exception: request that using file: protocol, most browsers
  14727. // will return status as 0 even though it's a successful request
  14728. if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
  14729. return;
  14730. }
  14731. // readystate handler is calling before onerror or ontimeout handlers,
  14732. // so we should call onloadend on the next 'tick'
  14733. setTimeout(onloadend);
  14734. };
  14735. }
  14736. // Handle browser request cancellation (as opposed to a manual cancellation)
  14737. request.onabort = function handleAbort() {
  14738. if (!request) {
  14739. return;
  14740. }
  14741. reject(new _AxiosError.default('Request aborted', _AxiosError.default.ECONNABORTED, config, request));
  14742. // Clean up request
  14743. request = null;
  14744. };
  14745. // Handle low level network errors
  14746. request.onerror = function handleError(event) {
  14747. // Browsers deliver a ProgressEvent in XHR onerror
  14748. // (message may be empty; when present, surface it)
  14749. // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
  14750. var msg = event && event.message ? event.message : 'Network Error';
  14751. var err = new _AxiosError.default(msg, _AxiosError.default.ERR_NETWORK, config, request);
  14752. // attach the underlying event for consumers who want details
  14753. err.event = event || null;
  14754. reject(err);
  14755. request = null;
  14756. };
  14757. // Handle timeout
  14758. request.ontimeout = function handleTimeout() {
  14759. var timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
  14760. var transitional = _config.transitional || _transitional.default;
  14761. if (_config.timeoutErrorMessage) {
  14762. timeoutErrorMessage = _config.timeoutErrorMessage;
  14763. }
  14764. reject(new _AxiosError.default(timeoutErrorMessage, transitional.clarifyTimeoutError ? _AxiosError.default.ETIMEDOUT : _AxiosError.default.ECONNABORTED, config, request));
  14765. // Clean up request
  14766. request = null;
  14767. };
  14768. // Remove Content-Type if data is undefined
  14769. requestData === undefined && requestHeaders.setContentType(null);
  14770. // Add headers to the request
  14771. if ('setRequestHeader' in request) {
  14772. _utils.default.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
  14773. request.setRequestHeader(key, val);
  14774. });
  14775. }
  14776. // Add withCredentials to request if needed
  14777. if (!_utils.default.isUndefined(_config.withCredentials)) {
  14778. request.withCredentials = !!_config.withCredentials;
  14779. }
  14780. // Add responseType to request if needed
  14781. if (responseType && responseType !== 'json') {
  14782. request.responseType = _config.responseType;
  14783. }
  14784. // Handle progress if needed
  14785. if (onDownloadProgress) {
  14786. var _progressEventReducer = (0, _progressEventReducer5.progressEventReducer)(onDownloadProgress, true);
  14787. var _progressEventReducer2 = (0, _slicedToArray2.default)(_progressEventReducer, 2);
  14788. downloadThrottled = _progressEventReducer2[0];
  14789. flushDownload = _progressEventReducer2[1];
  14790. request.addEventListener('progress', downloadThrottled);
  14791. }
  14792. // Not all browsers support upload events
  14793. if (onUploadProgress && request.upload) {
  14794. var _progressEventReducer3 = (0, _progressEventReducer5.progressEventReducer)(onUploadProgress);
  14795. var _progressEventReducer4 = (0, _slicedToArray2.default)(_progressEventReducer3, 2);
  14796. uploadThrottled = _progressEventReducer4[0];
  14797. flushUpload = _progressEventReducer4[1];
  14798. request.upload.addEventListener('progress', uploadThrottled);
  14799. request.upload.addEventListener('loadend', flushUpload);
  14800. }
  14801. if (_config.cancelToken || _config.signal) {
  14802. // Handle cancellation
  14803. // eslint-disable-next-line func-names
  14804. onCanceled = function onCanceled(cancel) {
  14805. if (!request) {
  14806. return;
  14807. }
  14808. reject(!cancel || cancel.type ? new _CanceledError.default(null, config, request) : cancel);
  14809. request.abort();
  14810. request = null;
  14811. };
  14812. _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
  14813. if (_config.signal) {
  14814. _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
  14815. }
  14816. }
  14817. var protocol = (0, _parseProtocol.default)(_config.url);
  14818. if (protocol && _index.default.protocols.indexOf(protocol) === -1) {
  14819. reject(new _AxiosError.default('Unsupported protocol ' + protocol + ':', _AxiosError.default.ERR_BAD_REQUEST, config));
  14820. return;
  14821. }
  14822. // Send the request
  14823. request.send(requestData || null);
  14824. });
  14825. };
  14826. exports.default = _default;
  14827. /***/ }),
  14828. /* 86 */
  14829. /*!**************************************************************************************************!*\
  14830. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/core/settle.js ***!
  14831. \**************************************************************************************************/
  14832. /*! no static exports found */
  14833. /***/ (function(module, exports, __webpack_require__) {
  14834. "use strict";
  14835. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14836. Object.defineProperty(exports, "__esModule", {
  14837. value: true
  14838. });
  14839. exports.default = settle;
  14840. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ./AxiosError.js */ 59));
  14841. /**
  14842. * Resolve or reject a Promise based on response status.
  14843. *
  14844. * @param {Function} resolve A function that resolves the promise.
  14845. * @param {Function} reject A function that rejects the promise.
  14846. * @param {object} response The response.
  14847. *
  14848. * @returns {object} The response.
  14849. */
  14850. function settle(resolve, reject, response) {
  14851. var validateStatus = response.config.validateStatus;
  14852. if (!response.status || !validateStatus || validateStatus(response.status)) {
  14853. resolve(response);
  14854. } else {
  14855. reject(new _AxiosError.default('Request failed with status code ' + response.status, [_AxiosError.default.ERR_BAD_REQUEST, _AxiosError.default.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
  14856. }
  14857. }
  14858. /***/ }),
  14859. /* 87 */
  14860. /*!************************************************************************************************************!*\
  14861. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/parseProtocol.js ***!
  14862. \************************************************************************************************************/
  14863. /*! no static exports found */
  14864. /***/ (function(module, exports, __webpack_require__) {
  14865. "use strict";
  14866. Object.defineProperty(exports, "__esModule", {
  14867. value: true
  14868. });
  14869. exports.default = parseProtocol;
  14870. function parseProtocol(url) {
  14871. var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
  14872. return match && match[1] || '';
  14873. }
  14874. /***/ }),
  14875. /* 88 */
  14876. /*!*******************************************************************************************************************!*\
  14877. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/progressEventReducer.js ***!
  14878. \*******************************************************************************************************************/
  14879. /*! no static exports found */
  14880. /***/ (function(module, exports, __webpack_require__) {
  14881. "use strict";
  14882. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  14883. Object.defineProperty(exports, "__esModule", {
  14884. value: true
  14885. });
  14886. exports.progressEventReducer = exports.progressEventDecorator = exports.asyncDecorator = void 0;
  14887. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  14888. var _speedometer2 = _interopRequireDefault(__webpack_require__(/*! ./speedometer.js */ 89));
  14889. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./throttle.js */ 90));
  14890. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  14891. var progressEventReducer = function progressEventReducer(listener, isDownloadStream) {
  14892. var freq = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
  14893. var bytesNotified = 0;
  14894. var _speedometer = (0, _speedometer2.default)(50, 250);
  14895. return (0, _throttle.default)(function (e) {
  14896. var rawLoaded = e.loaded;
  14897. var total = e.lengthComputable ? e.total : undefined;
  14898. var loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
  14899. var progressBytes = Math.max(0, loaded - bytesNotified);
  14900. var rate = _speedometer(progressBytes);
  14901. bytesNotified = Math.max(bytesNotified, loaded);
  14902. var data = (0, _defineProperty2.default)({
  14903. loaded: loaded,
  14904. total: total,
  14905. progress: total ? loaded / total : undefined,
  14906. bytes: progressBytes,
  14907. rate: rate ? rate : undefined,
  14908. estimated: rate && total ? (total - loaded) / rate : undefined,
  14909. event: e,
  14910. lengthComputable: total != null
  14911. }, isDownloadStream ? 'download' : 'upload', true);
  14912. listener(data);
  14913. }, freq);
  14914. };
  14915. exports.progressEventReducer = progressEventReducer;
  14916. var progressEventDecorator = function progressEventDecorator(total, throttled) {
  14917. var lengthComputable = total != null;
  14918. return [function (loaded) {
  14919. return throttled[0]({
  14920. lengthComputable: lengthComputable,
  14921. total: total,
  14922. loaded: loaded
  14923. });
  14924. }, throttled[1]];
  14925. };
  14926. exports.progressEventDecorator = progressEventDecorator;
  14927. var asyncDecorator = function asyncDecorator(fn) {
  14928. return function () {
  14929. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  14930. args[_key] = arguments[_key];
  14931. }
  14932. return _utils.default.asap(function () {
  14933. return fn.apply(void 0, args);
  14934. });
  14935. };
  14936. };
  14937. exports.asyncDecorator = asyncDecorator;
  14938. /***/ }),
  14939. /* 89 */
  14940. /*!**********************************************************************************************************!*\
  14941. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/speedometer.js ***!
  14942. \**********************************************************************************************************/
  14943. /*! no static exports found */
  14944. /***/ (function(module, exports, __webpack_require__) {
  14945. "use strict";
  14946. /**
  14947. * Calculate data maxRate
  14948. * @param {Number} [samplesCount= 10]
  14949. * @param {Number} [min= 1000]
  14950. * @returns {Function}
  14951. */
  14952. Object.defineProperty(exports, "__esModule", {
  14953. value: true
  14954. });
  14955. exports.default = void 0;
  14956. function speedometer(samplesCount, min) {
  14957. samplesCount = samplesCount || 10;
  14958. var bytes = new Array(samplesCount);
  14959. var timestamps = new Array(samplesCount);
  14960. var head = 0;
  14961. var tail = 0;
  14962. var firstSampleTS;
  14963. min = min !== undefined ? min : 1000;
  14964. return function push(chunkLength) {
  14965. var now = Date.now();
  14966. var startedAt = timestamps[tail];
  14967. if (!firstSampleTS) {
  14968. firstSampleTS = now;
  14969. }
  14970. bytes[head] = chunkLength;
  14971. timestamps[head] = now;
  14972. var i = tail;
  14973. var bytesCount = 0;
  14974. while (i !== head) {
  14975. bytesCount += bytes[i++];
  14976. i = i % samplesCount;
  14977. }
  14978. head = (head + 1) % samplesCount;
  14979. if (head === tail) {
  14980. tail = (tail + 1) % samplesCount;
  14981. }
  14982. if (now - firstSampleTS < min) {
  14983. return;
  14984. }
  14985. var passed = startedAt && now - startedAt;
  14986. return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
  14987. };
  14988. }
  14989. var _default = speedometer;
  14990. exports.default = _default;
  14991. /***/ }),
  14992. /* 90 */
  14993. /*!*******************************************************************************************************!*\
  14994. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/throttle.js ***!
  14995. \*******************************************************************************************************/
  14996. /*! no static exports found */
  14997. /***/ (function(module, exports, __webpack_require__) {
  14998. "use strict";
  14999. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15000. Object.defineProperty(exports, "__esModule", {
  15001. value: true
  15002. });
  15003. exports.default = void 0;
  15004. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  15005. /**
  15006. * Throttle decorator
  15007. * @param {Function} fn
  15008. * @param {Number} freq
  15009. * @return {Function}
  15010. */
  15011. function throttle(fn, freq) {
  15012. var timestamp = 0;
  15013. var threshold = 1000 / freq;
  15014. var lastArgs;
  15015. var timer;
  15016. var invoke = function invoke(args) {
  15017. var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Date.now();
  15018. timestamp = now;
  15019. lastArgs = null;
  15020. if (timer) {
  15021. clearTimeout(timer);
  15022. timer = null;
  15023. }
  15024. fn.apply(void 0, (0, _toConsumableArray2.default)(args));
  15025. };
  15026. var throttled = function throttled() {
  15027. var now = Date.now();
  15028. var passed = now - timestamp;
  15029. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  15030. args[_key] = arguments[_key];
  15031. }
  15032. if (passed >= threshold) {
  15033. invoke(args, now);
  15034. } else {
  15035. lastArgs = args;
  15036. if (!timer) {
  15037. timer = setTimeout(function () {
  15038. timer = null;
  15039. invoke(lastArgs);
  15040. }, threshold - passed);
  15041. }
  15042. }
  15043. };
  15044. var flush = function flush() {
  15045. return lastArgs && invoke(lastArgs);
  15046. };
  15047. return [throttled, flush];
  15048. }
  15049. var _default = throttle;
  15050. exports.default = _default;
  15051. /***/ }),
  15052. /* 91 */
  15053. /*!************************************************************************************************************!*\
  15054. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/resolveConfig.js ***!
  15055. \************************************************************************************************************/
  15056. /*! no static exports found */
  15057. /***/ (function(module, exports, __webpack_require__) {
  15058. "use strict";
  15059. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15060. Object.defineProperty(exports, "__esModule", {
  15061. value: true
  15062. });
  15063. exports.default = void 0;
  15064. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  15065. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 73));
  15066. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  15067. var _isURLSameOrigin = _interopRequireDefault(__webpack_require__(/*! ./isURLSameOrigin.js */ 92));
  15068. var _cookies = _interopRequireDefault(__webpack_require__(/*! ./cookies.js */ 93));
  15069. var _buildFullPath = _interopRequireDefault(__webpack_require__(/*! ../core/buildFullPath.js */ 94));
  15070. var _mergeConfig = _interopRequireDefault(__webpack_require__(/*! ../core/mergeConfig.js */ 97));
  15071. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosHeaders.js */ 80));
  15072. var _buildURL = _interopRequireDefault(__webpack_require__(/*! ./buildURL.js */ 52));
  15073. var _default = function _default(config) {
  15074. var newConfig = (0, _mergeConfig.default)({}, config);
  15075. // Read only own properties to prevent prototype pollution gadgets
  15076. // (e.g. Object.prototype.baseURL = 'https://evil.com'). See GHSA-q8qp-cvcw-x6jj.
  15077. var own = function own(key) {
  15078. return _utils.default.hasOwnProp(newConfig, key) ? newConfig[key] : undefined;
  15079. };
  15080. var data = own('data');
  15081. var withXSRFToken = own('withXSRFToken');
  15082. var xsrfHeaderName = own('xsrfHeaderName');
  15083. var xsrfCookieName = own('xsrfCookieName');
  15084. var headers = own('headers');
  15085. var auth = own('auth');
  15086. var baseURL = own('baseURL');
  15087. var allowAbsoluteUrls = own('allowAbsoluteUrls');
  15088. var url = own('url');
  15089. newConfig.headers = headers = _AxiosHeaders.default.from(headers);
  15090. newConfig.url = (0, _buildURL.default)((0, _buildFullPath.default)(baseURL, url, allowAbsoluteUrls), config.params, config.paramsSerializer);
  15091. // HTTP basic authentication
  15092. if (auth) {
  15093. headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')));
  15094. }
  15095. if (_utils.default.isFormData(data)) {
  15096. if (_index.default.hasStandardBrowserEnv || _index.default.hasStandardBrowserWebWorkerEnv) {
  15097. headers.setContentType(undefined); // browser handles it
  15098. } else if (_utils.default.isFunction(data.getHeaders)) {
  15099. // Node.js FormData (like form-data package)
  15100. var formHeaders = data.getHeaders();
  15101. // Only set safe headers to avoid overwriting security headers
  15102. var allowedHeaders = ['content-type', 'content-length'];
  15103. Object.entries(formHeaders).forEach(function (_ref) {
  15104. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  15105. key = _ref2[0],
  15106. val = _ref2[1];
  15107. if (allowedHeaders.includes(key.toLowerCase())) {
  15108. headers.set(key, val);
  15109. }
  15110. });
  15111. }
  15112. }
  15113. // Add xsrf header
  15114. // This is only done if running in a standard browser environment.
  15115. // Specifically not if we're in a web worker, or react-native.
  15116. if (_index.default.hasStandardBrowserEnv) {
  15117. if (_utils.default.isFunction(withXSRFToken)) {
  15118. withXSRFToken = withXSRFToken(newConfig);
  15119. }
  15120. // Strict boolean check — prevents proto-pollution gadgets (e.g. Object.prototype.withXSRFToken = 1)
  15121. // and misconfigurations (e.g. "false") from short-circuiting the same-origin check and leaking
  15122. // the XSRF token cross-origin. See GHSA-xx6v-rp6x-q39c.
  15123. var shouldSendXSRF = withXSRFToken === true || withXSRFToken == null && (0, _isURLSameOrigin.default)(newConfig.url);
  15124. if (shouldSendXSRF) {
  15125. var xsrfValue = xsrfHeaderName && xsrfCookieName && _cookies.default.read(xsrfCookieName);
  15126. if (xsrfValue) {
  15127. headers.set(xsrfHeaderName, xsrfValue);
  15128. }
  15129. }
  15130. }
  15131. return newConfig;
  15132. };
  15133. exports.default = _default;
  15134. /***/ }),
  15135. /* 92 */
  15136. /*!**************************************************************************************************************!*\
  15137. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/isURLSameOrigin.js ***!
  15138. \**************************************************************************************************************/
  15139. /*! no static exports found */
  15140. /***/ (function(module, exports, __webpack_require__) {
  15141. "use strict";
  15142. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15143. Object.defineProperty(exports, "__esModule", {
  15144. value: true
  15145. });
  15146. exports.default = void 0;
  15147. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 73));
  15148. var _default = _index.default.hasStandardBrowserEnv ? function (origin, isMSIE) {
  15149. return function (url) {
  15150. url = new URL(url, _index.default.origin);
  15151. return origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port);
  15152. };
  15153. }(new URL(_index.default.origin), _index.default.navigator && /(msie|trident)/i.test(_index.default.navigator.userAgent)) : function () {
  15154. return true;
  15155. };
  15156. exports.default = _default;
  15157. /***/ }),
  15158. /* 93 */
  15159. /*!******************************************************************************************************!*\
  15160. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/cookies.js ***!
  15161. \******************************************************************************************************/
  15162. /*! no static exports found */
  15163. /***/ (function(module, exports, __webpack_require__) {
  15164. "use strict";
  15165. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15166. Object.defineProperty(exports, "__esModule", {
  15167. value: true
  15168. });
  15169. exports.default = void 0;
  15170. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  15171. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 73));
  15172. var _default = _index.default.hasStandardBrowserEnv ?
  15173. // Standard browser envs support document.cookie
  15174. {
  15175. write: function write(name, value, expires, path, domain, secure, sameSite) {
  15176. if (typeof document === 'undefined') return;
  15177. var cookie = ["".concat(name, "=").concat(encodeURIComponent(value))];
  15178. if (_utils.default.isNumber(expires)) {
  15179. cookie.push("expires=".concat(new Date(expires).toUTCString()));
  15180. }
  15181. if (_utils.default.isString(path)) {
  15182. cookie.push("path=".concat(path));
  15183. }
  15184. if (_utils.default.isString(domain)) {
  15185. cookie.push("domain=".concat(domain));
  15186. }
  15187. if (secure === true) {
  15188. cookie.push('secure');
  15189. }
  15190. if (_utils.default.isString(sameSite)) {
  15191. cookie.push("SameSite=".concat(sameSite));
  15192. }
  15193. document.cookie = cookie.join('; ');
  15194. },
  15195. read: function read(name) {
  15196. if (typeof document === 'undefined') return null;
  15197. var match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
  15198. return match ? decodeURIComponent(match[1]) : null;
  15199. },
  15200. remove: function remove(name) {
  15201. this.write(name, '', Date.now() - 86400000, '/');
  15202. }
  15203. } :
  15204. // Non-standard browser env (web workers, react-native) lack needed support.
  15205. {
  15206. write: function write() {},
  15207. read: function read() {
  15208. return null;
  15209. },
  15210. remove: function remove() {}
  15211. };
  15212. exports.default = _default;
  15213. /***/ }),
  15214. /* 94 */
  15215. /*!*********************************************************************************************************!*\
  15216. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/core/buildFullPath.js ***!
  15217. \*********************************************************************************************************/
  15218. /*! no static exports found */
  15219. /***/ (function(module, exports, __webpack_require__) {
  15220. "use strict";
  15221. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15222. Object.defineProperty(exports, "__esModule", {
  15223. value: true
  15224. });
  15225. exports.default = buildFullPath;
  15226. var _isAbsoluteURL = _interopRequireDefault(__webpack_require__(/*! ../helpers/isAbsoluteURL.js */ 95));
  15227. var _combineURLs = _interopRequireDefault(__webpack_require__(/*! ../helpers/combineURLs.js */ 96));
  15228. /**
  15229. * Creates a new URL by combining the baseURL with the requestedURL,
  15230. * only when the requestedURL is not already an absolute URL.
  15231. * If the requestURL is absolute, this function returns the requestedURL untouched.
  15232. *
  15233. * @param {string} baseURL The base URL
  15234. * @param {string} requestedURL Absolute or relative URL to combine
  15235. *
  15236. * @returns {string} The combined full path
  15237. */
  15238. function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
  15239. var isRelativeUrl = !(0, _isAbsoluteURL.default)(requestedURL);
  15240. if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
  15241. return (0, _combineURLs.default)(baseURL, requestedURL);
  15242. }
  15243. return requestedURL;
  15244. }
  15245. /***/ }),
  15246. /* 95 */
  15247. /*!************************************************************************************************************!*\
  15248. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/isAbsoluteURL.js ***!
  15249. \************************************************************************************************************/
  15250. /*! no static exports found */
  15251. /***/ (function(module, exports, __webpack_require__) {
  15252. "use strict";
  15253. /**
  15254. * Determines whether the specified URL is absolute
  15255. *
  15256. * @param {string} url The URL to test
  15257. *
  15258. * @returns {boolean} True if the specified URL is absolute, otherwise false
  15259. */
  15260. Object.defineProperty(exports, "__esModule", {
  15261. value: true
  15262. });
  15263. exports.default = isAbsoluteURL;
  15264. function isAbsoluteURL(url) {
  15265. // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  15266. // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  15267. // by any combination of letters, digits, plus, period, or hyphen.
  15268. if (typeof url !== 'string') {
  15269. return false;
  15270. }
  15271. return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
  15272. }
  15273. /***/ }),
  15274. /* 96 */
  15275. /*!**********************************************************************************************************!*\
  15276. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/combineURLs.js ***!
  15277. \**********************************************************************************************************/
  15278. /*! no static exports found */
  15279. /***/ (function(module, exports, __webpack_require__) {
  15280. "use strict";
  15281. /**
  15282. * Creates a new URL by combining the specified URLs
  15283. *
  15284. * @param {string} baseURL The base URL
  15285. * @param {string} relativeURL The relative URL
  15286. *
  15287. * @returns {string} The combined URL
  15288. */
  15289. Object.defineProperty(exports, "__esModule", {
  15290. value: true
  15291. });
  15292. exports.default = combineURLs;
  15293. function combineURLs(baseURL, relativeURL) {
  15294. return relativeURL ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;
  15295. }
  15296. /***/ }),
  15297. /* 97 */
  15298. /*!*******************************************************************************************************!*\
  15299. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/core/mergeConfig.js ***!
  15300. \*******************************************************************************************************/
  15301. /*! no static exports found */
  15302. /***/ (function(module, exports, __webpack_require__) {
  15303. "use strict";
  15304. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15305. Object.defineProperty(exports, "__esModule", {
  15306. value: true
  15307. });
  15308. exports.default = mergeConfig;
  15309. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  15310. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  15311. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ./AxiosHeaders.js */ 80));
  15312. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  15313. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  15314. var headersToObject = function headersToObject(thing) {
  15315. return thing instanceof _AxiosHeaders.default ? _objectSpread({}, thing) : thing;
  15316. };
  15317. /**
  15318. * Config-specific merge-function which creates a new config-object
  15319. * by merging two configuration objects together.
  15320. *
  15321. * @param {Object} config1
  15322. * @param {Object} config2
  15323. *
  15324. * @returns {Object} New object resulting from merging config2 to config1
  15325. */
  15326. function mergeConfig(config1, config2) {
  15327. // eslint-disable-next-line no-param-reassign
  15328. config2 = config2 || {};
  15329. // Use a null-prototype object so that downstream reads such as `config.auth`
  15330. // or `config.baseURL` cannot inherit polluted values from Object.prototype
  15331. // (see GHSA-q8qp-cvcw-x6jj). `hasOwnProperty` is restored as a non-enumerable
  15332. // own slot to preserve ergonomics for user code that relies on it.
  15333. var config = Object.create(null);
  15334. Object.defineProperty(config, 'hasOwnProperty', {
  15335. value: Object.prototype.hasOwnProperty,
  15336. enumerable: false,
  15337. writable: true,
  15338. configurable: true
  15339. });
  15340. function getMergedValue(target, source, prop, caseless) {
  15341. if (_utils.default.isPlainObject(target) && _utils.default.isPlainObject(source)) {
  15342. return _utils.default.merge.call({
  15343. caseless: caseless
  15344. }, target, source);
  15345. } else if (_utils.default.isPlainObject(source)) {
  15346. return _utils.default.merge({}, source);
  15347. } else if (_utils.default.isArray(source)) {
  15348. return source.slice();
  15349. }
  15350. return source;
  15351. }
  15352. function mergeDeepProperties(a, b, prop, caseless) {
  15353. if (!_utils.default.isUndefined(b)) {
  15354. return getMergedValue(a, b, prop, caseless);
  15355. } else if (!_utils.default.isUndefined(a)) {
  15356. return getMergedValue(undefined, a, prop, caseless);
  15357. }
  15358. }
  15359. // eslint-disable-next-line consistent-return
  15360. function valueFromConfig2(a, b) {
  15361. if (!_utils.default.isUndefined(b)) {
  15362. return getMergedValue(undefined, b);
  15363. }
  15364. }
  15365. // eslint-disable-next-line consistent-return
  15366. function defaultToConfig2(a, b) {
  15367. if (!_utils.default.isUndefined(b)) {
  15368. return getMergedValue(undefined, b);
  15369. } else if (!_utils.default.isUndefined(a)) {
  15370. return getMergedValue(undefined, a);
  15371. }
  15372. }
  15373. // eslint-disable-next-line consistent-return
  15374. function mergeDirectKeys(a, b, prop) {
  15375. if (_utils.default.hasOwnProp(config2, prop)) {
  15376. return getMergedValue(a, b);
  15377. } else if (_utils.default.hasOwnProp(config1, prop)) {
  15378. return getMergedValue(undefined, a);
  15379. }
  15380. }
  15381. var mergeMap = {
  15382. url: valueFromConfig2,
  15383. method: valueFromConfig2,
  15384. data: valueFromConfig2,
  15385. baseURL: defaultToConfig2,
  15386. transformRequest: defaultToConfig2,
  15387. transformResponse: defaultToConfig2,
  15388. paramsSerializer: defaultToConfig2,
  15389. timeout: defaultToConfig2,
  15390. timeoutMessage: defaultToConfig2,
  15391. withCredentials: defaultToConfig2,
  15392. withXSRFToken: defaultToConfig2,
  15393. adapter: defaultToConfig2,
  15394. responseType: defaultToConfig2,
  15395. xsrfCookieName: defaultToConfig2,
  15396. xsrfHeaderName: defaultToConfig2,
  15397. onUploadProgress: defaultToConfig2,
  15398. onDownloadProgress: defaultToConfig2,
  15399. decompress: defaultToConfig2,
  15400. maxContentLength: defaultToConfig2,
  15401. maxBodyLength: defaultToConfig2,
  15402. beforeRedirect: defaultToConfig2,
  15403. transport: defaultToConfig2,
  15404. httpAgent: defaultToConfig2,
  15405. httpsAgent: defaultToConfig2,
  15406. cancelToken: defaultToConfig2,
  15407. socketPath: defaultToConfig2,
  15408. allowedSocketPaths: defaultToConfig2,
  15409. responseEncoding: defaultToConfig2,
  15410. validateStatus: mergeDirectKeys,
  15411. headers: function headers(a, b, prop) {
  15412. return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true);
  15413. }
  15414. };
  15415. _utils.default.forEach(Object.keys(_objectSpread(_objectSpread({}, config1), config2)), function computeConfigValue(prop) {
  15416. if (prop === '__proto__' || prop === 'constructor' || prop === 'prototype') return;
  15417. var merge = _utils.default.hasOwnProp(mergeMap, prop) ? mergeMap[prop] : mergeDeepProperties;
  15418. var a = _utils.default.hasOwnProp(config1, prop) ? config1[prop] : undefined;
  15419. var b = _utils.default.hasOwnProp(config2, prop) ? config2[prop] : undefined;
  15420. var configValue = merge(a, b, prop);
  15421. _utils.default.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
  15422. });
  15423. return config;
  15424. }
  15425. /***/ }),
  15426. /* 98 */
  15427. /*!*****************************************************************************************************!*\
  15428. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/adapters/fetch.js ***!
  15429. \*****************************************************************************************************/
  15430. /*! no static exports found */
  15431. /***/ (function(module, exports, __webpack_require__) {
  15432. "use strict";
  15433. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15434. Object.defineProperty(exports, "__esModule", {
  15435. value: true
  15436. });
  15437. exports.getFetch = exports.default = void 0;
  15438. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 49));
  15439. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  15440. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  15441. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 51));
  15442. var _index = _interopRequireDefault(__webpack_require__(/*! ../platform/index.js */ 73));
  15443. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  15444. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 59));
  15445. var _composeSignals = _interopRequireDefault(__webpack_require__(/*! ../helpers/composeSignals.js */ 99));
  15446. var _trackStream = __webpack_require__(/*! ../helpers/trackStream.js */ 100);
  15447. var _AxiosHeaders = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosHeaders.js */ 80));
  15448. var _progressEventReducer = __webpack_require__(/*! ../helpers/progressEventReducer.js */ 88);
  15449. var _resolveConfig2 = _interopRequireDefault(__webpack_require__(/*! ../helpers/resolveConfig.js */ 91));
  15450. var _settle = _interopRequireDefault(__webpack_require__(/*! ../core/settle.js */ 86));
  15451. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  15452. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  15453. var DEFAULT_CHUNK_SIZE = 64 * 1024;
  15454. var isFunction = _utils.default.isFunction;
  15455. var globalFetchAPI = function (_ref) {
  15456. var Request = _ref.Request,
  15457. Response = _ref.Response;
  15458. return {
  15459. Request: Request,
  15460. Response: Response
  15461. };
  15462. }(_utils.default.global);
  15463. var _utils$global = _utils.default.global,
  15464. ReadableStream = _utils$global.ReadableStream,
  15465. TextEncoder = _utils$global.TextEncoder;
  15466. var test = function test(fn) {
  15467. try {
  15468. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  15469. args[_key - 1] = arguments[_key];
  15470. }
  15471. return !!fn.apply(void 0, args);
  15472. } catch (e) {
  15473. return false;
  15474. }
  15475. };
  15476. var factory = function factory(env) {
  15477. env = _utils.default.merge.call({
  15478. skipUndefined: true
  15479. }, globalFetchAPI, env);
  15480. var _env = env,
  15481. envFetch = _env.fetch,
  15482. Request = _env.Request,
  15483. Response = _env.Response;
  15484. var isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
  15485. var isRequestSupported = isFunction(Request);
  15486. var isResponseSupported = isFunction(Response);
  15487. if (!isFetchSupported) {
  15488. return false;
  15489. }
  15490. var isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream);
  15491. var encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? function (encoder) {
  15492. return function (str) {
  15493. return encoder.encode(str);
  15494. };
  15495. }(new TextEncoder()) : /*#__PURE__*/function () {
  15496. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(str) {
  15497. return _regenerator.default.wrap(function _callee$(_context) {
  15498. while (1) {
  15499. switch (_context.prev = _context.next) {
  15500. case 0:
  15501. _context.t0 = Uint8Array;
  15502. _context.next = 3;
  15503. return new Request(str).arrayBuffer();
  15504. case 3:
  15505. _context.t1 = _context.sent;
  15506. return _context.abrupt("return", new _context.t0(_context.t1));
  15507. case 5:
  15508. case "end":
  15509. return _context.stop();
  15510. }
  15511. }
  15512. }, _callee);
  15513. }));
  15514. return function (_x) {
  15515. return _ref2.apply(this, arguments);
  15516. };
  15517. }());
  15518. var supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(function () {
  15519. var duplexAccessed = false;
  15520. var request = new Request(_index.default.origin, {
  15521. body: new ReadableStream(),
  15522. method: 'POST',
  15523. get duplex() {
  15524. duplexAccessed = true;
  15525. return 'half';
  15526. }
  15527. });
  15528. var hasContentType = request.headers.has('Content-Type');
  15529. if (request.body != null) {
  15530. request.body.cancel();
  15531. }
  15532. return duplexAccessed && !hasContentType;
  15533. });
  15534. var supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(function () {
  15535. return _utils.default.isReadableStream(new Response('').body);
  15536. });
  15537. var resolvers = {
  15538. stream: supportsResponseStream && function (res) {
  15539. return res.body;
  15540. }
  15541. };
  15542. isFetchSupported && function () {
  15543. ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(function (type) {
  15544. !resolvers[type] && (resolvers[type] = function (res, config) {
  15545. var method = res && res[type];
  15546. if (method) {
  15547. return method.call(res);
  15548. }
  15549. throw new _AxiosError.default("Response type '".concat(type, "' is not supported"), _AxiosError.default.ERR_NOT_SUPPORT, config);
  15550. });
  15551. });
  15552. }();
  15553. var getBodyLength = /*#__PURE__*/function () {
  15554. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(body) {
  15555. var _request;
  15556. return _regenerator.default.wrap(function _callee2$(_context2) {
  15557. while (1) {
  15558. switch (_context2.prev = _context2.next) {
  15559. case 0:
  15560. if (!(body == null)) {
  15561. _context2.next = 2;
  15562. break;
  15563. }
  15564. return _context2.abrupt("return", 0);
  15565. case 2:
  15566. if (!_utils.default.isBlob(body)) {
  15567. _context2.next = 4;
  15568. break;
  15569. }
  15570. return _context2.abrupt("return", body.size);
  15571. case 4:
  15572. if (!_utils.default.isSpecCompliantForm(body)) {
  15573. _context2.next = 9;
  15574. break;
  15575. }
  15576. _request = new Request(_index.default.origin, {
  15577. method: 'POST',
  15578. body: body
  15579. });
  15580. _context2.next = 8;
  15581. return _request.arrayBuffer();
  15582. case 8:
  15583. return _context2.abrupt("return", _context2.sent.byteLength);
  15584. case 9:
  15585. if (!(_utils.default.isArrayBufferView(body) || _utils.default.isArrayBuffer(body))) {
  15586. _context2.next = 11;
  15587. break;
  15588. }
  15589. return _context2.abrupt("return", body.byteLength);
  15590. case 11:
  15591. if (_utils.default.isURLSearchParams(body)) {
  15592. body = body + '';
  15593. }
  15594. if (!_utils.default.isString(body)) {
  15595. _context2.next = 16;
  15596. break;
  15597. }
  15598. _context2.next = 15;
  15599. return encodeText(body);
  15600. case 15:
  15601. return _context2.abrupt("return", _context2.sent.byteLength);
  15602. case 16:
  15603. case "end":
  15604. return _context2.stop();
  15605. }
  15606. }
  15607. }, _callee2);
  15608. }));
  15609. return function getBodyLength(_x2) {
  15610. return _ref3.apply(this, arguments);
  15611. };
  15612. }();
  15613. var resolveBodyLength = /*#__PURE__*/function () {
  15614. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(headers, body) {
  15615. var length;
  15616. return _regenerator.default.wrap(function _callee3$(_context3) {
  15617. while (1) {
  15618. switch (_context3.prev = _context3.next) {
  15619. case 0:
  15620. length = _utils.default.toFiniteNumber(headers.getContentLength());
  15621. return _context3.abrupt("return", length == null ? getBodyLength(body) : length);
  15622. case 2:
  15623. case "end":
  15624. return _context3.stop();
  15625. }
  15626. }
  15627. }, _callee3);
  15628. }));
  15629. return function resolveBodyLength(_x3, _x4) {
  15630. return _ref4.apply(this, arguments);
  15631. };
  15632. }();
  15633. return /*#__PURE__*/function () {
  15634. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(config) {
  15635. var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, _fetch, composedSignal, request, unsubscribe, requestContentLength, _request, contentTypeHeader, _progressEventDecorat, _progressEventDecorat2, onProgress, flush, isCredentialsSupported, contentType, resolvedOptions, response, isStreamResponse, options, responseContentLength, _ref6, _ref7, _onProgress, _flush, responseData;
  15636. return _regenerator.default.wrap(function _callee4$(_context4) {
  15637. while (1) {
  15638. switch (_context4.prev = _context4.next) {
  15639. case 0:
  15640. _resolveConfig = (0, _resolveConfig2.default)(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === void 0 ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions;
  15641. _fetch = envFetch || fetch;
  15642. responseType = responseType ? (responseType + '').toLowerCase() : 'text';
  15643. composedSignal = (0, _composeSignals.default)([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
  15644. request = null;
  15645. unsubscribe = composedSignal && composedSignal.unsubscribe && function () {
  15646. composedSignal.unsubscribe();
  15647. };
  15648. _context4.prev = 6;
  15649. _context4.t0 = onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head';
  15650. if (!_context4.t0) {
  15651. _context4.next = 13;
  15652. break;
  15653. }
  15654. _context4.next = 11;
  15655. return resolveBodyLength(headers, data);
  15656. case 11:
  15657. _context4.t1 = requestContentLength = _context4.sent;
  15658. _context4.t0 = _context4.t1 !== 0;
  15659. case 13:
  15660. if (!_context4.t0) {
  15661. _context4.next = 17;
  15662. break;
  15663. }
  15664. _request = new Request(url, {
  15665. method: 'POST',
  15666. body: data,
  15667. duplex: 'half'
  15668. });
  15669. if (_utils.default.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
  15670. headers.setContentType(contentTypeHeader);
  15671. }
  15672. if (_request.body) {
  15673. _progressEventDecorat = (0, _progressEventReducer.progressEventDecorator)(requestContentLength, (0, _progressEventReducer.progressEventReducer)((0, _progressEventReducer.asyncDecorator)(onUploadProgress))), _progressEventDecorat2 = (0, _slicedToArray2.default)(_progressEventDecorat, 2), onProgress = _progressEventDecorat2[0], flush = _progressEventDecorat2[1];
  15674. data = (0, _trackStream.trackStream)(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
  15675. }
  15676. case 17:
  15677. if (!_utils.default.isString(withCredentials)) {
  15678. withCredentials = withCredentials ? 'include' : 'omit';
  15679. }
  15680. // Cloudflare Workers throws when credentials are defined
  15681. // see https://github.com/cloudflare/workerd/issues/902
  15682. isCredentialsSupported = isRequestSupported && 'credentials' in Request.prototype; // If data is FormData and Content-Type is multipart/form-data without boundary,
  15683. // delete it so fetch can set it correctly with the boundary
  15684. if (_utils.default.isFormData(data)) {
  15685. contentType = headers.getContentType();
  15686. if (contentType && /^multipart\/form-data/i.test(contentType) && !/boundary=/i.test(contentType)) {
  15687. headers.delete('content-type');
  15688. }
  15689. }
  15690. resolvedOptions = _objectSpread(_objectSpread({}, fetchOptions), {}, {
  15691. signal: composedSignal,
  15692. method: method.toUpperCase(),
  15693. headers: headers.normalize().toJSON(),
  15694. body: data,
  15695. duplex: 'half',
  15696. credentials: isCredentialsSupported ? withCredentials : undefined
  15697. });
  15698. request = isRequestSupported && new Request(url, resolvedOptions);
  15699. _context4.next = 24;
  15700. return isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions);
  15701. case 24:
  15702. response = _context4.sent;
  15703. isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
  15704. if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
  15705. options = {};
  15706. ['status', 'statusText', 'headers'].forEach(function (prop) {
  15707. options[prop] = response[prop];
  15708. });
  15709. responseContentLength = _utils.default.toFiniteNumber(response.headers.get('content-length'));
  15710. _ref6 = onDownloadProgress && (0, _progressEventReducer.progressEventDecorator)(responseContentLength, (0, _progressEventReducer.progressEventReducer)((0, _progressEventReducer.asyncDecorator)(onDownloadProgress), true)) || [], _ref7 = (0, _slicedToArray2.default)(_ref6, 2), _onProgress = _ref7[0], _flush = _ref7[1];
  15711. response = new Response((0, _trackStream.trackStream)(response.body, DEFAULT_CHUNK_SIZE, _onProgress, function () {
  15712. _flush && _flush();
  15713. unsubscribe && unsubscribe();
  15714. }), options);
  15715. }
  15716. responseType = responseType || 'text';
  15717. _context4.next = 30;
  15718. return resolvers[_utils.default.findKey(resolvers, responseType) || 'text'](response, config);
  15719. case 30:
  15720. responseData = _context4.sent;
  15721. !isStreamResponse && unsubscribe && unsubscribe();
  15722. _context4.next = 34;
  15723. return new Promise(function (resolve, reject) {
  15724. (0, _settle.default)(resolve, reject, {
  15725. data: responseData,
  15726. headers: _AxiosHeaders.default.from(response.headers),
  15727. status: response.status,
  15728. statusText: response.statusText,
  15729. config: config,
  15730. request: request
  15731. });
  15732. });
  15733. case 34:
  15734. return _context4.abrupt("return", _context4.sent);
  15735. case 37:
  15736. _context4.prev = 37;
  15737. _context4.t2 = _context4["catch"](6);
  15738. unsubscribe && unsubscribe();
  15739. if (!(_context4.t2 && _context4.t2.name === 'TypeError' && /Load failed|fetch/i.test(_context4.t2.message))) {
  15740. _context4.next = 42;
  15741. break;
  15742. }
  15743. throw Object.assign(new _AxiosError.default('Network Error', _AxiosError.default.ERR_NETWORK, config, request, _context4.t2 && _context4.t2.response), {
  15744. cause: _context4.t2.cause || _context4.t2
  15745. });
  15746. case 42:
  15747. throw _AxiosError.default.from(_context4.t2, _context4.t2 && _context4.t2.code, config, request, _context4.t2 && _context4.t2.response);
  15748. case 43:
  15749. case "end":
  15750. return _context4.stop();
  15751. }
  15752. }
  15753. }, _callee4, null, [[6, 37]]);
  15754. }));
  15755. return function (_x5) {
  15756. return _ref5.apply(this, arguments);
  15757. };
  15758. }();
  15759. };
  15760. var seedCache = new Map();
  15761. var getFetch = function getFetch(config) {
  15762. var env = config && config.env || {};
  15763. var fetch = env.fetch,
  15764. Request = env.Request,
  15765. Response = env.Response;
  15766. var seeds = [Request, Response, fetch];
  15767. var len = seeds.length,
  15768. i = len,
  15769. seed,
  15770. target,
  15771. map = seedCache;
  15772. while (i--) {
  15773. seed = seeds[i];
  15774. target = map.get(seed);
  15775. target === undefined && map.set(seed, target = i ? new Map() : factory(env));
  15776. map = target;
  15777. }
  15778. return target;
  15779. };
  15780. exports.getFetch = getFetch;
  15781. var adapter = getFetch();
  15782. var _default = adapter;
  15783. exports.default = _default;
  15784. /***/ }),
  15785. /* 99 */
  15786. /*!*************************************************************************************************************!*\
  15787. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/composeSignals.js ***!
  15788. \*************************************************************************************************************/
  15789. /*! no static exports found */
  15790. /***/ (function(module, exports, __webpack_require__) {
  15791. "use strict";
  15792. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15793. Object.defineProperty(exports, "__esModule", {
  15794. value: true
  15795. });
  15796. exports.default = void 0;
  15797. var _CanceledError = _interopRequireDefault(__webpack_require__(/*! ../cancel/CanceledError.js */ 83));
  15798. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 59));
  15799. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  15800. var composeSignals = function composeSignals(signals, timeout) {
  15801. var _signals = signals = signals ? signals.filter(Boolean) : [],
  15802. length = _signals.length;
  15803. if (timeout || length) {
  15804. var controller = new AbortController();
  15805. var aborted;
  15806. var onabort = function onabort(reason) {
  15807. if (!aborted) {
  15808. aborted = true;
  15809. unsubscribe();
  15810. var err = reason instanceof Error ? reason : this.reason;
  15811. controller.abort(err instanceof _AxiosError.default ? err : new _CanceledError.default(err instanceof Error ? err.message : err));
  15812. }
  15813. };
  15814. var timer = timeout && setTimeout(function () {
  15815. timer = null;
  15816. onabort(new _AxiosError.default("timeout of ".concat(timeout, "ms exceeded"), _AxiosError.default.ETIMEDOUT));
  15817. }, timeout);
  15818. var unsubscribe = function unsubscribe() {
  15819. if (signals) {
  15820. timer && clearTimeout(timer);
  15821. timer = null;
  15822. signals.forEach(function (signal) {
  15823. signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
  15824. });
  15825. signals = null;
  15826. }
  15827. };
  15828. signals.forEach(function (signal) {
  15829. return signal.addEventListener('abort', onabort);
  15830. });
  15831. var signal = controller.signal;
  15832. signal.unsubscribe = function () {
  15833. return _utils.default.asap(unsubscribe);
  15834. };
  15835. return signal;
  15836. }
  15837. };
  15838. var _default = composeSignals;
  15839. exports.default = _default;
  15840. /***/ }),
  15841. /* 100 */
  15842. /*!**********************************************************************************************************!*\
  15843. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/trackStream.js ***!
  15844. \**********************************************************************************************************/
  15845. /*! no static exports found */
  15846. /***/ (function(module, exports, __webpack_require__) {
  15847. "use strict";
  15848. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  15849. Object.defineProperty(exports, "__esModule", {
  15850. value: true
  15851. });
  15852. exports.trackStream = exports.streamChunk = exports.readBytes = void 0;
  15853. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 49));
  15854. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 51));
  15855. var _wrapAsyncGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapAsyncGenerator */ 101));
  15856. var _awaitAsyncGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/awaitAsyncGenerator */ 104));
  15857. var _asyncGeneratorDelegate2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncGeneratorDelegate */ 105));
  15858. function _asyncIterator(iterable) { var method, async, sync, retry = 2; for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) { if (async && null != (method = iterable[async])) return method.call(iterable); if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable)); async = "@@asyncIterator", sync = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
  15859. function AsyncFromSyncIterator(s) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var done = r.done; return Promise.resolve(r.value).then(function (value) { return { value: value, done: done }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(s) { this.s = s, this.n = s.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, return: function _return(value) { var ret = this.s.return; return void 0 === ret ? Promise.resolve({ value: value, done: !0 }) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments)); }, throw: function _throw(value) { var thr = this.s.return; return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(s); }
  15860. var streamChunk = /*#__PURE__*/_regenerator.default.mark(function streamChunk(chunk, chunkSize) {
  15861. var len, pos, end;
  15862. return _regenerator.default.wrap(function streamChunk$(_context) {
  15863. while (1) {
  15864. switch (_context.prev = _context.next) {
  15865. case 0:
  15866. len = chunk.byteLength;
  15867. if (!(!chunkSize || len < chunkSize)) {
  15868. _context.next = 5;
  15869. break;
  15870. }
  15871. _context.next = 4;
  15872. return chunk;
  15873. case 4:
  15874. return _context.abrupt("return");
  15875. case 5:
  15876. pos = 0;
  15877. case 6:
  15878. if (!(pos < len)) {
  15879. _context.next = 13;
  15880. break;
  15881. }
  15882. end = pos + chunkSize;
  15883. _context.next = 10;
  15884. return chunk.slice(pos, end);
  15885. case 10:
  15886. pos = end;
  15887. _context.next = 6;
  15888. break;
  15889. case 13:
  15890. case "end":
  15891. return _context.stop();
  15892. }
  15893. }
  15894. }, streamChunk);
  15895. });
  15896. exports.streamChunk = streamChunk;
  15897. var readBytes = /*#__PURE__*/function () {
  15898. var _ref = (0, _wrapAsyncGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(iterable, chunkSize) {
  15899. var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, chunk;
  15900. return _regenerator.default.wrap(function _callee$(_context2) {
  15901. while (1) {
  15902. switch (_context2.prev = _context2.next) {
  15903. case 0:
  15904. _iteratorAbruptCompletion = false;
  15905. _didIteratorError = false;
  15906. _context2.prev = 2;
  15907. _iterator = _asyncIterator(readStream(iterable));
  15908. case 4:
  15909. _context2.next = 6;
  15910. return (0, _awaitAsyncGenerator2.default)(_iterator.next());
  15911. case 6:
  15912. if (!(_iteratorAbruptCompletion = !(_step = _context2.sent).done)) {
  15913. _context2.next = 12;
  15914. break;
  15915. }
  15916. chunk = _step.value;
  15917. return _context2.delegateYield((0, _asyncGeneratorDelegate2.default)(_asyncIterator(streamChunk(chunk, chunkSize)), _awaitAsyncGenerator2.default), "t0", 9);
  15918. case 9:
  15919. _iteratorAbruptCompletion = false;
  15920. _context2.next = 4;
  15921. break;
  15922. case 12:
  15923. _context2.next = 18;
  15924. break;
  15925. case 14:
  15926. _context2.prev = 14;
  15927. _context2.t1 = _context2["catch"](2);
  15928. _didIteratorError = true;
  15929. _iteratorError = _context2.t1;
  15930. case 18:
  15931. _context2.prev = 18;
  15932. _context2.prev = 19;
  15933. if (!(_iteratorAbruptCompletion && _iterator.return != null)) {
  15934. _context2.next = 23;
  15935. break;
  15936. }
  15937. _context2.next = 23;
  15938. return (0, _awaitAsyncGenerator2.default)(_iterator.return());
  15939. case 23:
  15940. _context2.prev = 23;
  15941. if (!_didIteratorError) {
  15942. _context2.next = 26;
  15943. break;
  15944. }
  15945. throw _iteratorError;
  15946. case 26:
  15947. return _context2.finish(23);
  15948. case 27:
  15949. return _context2.finish(18);
  15950. case 28:
  15951. case "end":
  15952. return _context2.stop();
  15953. }
  15954. }
  15955. }, _callee, null, [[2, 14, 18, 28], [19,, 23, 27]]);
  15956. }));
  15957. return function readBytes(_x, _x2) {
  15958. return _ref.apply(this, arguments);
  15959. };
  15960. }();
  15961. exports.readBytes = readBytes;
  15962. var readStream = /*#__PURE__*/function () {
  15963. var _ref2 = (0, _wrapAsyncGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(stream) {
  15964. var reader, _yield$_awaitAsyncGen, done, value;
  15965. return _regenerator.default.wrap(function _callee2$(_context3) {
  15966. while (1) {
  15967. switch (_context3.prev = _context3.next) {
  15968. case 0:
  15969. if (!stream[Symbol.asyncIterator]) {
  15970. _context3.next = 3;
  15971. break;
  15972. }
  15973. return _context3.delegateYield((0, _asyncGeneratorDelegate2.default)(_asyncIterator(stream), _awaitAsyncGenerator2.default), "t0", 2);
  15974. case 2:
  15975. return _context3.abrupt("return");
  15976. case 3:
  15977. reader = stream.getReader();
  15978. _context3.prev = 4;
  15979. case 5:
  15980. _context3.next = 7;
  15981. return (0, _awaitAsyncGenerator2.default)(reader.read());
  15982. case 7:
  15983. _yield$_awaitAsyncGen = _context3.sent;
  15984. done = _yield$_awaitAsyncGen.done;
  15985. value = _yield$_awaitAsyncGen.value;
  15986. if (!done) {
  15987. _context3.next = 12;
  15988. break;
  15989. }
  15990. return _context3.abrupt("break", 16);
  15991. case 12:
  15992. _context3.next = 14;
  15993. return value;
  15994. case 14:
  15995. _context3.next = 5;
  15996. break;
  15997. case 16:
  15998. _context3.prev = 16;
  15999. _context3.next = 19;
  16000. return (0, _awaitAsyncGenerator2.default)(reader.cancel());
  16001. case 19:
  16002. return _context3.finish(16);
  16003. case 20:
  16004. case "end":
  16005. return _context3.stop();
  16006. }
  16007. }
  16008. }, _callee2, null, [[4,, 16, 20]]);
  16009. }));
  16010. return function readStream(_x3) {
  16011. return _ref2.apply(this, arguments);
  16012. };
  16013. }();
  16014. var trackStream = function trackStream(stream, chunkSize, onProgress, onFinish) {
  16015. var iterator = readBytes(stream, chunkSize);
  16016. var bytes = 0;
  16017. var done;
  16018. var _onFinish = function _onFinish(e) {
  16019. if (!done) {
  16020. done = true;
  16021. onFinish && onFinish(e);
  16022. }
  16023. };
  16024. return new ReadableStream({
  16025. pull: function pull(controller) {
  16026. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  16027. var _yield$iterator$next, _done, value, len, loadedBytes;
  16028. return _regenerator.default.wrap(function _callee3$(_context4) {
  16029. while (1) {
  16030. switch (_context4.prev = _context4.next) {
  16031. case 0:
  16032. _context4.prev = 0;
  16033. _context4.next = 3;
  16034. return iterator.next();
  16035. case 3:
  16036. _yield$iterator$next = _context4.sent;
  16037. _done = _yield$iterator$next.done;
  16038. value = _yield$iterator$next.value;
  16039. if (!_done) {
  16040. _context4.next = 10;
  16041. break;
  16042. }
  16043. _onFinish();
  16044. controller.close();
  16045. return _context4.abrupt("return");
  16046. case 10:
  16047. len = value.byteLength;
  16048. if (onProgress) {
  16049. loadedBytes = bytes += len;
  16050. onProgress(loadedBytes);
  16051. }
  16052. controller.enqueue(new Uint8Array(value));
  16053. _context4.next = 19;
  16054. break;
  16055. case 15:
  16056. _context4.prev = 15;
  16057. _context4.t0 = _context4["catch"](0);
  16058. _onFinish(_context4.t0);
  16059. throw _context4.t0;
  16060. case 19:
  16061. case "end":
  16062. return _context4.stop();
  16063. }
  16064. }
  16065. }, _callee3, null, [[0, 15]]);
  16066. }))();
  16067. },
  16068. cancel: function cancel(reason) {
  16069. _onFinish(reason);
  16070. return iterator.return();
  16071. }
  16072. }, {
  16073. highWaterMark: 2
  16074. });
  16075. };
  16076. exports.trackStream = trackStream;
  16077. /***/ }),
  16078. /* 101 */
  16079. /*!*******************************************************************!*\
  16080. !*** ./node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js ***!
  16081. \*******************************************************************/
  16082. /*! no static exports found */
  16083. /***/ (function(module, exports, __webpack_require__) {
  16084. var AsyncGenerator = __webpack_require__(/*! ./AsyncGenerator.js */ 102);
  16085. function _wrapAsyncGenerator(fn) {
  16086. return function () {
  16087. return new AsyncGenerator(fn.apply(this, arguments));
  16088. };
  16089. }
  16090. module.exports = _wrapAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16091. /***/ }),
  16092. /* 102 */
  16093. /*!***************************************************************!*\
  16094. !*** ./node_modules/@babel/runtime/helpers/AsyncGenerator.js ***!
  16095. \***************************************************************/
  16096. /*! no static exports found */
  16097. /***/ (function(module, exports, __webpack_require__) {
  16098. var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ 103);
  16099. function AsyncGenerator(e) {
  16100. var r, t;
  16101. function resume(r, t) {
  16102. try {
  16103. var n = e[r](t),
  16104. o = n.value,
  16105. u = o instanceof OverloadYield;
  16106. Promise.resolve(u ? o.v : o).then(function (t) {
  16107. if (u) {
  16108. var i = "return" === r ? "return" : "next";
  16109. if (!o.k || t.done) return resume(i, t);
  16110. t = e[i](t).value;
  16111. }
  16112. settle(n.done ? "return" : "normal", t);
  16113. }, function (e) {
  16114. resume("throw", e);
  16115. });
  16116. } catch (e) {
  16117. settle("throw", e);
  16118. }
  16119. }
  16120. function settle(e, n) {
  16121. switch (e) {
  16122. case "return":
  16123. r.resolve({
  16124. value: n,
  16125. done: !0
  16126. });
  16127. break;
  16128. case "throw":
  16129. r.reject(n);
  16130. break;
  16131. default:
  16132. r.resolve({
  16133. value: n,
  16134. done: !1
  16135. });
  16136. }
  16137. (r = r.next) ? resume(r.key, r.arg) : t = null;
  16138. }
  16139. this._invoke = function (e, n) {
  16140. return new Promise(function (o, u) {
  16141. var i = {
  16142. key: e,
  16143. arg: n,
  16144. resolve: o,
  16145. reject: u,
  16146. next: null
  16147. };
  16148. t ? t = t.next = i : (r = t = i, resume(e, n));
  16149. });
  16150. }, "function" != typeof e["return"] && (this["return"] = void 0);
  16151. }
  16152. AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
  16153. return this;
  16154. }, AsyncGenerator.prototype.next = function (e) {
  16155. return this._invoke("next", e);
  16156. }, AsyncGenerator.prototype["throw"] = function (e) {
  16157. return this._invoke("throw", e);
  16158. }, AsyncGenerator.prototype["return"] = function (e) {
  16159. return this._invoke("return", e);
  16160. };
  16161. module.exports = AsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16162. /***/ }),
  16163. /* 103 */
  16164. /*!**************************************************************!*\
  16165. !*** ./node_modules/@babel/runtime/helpers/OverloadYield.js ***!
  16166. \**************************************************************/
  16167. /*! no static exports found */
  16168. /***/ (function(module, exports) {
  16169. function _OverloadYield(t, e) {
  16170. this.v = t, this.k = e;
  16171. }
  16172. module.exports = _OverloadYield, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16173. /***/ }),
  16174. /* 104 */
  16175. /*!********************************************************************!*\
  16176. !*** ./node_modules/@babel/runtime/helpers/awaitAsyncGenerator.js ***!
  16177. \********************************************************************/
  16178. /*! no static exports found */
  16179. /***/ (function(module, exports, __webpack_require__) {
  16180. var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ 103);
  16181. function _awaitAsyncGenerator(e) {
  16182. return new OverloadYield(e, 0);
  16183. }
  16184. module.exports = _awaitAsyncGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16185. /***/ }),
  16186. /* 105 */
  16187. /*!***********************************************************************!*\
  16188. !*** ./node_modules/@babel/runtime/helpers/asyncGeneratorDelegate.js ***!
  16189. \***********************************************************************/
  16190. /*! no static exports found */
  16191. /***/ (function(module, exports, __webpack_require__) {
  16192. var OverloadYield = __webpack_require__(/*! ./OverloadYield.js */ 103);
  16193. function _asyncGeneratorDelegate(t) {
  16194. var e = {},
  16195. n = !1;
  16196. function pump(e, r) {
  16197. return n = !0, r = new Promise(function (n) {
  16198. n(t[e](r));
  16199. }), {
  16200. done: !1,
  16201. value: new OverloadYield(r, 1)
  16202. };
  16203. }
  16204. return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () {
  16205. return this;
  16206. }, e.next = function (t) {
  16207. return n ? (n = !1, t) : pump("next", t);
  16208. }, "function" == typeof t["throw"] && (e["throw"] = function (t) {
  16209. if (n) throw n = !1, t;
  16210. return pump("throw", t);
  16211. }), "function" == typeof t["return"] && (e["return"] = function (t) {
  16212. return n ? (n = !1, t) : pump("return", t);
  16213. }), e;
  16214. }
  16215. module.exports = _asyncGeneratorDelegate, module.exports.__esModule = true, module.exports["default"] = module.exports;
  16216. /***/ }),
  16217. /* 106 */
  16218. /*!********************************************************************************************************!*\
  16219. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/validator.js ***!
  16220. \********************************************************************************************************/
  16221. /*! no static exports found */
  16222. /***/ (function(module, exports, __webpack_require__) {
  16223. "use strict";
  16224. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16225. Object.defineProperty(exports, "__esModule", {
  16226. value: true
  16227. });
  16228. exports.default = void 0;
  16229. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  16230. var _data = __webpack_require__(/*! ../env/data.js */ 107);
  16231. var _AxiosError = _interopRequireDefault(__webpack_require__(/*! ../core/AxiosError.js */ 59));
  16232. var validators = {};
  16233. // eslint-disable-next-line func-names
  16234. ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function (type, i) {
  16235. validators[type] = function validator(thing) {
  16236. return (0, _typeof2.default)(thing) === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
  16237. };
  16238. });
  16239. var deprecatedWarnings = {};
  16240. /**
  16241. * Transitional option validator
  16242. *
  16243. * @param {function|boolean?} validator - set to false if the transitional option has been removed
  16244. * @param {string?} version - deprecated version / removed since version
  16245. * @param {string?} message - some message with additional info
  16246. *
  16247. * @returns {function}
  16248. */
  16249. validators.transitional = function transitional(validator, version, message) {
  16250. function formatMessage(opt, desc) {
  16251. return '[Axios v' + _data.VERSION + "] Transitional option '" + opt + "'" + desc + (message ? '. ' + message : '');
  16252. }
  16253. // eslint-disable-next-line func-names
  16254. return function (value, opt, opts) {
  16255. if (validator === false) {
  16256. throw new _AxiosError.default(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), _AxiosError.default.ERR_DEPRECATED);
  16257. }
  16258. if (version && !deprecatedWarnings[opt]) {
  16259. deprecatedWarnings[opt] = true;
  16260. // eslint-disable-next-line no-console
  16261. console.warn(formatMessage(opt, ' has been deprecated since v' + version + ' and will be removed in the near future'));
  16262. }
  16263. return validator ? validator(value, opt, opts) : true;
  16264. };
  16265. };
  16266. validators.spelling = function spelling(correctSpelling) {
  16267. return function (value, opt) {
  16268. // eslint-disable-next-line no-console
  16269. console.warn("".concat(opt, " is likely a misspelling of ").concat(correctSpelling));
  16270. return true;
  16271. };
  16272. };
  16273. /**
  16274. * Assert object's properties type
  16275. *
  16276. * @param {object} options
  16277. * @param {object} schema
  16278. * @param {boolean?} allowUnknown
  16279. *
  16280. * @returns {object}
  16281. */
  16282. function assertOptions(options, schema, allowUnknown) {
  16283. if ((0, _typeof2.default)(options) !== 'object') {
  16284. throw new _AxiosError.default('options must be an object', _AxiosError.default.ERR_BAD_OPTION_VALUE);
  16285. }
  16286. var keys = Object.keys(options);
  16287. var i = keys.length;
  16288. while (i-- > 0) {
  16289. var opt = keys[i];
  16290. // Use hasOwnProperty so a polluted Object.prototype.<opt> cannot supply
  16291. // a non-function validator and cause a TypeError. See GHSA-q8qp-cvcw-x6jj.
  16292. var validator = Object.prototype.hasOwnProperty.call(schema, opt) ? schema[opt] : undefined;
  16293. if (validator) {
  16294. var value = options[opt];
  16295. var result = value === undefined || validator(value, opt, options);
  16296. if (result !== true) {
  16297. throw new _AxiosError.default('option ' + opt + ' must be ' + result, _AxiosError.default.ERR_BAD_OPTION_VALUE);
  16298. }
  16299. continue;
  16300. }
  16301. if (allowUnknown !== true) {
  16302. throw new _AxiosError.default('Unknown option ' + opt, _AxiosError.default.ERR_BAD_OPTION);
  16303. }
  16304. }
  16305. }
  16306. var _default = {
  16307. assertOptions: assertOptions,
  16308. validators: validators
  16309. };
  16310. exports.default = _default;
  16311. /***/ }),
  16312. /* 107 */
  16313. /*!***********************************************************************************************!*\
  16314. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/env/data.js ***!
  16315. \***********************************************************************************************/
  16316. /*! no static exports found */
  16317. /***/ (function(module, exports, __webpack_require__) {
  16318. "use strict";
  16319. Object.defineProperty(exports, "__esModule", {
  16320. value: true
  16321. });
  16322. exports.VERSION = void 0;
  16323. var VERSION = "1.15.2";
  16324. exports.VERSION = VERSION;
  16325. /***/ }),
  16326. /* 108 */
  16327. /*!*********************************************************************************************************!*\
  16328. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/cancel/CancelToken.js ***!
  16329. \*********************************************************************************************************/
  16330. /*! no static exports found */
  16331. /***/ (function(module, exports, __webpack_require__) {
  16332. "use strict";
  16333. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16334. Object.defineProperty(exports, "__esModule", {
  16335. value: true
  16336. });
  16337. exports.default = void 0;
  16338. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  16339. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  16340. var _CanceledError = _interopRequireDefault(__webpack_require__(/*! ./CanceledError.js */ 83));
  16341. /**
  16342. * A `CancelToken` is an object that can be used to request cancellation of an operation.
  16343. *
  16344. * @param {Function} executor The executor function.
  16345. *
  16346. * @returns {CancelToken}
  16347. */
  16348. var CancelToken = /*#__PURE__*/function () {
  16349. function CancelToken(executor) {
  16350. (0, _classCallCheck2.default)(this, CancelToken);
  16351. if (typeof executor !== 'function') {
  16352. throw new TypeError('executor must be a function.');
  16353. }
  16354. var resolvePromise;
  16355. this.promise = new Promise(function promiseExecutor(resolve) {
  16356. resolvePromise = resolve;
  16357. });
  16358. var token = this;
  16359. // eslint-disable-next-line func-names
  16360. this.promise.then(function (cancel) {
  16361. if (!token._listeners) return;
  16362. var i = token._listeners.length;
  16363. while (i-- > 0) {
  16364. token._listeners[i](cancel);
  16365. }
  16366. token._listeners = null;
  16367. });
  16368. // eslint-disable-next-line func-names
  16369. this.promise.then = function (onfulfilled) {
  16370. var _resolve;
  16371. // eslint-disable-next-line func-names
  16372. var promise = new Promise(function (resolve) {
  16373. token.subscribe(resolve);
  16374. _resolve = resolve;
  16375. }).then(onfulfilled);
  16376. promise.cancel = function reject() {
  16377. token.unsubscribe(_resolve);
  16378. };
  16379. return promise;
  16380. };
  16381. executor(function cancel(message, config, request) {
  16382. if (token.reason) {
  16383. // Cancellation has already been requested
  16384. return;
  16385. }
  16386. token.reason = new _CanceledError.default(message, config, request);
  16387. resolvePromise(token.reason);
  16388. });
  16389. }
  16390. /**
  16391. * Throws a `CanceledError` if cancellation has been requested.
  16392. */
  16393. (0, _createClass2.default)(CancelToken, [{
  16394. key: "throwIfRequested",
  16395. value: function throwIfRequested() {
  16396. if (this.reason) {
  16397. throw this.reason;
  16398. }
  16399. }
  16400. /**
  16401. * Subscribe to the cancel signal
  16402. */
  16403. }, {
  16404. key: "subscribe",
  16405. value: function subscribe(listener) {
  16406. if (this.reason) {
  16407. listener(this.reason);
  16408. return;
  16409. }
  16410. if (this._listeners) {
  16411. this._listeners.push(listener);
  16412. } else {
  16413. this._listeners = [listener];
  16414. }
  16415. }
  16416. /**
  16417. * Unsubscribe from the cancel signal
  16418. */
  16419. }, {
  16420. key: "unsubscribe",
  16421. value: function unsubscribe(listener) {
  16422. if (!this._listeners) {
  16423. return;
  16424. }
  16425. var index = this._listeners.indexOf(listener);
  16426. if (index !== -1) {
  16427. this._listeners.splice(index, 1);
  16428. }
  16429. }
  16430. }, {
  16431. key: "toAbortSignal",
  16432. value: function toAbortSignal() {
  16433. var _this = this;
  16434. var controller = new AbortController();
  16435. var abort = function abort(err) {
  16436. controller.abort(err);
  16437. };
  16438. this.subscribe(abort);
  16439. controller.signal.unsubscribe = function () {
  16440. return _this.unsubscribe(abort);
  16441. };
  16442. return controller.signal;
  16443. }
  16444. /**
  16445. * Returns an object that contains a new `CancelToken` and a function that, when called,
  16446. * cancels the `CancelToken`.
  16447. */
  16448. }], [{
  16449. key: "source",
  16450. value: function source() {
  16451. var cancel;
  16452. var token = new CancelToken(function executor(c) {
  16453. cancel = c;
  16454. });
  16455. return {
  16456. token: token,
  16457. cancel: cancel
  16458. };
  16459. }
  16460. }]);
  16461. return CancelToken;
  16462. }();
  16463. var _default = CancelToken;
  16464. exports.default = _default;
  16465. /***/ }),
  16466. /* 109 */
  16467. /*!*****************************************************************************************************!*\
  16468. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/spread.js ***!
  16469. \*****************************************************************************************************/
  16470. /*! no static exports found */
  16471. /***/ (function(module, exports, __webpack_require__) {
  16472. "use strict";
  16473. /**
  16474. * Syntactic sugar for invoking a function and expanding an array for arguments.
  16475. *
  16476. * Common use case would be to use `Function.prototype.apply`.
  16477. *
  16478. * ```js
  16479. * function f(x, y, z) {}
  16480. * const args = [1, 2, 3];
  16481. * f.apply(null, args);
  16482. * ```
  16483. *
  16484. * With `spread` this example can be re-written.
  16485. *
  16486. * ```js
  16487. * spread(function(x, y, z) {})([1, 2, 3]);
  16488. * ```
  16489. *
  16490. * @param {Function} callback
  16491. *
  16492. * @returns {Function}
  16493. */
  16494. Object.defineProperty(exports, "__esModule", {
  16495. value: true
  16496. });
  16497. exports.default = spread;
  16498. function spread(callback) {
  16499. return function wrap(arr) {
  16500. return callback.apply(null, arr);
  16501. };
  16502. }
  16503. /***/ }),
  16504. /* 110 */
  16505. /*!***********************************************************************************************************!*\
  16506. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/isAxiosError.js ***!
  16507. \***********************************************************************************************************/
  16508. /*! no static exports found */
  16509. /***/ (function(module, exports, __webpack_require__) {
  16510. "use strict";
  16511. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16512. Object.defineProperty(exports, "__esModule", {
  16513. value: true
  16514. });
  16515. exports.default = isAxiosError;
  16516. var _utils = _interopRequireDefault(__webpack_require__(/*! ../utils.js */ 44));
  16517. /**
  16518. * Determines whether the payload is an error thrown by Axios
  16519. *
  16520. * @param {*} payload The value to test
  16521. *
  16522. * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
  16523. */
  16524. function isAxiosError(payload) {
  16525. return _utils.default.isObject(payload) && payload.isAxiosError === true;
  16526. }
  16527. /***/ }),
  16528. /* 111 */
  16529. /*!*************************************************************************************************************!*\
  16530. !*** /Applications/学习/班级/w0913/W250913/14.uniapp/project3/node_modules/axios/lib/helpers/HttpStatusCode.js ***!
  16531. \*************************************************************************************************************/
  16532. /*! no static exports found */
  16533. /***/ (function(module, exports, __webpack_require__) {
  16534. "use strict";
  16535. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  16536. Object.defineProperty(exports, "__esModule", {
  16537. value: true
  16538. });
  16539. exports.default = void 0;
  16540. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  16541. var HttpStatusCode = {
  16542. Continue: 100,
  16543. SwitchingProtocols: 101,
  16544. Processing: 102,
  16545. EarlyHints: 103,
  16546. Ok: 200,
  16547. Created: 201,
  16548. Accepted: 202,
  16549. NonAuthoritativeInformation: 203,
  16550. NoContent: 204,
  16551. ResetContent: 205,
  16552. PartialContent: 206,
  16553. MultiStatus: 207,
  16554. AlreadyReported: 208,
  16555. ImUsed: 226,
  16556. MultipleChoices: 300,
  16557. MovedPermanently: 301,
  16558. Found: 302,
  16559. SeeOther: 303,
  16560. NotModified: 304,
  16561. UseProxy: 305,
  16562. Unused: 306,
  16563. TemporaryRedirect: 307,
  16564. PermanentRedirect: 308,
  16565. BadRequest: 400,
  16566. Unauthorized: 401,
  16567. PaymentRequired: 402,
  16568. Forbidden: 403,
  16569. NotFound: 404,
  16570. MethodNotAllowed: 405,
  16571. NotAcceptable: 406,
  16572. ProxyAuthenticationRequired: 407,
  16573. RequestTimeout: 408,
  16574. Conflict: 409,
  16575. Gone: 410,
  16576. LengthRequired: 411,
  16577. PreconditionFailed: 412,
  16578. PayloadTooLarge: 413,
  16579. UriTooLong: 414,
  16580. UnsupportedMediaType: 415,
  16581. RangeNotSatisfiable: 416,
  16582. ExpectationFailed: 417,
  16583. ImATeapot: 418,
  16584. MisdirectedRequest: 421,
  16585. UnprocessableEntity: 422,
  16586. Locked: 423,
  16587. FailedDependency: 424,
  16588. TooEarly: 425,
  16589. UpgradeRequired: 426,
  16590. PreconditionRequired: 428,
  16591. TooManyRequests: 429,
  16592. RequestHeaderFieldsTooLarge: 431,
  16593. UnavailableForLegalReasons: 451,
  16594. InternalServerError: 500,
  16595. NotImplemented: 501,
  16596. BadGateway: 502,
  16597. ServiceUnavailable: 503,
  16598. GatewayTimeout: 504,
  16599. HttpVersionNotSupported: 505,
  16600. VariantAlsoNegotiates: 506,
  16601. InsufficientStorage: 507,
  16602. LoopDetected: 508,
  16603. NotExtended: 510,
  16604. NetworkAuthenticationRequired: 511,
  16605. WebServerIsDown: 521,
  16606. ConnectionTimedOut: 522,
  16607. OriginIsUnreachable: 523,
  16608. TimeoutOccurred: 524,
  16609. SslHandshakeFailed: 525,
  16610. InvalidSslCertificate: 526
  16611. };
  16612. Object.entries(HttpStatusCode).forEach(function (_ref) {
  16613. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  16614. key = _ref2[0],
  16615. value = _ref2[1];
  16616. HttpStatusCode[value] = key;
  16617. });
  16618. var _default = HttpStatusCode;
  16619. exports.default = _default;
  16620. /***/ })
  16621. ]]);
  16622. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map