vendor.js 563 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!************************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  5. \************************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", { value: true });exports.createApp = createApp;exports.createComponent = createComponent;exports.createPage = createPage;exports.createPlugin = createPlugin;exports.createSubpackageApp = createSubpackageApp;exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function ownKeys(object, enumerableOnly) {var keys = Object.keys(object);if (Object.getOwnPropertySymbols) {var symbols = Object.getOwnPropertySymbols(object);if (enumerableOnly) symbols = symbols.filter(function (sym) {return Object.getOwnPropertyDescriptor(object, sym).enumerable;});keys.push.apply(keys, symbols);}return keys;}function _objectSpread(target) {for (var i = 1; i < arguments.length; i++) {var source = arguments[i] != null ? arguments[i] : {};if (i % 2) {ownKeys(Object(source), true).forEach(function (key) {_defineProperty(target, key, source[key]);});} else if (Object.getOwnPropertyDescriptors) {Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));} else {ownKeys(Object(source)).forEach(function (key) {Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));});}}return target;}function _slicedToArray(arr, i) {return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();}function _nonIterableRest() {throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArrayLimit(arr, i) {if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;var _arr = [];var _n = true;var _d = false;var _e = undefined;try {for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {_arr.push(_s.value);if (i && _arr.length === i) break;}} catch (err) {_d = true;_e = err;} finally {try {if (!_n && _i["return"] != null) _i["return"]();} finally {if (_d) throw _e;}}return _arr;}function _arrayWithHoles(arr) {if (Array.isArray(arr)) return arr;}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}function _toConsumableArray(arr) {return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();}function _nonIterableSpread() {throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}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);}function _iterableToArray(iter) {if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);}function _arrayWithoutHoles(arr) {if (Array.isArray(arr)) return _arrayLikeToArray(arr);}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;}
  10. function b64DecodeUnicode(str) {
  11. return decodeURIComponent(atob(str).split('').map(function (c) {
  12. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  13. }).join(''));
  14. }
  15. function getCurrentUserInfo() {
  16. var token = wx.getStorageSync('uni_id_token') || '';
  17. var tokenArr = token.split('.');
  18. if (!token || tokenArr.length !== 3) {
  19. return {
  20. uid: null,
  21. role: [],
  22. permission: [],
  23. tokenExpired: 0 };
  24. }
  25. var userInfo;
  26. try {
  27. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  28. } catch (error) {
  29. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  30. }
  31. userInfo.tokenExpired = userInfo.exp * 1000;
  32. delete userInfo.exp;
  33. delete userInfo.iat;
  34. return userInfo;
  35. }
  36. function uniIdMixin(Vue) {
  37. Vue.prototype.uniIDHasRole = function (roleId) {var _getCurrentUserInfo =
  38. getCurrentUserInfo(),role = _getCurrentUserInfo.role;
  39. return role.indexOf(roleId) > -1;
  40. };
  41. Vue.prototype.uniIDHasPermission = function (permissionId) {var _getCurrentUserInfo2 =
  42. getCurrentUserInfo(),permission = _getCurrentUserInfo2.permission;
  43. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  44. };
  45. Vue.prototype.uniIDTokenValid = function () {var _getCurrentUserInfo3 =
  46. getCurrentUserInfo(),tokenExpired = _getCurrentUserInfo3.tokenExpired;
  47. return tokenExpired > Date.now();
  48. };
  49. }
  50. var _toString = Object.prototype.toString;
  51. var hasOwnProperty = Object.prototype.hasOwnProperty;
  52. function isFn(fn) {
  53. return typeof fn === 'function';
  54. }
  55. function isStr(str) {
  56. return typeof str === 'string';
  57. }
  58. function isPlainObject(obj) {
  59. return _toString.call(obj) === '[object Object]';
  60. }
  61. function hasOwn(obj, key) {
  62. return hasOwnProperty.call(obj, key);
  63. }
  64. function noop() {}
  65. /**
  66. * Create a cached version of a pure function.
  67. */
  68. function cached(fn) {
  69. var cache = Object.create(null);
  70. return function cachedFn(str) {
  71. var hit = cache[str];
  72. return hit || (cache[str] = fn(str));
  73. };
  74. }
  75. /**
  76. * Camelize a hyphen-delimited string.
  77. */
  78. var camelizeRE = /-(\w)/g;
  79. var camelize = cached(function (str) {
  80. return str.replace(camelizeRE, function (_, c) {return c ? c.toUpperCase() : '';});
  81. });
  82. var HOOKS = [
  83. 'invoke',
  84. 'success',
  85. 'fail',
  86. 'complete',
  87. 'returnValue'];
  88. var globalInterceptors = {};
  89. var scopedInterceptors = {};
  90. function mergeHook(parentVal, childVal) {
  91. var res = childVal ?
  92. parentVal ?
  93. parentVal.concat(childVal) :
  94. Array.isArray(childVal) ?
  95. childVal : [childVal] :
  96. parentVal;
  97. return res ?
  98. dedupeHooks(res) :
  99. res;
  100. }
  101. function dedupeHooks(hooks) {
  102. var res = [];
  103. for (var i = 0; i < hooks.length; i++) {
  104. if (res.indexOf(hooks[i]) === -1) {
  105. res.push(hooks[i]);
  106. }
  107. }
  108. return res;
  109. }
  110. function removeHook(hooks, hook) {
  111. var index = hooks.indexOf(hook);
  112. if (index !== -1) {
  113. hooks.splice(index, 1);
  114. }
  115. }
  116. function mergeInterceptorHook(interceptor, option) {
  117. Object.keys(option).forEach(function (hook) {
  118. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  119. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  120. }
  121. });
  122. }
  123. function removeInterceptorHook(interceptor, option) {
  124. if (!interceptor || !option) {
  125. return;
  126. }
  127. Object.keys(option).forEach(function (hook) {
  128. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  129. removeHook(interceptor[hook], option[hook]);
  130. }
  131. });
  132. }
  133. function addInterceptor(method, option) {
  134. if (typeof method === 'string' && isPlainObject(option)) {
  135. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  136. } else if (isPlainObject(method)) {
  137. mergeInterceptorHook(globalInterceptors, method);
  138. }
  139. }
  140. function removeInterceptor(method, option) {
  141. if (typeof method === 'string') {
  142. if (isPlainObject(option)) {
  143. removeInterceptorHook(scopedInterceptors[method], option);
  144. } else {
  145. delete scopedInterceptors[method];
  146. }
  147. } else if (isPlainObject(method)) {
  148. removeInterceptorHook(globalInterceptors, method);
  149. }
  150. }
  151. function wrapperHook(hook) {
  152. return function (data) {
  153. return hook(data) || data;
  154. };
  155. }
  156. function isPromise(obj) {
  157. return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  158. }
  159. function queue(hooks, data) {
  160. var promise = false;
  161. for (var i = 0; i < hooks.length; i++) {
  162. var hook = hooks[i];
  163. if (promise) {
  164. promise = Promise.resolve(wrapperHook(hook));
  165. } else {
  166. var res = hook(data);
  167. if (isPromise(res)) {
  168. promise = Promise.resolve(res);
  169. }
  170. if (res === false) {
  171. return {
  172. then: function then() {} };
  173. }
  174. }
  175. }
  176. return promise || {
  177. then: function then(callback) {
  178. return callback(data);
  179. } };
  180. }
  181. function wrapperOptions(interceptor) {var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  182. ['success', 'fail', 'complete'].forEach(function (name) {
  183. if (Array.isArray(interceptor[name])) {
  184. var oldCallback = options[name];
  185. options[name] = function callbackInterceptor(res) {
  186. queue(interceptor[name], res).then(function (res) {
  187. /* eslint-disable no-mixed-operators */
  188. return isFn(oldCallback) && oldCallback(res) || res;
  189. });
  190. };
  191. }
  192. });
  193. return options;
  194. }
  195. function wrapperReturnValue(method, returnValue) {
  196. var returnValueHooks = [];
  197. if (Array.isArray(globalInterceptors.returnValue)) {
  198. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(globalInterceptors.returnValue));
  199. }
  200. var interceptor = scopedInterceptors[method];
  201. if (interceptor && Array.isArray(interceptor.returnValue)) {
  202. returnValueHooks.push.apply(returnValueHooks, _toConsumableArray(interceptor.returnValue));
  203. }
  204. returnValueHooks.forEach(function (hook) {
  205. returnValue = hook(returnValue) || returnValue;
  206. });
  207. return returnValue;
  208. }
  209. function getApiInterceptorHooks(method) {
  210. var interceptor = Object.create(null);
  211. Object.keys(globalInterceptors).forEach(function (hook) {
  212. if (hook !== 'returnValue') {
  213. interceptor[hook] = globalInterceptors[hook].slice();
  214. }
  215. });
  216. var scopedInterceptor = scopedInterceptors[method];
  217. if (scopedInterceptor) {
  218. Object.keys(scopedInterceptor).forEach(function (hook) {
  219. if (hook !== 'returnValue') {
  220. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  221. }
  222. });
  223. }
  224. return interceptor;
  225. }
  226. function invokeApi(method, api, options) {for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {params[_key - 3] = arguments[_key];}
  227. var interceptor = getApiInterceptorHooks(method);
  228. if (interceptor && Object.keys(interceptor).length) {
  229. if (Array.isArray(interceptor.invoke)) {
  230. var res = queue(interceptor.invoke, options);
  231. return res.then(function (options) {
  232. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  233. });
  234. } else {
  235. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  236. }
  237. }
  238. return api.apply(void 0, [options].concat(params));
  239. }
  240. var promiseInterceptor = {
  241. returnValue: function returnValue(res) {
  242. if (!isPromise(res)) {
  243. return res;
  244. }
  245. return new Promise(function (resolve, reject) {
  246. res.then(function (res) {
  247. if (res[0]) {
  248. reject(res[0]);
  249. } else {
  250. resolve(res[1]);
  251. }
  252. });
  253. });
  254. } };
  255. var SYNC_API_RE =
  256. /^\$|Window$|WindowStyle$|sendNativeEvent|restoreGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64/;
  257. var CONTEXT_API_RE = /^create|Manager$/;
  258. // Context例外情况
  259. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  260. // 同步例外情况
  261. var ASYNC_API = ['createBLEConnection'];
  262. var CALLBACK_API_RE = /^on|^off/;
  263. function isContextApi(name) {
  264. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  265. }
  266. function isSyncApi(name) {
  267. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  268. }
  269. function isCallbackApi(name) {
  270. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  271. }
  272. function handlePromise(promise) {
  273. return promise.then(function (data) {
  274. return [null, data];
  275. }).
  276. catch(function (err) {return [err];});
  277. }
  278. function shouldPromise(name) {
  279. if (
  280. isContextApi(name) ||
  281. isSyncApi(name) ||
  282. isCallbackApi(name))
  283. {
  284. return false;
  285. }
  286. return true;
  287. }
  288. /* eslint-disable no-extend-native */
  289. if (!Promise.prototype.finally) {
  290. Promise.prototype.finally = function (callback) {
  291. var promise = this.constructor;
  292. return this.then(
  293. function (value) {return promise.resolve(callback()).then(function () {return value;});},
  294. function (reason) {return promise.resolve(callback()).then(function () {
  295. throw reason;
  296. });});
  297. };
  298. }
  299. function promisify(name, api) {
  300. if (!shouldPromise(name)) {
  301. return api;
  302. }
  303. return function promiseApi() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {params[_key2 - 1] = arguments[_key2];}
  304. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  305. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  306. }
  307. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  308. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  309. success: resolve,
  310. fail: reject })].concat(
  311. params));
  312. })));
  313. };
  314. }
  315. var EPS = 1e-4;
  316. var BASE_DEVICE_WIDTH = 750;
  317. var isIOS = false;
  318. var deviceWidth = 0;
  319. var deviceDPR = 0;
  320. function checkDeviceWidth() {var _wx$getSystemInfoSync =
  321. wx.getSystemInfoSync(),platform = _wx$getSystemInfoSync.platform,pixelRatio = _wx$getSystemInfoSync.pixelRatio,windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  322. deviceWidth = windowWidth;
  323. deviceDPR = pixelRatio;
  324. isIOS = platform === 'ios';
  325. }
  326. function upx2px(number, newDeviceWidth) {
  327. if (deviceWidth === 0) {
  328. checkDeviceWidth();
  329. }
  330. number = Number(number);
  331. if (number === 0) {
  332. return 0;
  333. }
  334. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  335. if (result < 0) {
  336. result = -result;
  337. }
  338. result = Math.floor(result + EPS);
  339. if (result === 0) {
  340. if (deviceDPR === 1 || !isIOS) {
  341. result = 1;
  342. } else {
  343. result = 0.5;
  344. }
  345. }
  346. return number < 0 ? -result : result;
  347. }
  348. var interceptors = {
  349. promiseInterceptor: promiseInterceptor };
  350. var baseApi = /*#__PURE__*/Object.freeze({
  351. __proto__: null,
  352. upx2px: upx2px,
  353. addInterceptor: addInterceptor,
  354. removeInterceptor: removeInterceptor,
  355. interceptors: interceptors });
  356. function findExistsPageIndex(url) {
  357. var pages = getCurrentPages();
  358. var len = pages.length;
  359. while (len--) {
  360. var page = pages[len];
  361. if (page.$page && page.$page.fullPath === url) {
  362. return len;
  363. }
  364. }
  365. return -1;
  366. }
  367. var redirectTo = {
  368. name: function name(fromArgs) {
  369. if (fromArgs.exists === 'back' && fromArgs.delta) {
  370. return 'navigateBack';
  371. }
  372. return 'redirectTo';
  373. },
  374. args: function args(fromArgs) {
  375. if (fromArgs.exists === 'back' && fromArgs.url) {
  376. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  377. if (existsPageIndex !== -1) {
  378. var delta = getCurrentPages().length - 1 - existsPageIndex;
  379. if (delta > 0) {
  380. fromArgs.delta = delta;
  381. }
  382. }
  383. }
  384. } };
  385. var previewImage = {
  386. args: function args(fromArgs) {
  387. var currentIndex = parseInt(fromArgs.current);
  388. if (isNaN(currentIndex)) {
  389. return;
  390. }
  391. var urls = fromArgs.urls;
  392. if (!Array.isArray(urls)) {
  393. return;
  394. }
  395. var len = urls.length;
  396. if (!len) {
  397. return;
  398. }
  399. if (currentIndex < 0) {
  400. currentIndex = 0;
  401. } else if (currentIndex >= len) {
  402. currentIndex = len - 1;
  403. }
  404. if (currentIndex > 0) {
  405. fromArgs.current = urls[currentIndex];
  406. fromArgs.urls = urls.filter(
  407. function (item, index) {return index < currentIndex ? item !== urls[currentIndex] : true;});
  408. } else {
  409. fromArgs.current = urls[0];
  410. }
  411. return {
  412. indicator: false,
  413. loop: false };
  414. } };
  415. var UUID_KEY = '__DC_STAT_UUID';
  416. var deviceId;
  417. function addUuid(result) {
  418. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  419. if (!deviceId) {
  420. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  421. wx.setStorage({
  422. key: UUID_KEY,
  423. data: deviceId });
  424. }
  425. result.deviceId = deviceId;
  426. }
  427. function addSafeAreaInsets(result) {
  428. if (result.safeArea) {
  429. var safeArea = result.safeArea;
  430. result.safeAreaInsets = {
  431. top: safeArea.top,
  432. left: safeArea.left,
  433. right: result.windowWidth - safeArea.right,
  434. bottom: result.windowHeight - safeArea.bottom };
  435. }
  436. }
  437. var getSystemInfo = {
  438. returnValue: function returnValue(result) {
  439. addUuid(result);
  440. addSafeAreaInsets(result);
  441. } };
  442. // import navigateTo from 'uni-helpers/navigate-to'
  443. var protocols = {
  444. redirectTo: redirectTo,
  445. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  446. previewImage: previewImage,
  447. getSystemInfo: getSystemInfo,
  448. getSystemInfoSync: getSystemInfo };
  449. var todos = [
  450. 'vibrate',
  451. 'preloadPage',
  452. 'unPreloadPage',
  453. 'loadSubPackage'];
  454. var canIUses = [];
  455. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  456. function processCallback(methodName, method, returnValue) {
  457. return function (res) {
  458. return method(processReturnValue(methodName, res, returnValue));
  459. };
  460. }
  461. function processArgs(methodName, fromArgs) {var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  462. if (isPlainObject(fromArgs)) {// 一般 api 的参数解析
  463. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  464. if (isFn(argsOption)) {
  465. argsOption = argsOption(fromArgs, toArgs) || {};
  466. }
  467. for (var key in fromArgs) {
  468. if (hasOwn(argsOption, key)) {
  469. var keyOption = argsOption[key];
  470. if (isFn(keyOption)) {
  471. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  472. }
  473. if (!keyOption) {// 不支持的参数
  474. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  475. } else if (isStr(keyOption)) {// 重写参数 key
  476. toArgs[keyOption] = fromArgs[key];
  477. } else if (isPlainObject(keyOption)) {// {name:newName,value:value}可重新指定参数 key:value
  478. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  479. }
  480. } else if (CALLBACKS.indexOf(key) !== -1) {
  481. if (isFn(fromArgs[key])) {
  482. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  483. }
  484. } else {
  485. if (!keepFromArgs) {
  486. toArgs[key] = fromArgs[key];
  487. }
  488. }
  489. }
  490. return toArgs;
  491. } else if (isFn(fromArgs)) {
  492. fromArgs = processCallback(methodName, fromArgs, returnValue);
  493. }
  494. return fromArgs;
  495. }
  496. function processReturnValue(methodName, res, returnValue) {var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  497. if (isFn(protocols.returnValue)) {// 处理通用 returnValue
  498. res = protocols.returnValue(methodName, res);
  499. }
  500. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  501. }
  502. function wrapper(methodName, method) {
  503. if (hasOwn(protocols, methodName)) {
  504. var protocol = protocols[methodName];
  505. if (!protocol) {// 暂不支持的 api
  506. return function () {
  507. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  508. };
  509. }
  510. return function (arg1, arg2) {// 目前 api 最多两个参数
  511. var options = protocol;
  512. if (isFn(protocol)) {
  513. options = protocol(arg1);
  514. }
  515. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  516. var args = [arg1];
  517. if (typeof arg2 !== 'undefined') {
  518. args.push(arg2);
  519. }
  520. if (isFn(options.name)) {
  521. methodName = options.name(arg1);
  522. } else if (isStr(options.name)) {
  523. methodName = options.name;
  524. }
  525. var returnValue = wx[methodName].apply(wx, args);
  526. if (isSyncApi(methodName)) {// 同步 api
  527. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  528. }
  529. return returnValue;
  530. };
  531. }
  532. return method;
  533. }
  534. var todoApis = Object.create(null);
  535. var TODOS = [
  536. 'onTabBarMidButtonTap',
  537. 'subscribePush',
  538. 'unsubscribePush',
  539. 'onPush',
  540. 'offPush',
  541. 'share'];
  542. function createTodoApi(name) {
  543. return function todoApi(_ref)
  544. {var fail = _ref.fail,complete = _ref.complete;
  545. var res = {
  546. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported") };
  547. isFn(fail) && fail(res);
  548. isFn(complete) && complete(res);
  549. };
  550. }
  551. TODOS.forEach(function (name) {
  552. todoApis[name] = createTodoApi(name);
  553. });
  554. var providers = {
  555. oauth: ['weixin'],
  556. share: ['weixin'],
  557. payment: ['wxpay'],
  558. push: ['weixin'] };
  559. function getProvider(_ref2)
  560. {var service = _ref2.service,success = _ref2.success,fail = _ref2.fail,complete = _ref2.complete;
  561. var res = false;
  562. if (providers[service]) {
  563. res = {
  564. errMsg: 'getProvider:ok',
  565. service: service,
  566. provider: providers[service] };
  567. isFn(success) && success(res);
  568. } else {
  569. res = {
  570. errMsg: 'getProvider:fail service not found' };
  571. isFn(fail) && fail(res);
  572. }
  573. isFn(complete) && complete(res);
  574. }
  575. var extraApi = /*#__PURE__*/Object.freeze({
  576. __proto__: null,
  577. getProvider: getProvider });
  578. var getEmitter = function () {
  579. var Emitter;
  580. return function getUniEmitter() {
  581. if (!Emitter) {
  582. Emitter = new _vue.default();
  583. }
  584. return Emitter;
  585. };
  586. }();
  587. function apply(ctx, method, args) {
  588. return ctx[method].apply(ctx, args);
  589. }
  590. function $on() {
  591. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  592. }
  593. function $off() {
  594. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  595. }
  596. function $once() {
  597. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  598. }
  599. function $emit() {
  600. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  601. }
  602. var eventApi = /*#__PURE__*/Object.freeze({
  603. __proto__: null,
  604. $on: $on,
  605. $off: $off,
  606. $once: $once,
  607. $emit: $emit });
  608. var api = /*#__PURE__*/Object.freeze({
  609. __proto__: null });
  610. var MPPage = Page;
  611. var MPComponent = Component;
  612. var customizeRE = /:/g;
  613. var customize = cached(function (str) {
  614. return camelize(str.replace(customizeRE, '-'));
  615. });
  616. function initTriggerEvent(mpInstance) {
  617. {
  618. if (!wx.canIUse || !wx.canIUse('nextTick')) {
  619. return;
  620. }
  621. }
  622. var oldTriggerEvent = mpInstance.triggerEvent;
  623. mpInstance.triggerEvent = function (event) {for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {args[_key3 - 1] = arguments[_key3];}
  624. return oldTriggerEvent.apply(mpInstance, [customize(event)].concat(args));
  625. };
  626. }
  627. function initHook(name, options) {
  628. var oldHook = options[name];
  629. if (!oldHook) {
  630. options[name] = function () {
  631. initTriggerEvent(this);
  632. };
  633. } else {
  634. options[name] = function () {
  635. initTriggerEvent(this);for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {args[_key4] = arguments[_key4];}
  636. return oldHook.apply(this, args);
  637. };
  638. }
  639. }
  640. if (!MPPage.__$wrappered) {
  641. MPPage.__$wrappered = true;
  642. Page = function Page() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  643. initHook('onLoad', options);
  644. return MPPage(options);
  645. };
  646. Page.after = MPPage.after;
  647. Component = function Component() {var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  648. initHook('created', options);
  649. return MPComponent(options);
  650. };
  651. }
  652. var PAGE_EVENT_HOOKS = [
  653. 'onPullDownRefresh',
  654. 'onReachBottom',
  655. 'onAddToFavorites',
  656. 'onShareTimeline',
  657. 'onShareAppMessage',
  658. 'onPageScroll',
  659. 'onResize',
  660. 'onTabItemTap'];
  661. function initMocks(vm, mocks) {
  662. var mpInstance = vm.$mp[vm.mpType];
  663. mocks.forEach(function (mock) {
  664. if (hasOwn(mpInstance, mock)) {
  665. vm[mock] = mpInstance[mock];
  666. }
  667. });
  668. }
  669. function hasHook(hook, vueOptions) {
  670. if (!vueOptions) {
  671. return true;
  672. }
  673. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  674. return true;
  675. }
  676. vueOptions = vueOptions.default || vueOptions;
  677. if (isFn(vueOptions)) {
  678. if (isFn(vueOptions.extendOptions[hook])) {
  679. return true;
  680. }
  681. if (vueOptions.super &&
  682. vueOptions.super.options &&
  683. Array.isArray(vueOptions.super.options[hook])) {
  684. return true;
  685. }
  686. return false;
  687. }
  688. if (isFn(vueOptions[hook])) {
  689. return true;
  690. }
  691. var mixins = vueOptions.mixins;
  692. if (Array.isArray(mixins)) {
  693. return !!mixins.find(function (mixin) {return hasHook(hook, mixin);});
  694. }
  695. }
  696. function initHooks(mpOptions, hooks, vueOptions) {
  697. hooks.forEach(function (hook) {
  698. if (hasHook(hook, vueOptions)) {
  699. mpOptions[hook] = function (args) {
  700. return this.$vm && this.$vm.__call_hook(hook, args);
  701. };
  702. }
  703. });
  704. }
  705. function initVueComponent(Vue, vueOptions) {
  706. vueOptions = vueOptions.default || vueOptions;
  707. var VueComponent;
  708. if (isFn(vueOptions)) {
  709. VueComponent = vueOptions;
  710. } else {
  711. VueComponent = Vue.extend(vueOptions);
  712. }
  713. vueOptions = VueComponent.options;
  714. return [VueComponent, vueOptions];
  715. }
  716. function initSlots(vm, vueSlots) {
  717. if (Array.isArray(vueSlots) && vueSlots.length) {
  718. var $slots = Object.create(null);
  719. vueSlots.forEach(function (slotName) {
  720. $slots[slotName] = true;
  721. });
  722. vm.$scopedSlots = vm.$slots = $slots;
  723. }
  724. }
  725. function initVueIds(vueIds, mpInstance) {
  726. vueIds = (vueIds || '').split(',');
  727. var len = vueIds.length;
  728. if (len === 1) {
  729. mpInstance._$vueId = vueIds[0];
  730. } else if (len === 2) {
  731. mpInstance._$vueId = vueIds[0];
  732. mpInstance._$vuePid = vueIds[1];
  733. }
  734. }
  735. function initData(vueOptions, context) {
  736. var data = vueOptions.data || {};
  737. var methods = vueOptions.methods || {};
  738. if (typeof data === 'function') {
  739. try {
  740. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  741. } catch (e) {
  742. if (Object({"VUE_APP_NAME":"基础项目","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  743. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  744. }
  745. }
  746. } else {
  747. try {
  748. // 对 data 格式化
  749. data = JSON.parse(JSON.stringify(data));
  750. } catch (e) {}
  751. }
  752. if (!isPlainObject(data)) {
  753. data = {};
  754. }
  755. Object.keys(methods).forEach(function (methodName) {
  756. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  757. data[methodName] = methods[methodName];
  758. }
  759. });
  760. return data;
  761. }
  762. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  763. function createObserver(name) {
  764. return function observer(newVal, oldVal) {
  765. if (this.$vm) {
  766. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  767. }
  768. };
  769. }
  770. function initBehaviors(vueOptions, initBehavior) {
  771. var vueBehaviors = vueOptions.behaviors;
  772. var vueExtends = vueOptions.extends;
  773. var vueMixins = vueOptions.mixins;
  774. var vueProps = vueOptions.props;
  775. if (!vueProps) {
  776. vueOptions.props = vueProps = [];
  777. }
  778. var behaviors = [];
  779. if (Array.isArray(vueBehaviors)) {
  780. vueBehaviors.forEach(function (behavior) {
  781. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  782. if (behavior === 'uni://form-field') {
  783. if (Array.isArray(vueProps)) {
  784. vueProps.push('name');
  785. vueProps.push('value');
  786. } else {
  787. vueProps.name = {
  788. type: String,
  789. default: '' };
  790. vueProps.value = {
  791. type: [String, Number, Boolean, Array, Object, Date],
  792. default: '' };
  793. }
  794. }
  795. });
  796. }
  797. if (isPlainObject(vueExtends) && vueExtends.props) {
  798. behaviors.push(
  799. initBehavior({
  800. properties: initProperties(vueExtends.props, true) }));
  801. }
  802. if (Array.isArray(vueMixins)) {
  803. vueMixins.forEach(function (vueMixin) {
  804. if (isPlainObject(vueMixin) && vueMixin.props) {
  805. behaviors.push(
  806. initBehavior({
  807. properties: initProperties(vueMixin.props, true) }));
  808. }
  809. });
  810. }
  811. return behaviors;
  812. }
  813. function parsePropType(key, type, defaultValue, file) {
  814. // [String]=>String
  815. if (Array.isArray(type) && type.length === 1) {
  816. return type[0];
  817. }
  818. return type;
  819. }
  820. function initProperties(props) {var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  821. var properties = {};
  822. if (!isBehavior) {
  823. properties.vueId = {
  824. type: String,
  825. value: '' };
  826. // 用于字节跳动小程序模拟抽象节点
  827. properties.generic = {
  828. type: Object,
  829. value: null };
  830. // scopedSlotsCompiler auto
  831. properties.scopedSlotsCompiler = {
  832. type: String,
  833. value: '' };
  834. properties.vueSlots = { // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  835. type: null,
  836. value: [],
  837. observer: function observer(newVal, oldVal) {
  838. var $slots = Object.create(null);
  839. newVal.forEach(function (slotName) {
  840. $slots[slotName] = true;
  841. });
  842. this.setData({
  843. $slots: $slots });
  844. } };
  845. }
  846. if (Array.isArray(props)) {// ['title']
  847. props.forEach(function (key) {
  848. properties[key] = {
  849. type: null,
  850. observer: createObserver(key) };
  851. });
  852. } else if (isPlainObject(props)) {// {title:{type:String,default:''},content:String}
  853. Object.keys(props).forEach(function (key) {
  854. var opts = props[key];
  855. if (isPlainObject(opts)) {// title:{type:String,default:''}
  856. var value = opts.default;
  857. if (isFn(value)) {
  858. value = value();
  859. }
  860. opts.type = parsePropType(key, opts.type);
  861. properties[key] = {
  862. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  863. value: value,
  864. observer: createObserver(key) };
  865. } else {// content:String
  866. var type = parsePropType(key, opts);
  867. properties[key] = {
  868. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  869. observer: createObserver(key) };
  870. }
  871. });
  872. }
  873. return properties;
  874. }
  875. function wrapper$1(event) {
  876. // TODO 又得兼容 mpvue 的 mp 对象
  877. try {
  878. event.mp = JSON.parse(JSON.stringify(event));
  879. } catch (e) {}
  880. event.stopPropagation = noop;
  881. event.preventDefault = noop;
  882. event.target = event.target || {};
  883. if (!hasOwn(event, 'detail')) {
  884. event.detail = {};
  885. }
  886. if (hasOwn(event, 'markerId')) {
  887. event.detail = typeof event.detail === 'object' ? event.detail : {};
  888. event.detail.markerId = event.markerId;
  889. }
  890. if (isPlainObject(event.detail)) {
  891. event.target = Object.assign({}, event.target, event.detail);
  892. }
  893. return event;
  894. }
  895. function getExtraValue(vm, dataPathsArray) {
  896. var context = vm;
  897. dataPathsArray.forEach(function (dataPathArray) {
  898. var dataPath = dataPathArray[0];
  899. var value = dataPathArray[2];
  900. if (dataPath || typeof value !== 'undefined') {// ['','',index,'disable']
  901. var propPath = dataPathArray[1];
  902. var valuePath = dataPathArray[3];
  903. var vFor;
  904. if (Number.isInteger(dataPath)) {
  905. vFor = dataPath;
  906. } else if (!dataPath) {
  907. vFor = context;
  908. } else if (typeof dataPath === 'string' && dataPath) {
  909. if (dataPath.indexOf('#s#') === 0) {
  910. vFor = dataPath.substr(3);
  911. } else {
  912. vFor = vm.__get_value(dataPath, context);
  913. }
  914. }
  915. if (Number.isInteger(vFor)) {
  916. context = value;
  917. } else if (!propPath) {
  918. context = vFor[value];
  919. } else {
  920. if (Array.isArray(vFor)) {
  921. context = vFor.find(function (vForItem) {
  922. return vm.__get_value(propPath, vForItem) === value;
  923. });
  924. } else if (isPlainObject(vFor)) {
  925. context = Object.keys(vFor).find(function (vForKey) {
  926. return vm.__get_value(propPath, vFor[vForKey]) === value;
  927. });
  928. } else {
  929. console.error('v-for 暂不支持循环数据:', vFor);
  930. }
  931. }
  932. if (valuePath) {
  933. context = vm.__get_value(valuePath, context);
  934. }
  935. }
  936. });
  937. return context;
  938. }
  939. function processEventExtra(vm, extra, event) {
  940. var extraObj = {};
  941. if (Array.isArray(extra) && extra.length) {
  942. /**
  943. *[
  944. * ['data.items', 'data.id', item.data.id],
  945. * ['metas', 'id', meta.id]
  946. *],
  947. *[
  948. * ['data.items', 'data.id', item.data.id],
  949. * ['metas', 'id', meta.id]
  950. *],
  951. *'test'
  952. */
  953. extra.forEach(function (dataPath, index) {
  954. if (typeof dataPath === 'string') {
  955. if (!dataPath) {// model,prop.sync
  956. extraObj['$' + index] = vm;
  957. } else {
  958. if (dataPath === '$event') {// $event
  959. extraObj['$' + index] = event;
  960. } else if (dataPath === 'arguments') {
  961. if (event.detail && event.detail.__args__) {
  962. extraObj['$' + index] = event.detail.__args__;
  963. } else {
  964. extraObj['$' + index] = [event];
  965. }
  966. } else if (dataPath.indexOf('$event.') === 0) {// $event.target.value
  967. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  968. } else {
  969. extraObj['$' + index] = vm.__get_value(dataPath);
  970. }
  971. }
  972. } else {
  973. extraObj['$' + index] = getExtraValue(vm, dataPath);
  974. }
  975. });
  976. }
  977. return extraObj;
  978. }
  979. function getObjByArray(arr) {
  980. var obj = {};
  981. for (var i = 1; i < arr.length; i++) {
  982. var element = arr[i];
  983. obj[element[0]] = element[1];
  984. }
  985. return obj;
  986. }
  987. function processEventArgs(vm, event) {var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];var isCustom = arguments.length > 4 ? arguments[4] : undefined;var methodName = arguments.length > 5 ? arguments[5] : undefined;
  988. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  989. if (isCustom) {// 自定义事件
  990. isCustomMPEvent = event.currentTarget &&
  991. event.currentTarget.dataset &&
  992. event.currentTarget.dataset.comType === 'wx';
  993. if (!args.length) {// 无参数,直接传入 event 或 detail 数组
  994. if (isCustomMPEvent) {
  995. return [event];
  996. }
  997. return event.detail.__args__ || event.detail;
  998. }
  999. }
  1000. var extraObj = processEventExtra(vm, extra, event);
  1001. var ret = [];
  1002. args.forEach(function (arg) {
  1003. if (arg === '$event') {
  1004. if (methodName === '__set_model' && !isCustom) {// input v-model value
  1005. ret.push(event.target.value);
  1006. } else {
  1007. if (isCustom && !isCustomMPEvent) {
  1008. ret.push(event.detail.__args__[0]);
  1009. } else {// wxcomponent 组件或内置组件
  1010. ret.push(event);
  1011. }
  1012. }
  1013. } else {
  1014. if (Array.isArray(arg) && arg[0] === 'o') {
  1015. ret.push(getObjByArray(arg));
  1016. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1017. ret.push(extraObj[arg]);
  1018. } else {
  1019. ret.push(arg);
  1020. }
  1021. }
  1022. });
  1023. return ret;
  1024. }
  1025. var ONCE = '~';
  1026. var CUSTOM = '^';
  1027. function isMatchEventType(eventType, optType) {
  1028. return eventType === optType ||
  1029. optType === 'regionchange' && (
  1030. eventType === 'begin' ||
  1031. eventType === 'end');
  1032. }
  1033. function getContextVm(vm) {
  1034. var $parent = vm.$parent;
  1035. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1036. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1037. $parent = $parent.$parent;
  1038. }
  1039. return $parent && $parent.$parent;
  1040. }
  1041. function handleEvent(event) {var _this = this;
  1042. event = wrapper$1(event);
  1043. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1044. var dataset = (event.currentTarget || event.target).dataset;
  1045. if (!dataset) {
  1046. return console.warn('事件信息不存在');
  1047. }
  1048. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1049. if (!eventOpts) {
  1050. return console.warn('事件信息不存在');
  1051. }
  1052. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1053. var eventType = event.type;
  1054. var ret = [];
  1055. eventOpts.forEach(function (eventOpt) {
  1056. var type = eventOpt[0];
  1057. var eventsArray = eventOpt[1];
  1058. var isCustom = type.charAt(0) === CUSTOM;
  1059. type = isCustom ? type.slice(1) : type;
  1060. var isOnce = type.charAt(0) === ONCE;
  1061. type = isOnce ? type.slice(1) : type;
  1062. if (eventsArray && isMatchEventType(eventType, type)) {
  1063. eventsArray.forEach(function (eventArray) {
  1064. var methodName = eventArray[0];
  1065. if (methodName) {
  1066. var handlerCtx = _this.$vm;
  1067. if (handlerCtx.$options.generic) {// mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1068. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1069. }
  1070. if (methodName === '$emit') {
  1071. handlerCtx.$emit.apply(handlerCtx,
  1072. processEventArgs(
  1073. _this.$vm,
  1074. event,
  1075. eventArray[1],
  1076. eventArray[2],
  1077. isCustom,
  1078. methodName));
  1079. return;
  1080. }
  1081. var handler = handlerCtx[methodName];
  1082. if (!isFn(handler)) {
  1083. throw new Error(" _vm.".concat(methodName, " is not a function"));
  1084. }
  1085. if (isOnce) {
  1086. if (handler.once) {
  1087. return;
  1088. }
  1089. handler.once = true;
  1090. }
  1091. var params = processEventArgs(
  1092. _this.$vm,
  1093. event,
  1094. eventArray[1],
  1095. eventArray[2],
  1096. isCustom,
  1097. methodName);
  1098. params = Array.isArray(params) ? params : [];
  1099. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1100. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1101. // eslint-disable-next-line no-sparse-arrays
  1102. params = params.concat([,,,,,,,,,, event]);
  1103. }
  1104. ret.push(handler.apply(handlerCtx, params));
  1105. }
  1106. });
  1107. }
  1108. });
  1109. if (
  1110. eventType === 'input' &&
  1111. ret.length === 1 &&
  1112. typeof ret[0] !== 'undefined')
  1113. {
  1114. return ret[0];
  1115. }
  1116. }
  1117. var eventChannels = {};
  1118. var eventChannelStack = [];
  1119. function getEventChannel(id) {
  1120. if (id) {
  1121. var eventChannel = eventChannels[id];
  1122. delete eventChannels[id];
  1123. return eventChannel;
  1124. }
  1125. return eventChannelStack.shift();
  1126. }
  1127. var hooks = [
  1128. 'onShow',
  1129. 'onHide',
  1130. 'onError',
  1131. 'onPageNotFound',
  1132. 'onThemeChange',
  1133. 'onUnhandledRejection'];
  1134. function initEventChannel() {
  1135. _vue.default.prototype.getOpenerEventChannel = function () {
  1136. // 微信小程序使用自身getOpenerEventChannel
  1137. {
  1138. return this.$scope.getOpenerEventChannel();
  1139. }
  1140. };
  1141. var callHook = _vue.default.prototype.__call_hook;
  1142. _vue.default.prototype.__call_hook = function (hook, args) {
  1143. if (hook === 'onLoad' && args && args.__id__) {
  1144. this.__eventChannel__ = getEventChannel(args.__id__);
  1145. delete args.__id__;
  1146. }
  1147. return callHook.call(this, hook, args);
  1148. };
  1149. }
  1150. function initScopedSlotsParams() {
  1151. var center = {};
  1152. var parents = {};
  1153. _vue.default.prototype.$hasScopedSlotsParams = function (vueId) {
  1154. var has = center[vueId];
  1155. if (!has) {
  1156. parents[vueId] = this;
  1157. this.$on('hook:destory', function () {
  1158. delete parents[vueId];
  1159. });
  1160. }
  1161. return has;
  1162. };
  1163. _vue.default.prototype.$getScopedSlotsParams = function (vueId, name, key) {
  1164. var data = center[vueId];
  1165. if (data) {
  1166. var object = data[name] || {};
  1167. return key ? object[key] : object;
  1168. } else {
  1169. parents[vueId] = this;
  1170. this.$on('hook:destory', function () {
  1171. delete parents[vueId];
  1172. });
  1173. }
  1174. };
  1175. _vue.default.prototype.$setScopedSlotsParams = function (name, value) {
  1176. var vueIds = this.$options.propsData.vueId;
  1177. if (vueIds) {
  1178. var vueId = vueIds.split(',')[0];
  1179. var object = center[vueId] = center[vueId] || {};
  1180. object[name] = value;
  1181. if (parents[vueId]) {
  1182. parents[vueId].$forceUpdate();
  1183. }
  1184. }
  1185. };
  1186. _vue.default.mixin({
  1187. destroyed: function destroyed() {
  1188. var propsData = this.$options.propsData;
  1189. var vueId = propsData && propsData.vueId;
  1190. if (vueId) {
  1191. delete center[vueId];
  1192. delete parents[vueId];
  1193. }
  1194. } });
  1195. }
  1196. function parseBaseApp(vm, _ref3)
  1197. {var mocks = _ref3.mocks,initRefs = _ref3.initRefs;
  1198. initEventChannel();
  1199. {
  1200. initScopedSlotsParams();
  1201. }
  1202. if (vm.$options.store) {
  1203. _vue.default.prototype.$store = vm.$options.store;
  1204. }
  1205. uniIdMixin(_vue.default);
  1206. _vue.default.prototype.mpHost = "mp-weixin";
  1207. _vue.default.mixin({
  1208. beforeCreate: function beforeCreate() {
  1209. if (!this.$options.mpType) {
  1210. return;
  1211. }
  1212. this.mpType = this.$options.mpType;
  1213. this.$mp = _defineProperty({
  1214. data: {} },
  1215. this.mpType, this.$options.mpInstance);
  1216. this.$scope = this.$options.mpInstance;
  1217. delete this.$options.mpType;
  1218. delete this.$options.mpInstance;
  1219. if (this.mpType === 'page' && typeof getApp === 'function') {// hack vue-i18n
  1220. var app = getApp();
  1221. if (app.$vm && app.$vm.$i18n) {
  1222. this._i18n = app.$vm.$i18n;
  1223. }
  1224. }
  1225. if (this.mpType !== 'app') {
  1226. initRefs(this);
  1227. initMocks(this, mocks);
  1228. }
  1229. } });
  1230. var appOptions = {
  1231. onLaunch: function onLaunch(args) {
  1232. if (this.$vm) {// 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  1233. return;
  1234. }
  1235. {
  1236. if (wx.canIUse && !wx.canIUse('nextTick')) {// 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  1237. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  1238. }
  1239. }
  1240. this.$vm = vm;
  1241. this.$vm.$mp = {
  1242. app: this };
  1243. this.$vm.$scope = this;
  1244. // vm 上也挂载 globalData
  1245. this.$vm.globalData = this.globalData;
  1246. this.$vm._isMounted = true;
  1247. this.$vm.__call_hook('mounted', args);
  1248. this.$vm.__call_hook('onLaunch', args);
  1249. } };
  1250. // 兼容旧版本 globalData
  1251. appOptions.globalData = vm.$options.globalData || {};
  1252. // 将 methods 中的方法挂在 getApp() 中
  1253. var methods = vm.$options.methods;
  1254. if (methods) {
  1255. Object.keys(methods).forEach(function (name) {
  1256. appOptions[name] = methods[name];
  1257. });
  1258. }
  1259. initHooks(appOptions, hooks);
  1260. return appOptions;
  1261. }
  1262. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1263. function findVmByVueId(vm, vuePid) {
  1264. var $children = vm.$children;
  1265. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1266. for (var i = $children.length - 1; i >= 0; i--) {
  1267. var childVm = $children[i];
  1268. if (childVm.$scope._$vueId === vuePid) {
  1269. return childVm;
  1270. }
  1271. }
  1272. // 反向递归查找
  1273. var parentVm;
  1274. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1275. parentVm = findVmByVueId($children[_i], vuePid);
  1276. if (parentVm) {
  1277. return parentVm;
  1278. }
  1279. }
  1280. }
  1281. function initBehavior(options) {
  1282. return Behavior(options);
  1283. }
  1284. function isPage() {
  1285. return !!this.route;
  1286. }
  1287. function initRelation(detail) {
  1288. this.triggerEvent('__l', detail);
  1289. }
  1290. function selectAllComponents(mpInstance, selector, $refs) {
  1291. var components = mpInstance.selectAllComponents(selector);
  1292. components.forEach(function (component) {
  1293. var ref = component.dataset.ref;
  1294. $refs[ref] = component.$vm || component;
  1295. {
  1296. if (component.dataset.vueGeneric === 'scoped') {
  1297. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1298. selectAllComponents(scopedComponent, selector, $refs);
  1299. });
  1300. }
  1301. }
  1302. });
  1303. }
  1304. function initRefs(vm) {
  1305. var mpInstance = vm.$scope;
  1306. Object.defineProperty(vm, '$refs', {
  1307. get: function get() {
  1308. var $refs = {};
  1309. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1310. // TODO 暂不考虑 for 中的 scoped
  1311. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for');
  1312. forComponents.forEach(function (component) {
  1313. var ref = component.dataset.ref;
  1314. if (!$refs[ref]) {
  1315. $refs[ref] = [];
  1316. }
  1317. $refs[ref].push(component.$vm || component);
  1318. });
  1319. return $refs;
  1320. } });
  1321. }
  1322. function handleLink(event) {var _ref4 =
  1323. event.detail || event.value,vuePid = _ref4.vuePid,vueOptions = _ref4.vueOptions; // detail 是微信,value 是百度(dipatch)
  1324. var parentVm;
  1325. if (vuePid) {
  1326. parentVm = findVmByVueId(this.$vm, vuePid);
  1327. }
  1328. if (!parentVm) {
  1329. parentVm = this.$vm;
  1330. }
  1331. vueOptions.parent = parentVm;
  1332. }
  1333. function parseApp(vm) {
  1334. return parseBaseApp(vm, {
  1335. mocks: mocks,
  1336. initRefs: initRefs });
  1337. }
  1338. function createApp(vm) {
  1339. App(parseApp(vm));
  1340. return vm;
  1341. }
  1342. var encodeReserveRE = /[!'()*]/g;
  1343. var encodeReserveReplacer = function encodeReserveReplacer(c) {return '%' + c.charCodeAt(0).toString(16);};
  1344. var commaRE = /%2C/g;
  1345. // fixed encodeURIComponent which is more conformant to RFC3986:
  1346. // - escapes [!'()*]
  1347. // - preserve commas
  1348. var encode = function encode(str) {return encodeURIComponent(str).
  1349. replace(encodeReserveRE, encodeReserveReplacer).
  1350. replace(commaRE, ',');};
  1351. function stringifyQuery(obj) {var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  1352. var res = obj ? Object.keys(obj).map(function (key) {
  1353. var val = obj[key];
  1354. if (val === undefined) {
  1355. return '';
  1356. }
  1357. if (val === null) {
  1358. return encodeStr(key);
  1359. }
  1360. if (Array.isArray(val)) {
  1361. var result = [];
  1362. val.forEach(function (val2) {
  1363. if (val2 === undefined) {
  1364. return;
  1365. }
  1366. if (val2 === null) {
  1367. result.push(encodeStr(key));
  1368. } else {
  1369. result.push(encodeStr(key) + '=' + encodeStr(val2));
  1370. }
  1371. });
  1372. return result.join('&');
  1373. }
  1374. return encodeStr(key) + '=' + encodeStr(val);
  1375. }).filter(function (x) {return x.length > 0;}).join('&') : null;
  1376. return res ? "?".concat(res) : '';
  1377. }
  1378. function parseBaseComponent(vueComponentOptions)
  1379. {var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},isPage = _ref5.isPage,initRelation = _ref5.initRelation;var _initVueComponent =
  1380. initVueComponent(_vue.default, vueComponentOptions),_initVueComponent2 = _slicedToArray(_initVueComponent, 2),VueComponent = _initVueComponent2[0],vueOptions = _initVueComponent2[1];
  1381. var options = _objectSpread({
  1382. multipleSlots: true,
  1383. addGlobalClass: true },
  1384. vueOptions.options || {});
  1385. {
  1386. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  1387. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  1388. Object.assign(options, vueOptions['mp-weixin'].options);
  1389. }
  1390. }
  1391. var componentOptions = {
  1392. options: options,
  1393. data: initData(vueOptions, _vue.default.prototype),
  1394. behaviors: initBehaviors(vueOptions, initBehavior),
  1395. properties: initProperties(vueOptions.props, false, vueOptions.__file),
  1396. lifetimes: {
  1397. attached: function attached() {
  1398. var properties = this.properties;
  1399. var options = {
  1400. mpType: isPage.call(this) ? 'page' : 'component',
  1401. mpInstance: this,
  1402. propsData: properties };
  1403. initVueIds(properties.vueId, this);
  1404. // 处理父子关系
  1405. initRelation.call(this, {
  1406. vuePid: this._$vuePid,
  1407. vueOptions: options });
  1408. // 初始化 vue 实例
  1409. this.$vm = new VueComponent(options);
  1410. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  1411. initSlots(this.$vm, properties.vueSlots);
  1412. // 触发首次 setData
  1413. this.$vm.$mount();
  1414. },
  1415. ready: function ready() {
  1416. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  1417. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  1418. if (this.$vm) {
  1419. this.$vm._isMounted = true;
  1420. this.$vm.__call_hook('mounted');
  1421. this.$vm.__call_hook('onReady');
  1422. }
  1423. },
  1424. detached: function detached() {
  1425. this.$vm && this.$vm.$destroy();
  1426. } },
  1427. pageLifetimes: {
  1428. show: function show(args) {
  1429. this.$vm && this.$vm.__call_hook('onPageShow', args);
  1430. },
  1431. hide: function hide() {
  1432. this.$vm && this.$vm.__call_hook('onPageHide');
  1433. },
  1434. resize: function resize(size) {
  1435. this.$vm && this.$vm.__call_hook('onPageResize', size);
  1436. } },
  1437. methods: {
  1438. __l: handleLink,
  1439. __e: handleEvent } };
  1440. // externalClasses
  1441. if (vueOptions.externalClasses) {
  1442. componentOptions.externalClasses = vueOptions.externalClasses;
  1443. }
  1444. if (Array.isArray(vueOptions.wxsCallMethods)) {
  1445. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  1446. componentOptions.methods[callMethod] = function (args) {
  1447. return this.$vm[callMethod](args);
  1448. };
  1449. });
  1450. }
  1451. if (isPage) {
  1452. return componentOptions;
  1453. }
  1454. return [componentOptions, VueComponent];
  1455. }
  1456. function parseComponent(vueComponentOptions) {
  1457. return parseBaseComponent(vueComponentOptions, {
  1458. isPage: isPage,
  1459. initRelation: initRelation });
  1460. }
  1461. var hooks$1 = [
  1462. 'onShow',
  1463. 'onHide',
  1464. 'onUnload'];
  1465. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  1466. function parseBasePage(vuePageOptions, _ref6)
  1467. {var isPage = _ref6.isPage,initRelation = _ref6.initRelation;
  1468. var pageOptions = parseComponent(vuePageOptions);
  1469. initHooks(pageOptions.methods, hooks$1, vuePageOptions);
  1470. pageOptions.methods.onLoad = function (query) {
  1471. this.options = query;
  1472. var copyQuery = Object.assign({}, query);
  1473. delete copyQuery.__id__;
  1474. this.$page = {
  1475. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery) };
  1476. this.$vm.$mp.query = query; // 兼容 mpvue
  1477. this.$vm.__call_hook('onLoad', query);
  1478. };
  1479. return pageOptions;
  1480. }
  1481. function parsePage(vuePageOptions) {
  1482. return parseBasePage(vuePageOptions, {
  1483. isPage: isPage,
  1484. initRelation: initRelation });
  1485. }
  1486. function createPage(vuePageOptions) {
  1487. {
  1488. return Component(parsePage(vuePageOptions));
  1489. }
  1490. }
  1491. function createComponent(vueOptions) {
  1492. {
  1493. return Component(parseComponent(vueOptions));
  1494. }
  1495. }
  1496. function createSubpackageApp(vm) {
  1497. var appOptions = parseApp(vm);
  1498. var app = getApp({
  1499. allowDefault: true });
  1500. vm.$scope = app;
  1501. var globalData = app.globalData;
  1502. if (globalData) {
  1503. Object.keys(appOptions.globalData).forEach(function (name) {
  1504. if (!hasOwn(globalData, name)) {
  1505. globalData[name] = appOptions.globalData[name];
  1506. }
  1507. });
  1508. }
  1509. Object.keys(appOptions).forEach(function (name) {
  1510. if (!hasOwn(app, name)) {
  1511. app[name] = appOptions[name];
  1512. }
  1513. });
  1514. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1515. wx.onAppShow(function () {for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {args[_key5] = arguments[_key5];}
  1516. vm.__call_hook('onShow', args);
  1517. });
  1518. }
  1519. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1520. wx.onAppHide(function () {for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {args[_key6] = arguments[_key6];}
  1521. vm.__call_hook('onHide', args);
  1522. });
  1523. }
  1524. if (isFn(appOptions.onLaunch)) {
  1525. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1526. vm.__call_hook('onLaunch', args);
  1527. }
  1528. return vm;
  1529. }
  1530. function createPlugin(vm) {
  1531. var appOptions = parseApp(vm);
  1532. if (isFn(appOptions.onShow) && wx.onAppShow) {
  1533. wx.onAppShow(function () {for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {args[_key7] = arguments[_key7];}
  1534. appOptions.onShow.apply(vm, args);
  1535. });
  1536. }
  1537. if (isFn(appOptions.onHide) && wx.onAppHide) {
  1538. wx.onAppHide(function () {for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {args[_key8] = arguments[_key8];}
  1539. appOptions.onHide.apply(vm, args);
  1540. });
  1541. }
  1542. if (isFn(appOptions.onLaunch)) {
  1543. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  1544. appOptions.onLaunch.call(vm, args);
  1545. }
  1546. return vm;
  1547. }
  1548. todos.forEach(function (todoApi) {
  1549. protocols[todoApi] = false;
  1550. });
  1551. canIUses.forEach(function (canIUseApi) {
  1552. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name :
  1553. canIUseApi;
  1554. if (!wx.canIUse(apiName)) {
  1555. protocols[canIUseApi] = false;
  1556. }
  1557. });
  1558. var uni = {};
  1559. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  1560. uni = new Proxy({}, {
  1561. get: function get(target, name) {
  1562. if (hasOwn(target, name)) {
  1563. return target[name];
  1564. }
  1565. if (baseApi[name]) {
  1566. return baseApi[name];
  1567. }
  1568. if (api[name]) {
  1569. return promisify(name, api[name]);
  1570. }
  1571. {
  1572. if (extraApi[name]) {
  1573. return promisify(name, extraApi[name]);
  1574. }
  1575. if (todoApis[name]) {
  1576. return promisify(name, todoApis[name]);
  1577. }
  1578. }
  1579. if (eventApi[name]) {
  1580. return eventApi[name];
  1581. }
  1582. if (!hasOwn(wx, name) && !hasOwn(protocols, name)) {
  1583. return;
  1584. }
  1585. return promisify(name, wrapper(name, wx[name]));
  1586. },
  1587. set: function set(target, name, value) {
  1588. target[name] = value;
  1589. return true;
  1590. } });
  1591. } else {
  1592. Object.keys(baseApi).forEach(function (name) {
  1593. uni[name] = baseApi[name];
  1594. });
  1595. {
  1596. Object.keys(todoApis).forEach(function (name) {
  1597. uni[name] = promisify(name, todoApis[name]);
  1598. });
  1599. Object.keys(extraApi).forEach(function (name) {
  1600. uni[name] = promisify(name, todoApis[name]);
  1601. });
  1602. }
  1603. Object.keys(eventApi).forEach(function (name) {
  1604. uni[name] = eventApi[name];
  1605. });
  1606. Object.keys(api).forEach(function (name) {
  1607. uni[name] = promisify(name, api[name]);
  1608. });
  1609. Object.keys(wx).forEach(function (name) {
  1610. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  1611. uni[name] = promisify(name, wrapper(name, wx[name]));
  1612. }
  1613. });
  1614. }
  1615. wx.createApp = createApp;
  1616. wx.createPage = createPage;
  1617. wx.createComponent = createComponent;
  1618. wx.createSubpackageApp = createSubpackageApp;
  1619. wx.createPlugin = createPlugin;
  1620. var uni$1 = uni;var _default =
  1621. uni$1;exports.default = _default;
  1622. /***/ }),
  1623. /***/ 13:
  1624. /*!**********************************************************************************************************!*\
  1625. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  1626. \**********************************************************************************************************/
  1627. /*! exports provided: default */
  1628. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1629. "use strict";
  1630. __webpack_require__.r(__webpack_exports__);
  1631. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  1632. /* globals __VUE_SSR_CONTEXT__ */
  1633. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  1634. // This module is a runtime utility for cleaner component module output and will
  1635. // be included in the final webpack user bundle.
  1636. function normalizeComponent (
  1637. scriptExports,
  1638. render,
  1639. staticRenderFns,
  1640. functionalTemplate,
  1641. injectStyles,
  1642. scopeId,
  1643. moduleIdentifier, /* server only */
  1644. shadowMode, /* vue-cli only */
  1645. components, // fixed by xxxxxx auto components
  1646. renderjs // fixed by xxxxxx renderjs
  1647. ) {
  1648. // Vue.extend constructor export interop
  1649. var options = typeof scriptExports === 'function'
  1650. ? scriptExports.options
  1651. : scriptExports
  1652. // fixed by xxxxxx auto components
  1653. if (components) {
  1654. if (!options.components) {
  1655. options.components = {}
  1656. }
  1657. var hasOwn = Object.prototype.hasOwnProperty
  1658. for (var name in components) {
  1659. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  1660. options.components[name] = components[name]
  1661. }
  1662. }
  1663. }
  1664. // fixed by xxxxxx renderjs
  1665. if (renderjs) {
  1666. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  1667. this[renderjs.__module] = this
  1668. });
  1669. (options.mixins || (options.mixins = [])).push(renderjs)
  1670. }
  1671. // render functions
  1672. if (render) {
  1673. options.render = render
  1674. options.staticRenderFns = staticRenderFns
  1675. options._compiled = true
  1676. }
  1677. // functional template
  1678. if (functionalTemplate) {
  1679. options.functional = true
  1680. }
  1681. // scopedId
  1682. if (scopeId) {
  1683. options._scopeId = 'data-v-' + scopeId
  1684. }
  1685. var hook
  1686. if (moduleIdentifier) { // server build
  1687. hook = function (context) {
  1688. // 2.3 injection
  1689. context =
  1690. context || // cached call
  1691. (this.$vnode && this.$vnode.ssrContext) || // stateful
  1692. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  1693. // 2.2 with runInNewContext: true
  1694. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  1695. context = __VUE_SSR_CONTEXT__
  1696. }
  1697. // inject component styles
  1698. if (injectStyles) {
  1699. injectStyles.call(this, context)
  1700. }
  1701. // register component module identifier for async chunk inferrence
  1702. if (context && context._registeredComponents) {
  1703. context._registeredComponents.add(moduleIdentifier)
  1704. }
  1705. }
  1706. // used by ssr in case component is cached and beforeCreate
  1707. // never gets called
  1708. options._ssrRegister = hook
  1709. } else if (injectStyles) {
  1710. hook = shadowMode
  1711. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  1712. : injectStyles
  1713. }
  1714. if (hook) {
  1715. if (options.functional) {
  1716. // for template-only hot-reload because in that case the render fn doesn't
  1717. // go through the normalizer
  1718. options._injectStyles = hook
  1719. // register for functioal component in vue file
  1720. var originalRender = options.render
  1721. options.render = function renderWithStyleInjection (h, context) {
  1722. hook.call(context)
  1723. return originalRender(h, context)
  1724. }
  1725. } else {
  1726. // inject component registration as beforeCreate hook
  1727. var existing = options.beforeCreate
  1728. options.beforeCreate = existing
  1729. ? [].concat(existing, hook)
  1730. : [hook]
  1731. }
  1732. }
  1733. return {
  1734. exports: scriptExports,
  1735. options: options
  1736. }
  1737. }
  1738. /***/ }),
  1739. /***/ 14:
  1740. /*!******************************************************!*\
  1741. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/index.js ***!
  1742. \******************************************************/
  1743. /*! no static exports found */
  1744. /***/ (function(module, exports, __webpack_require__) {
  1745. "use strict";
  1746. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
  1747. var _mixin = _interopRequireDefault(__webpack_require__(/*! ./libs/mixin/mixin.js */ 15));
  1748. var _request = _interopRequireDefault(__webpack_require__(/*! ./libs/request */ 16));
  1749. var _queryParams = _interopRequireDefault(__webpack_require__(/*! ./libs/function/queryParams.js */ 20));
  1750. var _route = _interopRequireDefault(__webpack_require__(/*! ./libs/function/route.js */ 21));
  1751. var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFormat.js */ 25));
  1752. var _timeFrom = _interopRequireDefault(__webpack_require__(/*! ./libs/function/timeFrom.js */ 26));
  1753. var _colorGradient = _interopRequireDefault(__webpack_require__(/*! ./libs/function/colorGradient.js */ 27));
  1754. var _guid = _interopRequireDefault(__webpack_require__(/*! ./libs/function/guid.js */ 28));
  1755. var _color = _interopRequireDefault(__webpack_require__(/*! ./libs/function/color.js */ 29));
  1756. var _type2icon = _interopRequireDefault(__webpack_require__(/*! ./libs/function/type2icon.js */ 30));
  1757. var _randomArray = _interopRequireDefault(__webpack_require__(/*! ./libs/function/randomArray.js */ 31));
  1758. var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepClone.js */ 18));
  1759. var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ./libs/function/deepMerge.js */ 17));
  1760. var _addUnit = _interopRequireDefault(__webpack_require__(/*! ./libs/function/addUnit.js */ 32));
  1761. var _test = _interopRequireDefault(__webpack_require__(/*! ./libs/function/test.js */ 19));
  1762. var _random = _interopRequireDefault(__webpack_require__(/*! ./libs/function/random.js */ 33));
  1763. var _trim = _interopRequireDefault(__webpack_require__(/*! ./libs/function/trim.js */ 34));
  1764. var _toast = _interopRequireDefault(__webpack_require__(/*! ./libs/function/toast.js */ 35));
  1765. var _getParent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/getParent.js */ 36));
  1766. var _$parent = _interopRequireDefault(__webpack_require__(/*! ./libs/function/$parent.js */ 37));
  1767. var _sys = __webpack_require__(/*! ./libs/function/sys.js */ 38);
  1768. var _debounce = _interopRequireDefault(__webpack_require__(/*! ./libs/function/debounce.js */ 39));
  1769. var _throttle = _interopRequireDefault(__webpack_require__(/*! ./libs/function/throttle.js */ 40));
  1770. var _config = _interopRequireDefault(__webpack_require__(/*! ./libs/config/config.js */ 41));
  1771. var _zIndex = _interopRequireDefault(__webpack_require__(/*! ./libs/config/zIndex.js */ 42));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };} // 引入全局mixin
  1772. // 引入关于是否mixin集成小程序分享的配置
  1773. // import wxshare from './libs/mixin/mpShare.js'
  1774. // 全局挂载引入http相关请求拦截插件
  1775. function wranning(str) {// 开发环境进行信息输出,主要是一些报错信息
  1776. // 这个环境的来由是在程序编写时候,点击hx编辑器运行调试代码的时候,详见:
  1777. // https://uniapp.dcloud.io/frame?id=%e5%bc%80%e5%8f%91%e7%8e%af%e5%a2%83%e5%92%8c%e7%94%9f%e4%ba%a7%e7%8e%af%e5%a2%83
  1778. if (true) {console.warn(str);}} // 尝试判断在根目录的/store中是否有$u.mixin.js,此文件uView默认为需要挂在到全局的vuex的state变量
  1779. // HX2.6.11版本,放到try中,控制台依然会警告,暂时不用此方式,
  1780. // let vuexStore = {};
  1781. // try {
  1782. // vuexStore = require("@/store/$u.mixin.js");
  1783. // } catch (e) {
  1784. // //TODO handle the exception
  1785. // }
  1786. // post类型对象参数转为get类型url参数
  1787. var $u = { queryParams: _queryParams.default, route: _route.default, timeFormat: _timeFormat.default, date: _timeFormat.default, // 另名date
  1788. timeFrom: _timeFrom.default, colorGradient: _colorGradient.default.colorGradient, colorToRgba: _colorGradient.default.colorToRgba, guid: _guid.default, color: _color.default, sys: _sys.sys, os: _sys.os, type2icon: _type2icon.default, randomArray: _randomArray.default, wranning: wranning, get: _request.default.get,
  1789. post: _request.default.post,
  1790. put: _request.default.put,
  1791. 'delete': _request.default.delete,
  1792. hexToRgb: _colorGradient.default.hexToRgb,
  1793. rgbToHex: _colorGradient.default.rgbToHex,
  1794. test: _test.default,
  1795. random: _random.default,
  1796. deepClone: _deepClone.default,
  1797. deepMerge: _deepMerge.default,
  1798. getParent: _getParent.default,
  1799. $parent: _$parent.default,
  1800. addUnit: _addUnit.default,
  1801. trim: _trim.default,
  1802. type: ['primary', 'success', 'error', 'warning', 'info'],
  1803. http: _request.default,
  1804. toast: _toast.default,
  1805. config: _config.default, // uView配置信息相关,比如版本号
  1806. zIndex: _zIndex.default,
  1807. debounce: _debounce.default,
  1808. throttle: _throttle.default };
  1809. // $u挂载到uni对象上
  1810. uni.$u = $u;
  1811. var install = function install(Vue) {
  1812. Vue.mixin(_mixin.default);
  1813. if (Vue.prototype.openShare) {
  1814. Vue.mixin(mpShare);
  1815. }
  1816. // Vue.mixin(vuexStore);
  1817. // 时间格式化,同时两个名称,date和timeFormat
  1818. Vue.filter('timeFormat', function (timestamp, format) {
  1819. return (0, _timeFormat.default)(timestamp, format);
  1820. });
  1821. Vue.filter('date', function (timestamp, format) {
  1822. return (0, _timeFormat.default)(timestamp, format);
  1823. });
  1824. // 将多久以前的方法,注入到全局过滤器
  1825. Vue.filter('timeFrom', function (timestamp, format) {
  1826. return (0, _timeFrom.default)(timestamp, format);
  1827. });
  1828. Vue.prototype.$u = $u;
  1829. };var _default =
  1830. {
  1831. install: install };exports.default = _default;
  1832. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  1833. /***/ }),
  1834. /***/ 143:
  1835. /*!****************************************!*\
  1836. !*** G:/gsxm/git/yangdaxia/api/set.js ***!
  1837. \****************************************/
  1838. /*! no static exports found */
  1839. /***/ (function(module, exports, __webpack_require__) {
  1840. "use strict";
  1841. Object.defineProperty(exports, "__esModule", { value: true });exports.userEdit = userEdit;exports.logout = logout;exports.registerReset = registerReset;exports.binding = binding;exports.realName = realName;exports.transaction = transaction;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 50));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  1842. // 修改用户信息
  1843. function userEdit(data) {
  1844. return (0, _request.default)({
  1845. url: '/api/user/edit',
  1846. method: 'post',
  1847. data: data });
  1848. }
  1849. //退出登录
  1850. function logout(data) {
  1851. return (0, _request.default)({
  1852. url: '/api/logout',
  1853. method: 'get',
  1854. data: data });
  1855. }
  1856. //修改密码
  1857. function registerReset(data) {
  1858. return (0, _request.default)({
  1859. url: '/api/register/reset',
  1860. method: 'post',
  1861. data: data });
  1862. }
  1863. //绑定手机
  1864. function binding(data) {
  1865. return (0, _request.default)({
  1866. url: '/api/binding',
  1867. method: 'post',
  1868. data: data });
  1869. }
  1870. // 实名认证
  1871. function realName(data) {
  1872. return (0, _request.default)({
  1873. url: '/api/realName',
  1874. method: 'post',
  1875. data: data });
  1876. }
  1877. //交易密码设置
  1878. function transaction(data) {
  1879. return (0, _request.default)({
  1880. url: '/api/transaction',
  1881. method: 'post',
  1882. data: data });
  1883. }
  1884. /***/ }),
  1885. /***/ 15:
  1886. /*!*****************************************************************!*\
  1887. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/mixin/mixin.js ***!
  1888. \*****************************************************************/
  1889. /*! no static exports found */
  1890. /***/ (function(module, exports, __webpack_require__) {
  1891. /* WEBPACK VAR INJECTION */(function(uni) {module.exports = {
  1892. data: function data() {
  1893. return {};
  1894. },
  1895. onLoad: function onLoad() {
  1896. // getRect挂载到$u上,因为这方法需要使用in(this),所以无法把它独立成一个单独的文件导出
  1897. this.$u.getRect = this.$uGetRect;
  1898. },
  1899. methods: {
  1900. // 查询节点信息
  1901. // 目前此方法在支付宝小程序中无法获取组件跟接点的尺寸,为支付宝的bug(2020-07-21)
  1902. // 解决办法为在组件根部再套一个没有任何作用的view元素
  1903. $uGetRect: function $uGetRect(selector, all) {var _this = this;
  1904. return new Promise(function (resolve) {
  1905. uni.createSelectorQuery().
  1906. in(_this)[all ? 'selectAll' : 'select'](selector).
  1907. boundingClientRect(function (rect) {
  1908. if (all && Array.isArray(rect) && rect.length) {
  1909. resolve(rect);
  1910. }
  1911. if (!all && rect) {
  1912. resolve(rect);
  1913. }
  1914. }).
  1915. exec();
  1916. });
  1917. },
  1918. getParentData: function getParentData() {var _this2 = this;var parentName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  1919. // 避免在created中去定义parent变量
  1920. if (!this.parent) this.parent = false;
  1921. // 这里的本质原理是,通过获取父组件实例(也即u-radio-group的this)
  1922. // 将父组件this中对应的参数,赋值给本组件(u-radio的this)的parentData对象中对应的属性
  1923. // 之所以需要这么做,是因为所有端中,头条小程序不支持通过this.parent.xxx去监听父组件参数的变化
  1924. this.parent = this.$u.$parent.call(this, parentName);
  1925. if (this.parent) {
  1926. // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
  1927. Object.keys(this.parentData).map(function (key) {
  1928. _this2.parentData[key] = _this2.parent[key];
  1929. });
  1930. }
  1931. },
  1932. // 阻止事件冒泡
  1933. preventEvent: function preventEvent(e) {
  1934. e && e.stopPropagation && e.stopPropagation();
  1935. } },
  1936. onReachBottom: function onReachBottom() {
  1937. uni.$emit('uOnReachBottom');
  1938. },
  1939. beforeDestroy: function beforeDestroy() {var _this3 = this;
  1940. // 判断当前页面是否存在parent和chldren,一般在checkbox和checkbox-group父子联动的场景会有此情况
  1941. // 组件销毁时,移除子组件在父组件children数组中的实例,释放资源,避免数据混乱
  1942. if (this.parent && uni.$u.test.array(this.parent.children)) {
  1943. // 组件销毁时,移除父组件中的children数组中对应的实例
  1944. var childrenList = this.parent.children;
  1945. childrenList.map(function (child, index) {
  1946. // 如果相等,则移除
  1947. if (child === _this3) {
  1948. childrenList.splice(index, 1);
  1949. }
  1950. });
  1951. }
  1952. } };
  1953. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  1954. /***/ }),
  1955. /***/ 16:
  1956. /*!*******************************************************************!*\
  1957. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/request/index.js ***!
  1958. \*******************************************************************/
  1959. /*! no static exports found */
  1960. /***/ (function(module, exports, __webpack_require__) {
  1961. "use strict";
  1962. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _deepMerge = _interopRequireDefault(__webpack_require__(/*! ../function/deepMerge */ 17));
  1963. var _test = _interopRequireDefault(__webpack_require__(/*! ../function/test */ 19));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;}var
  1964. Request = /*#__PURE__*/function () {_createClass(Request, [{ key: "setConfig",
  1965. // 设置全局默认配置
  1966. value: function setConfig(customConfig) {
  1967. // 深度合并对象,否则会造成对象深层属性丢失
  1968. this.config = (0, _deepMerge.default)(this.config, customConfig);
  1969. }
  1970. // 主要请求部分
  1971. }, { key: "request", value: function request() {var _this = this;var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1972. // 检查请求拦截
  1973. if (this.interceptor.request && typeof this.interceptor.request === 'function') {
  1974. var tmpConfig = {};
  1975. var interceptorRequest = this.interceptor.request(options);
  1976. if (interceptorRequest === false) {
  1977. // 返回一个处于pending状态中的Promise,来取消原promise,避免进入then()回调
  1978. return new Promise(function () {});
  1979. }
  1980. this.options = interceptorRequest;
  1981. }
  1982. options.dataType = options.dataType || this.config.dataType;
  1983. options.responseType = options.responseType || this.config.responseType;
  1984. options.url = options.url || '';
  1985. options.params = options.params || {};
  1986. options.header = Object.assign({}, this.config.header, options.header);
  1987. options.method = options.method || this.config.method;
  1988. return new Promise(function (resolve, reject) {
  1989. options.complete = function (response) {
  1990. // 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
  1991. uni.hideLoading();
  1992. // 清除定时器,如果请求回来了,就无需loading
  1993. clearTimeout(_this.config.timer);
  1994. _this.config.timer = null;
  1995. // 判断用户对拦截返回数据的要求,如果originalData为true,返回所有的数据(response)到拦截器,否则只返回response.data
  1996. if (_this.config.originalData) {
  1997. // 判断是否存在拦截器
  1998. if (_this.interceptor.response && typeof _this.interceptor.response === 'function') {
  1999. var resInterceptors = _this.interceptor.response(response);
  2000. // 如果拦截器不返回false,就将拦截器返回的内容给this.$u.post的then回调
  2001. if (resInterceptors !== false) {
  2002. resolve(resInterceptors);
  2003. } else {
  2004. // 如果拦截器返回false,意味着拦截器定义者认为返回有问题,直接接入catch回调
  2005. reject(response);
  2006. }
  2007. } else {
  2008. // 如果要求返回原始数据,就算没有拦截器,也返回最原始的数据
  2009. resolve(response);
  2010. }
  2011. } else {
  2012. if (response.statusCode == 200) {
  2013. if (_this.interceptor.response && typeof _this.interceptor.response === 'function') {
  2014. var _resInterceptors = _this.interceptor.response(response.data);
  2015. if (_resInterceptors !== false) {
  2016. resolve(_resInterceptors);
  2017. } else {
  2018. reject(response.data);
  2019. }
  2020. } else {
  2021. // 如果不是返回原始数据(originalData=false),且没有拦截器的情况下,返回纯数据给then回调
  2022. resolve(response.data);
  2023. }
  2024. } else {
  2025. // 不返回原始数据的情况下,服务器状态码不为200,modal弹框提示
  2026. // if(response.errMsg) {
  2027. // uni.showModal({
  2028. // title: response.errMsg
  2029. // });
  2030. // }
  2031. reject(response);
  2032. }
  2033. }
  2034. };
  2035. // 判断用户传递的URL是否/开头,如果不是,加上/,这里使用了uView的test.js验证库的url()方法
  2036. options.url = _test.default.url(options.url) ? options.url : _this.config.baseUrl + (options.url.indexOf('/') == 0 ?
  2037. options.url : '/' + options.url);
  2038. // 是否显示loading
  2039. // 加一个是否已有timer定时器的判断,否则有两个同时请求的时候,后者会清除前者的定时器id
  2040. // 而没有清除前者的定时器,导致前者超时,一直显示loading
  2041. if (_this.config.showLoading && !_this.config.timer) {
  2042. _this.config.timer = setTimeout(function () {
  2043. uni.showLoading({
  2044. title: _this.config.loadingText,
  2045. mask: _this.config.loadingMask });
  2046. _this.config.timer = null;
  2047. }, _this.config.loadingTime);
  2048. }
  2049. uni.request(options);
  2050. });
  2051. // .catch(res => {
  2052. // // 如果返回reject(),不让其进入this.$u.post().then().catch()后面的catct()
  2053. // // 因为很多人都会忘了写后面的catch(),导致报错捕获不到catch
  2054. // return new Promise(()=>{});
  2055. // })
  2056. } }]);
  2057. function Request() {var _this2 = this;_classCallCheck(this, Request);
  2058. this.config = {
  2059. baseUrl: '', // 请求的根域名
  2060. // 默认的请求头
  2061. header: {},
  2062. method: 'POST',
  2063. // 设置为json,返回后uni.request会对数据进行一次JSON.parse
  2064. dataType: 'json',
  2065. // 此参数无需处理,因为5+和支付宝小程序不支持,默认为text即可
  2066. responseType: 'text',
  2067. showLoading: true, // 是否显示请求中的loading
  2068. loadingText: '请求中...',
  2069. loadingTime: 800, // 在此时间内,请求还没回来的话,就显示加载中动画,单位ms
  2070. timer: null, // 定时器
  2071. originalData: false, // 是否在拦截器中返回服务端的原始数据,见文档说明
  2072. loadingMask: true // 展示loading的时候,是否给一个透明的蒙层,防止触摸穿透
  2073. };
  2074. // 拦截器
  2075. this.interceptor = {
  2076. // 请求前的拦截
  2077. request: null,
  2078. // 请求后的拦截
  2079. response: null };
  2080. // get请求
  2081. this.get = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2082. return _this2.request({
  2083. method: 'GET',
  2084. url: url,
  2085. header: header,
  2086. data: data });
  2087. };
  2088. // post请求
  2089. this.post = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2090. return _this2.request({
  2091. url: url,
  2092. method: 'POST',
  2093. header: header,
  2094. data: data });
  2095. };
  2096. // put请求,不支持支付宝小程序(HX2.6.15)
  2097. this.put = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2098. return _this2.request({
  2099. url: url,
  2100. method: 'PUT',
  2101. header: header,
  2102. data: data });
  2103. };
  2104. // delete请求,不支持支付宝和头条小程序(HX2.6.15)
  2105. this.delete = function (url) {var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};var header = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2106. return _this2.request({
  2107. url: url,
  2108. method: 'DELETE',
  2109. header: header,
  2110. data: data });
  2111. };
  2112. }return Request;}();var _default =
  2113. new Request();exports.default = _default;
  2114. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  2115. /***/ }),
  2116. /***/ 17:
  2117. /*!************************************************************************!*\
  2118. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/deepMerge.js ***!
  2119. \************************************************************************/
  2120. /*! no static exports found */
  2121. /***/ (function(module, exports, __webpack_require__) {
  2122. "use strict";
  2123. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _deepClone = _interopRequireDefault(__webpack_require__(/*! ./deepClone */ 18));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  2124. // JS对象深度合并
  2125. function deepMerge() {var target = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var source = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2126. target = (0, _deepClone.default)(target);
  2127. if (typeof target !== 'object' || typeof source !== 'object') return false;
  2128. for (var prop in source) {
  2129. if (!source.hasOwnProperty(prop)) continue;
  2130. if (prop in target) {
  2131. if (typeof target[prop] !== 'object') {
  2132. target[prop] = source[prop];
  2133. } else {
  2134. if (typeof source[prop] !== 'object') {
  2135. target[prop] = source[prop];
  2136. } else {
  2137. if (target[prop].concat && source[prop].concat) {
  2138. target[prop] = target[prop].concat(source[prop]);
  2139. } else {
  2140. target[prop] = deepMerge(target[prop], source[prop]);
  2141. }
  2142. }
  2143. }
  2144. } else {
  2145. target[prop] = source[prop];
  2146. }
  2147. }
  2148. return target;
  2149. }var _default =
  2150. deepMerge;exports.default = _default;
  2151. /***/ }),
  2152. /***/ 18:
  2153. /*!************************************************************************!*\
  2154. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/deepClone.js ***!
  2155. \************************************************************************/
  2156. /*! no static exports found */
  2157. /***/ (function(module, exports, __webpack_require__) {
  2158. "use strict";
  2159. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 判断arr是否为一个数组,返回一个bool值
  2160. function isArray(arr) {
  2161. return Object.prototype.toString.call(arr) === '[object Array]';
  2162. }
  2163. // 深度克隆
  2164. function deepClone(obj) {
  2165. // 对常见的“非”值,直接返回原来值
  2166. if ([null, undefined, NaN, false].includes(obj)) return obj;
  2167. if (typeof obj !== "object" && typeof obj !== 'function') {
  2168. //原始类型直接返回
  2169. return obj;
  2170. }
  2171. var o = isArray(obj) ? [] : {};
  2172. for (var i in obj) {
  2173. if (obj.hasOwnProperty(i)) {
  2174. o[i] = typeof obj[i] === "object" ? deepClone(obj[i]) : obj[i];
  2175. }
  2176. }
  2177. return o;
  2178. }var _default =
  2179. deepClone;exports.default = _default;
  2180. /***/ }),
  2181. /***/ 19:
  2182. /*!*******************************************************************!*\
  2183. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/test.js ***!
  2184. \*******************************************************************/
  2185. /*! no static exports found */
  2186. /***/ (function(module, exports, __webpack_require__) {
  2187. "use strict";
  2188. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  2189. * 验证电子邮箱格式
  2190. */
  2191. function email(value) {
  2192. return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(value);
  2193. }
  2194. /**
  2195. * 验证手机格式
  2196. */
  2197. function mobile(value) {
  2198. return /^1[3-9]\d{9}$/.test(value);
  2199. }
  2200. /**
  2201. * 验证URL格式
  2202. */
  2203. function url(value) {
  2204. return /http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w-.\/?%&=]*)?/.test(value);
  2205. }
  2206. /**
  2207. * 验证日期格式
  2208. */
  2209. function date(value) {
  2210. return !/Invalid|NaN/.test(new Date(value).toString());
  2211. }
  2212. /**
  2213. * 验证ISO类型的日期格式
  2214. */
  2215. function dateISO(value) {
  2216. return /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value);
  2217. }
  2218. /**
  2219. * 验证十进制数字
  2220. */
  2221. function number(value) {
  2222. return /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value);
  2223. }
  2224. /**
  2225. * 验证整数
  2226. */
  2227. function digits(value) {
  2228. return /^\d+$/.test(value);
  2229. }
  2230. /**
  2231. * 验证身份证号码
  2232. */
  2233. function idCard(value) {
  2234. return /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(
  2235. value);
  2236. }
  2237. /**
  2238. * 是否车牌号
  2239. */
  2240. function carNo(value) {
  2241. // 新能源车牌
  2242. var xreg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}(([0-9]{5}[DF]$)|([DF][A-HJ-NP-Z0-9][0-9]{4}$))/;
  2243. // 旧车牌
  2244. var creg = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳]{1}$/;
  2245. if (value.length === 7) {
  2246. return creg.test(value);
  2247. } else if (value.length === 8) {
  2248. return xreg.test(value);
  2249. } else {
  2250. return false;
  2251. }
  2252. }
  2253. /**
  2254. * 金额,只允许2位小数
  2255. */
  2256. function amount(value) {
  2257. //金额,只允许保留两位小数
  2258. return /^[1-9]\d*(,\d{3})*(\.\d{1,2})?$|^0\.\d{1,2}$/.test(value);
  2259. }
  2260. /**
  2261. * 中文
  2262. */
  2263. function chinese(value) {
  2264. var reg = /^[\u4e00-\u9fa5]+$/gi;
  2265. return reg.test(value);
  2266. }
  2267. /**
  2268. * 只能输入字母
  2269. */
  2270. function letter(value) {
  2271. return /^[a-zA-Z]*$/.test(value);
  2272. }
  2273. /**
  2274. * 只能是字母或者数字
  2275. */
  2276. function enOrNum(value) {
  2277. //英文或者数字
  2278. var reg = /^[0-9a-zA-Z]*$/g;
  2279. return reg.test(value);
  2280. }
  2281. /**
  2282. * 验证是否包含某个值
  2283. */
  2284. function contains(value, param) {
  2285. return value.indexOf(param) >= 0;
  2286. }
  2287. /**
  2288. * 验证一个值范围[min, max]
  2289. */
  2290. function range(value, param) {
  2291. return value >= param[0] && value <= param[1];
  2292. }
  2293. /**
  2294. * 验证一个长度范围[min, max]
  2295. */
  2296. function rangeLength(value, param) {
  2297. return value.length >= param[0] && value.length <= param[1];
  2298. }
  2299. /**
  2300. * 是否固定电话
  2301. */
  2302. function landline(value) {
  2303. var reg = /^\d{3,4}-\d{7,8}(-\d{3,4})?$/;
  2304. return reg.test(value);
  2305. }
  2306. /**
  2307. * 判断是否为空
  2308. */
  2309. function empty(value) {
  2310. switch (typeof value) {
  2311. case 'undefined':
  2312. return true;
  2313. case 'string':
  2314. if (value.replace(/(^[ \t\n\r]*)|([ \t\n\r]*$)/g, '').length == 0) return true;
  2315. break;
  2316. case 'boolean':
  2317. if (!value) return true;
  2318. break;
  2319. case 'number':
  2320. if (0 === value || isNaN(value)) return true;
  2321. break;
  2322. case 'object':
  2323. if (null === value || value.length === 0) return true;
  2324. for (var i in value) {
  2325. return false;
  2326. }
  2327. return true;}
  2328. return false;
  2329. }
  2330. /**
  2331. * 是否json字符串
  2332. */
  2333. function jsonString(value) {
  2334. if (typeof value == 'string') {
  2335. try {
  2336. var obj = JSON.parse(value);
  2337. if (typeof obj == 'object' && obj) {
  2338. return true;
  2339. } else {
  2340. return false;
  2341. }
  2342. } catch (e) {
  2343. return false;
  2344. }
  2345. }
  2346. return false;
  2347. }
  2348. /**
  2349. * 是否数组
  2350. */
  2351. function array(value) {
  2352. if (typeof Array.isArray === "function") {
  2353. return Array.isArray(value);
  2354. } else {
  2355. return Object.prototype.toString.call(value) === "[object Array]";
  2356. }
  2357. }
  2358. /**
  2359. * 是否对象
  2360. */
  2361. function object(value) {
  2362. return Object.prototype.toString.call(value) === '[object Object]';
  2363. }
  2364. /**
  2365. * 是否短信验证码
  2366. */
  2367. function code(value) {var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 6;
  2368. return new RegExp("^\\d{".concat(len, "}$")).test(value);
  2369. }var _default =
  2370. {
  2371. email: email,
  2372. mobile: mobile,
  2373. url: url,
  2374. date: date,
  2375. dateISO: dateISO,
  2376. number: number,
  2377. digits: digits,
  2378. idCard: idCard,
  2379. carNo: carNo,
  2380. amount: amount,
  2381. chinese: chinese,
  2382. letter: letter,
  2383. enOrNum: enOrNum,
  2384. contains: contains,
  2385. range: range,
  2386. rangeLength: rangeLength,
  2387. empty: empty,
  2388. isEmpty: empty,
  2389. jsonString: jsonString,
  2390. landline: landline,
  2391. object: object,
  2392. array: array,
  2393. code: code };exports.default = _default;
  2394. /***/ }),
  2395. /***/ 2:
  2396. /*!******************************************************************************************!*\
  2397. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  2398. \******************************************************************************************/
  2399. /*! exports provided: default */
  2400. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  2401. "use strict";
  2402. __webpack_require__.r(__webpack_exports__);
  2403. /* WEBPACK VAR INJECTION */(function(global) {/*!
  2404. * Vue.js v2.6.11
  2405. * (c) 2014-2021 Evan You
  2406. * Released under the MIT License.
  2407. */
  2408. /* */
  2409. var emptyObject = Object.freeze({});
  2410. // These helpers produce better VM code in JS engines due to their
  2411. // explicitness and function inlining.
  2412. function isUndef (v) {
  2413. return v === undefined || v === null
  2414. }
  2415. function isDef (v) {
  2416. return v !== undefined && v !== null
  2417. }
  2418. function isTrue (v) {
  2419. return v === true
  2420. }
  2421. function isFalse (v) {
  2422. return v === false
  2423. }
  2424. /**
  2425. * Check if value is primitive.
  2426. */
  2427. function isPrimitive (value) {
  2428. return (
  2429. typeof value === 'string' ||
  2430. typeof value === 'number' ||
  2431. // $flow-disable-line
  2432. typeof value === 'symbol' ||
  2433. typeof value === 'boolean'
  2434. )
  2435. }
  2436. /**
  2437. * Quick object check - this is primarily used to tell
  2438. * Objects from primitive values when we know the value
  2439. * is a JSON-compliant type.
  2440. */
  2441. function isObject (obj) {
  2442. return obj !== null && typeof obj === 'object'
  2443. }
  2444. /**
  2445. * Get the raw type string of a value, e.g., [object Object].
  2446. */
  2447. var _toString = Object.prototype.toString;
  2448. function toRawType (value) {
  2449. return _toString.call(value).slice(8, -1)
  2450. }
  2451. /**
  2452. * Strict object type check. Only returns true
  2453. * for plain JavaScript objects.
  2454. */
  2455. function isPlainObject (obj) {
  2456. return _toString.call(obj) === '[object Object]'
  2457. }
  2458. function isRegExp (v) {
  2459. return _toString.call(v) === '[object RegExp]'
  2460. }
  2461. /**
  2462. * Check if val is a valid array index.
  2463. */
  2464. function isValidArrayIndex (val) {
  2465. var n = parseFloat(String(val));
  2466. return n >= 0 && Math.floor(n) === n && isFinite(val)
  2467. }
  2468. function isPromise (val) {
  2469. return (
  2470. isDef(val) &&
  2471. typeof val.then === 'function' &&
  2472. typeof val.catch === 'function'
  2473. )
  2474. }
  2475. /**
  2476. * Convert a value to a string that is actually rendered.
  2477. */
  2478. function toString (val) {
  2479. return val == null
  2480. ? ''
  2481. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  2482. ? JSON.stringify(val, null, 2)
  2483. : String(val)
  2484. }
  2485. /**
  2486. * Convert an input value to a number for persistence.
  2487. * If the conversion fails, return original string.
  2488. */
  2489. function toNumber (val) {
  2490. var n = parseFloat(val);
  2491. return isNaN(n) ? val : n
  2492. }
  2493. /**
  2494. * Make a map and return a function for checking if a key
  2495. * is in that map.
  2496. */
  2497. function makeMap (
  2498. str,
  2499. expectsLowerCase
  2500. ) {
  2501. var map = Object.create(null);
  2502. var list = str.split(',');
  2503. for (var i = 0; i < list.length; i++) {
  2504. map[list[i]] = true;
  2505. }
  2506. return expectsLowerCase
  2507. ? function (val) { return map[val.toLowerCase()]; }
  2508. : function (val) { return map[val]; }
  2509. }
  2510. /**
  2511. * Check if a tag is a built-in tag.
  2512. */
  2513. var isBuiltInTag = makeMap('slot,component', true);
  2514. /**
  2515. * Check if an attribute is a reserved attribute.
  2516. */
  2517. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  2518. /**
  2519. * Remove an item from an array.
  2520. */
  2521. function remove (arr, item) {
  2522. if (arr.length) {
  2523. var index = arr.indexOf(item);
  2524. if (index > -1) {
  2525. return arr.splice(index, 1)
  2526. }
  2527. }
  2528. }
  2529. /**
  2530. * Check whether an object has the property.
  2531. */
  2532. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2533. function hasOwn (obj, key) {
  2534. return hasOwnProperty.call(obj, key)
  2535. }
  2536. /**
  2537. * Create a cached version of a pure function.
  2538. */
  2539. function cached (fn) {
  2540. var cache = Object.create(null);
  2541. return (function cachedFn (str) {
  2542. var hit = cache[str];
  2543. return hit || (cache[str] = fn(str))
  2544. })
  2545. }
  2546. /**
  2547. * Camelize a hyphen-delimited string.
  2548. */
  2549. var camelizeRE = /-(\w)/g;
  2550. var camelize = cached(function (str) {
  2551. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  2552. });
  2553. /**
  2554. * Capitalize a string.
  2555. */
  2556. var capitalize = cached(function (str) {
  2557. return str.charAt(0).toUpperCase() + str.slice(1)
  2558. });
  2559. /**
  2560. * Hyphenate a camelCase string.
  2561. */
  2562. var hyphenateRE = /\B([A-Z])/g;
  2563. var hyphenate = cached(function (str) {
  2564. return str.replace(hyphenateRE, '-$1').toLowerCase()
  2565. });
  2566. /**
  2567. * Simple bind polyfill for environments that do not support it,
  2568. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  2569. * since native bind is now performant enough in most browsers.
  2570. * But removing it would mean breaking code that was able to run in
  2571. * PhantomJS 1.x, so this must be kept for backward compatibility.
  2572. */
  2573. /* istanbul ignore next */
  2574. function polyfillBind (fn, ctx) {
  2575. function boundFn (a) {
  2576. var l = arguments.length;
  2577. return l
  2578. ? l > 1
  2579. ? fn.apply(ctx, arguments)
  2580. : fn.call(ctx, a)
  2581. : fn.call(ctx)
  2582. }
  2583. boundFn._length = fn.length;
  2584. return boundFn
  2585. }
  2586. function nativeBind (fn, ctx) {
  2587. return fn.bind(ctx)
  2588. }
  2589. var bind = Function.prototype.bind
  2590. ? nativeBind
  2591. : polyfillBind;
  2592. /**
  2593. * Convert an Array-like object to a real Array.
  2594. */
  2595. function toArray (list, start) {
  2596. start = start || 0;
  2597. var i = list.length - start;
  2598. var ret = new Array(i);
  2599. while (i--) {
  2600. ret[i] = list[i + start];
  2601. }
  2602. return ret
  2603. }
  2604. /**
  2605. * Mix properties into target object.
  2606. */
  2607. function extend (to, _from) {
  2608. for (var key in _from) {
  2609. to[key] = _from[key];
  2610. }
  2611. return to
  2612. }
  2613. /**
  2614. * Merge an Array of Objects into a single Object.
  2615. */
  2616. function toObject (arr) {
  2617. var res = {};
  2618. for (var i = 0; i < arr.length; i++) {
  2619. if (arr[i]) {
  2620. extend(res, arr[i]);
  2621. }
  2622. }
  2623. return res
  2624. }
  2625. /* eslint-disable no-unused-vars */
  2626. /**
  2627. * Perform no operation.
  2628. * Stubbing args to make Flow happy without leaving useless transpiled code
  2629. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  2630. */
  2631. function noop (a, b, c) {}
  2632. /**
  2633. * Always return false.
  2634. */
  2635. var no = function (a, b, c) { return false; };
  2636. /* eslint-enable no-unused-vars */
  2637. /**
  2638. * Return the same value.
  2639. */
  2640. var identity = function (_) { return _; };
  2641. /**
  2642. * Check if two values are loosely equal - that is,
  2643. * if they are plain objects, do they have the same shape?
  2644. */
  2645. function looseEqual (a, b) {
  2646. if (a === b) { return true }
  2647. var isObjectA = isObject(a);
  2648. var isObjectB = isObject(b);
  2649. if (isObjectA && isObjectB) {
  2650. try {
  2651. var isArrayA = Array.isArray(a);
  2652. var isArrayB = Array.isArray(b);
  2653. if (isArrayA && isArrayB) {
  2654. return a.length === b.length && a.every(function (e, i) {
  2655. return looseEqual(e, b[i])
  2656. })
  2657. } else if (a instanceof Date && b instanceof Date) {
  2658. return a.getTime() === b.getTime()
  2659. } else if (!isArrayA && !isArrayB) {
  2660. var keysA = Object.keys(a);
  2661. var keysB = Object.keys(b);
  2662. return keysA.length === keysB.length && keysA.every(function (key) {
  2663. return looseEqual(a[key], b[key])
  2664. })
  2665. } else {
  2666. /* istanbul ignore next */
  2667. return false
  2668. }
  2669. } catch (e) {
  2670. /* istanbul ignore next */
  2671. return false
  2672. }
  2673. } else if (!isObjectA && !isObjectB) {
  2674. return String(a) === String(b)
  2675. } else {
  2676. return false
  2677. }
  2678. }
  2679. /**
  2680. * Return the first index at which a loosely equal value can be
  2681. * found in the array (if value is a plain object, the array must
  2682. * contain an object of the same shape), or -1 if it is not present.
  2683. */
  2684. function looseIndexOf (arr, val) {
  2685. for (var i = 0; i < arr.length; i++) {
  2686. if (looseEqual(arr[i], val)) { return i }
  2687. }
  2688. return -1
  2689. }
  2690. /**
  2691. * Ensure a function is called only once.
  2692. */
  2693. function once (fn) {
  2694. var called = false;
  2695. return function () {
  2696. if (!called) {
  2697. called = true;
  2698. fn.apply(this, arguments);
  2699. }
  2700. }
  2701. }
  2702. var ASSET_TYPES = [
  2703. 'component',
  2704. 'directive',
  2705. 'filter'
  2706. ];
  2707. var LIFECYCLE_HOOKS = [
  2708. 'beforeCreate',
  2709. 'created',
  2710. 'beforeMount',
  2711. 'mounted',
  2712. 'beforeUpdate',
  2713. 'updated',
  2714. 'beforeDestroy',
  2715. 'destroyed',
  2716. 'activated',
  2717. 'deactivated',
  2718. 'errorCaptured',
  2719. 'serverPrefetch'
  2720. ];
  2721. /* */
  2722. var config = ({
  2723. /**
  2724. * Option merge strategies (used in core/util/options)
  2725. */
  2726. // $flow-disable-line
  2727. optionMergeStrategies: Object.create(null),
  2728. /**
  2729. * Whether to suppress warnings.
  2730. */
  2731. silent: false,
  2732. /**
  2733. * Show production mode tip message on boot?
  2734. */
  2735. productionTip: "development" !== 'production',
  2736. /**
  2737. * Whether to enable devtools
  2738. */
  2739. devtools: "development" !== 'production',
  2740. /**
  2741. * Whether to record perf
  2742. */
  2743. performance: false,
  2744. /**
  2745. * Error handler for watcher errors
  2746. */
  2747. errorHandler: null,
  2748. /**
  2749. * Warn handler for watcher warns
  2750. */
  2751. warnHandler: null,
  2752. /**
  2753. * Ignore certain custom elements
  2754. */
  2755. ignoredElements: [],
  2756. /**
  2757. * Custom user key aliases for v-on
  2758. */
  2759. // $flow-disable-line
  2760. keyCodes: Object.create(null),
  2761. /**
  2762. * Check if a tag is reserved so that it cannot be registered as a
  2763. * component. This is platform-dependent and may be overwritten.
  2764. */
  2765. isReservedTag: no,
  2766. /**
  2767. * Check if an attribute is reserved so that it cannot be used as a component
  2768. * prop. This is platform-dependent and may be overwritten.
  2769. */
  2770. isReservedAttr: no,
  2771. /**
  2772. * Check if a tag is an unknown element.
  2773. * Platform-dependent.
  2774. */
  2775. isUnknownElement: no,
  2776. /**
  2777. * Get the namespace of an element
  2778. */
  2779. getTagNamespace: noop,
  2780. /**
  2781. * Parse the real tag name for the specific platform.
  2782. */
  2783. parsePlatformTagName: identity,
  2784. /**
  2785. * Check if an attribute must be bound using property, e.g. value
  2786. * Platform-dependent.
  2787. */
  2788. mustUseProp: no,
  2789. /**
  2790. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  2791. * This will significantly reduce performance if set to false.
  2792. */
  2793. async: true,
  2794. /**
  2795. * Exposed for legacy reasons
  2796. */
  2797. _lifecycleHooks: LIFECYCLE_HOOKS
  2798. });
  2799. /* */
  2800. /**
  2801. * unicode letters used for parsing html tags, component names and property paths.
  2802. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  2803. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  2804. */
  2805. 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/;
  2806. /**
  2807. * Check if a string starts with $ or _
  2808. */
  2809. function isReserved (str) {
  2810. var c = (str + '').charCodeAt(0);
  2811. return c === 0x24 || c === 0x5F
  2812. }
  2813. /**
  2814. * Define a property.
  2815. */
  2816. function def (obj, key, val, enumerable) {
  2817. Object.defineProperty(obj, key, {
  2818. value: val,
  2819. enumerable: !!enumerable,
  2820. writable: true,
  2821. configurable: true
  2822. });
  2823. }
  2824. /**
  2825. * Parse simple path.
  2826. */
  2827. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  2828. function parsePath (path) {
  2829. if (bailRE.test(path)) {
  2830. return
  2831. }
  2832. var segments = path.split('.');
  2833. return function (obj) {
  2834. for (var i = 0; i < segments.length; i++) {
  2835. if (!obj) { return }
  2836. obj = obj[segments[i]];
  2837. }
  2838. return obj
  2839. }
  2840. }
  2841. /* */
  2842. // can we use __proto__?
  2843. var hasProto = '__proto__' in {};
  2844. // Browser environment sniffing
  2845. var inBrowser = typeof window !== 'undefined';
  2846. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  2847. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  2848. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  2849. var isIE = UA && /msie|trident/.test(UA);
  2850. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  2851. var isEdge = UA && UA.indexOf('edge/') > 0;
  2852. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  2853. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  2854. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  2855. var isPhantomJS = UA && /phantomjs/.test(UA);
  2856. var isFF = UA && UA.match(/firefox\/(\d+)/);
  2857. // Firefox has a "watch" function on Object.prototype...
  2858. var nativeWatch = ({}).watch;
  2859. if (inBrowser) {
  2860. try {
  2861. var opts = {};
  2862. Object.defineProperty(opts, 'passive', ({
  2863. get: function get () {
  2864. }
  2865. })); // https://github.com/facebook/flow/issues/285
  2866. window.addEventListener('test-passive', null, opts);
  2867. } catch (e) {}
  2868. }
  2869. // this needs to be lazy-evaled because vue may be required before
  2870. // vue-server-renderer can set VUE_ENV
  2871. var _isServer;
  2872. var isServerRendering = function () {
  2873. if (_isServer === undefined) {
  2874. /* istanbul ignore if */
  2875. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  2876. // detect presence of vue-server-renderer and avoid
  2877. // Webpack shimming the process
  2878. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  2879. } else {
  2880. _isServer = false;
  2881. }
  2882. }
  2883. return _isServer
  2884. };
  2885. // detect devtools
  2886. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  2887. /* istanbul ignore next */
  2888. function isNative (Ctor) {
  2889. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  2890. }
  2891. var hasSymbol =
  2892. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  2893. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  2894. var _Set;
  2895. /* istanbul ignore if */ // $flow-disable-line
  2896. if (typeof Set !== 'undefined' && isNative(Set)) {
  2897. // use native Set when available.
  2898. _Set = Set;
  2899. } else {
  2900. // a non-standard Set polyfill that only works with primitive keys.
  2901. _Set = /*@__PURE__*/(function () {
  2902. function Set () {
  2903. this.set = Object.create(null);
  2904. }
  2905. Set.prototype.has = function has (key) {
  2906. return this.set[key] === true
  2907. };
  2908. Set.prototype.add = function add (key) {
  2909. this.set[key] = true;
  2910. };
  2911. Set.prototype.clear = function clear () {
  2912. this.set = Object.create(null);
  2913. };
  2914. return Set;
  2915. }());
  2916. }
  2917. /* */
  2918. var warn = noop;
  2919. var tip = noop;
  2920. var generateComponentTrace = (noop); // work around flow check
  2921. var formatComponentName = (noop);
  2922. if (true) {
  2923. var hasConsole = typeof console !== 'undefined';
  2924. var classifyRE = /(?:^|[-_])(\w)/g;
  2925. var classify = function (str) { return str
  2926. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  2927. .replace(/[-_]/g, ''); };
  2928. warn = function (msg, vm) {
  2929. var trace = vm ? generateComponentTrace(vm) : '';
  2930. if (config.warnHandler) {
  2931. config.warnHandler.call(null, msg, vm, trace);
  2932. } else if (hasConsole && (!config.silent)) {
  2933. console.error(("[Vue warn]: " + msg + trace));
  2934. }
  2935. };
  2936. tip = function (msg, vm) {
  2937. if (hasConsole && (!config.silent)) {
  2938. console.warn("[Vue tip]: " + msg + (
  2939. vm ? generateComponentTrace(vm) : ''
  2940. ));
  2941. }
  2942. };
  2943. formatComponentName = function (vm, includeFile) {
  2944. if (vm.$root === vm) {
  2945. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  2946. return ('') + vm.$options.__file
  2947. }
  2948. return '<Root>'
  2949. }
  2950. var options = typeof vm === 'function' && vm.cid != null
  2951. ? vm.options
  2952. : vm._isVue
  2953. ? vm.$options || vm.constructor.options
  2954. : vm;
  2955. var name = options.name || options._componentTag;
  2956. var file = options.__file;
  2957. if (!name && file) {
  2958. var match = file.match(/([^/\\]+)\.vue$/);
  2959. name = match && match[1];
  2960. }
  2961. return (
  2962. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  2963. (file && includeFile !== false ? (" at " + file) : '')
  2964. )
  2965. };
  2966. var repeat = function (str, n) {
  2967. var res = '';
  2968. while (n) {
  2969. if (n % 2 === 1) { res += str; }
  2970. if (n > 1) { str += str; }
  2971. n >>= 1;
  2972. }
  2973. return res
  2974. };
  2975. generateComponentTrace = function (vm) {
  2976. if (vm._isVue && vm.$parent) {
  2977. var tree = [];
  2978. var currentRecursiveSequence = 0;
  2979. while (vm && vm.$options.name !== 'PageBody') {
  2980. if (tree.length > 0) {
  2981. var last = tree[tree.length - 1];
  2982. if (last.constructor === vm.constructor) {
  2983. currentRecursiveSequence++;
  2984. vm = vm.$parent;
  2985. continue
  2986. } else if (currentRecursiveSequence > 0) {
  2987. tree[tree.length - 1] = [last, currentRecursiveSequence];
  2988. currentRecursiveSequence = 0;
  2989. }
  2990. }
  2991. !vm.$options.isReserved && tree.push(vm);
  2992. vm = vm.$parent;
  2993. }
  2994. return '\n\nfound in\n\n' + tree
  2995. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  2996. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  2997. : formatComponentName(vm))); })
  2998. .join('\n')
  2999. } else {
  3000. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3001. }
  3002. };
  3003. }
  3004. /* */
  3005. var uid = 0;
  3006. /**
  3007. * A dep is an observable that can have multiple
  3008. * directives subscribing to it.
  3009. */
  3010. var Dep = function Dep () {
  3011. this.id = uid++;
  3012. this.subs = [];
  3013. };
  3014. Dep.prototype.addSub = function addSub (sub) {
  3015. this.subs.push(sub);
  3016. };
  3017. Dep.prototype.removeSub = function removeSub (sub) {
  3018. remove(this.subs, sub);
  3019. };
  3020. Dep.prototype.depend = function depend () {
  3021. if (Dep.SharedObject.target) {
  3022. Dep.SharedObject.target.addDep(this);
  3023. }
  3024. };
  3025. Dep.prototype.notify = function notify () {
  3026. // stabilize the subscriber list first
  3027. var subs = this.subs.slice();
  3028. if ( true && !config.async) {
  3029. // subs aren't sorted in scheduler if not running async
  3030. // we need to sort them now to make sure they fire in correct
  3031. // order
  3032. subs.sort(function (a, b) { return a.id - b.id; });
  3033. }
  3034. for (var i = 0, l = subs.length; i < l; i++) {
  3035. subs[i].update();
  3036. }
  3037. };
  3038. // The current target watcher being evaluated.
  3039. // This is globally unique because only one watcher
  3040. // can be evaluated at a time.
  3041. // fixed by xxxxxx (nvue shared vuex)
  3042. /* eslint-disable no-undef */
  3043. Dep.SharedObject = {};
  3044. Dep.SharedObject.target = null;
  3045. Dep.SharedObject.targetStack = [];
  3046. function pushTarget (target) {
  3047. Dep.SharedObject.targetStack.push(target);
  3048. Dep.SharedObject.target = target;
  3049. Dep.target = target;
  3050. }
  3051. function popTarget () {
  3052. Dep.SharedObject.targetStack.pop();
  3053. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3054. Dep.target = Dep.SharedObject.target;
  3055. }
  3056. /* */
  3057. var VNode = function VNode (
  3058. tag,
  3059. data,
  3060. children,
  3061. text,
  3062. elm,
  3063. context,
  3064. componentOptions,
  3065. asyncFactory
  3066. ) {
  3067. this.tag = tag;
  3068. this.data = data;
  3069. this.children = children;
  3070. this.text = text;
  3071. this.elm = elm;
  3072. this.ns = undefined;
  3073. this.context = context;
  3074. this.fnContext = undefined;
  3075. this.fnOptions = undefined;
  3076. this.fnScopeId = undefined;
  3077. this.key = data && data.key;
  3078. this.componentOptions = componentOptions;
  3079. this.componentInstance = undefined;
  3080. this.parent = undefined;
  3081. this.raw = false;
  3082. this.isStatic = false;
  3083. this.isRootInsert = true;
  3084. this.isComment = false;
  3085. this.isCloned = false;
  3086. this.isOnce = false;
  3087. this.asyncFactory = asyncFactory;
  3088. this.asyncMeta = undefined;
  3089. this.isAsyncPlaceholder = false;
  3090. };
  3091. var prototypeAccessors = { child: { configurable: true } };
  3092. // DEPRECATED: alias for componentInstance for backwards compat.
  3093. /* istanbul ignore next */
  3094. prototypeAccessors.child.get = function () {
  3095. return this.componentInstance
  3096. };
  3097. Object.defineProperties( VNode.prototype, prototypeAccessors );
  3098. var createEmptyVNode = function (text) {
  3099. if ( text === void 0 ) text = '';
  3100. var node = new VNode();
  3101. node.text = text;
  3102. node.isComment = true;
  3103. return node
  3104. };
  3105. function createTextVNode (val) {
  3106. return new VNode(undefined, undefined, undefined, String(val))
  3107. }
  3108. // optimized shallow clone
  3109. // used for static nodes and slot nodes because they may be reused across
  3110. // multiple renders, cloning them avoids errors when DOM manipulations rely
  3111. // on their elm reference.
  3112. function cloneVNode (vnode) {
  3113. var cloned = new VNode(
  3114. vnode.tag,
  3115. vnode.data,
  3116. // #7975
  3117. // clone children array to avoid mutating original in case of cloning
  3118. // a child.
  3119. vnode.children && vnode.children.slice(),
  3120. vnode.text,
  3121. vnode.elm,
  3122. vnode.context,
  3123. vnode.componentOptions,
  3124. vnode.asyncFactory
  3125. );
  3126. cloned.ns = vnode.ns;
  3127. cloned.isStatic = vnode.isStatic;
  3128. cloned.key = vnode.key;
  3129. cloned.isComment = vnode.isComment;
  3130. cloned.fnContext = vnode.fnContext;
  3131. cloned.fnOptions = vnode.fnOptions;
  3132. cloned.fnScopeId = vnode.fnScopeId;
  3133. cloned.asyncMeta = vnode.asyncMeta;
  3134. cloned.isCloned = true;
  3135. return cloned
  3136. }
  3137. /*
  3138. * not type checking this file because flow doesn't play well with
  3139. * dynamically accessing methods on Array prototype
  3140. */
  3141. var arrayProto = Array.prototype;
  3142. var arrayMethods = Object.create(arrayProto);
  3143. var methodsToPatch = [
  3144. 'push',
  3145. 'pop',
  3146. 'shift',
  3147. 'unshift',
  3148. 'splice',
  3149. 'sort',
  3150. 'reverse'
  3151. ];
  3152. /**
  3153. * Intercept mutating methods and emit events
  3154. */
  3155. methodsToPatch.forEach(function (method) {
  3156. // cache original method
  3157. var original = arrayProto[method];
  3158. def(arrayMethods, method, function mutator () {
  3159. var args = [], len = arguments.length;
  3160. while ( len-- ) args[ len ] = arguments[ len ];
  3161. var result = original.apply(this, args);
  3162. var ob = this.__ob__;
  3163. var inserted;
  3164. switch (method) {
  3165. case 'push':
  3166. case 'unshift':
  3167. inserted = args;
  3168. break
  3169. case 'splice':
  3170. inserted = args.slice(2);
  3171. break
  3172. }
  3173. if (inserted) { ob.observeArray(inserted); }
  3174. // notify change
  3175. ob.dep.notify();
  3176. return result
  3177. });
  3178. });
  3179. /* */
  3180. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  3181. /**
  3182. * In some cases we may want to disable observation inside a component's
  3183. * update computation.
  3184. */
  3185. var shouldObserve = true;
  3186. function toggleObserving (value) {
  3187. shouldObserve = value;
  3188. }
  3189. /**
  3190. * Observer class that is attached to each observed
  3191. * object. Once attached, the observer converts the target
  3192. * object's property keys into getter/setters that
  3193. * collect dependencies and dispatch updates.
  3194. */
  3195. var Observer = function Observer (value) {
  3196. this.value = value;
  3197. this.dep = new Dep();
  3198. this.vmCount = 0;
  3199. def(value, '__ob__', this);
  3200. if (Array.isArray(value)) {
  3201. if (hasProto) {
  3202. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  3203. if(value.push !== value.__proto__.push){
  3204. copyAugment(value, arrayMethods, arrayKeys);
  3205. } else {
  3206. protoAugment(value, arrayMethods);
  3207. }
  3208. }
  3209. } else {
  3210. copyAugment(value, arrayMethods, arrayKeys);
  3211. }
  3212. this.observeArray(value);
  3213. } else {
  3214. this.walk(value);
  3215. }
  3216. };
  3217. /**
  3218. * Walk through all properties and convert them into
  3219. * getter/setters. This method should only be called when
  3220. * value type is Object.
  3221. */
  3222. Observer.prototype.walk = function walk (obj) {
  3223. var keys = Object.keys(obj);
  3224. for (var i = 0; i < keys.length; i++) {
  3225. defineReactive$$1(obj, keys[i]);
  3226. }
  3227. };
  3228. /**
  3229. * Observe a list of Array items.
  3230. */
  3231. Observer.prototype.observeArray = function observeArray (items) {
  3232. for (var i = 0, l = items.length; i < l; i++) {
  3233. observe(items[i]);
  3234. }
  3235. };
  3236. // helpers
  3237. /**
  3238. * Augment a target Object or Array by intercepting
  3239. * the prototype chain using __proto__
  3240. */
  3241. function protoAugment (target, src) {
  3242. /* eslint-disable no-proto */
  3243. target.__proto__ = src;
  3244. /* eslint-enable no-proto */
  3245. }
  3246. /**
  3247. * Augment a target Object or Array by defining
  3248. * hidden properties.
  3249. */
  3250. /* istanbul ignore next */
  3251. function copyAugment (target, src, keys) {
  3252. for (var i = 0, l = keys.length; i < l; i++) {
  3253. var key = keys[i];
  3254. def(target, key, src[key]);
  3255. }
  3256. }
  3257. /**
  3258. * Attempt to create an observer instance for a value,
  3259. * returns the new observer if successfully observed,
  3260. * or the existing observer if the value already has one.
  3261. */
  3262. function observe (value, asRootData) {
  3263. if (!isObject(value) || value instanceof VNode) {
  3264. return
  3265. }
  3266. var ob;
  3267. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  3268. ob = value.__ob__;
  3269. } else if (
  3270. shouldObserve &&
  3271. !isServerRendering() &&
  3272. (Array.isArray(value) || isPlainObject(value)) &&
  3273. Object.isExtensible(value) &&
  3274. !value._isVue
  3275. ) {
  3276. ob = new Observer(value);
  3277. }
  3278. if (asRootData && ob) {
  3279. ob.vmCount++;
  3280. }
  3281. return ob
  3282. }
  3283. /**
  3284. * Define a reactive property on an Object.
  3285. */
  3286. function defineReactive$$1 (
  3287. obj,
  3288. key,
  3289. val,
  3290. customSetter,
  3291. shallow
  3292. ) {
  3293. var dep = new Dep();
  3294. var property = Object.getOwnPropertyDescriptor(obj, key);
  3295. if (property && property.configurable === false) {
  3296. return
  3297. }
  3298. // cater for pre-defined getter/setters
  3299. var getter = property && property.get;
  3300. var setter = property && property.set;
  3301. if ((!getter || setter) && arguments.length === 2) {
  3302. val = obj[key];
  3303. }
  3304. var childOb = !shallow && observe(val);
  3305. Object.defineProperty(obj, key, {
  3306. enumerable: true,
  3307. configurable: true,
  3308. get: function reactiveGetter () {
  3309. var value = getter ? getter.call(obj) : val;
  3310. if (Dep.SharedObject.target) { // fixed by xxxxxx
  3311. dep.depend();
  3312. if (childOb) {
  3313. childOb.dep.depend();
  3314. if (Array.isArray(value)) {
  3315. dependArray(value);
  3316. }
  3317. }
  3318. }
  3319. return value
  3320. },
  3321. set: function reactiveSetter (newVal) {
  3322. var value = getter ? getter.call(obj) : val;
  3323. /* eslint-disable no-self-compare */
  3324. if (newVal === value || (newVal !== newVal && value !== value)) {
  3325. return
  3326. }
  3327. /* eslint-enable no-self-compare */
  3328. if ( true && customSetter) {
  3329. customSetter();
  3330. }
  3331. // #7981: for accessor properties without setter
  3332. if (getter && !setter) { return }
  3333. if (setter) {
  3334. setter.call(obj, newVal);
  3335. } else {
  3336. val = newVal;
  3337. }
  3338. childOb = !shallow && observe(newVal);
  3339. dep.notify();
  3340. }
  3341. });
  3342. }
  3343. /**
  3344. * Set a property on an object. Adds the new property and
  3345. * triggers change notification if the property doesn't
  3346. * already exist.
  3347. */
  3348. function set (target, key, val) {
  3349. if ( true &&
  3350. (isUndef(target) || isPrimitive(target))
  3351. ) {
  3352. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  3353. }
  3354. if (Array.isArray(target) && isValidArrayIndex(key)) {
  3355. target.length = Math.max(target.length, key);
  3356. target.splice(key, 1, val);
  3357. return val
  3358. }
  3359. if (key in target && !(key in Object.prototype)) {
  3360. target[key] = val;
  3361. return val
  3362. }
  3363. var ob = (target).__ob__;
  3364. if (target._isVue || (ob && ob.vmCount)) {
  3365. true && warn(
  3366. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  3367. 'at runtime - declare it upfront in the data option.'
  3368. );
  3369. return val
  3370. }
  3371. if (!ob) {
  3372. target[key] = val;
  3373. return val
  3374. }
  3375. defineReactive$$1(ob.value, key, val);
  3376. ob.dep.notify();
  3377. return val
  3378. }
  3379. /**
  3380. * Delete a property and trigger change if necessary.
  3381. */
  3382. function del (target, key) {
  3383. if ( true &&
  3384. (isUndef(target) || isPrimitive(target))
  3385. ) {
  3386. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  3387. }
  3388. if (Array.isArray(target) && isValidArrayIndex(key)) {
  3389. target.splice(key, 1);
  3390. return
  3391. }
  3392. var ob = (target).__ob__;
  3393. if (target._isVue || (ob && ob.vmCount)) {
  3394. true && warn(
  3395. 'Avoid deleting properties on a Vue instance or its root $data ' +
  3396. '- just set it to null.'
  3397. );
  3398. return
  3399. }
  3400. if (!hasOwn(target, key)) {
  3401. return
  3402. }
  3403. delete target[key];
  3404. if (!ob) {
  3405. return
  3406. }
  3407. ob.dep.notify();
  3408. }
  3409. /**
  3410. * Collect dependencies on array elements when the array is touched, since
  3411. * we cannot intercept array element access like property getters.
  3412. */
  3413. function dependArray (value) {
  3414. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  3415. e = value[i];
  3416. e && e.__ob__ && e.__ob__.dep.depend();
  3417. if (Array.isArray(e)) {
  3418. dependArray(e);
  3419. }
  3420. }
  3421. }
  3422. /* */
  3423. /**
  3424. * Option overwriting strategies are functions that handle
  3425. * how to merge a parent option value and a child option
  3426. * value into the final value.
  3427. */
  3428. var strats = config.optionMergeStrategies;
  3429. /**
  3430. * Options with restrictions
  3431. */
  3432. if (true) {
  3433. strats.el = strats.propsData = function (parent, child, vm, key) {
  3434. if (!vm) {
  3435. warn(
  3436. "option \"" + key + "\" can only be used during instance " +
  3437. 'creation with the `new` keyword.'
  3438. );
  3439. }
  3440. return defaultStrat(parent, child)
  3441. };
  3442. }
  3443. /**
  3444. * Helper that recursively merges two data objects together.
  3445. */
  3446. function mergeData (to, from) {
  3447. if (!from) { return to }
  3448. var key, toVal, fromVal;
  3449. var keys = hasSymbol
  3450. ? Reflect.ownKeys(from)
  3451. : Object.keys(from);
  3452. for (var i = 0; i < keys.length; i++) {
  3453. key = keys[i];
  3454. // in case the object is already observed...
  3455. if (key === '__ob__') { continue }
  3456. toVal = to[key];
  3457. fromVal = from[key];
  3458. if (!hasOwn(to, key)) {
  3459. set(to, key, fromVal);
  3460. } else if (
  3461. toVal !== fromVal &&
  3462. isPlainObject(toVal) &&
  3463. isPlainObject(fromVal)
  3464. ) {
  3465. mergeData(toVal, fromVal);
  3466. }
  3467. }
  3468. return to
  3469. }
  3470. /**
  3471. * Data
  3472. */
  3473. function mergeDataOrFn (
  3474. parentVal,
  3475. childVal,
  3476. vm
  3477. ) {
  3478. if (!vm) {
  3479. // in a Vue.extend merge, both should be functions
  3480. if (!childVal) {
  3481. return parentVal
  3482. }
  3483. if (!parentVal) {
  3484. return childVal
  3485. }
  3486. // when parentVal & childVal are both present,
  3487. // we need to return a function that returns the
  3488. // merged result of both functions... no need to
  3489. // check if parentVal is a function here because
  3490. // it has to be a function to pass previous merges.
  3491. return function mergedDataFn () {
  3492. return mergeData(
  3493. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  3494. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  3495. )
  3496. }
  3497. } else {
  3498. return function mergedInstanceDataFn () {
  3499. // instance merge
  3500. var instanceData = typeof childVal === 'function'
  3501. ? childVal.call(vm, vm)
  3502. : childVal;
  3503. var defaultData = typeof parentVal === 'function'
  3504. ? parentVal.call(vm, vm)
  3505. : parentVal;
  3506. if (instanceData) {
  3507. return mergeData(instanceData, defaultData)
  3508. } else {
  3509. return defaultData
  3510. }
  3511. }
  3512. }
  3513. }
  3514. strats.data = function (
  3515. parentVal,
  3516. childVal,
  3517. vm
  3518. ) {
  3519. if (!vm) {
  3520. if (childVal && typeof childVal !== 'function') {
  3521. true && warn(
  3522. 'The "data" option should be a function ' +
  3523. 'that returns a per-instance value in component ' +
  3524. 'definitions.',
  3525. vm
  3526. );
  3527. return parentVal
  3528. }
  3529. return mergeDataOrFn(parentVal, childVal)
  3530. }
  3531. return mergeDataOrFn(parentVal, childVal, vm)
  3532. };
  3533. /**
  3534. * Hooks and props are merged as arrays.
  3535. */
  3536. function mergeHook (
  3537. parentVal,
  3538. childVal
  3539. ) {
  3540. var res = childVal
  3541. ? parentVal
  3542. ? parentVal.concat(childVal)
  3543. : Array.isArray(childVal)
  3544. ? childVal
  3545. : [childVal]
  3546. : parentVal;
  3547. return res
  3548. ? dedupeHooks(res)
  3549. : res
  3550. }
  3551. function dedupeHooks (hooks) {
  3552. var res = [];
  3553. for (var i = 0; i < hooks.length; i++) {
  3554. if (res.indexOf(hooks[i]) === -1) {
  3555. res.push(hooks[i]);
  3556. }
  3557. }
  3558. return res
  3559. }
  3560. LIFECYCLE_HOOKS.forEach(function (hook) {
  3561. strats[hook] = mergeHook;
  3562. });
  3563. /**
  3564. * Assets
  3565. *
  3566. * When a vm is present (instance creation), we need to do
  3567. * a three-way merge between constructor options, instance
  3568. * options and parent options.
  3569. */
  3570. function mergeAssets (
  3571. parentVal,
  3572. childVal,
  3573. vm,
  3574. key
  3575. ) {
  3576. var res = Object.create(parentVal || null);
  3577. if (childVal) {
  3578. true && assertObjectType(key, childVal, vm);
  3579. return extend(res, childVal)
  3580. } else {
  3581. return res
  3582. }
  3583. }
  3584. ASSET_TYPES.forEach(function (type) {
  3585. strats[type + 's'] = mergeAssets;
  3586. });
  3587. /**
  3588. * Watchers.
  3589. *
  3590. * Watchers hashes should not overwrite one
  3591. * another, so we merge them as arrays.
  3592. */
  3593. strats.watch = function (
  3594. parentVal,
  3595. childVal,
  3596. vm,
  3597. key
  3598. ) {
  3599. // work around Firefox's Object.prototype.watch...
  3600. if (parentVal === nativeWatch) { parentVal = undefined; }
  3601. if (childVal === nativeWatch) { childVal = undefined; }
  3602. /* istanbul ignore if */
  3603. if (!childVal) { return Object.create(parentVal || null) }
  3604. if (true) {
  3605. assertObjectType(key, childVal, vm);
  3606. }
  3607. if (!parentVal) { return childVal }
  3608. var ret = {};
  3609. extend(ret, parentVal);
  3610. for (var key$1 in childVal) {
  3611. var parent = ret[key$1];
  3612. var child = childVal[key$1];
  3613. if (parent && !Array.isArray(parent)) {
  3614. parent = [parent];
  3615. }
  3616. ret[key$1] = parent
  3617. ? parent.concat(child)
  3618. : Array.isArray(child) ? child : [child];
  3619. }
  3620. return ret
  3621. };
  3622. /**
  3623. * Other object hashes.
  3624. */
  3625. strats.props =
  3626. strats.methods =
  3627. strats.inject =
  3628. strats.computed = function (
  3629. parentVal,
  3630. childVal,
  3631. vm,
  3632. key
  3633. ) {
  3634. if (childVal && "development" !== 'production') {
  3635. assertObjectType(key, childVal, vm);
  3636. }
  3637. if (!parentVal) { return childVal }
  3638. var ret = Object.create(null);
  3639. extend(ret, parentVal);
  3640. if (childVal) { extend(ret, childVal); }
  3641. return ret
  3642. };
  3643. strats.provide = mergeDataOrFn;
  3644. /**
  3645. * Default strategy.
  3646. */
  3647. var defaultStrat = function (parentVal, childVal) {
  3648. return childVal === undefined
  3649. ? parentVal
  3650. : childVal
  3651. };
  3652. /**
  3653. * Validate component names
  3654. */
  3655. function checkComponents (options) {
  3656. for (var key in options.components) {
  3657. validateComponentName(key);
  3658. }
  3659. }
  3660. function validateComponentName (name) {
  3661. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  3662. warn(
  3663. 'Invalid component name: "' + name + '". Component names ' +
  3664. 'should conform to valid custom element name in html5 specification.'
  3665. );
  3666. }
  3667. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  3668. warn(
  3669. 'Do not use built-in or reserved HTML elements as component ' +
  3670. 'id: ' + name
  3671. );
  3672. }
  3673. }
  3674. /**
  3675. * Ensure all props option syntax are normalized into the
  3676. * Object-based format.
  3677. */
  3678. function normalizeProps (options, vm) {
  3679. var props = options.props;
  3680. if (!props) { return }
  3681. var res = {};
  3682. var i, val, name;
  3683. if (Array.isArray(props)) {
  3684. i = props.length;
  3685. while (i--) {
  3686. val = props[i];
  3687. if (typeof val === 'string') {
  3688. name = camelize(val);
  3689. res[name] = { type: null };
  3690. } else if (true) {
  3691. warn('props must be strings when using array syntax.');
  3692. }
  3693. }
  3694. } else if (isPlainObject(props)) {
  3695. for (var key in props) {
  3696. val = props[key];
  3697. name = camelize(key);
  3698. res[name] = isPlainObject(val)
  3699. ? val
  3700. : { type: val };
  3701. }
  3702. } else if (true) {
  3703. warn(
  3704. "Invalid value for option \"props\": expected an Array or an Object, " +
  3705. "but got " + (toRawType(props)) + ".",
  3706. vm
  3707. );
  3708. }
  3709. options.props = res;
  3710. }
  3711. /**
  3712. * Normalize all injections into Object-based format
  3713. */
  3714. function normalizeInject (options, vm) {
  3715. var inject = options.inject;
  3716. if (!inject) { return }
  3717. var normalized = options.inject = {};
  3718. if (Array.isArray(inject)) {
  3719. for (var i = 0; i < inject.length; i++) {
  3720. normalized[inject[i]] = { from: inject[i] };
  3721. }
  3722. } else if (isPlainObject(inject)) {
  3723. for (var key in inject) {
  3724. var val = inject[key];
  3725. normalized[key] = isPlainObject(val)
  3726. ? extend({ from: key }, val)
  3727. : { from: val };
  3728. }
  3729. } else if (true) {
  3730. warn(
  3731. "Invalid value for option \"inject\": expected an Array or an Object, " +
  3732. "but got " + (toRawType(inject)) + ".",
  3733. vm
  3734. );
  3735. }
  3736. }
  3737. /**
  3738. * Normalize raw function directives into object format.
  3739. */
  3740. function normalizeDirectives (options) {
  3741. var dirs = options.directives;
  3742. if (dirs) {
  3743. for (var key in dirs) {
  3744. var def$$1 = dirs[key];
  3745. if (typeof def$$1 === 'function') {
  3746. dirs[key] = { bind: def$$1, update: def$$1 };
  3747. }
  3748. }
  3749. }
  3750. }
  3751. function assertObjectType (name, value, vm) {
  3752. if (!isPlainObject(value)) {
  3753. warn(
  3754. "Invalid value for option \"" + name + "\": expected an Object, " +
  3755. "but got " + (toRawType(value)) + ".",
  3756. vm
  3757. );
  3758. }
  3759. }
  3760. /**
  3761. * Merge two option objects into a new one.
  3762. * Core utility used in both instantiation and inheritance.
  3763. */
  3764. function mergeOptions (
  3765. parent,
  3766. child,
  3767. vm
  3768. ) {
  3769. if (true) {
  3770. checkComponents(child);
  3771. }
  3772. if (typeof child === 'function') {
  3773. child = child.options;
  3774. }
  3775. normalizeProps(child, vm);
  3776. normalizeInject(child, vm);
  3777. normalizeDirectives(child);
  3778. // Apply extends and mixins on the child options,
  3779. // but only if it is a raw options object that isn't
  3780. // the result of another mergeOptions call.
  3781. // Only merged options has the _base property.
  3782. if (!child._base) {
  3783. if (child.extends) {
  3784. parent = mergeOptions(parent, child.extends, vm);
  3785. }
  3786. if (child.mixins) {
  3787. for (var i = 0, l = child.mixins.length; i < l; i++) {
  3788. parent = mergeOptions(parent, child.mixins[i], vm);
  3789. }
  3790. }
  3791. }
  3792. var options = {};
  3793. var key;
  3794. for (key in parent) {
  3795. mergeField(key);
  3796. }
  3797. for (key in child) {
  3798. if (!hasOwn(parent, key)) {
  3799. mergeField(key);
  3800. }
  3801. }
  3802. function mergeField (key) {
  3803. var strat = strats[key] || defaultStrat;
  3804. options[key] = strat(parent[key], child[key], vm, key);
  3805. }
  3806. return options
  3807. }
  3808. /**
  3809. * Resolve an asset.
  3810. * This function is used because child instances need access
  3811. * to assets defined in its ancestor chain.
  3812. */
  3813. function resolveAsset (
  3814. options,
  3815. type,
  3816. id,
  3817. warnMissing
  3818. ) {
  3819. /* istanbul ignore if */
  3820. if (typeof id !== 'string') {
  3821. return
  3822. }
  3823. var assets = options[type];
  3824. // check local registration variations first
  3825. if (hasOwn(assets, id)) { return assets[id] }
  3826. var camelizedId = camelize(id);
  3827. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  3828. var PascalCaseId = capitalize(camelizedId);
  3829. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  3830. // fallback to prototype chain
  3831. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  3832. if ( true && warnMissing && !res) {
  3833. warn(
  3834. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  3835. options
  3836. );
  3837. }
  3838. return res
  3839. }
  3840. /* */
  3841. function validateProp (
  3842. key,
  3843. propOptions,
  3844. propsData,
  3845. vm
  3846. ) {
  3847. var prop = propOptions[key];
  3848. var absent = !hasOwn(propsData, key);
  3849. var value = propsData[key];
  3850. // boolean casting
  3851. var booleanIndex = getTypeIndex(Boolean, prop.type);
  3852. if (booleanIndex > -1) {
  3853. if (absent && !hasOwn(prop, 'default')) {
  3854. value = false;
  3855. } else if (value === '' || value === hyphenate(key)) {
  3856. // only cast empty string / same name to boolean if
  3857. // boolean has higher priority
  3858. var stringIndex = getTypeIndex(String, prop.type);
  3859. if (stringIndex < 0 || booleanIndex < stringIndex) {
  3860. value = true;
  3861. }
  3862. }
  3863. }
  3864. // check default value
  3865. if (value === undefined) {
  3866. value = getPropDefaultValue(vm, prop, key);
  3867. // since the default value is a fresh copy,
  3868. // make sure to observe it.
  3869. var prevShouldObserve = shouldObserve;
  3870. toggleObserving(true);
  3871. observe(value);
  3872. toggleObserving(prevShouldObserve);
  3873. }
  3874. if (
  3875. true
  3876. ) {
  3877. assertProp(prop, key, value, vm, absent);
  3878. }
  3879. return value
  3880. }
  3881. /**
  3882. * Get the default value of a prop.
  3883. */
  3884. function getPropDefaultValue (vm, prop, key) {
  3885. // no default, return undefined
  3886. if (!hasOwn(prop, 'default')) {
  3887. return undefined
  3888. }
  3889. var def = prop.default;
  3890. // warn against non-factory defaults for Object & Array
  3891. if ( true && isObject(def)) {
  3892. warn(
  3893. 'Invalid default value for prop "' + key + '": ' +
  3894. 'Props with type Object/Array must use a factory function ' +
  3895. 'to return the default value.',
  3896. vm
  3897. );
  3898. }
  3899. // the raw prop value was also undefined from previous render,
  3900. // return previous default value to avoid unnecessary watcher trigger
  3901. if (vm && vm.$options.propsData &&
  3902. vm.$options.propsData[key] === undefined &&
  3903. vm._props[key] !== undefined
  3904. ) {
  3905. return vm._props[key]
  3906. }
  3907. // call factory function for non-Function types
  3908. // a value is Function if its prototype is function even across different execution context
  3909. return typeof def === 'function' && getType(prop.type) !== 'Function'
  3910. ? def.call(vm)
  3911. : def
  3912. }
  3913. /**
  3914. * Assert whether a prop is valid.
  3915. */
  3916. function assertProp (
  3917. prop,
  3918. name,
  3919. value,
  3920. vm,
  3921. absent
  3922. ) {
  3923. if (prop.required && absent) {
  3924. warn(
  3925. 'Missing required prop: "' + name + '"',
  3926. vm
  3927. );
  3928. return
  3929. }
  3930. if (value == null && !prop.required) {
  3931. return
  3932. }
  3933. var type = prop.type;
  3934. var valid = !type || type === true;
  3935. var expectedTypes = [];
  3936. if (type) {
  3937. if (!Array.isArray(type)) {
  3938. type = [type];
  3939. }
  3940. for (var i = 0; i < type.length && !valid; i++) {
  3941. var assertedType = assertType(value, type[i]);
  3942. expectedTypes.push(assertedType.expectedType || '');
  3943. valid = assertedType.valid;
  3944. }
  3945. }
  3946. if (!valid) {
  3947. warn(
  3948. getInvalidTypeMessage(name, value, expectedTypes),
  3949. vm
  3950. );
  3951. return
  3952. }
  3953. var validator = prop.validator;
  3954. if (validator) {
  3955. if (!validator(value)) {
  3956. warn(
  3957. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  3958. vm
  3959. );
  3960. }
  3961. }
  3962. }
  3963. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  3964. function assertType (value, type) {
  3965. var valid;
  3966. var expectedType = getType(type);
  3967. if (simpleCheckRE.test(expectedType)) {
  3968. var t = typeof value;
  3969. valid = t === expectedType.toLowerCase();
  3970. // for primitive wrapper objects
  3971. if (!valid && t === 'object') {
  3972. valid = value instanceof type;
  3973. }
  3974. } else if (expectedType === 'Object') {
  3975. valid = isPlainObject(value);
  3976. } else if (expectedType === 'Array') {
  3977. valid = Array.isArray(value);
  3978. } else {
  3979. valid = value instanceof type;
  3980. }
  3981. return {
  3982. valid: valid,
  3983. expectedType: expectedType
  3984. }
  3985. }
  3986. /**
  3987. * Use function string name to check built-in types,
  3988. * because a simple equality check will fail when running
  3989. * across different vms / iframes.
  3990. */
  3991. function getType (fn) {
  3992. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  3993. return match ? match[1] : ''
  3994. }
  3995. function isSameType (a, b) {
  3996. return getType(a) === getType(b)
  3997. }
  3998. function getTypeIndex (type, expectedTypes) {
  3999. if (!Array.isArray(expectedTypes)) {
  4000. return isSameType(expectedTypes, type) ? 0 : -1
  4001. }
  4002. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4003. if (isSameType(expectedTypes[i], type)) {
  4004. return i
  4005. }
  4006. }
  4007. return -1
  4008. }
  4009. function getInvalidTypeMessage (name, value, expectedTypes) {
  4010. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4011. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4012. var expectedType = expectedTypes[0];
  4013. var receivedType = toRawType(value);
  4014. var expectedValue = styleValue(value, expectedType);
  4015. var receivedValue = styleValue(value, receivedType);
  4016. // check if we need to specify expected value
  4017. if (expectedTypes.length === 1 &&
  4018. isExplicable(expectedType) &&
  4019. !isBoolean(expectedType, receivedType)) {
  4020. message += " with value " + expectedValue;
  4021. }
  4022. message += ", got " + receivedType + " ";
  4023. // check if we need to specify received value
  4024. if (isExplicable(receivedType)) {
  4025. message += "with value " + receivedValue + ".";
  4026. }
  4027. return message
  4028. }
  4029. function styleValue (value, type) {
  4030. if (type === 'String') {
  4031. return ("\"" + value + "\"")
  4032. } else if (type === 'Number') {
  4033. return ("" + (Number(value)))
  4034. } else {
  4035. return ("" + value)
  4036. }
  4037. }
  4038. function isExplicable (value) {
  4039. var explicitTypes = ['string', 'number', 'boolean'];
  4040. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4041. }
  4042. function isBoolean () {
  4043. var args = [], len = arguments.length;
  4044. while ( len-- ) args[ len ] = arguments[ len ];
  4045. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4046. }
  4047. /* */
  4048. function handleError (err, vm, info) {
  4049. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4050. // See: https://github.com/vuejs/vuex/issues/1505
  4051. pushTarget();
  4052. try {
  4053. if (vm) {
  4054. var cur = vm;
  4055. while ((cur = cur.$parent)) {
  4056. var hooks = cur.$options.errorCaptured;
  4057. if (hooks) {
  4058. for (var i = 0; i < hooks.length; i++) {
  4059. try {
  4060. var capture = hooks[i].call(cur, err, vm, info) === false;
  4061. if (capture) { return }
  4062. } catch (e) {
  4063. globalHandleError(e, cur, 'errorCaptured hook');
  4064. }
  4065. }
  4066. }
  4067. }
  4068. }
  4069. globalHandleError(err, vm, info);
  4070. } finally {
  4071. popTarget();
  4072. }
  4073. }
  4074. function invokeWithErrorHandling (
  4075. handler,
  4076. context,
  4077. args,
  4078. vm,
  4079. info
  4080. ) {
  4081. var res;
  4082. try {
  4083. res = args ? handler.apply(context, args) : handler.call(context);
  4084. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4085. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4086. // issue #9511
  4087. // avoid catch triggering multiple times when nested calls
  4088. res._handled = true;
  4089. }
  4090. } catch (e) {
  4091. handleError(e, vm, info);
  4092. }
  4093. return res
  4094. }
  4095. function globalHandleError (err, vm, info) {
  4096. if (config.errorHandler) {
  4097. try {
  4098. return config.errorHandler.call(null, err, vm, info)
  4099. } catch (e) {
  4100. // if the user intentionally throws the original error in the handler,
  4101. // do not log it twice
  4102. if (e !== err) {
  4103. logError(e, null, 'config.errorHandler');
  4104. }
  4105. }
  4106. }
  4107. logError(err, vm, info);
  4108. }
  4109. function logError (err, vm, info) {
  4110. if (true) {
  4111. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  4112. }
  4113. /* istanbul ignore else */
  4114. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  4115. console.error(err);
  4116. } else {
  4117. throw err
  4118. }
  4119. }
  4120. /* */
  4121. var callbacks = [];
  4122. var pending = false;
  4123. function flushCallbacks () {
  4124. pending = false;
  4125. var copies = callbacks.slice(0);
  4126. callbacks.length = 0;
  4127. for (var i = 0; i < copies.length; i++) {
  4128. copies[i]();
  4129. }
  4130. }
  4131. // Here we have async deferring wrappers using microtasks.
  4132. // In 2.5 we used (macro) tasks (in combination with microtasks).
  4133. // However, it has subtle problems when state is changed right before repaint
  4134. // (e.g. #6813, out-in transitions).
  4135. // Also, using (macro) tasks in event handler would cause some weird behaviors
  4136. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  4137. // So we now use microtasks everywhere, again.
  4138. // A major drawback of this tradeoff is that there are some scenarios
  4139. // where microtasks have too high a priority and fire in between supposedly
  4140. // sequential events (e.g. #4521, #6690, which have workarounds)
  4141. // or even between bubbling of the same event (#6566).
  4142. var timerFunc;
  4143. // The nextTick behavior leverages the microtask queue, which can be accessed
  4144. // via either native Promise.then or MutationObserver.
  4145. // MutationObserver has wider support, however it is seriously bugged in
  4146. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  4147. // completely stops working after triggering a few times... so, if native
  4148. // Promise is available, we will use it:
  4149. /* istanbul ignore next, $flow-disable-line */
  4150. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  4151. var p = Promise.resolve();
  4152. timerFunc = function () {
  4153. p.then(flushCallbacks);
  4154. // In problematic UIWebViews, Promise.then doesn't completely break, but
  4155. // it can get stuck in a weird state where callbacks are pushed into the
  4156. // microtask queue but the queue isn't being flushed, until the browser
  4157. // needs to do some other work, e.g. handle a timer. Therefore we can
  4158. // "force" the microtask queue to be flushed by adding an empty timer.
  4159. if (isIOS) { setTimeout(noop); }
  4160. };
  4161. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  4162. isNative(MutationObserver) ||
  4163. // PhantomJS and iOS 7.x
  4164. MutationObserver.toString() === '[object MutationObserverConstructor]'
  4165. )) {
  4166. // Use MutationObserver where native Promise is not available,
  4167. // e.g. PhantomJS, iOS7, Android 4.4
  4168. // (#6466 MutationObserver is unreliable in IE11)
  4169. var counter = 1;
  4170. var observer = new MutationObserver(flushCallbacks);
  4171. var textNode = document.createTextNode(String(counter));
  4172. observer.observe(textNode, {
  4173. characterData: true
  4174. });
  4175. timerFunc = function () {
  4176. counter = (counter + 1) % 2;
  4177. textNode.data = String(counter);
  4178. };
  4179. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  4180. // Fallback to setImmediate.
  4181. // Technically it leverages the (macro) task queue,
  4182. // but it is still a better choice than setTimeout.
  4183. timerFunc = function () {
  4184. setImmediate(flushCallbacks);
  4185. };
  4186. } else {
  4187. // Fallback to setTimeout.
  4188. timerFunc = function () {
  4189. setTimeout(flushCallbacks, 0);
  4190. };
  4191. }
  4192. function nextTick (cb, ctx) {
  4193. var _resolve;
  4194. callbacks.push(function () {
  4195. if (cb) {
  4196. try {
  4197. cb.call(ctx);
  4198. } catch (e) {
  4199. handleError(e, ctx, 'nextTick');
  4200. }
  4201. } else if (_resolve) {
  4202. _resolve(ctx);
  4203. }
  4204. });
  4205. if (!pending) {
  4206. pending = true;
  4207. timerFunc();
  4208. }
  4209. // $flow-disable-line
  4210. if (!cb && typeof Promise !== 'undefined') {
  4211. return new Promise(function (resolve) {
  4212. _resolve = resolve;
  4213. })
  4214. }
  4215. }
  4216. /* */
  4217. /* not type checking this file because flow doesn't play well with Proxy */
  4218. var initProxy;
  4219. if (true) {
  4220. var allowedGlobals = makeMap(
  4221. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  4222. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  4223. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  4224. 'require' // for Webpack/Browserify
  4225. );
  4226. var warnNonPresent = function (target, key) {
  4227. warn(
  4228. "Property or method \"" + key + "\" is not defined on the instance but " +
  4229. 'referenced during render. Make sure that this property is reactive, ' +
  4230. 'either in the data option, or for class-based components, by ' +
  4231. 'initializing the property. ' +
  4232. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  4233. target
  4234. );
  4235. };
  4236. var warnReservedPrefix = function (target, key) {
  4237. warn(
  4238. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  4239. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  4240. 'prevent conflicts with Vue internals. ' +
  4241. 'See: https://vuejs.org/v2/api/#data',
  4242. target
  4243. );
  4244. };
  4245. var hasProxy =
  4246. typeof Proxy !== 'undefined' && isNative(Proxy);
  4247. if (hasProxy) {
  4248. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  4249. config.keyCodes = new Proxy(config.keyCodes, {
  4250. set: function set (target, key, value) {
  4251. if (isBuiltInModifier(key)) {
  4252. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  4253. return false
  4254. } else {
  4255. target[key] = value;
  4256. return true
  4257. }
  4258. }
  4259. });
  4260. }
  4261. var hasHandler = {
  4262. has: function has (target, key) {
  4263. var has = key in target;
  4264. var isAllowed = allowedGlobals(key) ||
  4265. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  4266. if (!has && !isAllowed) {
  4267. if (key in target.$data) { warnReservedPrefix(target, key); }
  4268. else { warnNonPresent(target, key); }
  4269. }
  4270. return has || !isAllowed
  4271. }
  4272. };
  4273. var getHandler = {
  4274. get: function get (target, key) {
  4275. if (typeof key === 'string' && !(key in target)) {
  4276. if (key in target.$data) { warnReservedPrefix(target, key); }
  4277. else { warnNonPresent(target, key); }
  4278. }
  4279. return target[key]
  4280. }
  4281. };
  4282. initProxy = function initProxy (vm) {
  4283. if (hasProxy) {
  4284. // determine which proxy handler to use
  4285. var options = vm.$options;
  4286. var handlers = options.render && options.render._withStripped
  4287. ? getHandler
  4288. : hasHandler;
  4289. vm._renderProxy = new Proxy(vm, handlers);
  4290. } else {
  4291. vm._renderProxy = vm;
  4292. }
  4293. };
  4294. }
  4295. /* */
  4296. var seenObjects = new _Set();
  4297. /**
  4298. * Recursively traverse an object to evoke all converted
  4299. * getters, so that every nested property inside the object
  4300. * is collected as a "deep" dependency.
  4301. */
  4302. function traverse (val) {
  4303. _traverse(val, seenObjects);
  4304. seenObjects.clear();
  4305. }
  4306. function _traverse (val, seen) {
  4307. var i, keys;
  4308. var isA = Array.isArray(val);
  4309. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  4310. return
  4311. }
  4312. if (val.__ob__) {
  4313. var depId = val.__ob__.dep.id;
  4314. if (seen.has(depId)) {
  4315. return
  4316. }
  4317. seen.add(depId);
  4318. }
  4319. if (isA) {
  4320. i = val.length;
  4321. while (i--) { _traverse(val[i], seen); }
  4322. } else {
  4323. keys = Object.keys(val);
  4324. i = keys.length;
  4325. while (i--) { _traverse(val[keys[i]], seen); }
  4326. }
  4327. }
  4328. var mark;
  4329. var measure;
  4330. if (true) {
  4331. var perf = inBrowser && window.performance;
  4332. /* istanbul ignore if */
  4333. if (
  4334. perf &&
  4335. perf.mark &&
  4336. perf.measure &&
  4337. perf.clearMarks &&
  4338. perf.clearMeasures
  4339. ) {
  4340. mark = function (tag) { return perf.mark(tag); };
  4341. measure = function (name, startTag, endTag) {
  4342. perf.measure(name, startTag, endTag);
  4343. perf.clearMarks(startTag);
  4344. perf.clearMarks(endTag);
  4345. // perf.clearMeasures(name)
  4346. };
  4347. }
  4348. }
  4349. /* */
  4350. var normalizeEvent = cached(function (name) {
  4351. var passive = name.charAt(0) === '&';
  4352. name = passive ? name.slice(1) : name;
  4353. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  4354. name = once$$1 ? name.slice(1) : name;
  4355. var capture = name.charAt(0) === '!';
  4356. name = capture ? name.slice(1) : name;
  4357. return {
  4358. name: name,
  4359. once: once$$1,
  4360. capture: capture,
  4361. passive: passive
  4362. }
  4363. });
  4364. function createFnInvoker (fns, vm) {
  4365. function invoker () {
  4366. var arguments$1 = arguments;
  4367. var fns = invoker.fns;
  4368. if (Array.isArray(fns)) {
  4369. var cloned = fns.slice();
  4370. for (var i = 0; i < cloned.length; i++) {
  4371. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  4372. }
  4373. } else {
  4374. // return handler return value for single handlers
  4375. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  4376. }
  4377. }
  4378. invoker.fns = fns;
  4379. return invoker
  4380. }
  4381. function updateListeners (
  4382. on,
  4383. oldOn,
  4384. add,
  4385. remove$$1,
  4386. createOnceHandler,
  4387. vm
  4388. ) {
  4389. var name, def$$1, cur, old, event;
  4390. for (name in on) {
  4391. def$$1 = cur = on[name];
  4392. old = oldOn[name];
  4393. event = normalizeEvent(name);
  4394. if (isUndef(cur)) {
  4395. true && warn(
  4396. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  4397. vm
  4398. );
  4399. } else if (isUndef(old)) {
  4400. if (isUndef(cur.fns)) {
  4401. cur = on[name] = createFnInvoker(cur, vm);
  4402. }
  4403. if (isTrue(event.once)) {
  4404. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  4405. }
  4406. add(event.name, cur, event.capture, event.passive, event.params);
  4407. } else if (cur !== old) {
  4408. old.fns = cur;
  4409. on[name] = old;
  4410. }
  4411. }
  4412. for (name in oldOn) {
  4413. if (isUndef(on[name])) {
  4414. event = normalizeEvent(name);
  4415. remove$$1(event.name, oldOn[name], event.capture);
  4416. }
  4417. }
  4418. }
  4419. /* */
  4420. /* */
  4421. // fixed by xxxxxx (mp properties)
  4422. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  4423. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  4424. if (isUndef(propOptions)) {
  4425. return res
  4426. }
  4427. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  4428. var attrs = data.attrs;
  4429. var props = data.props;
  4430. if (isDef(attrs) || isDef(props)) {
  4431. for (var key in propOptions) {
  4432. var altKey = hyphenate(key);
  4433. var result = checkProp(res, props, key, altKey, true) ||
  4434. checkProp(res, attrs, key, altKey, false);
  4435. // externalClass
  4436. if (
  4437. result &&
  4438. res[key] &&
  4439. externalClasses.indexOf(altKey) !== -1 &&
  4440. context[camelize(res[key])]
  4441. ) {
  4442. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  4443. res[key] = context[camelize(res[key])];
  4444. }
  4445. }
  4446. }
  4447. return res
  4448. }
  4449. function extractPropsFromVNodeData (
  4450. data,
  4451. Ctor,
  4452. tag,
  4453. context// fixed by xxxxxx
  4454. ) {
  4455. // we are only extracting raw values here.
  4456. // validation and default values are handled in the child
  4457. // component itself.
  4458. var propOptions = Ctor.options.props;
  4459. if (isUndef(propOptions)) {
  4460. // fixed by xxxxxx
  4461. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  4462. }
  4463. var res = {};
  4464. var attrs = data.attrs;
  4465. var props = data.props;
  4466. if (isDef(attrs) || isDef(props)) {
  4467. for (var key in propOptions) {
  4468. var altKey = hyphenate(key);
  4469. if (true) {
  4470. var keyInLowerCase = key.toLowerCase();
  4471. if (
  4472. key !== keyInLowerCase &&
  4473. attrs && hasOwn(attrs, keyInLowerCase)
  4474. ) {
  4475. tip(
  4476. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  4477. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  4478. " \"" + key + "\". " +
  4479. "Note that HTML attributes are case-insensitive and camelCased " +
  4480. "props need to use their kebab-case equivalents when using in-DOM " +
  4481. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  4482. );
  4483. }
  4484. }
  4485. checkProp(res, props, key, altKey, true) ||
  4486. checkProp(res, attrs, key, altKey, false);
  4487. }
  4488. }
  4489. // fixed by xxxxxx
  4490. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  4491. }
  4492. function checkProp (
  4493. res,
  4494. hash,
  4495. key,
  4496. altKey,
  4497. preserve
  4498. ) {
  4499. if (isDef(hash)) {
  4500. if (hasOwn(hash, key)) {
  4501. res[key] = hash[key];
  4502. if (!preserve) {
  4503. delete hash[key];
  4504. }
  4505. return true
  4506. } else if (hasOwn(hash, altKey)) {
  4507. res[key] = hash[altKey];
  4508. if (!preserve) {
  4509. delete hash[altKey];
  4510. }
  4511. return true
  4512. }
  4513. }
  4514. return false
  4515. }
  4516. /* */
  4517. // The template compiler attempts to minimize the need for normalization by
  4518. // statically analyzing the template at compile time.
  4519. //
  4520. // For plain HTML markup, normalization can be completely skipped because the
  4521. // generated render function is guaranteed to return Array<VNode>. There are
  4522. // two cases where extra normalization is needed:
  4523. // 1. When the children contains components - because a functional component
  4524. // may return an Array instead of a single root. In this case, just a simple
  4525. // normalization is needed - if any child is an Array, we flatten the whole
  4526. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  4527. // because functional components already normalize their own children.
  4528. function simpleNormalizeChildren (children) {
  4529. for (var i = 0; i < children.length; i++) {
  4530. if (Array.isArray(children[i])) {
  4531. return Array.prototype.concat.apply([], children)
  4532. }
  4533. }
  4534. return children
  4535. }
  4536. // 2. When the children contains constructs that always generated nested Arrays,
  4537. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  4538. // with hand-written render functions / JSX. In such cases a full normalization
  4539. // is needed to cater to all possible types of children values.
  4540. function normalizeChildren (children) {
  4541. return isPrimitive(children)
  4542. ? [createTextVNode(children)]
  4543. : Array.isArray(children)
  4544. ? normalizeArrayChildren(children)
  4545. : undefined
  4546. }
  4547. function isTextNode (node) {
  4548. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  4549. }
  4550. function normalizeArrayChildren (children, nestedIndex) {
  4551. var res = [];
  4552. var i, c, lastIndex, last;
  4553. for (i = 0; i < children.length; i++) {
  4554. c = children[i];
  4555. if (isUndef(c) || typeof c === 'boolean') { continue }
  4556. lastIndex = res.length - 1;
  4557. last = res[lastIndex];
  4558. // nested
  4559. if (Array.isArray(c)) {
  4560. if (c.length > 0) {
  4561. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  4562. // merge adjacent text nodes
  4563. if (isTextNode(c[0]) && isTextNode(last)) {
  4564. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  4565. c.shift();
  4566. }
  4567. res.push.apply(res, c);
  4568. }
  4569. } else if (isPrimitive(c)) {
  4570. if (isTextNode(last)) {
  4571. // merge adjacent text nodes
  4572. // this is necessary for SSR hydration because text nodes are
  4573. // essentially merged when rendered to HTML strings
  4574. res[lastIndex] = createTextVNode(last.text + c);
  4575. } else if (c !== '') {
  4576. // convert primitive to vnode
  4577. res.push(createTextVNode(c));
  4578. }
  4579. } else {
  4580. if (isTextNode(c) && isTextNode(last)) {
  4581. // merge adjacent text nodes
  4582. res[lastIndex] = createTextVNode(last.text + c.text);
  4583. } else {
  4584. // default key for nested array children (likely generated by v-for)
  4585. if (isTrue(children._isVList) &&
  4586. isDef(c.tag) &&
  4587. isUndef(c.key) &&
  4588. isDef(nestedIndex)) {
  4589. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  4590. }
  4591. res.push(c);
  4592. }
  4593. }
  4594. }
  4595. return res
  4596. }
  4597. /* */
  4598. function initProvide (vm) {
  4599. var provide = vm.$options.provide;
  4600. if (provide) {
  4601. vm._provided = typeof provide === 'function'
  4602. ? provide.call(vm)
  4603. : provide;
  4604. }
  4605. }
  4606. function initInjections (vm) {
  4607. var result = resolveInject(vm.$options.inject, vm);
  4608. if (result) {
  4609. toggleObserving(false);
  4610. Object.keys(result).forEach(function (key) {
  4611. /* istanbul ignore else */
  4612. if (true) {
  4613. defineReactive$$1(vm, key, result[key], function () {
  4614. warn(
  4615. "Avoid mutating an injected value directly since the changes will be " +
  4616. "overwritten whenever the provided component re-renders. " +
  4617. "injection being mutated: \"" + key + "\"",
  4618. vm
  4619. );
  4620. });
  4621. } else {}
  4622. });
  4623. toggleObserving(true);
  4624. }
  4625. }
  4626. function resolveInject (inject, vm) {
  4627. if (inject) {
  4628. // inject is :any because flow is not smart enough to figure out cached
  4629. var result = Object.create(null);
  4630. var keys = hasSymbol
  4631. ? Reflect.ownKeys(inject)
  4632. : Object.keys(inject);
  4633. for (var i = 0; i < keys.length; i++) {
  4634. var key = keys[i];
  4635. // #6574 in case the inject object is observed...
  4636. if (key === '__ob__') { continue }
  4637. var provideKey = inject[key].from;
  4638. var source = vm;
  4639. while (source) {
  4640. if (source._provided && hasOwn(source._provided, provideKey)) {
  4641. result[key] = source._provided[provideKey];
  4642. break
  4643. }
  4644. source = source.$parent;
  4645. }
  4646. if (!source) {
  4647. if ('default' in inject[key]) {
  4648. var provideDefault = inject[key].default;
  4649. result[key] = typeof provideDefault === 'function'
  4650. ? provideDefault.call(vm)
  4651. : provideDefault;
  4652. } else if (true) {
  4653. warn(("Injection \"" + key + "\" not found"), vm);
  4654. }
  4655. }
  4656. }
  4657. return result
  4658. }
  4659. }
  4660. /* */
  4661. /**
  4662. * Runtime helper for resolving raw children VNodes into a slot object.
  4663. */
  4664. function resolveSlots (
  4665. children,
  4666. context
  4667. ) {
  4668. if (!children || !children.length) {
  4669. return {}
  4670. }
  4671. var slots = {};
  4672. for (var i = 0, l = children.length; i < l; i++) {
  4673. var child = children[i];
  4674. var data = child.data;
  4675. // remove slot attribute if the node is resolved as a Vue slot node
  4676. if (data && data.attrs && data.attrs.slot) {
  4677. delete data.attrs.slot;
  4678. }
  4679. // named slots should only be respected if the vnode was rendered in the
  4680. // same context.
  4681. if ((child.context === context || child.fnContext === context) &&
  4682. data && data.slot != null
  4683. ) {
  4684. var name = data.slot;
  4685. var slot = (slots[name] || (slots[name] = []));
  4686. if (child.tag === 'template') {
  4687. slot.push.apply(slot, child.children || []);
  4688. } else {
  4689. slot.push(child);
  4690. }
  4691. } else {
  4692. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  4693. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  4694. (slots['page'] || (slots['page'] = [])).push(child);
  4695. }else{
  4696. (slots.default || (slots.default = [])).push(child);
  4697. }
  4698. }
  4699. }
  4700. // ignore slots that contains only whitespace
  4701. for (var name$1 in slots) {
  4702. if (slots[name$1].every(isWhitespace)) {
  4703. delete slots[name$1];
  4704. }
  4705. }
  4706. return slots
  4707. }
  4708. function isWhitespace (node) {
  4709. return (node.isComment && !node.asyncFactory) || node.text === ' '
  4710. }
  4711. /* */
  4712. function normalizeScopedSlots (
  4713. slots,
  4714. normalSlots,
  4715. prevSlots
  4716. ) {
  4717. var res;
  4718. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  4719. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  4720. var key = slots && slots.$key;
  4721. if (!slots) {
  4722. res = {};
  4723. } else if (slots._normalized) {
  4724. // fast path 1: child component re-render only, parent did not change
  4725. return slots._normalized
  4726. } else if (
  4727. isStable &&
  4728. prevSlots &&
  4729. prevSlots !== emptyObject &&
  4730. key === prevSlots.$key &&
  4731. !hasNormalSlots &&
  4732. !prevSlots.$hasNormal
  4733. ) {
  4734. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  4735. // only need to normalize once
  4736. return prevSlots
  4737. } else {
  4738. res = {};
  4739. for (var key$1 in slots) {
  4740. if (slots[key$1] && key$1[0] !== '$') {
  4741. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  4742. }
  4743. }
  4744. }
  4745. // expose normal slots on scopedSlots
  4746. for (var key$2 in normalSlots) {
  4747. if (!(key$2 in res)) {
  4748. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  4749. }
  4750. }
  4751. // avoriaz seems to mock a non-extensible $scopedSlots object
  4752. // and when that is passed down this would cause an error
  4753. if (slots && Object.isExtensible(slots)) {
  4754. (slots)._normalized = res;
  4755. }
  4756. def(res, '$stable', isStable);
  4757. def(res, '$key', key);
  4758. def(res, '$hasNormal', hasNormalSlots);
  4759. return res
  4760. }
  4761. function normalizeScopedSlot(normalSlots, key, fn) {
  4762. var normalized = function () {
  4763. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  4764. res = res && typeof res === 'object' && !Array.isArray(res)
  4765. ? [res] // single vnode
  4766. : normalizeChildren(res);
  4767. return res && (
  4768. res.length === 0 ||
  4769. (res.length === 1 && res[0].isComment) // #9658
  4770. ) ? undefined
  4771. : res
  4772. };
  4773. // this is a slot using the new v-slot syntax without scope. although it is
  4774. // compiled as a scoped slot, render fn users would expect it to be present
  4775. // on this.$slots because the usage is semantically a normal slot.
  4776. if (fn.proxy) {
  4777. Object.defineProperty(normalSlots, key, {
  4778. get: normalized,
  4779. enumerable: true,
  4780. configurable: true
  4781. });
  4782. }
  4783. return normalized
  4784. }
  4785. function proxyNormalSlot(slots, key) {
  4786. return function () { return slots[key]; }
  4787. }
  4788. /* */
  4789. /**
  4790. * Runtime helper for rendering v-for lists.
  4791. */
  4792. function renderList (
  4793. val,
  4794. render
  4795. ) {
  4796. var ret, i, l, keys, key;
  4797. if (Array.isArray(val) || typeof val === 'string') {
  4798. ret = new Array(val.length);
  4799. for (i = 0, l = val.length; i < l; i++) {
  4800. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  4801. }
  4802. } else if (typeof val === 'number') {
  4803. ret = new Array(val);
  4804. for (i = 0; i < val; i++) {
  4805. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  4806. }
  4807. } else if (isObject(val)) {
  4808. if (hasSymbol && val[Symbol.iterator]) {
  4809. ret = [];
  4810. var iterator = val[Symbol.iterator]();
  4811. var result = iterator.next();
  4812. while (!result.done) {
  4813. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  4814. result = iterator.next();
  4815. }
  4816. } else {
  4817. keys = Object.keys(val);
  4818. ret = new Array(keys.length);
  4819. for (i = 0, l = keys.length; i < l; i++) {
  4820. key = keys[i];
  4821. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  4822. }
  4823. }
  4824. }
  4825. if (!isDef(ret)) {
  4826. ret = [];
  4827. }
  4828. (ret)._isVList = true;
  4829. return ret
  4830. }
  4831. /* */
  4832. /**
  4833. * Runtime helper for rendering <slot>
  4834. */
  4835. function renderSlot (
  4836. name,
  4837. fallback,
  4838. props,
  4839. bindObject
  4840. ) {
  4841. var scopedSlotFn = this.$scopedSlots[name];
  4842. var nodes;
  4843. if (scopedSlotFn) { // scoped slot
  4844. props = props || {};
  4845. if (bindObject) {
  4846. if ( true && !isObject(bindObject)) {
  4847. warn(
  4848. 'slot v-bind without argument expects an Object',
  4849. this
  4850. );
  4851. }
  4852. props = extend(extend({}, bindObject), props);
  4853. }
  4854. // fixed by xxxxxx app-plus scopedSlot
  4855. nodes = scopedSlotFn(props, this, props._i) || fallback;
  4856. } else {
  4857. nodes = this.$slots[name] || fallback;
  4858. }
  4859. var target = props && props.slot;
  4860. if (target) {
  4861. return this.$createElement('template', { slot: target }, nodes)
  4862. } else {
  4863. return nodes
  4864. }
  4865. }
  4866. /* */
  4867. /**
  4868. * Runtime helper for resolving filters
  4869. */
  4870. function resolveFilter (id) {
  4871. return resolveAsset(this.$options, 'filters', id, true) || identity
  4872. }
  4873. /* */
  4874. function isKeyNotMatch (expect, actual) {
  4875. if (Array.isArray(expect)) {
  4876. return expect.indexOf(actual) === -1
  4877. } else {
  4878. return expect !== actual
  4879. }
  4880. }
  4881. /**
  4882. * Runtime helper for checking keyCodes from config.
  4883. * exposed as Vue.prototype._k
  4884. * passing in eventKeyName as last argument separately for backwards compat
  4885. */
  4886. function checkKeyCodes (
  4887. eventKeyCode,
  4888. key,
  4889. builtInKeyCode,
  4890. eventKeyName,
  4891. builtInKeyName
  4892. ) {
  4893. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  4894. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  4895. return isKeyNotMatch(builtInKeyName, eventKeyName)
  4896. } else if (mappedKeyCode) {
  4897. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  4898. } else if (eventKeyName) {
  4899. return hyphenate(eventKeyName) !== key
  4900. }
  4901. }
  4902. /* */
  4903. /**
  4904. * Runtime helper for merging v-bind="object" into a VNode's data.
  4905. */
  4906. function bindObjectProps (
  4907. data,
  4908. tag,
  4909. value,
  4910. asProp,
  4911. isSync
  4912. ) {
  4913. if (value) {
  4914. if (!isObject(value)) {
  4915. true && warn(
  4916. 'v-bind without argument expects an Object or Array value',
  4917. this
  4918. );
  4919. } else {
  4920. if (Array.isArray(value)) {
  4921. value = toObject(value);
  4922. }
  4923. var hash;
  4924. var loop = function ( key ) {
  4925. if (
  4926. key === 'class' ||
  4927. key === 'style' ||
  4928. isReservedAttribute(key)
  4929. ) {
  4930. hash = data;
  4931. } else {
  4932. var type = data.attrs && data.attrs.type;
  4933. hash = asProp || config.mustUseProp(tag, type, key)
  4934. ? data.domProps || (data.domProps = {})
  4935. : data.attrs || (data.attrs = {});
  4936. }
  4937. var camelizedKey = camelize(key);
  4938. var hyphenatedKey = hyphenate(key);
  4939. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  4940. hash[key] = value[key];
  4941. if (isSync) {
  4942. var on = data.on || (data.on = {});
  4943. on[("update:" + key)] = function ($event) {
  4944. value[key] = $event;
  4945. };
  4946. }
  4947. }
  4948. };
  4949. for (var key in value) loop( key );
  4950. }
  4951. }
  4952. return data
  4953. }
  4954. /* */
  4955. /**
  4956. * Runtime helper for rendering static trees.
  4957. */
  4958. function renderStatic (
  4959. index,
  4960. isInFor
  4961. ) {
  4962. var cached = this._staticTrees || (this._staticTrees = []);
  4963. var tree = cached[index];
  4964. // if has already-rendered static tree and not inside v-for,
  4965. // we can reuse the same tree.
  4966. if (tree && !isInFor) {
  4967. return tree
  4968. }
  4969. // otherwise, render a fresh tree.
  4970. tree = cached[index] = this.$options.staticRenderFns[index].call(
  4971. this._renderProxy,
  4972. null,
  4973. this // for render fns generated for functional component templates
  4974. );
  4975. markStatic(tree, ("__static__" + index), false);
  4976. return tree
  4977. }
  4978. /**
  4979. * Runtime helper for v-once.
  4980. * Effectively it means marking the node as static with a unique key.
  4981. */
  4982. function markOnce (
  4983. tree,
  4984. index,
  4985. key
  4986. ) {
  4987. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  4988. return tree
  4989. }
  4990. function markStatic (
  4991. tree,
  4992. key,
  4993. isOnce
  4994. ) {
  4995. if (Array.isArray(tree)) {
  4996. for (var i = 0; i < tree.length; i++) {
  4997. if (tree[i] && typeof tree[i] !== 'string') {
  4998. markStaticNode(tree[i], (key + "_" + i), isOnce);
  4999. }
  5000. }
  5001. } else {
  5002. markStaticNode(tree, key, isOnce);
  5003. }
  5004. }
  5005. function markStaticNode (node, key, isOnce) {
  5006. node.isStatic = true;
  5007. node.key = key;
  5008. node.isOnce = isOnce;
  5009. }
  5010. /* */
  5011. function bindObjectListeners (data, value) {
  5012. if (value) {
  5013. if (!isPlainObject(value)) {
  5014. true && warn(
  5015. 'v-on without argument expects an Object value',
  5016. this
  5017. );
  5018. } else {
  5019. var on = data.on = data.on ? extend({}, data.on) : {};
  5020. for (var key in value) {
  5021. var existing = on[key];
  5022. var ours = value[key];
  5023. on[key] = existing ? [].concat(existing, ours) : ours;
  5024. }
  5025. }
  5026. }
  5027. return data
  5028. }
  5029. /* */
  5030. function resolveScopedSlots (
  5031. fns, // see flow/vnode
  5032. res,
  5033. // the following are added in 2.6
  5034. hasDynamicKeys,
  5035. contentHashKey
  5036. ) {
  5037. res = res || { $stable: !hasDynamicKeys };
  5038. for (var i = 0; i < fns.length; i++) {
  5039. var slot = fns[i];
  5040. if (Array.isArray(slot)) {
  5041. resolveScopedSlots(slot, res, hasDynamicKeys);
  5042. } else if (slot) {
  5043. // marker for reverse proxying v-slot without scope on this.$slots
  5044. if (slot.proxy) {
  5045. slot.fn.proxy = true;
  5046. }
  5047. res[slot.key] = slot.fn;
  5048. }
  5049. }
  5050. if (contentHashKey) {
  5051. (res).$key = contentHashKey;
  5052. }
  5053. return res
  5054. }
  5055. /* */
  5056. function bindDynamicKeys (baseObj, values) {
  5057. for (var i = 0; i < values.length; i += 2) {
  5058. var key = values[i];
  5059. if (typeof key === 'string' && key) {
  5060. baseObj[values[i]] = values[i + 1];
  5061. } else if ( true && key !== '' && key !== null) {
  5062. // null is a special value for explicitly removing a binding
  5063. warn(
  5064. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5065. this
  5066. );
  5067. }
  5068. }
  5069. return baseObj
  5070. }
  5071. // helper to dynamically append modifier runtime markers to event names.
  5072. // ensure only append when value is already string, otherwise it will be cast
  5073. // to string and cause the type check to miss.
  5074. function prependModifier (value, symbol) {
  5075. return typeof value === 'string' ? symbol + value : value
  5076. }
  5077. /* */
  5078. function installRenderHelpers (target) {
  5079. target._o = markOnce;
  5080. target._n = toNumber;
  5081. target._s = toString;
  5082. target._l = renderList;
  5083. target._t = renderSlot;
  5084. target._q = looseEqual;
  5085. target._i = looseIndexOf;
  5086. target._m = renderStatic;
  5087. target._f = resolveFilter;
  5088. target._k = checkKeyCodes;
  5089. target._b = bindObjectProps;
  5090. target._v = createTextVNode;
  5091. target._e = createEmptyVNode;
  5092. target._u = resolveScopedSlots;
  5093. target._g = bindObjectListeners;
  5094. target._d = bindDynamicKeys;
  5095. target._p = prependModifier;
  5096. }
  5097. /* */
  5098. function FunctionalRenderContext (
  5099. data,
  5100. props,
  5101. children,
  5102. parent,
  5103. Ctor
  5104. ) {
  5105. var this$1 = this;
  5106. var options = Ctor.options;
  5107. // ensure the createElement function in functional components
  5108. // gets a unique context - this is necessary for correct named slot check
  5109. var contextVm;
  5110. if (hasOwn(parent, '_uid')) {
  5111. contextVm = Object.create(parent);
  5112. // $flow-disable-line
  5113. contextVm._original = parent;
  5114. } else {
  5115. // the context vm passed in is a functional context as well.
  5116. // in this case we want to make sure we are able to get a hold to the
  5117. // real context instance.
  5118. contextVm = parent;
  5119. // $flow-disable-line
  5120. parent = parent._original;
  5121. }
  5122. var isCompiled = isTrue(options._compiled);
  5123. var needNormalization = !isCompiled;
  5124. this.data = data;
  5125. this.props = props;
  5126. this.children = children;
  5127. this.parent = parent;
  5128. this.listeners = data.on || emptyObject;
  5129. this.injections = resolveInject(options.inject, parent);
  5130. this.slots = function () {
  5131. if (!this$1.$slots) {
  5132. normalizeScopedSlots(
  5133. data.scopedSlots,
  5134. this$1.$slots = resolveSlots(children, parent)
  5135. );
  5136. }
  5137. return this$1.$slots
  5138. };
  5139. Object.defineProperty(this, 'scopedSlots', ({
  5140. enumerable: true,
  5141. get: function get () {
  5142. return normalizeScopedSlots(data.scopedSlots, this.slots())
  5143. }
  5144. }));
  5145. // support for compiled functional template
  5146. if (isCompiled) {
  5147. // exposing $options for renderStatic()
  5148. this.$options = options;
  5149. // pre-resolve slots for renderSlot()
  5150. this.$slots = this.slots();
  5151. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  5152. }
  5153. if (options._scopeId) {
  5154. this._c = function (a, b, c, d) {
  5155. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  5156. if (vnode && !Array.isArray(vnode)) {
  5157. vnode.fnScopeId = options._scopeId;
  5158. vnode.fnContext = parent;
  5159. }
  5160. return vnode
  5161. };
  5162. } else {
  5163. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  5164. }
  5165. }
  5166. installRenderHelpers(FunctionalRenderContext.prototype);
  5167. function createFunctionalComponent (
  5168. Ctor,
  5169. propsData,
  5170. data,
  5171. contextVm,
  5172. children
  5173. ) {
  5174. var options = Ctor.options;
  5175. var props = {};
  5176. var propOptions = options.props;
  5177. if (isDef(propOptions)) {
  5178. for (var key in propOptions) {
  5179. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  5180. }
  5181. } else {
  5182. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  5183. if (isDef(data.props)) { mergeProps(props, data.props); }
  5184. }
  5185. var renderContext = new FunctionalRenderContext(
  5186. data,
  5187. props,
  5188. children,
  5189. contextVm,
  5190. Ctor
  5191. );
  5192. var vnode = options.render.call(null, renderContext._c, renderContext);
  5193. if (vnode instanceof VNode) {
  5194. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  5195. } else if (Array.isArray(vnode)) {
  5196. var vnodes = normalizeChildren(vnode) || [];
  5197. var res = new Array(vnodes.length);
  5198. for (var i = 0; i < vnodes.length; i++) {
  5199. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  5200. }
  5201. return res
  5202. }
  5203. }
  5204. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  5205. // #7817 clone node before setting fnContext, otherwise if the node is reused
  5206. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  5207. // that should not be matched to match.
  5208. var clone = cloneVNode(vnode);
  5209. clone.fnContext = contextVm;
  5210. clone.fnOptions = options;
  5211. if (true) {
  5212. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  5213. }
  5214. if (data.slot) {
  5215. (clone.data || (clone.data = {})).slot = data.slot;
  5216. }
  5217. return clone
  5218. }
  5219. function mergeProps (to, from) {
  5220. for (var key in from) {
  5221. to[camelize(key)] = from[key];
  5222. }
  5223. }
  5224. /* */
  5225. /* */
  5226. /* */
  5227. /* */
  5228. // inline hooks to be invoked on component VNodes during patch
  5229. var componentVNodeHooks = {
  5230. init: function init (vnode, hydrating) {
  5231. if (
  5232. vnode.componentInstance &&
  5233. !vnode.componentInstance._isDestroyed &&
  5234. vnode.data.keepAlive
  5235. ) {
  5236. // kept-alive components, treat as a patch
  5237. var mountedNode = vnode; // work around flow
  5238. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  5239. } else {
  5240. var child = vnode.componentInstance = createComponentInstanceForVnode(
  5241. vnode,
  5242. activeInstance
  5243. );
  5244. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  5245. }
  5246. },
  5247. prepatch: function prepatch (oldVnode, vnode) {
  5248. var options = vnode.componentOptions;
  5249. var child = vnode.componentInstance = oldVnode.componentInstance;
  5250. updateChildComponent(
  5251. child,
  5252. options.propsData, // updated props
  5253. options.listeners, // updated listeners
  5254. vnode, // new parent vnode
  5255. options.children // new children
  5256. );
  5257. },
  5258. insert: function insert (vnode) {
  5259. var context = vnode.context;
  5260. var componentInstance = vnode.componentInstance;
  5261. if (!componentInstance._isMounted) {
  5262. callHook(componentInstance, 'onServiceCreated');
  5263. callHook(componentInstance, 'onServiceAttached');
  5264. componentInstance._isMounted = true;
  5265. callHook(componentInstance, 'mounted');
  5266. }
  5267. if (vnode.data.keepAlive) {
  5268. if (context._isMounted) {
  5269. // vue-router#1212
  5270. // During updates, a kept-alive component's child components may
  5271. // change, so directly walking the tree here may call activated hooks
  5272. // on incorrect children. Instead we push them into a queue which will
  5273. // be processed after the whole patch process ended.
  5274. queueActivatedComponent(componentInstance);
  5275. } else {
  5276. activateChildComponent(componentInstance, true /* direct */);
  5277. }
  5278. }
  5279. },
  5280. destroy: function destroy (vnode) {
  5281. var componentInstance = vnode.componentInstance;
  5282. if (!componentInstance._isDestroyed) {
  5283. if (!vnode.data.keepAlive) {
  5284. componentInstance.$destroy();
  5285. } else {
  5286. deactivateChildComponent(componentInstance, true /* direct */);
  5287. }
  5288. }
  5289. }
  5290. };
  5291. var hooksToMerge = Object.keys(componentVNodeHooks);
  5292. function createComponent (
  5293. Ctor,
  5294. data,
  5295. context,
  5296. children,
  5297. tag
  5298. ) {
  5299. if (isUndef(Ctor)) {
  5300. return
  5301. }
  5302. var baseCtor = context.$options._base;
  5303. // plain options object: turn it into a constructor
  5304. if (isObject(Ctor)) {
  5305. Ctor = baseCtor.extend(Ctor);
  5306. }
  5307. // if at this stage it's not a constructor or an async component factory,
  5308. // reject.
  5309. if (typeof Ctor !== 'function') {
  5310. if (true) {
  5311. warn(("Invalid Component definition: " + (String(Ctor))), context);
  5312. }
  5313. return
  5314. }
  5315. // async component
  5316. var asyncFactory;
  5317. if (isUndef(Ctor.cid)) {
  5318. asyncFactory = Ctor;
  5319. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  5320. if (Ctor === undefined) {
  5321. // return a placeholder node for async component, which is rendered
  5322. // as a comment node but preserves all the raw information for the node.
  5323. // the information will be used for async server-rendering and hydration.
  5324. return createAsyncPlaceholder(
  5325. asyncFactory,
  5326. data,
  5327. context,
  5328. children,
  5329. tag
  5330. )
  5331. }
  5332. }
  5333. data = data || {};
  5334. // resolve constructor options in case global mixins are applied after
  5335. // component constructor creation
  5336. resolveConstructorOptions(Ctor);
  5337. // transform component v-model data into props & events
  5338. if (isDef(data.model)) {
  5339. transformModel(Ctor.options, data);
  5340. }
  5341. // extract props
  5342. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  5343. // functional component
  5344. if (isTrue(Ctor.options.functional)) {
  5345. return createFunctionalComponent(Ctor, propsData, data, context, children)
  5346. }
  5347. // extract listeners, since these needs to be treated as
  5348. // child component listeners instead of DOM listeners
  5349. var listeners = data.on;
  5350. // replace with listeners with .native modifier
  5351. // so it gets processed during parent component patch.
  5352. data.on = data.nativeOn;
  5353. if (isTrue(Ctor.options.abstract)) {
  5354. // abstract components do not keep anything
  5355. // other than props & listeners & slot
  5356. // work around flow
  5357. var slot = data.slot;
  5358. data = {};
  5359. if (slot) {
  5360. data.slot = slot;
  5361. }
  5362. }
  5363. // install component management hooks onto the placeholder node
  5364. installComponentHooks(data);
  5365. // return a placeholder vnode
  5366. var name = Ctor.options.name || tag;
  5367. var vnode = new VNode(
  5368. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  5369. data, undefined, undefined, undefined, context,
  5370. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  5371. asyncFactory
  5372. );
  5373. return vnode
  5374. }
  5375. function createComponentInstanceForVnode (
  5376. vnode, // we know it's MountedComponentVNode but flow doesn't
  5377. parent // activeInstance in lifecycle state
  5378. ) {
  5379. var options = {
  5380. _isComponent: true,
  5381. _parentVnode: vnode,
  5382. parent: parent
  5383. };
  5384. // check inline-template render functions
  5385. var inlineTemplate = vnode.data.inlineTemplate;
  5386. if (isDef(inlineTemplate)) {
  5387. options.render = inlineTemplate.render;
  5388. options.staticRenderFns = inlineTemplate.staticRenderFns;
  5389. }
  5390. return new vnode.componentOptions.Ctor(options)
  5391. }
  5392. function installComponentHooks (data) {
  5393. var hooks = data.hook || (data.hook = {});
  5394. for (var i = 0; i < hooksToMerge.length; i++) {
  5395. var key = hooksToMerge[i];
  5396. var existing = hooks[key];
  5397. var toMerge = componentVNodeHooks[key];
  5398. if (existing !== toMerge && !(existing && existing._merged)) {
  5399. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  5400. }
  5401. }
  5402. }
  5403. function mergeHook$1 (f1, f2) {
  5404. var merged = function (a, b) {
  5405. // flow complains about extra args which is why we use any
  5406. f1(a, b);
  5407. f2(a, b);
  5408. };
  5409. merged._merged = true;
  5410. return merged
  5411. }
  5412. // transform component v-model info (value and callback) into
  5413. // prop and event handler respectively.
  5414. function transformModel (options, data) {
  5415. var prop = (options.model && options.model.prop) || 'value';
  5416. var event = (options.model && options.model.event) || 'input'
  5417. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  5418. var on = data.on || (data.on = {});
  5419. var existing = on[event];
  5420. var callback = data.model.callback;
  5421. if (isDef(existing)) {
  5422. if (
  5423. Array.isArray(existing)
  5424. ? existing.indexOf(callback) === -1
  5425. : existing !== callback
  5426. ) {
  5427. on[event] = [callback].concat(existing);
  5428. }
  5429. } else {
  5430. on[event] = callback;
  5431. }
  5432. }
  5433. /* */
  5434. var SIMPLE_NORMALIZE = 1;
  5435. var ALWAYS_NORMALIZE = 2;
  5436. // wrapper function for providing a more flexible interface
  5437. // without getting yelled at by flow
  5438. function createElement (
  5439. context,
  5440. tag,
  5441. data,
  5442. children,
  5443. normalizationType,
  5444. alwaysNormalize
  5445. ) {
  5446. if (Array.isArray(data) || isPrimitive(data)) {
  5447. normalizationType = children;
  5448. children = data;
  5449. data = undefined;
  5450. }
  5451. if (isTrue(alwaysNormalize)) {
  5452. normalizationType = ALWAYS_NORMALIZE;
  5453. }
  5454. return _createElement(context, tag, data, children, normalizationType)
  5455. }
  5456. function _createElement (
  5457. context,
  5458. tag,
  5459. data,
  5460. children,
  5461. normalizationType
  5462. ) {
  5463. if (isDef(data) && isDef((data).__ob__)) {
  5464. true && warn(
  5465. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  5466. 'Always create fresh vnode data objects in each render!',
  5467. context
  5468. );
  5469. return createEmptyVNode()
  5470. }
  5471. // object syntax in v-bind
  5472. if (isDef(data) && isDef(data.is)) {
  5473. tag = data.is;
  5474. }
  5475. if (!tag) {
  5476. // in case of component :is set to falsy value
  5477. return createEmptyVNode()
  5478. }
  5479. // warn against non-primitive key
  5480. if ( true &&
  5481. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  5482. ) {
  5483. {
  5484. warn(
  5485. 'Avoid using non-primitive value as key, ' +
  5486. 'use string/number value instead.',
  5487. context
  5488. );
  5489. }
  5490. }
  5491. // support single function children as default scoped slot
  5492. if (Array.isArray(children) &&
  5493. typeof children[0] === 'function'
  5494. ) {
  5495. data = data || {};
  5496. data.scopedSlots = { default: children[0] };
  5497. children.length = 0;
  5498. }
  5499. if (normalizationType === ALWAYS_NORMALIZE) {
  5500. children = normalizeChildren(children);
  5501. } else if (normalizationType === SIMPLE_NORMALIZE) {
  5502. children = simpleNormalizeChildren(children);
  5503. }
  5504. var vnode, ns;
  5505. if (typeof tag === 'string') {
  5506. var Ctor;
  5507. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  5508. if (config.isReservedTag(tag)) {
  5509. // platform built-in elements
  5510. if ( true && isDef(data) && isDef(data.nativeOn)) {
  5511. warn(
  5512. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  5513. context
  5514. );
  5515. }
  5516. vnode = new VNode(
  5517. config.parsePlatformTagName(tag), data, children,
  5518. undefined, undefined, context
  5519. );
  5520. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  5521. // component
  5522. vnode = createComponent(Ctor, data, context, children, tag);
  5523. } else {
  5524. // unknown or unlisted namespaced elements
  5525. // check at runtime because it may get assigned a namespace when its
  5526. // parent normalizes children
  5527. vnode = new VNode(
  5528. tag, data, children,
  5529. undefined, undefined, context
  5530. );
  5531. }
  5532. } else {
  5533. // direct component options / constructor
  5534. vnode = createComponent(tag, data, context, children);
  5535. }
  5536. if (Array.isArray(vnode)) {
  5537. return vnode
  5538. } else if (isDef(vnode)) {
  5539. if (isDef(ns)) { applyNS(vnode, ns); }
  5540. if (isDef(data)) { registerDeepBindings(data); }
  5541. return vnode
  5542. } else {
  5543. return createEmptyVNode()
  5544. }
  5545. }
  5546. function applyNS (vnode, ns, force) {
  5547. vnode.ns = ns;
  5548. if (vnode.tag === 'foreignObject') {
  5549. // use default namespace inside foreignObject
  5550. ns = undefined;
  5551. force = true;
  5552. }
  5553. if (isDef(vnode.children)) {
  5554. for (var i = 0, l = vnode.children.length; i < l; i++) {
  5555. var child = vnode.children[i];
  5556. if (isDef(child.tag) && (
  5557. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  5558. applyNS(child, ns, force);
  5559. }
  5560. }
  5561. }
  5562. }
  5563. // ref #5318
  5564. // necessary to ensure parent re-render when deep bindings like :style and
  5565. // :class are used on slot nodes
  5566. function registerDeepBindings (data) {
  5567. if (isObject(data.style)) {
  5568. traverse(data.style);
  5569. }
  5570. if (isObject(data.class)) {
  5571. traverse(data.class);
  5572. }
  5573. }
  5574. /* */
  5575. function initRender (vm) {
  5576. vm._vnode = null; // the root of the child tree
  5577. vm._staticTrees = null; // v-once cached trees
  5578. var options = vm.$options;
  5579. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  5580. var renderContext = parentVnode && parentVnode.context;
  5581. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  5582. vm.$scopedSlots = emptyObject;
  5583. // bind the createElement fn to this instance
  5584. // so that we get proper render context inside it.
  5585. // args order: tag, data, children, normalizationType, alwaysNormalize
  5586. // internal version is used by render functions compiled from templates
  5587. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  5588. // normalization is always applied for the public version, used in
  5589. // user-written render functions.
  5590. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  5591. // $attrs & $listeners are exposed for easier HOC creation.
  5592. // they need to be reactive so that HOCs using them are always updated
  5593. var parentData = parentVnode && parentVnode.data;
  5594. /* istanbul ignore else */
  5595. if (true) {
  5596. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  5597. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  5598. }, true);
  5599. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  5600. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  5601. }, true);
  5602. } else {}
  5603. }
  5604. var currentRenderingInstance = null;
  5605. function renderMixin (Vue) {
  5606. // install runtime convenience helpers
  5607. installRenderHelpers(Vue.prototype);
  5608. Vue.prototype.$nextTick = function (fn) {
  5609. return nextTick(fn, this)
  5610. };
  5611. Vue.prototype._render = function () {
  5612. var vm = this;
  5613. var ref = vm.$options;
  5614. var render = ref.render;
  5615. var _parentVnode = ref._parentVnode;
  5616. if (_parentVnode) {
  5617. vm.$scopedSlots = normalizeScopedSlots(
  5618. _parentVnode.data.scopedSlots,
  5619. vm.$slots,
  5620. vm.$scopedSlots
  5621. );
  5622. }
  5623. // set parent vnode. this allows render functions to have access
  5624. // to the data on the placeholder node.
  5625. vm.$vnode = _parentVnode;
  5626. // render self
  5627. var vnode;
  5628. try {
  5629. // There's no need to maintain a stack because all render fns are called
  5630. // separately from one another. Nested component's render fns are called
  5631. // when parent component is patched.
  5632. currentRenderingInstance = vm;
  5633. vnode = render.call(vm._renderProxy, vm.$createElement);
  5634. } catch (e) {
  5635. handleError(e, vm, "render");
  5636. // return error render result,
  5637. // or previous vnode to prevent render error causing blank component
  5638. /* istanbul ignore else */
  5639. if ( true && vm.$options.renderError) {
  5640. try {
  5641. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  5642. } catch (e) {
  5643. handleError(e, vm, "renderError");
  5644. vnode = vm._vnode;
  5645. }
  5646. } else {
  5647. vnode = vm._vnode;
  5648. }
  5649. } finally {
  5650. currentRenderingInstance = null;
  5651. }
  5652. // if the returned array contains only a single node, allow it
  5653. if (Array.isArray(vnode) && vnode.length === 1) {
  5654. vnode = vnode[0];
  5655. }
  5656. // return empty vnode in case the render function errored out
  5657. if (!(vnode instanceof VNode)) {
  5658. if ( true && Array.isArray(vnode)) {
  5659. warn(
  5660. 'Multiple root nodes returned from render function. Render function ' +
  5661. 'should return a single root node.',
  5662. vm
  5663. );
  5664. }
  5665. vnode = createEmptyVNode();
  5666. }
  5667. // set parent
  5668. vnode.parent = _parentVnode;
  5669. return vnode
  5670. };
  5671. }
  5672. /* */
  5673. function ensureCtor (comp, base) {
  5674. if (
  5675. comp.__esModule ||
  5676. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  5677. ) {
  5678. comp = comp.default;
  5679. }
  5680. return isObject(comp)
  5681. ? base.extend(comp)
  5682. : comp
  5683. }
  5684. function createAsyncPlaceholder (
  5685. factory,
  5686. data,
  5687. context,
  5688. children,
  5689. tag
  5690. ) {
  5691. var node = createEmptyVNode();
  5692. node.asyncFactory = factory;
  5693. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  5694. return node
  5695. }
  5696. function resolveAsyncComponent (
  5697. factory,
  5698. baseCtor
  5699. ) {
  5700. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  5701. return factory.errorComp
  5702. }
  5703. if (isDef(factory.resolved)) {
  5704. return factory.resolved
  5705. }
  5706. var owner = currentRenderingInstance;
  5707. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  5708. // already pending
  5709. factory.owners.push(owner);
  5710. }
  5711. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  5712. return factory.loadingComp
  5713. }
  5714. if (owner && !isDef(factory.owners)) {
  5715. var owners = factory.owners = [owner];
  5716. var sync = true;
  5717. var timerLoading = null;
  5718. var timerTimeout = null
  5719. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  5720. var forceRender = function (renderCompleted) {
  5721. for (var i = 0, l = owners.length; i < l; i++) {
  5722. (owners[i]).$forceUpdate();
  5723. }
  5724. if (renderCompleted) {
  5725. owners.length = 0;
  5726. if (timerLoading !== null) {
  5727. clearTimeout(timerLoading);
  5728. timerLoading = null;
  5729. }
  5730. if (timerTimeout !== null) {
  5731. clearTimeout(timerTimeout);
  5732. timerTimeout = null;
  5733. }
  5734. }
  5735. };
  5736. var resolve = once(function (res) {
  5737. // cache resolved
  5738. factory.resolved = ensureCtor(res, baseCtor);
  5739. // invoke callbacks only if this is not a synchronous resolve
  5740. // (async resolves are shimmed as synchronous during SSR)
  5741. if (!sync) {
  5742. forceRender(true);
  5743. } else {
  5744. owners.length = 0;
  5745. }
  5746. });
  5747. var reject = once(function (reason) {
  5748. true && warn(
  5749. "Failed to resolve async component: " + (String(factory)) +
  5750. (reason ? ("\nReason: " + reason) : '')
  5751. );
  5752. if (isDef(factory.errorComp)) {
  5753. factory.error = true;
  5754. forceRender(true);
  5755. }
  5756. });
  5757. var res = factory(resolve, reject);
  5758. if (isObject(res)) {
  5759. if (isPromise(res)) {
  5760. // () => Promise
  5761. if (isUndef(factory.resolved)) {
  5762. res.then(resolve, reject);
  5763. }
  5764. } else if (isPromise(res.component)) {
  5765. res.component.then(resolve, reject);
  5766. if (isDef(res.error)) {
  5767. factory.errorComp = ensureCtor(res.error, baseCtor);
  5768. }
  5769. if (isDef(res.loading)) {
  5770. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  5771. if (res.delay === 0) {
  5772. factory.loading = true;
  5773. } else {
  5774. timerLoading = setTimeout(function () {
  5775. timerLoading = null;
  5776. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  5777. factory.loading = true;
  5778. forceRender(false);
  5779. }
  5780. }, res.delay || 200);
  5781. }
  5782. }
  5783. if (isDef(res.timeout)) {
  5784. timerTimeout = setTimeout(function () {
  5785. timerTimeout = null;
  5786. if (isUndef(factory.resolved)) {
  5787. reject(
  5788. true
  5789. ? ("timeout (" + (res.timeout) + "ms)")
  5790. : undefined
  5791. );
  5792. }
  5793. }, res.timeout);
  5794. }
  5795. }
  5796. }
  5797. sync = false;
  5798. // return in case resolved synchronously
  5799. return factory.loading
  5800. ? factory.loadingComp
  5801. : factory.resolved
  5802. }
  5803. }
  5804. /* */
  5805. function isAsyncPlaceholder (node) {
  5806. return node.isComment && node.asyncFactory
  5807. }
  5808. /* */
  5809. function getFirstComponentChild (children) {
  5810. if (Array.isArray(children)) {
  5811. for (var i = 0; i < children.length; i++) {
  5812. var c = children[i];
  5813. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  5814. return c
  5815. }
  5816. }
  5817. }
  5818. }
  5819. /* */
  5820. /* */
  5821. function initEvents (vm) {
  5822. vm._events = Object.create(null);
  5823. vm._hasHookEvent = false;
  5824. // init parent attached events
  5825. var listeners = vm.$options._parentListeners;
  5826. if (listeners) {
  5827. updateComponentListeners(vm, listeners);
  5828. }
  5829. }
  5830. var target;
  5831. function add (event, fn) {
  5832. target.$on(event, fn);
  5833. }
  5834. function remove$1 (event, fn) {
  5835. target.$off(event, fn);
  5836. }
  5837. function createOnceHandler (event, fn) {
  5838. var _target = target;
  5839. return function onceHandler () {
  5840. var res = fn.apply(null, arguments);
  5841. if (res !== null) {
  5842. _target.$off(event, onceHandler);
  5843. }
  5844. }
  5845. }
  5846. function updateComponentListeners (
  5847. vm,
  5848. listeners,
  5849. oldListeners
  5850. ) {
  5851. target = vm;
  5852. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  5853. target = undefined;
  5854. }
  5855. function eventsMixin (Vue) {
  5856. var hookRE = /^hook:/;
  5857. Vue.prototype.$on = function (event, fn) {
  5858. var vm = this;
  5859. if (Array.isArray(event)) {
  5860. for (var i = 0, l = event.length; i < l; i++) {
  5861. vm.$on(event[i], fn);
  5862. }
  5863. } else {
  5864. (vm._events[event] || (vm._events[event] = [])).push(fn);
  5865. // optimize hook:event cost by using a boolean flag marked at registration
  5866. // instead of a hash lookup
  5867. if (hookRE.test(event)) {
  5868. vm._hasHookEvent = true;
  5869. }
  5870. }
  5871. return vm
  5872. };
  5873. Vue.prototype.$once = function (event, fn) {
  5874. var vm = this;
  5875. function on () {
  5876. vm.$off(event, on);
  5877. fn.apply(vm, arguments);
  5878. }
  5879. on.fn = fn;
  5880. vm.$on(event, on);
  5881. return vm
  5882. };
  5883. Vue.prototype.$off = function (event, fn) {
  5884. var vm = this;
  5885. // all
  5886. if (!arguments.length) {
  5887. vm._events = Object.create(null);
  5888. return vm
  5889. }
  5890. // array of events
  5891. if (Array.isArray(event)) {
  5892. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  5893. vm.$off(event[i$1], fn);
  5894. }
  5895. return vm
  5896. }
  5897. // specific event
  5898. var cbs = vm._events[event];
  5899. if (!cbs) {
  5900. return vm
  5901. }
  5902. if (!fn) {
  5903. vm._events[event] = null;
  5904. return vm
  5905. }
  5906. // specific handler
  5907. var cb;
  5908. var i = cbs.length;
  5909. while (i--) {
  5910. cb = cbs[i];
  5911. if (cb === fn || cb.fn === fn) {
  5912. cbs.splice(i, 1);
  5913. break
  5914. }
  5915. }
  5916. return vm
  5917. };
  5918. Vue.prototype.$emit = function (event) {
  5919. var vm = this;
  5920. if (true) {
  5921. var lowerCaseEvent = event.toLowerCase();
  5922. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  5923. tip(
  5924. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  5925. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  5926. "Note that HTML attributes are case-insensitive and you cannot use " +
  5927. "v-on to listen to camelCase events when using in-DOM templates. " +
  5928. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  5929. );
  5930. }
  5931. }
  5932. var cbs = vm._events[event];
  5933. if (cbs) {
  5934. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  5935. var args = toArray(arguments, 1);
  5936. var info = "event handler for \"" + event + "\"";
  5937. for (var i = 0, l = cbs.length; i < l; i++) {
  5938. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  5939. }
  5940. }
  5941. return vm
  5942. };
  5943. }
  5944. /* */
  5945. var activeInstance = null;
  5946. var isUpdatingChildComponent = false;
  5947. function setActiveInstance(vm) {
  5948. var prevActiveInstance = activeInstance;
  5949. activeInstance = vm;
  5950. return function () {
  5951. activeInstance = prevActiveInstance;
  5952. }
  5953. }
  5954. function initLifecycle (vm) {
  5955. var options = vm.$options;
  5956. // locate first non-abstract parent
  5957. var parent = options.parent;
  5958. if (parent && !options.abstract) {
  5959. while (parent.$options.abstract && parent.$parent) {
  5960. parent = parent.$parent;
  5961. }
  5962. parent.$children.push(vm);
  5963. }
  5964. vm.$parent = parent;
  5965. vm.$root = parent ? parent.$root : vm;
  5966. vm.$children = [];
  5967. vm.$refs = {};
  5968. vm._watcher = null;
  5969. vm._inactive = null;
  5970. vm._directInactive = false;
  5971. vm._isMounted = false;
  5972. vm._isDestroyed = false;
  5973. vm._isBeingDestroyed = false;
  5974. }
  5975. function lifecycleMixin (Vue) {
  5976. Vue.prototype._update = function (vnode, hydrating) {
  5977. var vm = this;
  5978. var prevEl = vm.$el;
  5979. var prevVnode = vm._vnode;
  5980. var restoreActiveInstance = setActiveInstance(vm);
  5981. vm._vnode = vnode;
  5982. // Vue.prototype.__patch__ is injected in entry points
  5983. // based on the rendering backend used.
  5984. if (!prevVnode) {
  5985. // initial render
  5986. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  5987. } else {
  5988. // updates
  5989. vm.$el = vm.__patch__(prevVnode, vnode);
  5990. }
  5991. restoreActiveInstance();
  5992. // update __vue__ reference
  5993. if (prevEl) {
  5994. prevEl.__vue__ = null;
  5995. }
  5996. if (vm.$el) {
  5997. vm.$el.__vue__ = vm;
  5998. }
  5999. // if parent is an HOC, update its $el as well
  6000. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6001. vm.$parent.$el = vm.$el;
  6002. }
  6003. // updated hook is called by the scheduler to ensure that children are
  6004. // updated in a parent's updated hook.
  6005. };
  6006. Vue.prototype.$forceUpdate = function () {
  6007. var vm = this;
  6008. if (vm._watcher) {
  6009. vm._watcher.update();
  6010. }
  6011. };
  6012. Vue.prototype.$destroy = function () {
  6013. var vm = this;
  6014. if (vm._isBeingDestroyed) {
  6015. return
  6016. }
  6017. callHook(vm, 'beforeDestroy');
  6018. vm._isBeingDestroyed = true;
  6019. // remove self from parent
  6020. var parent = vm.$parent;
  6021. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6022. remove(parent.$children, vm);
  6023. }
  6024. // teardown watchers
  6025. if (vm._watcher) {
  6026. vm._watcher.teardown();
  6027. }
  6028. var i = vm._watchers.length;
  6029. while (i--) {
  6030. vm._watchers[i].teardown();
  6031. }
  6032. // remove reference from data ob
  6033. // frozen object may not have observer.
  6034. if (vm._data.__ob__) {
  6035. vm._data.__ob__.vmCount--;
  6036. }
  6037. // call the last hook...
  6038. vm._isDestroyed = true;
  6039. // invoke destroy hooks on current rendered tree
  6040. vm.__patch__(vm._vnode, null);
  6041. // fire destroyed hook
  6042. callHook(vm, 'destroyed');
  6043. // turn off all instance listeners.
  6044. vm.$off();
  6045. // remove __vue__ reference
  6046. if (vm.$el) {
  6047. vm.$el.__vue__ = null;
  6048. }
  6049. // release circular reference (#6759)
  6050. if (vm.$vnode) {
  6051. vm.$vnode.parent = null;
  6052. }
  6053. };
  6054. }
  6055. function updateChildComponent (
  6056. vm,
  6057. propsData,
  6058. listeners,
  6059. parentVnode,
  6060. renderChildren
  6061. ) {
  6062. if (true) {
  6063. isUpdatingChildComponent = true;
  6064. }
  6065. // determine whether component has slot children
  6066. // we need to do this before overwriting $options._renderChildren.
  6067. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6068. // dynamic slot names). Static scoped slots compiled from template has the
  6069. // "$stable" marker.
  6070. var newScopedSlots = parentVnode.data.scopedSlots;
  6071. var oldScopedSlots = vm.$scopedSlots;
  6072. var hasDynamicScopedSlot = !!(
  6073. (newScopedSlots && !newScopedSlots.$stable) ||
  6074. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6075. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6076. );
  6077. // Any static slot children from the parent may have changed during parent's
  6078. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6079. // update is necessary to ensure correctness.
  6080. var needsForceUpdate = !!(
  6081. renderChildren || // has new static slots
  6082. vm.$options._renderChildren || // has old static slots
  6083. hasDynamicScopedSlot
  6084. );
  6085. vm.$options._parentVnode = parentVnode;
  6086. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  6087. if (vm._vnode) { // update child tree's parent
  6088. vm._vnode.parent = parentVnode;
  6089. }
  6090. vm.$options._renderChildren = renderChildren;
  6091. // update $attrs and $listeners hash
  6092. // these are also reactive so they may trigger child update if the child
  6093. // used them during render
  6094. vm.$attrs = parentVnode.data.attrs || emptyObject;
  6095. vm.$listeners = listeners || emptyObject;
  6096. // update props
  6097. if (propsData && vm.$options.props) {
  6098. toggleObserving(false);
  6099. var props = vm._props;
  6100. var propKeys = vm.$options._propKeys || [];
  6101. for (var i = 0; i < propKeys.length; i++) {
  6102. var key = propKeys[i];
  6103. var propOptions = vm.$options.props; // wtf flow?
  6104. props[key] = validateProp(key, propOptions, propsData, vm);
  6105. }
  6106. toggleObserving(true);
  6107. // keep a copy of raw propsData
  6108. vm.$options.propsData = propsData;
  6109. }
  6110. // fixed by xxxxxx update properties(mp runtime)
  6111. vm._$updateProperties && vm._$updateProperties(vm);
  6112. // update listeners
  6113. listeners = listeners || emptyObject;
  6114. var oldListeners = vm.$options._parentListeners;
  6115. vm.$options._parentListeners = listeners;
  6116. updateComponentListeners(vm, listeners, oldListeners);
  6117. // resolve slots + force update if has children
  6118. if (needsForceUpdate) {
  6119. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  6120. vm.$forceUpdate();
  6121. }
  6122. if (true) {
  6123. isUpdatingChildComponent = false;
  6124. }
  6125. }
  6126. function isInInactiveTree (vm) {
  6127. while (vm && (vm = vm.$parent)) {
  6128. if (vm._inactive) { return true }
  6129. }
  6130. return false
  6131. }
  6132. function activateChildComponent (vm, direct) {
  6133. if (direct) {
  6134. vm._directInactive = false;
  6135. if (isInInactiveTree(vm)) {
  6136. return
  6137. }
  6138. } else if (vm._directInactive) {
  6139. return
  6140. }
  6141. if (vm._inactive || vm._inactive === null) {
  6142. vm._inactive = false;
  6143. for (var i = 0; i < vm.$children.length; i++) {
  6144. activateChildComponent(vm.$children[i]);
  6145. }
  6146. callHook(vm, 'activated');
  6147. }
  6148. }
  6149. function deactivateChildComponent (vm, direct) {
  6150. if (direct) {
  6151. vm._directInactive = true;
  6152. if (isInInactiveTree(vm)) {
  6153. return
  6154. }
  6155. }
  6156. if (!vm._inactive) {
  6157. vm._inactive = true;
  6158. for (var i = 0; i < vm.$children.length; i++) {
  6159. deactivateChildComponent(vm.$children[i]);
  6160. }
  6161. callHook(vm, 'deactivated');
  6162. }
  6163. }
  6164. function callHook (vm, hook) {
  6165. // #7573 disable dep collection when invoking lifecycle hooks
  6166. pushTarget();
  6167. var handlers = vm.$options[hook];
  6168. var info = hook + " hook";
  6169. if (handlers) {
  6170. for (var i = 0, j = handlers.length; i < j; i++) {
  6171. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  6172. }
  6173. }
  6174. if (vm._hasHookEvent) {
  6175. vm.$emit('hook:' + hook);
  6176. }
  6177. popTarget();
  6178. }
  6179. /* */
  6180. var MAX_UPDATE_COUNT = 100;
  6181. var queue = [];
  6182. var activatedChildren = [];
  6183. var has = {};
  6184. var circular = {};
  6185. var waiting = false;
  6186. var flushing = false;
  6187. var index = 0;
  6188. /**
  6189. * Reset the scheduler's state.
  6190. */
  6191. function resetSchedulerState () {
  6192. index = queue.length = activatedChildren.length = 0;
  6193. has = {};
  6194. if (true) {
  6195. circular = {};
  6196. }
  6197. waiting = flushing = false;
  6198. }
  6199. // Async edge case #6566 requires saving the timestamp when event listeners are
  6200. // attached. However, calling performance.now() has a perf overhead especially
  6201. // if the page has thousands of event listeners. Instead, we take a timestamp
  6202. // every time the scheduler flushes and use that for all event listeners
  6203. // attached during that flush.
  6204. var currentFlushTimestamp = 0;
  6205. // Async edge case fix requires storing an event listener's attach timestamp.
  6206. var getNow = Date.now;
  6207. // Determine what event timestamp the browser is using. Annoyingly, the
  6208. // timestamp can either be hi-res (relative to page load) or low-res
  6209. // (relative to UNIX epoch), so in order to compare time we have to use the
  6210. // same timestamp type when saving the flush timestamp.
  6211. // All IE versions use low-res event timestamps, and have problematic clock
  6212. // implementations (#9632)
  6213. if (inBrowser && !isIE) {
  6214. var performance = window.performance;
  6215. if (
  6216. performance &&
  6217. typeof performance.now === 'function' &&
  6218. getNow() > document.createEvent('Event').timeStamp
  6219. ) {
  6220. // if the event timestamp, although evaluated AFTER the Date.now(), is
  6221. // smaller than it, it means the event is using a hi-res timestamp,
  6222. // and we need to use the hi-res version for event listener timestamps as
  6223. // well.
  6224. getNow = function () { return performance.now(); };
  6225. }
  6226. }
  6227. /**
  6228. * Flush both queues and run the watchers.
  6229. */
  6230. function flushSchedulerQueue () {
  6231. currentFlushTimestamp = getNow();
  6232. flushing = true;
  6233. var watcher, id;
  6234. // Sort queue before flush.
  6235. // This ensures that:
  6236. // 1. Components are updated from parent to child. (because parent is always
  6237. // created before the child)
  6238. // 2. A component's user watchers are run before its render watcher (because
  6239. // user watchers are created before the render watcher)
  6240. // 3. If a component is destroyed during a parent component's watcher run,
  6241. // its watchers can be skipped.
  6242. queue.sort(function (a, b) { return a.id - b.id; });
  6243. // do not cache length because more watchers might be pushed
  6244. // as we run existing watchers
  6245. for (index = 0; index < queue.length; index++) {
  6246. watcher = queue[index];
  6247. if (watcher.before) {
  6248. watcher.before();
  6249. }
  6250. id = watcher.id;
  6251. has[id] = null;
  6252. watcher.run();
  6253. // in dev build, check and stop circular updates.
  6254. if ( true && has[id] != null) {
  6255. circular[id] = (circular[id] || 0) + 1;
  6256. if (circular[id] > MAX_UPDATE_COUNT) {
  6257. warn(
  6258. 'You may have an infinite update loop ' + (
  6259. watcher.user
  6260. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  6261. : "in a component render function."
  6262. ),
  6263. watcher.vm
  6264. );
  6265. break
  6266. }
  6267. }
  6268. }
  6269. // keep copies of post queues before resetting state
  6270. var activatedQueue = activatedChildren.slice();
  6271. var updatedQueue = queue.slice();
  6272. resetSchedulerState();
  6273. // call component updated and activated hooks
  6274. callActivatedHooks(activatedQueue);
  6275. callUpdatedHooks(updatedQueue);
  6276. // devtool hook
  6277. /* istanbul ignore if */
  6278. if (devtools && config.devtools) {
  6279. devtools.emit('flush');
  6280. }
  6281. }
  6282. function callUpdatedHooks (queue) {
  6283. var i = queue.length;
  6284. while (i--) {
  6285. var watcher = queue[i];
  6286. var vm = watcher.vm;
  6287. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  6288. callHook(vm, 'updated');
  6289. }
  6290. }
  6291. }
  6292. /**
  6293. * Queue a kept-alive component that was activated during patch.
  6294. * The queue will be processed after the entire tree has been patched.
  6295. */
  6296. function queueActivatedComponent (vm) {
  6297. // setting _inactive to false here so that a render function can
  6298. // rely on checking whether it's in an inactive tree (e.g. router-view)
  6299. vm._inactive = false;
  6300. activatedChildren.push(vm);
  6301. }
  6302. function callActivatedHooks (queue) {
  6303. for (var i = 0; i < queue.length; i++) {
  6304. queue[i]._inactive = true;
  6305. activateChildComponent(queue[i], true /* true */);
  6306. }
  6307. }
  6308. /**
  6309. * Push a watcher into the watcher queue.
  6310. * Jobs with duplicate IDs will be skipped unless it's
  6311. * pushed when the queue is being flushed.
  6312. */
  6313. function queueWatcher (watcher) {
  6314. var id = watcher.id;
  6315. if (has[id] == null) {
  6316. has[id] = true;
  6317. if (!flushing) {
  6318. queue.push(watcher);
  6319. } else {
  6320. // if already flushing, splice the watcher based on its id
  6321. // if already past its id, it will be run next immediately.
  6322. var i = queue.length - 1;
  6323. while (i > index && queue[i].id > watcher.id) {
  6324. i--;
  6325. }
  6326. queue.splice(i + 1, 0, watcher);
  6327. }
  6328. // queue the flush
  6329. if (!waiting) {
  6330. waiting = true;
  6331. if ( true && !config.async) {
  6332. flushSchedulerQueue();
  6333. return
  6334. }
  6335. nextTick(flushSchedulerQueue);
  6336. }
  6337. }
  6338. }
  6339. /* */
  6340. var uid$2 = 0;
  6341. /**
  6342. * A watcher parses an expression, collects dependencies,
  6343. * and fires callback when the expression value changes.
  6344. * This is used for both the $watch() api and directives.
  6345. */
  6346. var Watcher = function Watcher (
  6347. vm,
  6348. expOrFn,
  6349. cb,
  6350. options,
  6351. isRenderWatcher
  6352. ) {
  6353. this.vm = vm;
  6354. if (isRenderWatcher) {
  6355. vm._watcher = this;
  6356. }
  6357. vm._watchers.push(this);
  6358. // options
  6359. if (options) {
  6360. this.deep = !!options.deep;
  6361. this.user = !!options.user;
  6362. this.lazy = !!options.lazy;
  6363. this.sync = !!options.sync;
  6364. this.before = options.before;
  6365. } else {
  6366. this.deep = this.user = this.lazy = this.sync = false;
  6367. }
  6368. this.cb = cb;
  6369. this.id = ++uid$2; // uid for batching
  6370. this.active = true;
  6371. this.dirty = this.lazy; // for lazy watchers
  6372. this.deps = [];
  6373. this.newDeps = [];
  6374. this.depIds = new _Set();
  6375. this.newDepIds = new _Set();
  6376. this.expression = true
  6377. ? expOrFn.toString()
  6378. : undefined;
  6379. // parse expression for getter
  6380. if (typeof expOrFn === 'function') {
  6381. this.getter = expOrFn;
  6382. } else {
  6383. this.getter = parsePath(expOrFn);
  6384. if (!this.getter) {
  6385. this.getter = noop;
  6386. true && warn(
  6387. "Failed watching path: \"" + expOrFn + "\" " +
  6388. 'Watcher only accepts simple dot-delimited paths. ' +
  6389. 'For full control, use a function instead.',
  6390. vm
  6391. );
  6392. }
  6393. }
  6394. this.value = this.lazy
  6395. ? undefined
  6396. : this.get();
  6397. };
  6398. /**
  6399. * Evaluate the getter, and re-collect dependencies.
  6400. */
  6401. Watcher.prototype.get = function get () {
  6402. pushTarget(this);
  6403. var value;
  6404. var vm = this.vm;
  6405. try {
  6406. value = this.getter.call(vm, vm);
  6407. } catch (e) {
  6408. if (this.user) {
  6409. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  6410. } else {
  6411. throw e
  6412. }
  6413. } finally {
  6414. // "touch" every property so they are all tracked as
  6415. // dependencies for deep watching
  6416. if (this.deep) {
  6417. traverse(value);
  6418. }
  6419. popTarget();
  6420. this.cleanupDeps();
  6421. }
  6422. return value
  6423. };
  6424. /**
  6425. * Add a dependency to this directive.
  6426. */
  6427. Watcher.prototype.addDep = function addDep (dep) {
  6428. var id = dep.id;
  6429. if (!this.newDepIds.has(id)) {
  6430. this.newDepIds.add(id);
  6431. this.newDeps.push(dep);
  6432. if (!this.depIds.has(id)) {
  6433. dep.addSub(this);
  6434. }
  6435. }
  6436. };
  6437. /**
  6438. * Clean up for dependency collection.
  6439. */
  6440. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  6441. var i = this.deps.length;
  6442. while (i--) {
  6443. var dep = this.deps[i];
  6444. if (!this.newDepIds.has(dep.id)) {
  6445. dep.removeSub(this);
  6446. }
  6447. }
  6448. var tmp = this.depIds;
  6449. this.depIds = this.newDepIds;
  6450. this.newDepIds = tmp;
  6451. this.newDepIds.clear();
  6452. tmp = this.deps;
  6453. this.deps = this.newDeps;
  6454. this.newDeps = tmp;
  6455. this.newDeps.length = 0;
  6456. };
  6457. /**
  6458. * Subscriber interface.
  6459. * Will be called when a dependency changes.
  6460. */
  6461. Watcher.prototype.update = function update () {
  6462. /* istanbul ignore else */
  6463. if (this.lazy) {
  6464. this.dirty = true;
  6465. } else if (this.sync) {
  6466. this.run();
  6467. } else {
  6468. queueWatcher(this);
  6469. }
  6470. };
  6471. /**
  6472. * Scheduler job interface.
  6473. * Will be called by the scheduler.
  6474. */
  6475. Watcher.prototype.run = function run () {
  6476. if (this.active) {
  6477. var value = this.get();
  6478. if (
  6479. value !== this.value ||
  6480. // Deep watchers and watchers on Object/Arrays should fire even
  6481. // when the value is the same, because the value may
  6482. // have mutated.
  6483. isObject(value) ||
  6484. this.deep
  6485. ) {
  6486. // set new value
  6487. var oldValue = this.value;
  6488. this.value = value;
  6489. if (this.user) {
  6490. try {
  6491. this.cb.call(this.vm, value, oldValue);
  6492. } catch (e) {
  6493. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  6494. }
  6495. } else {
  6496. this.cb.call(this.vm, value, oldValue);
  6497. }
  6498. }
  6499. }
  6500. };
  6501. /**
  6502. * Evaluate the value of the watcher.
  6503. * This only gets called for lazy watchers.
  6504. */
  6505. Watcher.prototype.evaluate = function evaluate () {
  6506. this.value = this.get();
  6507. this.dirty = false;
  6508. };
  6509. /**
  6510. * Depend on all deps collected by this watcher.
  6511. */
  6512. Watcher.prototype.depend = function depend () {
  6513. var i = this.deps.length;
  6514. while (i--) {
  6515. this.deps[i].depend();
  6516. }
  6517. };
  6518. /**
  6519. * Remove self from all dependencies' subscriber list.
  6520. */
  6521. Watcher.prototype.teardown = function teardown () {
  6522. if (this.active) {
  6523. // remove self from vm's watcher list
  6524. // this is a somewhat expensive operation so we skip it
  6525. // if the vm is being destroyed.
  6526. if (!this.vm._isBeingDestroyed) {
  6527. remove(this.vm._watchers, this);
  6528. }
  6529. var i = this.deps.length;
  6530. while (i--) {
  6531. this.deps[i].removeSub(this);
  6532. }
  6533. this.active = false;
  6534. }
  6535. };
  6536. /* */
  6537. var sharedPropertyDefinition = {
  6538. enumerable: true,
  6539. configurable: true,
  6540. get: noop,
  6541. set: noop
  6542. };
  6543. function proxy (target, sourceKey, key) {
  6544. sharedPropertyDefinition.get = function proxyGetter () {
  6545. return this[sourceKey][key]
  6546. };
  6547. sharedPropertyDefinition.set = function proxySetter (val) {
  6548. this[sourceKey][key] = val;
  6549. };
  6550. Object.defineProperty(target, key, sharedPropertyDefinition);
  6551. }
  6552. function initState (vm) {
  6553. vm._watchers = [];
  6554. var opts = vm.$options;
  6555. if (opts.props) { initProps(vm, opts.props); }
  6556. if (opts.methods) { initMethods(vm, opts.methods); }
  6557. if (opts.data) {
  6558. initData(vm);
  6559. } else {
  6560. observe(vm._data = {}, true /* asRootData */);
  6561. }
  6562. if (opts.computed) { initComputed(vm, opts.computed); }
  6563. if (opts.watch && opts.watch !== nativeWatch) {
  6564. initWatch(vm, opts.watch);
  6565. }
  6566. }
  6567. function initProps (vm, propsOptions) {
  6568. var propsData = vm.$options.propsData || {};
  6569. var props = vm._props = {};
  6570. // cache prop keys so that future props updates can iterate using Array
  6571. // instead of dynamic object key enumeration.
  6572. var keys = vm.$options._propKeys = [];
  6573. var isRoot = !vm.$parent;
  6574. // root instance props should be converted
  6575. if (!isRoot) {
  6576. toggleObserving(false);
  6577. }
  6578. var loop = function ( key ) {
  6579. keys.push(key);
  6580. var value = validateProp(key, propsOptions, propsData, vm);
  6581. /* istanbul ignore else */
  6582. if (true) {
  6583. var hyphenatedKey = hyphenate(key);
  6584. if (isReservedAttribute(hyphenatedKey) ||
  6585. config.isReservedAttr(hyphenatedKey)) {
  6586. warn(
  6587. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  6588. vm
  6589. );
  6590. }
  6591. defineReactive$$1(props, key, value, function () {
  6592. if (!isRoot && !isUpdatingChildComponent) {
  6593. {
  6594. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou'){//百度、快手 observer 在 setData callback 之后触发,直接忽略该 warn
  6595. return
  6596. }
  6597. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  6598. if(
  6599. key === 'value' &&
  6600. Array.isArray(vm.$options.behaviors) &&
  6601. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  6602. ){
  6603. return
  6604. }
  6605. if(vm._getFormData){
  6606. return
  6607. }
  6608. var $parent = vm.$parent;
  6609. while($parent){
  6610. if($parent.__next_tick_pending){
  6611. return
  6612. }
  6613. $parent = $parent.$parent;
  6614. }
  6615. }
  6616. warn(
  6617. "Avoid mutating a prop directly since the value will be " +
  6618. "overwritten whenever the parent component re-renders. " +
  6619. "Instead, use a data or computed property based on the prop's " +
  6620. "value. Prop being mutated: \"" + key + "\"",
  6621. vm
  6622. );
  6623. }
  6624. });
  6625. } else {}
  6626. // static props are already proxied on the component's prototype
  6627. // during Vue.extend(). We only need to proxy props defined at
  6628. // instantiation here.
  6629. if (!(key in vm)) {
  6630. proxy(vm, "_props", key);
  6631. }
  6632. };
  6633. for (var key in propsOptions) loop( key );
  6634. toggleObserving(true);
  6635. }
  6636. function initData (vm) {
  6637. var data = vm.$options.data;
  6638. data = vm._data = typeof data === 'function'
  6639. ? getData(data, vm)
  6640. : data || {};
  6641. if (!isPlainObject(data)) {
  6642. data = {};
  6643. true && warn(
  6644. 'data functions should return an object:\n' +
  6645. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  6646. vm
  6647. );
  6648. }
  6649. // proxy data on instance
  6650. var keys = Object.keys(data);
  6651. var props = vm.$options.props;
  6652. var methods = vm.$options.methods;
  6653. var i = keys.length;
  6654. while (i--) {
  6655. var key = keys[i];
  6656. if (true) {
  6657. if (methods && hasOwn(methods, key)) {
  6658. warn(
  6659. ("Method \"" + key + "\" has already been defined as a data property."),
  6660. vm
  6661. );
  6662. }
  6663. }
  6664. if (props && hasOwn(props, key)) {
  6665. true && warn(
  6666. "The data property \"" + key + "\" is already declared as a prop. " +
  6667. "Use prop default value instead.",
  6668. vm
  6669. );
  6670. } else if (!isReserved(key)) {
  6671. proxy(vm, "_data", key);
  6672. }
  6673. }
  6674. // observe data
  6675. observe(data, true /* asRootData */);
  6676. }
  6677. function getData (data, vm) {
  6678. // #7573 disable dep collection when invoking data getters
  6679. pushTarget();
  6680. try {
  6681. return data.call(vm, vm)
  6682. } catch (e) {
  6683. handleError(e, vm, "data()");
  6684. return {}
  6685. } finally {
  6686. popTarget();
  6687. }
  6688. }
  6689. var computedWatcherOptions = { lazy: true };
  6690. function initComputed (vm, computed) {
  6691. // $flow-disable-line
  6692. var watchers = vm._computedWatchers = Object.create(null);
  6693. // computed properties are just getters during SSR
  6694. var isSSR = isServerRendering();
  6695. for (var key in computed) {
  6696. var userDef = computed[key];
  6697. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  6698. if ( true && getter == null) {
  6699. warn(
  6700. ("Getter is missing for computed property \"" + key + "\"."),
  6701. vm
  6702. );
  6703. }
  6704. if (!isSSR) {
  6705. // create internal watcher for the computed property.
  6706. watchers[key] = new Watcher(
  6707. vm,
  6708. getter || noop,
  6709. noop,
  6710. computedWatcherOptions
  6711. );
  6712. }
  6713. // component-defined computed properties are already defined on the
  6714. // component prototype. We only need to define computed properties defined
  6715. // at instantiation here.
  6716. if (!(key in vm)) {
  6717. defineComputed(vm, key, userDef);
  6718. } else if (true) {
  6719. if (key in vm.$data) {
  6720. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  6721. } else if (vm.$options.props && key in vm.$options.props) {
  6722. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  6723. }
  6724. }
  6725. }
  6726. }
  6727. function defineComputed (
  6728. target,
  6729. key,
  6730. userDef
  6731. ) {
  6732. var shouldCache = !isServerRendering();
  6733. if (typeof userDef === 'function') {
  6734. sharedPropertyDefinition.get = shouldCache
  6735. ? createComputedGetter(key)
  6736. : createGetterInvoker(userDef);
  6737. sharedPropertyDefinition.set = noop;
  6738. } else {
  6739. sharedPropertyDefinition.get = userDef.get
  6740. ? shouldCache && userDef.cache !== false
  6741. ? createComputedGetter(key)
  6742. : createGetterInvoker(userDef.get)
  6743. : noop;
  6744. sharedPropertyDefinition.set = userDef.set || noop;
  6745. }
  6746. if ( true &&
  6747. sharedPropertyDefinition.set === noop) {
  6748. sharedPropertyDefinition.set = function () {
  6749. warn(
  6750. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  6751. this
  6752. );
  6753. };
  6754. }
  6755. Object.defineProperty(target, key, sharedPropertyDefinition);
  6756. }
  6757. function createComputedGetter (key) {
  6758. return function computedGetter () {
  6759. var watcher = this._computedWatchers && this._computedWatchers[key];
  6760. if (watcher) {
  6761. if (watcher.dirty) {
  6762. watcher.evaluate();
  6763. }
  6764. if (Dep.SharedObject.target) {// fixed by xxxxxx
  6765. watcher.depend();
  6766. }
  6767. return watcher.value
  6768. }
  6769. }
  6770. }
  6771. function createGetterInvoker(fn) {
  6772. return function computedGetter () {
  6773. return fn.call(this, this)
  6774. }
  6775. }
  6776. function initMethods (vm, methods) {
  6777. var props = vm.$options.props;
  6778. for (var key in methods) {
  6779. if (true) {
  6780. if (typeof methods[key] !== 'function') {
  6781. warn(
  6782. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  6783. "Did you reference the function correctly?",
  6784. vm
  6785. );
  6786. }
  6787. if (props && hasOwn(props, key)) {
  6788. warn(
  6789. ("Method \"" + key + "\" has already been defined as a prop."),
  6790. vm
  6791. );
  6792. }
  6793. if ((key in vm) && isReserved(key)) {
  6794. warn(
  6795. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  6796. "Avoid defining component methods that start with _ or $."
  6797. );
  6798. }
  6799. }
  6800. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  6801. }
  6802. }
  6803. function initWatch (vm, watch) {
  6804. for (var key in watch) {
  6805. var handler = watch[key];
  6806. if (Array.isArray(handler)) {
  6807. for (var i = 0; i < handler.length; i++) {
  6808. createWatcher(vm, key, handler[i]);
  6809. }
  6810. } else {
  6811. createWatcher(vm, key, handler);
  6812. }
  6813. }
  6814. }
  6815. function createWatcher (
  6816. vm,
  6817. expOrFn,
  6818. handler,
  6819. options
  6820. ) {
  6821. if (isPlainObject(handler)) {
  6822. options = handler;
  6823. handler = handler.handler;
  6824. }
  6825. if (typeof handler === 'string') {
  6826. handler = vm[handler];
  6827. }
  6828. return vm.$watch(expOrFn, handler, options)
  6829. }
  6830. function stateMixin (Vue) {
  6831. // flow somehow has problems with directly declared definition object
  6832. // when using Object.defineProperty, so we have to procedurally build up
  6833. // the object here.
  6834. var dataDef = {};
  6835. dataDef.get = function () { return this._data };
  6836. var propsDef = {};
  6837. propsDef.get = function () { return this._props };
  6838. if (true) {
  6839. dataDef.set = function () {
  6840. warn(
  6841. 'Avoid replacing instance root $data. ' +
  6842. 'Use nested data properties instead.',
  6843. this
  6844. );
  6845. };
  6846. propsDef.set = function () {
  6847. warn("$props is readonly.", this);
  6848. };
  6849. }
  6850. Object.defineProperty(Vue.prototype, '$data', dataDef);
  6851. Object.defineProperty(Vue.prototype, '$props', propsDef);
  6852. Vue.prototype.$set = set;
  6853. Vue.prototype.$delete = del;
  6854. Vue.prototype.$watch = function (
  6855. expOrFn,
  6856. cb,
  6857. options
  6858. ) {
  6859. var vm = this;
  6860. if (isPlainObject(cb)) {
  6861. return createWatcher(vm, expOrFn, cb, options)
  6862. }
  6863. options = options || {};
  6864. options.user = true;
  6865. var watcher = new Watcher(vm, expOrFn, cb, options);
  6866. if (options.immediate) {
  6867. try {
  6868. cb.call(vm, watcher.value);
  6869. } catch (error) {
  6870. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  6871. }
  6872. }
  6873. return function unwatchFn () {
  6874. watcher.teardown();
  6875. }
  6876. };
  6877. }
  6878. /* */
  6879. var uid$3 = 0;
  6880. function initMixin (Vue) {
  6881. Vue.prototype._init = function (options) {
  6882. var vm = this;
  6883. // a uid
  6884. vm._uid = uid$3++;
  6885. var startTag, endTag;
  6886. /* istanbul ignore if */
  6887. if ( true && config.performance && mark) {
  6888. startTag = "vue-perf-start:" + (vm._uid);
  6889. endTag = "vue-perf-end:" + (vm._uid);
  6890. mark(startTag);
  6891. }
  6892. // a flag to avoid this being observed
  6893. vm._isVue = true;
  6894. // merge options
  6895. if (options && options._isComponent) {
  6896. // optimize internal component instantiation
  6897. // since dynamic options merging is pretty slow, and none of the
  6898. // internal component options needs special treatment.
  6899. initInternalComponent(vm, options);
  6900. } else {
  6901. vm.$options = mergeOptions(
  6902. resolveConstructorOptions(vm.constructor),
  6903. options || {},
  6904. vm
  6905. );
  6906. }
  6907. /* istanbul ignore else */
  6908. if (true) {
  6909. initProxy(vm);
  6910. } else {}
  6911. // expose real self
  6912. vm._self = vm;
  6913. initLifecycle(vm);
  6914. initEvents(vm);
  6915. initRender(vm);
  6916. callHook(vm, 'beforeCreate');
  6917. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  6918. initState(vm);
  6919. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  6920. !vm._$fallback && callHook(vm, 'created');
  6921. /* istanbul ignore if */
  6922. if ( true && config.performance && mark) {
  6923. vm._name = formatComponentName(vm, false);
  6924. mark(endTag);
  6925. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  6926. }
  6927. if (vm.$options.el) {
  6928. vm.$mount(vm.$options.el);
  6929. }
  6930. };
  6931. }
  6932. function initInternalComponent (vm, options) {
  6933. var opts = vm.$options = Object.create(vm.constructor.options);
  6934. // doing this because it's faster than dynamic enumeration.
  6935. var parentVnode = options._parentVnode;
  6936. opts.parent = options.parent;
  6937. opts._parentVnode = parentVnode;
  6938. var vnodeComponentOptions = parentVnode.componentOptions;
  6939. opts.propsData = vnodeComponentOptions.propsData;
  6940. opts._parentListeners = vnodeComponentOptions.listeners;
  6941. opts._renderChildren = vnodeComponentOptions.children;
  6942. opts._componentTag = vnodeComponentOptions.tag;
  6943. if (options.render) {
  6944. opts.render = options.render;
  6945. opts.staticRenderFns = options.staticRenderFns;
  6946. }
  6947. }
  6948. function resolveConstructorOptions (Ctor) {
  6949. var options = Ctor.options;
  6950. if (Ctor.super) {
  6951. var superOptions = resolveConstructorOptions(Ctor.super);
  6952. var cachedSuperOptions = Ctor.superOptions;
  6953. if (superOptions !== cachedSuperOptions) {
  6954. // super option changed,
  6955. // need to resolve new options.
  6956. Ctor.superOptions = superOptions;
  6957. // check if there are any late-modified/attached options (#4976)
  6958. var modifiedOptions = resolveModifiedOptions(Ctor);
  6959. // update base extend options
  6960. if (modifiedOptions) {
  6961. extend(Ctor.extendOptions, modifiedOptions);
  6962. }
  6963. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  6964. if (options.name) {
  6965. options.components[options.name] = Ctor;
  6966. }
  6967. }
  6968. }
  6969. return options
  6970. }
  6971. function resolveModifiedOptions (Ctor) {
  6972. var modified;
  6973. var latest = Ctor.options;
  6974. var sealed = Ctor.sealedOptions;
  6975. for (var key in latest) {
  6976. if (latest[key] !== sealed[key]) {
  6977. if (!modified) { modified = {}; }
  6978. modified[key] = latest[key];
  6979. }
  6980. }
  6981. return modified
  6982. }
  6983. function Vue (options) {
  6984. if ( true &&
  6985. !(this instanceof Vue)
  6986. ) {
  6987. warn('Vue is a constructor and should be called with the `new` keyword');
  6988. }
  6989. this._init(options);
  6990. }
  6991. initMixin(Vue);
  6992. stateMixin(Vue);
  6993. eventsMixin(Vue);
  6994. lifecycleMixin(Vue);
  6995. renderMixin(Vue);
  6996. /* */
  6997. function initUse (Vue) {
  6998. Vue.use = function (plugin) {
  6999. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7000. if (installedPlugins.indexOf(plugin) > -1) {
  7001. return this
  7002. }
  7003. // additional parameters
  7004. var args = toArray(arguments, 1);
  7005. args.unshift(this);
  7006. if (typeof plugin.install === 'function') {
  7007. plugin.install.apply(plugin, args);
  7008. } else if (typeof plugin === 'function') {
  7009. plugin.apply(null, args);
  7010. }
  7011. installedPlugins.push(plugin);
  7012. return this
  7013. };
  7014. }
  7015. /* */
  7016. function initMixin$1 (Vue) {
  7017. Vue.mixin = function (mixin) {
  7018. this.options = mergeOptions(this.options, mixin);
  7019. return this
  7020. };
  7021. }
  7022. /* */
  7023. function initExtend (Vue) {
  7024. /**
  7025. * Each instance constructor, including Vue, has a unique
  7026. * cid. This enables us to create wrapped "child
  7027. * constructors" for prototypal inheritance and cache them.
  7028. */
  7029. Vue.cid = 0;
  7030. var cid = 1;
  7031. /**
  7032. * Class inheritance
  7033. */
  7034. Vue.extend = function (extendOptions) {
  7035. extendOptions = extendOptions || {};
  7036. var Super = this;
  7037. var SuperId = Super.cid;
  7038. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7039. if (cachedCtors[SuperId]) {
  7040. return cachedCtors[SuperId]
  7041. }
  7042. var name = extendOptions.name || Super.options.name;
  7043. if ( true && name) {
  7044. validateComponentName(name);
  7045. }
  7046. var Sub = function VueComponent (options) {
  7047. this._init(options);
  7048. };
  7049. Sub.prototype = Object.create(Super.prototype);
  7050. Sub.prototype.constructor = Sub;
  7051. Sub.cid = cid++;
  7052. Sub.options = mergeOptions(
  7053. Super.options,
  7054. extendOptions
  7055. );
  7056. Sub['super'] = Super;
  7057. // For props and computed properties, we define the proxy getters on
  7058. // the Vue instances at extension time, on the extended prototype. This
  7059. // avoids Object.defineProperty calls for each instance created.
  7060. if (Sub.options.props) {
  7061. initProps$1(Sub);
  7062. }
  7063. if (Sub.options.computed) {
  7064. initComputed$1(Sub);
  7065. }
  7066. // allow further extension/mixin/plugin usage
  7067. Sub.extend = Super.extend;
  7068. Sub.mixin = Super.mixin;
  7069. Sub.use = Super.use;
  7070. // create asset registers, so extended classes
  7071. // can have their private assets too.
  7072. ASSET_TYPES.forEach(function (type) {
  7073. Sub[type] = Super[type];
  7074. });
  7075. // enable recursive self-lookup
  7076. if (name) {
  7077. Sub.options.components[name] = Sub;
  7078. }
  7079. // keep a reference to the super options at extension time.
  7080. // later at instantiation we can check if Super's options have
  7081. // been updated.
  7082. Sub.superOptions = Super.options;
  7083. Sub.extendOptions = extendOptions;
  7084. Sub.sealedOptions = extend({}, Sub.options);
  7085. // cache constructor
  7086. cachedCtors[SuperId] = Sub;
  7087. return Sub
  7088. };
  7089. }
  7090. function initProps$1 (Comp) {
  7091. var props = Comp.options.props;
  7092. for (var key in props) {
  7093. proxy(Comp.prototype, "_props", key);
  7094. }
  7095. }
  7096. function initComputed$1 (Comp) {
  7097. var computed = Comp.options.computed;
  7098. for (var key in computed) {
  7099. defineComputed(Comp.prototype, key, computed[key]);
  7100. }
  7101. }
  7102. /* */
  7103. function initAssetRegisters (Vue) {
  7104. /**
  7105. * Create asset registration methods.
  7106. */
  7107. ASSET_TYPES.forEach(function (type) {
  7108. Vue[type] = function (
  7109. id,
  7110. definition
  7111. ) {
  7112. if (!definition) {
  7113. return this.options[type + 's'][id]
  7114. } else {
  7115. /* istanbul ignore if */
  7116. if ( true && type === 'component') {
  7117. validateComponentName(id);
  7118. }
  7119. if (type === 'component' && isPlainObject(definition)) {
  7120. definition.name = definition.name || id;
  7121. definition = this.options._base.extend(definition);
  7122. }
  7123. if (type === 'directive' && typeof definition === 'function') {
  7124. definition = { bind: definition, update: definition };
  7125. }
  7126. this.options[type + 's'][id] = definition;
  7127. return definition
  7128. }
  7129. };
  7130. });
  7131. }
  7132. /* */
  7133. function getComponentName (opts) {
  7134. return opts && (opts.Ctor.options.name || opts.tag)
  7135. }
  7136. function matches (pattern, name) {
  7137. if (Array.isArray(pattern)) {
  7138. return pattern.indexOf(name) > -1
  7139. } else if (typeof pattern === 'string') {
  7140. return pattern.split(',').indexOf(name) > -1
  7141. } else if (isRegExp(pattern)) {
  7142. return pattern.test(name)
  7143. }
  7144. /* istanbul ignore next */
  7145. return false
  7146. }
  7147. function pruneCache (keepAliveInstance, filter) {
  7148. var cache = keepAliveInstance.cache;
  7149. var keys = keepAliveInstance.keys;
  7150. var _vnode = keepAliveInstance._vnode;
  7151. for (var key in cache) {
  7152. var cachedNode = cache[key];
  7153. if (cachedNode) {
  7154. var name = getComponentName(cachedNode.componentOptions);
  7155. if (name && !filter(name)) {
  7156. pruneCacheEntry(cache, key, keys, _vnode);
  7157. }
  7158. }
  7159. }
  7160. }
  7161. function pruneCacheEntry (
  7162. cache,
  7163. key,
  7164. keys,
  7165. current
  7166. ) {
  7167. var cached$$1 = cache[key];
  7168. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  7169. cached$$1.componentInstance.$destroy();
  7170. }
  7171. cache[key] = null;
  7172. remove(keys, key);
  7173. }
  7174. var patternTypes = [String, RegExp, Array];
  7175. var KeepAlive = {
  7176. name: 'keep-alive',
  7177. abstract: true,
  7178. props: {
  7179. include: patternTypes,
  7180. exclude: patternTypes,
  7181. max: [String, Number]
  7182. },
  7183. created: function created () {
  7184. this.cache = Object.create(null);
  7185. this.keys = [];
  7186. },
  7187. destroyed: function destroyed () {
  7188. for (var key in this.cache) {
  7189. pruneCacheEntry(this.cache, key, this.keys);
  7190. }
  7191. },
  7192. mounted: function mounted () {
  7193. var this$1 = this;
  7194. this.$watch('include', function (val) {
  7195. pruneCache(this$1, function (name) { return matches(val, name); });
  7196. });
  7197. this.$watch('exclude', function (val) {
  7198. pruneCache(this$1, function (name) { return !matches(val, name); });
  7199. });
  7200. },
  7201. render: function render () {
  7202. var slot = this.$slots.default;
  7203. var vnode = getFirstComponentChild(slot);
  7204. var componentOptions = vnode && vnode.componentOptions;
  7205. if (componentOptions) {
  7206. // check pattern
  7207. var name = getComponentName(componentOptions);
  7208. var ref = this;
  7209. var include = ref.include;
  7210. var exclude = ref.exclude;
  7211. if (
  7212. // not included
  7213. (include && (!name || !matches(include, name))) ||
  7214. // excluded
  7215. (exclude && name && matches(exclude, name))
  7216. ) {
  7217. return vnode
  7218. }
  7219. var ref$1 = this;
  7220. var cache = ref$1.cache;
  7221. var keys = ref$1.keys;
  7222. var key = vnode.key == null
  7223. // same constructor may get registered as different local components
  7224. // so cid alone is not enough (#3269)
  7225. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  7226. : vnode.key;
  7227. if (cache[key]) {
  7228. vnode.componentInstance = cache[key].componentInstance;
  7229. // make current key freshest
  7230. remove(keys, key);
  7231. keys.push(key);
  7232. } else {
  7233. cache[key] = vnode;
  7234. keys.push(key);
  7235. // prune oldest entry
  7236. if (this.max && keys.length > parseInt(this.max)) {
  7237. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  7238. }
  7239. }
  7240. vnode.data.keepAlive = true;
  7241. }
  7242. return vnode || (slot && slot[0])
  7243. }
  7244. };
  7245. var builtInComponents = {
  7246. KeepAlive: KeepAlive
  7247. };
  7248. /* */
  7249. function initGlobalAPI (Vue) {
  7250. // config
  7251. var configDef = {};
  7252. configDef.get = function () { return config; };
  7253. if (true) {
  7254. configDef.set = function () {
  7255. warn(
  7256. 'Do not replace the Vue.config object, set individual fields instead.'
  7257. );
  7258. };
  7259. }
  7260. Object.defineProperty(Vue, 'config', configDef);
  7261. // exposed util methods.
  7262. // NOTE: these are not considered part of the public API - avoid relying on
  7263. // them unless you are aware of the risk.
  7264. Vue.util = {
  7265. warn: warn,
  7266. extend: extend,
  7267. mergeOptions: mergeOptions,
  7268. defineReactive: defineReactive$$1
  7269. };
  7270. Vue.set = set;
  7271. Vue.delete = del;
  7272. Vue.nextTick = nextTick;
  7273. // 2.6 explicit observable API
  7274. Vue.observable = function (obj) {
  7275. observe(obj);
  7276. return obj
  7277. };
  7278. Vue.options = Object.create(null);
  7279. ASSET_TYPES.forEach(function (type) {
  7280. Vue.options[type + 's'] = Object.create(null);
  7281. });
  7282. // this is used to identify the "base" constructor to extend all plain-object
  7283. // components with in Weex's multi-instance scenarios.
  7284. Vue.options._base = Vue;
  7285. extend(Vue.options.components, builtInComponents);
  7286. initUse(Vue);
  7287. initMixin$1(Vue);
  7288. initExtend(Vue);
  7289. initAssetRegisters(Vue);
  7290. }
  7291. initGlobalAPI(Vue);
  7292. Object.defineProperty(Vue.prototype, '$isServer', {
  7293. get: isServerRendering
  7294. });
  7295. Object.defineProperty(Vue.prototype, '$ssrContext', {
  7296. get: function get () {
  7297. /* istanbul ignore next */
  7298. return this.$vnode && this.$vnode.ssrContext
  7299. }
  7300. });
  7301. // expose FunctionalRenderContext for ssr runtime helper installation
  7302. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  7303. value: FunctionalRenderContext
  7304. });
  7305. Vue.version = '2.6.11';
  7306. /**
  7307. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  7308. */
  7309. var ARRAYTYPE = '[object Array]';
  7310. var OBJECTTYPE = '[object Object]';
  7311. // const FUNCTIONTYPE = '[object Function]'
  7312. function diff(current, pre) {
  7313. var result = {};
  7314. syncKeys(current, pre);
  7315. _diff(current, pre, '', result);
  7316. return result
  7317. }
  7318. function syncKeys(current, pre) {
  7319. if (current === pre) { return }
  7320. var rootCurrentType = type(current);
  7321. var rootPreType = type(pre);
  7322. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  7323. if(Object.keys(current).length >= Object.keys(pre).length){
  7324. for (var key in pre) {
  7325. var currentValue = current[key];
  7326. if (currentValue === undefined) {
  7327. current[key] = null;
  7328. } else {
  7329. syncKeys(currentValue, pre[key]);
  7330. }
  7331. }
  7332. }
  7333. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  7334. if (current.length >= pre.length) {
  7335. pre.forEach(function (item, index) {
  7336. syncKeys(current[index], item);
  7337. });
  7338. }
  7339. }
  7340. }
  7341. function _diff(current, pre, path, result) {
  7342. if (current === pre) { return }
  7343. var rootCurrentType = type(current);
  7344. var rootPreType = type(pre);
  7345. if (rootCurrentType == OBJECTTYPE) {
  7346. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  7347. setResult(result, path, current);
  7348. } else {
  7349. var loop = function ( key ) {
  7350. var currentValue = current[key];
  7351. var preValue = pre[key];
  7352. var currentType = type(currentValue);
  7353. var preType = type(preValue);
  7354. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  7355. // NOTE 此处将 != 修改为 !==。涉及地方太多恐怕测试不到,如果出现数据对比问题,将其修改回来。
  7356. if (currentValue !== pre[key]) {
  7357. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7358. }
  7359. } else if (currentType == ARRAYTYPE) {
  7360. if (preType != ARRAYTYPE) {
  7361. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7362. } else {
  7363. if (currentValue.length < preValue.length) {
  7364. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7365. } else {
  7366. currentValue.forEach(function (item, index) {
  7367. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  7368. });
  7369. }
  7370. }
  7371. } else if (currentType == OBJECTTYPE) {
  7372. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  7373. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  7374. } else {
  7375. for (var subKey in currentValue) {
  7376. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  7377. }
  7378. }
  7379. }
  7380. };
  7381. for (var key in current) loop( key );
  7382. }
  7383. } else if (rootCurrentType == ARRAYTYPE) {
  7384. if (rootPreType != ARRAYTYPE) {
  7385. setResult(result, path, current);
  7386. } else {
  7387. if (current.length < pre.length) {
  7388. setResult(result, path, current);
  7389. } else {
  7390. current.forEach(function (item, index) {
  7391. _diff(item, pre[index], path + '[' + index + ']', result);
  7392. });
  7393. }
  7394. }
  7395. } else {
  7396. setResult(result, path, current);
  7397. }
  7398. }
  7399. function setResult(result, k, v) {
  7400. // if (type(v) != FUNCTIONTYPE) {
  7401. result[k] = v;
  7402. // }
  7403. }
  7404. function type(obj) {
  7405. return Object.prototype.toString.call(obj)
  7406. }
  7407. /* */
  7408. function flushCallbacks$1(vm) {
  7409. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  7410. if (Object({"VUE_APP_NAME":"基础项目","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  7411. var mpInstance = vm.$scope;
  7412. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  7413. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  7414. }
  7415. var copies = vm.__next_tick_callbacks.slice(0);
  7416. vm.__next_tick_callbacks.length = 0;
  7417. for (var i = 0; i < copies.length; i++) {
  7418. copies[i]();
  7419. }
  7420. }
  7421. }
  7422. function hasRenderWatcher(vm) {
  7423. return queue.find(function (watcher) { return vm._watcher === watcher; })
  7424. }
  7425. function nextTick$1(vm, cb) {
  7426. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  7427. //2.nextTick 之前存在 render watcher
  7428. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  7429. if(Object({"VUE_APP_NAME":"基础项目","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  7430. var mpInstance = vm.$scope;
  7431. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  7432. ']:nextVueTick');
  7433. }
  7434. return nextTick(cb, vm)
  7435. }else{
  7436. if(Object({"VUE_APP_NAME":"基础项目","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  7437. var mpInstance$1 = vm.$scope;
  7438. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  7439. ']:nextMPTick');
  7440. }
  7441. }
  7442. var _resolve;
  7443. if (!vm.__next_tick_callbacks) {
  7444. vm.__next_tick_callbacks = [];
  7445. }
  7446. vm.__next_tick_callbacks.push(function () {
  7447. if (cb) {
  7448. try {
  7449. cb.call(vm);
  7450. } catch (e) {
  7451. handleError(e, vm, 'nextTick');
  7452. }
  7453. } else if (_resolve) {
  7454. _resolve(vm);
  7455. }
  7456. });
  7457. // $flow-disable-line
  7458. if (!cb && typeof Promise !== 'undefined') {
  7459. return new Promise(function (resolve) {
  7460. _resolve = resolve;
  7461. })
  7462. }
  7463. }
  7464. /* */
  7465. function cloneWithData(vm) {
  7466. // 确保当前 vm 所有数据被同步
  7467. var ret = Object.create(null);
  7468. var dataKeys = [].concat(
  7469. Object.keys(vm._data || {}),
  7470. Object.keys(vm._computedWatchers || {}));
  7471. dataKeys.reduce(function(ret, key) {
  7472. ret[key] = vm[key];
  7473. return ret
  7474. }, ret);
  7475. // vue-composition-api
  7476. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  7477. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  7478. if (rawBindings) {
  7479. Object.keys(rawBindings).forEach(function (key) {
  7480. ret[key] = vm[key];
  7481. });
  7482. }
  7483. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  7484. Object.assign(ret, vm.$mp.data || {});
  7485. if (
  7486. Array.isArray(vm.$options.behaviors) &&
  7487. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7488. ) { //form-field
  7489. ret['name'] = vm.name;
  7490. ret['value'] = vm.value;
  7491. }
  7492. return JSON.parse(JSON.stringify(ret))
  7493. }
  7494. var patch = function(oldVnode, vnode) {
  7495. var this$1 = this;
  7496. if (vnode === null) { //destroy
  7497. return
  7498. }
  7499. if (this.mpType === 'page' || this.mpType === 'component') {
  7500. var mpInstance = this.$scope;
  7501. var data = Object.create(null);
  7502. try {
  7503. data = cloneWithData(this);
  7504. } catch (err) {
  7505. console.error(err);
  7506. }
  7507. data.__webviewId__ = mpInstance.data.__webviewId__;
  7508. var mpData = Object.create(null);
  7509. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  7510. mpData[key] = mpInstance.data[key];
  7511. });
  7512. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  7513. if (Object.keys(diffData).length) {
  7514. if (Object({"VUE_APP_NAME":"基础项目","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  7515. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  7516. ']差量更新',
  7517. JSON.stringify(diffData));
  7518. }
  7519. this.__next_tick_pending = true;
  7520. mpInstance.setData(diffData, function () {
  7521. this$1.__next_tick_pending = false;
  7522. flushCallbacks$1(this$1);
  7523. });
  7524. } else {
  7525. flushCallbacks$1(this);
  7526. }
  7527. }
  7528. };
  7529. /* */
  7530. function createEmptyRender() {
  7531. }
  7532. function mountComponent$1(
  7533. vm,
  7534. el,
  7535. hydrating
  7536. ) {
  7537. if (!vm.mpType) {//main.js 中的 new Vue
  7538. return vm
  7539. }
  7540. if (vm.mpType === 'app') {
  7541. vm.$options.render = createEmptyRender;
  7542. }
  7543. if (!vm.$options.render) {
  7544. vm.$options.render = createEmptyRender;
  7545. if (true) {
  7546. /* istanbul ignore if */
  7547. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  7548. vm.$options.el || el) {
  7549. warn(
  7550. 'You are using the runtime-only build of Vue where the template ' +
  7551. 'compiler is not available. Either pre-compile the templates into ' +
  7552. 'render functions, or use the compiler-included build.',
  7553. vm
  7554. );
  7555. } else {
  7556. warn(
  7557. 'Failed to mount component: template or render function not defined.',
  7558. vm
  7559. );
  7560. }
  7561. }
  7562. }
  7563. !vm._$fallback && callHook(vm, 'beforeMount');
  7564. var updateComponent = function () {
  7565. vm._update(vm._render(), hydrating);
  7566. };
  7567. // we set this to vm._watcher inside the watcher's constructor
  7568. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  7569. // component's mounted hook), which relies on vm._watcher being already defined
  7570. new Watcher(vm, updateComponent, noop, {
  7571. before: function before() {
  7572. if (vm._isMounted && !vm._isDestroyed) {
  7573. callHook(vm, 'beforeUpdate');
  7574. }
  7575. }
  7576. }, true /* isRenderWatcher */);
  7577. hydrating = false;
  7578. return vm
  7579. }
  7580. /* */
  7581. function renderClass (
  7582. staticClass,
  7583. dynamicClass
  7584. ) {
  7585. if (isDef(staticClass) || isDef(dynamicClass)) {
  7586. return concat(staticClass, stringifyClass(dynamicClass))
  7587. }
  7588. /* istanbul ignore next */
  7589. return ''
  7590. }
  7591. function concat (a, b) {
  7592. return a ? b ? (a + ' ' + b) : a : (b || '')
  7593. }
  7594. function stringifyClass (value) {
  7595. if (Array.isArray(value)) {
  7596. return stringifyArray(value)
  7597. }
  7598. if (isObject(value)) {
  7599. return stringifyObject(value)
  7600. }
  7601. if (typeof value === 'string') {
  7602. return value
  7603. }
  7604. /* istanbul ignore next */
  7605. return ''
  7606. }
  7607. function stringifyArray (value) {
  7608. var res = '';
  7609. var stringified;
  7610. for (var i = 0, l = value.length; i < l; i++) {
  7611. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  7612. if (res) { res += ' '; }
  7613. res += stringified;
  7614. }
  7615. }
  7616. return res
  7617. }
  7618. function stringifyObject (value) {
  7619. var res = '';
  7620. for (var key in value) {
  7621. if (value[key]) {
  7622. if (res) { res += ' '; }
  7623. res += key;
  7624. }
  7625. }
  7626. return res
  7627. }
  7628. /* */
  7629. var parseStyleText = cached(function (cssText) {
  7630. var res = {};
  7631. var listDelimiter = /;(?![^(]*\))/g;
  7632. var propertyDelimiter = /:(.+)/;
  7633. cssText.split(listDelimiter).forEach(function (item) {
  7634. if (item) {
  7635. var tmp = item.split(propertyDelimiter);
  7636. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  7637. }
  7638. });
  7639. return res
  7640. });
  7641. // normalize possible array / string values into Object
  7642. function normalizeStyleBinding (bindingStyle) {
  7643. if (Array.isArray(bindingStyle)) {
  7644. return toObject(bindingStyle)
  7645. }
  7646. if (typeof bindingStyle === 'string') {
  7647. return parseStyleText(bindingStyle)
  7648. }
  7649. return bindingStyle
  7650. }
  7651. /* */
  7652. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  7653. function getTarget(obj, path) {
  7654. var parts = path.split('.');
  7655. var key = parts[0];
  7656. if (key.indexOf('__$n') === 0) { //number index
  7657. key = parseInt(key.replace('__$n', ''));
  7658. }
  7659. if (parts.length === 1) {
  7660. return obj[key]
  7661. }
  7662. return getTarget(obj[key], parts.slice(1).join('.'))
  7663. }
  7664. function internalMixin(Vue) {
  7665. Vue.config.errorHandler = function(err, vm, info) {
  7666. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  7667. console.error(err);
  7668. /* eslint-disable no-undef */
  7669. var app = typeof getApp === 'function' && getApp();
  7670. if (app && app.onError) {
  7671. app.onError(err);
  7672. }
  7673. };
  7674. var oldEmit = Vue.prototype.$emit;
  7675. Vue.prototype.$emit = function(event) {
  7676. if (this.$scope && event) {
  7677. this.$scope['triggerEvent'](event, {
  7678. __args__: toArray(arguments, 1)
  7679. });
  7680. }
  7681. return oldEmit.apply(this, arguments)
  7682. };
  7683. Vue.prototype.$nextTick = function(fn) {
  7684. return nextTick$1(this, fn)
  7685. };
  7686. MP_METHODS.forEach(function (method) {
  7687. Vue.prototype[method] = function(args) {
  7688. if (this.$scope && this.$scope[method]) {
  7689. return this.$scope[method](args)
  7690. }
  7691. // mp-alipay
  7692. if (typeof my === 'undefined') {
  7693. return
  7694. }
  7695. if (method === 'createSelectorQuery') {
  7696. /* eslint-disable no-undef */
  7697. return my.createSelectorQuery(args)
  7698. } else if (method === 'createIntersectionObserver') {
  7699. /* eslint-disable no-undef */
  7700. return my.createIntersectionObserver(args)
  7701. }
  7702. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  7703. };
  7704. });
  7705. Vue.prototype.__init_provide = initProvide;
  7706. Vue.prototype.__init_injections = initInjections;
  7707. Vue.prototype.__call_hook = function(hook, args) {
  7708. var vm = this;
  7709. // #7573 disable dep collection when invoking lifecycle hooks
  7710. pushTarget();
  7711. var handlers = vm.$options[hook];
  7712. var info = hook + " hook";
  7713. var ret;
  7714. if (handlers) {
  7715. for (var i = 0, j = handlers.length; i < j; i++) {
  7716. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  7717. }
  7718. }
  7719. if (vm._hasHookEvent) {
  7720. vm.$emit('hook:' + hook, args);
  7721. }
  7722. popTarget();
  7723. return ret
  7724. };
  7725. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  7726. if (Array.isArray(modifiers)) {
  7727. if (modifiers.indexOf('trim') !== -1) {
  7728. value = value.trim();
  7729. }
  7730. if (modifiers.indexOf('number') !== -1) {
  7731. value = this._n(value);
  7732. }
  7733. }
  7734. if (!target) {
  7735. target = this;
  7736. }
  7737. target[key] = value;
  7738. };
  7739. Vue.prototype.__set_sync = function(target, key, value) {
  7740. if (!target) {
  7741. target = this;
  7742. }
  7743. target[key] = value;
  7744. };
  7745. Vue.prototype.__get_orig = function(item) {
  7746. if (isPlainObject(item)) {
  7747. return item['$orig'] || item
  7748. }
  7749. return item
  7750. };
  7751. Vue.prototype.__get_value = function(dataPath, target) {
  7752. return getTarget(target || this, dataPath)
  7753. };
  7754. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  7755. return renderClass(staticClass, dynamicClass)
  7756. };
  7757. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  7758. if (!dynamicStyle && !staticStyle) {
  7759. return ''
  7760. }
  7761. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  7762. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  7763. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  7764. };
  7765. Vue.prototype.__map = function(val, iteratee) {
  7766. //TODO 暂不考虑 string
  7767. var ret, i, l, keys, key;
  7768. if (Array.isArray(val)) {
  7769. ret = new Array(val.length);
  7770. for (i = 0, l = val.length; i < l; i++) {
  7771. ret[i] = iteratee(val[i], i);
  7772. }
  7773. return ret
  7774. } else if (isObject(val)) {
  7775. keys = Object.keys(val);
  7776. ret = Object.create(null);
  7777. for (i = 0, l = keys.length; i < l; i++) {
  7778. key = keys[i];
  7779. ret[key] = iteratee(val[key], key, i);
  7780. }
  7781. return ret
  7782. } else if (typeof val === 'number') {
  7783. ret = new Array(val);
  7784. for (i = 0, l = val; i < l; i++) {
  7785. // 第一个参数暂时仍和小程序一致
  7786. ret[i] = iteratee(i, i);
  7787. }
  7788. return ret
  7789. }
  7790. return []
  7791. };
  7792. }
  7793. /* */
  7794. var LIFECYCLE_HOOKS$1 = [
  7795. //App
  7796. 'onLaunch',
  7797. 'onShow',
  7798. 'onHide',
  7799. 'onUniNViewMessage',
  7800. 'onPageNotFound',
  7801. 'onThemeChange',
  7802. 'onError',
  7803. 'onUnhandledRejection',
  7804. //Page
  7805. 'onInit',
  7806. 'onLoad',
  7807. // 'onShow',
  7808. 'onReady',
  7809. // 'onHide',
  7810. 'onUnload',
  7811. 'onPullDownRefresh',
  7812. 'onReachBottom',
  7813. 'onTabItemTap',
  7814. 'onAddToFavorites',
  7815. 'onShareTimeline',
  7816. 'onShareAppMessage',
  7817. 'onResize',
  7818. 'onPageScroll',
  7819. 'onNavigationBarButtonTap',
  7820. 'onBackPress',
  7821. 'onNavigationBarSearchInputChanged',
  7822. 'onNavigationBarSearchInputConfirmed',
  7823. 'onNavigationBarSearchInputClicked',
  7824. //Component
  7825. // 'onReady', // 兼容旧版本,应该移除该事件
  7826. 'onPageShow',
  7827. 'onPageHide',
  7828. 'onPageResize'
  7829. ];
  7830. function lifecycleMixin$1(Vue) {
  7831. //fixed vue-class-component
  7832. var oldExtend = Vue.extend;
  7833. Vue.extend = function(extendOptions) {
  7834. extendOptions = extendOptions || {};
  7835. var methods = extendOptions.methods;
  7836. if (methods) {
  7837. Object.keys(methods).forEach(function (methodName) {
  7838. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  7839. extendOptions[methodName] = methods[methodName];
  7840. delete methods[methodName];
  7841. }
  7842. });
  7843. }
  7844. return oldExtend.call(this, extendOptions)
  7845. };
  7846. var strategies = Vue.config.optionMergeStrategies;
  7847. var mergeHook = strategies.created;
  7848. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  7849. strategies[hook] = mergeHook;
  7850. });
  7851. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  7852. }
  7853. /* */
  7854. // install platform patch function
  7855. Vue.prototype.__patch__ = patch;
  7856. // public mount method
  7857. Vue.prototype.$mount = function(
  7858. el ,
  7859. hydrating
  7860. ) {
  7861. return mountComponent$1(this, el, hydrating)
  7862. };
  7863. lifecycleMixin$1(Vue);
  7864. internalMixin(Vue);
  7865. /* */
  7866. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  7867. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  7868. /***/ }),
  7869. /***/ 20:
  7870. /*!**************************************************************************!*\
  7871. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/queryParams.js ***!
  7872. \**************************************************************************/
  7873. /*! no static exports found */
  7874. /***/ (function(module, exports, __webpack_require__) {
  7875. "use strict";
  7876. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  7877. * 对象转url参数
  7878. * @param {*} data,对象
  7879. * @param {*} isPrefix,是否自动加上"?"
  7880. */
  7881. function queryParams() {var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};var isPrefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;var arrayFormat = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'brackets';
  7882. var prefix = isPrefix ? '?' : '';
  7883. var _result = [];
  7884. if (['indices', 'brackets', 'repeat', 'comma'].indexOf(arrayFormat) == -1) arrayFormat = 'brackets';var _loop = function _loop(
  7885. key) {
  7886. var value = data[key];
  7887. // 去掉为空的参数
  7888. if (['', undefined, null].indexOf(value) >= 0) {
  7889. return "continue";
  7890. }
  7891. // 如果值为数组,另行处理
  7892. if (value.constructor === Array) {
  7893. // e.g. {ids: [1, 2, 3]}
  7894. switch (arrayFormat) {
  7895. case 'indices':
  7896. // 结果: ids[0]=1&ids[1]=2&ids[2]=3
  7897. for (var i = 0; i < value.length; i++) {
  7898. _result.push(key + '[' + i + ']=' + value[i]);
  7899. }
  7900. break;
  7901. case 'brackets':
  7902. // 结果: ids[]=1&ids[]=2&ids[]=3
  7903. value.forEach(function (_value) {
  7904. _result.push(key + '[]=' + _value);
  7905. });
  7906. break;
  7907. case 'repeat':
  7908. // 结果: ids=1&ids=2&ids=3
  7909. value.forEach(function (_value) {
  7910. _result.push(key + '=' + _value);
  7911. });
  7912. break;
  7913. case 'comma':
  7914. // 结果: ids=1,2,3
  7915. var commaStr = "";
  7916. value.forEach(function (_value) {
  7917. commaStr += (commaStr ? "," : "") + _value;
  7918. });
  7919. _result.push(key + '=' + commaStr);
  7920. break;
  7921. default:
  7922. value.forEach(function (_value) {
  7923. _result.push(key + '[]=' + _value);
  7924. });}
  7925. } else {
  7926. _result.push(key + '=' + value);
  7927. }};for (var key in data) {var _ret = _loop(key);if (_ret === "continue") continue;
  7928. }
  7929. return _result.length ? prefix + _result.join('&') : '';
  7930. }var _default =
  7931. queryParams;exports.default = _default;
  7932. /***/ }),
  7933. /***/ 200:
  7934. /*!************************************************************!*\
  7935. !*** G:/gsxm/git/yangdaxia/plugin/jweixin-module/index.js ***!
  7936. \************************************************************/
  7937. /*! no static exports found */
  7938. /***/ (function(module, exports, __webpack_require__) {
  7939. var __WEBPACK_AMD_DEFINE_RESULT__;function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}!function (e, n) { true ? !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {return n(e);}).call(exports, __webpack_require__, exports, module),
  7940. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;}(window, function (o, e) {if (!o.jWeixin) {var _w;var n,c = { config: "preVerifyJSAPI", onMenuShareTimeline: "menu:share:timeline", onMenuShareAppMessage: "menu:share:appmessage", onMenuShareQQ: "menu:share:qq", onMenuShareWeibo: "menu:share:weiboApp", onMenuShareQZone: "menu:share:QZone", previewImage: "imagePreview", getLocation: "geoLocation", openProductSpecificView: "openProductViewWithPid", addCard: "batchAddCard", openCard: "batchViewCard", chooseWXPay: "getBrandWCPayRequest", openEnterpriseRedPacket: "getRecevieBizHongBaoRequest", startSearchBeacons: "startMonitoringBeacons", stopSearchBeacons: "stopMonitoringBeacons", onSearchBeacons: "onBeaconsInRange", consumeAndShareCard: "consumedShareCard", openAddress: "editAddress" },a = function () {var e = {};for (var n in c) {e[c[n]] = n;}return e;}(),i = o.document,t = i.title,r = navigator.userAgent.toLowerCase(),s = navigator.platform.toLowerCase(),d = !(!s.match("mac") && !s.match("win")),u = -1 != r.indexOf("wxdebugger"),l = -1 != r.indexOf("micromessenger"),p = -1 != r.indexOf("android"),f = -1 != r.indexOf("iphone") || -1 != r.indexOf("ipad"),m = (n = r.match(/micromessenger\/(\d+\.\d+\.\d+)/) || r.match(/micromessenger\/(\d+\.\d+)/)) ? n[1] : "",g = { initStartTime: L(), initEndTime: 0, preVerifyStartTime: 0, preVerifyEndTime: 0 },h = { version: 1, appId: "", initTime: 0, preVerifyTime: 0, networkType: "", isPreVerifyOk: 1, systemType: f ? 1 : p ? 2 : -1, clientVersion: m, url: encodeURIComponent(location.href) },v = {},S = { _completes: [] },y = { state: 0, data: {} };O(function () {g.initEndTime = L();});var I = !1,_ = [],w = (_w = { config: function config(e) {B("config", v = e);var t = !1 !== v.check;O(function () {if (t) M(c.config, { verifyJsApiList: C(v.jsApiList), verifyOpenTagList: C(v.openTagList) }, function () {S._complete = function (e) {g.preVerifyEndTime = L(), y.state = 1, y.data = e;}, S.success = function (e) {h.isPreVerifyOk = 0;}, S.fail = function (e) {S._fail ? S._fail(e) : y.state = -1;};var t = S._completes;return t.push(function () {!function () {if (!(d || u || v.debug || m < "6.0.2" || h.systemType < 0)) {var i = new Image();h.appId = v.appId, h.initTime = g.initEndTime - g.initStartTime, h.preVerifyTime = g.preVerifyEndTime - g.preVerifyStartTime, w.getNetworkType({ isInnerInvoke: !0, success: function success(e) {h.networkType = e.networkType;var n = "https://open.weixin.qq.com/sdk/report?v=" + h.version + "&o=" + h.isPreVerifyOk + "&s=" + h.systemType + "&c=" + h.clientVersion + "&a=" + h.appId + "&n=" + h.networkType + "&i=" + h.initTime + "&p=" + h.preVerifyTime + "&u=" + h.url;i.src = n;} });}}();}), S.complete = function (e) {for (var n = 0, i = t.length; n < i; ++n) {t[n]();}S._completes = [];}, S;}()), g.preVerifyStartTime = L();else {y.state = 1;for (var e = S._completes, n = 0, i = e.length; n < i; ++n) {e[n]();}S._completes = [];}}), w.invoke || (w.invoke = function (e, n, i) {o.WeixinJSBridge && WeixinJSBridge.invoke(e, x(n), i);}, w.on = function (e, n) {o.WeixinJSBridge && WeixinJSBridge.on(e, n);});}, ready: function ready(e) {0 != y.state ? e() : (S._completes.push(e), !l && v.debug && e());}, error: function error(e) {m < "6.0.2" || (-1 == y.state ? e(y.data) : S._fail = e);}, checkJsApi: function checkJsApi(e) {M("checkJsApi", { jsApiList: C(e.jsApiList) }, (e._complete = function (e) {if (p) {var n = e.checkResult;n && (e.checkResult = JSON.parse(n));}e = function (e) {var n = e.checkResult;for (var i in n) {var t = a[i];t && (n[t] = n[i], delete n[i]);}return e;}(e);}, e));}, onMenuShareTimeline: function onMenuShareTimeline(e) {P(c.onMenuShareTimeline, { complete: function complete() {M("shareTimeline", { title: e.title || t, desc: e.title || t, img_url: e.imgUrl || "", link: e.link || location.href, type: e.type || "link", data_url: e.dataUrl || "" }, e);} }, e);}, onMenuShareAppMessage: function onMenuShareAppMessage(n) {P(c.onMenuShareAppMessage, { complete: function complete(e) {"favorite" === e.scene ? M("sendAppMessage", { title: n.title || t, desc: n.desc || "", link: n.link || location.href, img_url: n.imgUrl || "", type: n.type || "link", data_url: n.dataUrl || "" }) : M("sendAppMessage", { title: n.title || t, desc: n.desc || "", link: n.link || location.href, img_url: n.imgUrl || "", type: n.type || "link", data_url: n.dataUrl || "" }, n);} }, n);}, onMenuShareQQ: function onMenuShareQQ(e) {P(c.onMenuShareQQ, { complete: function complete() {M("shareQQ", { title: e.title || t, desc: e.desc || "", img_url: e.imgUrl || "", link: e.link || location.href }, e);} }, e);}, onMenuShareWeibo: function onMenuShareWeibo(e) {P(c.onMenuShareWeibo, { complete: function complete() {M("shareWeiboApp", { title: e.title || t, desc: e.desc || "", img_url: e.imgUrl || "", link: e.link || location.href }, e);} }, e);}, onMenuShareQZone: function onMenuShareQZone(e) {P(c.onMenuShareQZone, { complete: function complete() {M("shareQZone", { title: e.title || t, desc: e.desc || "", img_url: e.imgUrl || "", link: e.link || location.href }, e);} }, e);}, updateTimelineShareData: function updateTimelineShareData(e) {M("updateTimelineShareData", { title: e.title, link: e.link, imgUrl: e.imgUrl }, e);}, updateAppMessageShareData: function updateAppMessageShareData(e) {M("updateAppMessageShareData", { title: e.title, desc: e.desc, link: e.link, imgUrl: e.imgUrl }, e);}, startRecord: function startRecord(e) {M("startRecord", {}, e);}, stopRecord: function stopRecord(e) {M("stopRecord", {}, e);}, onVoiceRecordEnd: function onVoiceRecordEnd(e) {P("onVoiceRecordEnd", e);}, playVoice: function playVoice(e) {M("playVoice", { localId: e.localId }, e);}, pauseVoice: function pauseVoice(e) {M("pauseVoice", { localId: e.localId }, e);}, stopVoice: function stopVoice(e) {M("stopVoice", { localId: e.localId }, e);}, onVoicePlayEnd: function onVoicePlayEnd(e) {P("onVoicePlayEnd", e);}, uploadVoice: function uploadVoice(e) {M("uploadVoice", { localId: e.localId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, downloadVoice: function downloadVoice(e) {M("downloadVoice", { serverId: e.serverId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, translateVoice: function translateVoice(e) {M("translateVoice", { localId: e.localId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, chooseImage: function chooseImage(e) {M("chooseImage", { scene: "1|2", count: e.count || 9, sizeType: e.sizeType || ["original", "compressed"], sourceType: e.sourceType || ["album", "camera"] }, (e._complete = function (e) {if (p) {var n = e.localIds;try {n && (e.localIds = JSON.parse(n));} catch (e) {}}}, e));}, getLocation: function getLocation(e) {}, previewImage: function previewImage(e) {M(c.previewImage, { current: e.current, urls: e.urls }, e);}, uploadImage: function uploadImage(e) {M("uploadImage", { localId: e.localId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, downloadImage: function downloadImage(e) {M("downloadImage", { serverId: e.serverId, isShowProgressTips: 0 == e.isShowProgressTips ? 0 : 1 }, e);}, getLocalImgData: function getLocalImgData(e) {!1 === I ? (I = !0, M("getLocalImgData", { localId: e.localId }, (e._complete = function (e) {if (I = !1, 0 < _.length) {var n = _.shift();wx.getLocalImgData(n);}}, e))) : _.push(e);}, getNetworkType: function getNetworkType(e) {M("getNetworkType", {}, (e._complete = function (e) {e = function (e) {var n = e.errMsg;e.errMsg = "getNetworkType:ok";var i = e.subtype;if (delete e.subtype, i) e.networkType = i;else {var t = n.indexOf(":"),o = n.substring(t + 1);switch (o) {case "wifi":case "edge":case "wwan":e.networkType = o;break;default:e.errMsg = "getNetworkType:fail";}}return e;}(e);}, e));}, openLocation: function openLocation(e) {M("openLocation", { latitude: e.latitude, longitude: e.longitude, name: e.name || "", address: e.address || "", scale: e.scale || 28, infoUrl: e.infoUrl || "" }, e);} }, _defineProperty(_w, "getLocation", function getLocation(e) {M(c.getLocation, { type: (e = e || {}).type || "wgs84" }, (e._complete = function (e) {delete e.type;}, e));}), _defineProperty(_w, "hideOptionMenu", function hideOptionMenu(e) {M("hideOptionMenu", {}, e);}), _defineProperty(_w, "showOptionMenu", function showOptionMenu(e) {M("showOptionMenu", {}, e);}), _defineProperty(_w, "closeWindow", function closeWindow(e) {M("closeWindow", {}, e = e || {});}), _defineProperty(_w, "hideMenuItems", function hideMenuItems(e) {M("hideMenuItems", { menuList: e.menuList }, e);}), _defineProperty(_w, "showMenuItems", function showMenuItems(e) {M("showMenuItems", { menuList: e.menuList }, e);}), _defineProperty(_w, "hideAllNonBaseMenuItem", function hideAllNonBaseMenuItem(e) {M("hideAllNonBaseMenuItem", {}, e);}), _defineProperty(_w, "showAllNonBaseMenuItem", function showAllNonBaseMenuItem(e) {M("showAllNonBaseMenuItem", {}, e);}), _defineProperty(_w, "scanQRCode", function scanQRCode(e) {M("scanQRCode", { needResult: (e = e || {}).needResult || 0, scanType: e.scanType || ["qrCode", "barCode"] }, (e._complete = function (e) {if (f) {var n = e.resultStr;if (n) {var i = JSON.parse(n);e.resultStr = i && i.scan_code && i.scan_code.scan_result;}}}, e));}), _defineProperty(_w, "openAddress", function openAddress(e) {M(c.openAddress, {}, (e._complete = function (e) {e = function (e) {return e.postalCode = e.addressPostalCode, delete e.addressPostalCode, e.provinceName = e.proviceFirstStageName, delete e.proviceFirstStageName, e.cityName = e.addressCitySecondStageName, delete e.addressCitySecondStageName, e.countryName = e.addressCountiesThirdStageName, delete e.addressCountiesThirdStageName, e.detailInfo = e.addressDetailInfo, delete e.addressDetailInfo, e;}(e);}, e));}), _defineProperty(_w, "openProductSpecificView", function openProductSpecificView(e) {M(c.openProductSpecificView, { pid: e.productId, view_type: e.viewType || 0, ext_info: e.extInfo }, e);}), _defineProperty(_w, "addCard", function addCard(e) {for (var n = e.cardList, i = [], t = 0, o = n.length; t < o; ++t) {var r = n[t],a = { card_id: r.cardId, card_ext: r.cardExt };i.push(a);}M(c.addCard, { card_list: i }, (e._complete = function (e) {var n = e.card_list;if (n) {for (var i = 0, t = (n = JSON.parse(n)).length; i < t; ++i) {var o = n[i];o.cardId = o.card_id, o.cardExt = o.card_ext, o.isSuccess = !!o.is_succ, delete o.card_id, delete o.card_ext, delete o.is_succ;}e.cardList = n, delete e.card_list;}}, e));}), _defineProperty(_w, "chooseCard", function chooseCard(e) {M("chooseCard", { app_id: v.appId, location_id: e.shopId || "", sign_type: e.signType || "SHA1", card_id: e.cardId || "", card_type: e.cardType || "", card_sign: e.cardSign, time_stamp: e.timestamp + "", nonce_str: e.nonceStr }, (e._complete = function (e) {e.cardList = e.choose_card_info, delete e.choose_card_info;}, e));}), _defineProperty(_w, "openCard", function openCard(e) {for (var n = e.cardList, i = [], t = 0, o = n.length; t < o; ++t) {var r = n[t],a = { card_id: r.cardId, code: r.code };i.push(a);}M(c.openCard, { card_list: i }, e);}), _defineProperty(_w, "consumeAndShareCard", function consumeAndShareCard(e) {M(c.consumeAndShareCard, { consumedCardId: e.cardId, consumedCode: e.code }, e);}), _defineProperty(_w, "chooseWXPay", function chooseWXPay(e) {M(c.chooseWXPay, V(e), e);}), _defineProperty(_w, "openEnterpriseRedPacket", function openEnterpriseRedPacket(e) {M(c.openEnterpriseRedPacket, V(e), e);}), _defineProperty(_w, "startSearchBeacons", function startSearchBeacons(e) {M(c.startSearchBeacons, { ticket: e.ticket }, e);}), _defineProperty(_w, "stopSearchBeacons", function stopSearchBeacons(e) {M(c.stopSearchBeacons, {}, e);}), _defineProperty(_w, "onSearchBeacons", function onSearchBeacons(e) {P(c.onSearchBeacons, e);}), _defineProperty(_w, "openEnterpriseChat", function openEnterpriseChat(e) {M("openEnterpriseChat", { useridlist: e.userIds, chatname: e.groupName }, e);}), _defineProperty(_w, "launchMiniProgram", function launchMiniProgram(e) {M("launchMiniProgram", { targetAppId: e.targetAppId, path: function (e) {if ("string" == typeof e && 0 < e.length) {var n = e.split("?")[0],i = e.split("?")[1];return n += ".html", void 0 !== i ? n + "?" + i : n;}}(e.path), envVersion: e.envVersion }, e);}), _defineProperty(_w, "openBusinessView", function openBusinessView(e) {M("openBusinessView", { businessType: e.businessType, queryString: e.queryString || "", envVersion: e.envVersion }, (e._complete = function (n) {if (p) {var e = n.extraData;if (e) try {n.extraData = JSON.parse(e);} catch (e) {n.extraData = {};}}}, e));}), _defineProperty(_w, "miniProgram", { navigateBack: function navigateBack(e) {e = e || {}, O(function () {M("invokeMiniProgramAPI", { name: "navigateBack", arg: { delta: e.delta || 1 } }, e);});}, navigateTo: function navigateTo(e) {O(function () {M("invokeMiniProgramAPI", { name: "navigateTo", arg: { url: e.url } }, e);});}, redirectTo: function redirectTo(e) {O(function () {M("invokeMiniProgramAPI", { name: "redirectTo", arg: { url: e.url } }, e);});}, switchTab: function switchTab(e) {O(function () {M("invokeMiniProgramAPI", { name: "switchTab", arg: { url: e.url } }, e);});}, reLaunch: function reLaunch(e) {O(function () {M("invokeMiniProgramAPI", { name: "reLaunch", arg: { url: e.url } }, e);});}, postMessage: function postMessage(e) {O(function () {M("invokeMiniProgramAPI", { name: "postMessage", arg: e.data || {} }, e);});}, getEnv: function getEnv(e) {O(function () {e({ miniprogram: "miniprogram" === o.__wxjs_environment });});} }), _w),T = 1,k = {};return i.addEventListener("error", function (e) {if (!p) {var n = e.target,i = n.tagName,t = n.src;if ("IMG" == i || "VIDEO" == i || "AUDIO" == i || "SOURCE" == i) if (-1 != t.indexOf("wxlocalresource://")) {e.preventDefault(), e.stopPropagation();var o = n["wx-id"];if (o || (o = T++, n["wx-id"] = o), k[o]) return;k[o] = !0, wx.ready(function () {wx.getLocalImgData({ localId: t, success: function success(e) {n.src = e.localData;} });});}}}, !0), i.addEventListener("load", function (e) {if (!p) {var n = e.target,i = n.tagName;n.src;if ("IMG" == i || "VIDEO" == i || "AUDIO" == i || "SOURCE" == i) {var t = n["wx-id"];t && (k[t] = !1);}}}, !0), e && (o.wx = o.jWeixin = w), w;}function M(n, e, i) {o.WeixinJSBridge ? WeixinJSBridge.invoke(n, x(e), function (e) {A(n, e, i);}) : B(n, i);}function P(n, i, t) {o.WeixinJSBridge ? WeixinJSBridge.on(n, function (e) {t && t.trigger && t.trigger(e), A(n, e, i);}) : B(n, t || i);}function x(e) {return (e = e || {}).appId = v.appId, e.verifyAppId = v.appId, e.verifySignType = "sha1", e.verifyTimestamp = v.timestamp + "", e.verifyNonceStr = v.nonceStr, e.verifySignature = v.signature, e;}function V(e) {return { timeStamp: e.timestamp + "", nonceStr: e.nonceStr, package: e.package, paySign: e.paySign, signType: e.signType || "SHA1" };}function A(e, n, i) {"openEnterpriseChat" != e && "openBusinessView" !== e || (n.errCode = n.err_code), delete n.err_code, delete n.err_desc, delete n.err_detail;var t = n.errMsg;t || (t = n.err_msg, delete n.err_msg, t = function (e, n) {var i = e,t = a[i];t && (i = t);var o = "ok";if (n) {var r = n.indexOf(":");"confirm" == (o = n.substring(r + 1)) && (o = "ok"), "failed" == o && (o = "fail"), -1 != o.indexOf("failed_") && (o = o.substring(7)), -1 != o.indexOf("fail_") && (o = o.substring(5)), "access denied" != (o = (o = o.replace(/_/g, " ")).toLowerCase()) && "no permission to execute" != o || (o = "permission denied"), "config" == i && "function not exist" == o && (o = "ok"), "" == o && (o = "fail");}return n = i + ":" + o;}(e, t), n.errMsg = t), (i = i || {})._complete && (i._complete(n), delete i._complete), t = n.errMsg || "", v.debug && !i.isInnerInvoke && alert(JSON.stringify(n));var o = t.indexOf(":");switch (t.substring(o + 1)) {case "ok":i.success && i.success(n);break;case "cancel":i.cancel && i.cancel(n);break;default:i.fail && i.fail(n);}i.complete && i.complete(n);}function C(e) {if (e) {for (var n = 0, i = e.length; n < i; ++n) {var t = e[n],o = c[t];o && (e[n] = o);}return e;}}function B(e, n) {if (!(!v.debug || n && n.isInnerInvoke)) {var i = a[e];i && (e = i), n && n._complete && delete n._complete, console.log('"' + e + '",', n || "");}}function L() {return new Date().getTime();}function O(e) {l && (o.WeixinJSBridge ? e() : i.addEventListener && i.addEventListener("WeixinJSBridgeReady", e, !1));}});
  7941. /***/ }),
  7942. /***/ 209:
  7943. /*!*******************************************!*\
  7944. !*** G:/gsxm/git/yangdaxia/api/wallet.js ***!
  7945. \*******************************************/
  7946. /*! no static exports found */
  7947. /***/ (function(module, exports, __webpack_require__) {
  7948. "use strict";
  7949. Object.defineProperty(exports, "__esModule", { value: true });exports.spreadCommission = spreadCommission;exports.userBalance = userBalance;exports.extractCash = extractCash;exports.extractBank = extractBank;exports.rechargeRoutine = rechargeRoutine;exports.aliInfo = aliInfo;exports.bankInfo = bankInfo;exports.setAliInfo = setAliInfo;exports.setBankInfo = setBankInfo;exports.balance = balance;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 50));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  7950. // 获取用户消费记录
  7951. function spreadCommission(data, state) {
  7952. return (0, _request.default)({
  7953. url: '/api/spread/commission/' + state,
  7954. method: 'get',
  7955. data: data });
  7956. }
  7957. // 获取账户余额
  7958. function userBalance(data) {
  7959. return (0, _request.default)({
  7960. url: '/api/user/balance',
  7961. method: 'get',
  7962. data: data });
  7963. }
  7964. // 提现
  7965. function extractCash(data) {
  7966. return (0, _request.default)({
  7967. url: '/api/extract/cash',
  7968. method: 'post',
  7969. data: data });
  7970. }
  7971. // 提现信息
  7972. function extractBank(data) {
  7973. return (0, _request.default)({
  7974. url: '/api/extract/bank',
  7975. method: 'get',
  7976. data: data });
  7977. }
  7978. // 小程序充值
  7979. function rechargeRoutine(data) {
  7980. return (0, _request.default)({
  7981. url: '/api/recharge/routine',
  7982. method: 'post',
  7983. data: data });
  7984. }
  7985. // 获取提现支付宝账号
  7986. function aliInfo(data) {
  7987. return (0, _request.default)({
  7988. url: '/api/ali/info',
  7989. method: 'get',
  7990. data: data });
  7991. }
  7992. //获取默认银行卡账号
  7993. function bankInfo(data) {
  7994. return (0, _request.default)({
  7995. url: '/api/bank/info',
  7996. method: 'get',
  7997. data: data });
  7998. }
  7999. // 保存提现支付宝账号
  8000. function setAliInfo(data) {
  8001. return (0, _request.default)({
  8002. url: '/api/ali/edit',
  8003. method: 'post',
  8004. data: data });
  8005. }
  8006. //保存默认银行卡账号
  8007. function setBankInfo(data) {
  8008. return (0, _request.default)({
  8009. url: '/api/bank/edit',
  8010. method: 'post',
  8011. data: data });
  8012. }
  8013. // 账户余额
  8014. function balance(data) {
  8015. return (0, _request.default)({
  8016. url: '/api/user/balance',
  8017. method: 'get',
  8018. data: data });
  8019. }
  8020. /***/ }),
  8021. /***/ 21:
  8022. /*!********************************************************************!*\
  8023. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/route.js ***!
  8024. \********************************************************************/
  8025. /*! no static exports found */
  8026. /***/ (function(module, exports, __webpack_require__) {
  8027. "use strict";
  8028. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 22));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}function _classCallCheck(instance, Constructor) {if (!(instance instanceof Constructor)) {throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target, props) {for (var i = 0; i < props.length; i++) {var descriptor = props[i];descriptor.enumerable = descriptor.enumerable || false;descriptor.configurable = true;if ("value" in descriptor) descriptor.writable = true;Object.defineProperty(target, descriptor.key, descriptor);}}function _createClass(Constructor, protoProps, staticProps) {if (protoProps) _defineProperties(Constructor.prototype, protoProps);if (staticProps) _defineProperties(Constructor, staticProps);return Constructor;} /**
  8029. * 路由跳转方法,该方法相对于直接使用uni.xxx的好处是使用更加简单快捷
  8030. * 并且带有路由拦截功能
  8031. */var
  8032. Router = /*#__PURE__*/function () {
  8033. function Router() {_classCallCheck(this, Router);
  8034. // 原始属性定义
  8035. this.config = {
  8036. type: 'navigateTo',
  8037. url: '',
  8038. delta: 1, // navigateBack页面后退时,回退的层数
  8039. params: {}, // 传递的参数
  8040. animationType: 'pop-in', // 窗口动画,只在APP有效
  8041. animationDuration: 300, // 窗口动画持续时间,单位毫秒,只在APP有效
  8042. intercept: false // 是否需要拦截
  8043. };
  8044. // 因为route方法是需要对外赋值给另外的对象使用,同时route内部有使用this,会导致route失去上下文
  8045. // 这里在构造函数中进行this绑定
  8046. this.route = this.route.bind(this);
  8047. }
  8048. // 判断url前面是否有"/",如果没有则加上,否则无法跳转
  8049. _createClass(Router, [{ key: "addRootPath", value: function addRootPath(url) {
  8050. return url[0] === '/' ? url : "/".concat(url);
  8051. }
  8052. // 整合路由参数
  8053. }, { key: "mixinParam", value: function mixinParam(url, params) {
  8054. url = url && this.addRootPath(url);
  8055. // 使用正则匹配,主要依据是判断是否有"/","?","="等,如“/page/index/index?name=mary"
  8056. // 如果有url中有get参数,转换后无需带上"?"
  8057. var query = '';
  8058. if (/.*\/.*\?.*=.*/.test(url)) {
  8059. // object对象转为get类型的参数
  8060. query = uni.$u.queryParams(params, false);
  8061. // 因为已有get参数,所以后面拼接的参数需要带上"&"隔开
  8062. return url += "&" + query;
  8063. } else {
  8064. // 直接拼接参数,因为此处url中没有后面的query参数,也就没有"?/&"之类的符号
  8065. query = uni.$u.queryParams(params);
  8066. return url += query;
  8067. }
  8068. }
  8069. // 对外的方法名称
  8070. }, { key: "route", value: function () {var _route = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee() {var options,params,mergeConfig,isNext,_args = arguments;return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:options = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};params = _args.length > 1 && _args[1] !== undefined ? _args[1] : {};
  8071. // 合并用户的配置和内部的默认配置
  8072. mergeConfig = {};
  8073. if (typeof options === 'string') {
  8074. // 如果options为字符串,则为route(url, params)的形式
  8075. mergeConfig.url = this.mixinParam(options, params);
  8076. mergeConfig.type = 'navigateTo';
  8077. } else {
  8078. mergeConfig = uni.$u.deepClone(options, this.config);
  8079. // 否则正常使用mergeConfig中的url和params进行拼接
  8080. mergeConfig.url = this.mixinParam(options.url, options.params);
  8081. }
  8082. if (params.intercept) {
  8083. this.config.intercept = params.intercept;
  8084. }
  8085. // params参数也带给拦截器
  8086. mergeConfig.params = params;
  8087. // 合并内外部参数
  8088. mergeConfig = uni.$u.deepMerge(this.config, mergeConfig);
  8089. // 判断用户是否定义了拦截器
  8090. if (!(typeof uni.$u.routeIntercept === 'function')) {_context.next = 14;break;}_context.next = 10;return (
  8091. new Promise(function (resolve, reject) {
  8092. uni.$u.routeIntercept(mergeConfig, resolve);
  8093. }));case 10:isNext = _context.sent;
  8094. // 如果isNext为true,则执行路由跳转
  8095. isNext && this.openPage(mergeConfig);_context.next = 15;break;case 14:
  8096. this.openPage(mergeConfig);case 15:case "end":return _context.stop();}}}, _callee, this);}));function route() {return _route.apply(this, arguments);}return route;}()
  8097. // 执行路由跳转
  8098. }, { key: "openPage", value: function openPage(config) {
  8099. // 解构参数
  8100. var
  8101. url =
  8102. config.url,type = config.type,delta = config.delta,animationType = config.animationType,animationDuration = config.animationDuration;
  8103. if (config.type == 'navigateTo' || config.type == 'to') {
  8104. uni.navigateTo({
  8105. url: url,
  8106. animationType: animationType,
  8107. animationDuration: animationDuration });
  8108. }
  8109. if (config.type == 'redirectTo' || config.type == 'redirect') {
  8110. uni.redirectTo({
  8111. url: url });
  8112. }
  8113. if (config.type == 'switchTab' || config.type == 'tab') {
  8114. uni.switchTab({
  8115. url: url });
  8116. }
  8117. if (config.type == 'reLaunch' || config.type == 'launch') {
  8118. uni.reLaunch({
  8119. url: url });
  8120. }
  8121. if (config.type == 'navigateBack' || config.type == 'back') {
  8122. uni.navigateBack({
  8123. delta: delta });
  8124. }
  8125. } }]);return Router;}();var _default =
  8126. new Router().route;exports.default = _default;
  8127. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  8128. /***/ }),
  8129. /***/ 210:
  8130. /*!***********************************************!*\
  8131. !*** G:/gsxm/git/yangdaxia/utils/rocessor.js ***!
  8132. \***********************************************/
  8133. /*! no static exports found */
  8134. /***/ (function(module, exports, __webpack_require__) {
  8135. "use strict";
  8136. Object.defineProperty(exports, "__esModule", { value: true });exports.isCardNo = isCardNo;exports.getMoneyStyle = getMoneyStyle;exports.timeComputed = timeComputed;exports.openMap = openMap;exports.getTime = getTime; //身份证验证
  8137. function isCardNo(card) {
  8138. // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
  8139. var reg =
  8140. /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/;
  8141. if (reg.test(card) === false) {
  8142. console.log(card);
  8143. return false;
  8144. }
  8145. return true;
  8146. }
  8147. // 金额显示变化
  8148. function getMoneyStyle() {var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  8149. if (typeof value == 'string') {
  8150. value = (+value).toFixed(2);
  8151. }
  8152. if (typeof value == 'number') {
  8153. value = value.toFixed(2);
  8154. }
  8155. // 将字符串转为数组
  8156. var n = value.split("");
  8157. // 反转数组并复制循环处理
  8158. var arr = n.reverse().map(function (e, ind, ar) {
  8159. // 判断当前下标是否为3的整数倍数且不为最后一个下标
  8160. if (ind % 3 == 0 && ind / 3 > 1 && ind != ar.length) {
  8161. return e + ',';
  8162. } else {
  8163. return e;
  8164. }
  8165. });
  8166. // 反转数组回复原来排序并合并回字符串
  8167. arr = arr.reverse().join('');
  8168. return arr;
  8169. }
  8170. // 倒计时计算
  8171. // 计算倒计时时间
  8172. function timeComputed(time) {
  8173. // 获取当前时间
  8174. var actTime = new Date().getTime();
  8175. // 获取到期时间
  8176. var stopTime = time - actTime;
  8177. // 判断是否小于0
  8178. if (stopTime < 0) {
  8179. stopTime = stopTime * -1;
  8180. }
  8181. var day = Math.floor(stopTime / 1000 / 60 / 60 / 24); //获取剩余天数
  8182. var hours = Math.floor(stopTime / 1000 / 60 / 60 % 24); //获取剩余小时数
  8183. var minutes = Math.floor(stopTime / 1000 / 60 % 60); //获取分钟
  8184. var seconds = Math.floor(stopTime / 1000 % 60); //获取秒数
  8185. return {
  8186. hours: hours, //倒计时小时数
  8187. minutes: minutes, //倒计时分钟数
  8188. seconds: seconds, //倒计时秒数
  8189. day: day //倒计时天数
  8190. };
  8191. }
  8192. // 调用打开地图方法
  8193. function openMap(e) {
  8194. var that = this;
  8195. return new Promise(function (resolve, reject) {
  8196. wx.getSetting({
  8197. success: function success(res) {
  8198. //这里判断是否有地位权限
  8199. if (!res.authSetting['scope.userLocation']) {
  8200. wx.showModal({
  8201. title: '提示',
  8202. content: '请求获取位置权限',
  8203. success: function success(res) {
  8204. if (res.confirm == false) {
  8205. // 授权失败
  8206. reject();
  8207. return false;
  8208. }
  8209. wx.openSetting({
  8210. success: function success(res) {
  8211. //如果再次拒绝则返回页面并提示
  8212. if (!res.authSetting['scope.userLocation']) {
  8213. wx.showToast({
  8214. title: '此功能需获取位置信息,请重新设置',
  8215. duration: 3000,
  8216. icon: 'none' });
  8217. } else {
  8218. //允许授权,调用地图
  8219. resolve();
  8220. }
  8221. } });
  8222. } });
  8223. } else {
  8224. //如果有定位权限,调用地图
  8225. resolve();
  8226. }
  8227. } });
  8228. });
  8229. }
  8230. //时间戳转换成时间
  8231. function getTime(time) {
  8232. var num = 13 - (time + '').length;
  8233. var l = 1; //倍数
  8234. for (var i = 0; i < num; i++) {
  8235. l += '0';
  8236. }
  8237. // 重新解析为数字
  8238. l = parseInt(l);
  8239. var date = new Date(parseInt(time) * l);
  8240. var year = date.getFullYear();
  8241. var mon = date.getMonth() + 1;
  8242. var day = date.getDate();
  8243. var hours = date.getHours();
  8244. var minu = date.getMinutes();
  8245. var sec = date.getSeconds();
  8246. return year + '-' + mon + '-' + day + ' ' + hours + ':' + minu + ':' + sec;
  8247. }
  8248. /***/ }),
  8249. /***/ 22:
  8250. /*!**********************************************************!*\
  8251. !*** ./node_modules/@babel/runtime/regenerator/index.js ***!
  8252. \**********************************************************/
  8253. /*! no static exports found */
  8254. /***/ (function(module, exports, __webpack_require__) {
  8255. module.exports = __webpack_require__(/*! regenerator-runtime */ 23);
  8256. /***/ }),
  8257. /***/ 23:
  8258. /*!************************************************************!*\
  8259. !*** ./node_modules/regenerator-runtime/runtime-module.js ***!
  8260. \************************************************************/
  8261. /*! no static exports found */
  8262. /***/ (function(module, exports, __webpack_require__) {
  8263. /**
  8264. * Copyright (c) 2014-present, Facebook, Inc.
  8265. *
  8266. * This source code is licensed under the MIT license found in the
  8267. * LICENSE file in the root directory of this source tree.
  8268. */
  8269. // This method of obtaining a reference to the global object needs to be
  8270. // kept identical to the way it is obtained in runtime.js
  8271. var g = (function() {
  8272. return this || (typeof self === "object" && self);
  8273. })() || Function("return this")();
  8274. // Use `getOwnPropertyNames` because not all browsers support calling
  8275. // `hasOwnProperty` on the global `self` object in a worker. See #183.
  8276. var hadRuntime = g.regeneratorRuntime &&
  8277. Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0;
  8278. // Save the old regeneratorRuntime in case it needs to be restored later.
  8279. var oldRuntime = hadRuntime && g.regeneratorRuntime;
  8280. // Force reevalutation of runtime.js.
  8281. g.regeneratorRuntime = undefined;
  8282. module.exports = __webpack_require__(/*! ./runtime */ 24);
  8283. if (hadRuntime) {
  8284. // Restore the original runtime.
  8285. g.regeneratorRuntime = oldRuntime;
  8286. } else {
  8287. // Remove the global property added by runtime.js.
  8288. try {
  8289. delete g.regeneratorRuntime;
  8290. } catch(e) {
  8291. g.regeneratorRuntime = undefined;
  8292. }
  8293. }
  8294. /***/ }),
  8295. /***/ 24:
  8296. /*!*****************************************************!*\
  8297. !*** ./node_modules/regenerator-runtime/runtime.js ***!
  8298. \*****************************************************/
  8299. /*! no static exports found */
  8300. /***/ (function(module, exports) {
  8301. /**
  8302. * Copyright (c) 2014-present, Facebook, Inc.
  8303. *
  8304. * This source code is licensed under the MIT license found in the
  8305. * LICENSE file in the root directory of this source tree.
  8306. */
  8307. !(function(global) {
  8308. "use strict";
  8309. var Op = Object.prototype;
  8310. var hasOwn = Op.hasOwnProperty;
  8311. var undefined; // More compressible than void 0.
  8312. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  8313. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  8314. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  8315. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  8316. var inModule = typeof module === "object";
  8317. var runtime = global.regeneratorRuntime;
  8318. if (runtime) {
  8319. if (inModule) {
  8320. // If regeneratorRuntime is defined globally and we're in a module,
  8321. // make the exports object identical to regeneratorRuntime.
  8322. module.exports = runtime;
  8323. }
  8324. // Don't bother evaluating the rest of this file if the runtime was
  8325. // already defined globally.
  8326. return;
  8327. }
  8328. // Define the runtime globally (as expected by generated code) as either
  8329. // module.exports (if we're in a module) or a new, empty object.
  8330. runtime = global.regeneratorRuntime = inModule ? module.exports : {};
  8331. function wrap(innerFn, outerFn, self, tryLocsList) {
  8332. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  8333. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  8334. var generator = Object.create(protoGenerator.prototype);
  8335. var context = new Context(tryLocsList || []);
  8336. // The ._invoke method unifies the implementations of the .next,
  8337. // .throw, and .return methods.
  8338. generator._invoke = makeInvokeMethod(innerFn, self, context);
  8339. return generator;
  8340. }
  8341. runtime.wrap = wrap;
  8342. // Try/catch helper to minimize deoptimizations. Returns a completion
  8343. // record like context.tryEntries[i].completion. This interface could
  8344. // have been (and was previously) designed to take a closure to be
  8345. // invoked without arguments, but in all the cases we care about we
  8346. // already have an existing method we want to call, so there's no need
  8347. // to create a new function object. We can even get away with assuming
  8348. // the method takes exactly one argument, since that happens to be true
  8349. // in every case, so we don't have to touch the arguments object. The
  8350. // only additional allocation required is the completion record, which
  8351. // has a stable shape and so hopefully should be cheap to allocate.
  8352. function tryCatch(fn, obj, arg) {
  8353. try {
  8354. return { type: "normal", arg: fn.call(obj, arg) };
  8355. } catch (err) {
  8356. return { type: "throw", arg: err };
  8357. }
  8358. }
  8359. var GenStateSuspendedStart = "suspendedStart";
  8360. var GenStateSuspendedYield = "suspendedYield";
  8361. var GenStateExecuting = "executing";
  8362. var GenStateCompleted = "completed";
  8363. // Returning this object from the innerFn has the same effect as
  8364. // breaking out of the dispatch switch statement.
  8365. var ContinueSentinel = {};
  8366. // Dummy constructor functions that we use as the .constructor and
  8367. // .constructor.prototype properties for functions that return Generator
  8368. // objects. For full spec compliance, you may wish to configure your
  8369. // minifier not to mangle the names of these two functions.
  8370. function Generator() {}
  8371. function GeneratorFunction() {}
  8372. function GeneratorFunctionPrototype() {}
  8373. // This is a polyfill for %IteratorPrototype% for environments that
  8374. // don't natively support it.
  8375. var IteratorPrototype = {};
  8376. IteratorPrototype[iteratorSymbol] = function () {
  8377. return this;
  8378. };
  8379. var getProto = Object.getPrototypeOf;
  8380. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  8381. if (NativeIteratorPrototype &&
  8382. NativeIteratorPrototype !== Op &&
  8383. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  8384. // This environment has a native %IteratorPrototype%; use it instead
  8385. // of the polyfill.
  8386. IteratorPrototype = NativeIteratorPrototype;
  8387. }
  8388. var Gp = GeneratorFunctionPrototype.prototype =
  8389. Generator.prototype = Object.create(IteratorPrototype);
  8390. GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
  8391. GeneratorFunctionPrototype.constructor = GeneratorFunction;
  8392. GeneratorFunctionPrototype[toStringTagSymbol] =
  8393. GeneratorFunction.displayName = "GeneratorFunction";
  8394. // Helper for defining the .next, .throw, and .return methods of the
  8395. // Iterator interface in terms of a single ._invoke method.
  8396. function defineIteratorMethods(prototype) {
  8397. ["next", "throw", "return"].forEach(function(method) {
  8398. prototype[method] = function(arg) {
  8399. return this._invoke(method, arg);
  8400. };
  8401. });
  8402. }
  8403. runtime.isGeneratorFunction = function(genFun) {
  8404. var ctor = typeof genFun === "function" && genFun.constructor;
  8405. return ctor
  8406. ? ctor === GeneratorFunction ||
  8407. // For the native GeneratorFunction constructor, the best we can
  8408. // do is to check its .name property.
  8409. (ctor.displayName || ctor.name) === "GeneratorFunction"
  8410. : false;
  8411. };
  8412. runtime.mark = function(genFun) {
  8413. if (Object.setPrototypeOf) {
  8414. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  8415. } else {
  8416. genFun.__proto__ = GeneratorFunctionPrototype;
  8417. if (!(toStringTagSymbol in genFun)) {
  8418. genFun[toStringTagSymbol] = "GeneratorFunction";
  8419. }
  8420. }
  8421. genFun.prototype = Object.create(Gp);
  8422. return genFun;
  8423. };
  8424. // Within the body of any async function, `await x` is transformed to
  8425. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  8426. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  8427. // meant to be awaited.
  8428. runtime.awrap = function(arg) {
  8429. return { __await: arg };
  8430. };
  8431. function AsyncIterator(generator) {
  8432. function invoke(method, arg, resolve, reject) {
  8433. var record = tryCatch(generator[method], generator, arg);
  8434. if (record.type === "throw") {
  8435. reject(record.arg);
  8436. } else {
  8437. var result = record.arg;
  8438. var value = result.value;
  8439. if (value &&
  8440. typeof value === "object" &&
  8441. hasOwn.call(value, "__await")) {
  8442. return Promise.resolve(value.__await).then(function(value) {
  8443. invoke("next", value, resolve, reject);
  8444. }, function(err) {
  8445. invoke("throw", err, resolve, reject);
  8446. });
  8447. }
  8448. return Promise.resolve(value).then(function(unwrapped) {
  8449. // When a yielded Promise is resolved, its final value becomes
  8450. // the .value of the Promise<{value,done}> result for the
  8451. // current iteration.
  8452. result.value = unwrapped;
  8453. resolve(result);
  8454. }, function(error) {
  8455. // If a rejected Promise was yielded, throw the rejection back
  8456. // into the async generator function so it can be handled there.
  8457. return invoke("throw", error, resolve, reject);
  8458. });
  8459. }
  8460. }
  8461. var previousPromise;
  8462. function enqueue(method, arg) {
  8463. function callInvokeWithMethodAndArg() {
  8464. return new Promise(function(resolve, reject) {
  8465. invoke(method, arg, resolve, reject);
  8466. });
  8467. }
  8468. return previousPromise =
  8469. // If enqueue has been called before, then we want to wait until
  8470. // all previous Promises have been resolved before calling invoke,
  8471. // so that results are always delivered in the correct order. If
  8472. // enqueue has not been called before, then it is important to
  8473. // call invoke immediately, without waiting on a callback to fire,
  8474. // so that the async generator function has the opportunity to do
  8475. // any necessary setup in a predictable way. This predictability
  8476. // is why the Promise constructor synchronously invokes its
  8477. // executor callback, and why async functions synchronously
  8478. // execute code before the first await. Since we implement simple
  8479. // async functions in terms of async generators, it is especially
  8480. // important to get this right, even though it requires care.
  8481. previousPromise ? previousPromise.then(
  8482. callInvokeWithMethodAndArg,
  8483. // Avoid propagating failures to Promises returned by later
  8484. // invocations of the iterator.
  8485. callInvokeWithMethodAndArg
  8486. ) : callInvokeWithMethodAndArg();
  8487. }
  8488. // Define the unified helper method that is used to implement .next,
  8489. // .throw, and .return (see defineIteratorMethods).
  8490. this._invoke = enqueue;
  8491. }
  8492. defineIteratorMethods(AsyncIterator.prototype);
  8493. AsyncIterator.prototype[asyncIteratorSymbol] = function () {
  8494. return this;
  8495. };
  8496. runtime.AsyncIterator = AsyncIterator;
  8497. // Note that simple async functions are implemented on top of
  8498. // AsyncIterator objects; they just return a Promise for the value of
  8499. // the final result produced by the iterator.
  8500. runtime.async = function(innerFn, outerFn, self, tryLocsList) {
  8501. var iter = new AsyncIterator(
  8502. wrap(innerFn, outerFn, self, tryLocsList)
  8503. );
  8504. return runtime.isGeneratorFunction(outerFn)
  8505. ? iter // If outerFn is a generator, return the full iterator.
  8506. : iter.next().then(function(result) {
  8507. return result.done ? result.value : iter.next();
  8508. });
  8509. };
  8510. function makeInvokeMethod(innerFn, self, context) {
  8511. var state = GenStateSuspendedStart;
  8512. return function invoke(method, arg) {
  8513. if (state === GenStateExecuting) {
  8514. throw new Error("Generator is already running");
  8515. }
  8516. if (state === GenStateCompleted) {
  8517. if (method === "throw") {
  8518. throw arg;
  8519. }
  8520. // Be forgiving, per 25.3.3.3.3 of the spec:
  8521. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  8522. return doneResult();
  8523. }
  8524. context.method = method;
  8525. context.arg = arg;
  8526. while (true) {
  8527. var delegate = context.delegate;
  8528. if (delegate) {
  8529. var delegateResult = maybeInvokeDelegate(delegate, context);
  8530. if (delegateResult) {
  8531. if (delegateResult === ContinueSentinel) continue;
  8532. return delegateResult;
  8533. }
  8534. }
  8535. if (context.method === "next") {
  8536. // Setting context._sent for legacy support of Babel's
  8537. // function.sent implementation.
  8538. context.sent = context._sent = context.arg;
  8539. } else if (context.method === "throw") {
  8540. if (state === GenStateSuspendedStart) {
  8541. state = GenStateCompleted;
  8542. throw context.arg;
  8543. }
  8544. context.dispatchException(context.arg);
  8545. } else if (context.method === "return") {
  8546. context.abrupt("return", context.arg);
  8547. }
  8548. state = GenStateExecuting;
  8549. var record = tryCatch(innerFn, self, context);
  8550. if (record.type === "normal") {
  8551. // If an exception is thrown from innerFn, we leave state ===
  8552. // GenStateExecuting and loop back for another invocation.
  8553. state = context.done
  8554. ? GenStateCompleted
  8555. : GenStateSuspendedYield;
  8556. if (record.arg === ContinueSentinel) {
  8557. continue;
  8558. }
  8559. return {
  8560. value: record.arg,
  8561. done: context.done
  8562. };
  8563. } else if (record.type === "throw") {
  8564. state = GenStateCompleted;
  8565. // Dispatch the exception by looping back around to the
  8566. // context.dispatchException(context.arg) call above.
  8567. context.method = "throw";
  8568. context.arg = record.arg;
  8569. }
  8570. }
  8571. };
  8572. }
  8573. // Call delegate.iterator[context.method](context.arg) and handle the
  8574. // result, either by returning a { value, done } result from the
  8575. // delegate iterator, or by modifying context.method and context.arg,
  8576. // setting context.delegate to null, and returning the ContinueSentinel.
  8577. function maybeInvokeDelegate(delegate, context) {
  8578. var method = delegate.iterator[context.method];
  8579. if (method === undefined) {
  8580. // A .throw or .return when the delegate iterator has no .throw
  8581. // method always terminates the yield* loop.
  8582. context.delegate = null;
  8583. if (context.method === "throw") {
  8584. if (delegate.iterator.return) {
  8585. // If the delegate iterator has a return method, give it a
  8586. // chance to clean up.
  8587. context.method = "return";
  8588. context.arg = undefined;
  8589. maybeInvokeDelegate(delegate, context);
  8590. if (context.method === "throw") {
  8591. // If maybeInvokeDelegate(context) changed context.method from
  8592. // "return" to "throw", let that override the TypeError below.
  8593. return ContinueSentinel;
  8594. }
  8595. }
  8596. context.method = "throw";
  8597. context.arg = new TypeError(
  8598. "The iterator does not provide a 'throw' method");
  8599. }
  8600. return ContinueSentinel;
  8601. }
  8602. var record = tryCatch(method, delegate.iterator, context.arg);
  8603. if (record.type === "throw") {
  8604. context.method = "throw";
  8605. context.arg = record.arg;
  8606. context.delegate = null;
  8607. return ContinueSentinel;
  8608. }
  8609. var info = record.arg;
  8610. if (! info) {
  8611. context.method = "throw";
  8612. context.arg = new TypeError("iterator result is not an object");
  8613. context.delegate = null;
  8614. return ContinueSentinel;
  8615. }
  8616. if (info.done) {
  8617. // Assign the result of the finished delegate to the temporary
  8618. // variable specified by delegate.resultName (see delegateYield).
  8619. context[delegate.resultName] = info.value;
  8620. // Resume execution at the desired location (see delegateYield).
  8621. context.next = delegate.nextLoc;
  8622. // If context.method was "throw" but the delegate handled the
  8623. // exception, let the outer generator proceed normally. If
  8624. // context.method was "next", forget context.arg since it has been
  8625. // "consumed" by the delegate iterator. If context.method was
  8626. // "return", allow the original .return call to continue in the
  8627. // outer generator.
  8628. if (context.method !== "return") {
  8629. context.method = "next";
  8630. context.arg = undefined;
  8631. }
  8632. } else {
  8633. // Re-yield the result returned by the delegate method.
  8634. return info;
  8635. }
  8636. // The delegate iterator is finished, so forget it and continue with
  8637. // the outer generator.
  8638. context.delegate = null;
  8639. return ContinueSentinel;
  8640. }
  8641. // Define Generator.prototype.{next,throw,return} in terms of the
  8642. // unified ._invoke helper method.
  8643. defineIteratorMethods(Gp);
  8644. Gp[toStringTagSymbol] = "Generator";
  8645. // A Generator should always return itself as the iterator object when the
  8646. // @@iterator function is called on it. Some browsers' implementations of the
  8647. // iterator prototype chain incorrectly implement this, causing the Generator
  8648. // object to not be returned from this call. This ensures that doesn't happen.
  8649. // See https://github.com/facebook/regenerator/issues/274 for more details.
  8650. Gp[iteratorSymbol] = function() {
  8651. return this;
  8652. };
  8653. Gp.toString = function() {
  8654. return "[object Generator]";
  8655. };
  8656. function pushTryEntry(locs) {
  8657. var entry = { tryLoc: locs[0] };
  8658. if (1 in locs) {
  8659. entry.catchLoc = locs[1];
  8660. }
  8661. if (2 in locs) {
  8662. entry.finallyLoc = locs[2];
  8663. entry.afterLoc = locs[3];
  8664. }
  8665. this.tryEntries.push(entry);
  8666. }
  8667. function resetTryEntry(entry) {
  8668. var record = entry.completion || {};
  8669. record.type = "normal";
  8670. delete record.arg;
  8671. entry.completion = record;
  8672. }
  8673. function Context(tryLocsList) {
  8674. // The root entry object (effectively a try statement without a catch
  8675. // or a finally block) gives us a place to store values thrown from
  8676. // locations where there is no enclosing try statement.
  8677. this.tryEntries = [{ tryLoc: "root" }];
  8678. tryLocsList.forEach(pushTryEntry, this);
  8679. this.reset(true);
  8680. }
  8681. runtime.keys = function(object) {
  8682. var keys = [];
  8683. for (var key in object) {
  8684. keys.push(key);
  8685. }
  8686. keys.reverse();
  8687. // Rather than returning an object with a next method, we keep
  8688. // things simple and return the next function itself.
  8689. return function next() {
  8690. while (keys.length) {
  8691. var key = keys.pop();
  8692. if (key in object) {
  8693. next.value = key;
  8694. next.done = false;
  8695. return next;
  8696. }
  8697. }
  8698. // To avoid creating an additional object, we just hang the .value
  8699. // and .done properties off the next function object itself. This
  8700. // also ensures that the minifier will not anonymize the function.
  8701. next.done = true;
  8702. return next;
  8703. };
  8704. };
  8705. function values(iterable) {
  8706. if (iterable) {
  8707. var iteratorMethod = iterable[iteratorSymbol];
  8708. if (iteratorMethod) {
  8709. return iteratorMethod.call(iterable);
  8710. }
  8711. if (typeof iterable.next === "function") {
  8712. return iterable;
  8713. }
  8714. if (!isNaN(iterable.length)) {
  8715. var i = -1, next = function next() {
  8716. while (++i < iterable.length) {
  8717. if (hasOwn.call(iterable, i)) {
  8718. next.value = iterable[i];
  8719. next.done = false;
  8720. return next;
  8721. }
  8722. }
  8723. next.value = undefined;
  8724. next.done = true;
  8725. return next;
  8726. };
  8727. return next.next = next;
  8728. }
  8729. }
  8730. // Return an iterator with no values.
  8731. return { next: doneResult };
  8732. }
  8733. runtime.values = values;
  8734. function doneResult() {
  8735. return { value: undefined, done: true };
  8736. }
  8737. Context.prototype = {
  8738. constructor: Context,
  8739. reset: function(skipTempReset) {
  8740. this.prev = 0;
  8741. this.next = 0;
  8742. // Resetting context._sent for legacy support of Babel's
  8743. // function.sent implementation.
  8744. this.sent = this._sent = undefined;
  8745. this.done = false;
  8746. this.delegate = null;
  8747. this.method = "next";
  8748. this.arg = undefined;
  8749. this.tryEntries.forEach(resetTryEntry);
  8750. if (!skipTempReset) {
  8751. for (var name in this) {
  8752. // Not sure about the optimal order of these conditions:
  8753. if (name.charAt(0) === "t" &&
  8754. hasOwn.call(this, name) &&
  8755. !isNaN(+name.slice(1))) {
  8756. this[name] = undefined;
  8757. }
  8758. }
  8759. }
  8760. },
  8761. stop: function() {
  8762. this.done = true;
  8763. var rootEntry = this.tryEntries[0];
  8764. var rootRecord = rootEntry.completion;
  8765. if (rootRecord.type === "throw") {
  8766. throw rootRecord.arg;
  8767. }
  8768. return this.rval;
  8769. },
  8770. dispatchException: function(exception) {
  8771. if (this.done) {
  8772. throw exception;
  8773. }
  8774. var context = this;
  8775. function handle(loc, caught) {
  8776. record.type = "throw";
  8777. record.arg = exception;
  8778. context.next = loc;
  8779. if (caught) {
  8780. // If the dispatched exception was caught by a catch block,
  8781. // then let that catch block handle the exception normally.
  8782. context.method = "next";
  8783. context.arg = undefined;
  8784. }
  8785. return !! caught;
  8786. }
  8787. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  8788. var entry = this.tryEntries[i];
  8789. var record = entry.completion;
  8790. if (entry.tryLoc === "root") {
  8791. // Exception thrown outside of any try block that could handle
  8792. // it, so set the completion value of the entire function to
  8793. // throw the exception.
  8794. return handle("end");
  8795. }
  8796. if (entry.tryLoc <= this.prev) {
  8797. var hasCatch = hasOwn.call(entry, "catchLoc");
  8798. var hasFinally = hasOwn.call(entry, "finallyLoc");
  8799. if (hasCatch && hasFinally) {
  8800. if (this.prev < entry.catchLoc) {
  8801. return handle(entry.catchLoc, true);
  8802. } else if (this.prev < entry.finallyLoc) {
  8803. return handle(entry.finallyLoc);
  8804. }
  8805. } else if (hasCatch) {
  8806. if (this.prev < entry.catchLoc) {
  8807. return handle(entry.catchLoc, true);
  8808. }
  8809. } else if (hasFinally) {
  8810. if (this.prev < entry.finallyLoc) {
  8811. return handle(entry.finallyLoc);
  8812. }
  8813. } else {
  8814. throw new Error("try statement without catch or finally");
  8815. }
  8816. }
  8817. }
  8818. },
  8819. abrupt: function(type, arg) {
  8820. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  8821. var entry = this.tryEntries[i];
  8822. if (entry.tryLoc <= this.prev &&
  8823. hasOwn.call(entry, "finallyLoc") &&
  8824. this.prev < entry.finallyLoc) {
  8825. var finallyEntry = entry;
  8826. break;
  8827. }
  8828. }
  8829. if (finallyEntry &&
  8830. (type === "break" ||
  8831. type === "continue") &&
  8832. finallyEntry.tryLoc <= arg &&
  8833. arg <= finallyEntry.finallyLoc) {
  8834. // Ignore the finally entry if control is not jumping to a
  8835. // location outside the try/catch block.
  8836. finallyEntry = null;
  8837. }
  8838. var record = finallyEntry ? finallyEntry.completion : {};
  8839. record.type = type;
  8840. record.arg = arg;
  8841. if (finallyEntry) {
  8842. this.method = "next";
  8843. this.next = finallyEntry.finallyLoc;
  8844. return ContinueSentinel;
  8845. }
  8846. return this.complete(record);
  8847. },
  8848. complete: function(record, afterLoc) {
  8849. if (record.type === "throw") {
  8850. throw record.arg;
  8851. }
  8852. if (record.type === "break" ||
  8853. record.type === "continue") {
  8854. this.next = record.arg;
  8855. } else if (record.type === "return") {
  8856. this.rval = this.arg = record.arg;
  8857. this.method = "return";
  8858. this.next = "end";
  8859. } else if (record.type === "normal" && afterLoc) {
  8860. this.next = afterLoc;
  8861. }
  8862. return ContinueSentinel;
  8863. },
  8864. finish: function(finallyLoc) {
  8865. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  8866. var entry = this.tryEntries[i];
  8867. if (entry.finallyLoc === finallyLoc) {
  8868. this.complete(entry.completion, entry.afterLoc);
  8869. resetTryEntry(entry);
  8870. return ContinueSentinel;
  8871. }
  8872. }
  8873. },
  8874. "catch": function(tryLoc) {
  8875. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  8876. var entry = this.tryEntries[i];
  8877. if (entry.tryLoc === tryLoc) {
  8878. var record = entry.completion;
  8879. if (record.type === "throw") {
  8880. var thrown = record.arg;
  8881. resetTryEntry(entry);
  8882. }
  8883. return thrown;
  8884. }
  8885. }
  8886. // The context.catch method must only be called with a location
  8887. // argument that corresponds to a known catch block.
  8888. throw new Error("illegal catch attempt");
  8889. },
  8890. delegateYield: function(iterable, resultName, nextLoc) {
  8891. this.delegate = {
  8892. iterator: values(iterable),
  8893. resultName: resultName,
  8894. nextLoc: nextLoc
  8895. };
  8896. if (this.method === "next") {
  8897. // Deliberately forget the last sent value so that we don't
  8898. // accidentally pass it on to the delegate.
  8899. this.arg = undefined;
  8900. }
  8901. return ContinueSentinel;
  8902. }
  8903. };
  8904. })(
  8905. // In sloppy mode, unbound `this` refers to the global object, fallback to
  8906. // Function constructor if we're in global strict mode. That is sadly a form
  8907. // of indirect eval which violates Content Security Policy.
  8908. (function() {
  8909. return this || (typeof self === "object" && self);
  8910. })() || Function("return this")()
  8911. );
  8912. /***/ }),
  8913. /***/ 25:
  8914. /*!*************************************************************************!*\
  8915. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/timeFormat.js ***!
  8916. \*************************************************************************/
  8917. /*! no static exports found */
  8918. /***/ (function(module, exports, __webpack_require__) {
  8919. "use strict";
  8920. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // padStart 的 polyfill,因为某些机型或情况,还无法支持es7的padStart,比如电脑版的微信小程序
  8921. // 所以这里做一个兼容polyfill的兼容处理
  8922. if (!String.prototype.padStart) {
  8923. // 为了方便表示这里 fillString 用了ES6 的默认参数,不影响理解
  8924. String.prototype.padStart = function (maxLength) {var fillString = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ' ';
  8925. if (Object.prototype.toString.call(fillString) !== "[object String]") throw new TypeError(
  8926. 'fillString must be String');
  8927. var str = this;
  8928. // 返回 String(str) 这里是为了使返回的值是字符串字面量,在控制台中更符合直觉
  8929. if (str.length >= maxLength) return String(str);
  8930. var fillLength = maxLength - str.length,
  8931. times = Math.ceil(fillLength / fillString.length);
  8932. while (times >>= 1) {
  8933. fillString += fillString;
  8934. if (times === 1) {
  8935. fillString += fillString;
  8936. }
  8937. }
  8938. return fillString.slice(0, fillLength) + str;
  8939. };
  8940. }
  8941. // 其他更多是格式化有如下:
  8942. // yyyy:mm:dd|yyyy:mm|yyyy年mm月dd日|yyyy年mm月dd日 hh时MM分等,可自定义组合
  8943. function timeFormat() {var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;var fmt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  8944. // 如果为null,则格式化当前时间
  8945. if (!dateTime) dateTime = Number(new Date());
  8946. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  8947. if (dateTime.toString().length == 10) dateTime *= 1000;
  8948. var date = new Date(dateTime);
  8949. var ret;
  8950. var opt = {
  8951. "y+": date.getFullYear().toString(), // 年
  8952. "m+": (date.getMonth() + 1).toString(), // 月
  8953. "d+": date.getDate().toString(), // 日
  8954. "h+": date.getHours().toString(), // 时
  8955. "M+": date.getMinutes().toString(), // 分
  8956. "s+": date.getSeconds().toString() // 秒
  8957. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  8958. };
  8959. for (var k in opt) {
  8960. ret = new RegExp("(" + k + ")").exec(fmt);
  8961. if (ret) {
  8962. fmt = fmt.replace(ret[1], ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, "0"));
  8963. };
  8964. };
  8965. return fmt;
  8966. }var _default =
  8967. timeFormat;exports.default = _default;
  8968. /***/ }),
  8969. /***/ 251:
  8970. /*!***************************************************!*\
  8971. !*** G:/gsxm/git/yangdaxia/api/functionalUnit.js ***!
  8972. \***************************************************/
  8973. /*! no static exports found */
  8974. /***/ (function(module, exports, __webpack_require__) {
  8975. "use strict";
  8976. Object.defineProperty(exports, "__esModule", { value: true });exports.getCouponsList = getCouponsList;exports.setCoupons = setCoupons;exports.couponsOrder = couponsOrder;exports.integrallist = integrallist;exports.signList = signList;exports.integral = integral;exports.signUser = signUser;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 50));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  8977. //获取优惠券列表
  8978. function getCouponsList(data, types) {
  8979. //优惠券状态 0全部 1未使用 2已使用
  8980. return (0, _request.default)({
  8981. url: '/api/coupons/user/' + types,
  8982. method: 'get',
  8983. data: data });
  8984. }
  8985. //领取优惠券
  8986. function setCoupons(data) {
  8987. return (0, _request.default)({
  8988. url: '/api/coupon/receive',
  8989. method: 'post',
  8990. data: data });
  8991. }
  8992. //获取可使用优惠券
  8993. function couponsOrder(data, price) {
  8994. return (0, _request.default)({
  8995. url: '/api/coupons/order/' + price,
  8996. method: 'get',
  8997. data: data });
  8998. }
  8999. // 积分列表
  9000. function integrallist(data) {
  9001. return (0, _request.default)({
  9002. url: '/api/integral/list',
  9003. method: 'get',
  9004. data: data });
  9005. }
  9006. // 获取签到列表
  9007. function signList(data) {
  9008. return (0, _request.default)({
  9009. url: '/api/sign/list',
  9010. method: 'get',
  9011. data: data });
  9012. }
  9013. // 点击签到
  9014. function integral(data) {
  9015. return (0, _request.default)({
  9016. url: '/api/sign/integral',
  9017. method: 'post',
  9018. data: data });
  9019. }
  9020. // 签到信息
  9021. function signUser(data) {
  9022. return (0, _request.default)({
  9023. url: '/api/sign/user',
  9024. method: 'post',
  9025. data: data });
  9026. }
  9027. /***/ }),
  9028. /***/ 26:
  9029. /*!***********************************************************************!*\
  9030. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/timeFrom.js ***!
  9031. \***********************************************************************/
  9032. /*! no static exports found */
  9033. /***/ (function(module, exports, __webpack_require__) {
  9034. "use strict";
  9035. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _timeFormat = _interopRequireDefault(__webpack_require__(/*! ../../libs/function/timeFormat.js */ 25));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  9036. /**
  9037. * 时间戳转为多久之前
  9038. * @param String timestamp 时间戳
  9039. * @param String | Boolean format 如果为时间格式字符串,超出一定时间范围,返回固定的时间格式;
  9040. * 如果为布尔值false,无论什么时间,都返回多久以前的格式
  9041. */
  9042. function timeFrom() {var dateTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;var format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'yyyy-mm-dd';
  9043. // 如果为null,则格式化当前时间
  9044. if (!dateTime) dateTime = Number(new Date());
  9045. // 如果dateTime长度为10或者13,则为秒和毫秒的时间戳,如果超过13位,则为其他的时间格式
  9046. if (dateTime.toString().length == 10) dateTime *= 1000;
  9047. var timestamp = +new Date(Number(dateTime));
  9048. var timer = (Number(new Date()) - timestamp) / 1000;
  9049. // 如果小于5分钟,则返回"刚刚",其他以此类推
  9050. var tips = '';
  9051. switch (true) {
  9052. case timer < 300:
  9053. tips = '刚刚';
  9054. break;
  9055. case timer >= 300 && timer < 3600:
  9056. tips = parseInt(timer / 60) + '分钟前';
  9057. break;
  9058. case timer >= 3600 && timer < 86400:
  9059. tips = parseInt(timer / 3600) + '小时前';
  9060. break;
  9061. case timer >= 86400 && timer < 2592000:
  9062. tips = parseInt(timer / 86400) + '天前';
  9063. break;
  9064. default:
  9065. // 如果format为false,则无论什么时间戳,都显示xx之前
  9066. if (format === false) {
  9067. if (timer >= 2592000 && timer < 365 * 86400) {
  9068. tips = parseInt(timer / (86400 * 30)) + '个月前';
  9069. } else {
  9070. tips = parseInt(timer / (86400 * 365)) + '年前';
  9071. }
  9072. } else {
  9073. tips = (0, _timeFormat.default)(timestamp, format);
  9074. }}
  9075. return tips;
  9076. }var _default =
  9077. timeFrom;exports.default = _default;
  9078. /***/ }),
  9079. /***/ 268:
  9080. /*!******************************************!*\
  9081. !*** G:/gsxm/git/yangdaxia/api/order.js ***!
  9082. \******************************************/
  9083. /*! no static exports found */
  9084. /***/ (function(module, exports, __webpack_require__) {
  9085. "use strict";
  9086. Object.defineProperty(exports, "__esModule", { value: true });exports.confirm = confirm;exports.couponsOrder = couponsOrder;exports.getCouponsList = getCouponsList;exports.order_comment = order_comment;exports.product = product;exports.express_query = express_query;exports.upload = upload;exports.orderList = orderList;exports.orderDetail = orderDetail;exports.orderCancel = orderCancel;exports.orderDel = orderDel;exports.refund = refund;exports.refundReason = refundReason;exports.orderTake = orderTake;exports.orderPay = orderPay;exports.createOrderkey = createOrderkey;exports.computedOrderkey = computedOrderkey;var _request = _interopRequireWildcard(__webpack_require__(/*! @/utils/request */ 50));function _getRequireWildcardCache() {if (typeof WeakMap !== "function") return null;var cache = new WeakMap();_getRequireWildcardCache = function _getRequireWildcardCache() {return cache;};return cache;}function _interopRequireWildcard(obj) {if (obj && obj.__esModule) {return obj;}if (obj === null || typeof obj !== "object" && typeof obj !== "function") {return { default: obj };}var cache = _getRequireWildcardCache();if (cache && cache.has(obj)) {return cache.get(obj);}var newObj = {};var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;for (var key in obj) {if (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;}
  9087. // 订单确认
  9088. function confirm(data) {
  9089. return (0, _request.default)({
  9090. url: '/api/order/confirm',
  9091. method: 'post',
  9092. data: data });
  9093. }
  9094. //获取可使用优惠券
  9095. function couponsOrder(data, price) {
  9096. return (0, _request.default)({
  9097. url: '/api/coupons/order/' + price,
  9098. method: 'get',
  9099. data: data });
  9100. }
  9101. //获取优惠券列表
  9102. function getCouponsList(data, types) {
  9103. //优惠券状态 0全部 1未使用 2已使用
  9104. return (0, _request.default)({
  9105. url: '/api/coupons/user/' + types,
  9106. method: 'get',
  9107. data: data });
  9108. }
  9109. //提交评论
  9110. function order_comment(data) {
  9111. return (0, _request.default)({
  9112. url: '/api/order/comment',
  9113. method: 'post',
  9114. data: data });
  9115. }
  9116. //订单产品信息
  9117. function product(data) {
  9118. return (0, _request.default)({
  9119. url: '/api/order/product',
  9120. method: 'post',
  9121. data: data });
  9122. }
  9123. // 快递查询
  9124. function express_query(data) {
  9125. return (0, _request.default)({
  9126. url: '/api/order/express_query',
  9127. method: 'get',
  9128. data: data });
  9129. }
  9130. //上传图片
  9131. function upload(data) {
  9132. return (0, _request.upFilse)({
  9133. url: '/api/upload/image',
  9134. method: 'post',
  9135. data: data });
  9136. }
  9137. // 订单列表
  9138. function orderList(data) {
  9139. return (0, _request.default)({
  9140. url: '/api/order/list',
  9141. method: 'get',
  9142. data: data });
  9143. }
  9144. // 订单详细
  9145. function orderDetail(data, orderid) {
  9146. return (0, _request.default)({
  9147. url: '/api/order/detail/' + orderid,
  9148. method: 'get',
  9149. data: data });
  9150. }
  9151. // 取消订单
  9152. function orderCancel(data) {
  9153. return (0, _request.default)({
  9154. url: '/api/order/cancel',
  9155. method: 'post',
  9156. data: data });
  9157. }
  9158. // 删除订单
  9159. function orderDel(data) {
  9160. return (0, _request.default)({
  9161. url: '/api/order/del',
  9162. method: 'get',
  9163. data: data });
  9164. }
  9165. // 申请退款
  9166. function refund(data) {
  9167. return (0, _request.default)({
  9168. url: '/api/order/refund/verify',
  9169. method: 'post',
  9170. data: data });
  9171. }
  9172. // 退款理由列表
  9173. function refundReason(data) {
  9174. return (0, _request.default)({
  9175. url: '/api/order/refund/reason',
  9176. method: 'get',
  9177. data: data });
  9178. }
  9179. // 确认收货
  9180. function orderTake(data) {
  9181. return (0, _request.default)({
  9182. url: '/api/order/take',
  9183. method: 'post',
  9184. data: data });
  9185. }
  9186. // 订单支付
  9187. function orderPay(data) {
  9188. return (0, _request.default)({
  9189. url: '/api/order/pay',
  9190. method: 'post',
  9191. data: data });
  9192. }
  9193. // 创建订单
  9194. function createOrderkey(data, key) {
  9195. return (0, _request.default)({
  9196. url: '/api/order/create/' + key,
  9197. method: 'post',
  9198. data: data });
  9199. }
  9200. // 统计订单金额
  9201. function computedOrderkey(data) {
  9202. return (0, _request.default)({
  9203. url: '/api/order/computed/' + data.orderkey,
  9204. method: 'post',
  9205. data: data });
  9206. }
  9207. /***/ }),
  9208. /***/ 27:
  9209. /*!****************************************************************************!*\
  9210. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/colorGradient.js ***!
  9211. \****************************************************************************/
  9212. /*! no static exports found */
  9213. /***/ (function(module, exports, __webpack_require__) {
  9214. "use strict";
  9215. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  9216. * 求两个颜色之间的渐变值
  9217. * @param {string} startColor 开始的颜色
  9218. * @param {string} endColor 结束的颜色
  9219. * @param {number} step 颜色等分的份额
  9220. * */
  9221. function colorGradient() {var startColor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'rgb(0, 0, 0)';var endColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rgb(255, 255, 255)';var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
  9222. var startRGB = hexToRgb(startColor, false); //转换为rgb数组模式
  9223. var startR = startRGB[0];
  9224. var startG = startRGB[1];
  9225. var startB = startRGB[2];
  9226. var endRGB = hexToRgb(endColor, false);
  9227. var endR = endRGB[0];
  9228. var endG = endRGB[1];
  9229. var endB = endRGB[2];
  9230. var sR = (endR - startR) / step; //总差值
  9231. var sG = (endG - startG) / step;
  9232. var sB = (endB - startB) / step;
  9233. var colorArr = [];
  9234. for (var i = 0; i < step; i++) {
  9235. //计算每一步的hex值
  9236. var hex = rgbToHex('rgb(' + Math.round(sR * i + startR) + ',' + Math.round(sG * i + startG) + ',' + Math.round(sB *
  9237. i + startB) + ')');
  9238. colorArr.push(hex);
  9239. }
  9240. return colorArr;
  9241. }
  9242. // 将hex表示方式转换为rgb表示方式(这里返回rgb数组模式)
  9243. function hexToRgb(sColor) {var str = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  9244. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  9245. sColor = sColor.toLowerCase();
  9246. if (sColor && reg.test(sColor)) {
  9247. if (sColor.length === 4) {
  9248. var sColorNew = "#";
  9249. for (var i = 1; i < 4; i += 1) {
  9250. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  9251. }
  9252. sColor = sColorNew;
  9253. }
  9254. //处理六位的颜色值
  9255. var sColorChange = [];
  9256. for (var _i = 1; _i < 7; _i += 2) {
  9257. sColorChange.push(parseInt("0x" + sColor.slice(_i, _i + 2)));
  9258. }
  9259. if (!str) {
  9260. return sColorChange;
  9261. } else {
  9262. return "rgb(".concat(sColorChange[0], ",").concat(sColorChange[1], ",").concat(sColorChange[2], ")");
  9263. }
  9264. } else if (/^(rgb|RGB)/.test(sColor)) {
  9265. var arr = sColor.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  9266. return arr.map(function (val) {return Number(val);});
  9267. } else {
  9268. return sColor;
  9269. }
  9270. };
  9271. // 将rgb表示方式转换为hex表示方式
  9272. function rgbToHex(rgb) {
  9273. var _this = rgb;
  9274. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  9275. if (/^(rgb|RGB)/.test(_this)) {
  9276. var aColor = _this.replace(/(?:\(|\)|rgb|RGB)*/g, "").split(",");
  9277. var strHex = "#";
  9278. for (var i = 0; i < aColor.length; i++) {
  9279. var hex = Number(aColor[i]).toString(16);
  9280. hex = String(hex).length == 1 ? 0 + '' + hex : hex; // 保证每个rgb的值为2位
  9281. if (hex === "0") {
  9282. hex += hex;
  9283. }
  9284. strHex += hex;
  9285. }
  9286. if (strHex.length !== 7) {
  9287. strHex = _this;
  9288. }
  9289. return strHex;
  9290. } else if (reg.test(_this)) {
  9291. var aNum = _this.replace(/#/, "").split("");
  9292. if (aNum.length === 6) {
  9293. return _this;
  9294. } else if (aNum.length === 3) {
  9295. var numHex = "#";
  9296. for (var _i2 = 0; _i2 < aNum.length; _i2 += 1) {
  9297. numHex += aNum[_i2] + aNum[_i2];
  9298. }
  9299. return numHex;
  9300. }
  9301. } else {
  9302. return _this;
  9303. }
  9304. }
  9305. /**
  9306. * JS颜色十六进制转换为rgb或rgba,返回的格式为 rgba(255,255,255,0.5)字符串
  9307. * sHex为传入的十六进制的色值
  9308. * alpha为rgba的透明度
  9309. */
  9310. function colorToRgba(color) {var alpha = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.3;
  9311. color = rgbToHex(color);
  9312. // 十六进制颜色值的正则表达式
  9313. var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
  9314. /* 16进制颜色转为RGB格式 */
  9315. var sColor = color.toLowerCase();
  9316. if (sColor && reg.test(sColor)) {
  9317. if (sColor.length === 4) {
  9318. var sColorNew = '#';
  9319. for (var i = 1; i < 4; i += 1) {
  9320. sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1));
  9321. }
  9322. sColor = sColorNew;
  9323. }
  9324. // 处理六位的颜色值
  9325. var sColorChange = [];
  9326. for (var _i3 = 1; _i3 < 7; _i3 += 2) {
  9327. sColorChange.push(parseInt('0x' + sColor.slice(_i3, _i3 + 2)));
  9328. }
  9329. // return sColorChange.join(',')
  9330. return 'rgba(' + sColorChange.join(',') + ',' + alpha + ')';
  9331. } else
  9332. {
  9333. return sColor;
  9334. }
  9335. }var _default =
  9336. {
  9337. colorGradient: colorGradient,
  9338. hexToRgb: hexToRgb,
  9339. rgbToHex: rgbToHex,
  9340. colorToRgba: colorToRgba };exports.default = _default;
  9341. /***/ }),
  9342. /***/ 28:
  9343. /*!*******************************************************************!*\
  9344. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/guid.js ***!
  9345. \*******************************************************************/
  9346. /*! no static exports found */
  9347. /***/ (function(module, exports, __webpack_require__) {
  9348. "use strict";
  9349. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  9350. * 本算法来源于简书开源代码,详见:https://www.jianshu.com/p/fdbf293d0a85
  9351. * 全局唯一标识符(uuid,Globally Unique Identifier),也称作 uuid(Universally Unique IDentifier)
  9352. * 一般用于多个组件之间,给它一个唯一的标识符,或者v-for循环的时候,如果使用数组的index可能会导致更新列表出现问题
  9353. * 最可能的情况是左滑删除item或者对某条信息流"不喜欢"并去掉它的时候,会导致组件内的数据可能出现错乱
  9354. * v-for的时候,推荐使用后端返回的id而不是循环的index
  9355. * @param {Number} len uuid的长度
  9356. * @param {Boolean} firstU 将返回的首字母置为"u"
  9357. * @param {Nubmer} radix 生成uuid的基数(意味着返回的字符串都是这个基数),2-二进制,8-八进制,10-十进制,16-十六进制
  9358. */
  9359. function guid() {var len = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 32;var firstU = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;var radix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  9360. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  9361. var uuid = [];
  9362. radix = radix || chars.length;
  9363. if (len) {
  9364. // 如果指定uuid长度,只是取随机的字符,0|x为位运算,能去掉x的小数位,返回整数位
  9365. for (var i = 0; i < len; i++) {uuid[i] = chars[0 | Math.random() * radix];}
  9366. } else {
  9367. var r;
  9368. // rfc4122标准要求返回的uuid中,某些位为固定的字符
  9369. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  9370. uuid[14] = '4';
  9371. for (var _i = 0; _i < 36; _i++) {
  9372. if (!uuid[_i]) {
  9373. r = 0 | Math.random() * 16;
  9374. uuid[_i] = chars[_i == 19 ? r & 0x3 | 0x8 : r];
  9375. }
  9376. }
  9377. }
  9378. // 移除第一个字符,并用u替代,因为第一个字符为数值时,该guuid不能用作id或者class
  9379. if (firstU) {
  9380. uuid.shift();
  9381. return 'u' + uuid.join('');
  9382. } else {
  9383. return uuid.join('');
  9384. }
  9385. }var _default =
  9386. guid;exports.default = _default;
  9387. /***/ }),
  9388. /***/ 29:
  9389. /*!********************************************************************!*\
  9390. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/color.js ***!
  9391. \********************************************************************/
  9392. /*! no static exports found */
  9393. /***/ (function(module, exports, __webpack_require__) {
  9394. "use strict";
  9395. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 为了让用户能够自定义主题,会逐步弃用此文件,各颜色通过css提供
  9396. // 为了给某些特殊场景使用和向后兼容,无需删除此文件(2020-06-20)
  9397. var color = {
  9398. primary: "#2979ff",
  9399. primaryDark: "#2b85e4",
  9400. primaryDisabled: "#a0cfff",
  9401. primaryLight: "#ecf5ff",
  9402. bgColor: "#f3f4f6",
  9403. info: "#909399",
  9404. infoDark: "#82848a",
  9405. infoDisabled: "#c8c9cc",
  9406. infoLight: "#f4f4f5",
  9407. warning: "#ff9900",
  9408. warningDark: "#f29100",
  9409. warningDisabled: "#fcbd71",
  9410. warningLight: "#fdf6ec",
  9411. error: "#fa3534",
  9412. errorDark: "#dd6161",
  9413. errorDisabled: "#fab6b6",
  9414. errorLight: "#fef0f0",
  9415. success: "#19be6b",
  9416. successDark: "#18b566",
  9417. successDisabled: "#71d5a1",
  9418. successLight: "#dbf1e1",
  9419. mainColor: "#303133",
  9420. contentColor: "#606266",
  9421. tipsColor: "#909399",
  9422. lightColor: "#c0c4cc",
  9423. borderColor: "#e4e7ed" };var _default =
  9424. color;exports.default = _default;
  9425. /***/ }),
  9426. /***/ 290:
  9427. /*!*************************************************************!*\
  9428. !*** G:/gsxm/git/yangdaxia/components/tki-qrcode/qrcode.js ***!
  9429. \*************************************************************/
  9430. /*! no static exports found */
  9431. /***/ (function(module, exports, __webpack_require__) {
  9432. "use strict";
  9433. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var QRCode = {};
  9434. (function () {
  9435. /**
  9436. * 获取单个字符的utf8编码
  9437. * unicode BMP平面约65535个字符
  9438. * @param {num} code
  9439. * return {array}
  9440. */
  9441. function unicodeFormat8(code) {
  9442. // 1 byte
  9443. var c0, c1, c2;
  9444. if (code < 128) {
  9445. return [code];
  9446. // 2 bytes
  9447. } else if (code < 2048) {
  9448. c0 = 192 + (code >> 6);
  9449. c1 = 128 + (code & 63);
  9450. return [c0, c1];
  9451. // 3 bytes
  9452. } else {
  9453. c0 = 224 + (code >> 12);
  9454. c1 = 128 + (code >> 6 & 63);
  9455. c2 = 128 + (code & 63);
  9456. return [c0, c1, c2];
  9457. }
  9458. }
  9459. /**
  9460. * 获取字符串的utf8编码字节串
  9461. * @param {string} string
  9462. * @return {array}
  9463. */
  9464. function getUTF8Bytes(string) {
  9465. var utf8codes = [];
  9466. for (var i = 0; i < string.length; i++) {
  9467. var code = string.charCodeAt(i);
  9468. var utf8 = unicodeFormat8(code);
  9469. for (var j = 0; j < utf8.length; j++) {
  9470. utf8codes.push(utf8[j]);
  9471. }
  9472. }
  9473. return utf8codes;
  9474. }
  9475. /**
  9476. * 二维码算法实现
  9477. * @param {string} data 要编码的信息字符串
  9478. * @param {num} errorCorrectLevel 纠错等级
  9479. */
  9480. function QRCodeAlg(data, errorCorrectLevel) {
  9481. this.typeNumber = -1; //版本
  9482. this.errorCorrectLevel = errorCorrectLevel;
  9483. this.modules = null; //二维矩阵,存放最终结果
  9484. this.moduleCount = 0; //矩阵大小
  9485. this.dataCache = null; //数据缓存
  9486. this.rsBlocks = null; //版本数据信息
  9487. this.totalDataCount = -1; //可使用的数据量
  9488. this.data = data;
  9489. this.utf8bytes = getUTF8Bytes(data);
  9490. this.make();
  9491. }
  9492. QRCodeAlg.prototype = {
  9493. constructor: QRCodeAlg,
  9494. /**
  9495. * 获取二维码矩阵大小
  9496. * @return {num} 矩阵大小
  9497. */
  9498. getModuleCount: function getModuleCount() {
  9499. return this.moduleCount;
  9500. },
  9501. /**
  9502. * 编码
  9503. */
  9504. make: function make() {
  9505. this.getRightType();
  9506. this.dataCache = this.createData();
  9507. this.createQrcode();
  9508. },
  9509. /**
  9510. * 设置二位矩阵功能图形
  9511. * @param {bool} test 表示是否在寻找最好掩膜阶段
  9512. * @param {num} maskPattern 掩膜的版本
  9513. */
  9514. makeImpl: function makeImpl(maskPattern) {
  9515. this.moduleCount = this.typeNumber * 4 + 17;
  9516. this.modules = new Array(this.moduleCount);
  9517. for (var row = 0; row < this.moduleCount; row++) {
  9518. this.modules[row] = new Array(this.moduleCount);
  9519. }
  9520. this.setupPositionProbePattern(0, 0);
  9521. this.setupPositionProbePattern(this.moduleCount - 7, 0);
  9522. this.setupPositionProbePattern(0, this.moduleCount - 7);
  9523. this.setupPositionAdjustPattern();
  9524. this.setupTimingPattern();
  9525. this.setupTypeInfo(true, maskPattern);
  9526. if (this.typeNumber >= 7) {
  9527. this.setupTypeNumber(true);
  9528. }
  9529. this.mapData(this.dataCache, maskPattern);
  9530. },
  9531. /**
  9532. * 设置二维码的位置探测图形
  9533. * @param {num} row 探测图形的中心横坐标
  9534. * @param {num} col 探测图形的中心纵坐标
  9535. */
  9536. setupPositionProbePattern: function setupPositionProbePattern(row, col) {
  9537. for (var r = -1; r <= 7; r++) {
  9538. if (row + r <= -1 || this.moduleCount <= row + r) continue;
  9539. for (var c = -1; c <= 7; c++) {
  9540. if (col + c <= -1 || this.moduleCount <= col + c) continue;
  9541. if (0 <= r && r <= 6 && (c == 0 || c == 6) || 0 <= c && c <= 6 && (r == 0 || r == 6) || 2 <= r && r <= 4 && 2 <= c && c <= 4) {
  9542. this.modules[row + r][col + c] = true;
  9543. } else {
  9544. this.modules[row + r][col + c] = false;
  9545. }
  9546. }
  9547. }
  9548. },
  9549. /**
  9550. * 创建二维码
  9551. * @return {[type]} [description]
  9552. */
  9553. createQrcode: function createQrcode() {
  9554. var minLostPoint = 0;
  9555. var pattern = 0;
  9556. var bestModules = null;
  9557. for (var i = 0; i < 8; i++) {
  9558. this.makeImpl(i);
  9559. var lostPoint = QRUtil.getLostPoint(this);
  9560. if (i == 0 || minLostPoint > lostPoint) {
  9561. minLostPoint = lostPoint;
  9562. pattern = i;
  9563. bestModules = this.modules;
  9564. }
  9565. }
  9566. this.modules = bestModules;
  9567. this.setupTypeInfo(false, pattern);
  9568. if (this.typeNumber >= 7) {
  9569. this.setupTypeNumber(false);
  9570. }
  9571. },
  9572. /**
  9573. * 设置定位图形
  9574. * @return {[type]} [description]
  9575. */
  9576. setupTimingPattern: function setupTimingPattern() {
  9577. for (var r = 8; r < this.moduleCount - 8; r++) {
  9578. if (this.modules[r][6] != null) {
  9579. continue;
  9580. }
  9581. this.modules[r][6] = r % 2 == 0;
  9582. if (this.modules[6][r] != null) {
  9583. continue;
  9584. }
  9585. this.modules[6][r] = r % 2 == 0;
  9586. }
  9587. },
  9588. /**
  9589. * 设置矫正图形
  9590. * @return {[type]} [description]
  9591. */
  9592. setupPositionAdjustPattern: function setupPositionAdjustPattern() {
  9593. var pos = QRUtil.getPatternPosition(this.typeNumber);
  9594. for (var i = 0; i < pos.length; i++) {
  9595. for (var j = 0; j < pos.length; j++) {
  9596. var row = pos[i];
  9597. var col = pos[j];
  9598. if (this.modules[row][col] != null) {
  9599. continue;
  9600. }
  9601. for (var r = -2; r <= 2; r++) {
  9602. for (var c = -2; c <= 2; c++) {
  9603. if (r == -2 || r == 2 || c == -2 || c == 2 || r == 0 && c == 0) {
  9604. this.modules[row + r][col + c] = true;
  9605. } else {
  9606. this.modules[row + r][col + c] = false;
  9607. }
  9608. }
  9609. }
  9610. }
  9611. }
  9612. },
  9613. /**
  9614. * 设置版本信息(7以上版本才有)
  9615. * @param {bool} test 是否处于判断最佳掩膜阶段
  9616. * @return {[type]} [description]
  9617. */
  9618. setupTypeNumber: function setupTypeNumber(test) {
  9619. var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
  9620. for (var i = 0; i < 18; i++) {
  9621. var mod = !test && (bits >> i & 1) == 1;
  9622. this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
  9623. this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
  9624. }
  9625. },
  9626. /**
  9627. * 设置格式信息(纠错等级和掩膜版本)
  9628. * @param {bool} test
  9629. * @param {num} maskPattern 掩膜版本
  9630. * @return {}
  9631. */
  9632. setupTypeInfo: function setupTypeInfo(test, maskPattern) {
  9633. var data = QRErrorCorrectLevel[this.errorCorrectLevel] << 3 | maskPattern;
  9634. var bits = QRUtil.getBCHTypeInfo(data);
  9635. // vertical
  9636. for (var i = 0; i < 15; i++) {
  9637. var mod = !test && (bits >> i & 1) == 1;
  9638. if (i < 6) {
  9639. this.modules[i][8] = mod;
  9640. } else if (i < 8) {
  9641. this.modules[i + 1][8] = mod;
  9642. } else {
  9643. this.modules[this.moduleCount - 15 + i][8] = mod;
  9644. }
  9645. // horizontal
  9646. var mod = !test && (bits >> i & 1) == 1;
  9647. if (i < 8) {
  9648. this.modules[8][this.moduleCount - i - 1] = mod;
  9649. } else if (i < 9) {
  9650. this.modules[8][15 - i - 1 + 1] = mod;
  9651. } else {
  9652. this.modules[8][15 - i - 1] = mod;
  9653. }
  9654. }
  9655. // fixed module
  9656. this.modules[this.moduleCount - 8][8] = !test;
  9657. },
  9658. /**
  9659. * 数据编码
  9660. * @return {[type]} [description]
  9661. */
  9662. createData: function createData() {
  9663. var buffer = new QRBitBuffer();
  9664. var lengthBits = this.typeNumber > 9 ? 16 : 8;
  9665. buffer.put(4, 4); //添加模式
  9666. buffer.put(this.utf8bytes.length, lengthBits);
  9667. for (var i = 0, l = this.utf8bytes.length; i < l; i++) {
  9668. buffer.put(this.utf8bytes[i], 8);
  9669. }
  9670. if (buffer.length + 4 <= this.totalDataCount * 8) {
  9671. buffer.put(0, 4);
  9672. }
  9673. // padding
  9674. while (buffer.length % 8 != 0) {
  9675. buffer.putBit(false);
  9676. }
  9677. // padding
  9678. while (true) {
  9679. if (buffer.length >= this.totalDataCount * 8) {
  9680. break;
  9681. }
  9682. buffer.put(QRCodeAlg.PAD0, 8);
  9683. if (buffer.length >= this.totalDataCount * 8) {
  9684. break;
  9685. }
  9686. buffer.put(QRCodeAlg.PAD1, 8);
  9687. }
  9688. return this.createBytes(buffer);
  9689. },
  9690. /**
  9691. * 纠错码编码
  9692. * @param {buffer} buffer 数据编码
  9693. * @return {[type]}
  9694. */
  9695. createBytes: function createBytes(buffer) {
  9696. var offset = 0;
  9697. var maxDcCount = 0;
  9698. var maxEcCount = 0;
  9699. var length = this.rsBlock.length / 3;
  9700. var rsBlocks = new Array();
  9701. for (var i = 0; i < length; i++) {
  9702. var count = this.rsBlock[i * 3 + 0];
  9703. var totalCount = this.rsBlock[i * 3 + 1];
  9704. var dataCount = this.rsBlock[i * 3 + 2];
  9705. for (var j = 0; j < count; j++) {
  9706. rsBlocks.push([dataCount, totalCount]);
  9707. }
  9708. }
  9709. var dcdata = new Array(rsBlocks.length);
  9710. var ecdata = new Array(rsBlocks.length);
  9711. for (var r = 0; r < rsBlocks.length; r++) {
  9712. var dcCount = rsBlocks[r][0];
  9713. var ecCount = rsBlocks[r][1] - dcCount;
  9714. maxDcCount = Math.max(maxDcCount, dcCount);
  9715. maxEcCount = Math.max(maxEcCount, ecCount);
  9716. dcdata[r] = new Array(dcCount);
  9717. for (var i = 0; i < dcdata[r].length; i++) {
  9718. dcdata[r][i] = 0xff & buffer.buffer[i + offset];
  9719. }
  9720. offset += dcCount;
  9721. var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
  9722. var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
  9723. var modPoly = rawPoly.mod(rsPoly);
  9724. ecdata[r] = new Array(rsPoly.getLength() - 1);
  9725. for (var i = 0; i < ecdata[r].length; i++) {
  9726. var modIndex = i + modPoly.getLength() - ecdata[r].length;
  9727. ecdata[r][i] = modIndex >= 0 ? modPoly.get(modIndex) : 0;
  9728. }
  9729. }
  9730. var data = new Array(this.totalDataCount);
  9731. var index = 0;
  9732. for (var i = 0; i < maxDcCount; i++) {
  9733. for (var r = 0; r < rsBlocks.length; r++) {
  9734. if (i < dcdata[r].length) {
  9735. data[index++] = dcdata[r][i];
  9736. }
  9737. }
  9738. }
  9739. for (var i = 0; i < maxEcCount; i++) {
  9740. for (var r = 0; r < rsBlocks.length; r++) {
  9741. if (i < ecdata[r].length) {
  9742. data[index++] = ecdata[r][i];
  9743. }
  9744. }
  9745. }
  9746. return data;
  9747. },
  9748. /**
  9749. * 布置模块,构建最终信息
  9750. * @param {} data
  9751. * @param {} maskPattern
  9752. * @return {}
  9753. */
  9754. mapData: function mapData(data, maskPattern) {
  9755. var inc = -1;
  9756. var row = this.moduleCount - 1;
  9757. var bitIndex = 7;
  9758. var byteIndex = 0;
  9759. for (var col = this.moduleCount - 1; col > 0; col -= 2) {
  9760. if (col == 6) col--;
  9761. while (true) {
  9762. for (var c = 0; c < 2; c++) {
  9763. if (this.modules[row][col - c] == null) {
  9764. var dark = false;
  9765. if (byteIndex < data.length) {
  9766. dark = (data[byteIndex] >>> bitIndex & 1) == 1;
  9767. }
  9768. var mask = QRUtil.getMask(maskPattern, row, col - c);
  9769. if (mask) {
  9770. dark = !dark;
  9771. }
  9772. this.modules[row][col - c] = dark;
  9773. bitIndex--;
  9774. if (bitIndex == -1) {
  9775. byteIndex++;
  9776. bitIndex = 7;
  9777. }
  9778. }
  9779. }
  9780. row += inc;
  9781. if (row < 0 || this.moduleCount <= row) {
  9782. row -= inc;
  9783. inc = -inc;
  9784. break;
  9785. }
  9786. }
  9787. }
  9788. } };
  9789. /**
  9790. * 填充字段
  9791. */
  9792. QRCodeAlg.PAD0 = 0xEC;
  9793. QRCodeAlg.PAD1 = 0x11;
  9794. //---------------------------------------------------------------------
  9795. // 纠错等级对应的编码
  9796. //---------------------------------------------------------------------
  9797. var QRErrorCorrectLevel = [1, 0, 3, 2];
  9798. //---------------------------------------------------------------------
  9799. // 掩膜版本
  9800. //---------------------------------------------------------------------
  9801. var QRMaskPattern = {
  9802. PATTERN000: 0,
  9803. PATTERN001: 1,
  9804. PATTERN010: 2,
  9805. PATTERN011: 3,
  9806. PATTERN100: 4,
  9807. PATTERN101: 5,
  9808. PATTERN110: 6,
  9809. PATTERN111: 7 };
  9810. //---------------------------------------------------------------------
  9811. // 工具类
  9812. //---------------------------------------------------------------------
  9813. var QRUtil = {
  9814. /*
  9815. 每个版本矫正图形的位置
  9816. */
  9817. PATTERN_POSITION_TABLE: [
  9818. [],
  9819. [6, 18],
  9820. [6, 22],
  9821. [6, 26],
  9822. [6, 30],
  9823. [6, 34],
  9824. [6, 22, 38],
  9825. [6, 24, 42],
  9826. [6, 26, 46],
  9827. [6, 28, 50],
  9828. [6, 30, 54],
  9829. [6, 32, 58],
  9830. [6, 34, 62],
  9831. [6, 26, 46, 66],
  9832. [6, 26, 48, 70],
  9833. [6, 26, 50, 74],
  9834. [6, 30, 54, 78],
  9835. [6, 30, 56, 82],
  9836. [6, 30, 58, 86],
  9837. [6, 34, 62, 90],
  9838. [6, 28, 50, 72, 94],
  9839. [6, 26, 50, 74, 98],
  9840. [6, 30, 54, 78, 102],
  9841. [6, 28, 54, 80, 106],
  9842. [6, 32, 58, 84, 110],
  9843. [6, 30, 58, 86, 114],
  9844. [6, 34, 62, 90, 118],
  9845. [6, 26, 50, 74, 98, 122],
  9846. [6, 30, 54, 78, 102, 126],
  9847. [6, 26, 52, 78, 104, 130],
  9848. [6, 30, 56, 82, 108, 134],
  9849. [6, 34, 60, 86, 112, 138],
  9850. [6, 30, 58, 86, 114, 142],
  9851. [6, 34, 62, 90, 118, 146],
  9852. [6, 30, 54, 78, 102, 126, 150],
  9853. [6, 24, 50, 76, 102, 128, 154],
  9854. [6, 28, 54, 80, 106, 132, 158],
  9855. [6, 32, 58, 84, 110, 136, 162],
  9856. [6, 26, 54, 82, 110, 138, 166],
  9857. [6, 30, 58, 86, 114, 142, 170]],
  9858. G15: 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0,
  9859. G18: 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0,
  9860. G15_MASK: 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1,
  9861. /*
  9862. BCH编码格式信息
  9863. */
  9864. getBCHTypeInfo: function getBCHTypeInfo(data) {
  9865. var d = data << 10;
  9866. while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
  9867. d ^= QRUtil.G15 << QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15);
  9868. }
  9869. return (data << 10 | d) ^ QRUtil.G15_MASK;
  9870. },
  9871. /*
  9872. BCH编码版本信息
  9873. */
  9874. getBCHTypeNumber: function getBCHTypeNumber(data) {
  9875. var d = data << 12;
  9876. while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
  9877. d ^= QRUtil.G18 << QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18);
  9878. }
  9879. return data << 12 | d;
  9880. },
  9881. /*
  9882. 获取BCH位信息
  9883. */
  9884. getBCHDigit: function getBCHDigit(data) {
  9885. var digit = 0;
  9886. while (data != 0) {
  9887. digit++;
  9888. data >>>= 1;
  9889. }
  9890. return digit;
  9891. },
  9892. /*
  9893. 获取版本对应的矫正图形位置
  9894. */
  9895. getPatternPosition: function getPatternPosition(typeNumber) {
  9896. return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
  9897. },
  9898. /*
  9899. 掩膜算法
  9900. */
  9901. getMask: function getMask(maskPattern, i, j) {
  9902. switch (maskPattern) {
  9903. case QRMaskPattern.PATTERN000:
  9904. return (i + j) % 2 == 0;
  9905. case QRMaskPattern.PATTERN001:
  9906. return i % 2 == 0;
  9907. case QRMaskPattern.PATTERN010:
  9908. return j % 3 == 0;
  9909. case QRMaskPattern.PATTERN011:
  9910. return (i + j) % 3 == 0;
  9911. case QRMaskPattern.PATTERN100:
  9912. return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;
  9913. case QRMaskPattern.PATTERN101:
  9914. return i * j % 2 + i * j % 3 == 0;
  9915. case QRMaskPattern.PATTERN110:
  9916. return (i * j % 2 + i * j % 3) % 2 == 0;
  9917. case QRMaskPattern.PATTERN111:
  9918. return (i * j % 3 + (i + j) % 2) % 2 == 0;
  9919. default:
  9920. throw new Error("bad maskPattern:" + maskPattern);}
  9921. },
  9922. /*
  9923. 获取RS的纠错多项式
  9924. */
  9925. getErrorCorrectPolynomial: function getErrorCorrectPolynomial(errorCorrectLength) {
  9926. var a = new QRPolynomial([1], 0);
  9927. for (var i = 0; i < errorCorrectLength; i++) {
  9928. a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));
  9929. }
  9930. return a;
  9931. },
  9932. /*
  9933. 获取评价
  9934. */
  9935. getLostPoint: function getLostPoint(qrCode) {
  9936. var moduleCount = qrCode.getModuleCount(),
  9937. lostPoint = 0,
  9938. darkCount = 0;
  9939. for (var row = 0; row < moduleCount; row++) {
  9940. var sameCount = 0;
  9941. var head = qrCode.modules[row][0];
  9942. for (var col = 0; col < moduleCount; col++) {
  9943. var current = qrCode.modules[row][col];
  9944. //level 3 评价
  9945. if (col < moduleCount - 6) {
  9946. if (current && !qrCode.modules[row][col + 1] && qrCode.modules[row][col + 2] && qrCode.modules[row][col + 3] && qrCode.modules[row][col + 4] && !qrCode.modules[row][col + 5] && qrCode.modules[row][col + 6]) {
  9947. if (col < moduleCount - 10) {
  9948. if (qrCode.modules[row][col + 7] && qrCode.modules[row][col + 8] && qrCode.modules[row][col + 9] && qrCode.modules[row][col + 10]) {
  9949. lostPoint += 40;
  9950. }
  9951. } else if (col > 3) {
  9952. if (qrCode.modules[row][col - 1] && qrCode.modules[row][col - 2] && qrCode.modules[row][col - 3] && qrCode.modules[row][col - 4]) {
  9953. lostPoint += 40;
  9954. }
  9955. }
  9956. }
  9957. }
  9958. //level 2 评价
  9959. if (row < moduleCount - 1 && col < moduleCount - 1) {
  9960. var count = 0;
  9961. if (current) count++;
  9962. if (qrCode.modules[row + 1][col]) count++;
  9963. if (qrCode.modules[row][col + 1]) count++;
  9964. if (qrCode.modules[row + 1][col + 1]) count++;
  9965. if (count == 0 || count == 4) {
  9966. lostPoint += 3;
  9967. }
  9968. }
  9969. //level 1 评价
  9970. if (head ^ current) {
  9971. sameCount++;
  9972. } else {
  9973. head = current;
  9974. if (sameCount >= 5) {
  9975. lostPoint += 3 + sameCount - 5;
  9976. }
  9977. sameCount = 1;
  9978. }
  9979. //level 4 评价
  9980. if (current) {
  9981. darkCount++;
  9982. }
  9983. }
  9984. }
  9985. for (var col = 0; col < moduleCount; col++) {
  9986. var sameCount = 0;
  9987. var head = qrCode.modules[0][col];
  9988. for (var row = 0; row < moduleCount; row++) {
  9989. var current = qrCode.modules[row][col];
  9990. //level 3 评价
  9991. if (row < moduleCount - 6) {
  9992. if (current && !qrCode.modules[row + 1][col] && qrCode.modules[row + 2][col] && qrCode.modules[row + 3][col] && qrCode.modules[row + 4][col] && !qrCode.modules[row + 5][col] && qrCode.modules[row + 6][col]) {
  9993. if (row < moduleCount - 10) {
  9994. if (qrCode.modules[row + 7][col] && qrCode.modules[row + 8][col] && qrCode.modules[row + 9][col] && qrCode.modules[row + 10][col]) {
  9995. lostPoint += 40;
  9996. }
  9997. } else if (row > 3) {
  9998. if (qrCode.modules[row - 1][col] && qrCode.modules[row - 2][col] && qrCode.modules[row - 3][col] && qrCode.modules[row - 4][col]) {
  9999. lostPoint += 40;
  10000. }
  10001. }
  10002. }
  10003. }
  10004. //level 1 评价
  10005. if (head ^ current) {
  10006. sameCount++;
  10007. } else {
  10008. head = current;
  10009. if (sameCount >= 5) {
  10010. lostPoint += 3 + sameCount - 5;
  10011. }
  10012. sameCount = 1;
  10013. }
  10014. }
  10015. }
  10016. // LEVEL4
  10017. var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
  10018. lostPoint += ratio * 10;
  10019. return lostPoint;
  10020. } };
  10021. //---------------------------------------------------------------------
  10022. // QRMath使用的数学工具
  10023. //---------------------------------------------------------------------
  10024. var QRMath = {
  10025. /*
  10026. 将n转化为a^m
  10027. */
  10028. glog: function glog(n) {
  10029. if (n < 1) {
  10030. throw new Error("glog(" + n + ")");
  10031. }
  10032. return QRMath.LOG_TABLE[n];
  10033. },
  10034. /*
  10035. 将a^m转化为n
  10036. */
  10037. gexp: function gexp(n) {
  10038. while (n < 0) {
  10039. n += 255;
  10040. }
  10041. while (n >= 256) {
  10042. n -= 255;
  10043. }
  10044. return QRMath.EXP_TABLE[n];
  10045. },
  10046. EXP_TABLE: new Array(256),
  10047. LOG_TABLE: new Array(256) };
  10048. for (var i = 0; i < 8; i++) {
  10049. QRMath.EXP_TABLE[i] = 1 << i;
  10050. }
  10051. for (var i = 8; i < 256; i++) {
  10052. QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8];
  10053. }
  10054. for (var i = 0; i < 255; i++) {
  10055. QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;
  10056. }
  10057. //---------------------------------------------------------------------
  10058. // QRPolynomial 多项式
  10059. //---------------------------------------------------------------------
  10060. /**
  10061. * 多项式类
  10062. * @param {Array} num 系数
  10063. * @param {num} shift a^shift
  10064. */
  10065. function QRPolynomial(num, shift) {
  10066. if (num.length == undefined) {
  10067. throw new Error(num.length + "/" + shift);
  10068. }
  10069. var offset = 0;
  10070. while (offset < num.length && num[offset] == 0) {
  10071. offset++;
  10072. }
  10073. this.num = new Array(num.length - offset + shift);
  10074. for (var i = 0; i < num.length - offset; i++) {
  10075. this.num[i] = num[i + offset];
  10076. }
  10077. }
  10078. QRPolynomial.prototype = {
  10079. get: function get(index) {
  10080. return this.num[index];
  10081. },
  10082. getLength: function getLength() {
  10083. return this.num.length;
  10084. },
  10085. /**
  10086. * 多项式乘法
  10087. * @param {QRPolynomial} e 被乘多项式
  10088. * @return {[type]} [description]
  10089. */
  10090. multiply: function multiply(e) {
  10091. var num = new Array(this.getLength() + e.getLength() - 1);
  10092. for (var i = 0; i < this.getLength(); i++) {
  10093. for (var j = 0; j < e.getLength(); j++) {
  10094. num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));
  10095. }
  10096. }
  10097. return new QRPolynomial(num, 0);
  10098. },
  10099. /**
  10100. * 多项式模运算
  10101. * @param {QRPolynomial} e 模多项式
  10102. * @return {}
  10103. */
  10104. mod: function mod(e) {
  10105. var tl = this.getLength(),
  10106. el = e.getLength();
  10107. if (tl - el < 0) {
  10108. return this;
  10109. }
  10110. var num = new Array(tl);
  10111. for (var i = 0; i < tl; i++) {
  10112. num[i] = this.get(i);
  10113. }
  10114. while (num.length >= el) {
  10115. var ratio = QRMath.glog(num[0]) - QRMath.glog(e.get(0));
  10116. for (var i = 0; i < e.getLength(); i++) {
  10117. num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);
  10118. }
  10119. while (num[0] == 0) {
  10120. num.shift();
  10121. }
  10122. }
  10123. return new QRPolynomial(num, 0);
  10124. } };
  10125. //---------------------------------------------------------------------
  10126. // RS_BLOCK_TABLE
  10127. //---------------------------------------------------------------------
  10128. /*
  10129. 二维码各个版本信息[块数, 每块中的数据块数, 每块中的信息块数]
  10130. */
  10131. var RS_BLOCK_TABLE = [
  10132. // L
  10133. // M
  10134. // Q
  10135. // H
  10136. // 1
  10137. [1, 26, 19],
  10138. [1, 26, 16],
  10139. [1, 26, 13],
  10140. [1, 26, 9],
  10141. // 2
  10142. [1, 44, 34],
  10143. [1, 44, 28],
  10144. [1, 44, 22],
  10145. [1, 44, 16],
  10146. // 3
  10147. [1, 70, 55],
  10148. [1, 70, 44],
  10149. [2, 35, 17],
  10150. [2, 35, 13],
  10151. // 4
  10152. [1, 100, 80],
  10153. [2, 50, 32],
  10154. [2, 50, 24],
  10155. [4, 25, 9],
  10156. // 5
  10157. [1, 134, 108],
  10158. [2, 67, 43],
  10159. [2, 33, 15, 2, 34, 16],
  10160. [2, 33, 11, 2, 34, 12],
  10161. // 6
  10162. [2, 86, 68],
  10163. [4, 43, 27],
  10164. [4, 43, 19],
  10165. [4, 43, 15],
  10166. // 7
  10167. [2, 98, 78],
  10168. [4, 49, 31],
  10169. [2, 32, 14, 4, 33, 15],
  10170. [4, 39, 13, 1, 40, 14],
  10171. // 8
  10172. [2, 121, 97],
  10173. [2, 60, 38, 2, 61, 39],
  10174. [4, 40, 18, 2, 41, 19],
  10175. [4, 40, 14, 2, 41, 15],
  10176. // 9
  10177. [2, 146, 116],
  10178. [3, 58, 36, 2, 59, 37],
  10179. [4, 36, 16, 4, 37, 17],
  10180. [4, 36, 12, 4, 37, 13],
  10181. // 10
  10182. [2, 86, 68, 2, 87, 69],
  10183. [4, 69, 43, 1, 70, 44],
  10184. [6, 43, 19, 2, 44, 20],
  10185. [6, 43, 15, 2, 44, 16],
  10186. // 11
  10187. [4, 101, 81],
  10188. [1, 80, 50, 4, 81, 51],
  10189. [4, 50, 22, 4, 51, 23],
  10190. [3, 36, 12, 8, 37, 13],
  10191. // 12
  10192. [2, 116, 92, 2, 117, 93],
  10193. [6, 58, 36, 2, 59, 37],
  10194. [4, 46, 20, 6, 47, 21],
  10195. [7, 42, 14, 4, 43, 15],
  10196. // 13
  10197. [4, 133, 107],
  10198. [8, 59, 37, 1, 60, 38],
  10199. [8, 44, 20, 4, 45, 21],
  10200. [12, 33, 11, 4, 34, 12],
  10201. // 14
  10202. [3, 145, 115, 1, 146, 116],
  10203. [4, 64, 40, 5, 65, 41],
  10204. [11, 36, 16, 5, 37, 17],
  10205. [11, 36, 12, 5, 37, 13],
  10206. // 15
  10207. [5, 109, 87, 1, 110, 88],
  10208. [5, 65, 41, 5, 66, 42],
  10209. [5, 54, 24, 7, 55, 25],
  10210. [11, 36, 12],
  10211. // 16
  10212. [5, 122, 98, 1, 123, 99],
  10213. [7, 73, 45, 3, 74, 46],
  10214. [15, 43, 19, 2, 44, 20],
  10215. [3, 45, 15, 13, 46, 16],
  10216. // 17
  10217. [1, 135, 107, 5, 136, 108],
  10218. [10, 74, 46, 1, 75, 47],
  10219. [1, 50, 22, 15, 51, 23],
  10220. [2, 42, 14, 17, 43, 15],
  10221. // 18
  10222. [5, 150, 120, 1, 151, 121],
  10223. [9, 69, 43, 4, 70, 44],
  10224. [17, 50, 22, 1, 51, 23],
  10225. [2, 42, 14, 19, 43, 15],
  10226. // 19
  10227. [3, 141, 113, 4, 142, 114],
  10228. [3, 70, 44, 11, 71, 45],
  10229. [17, 47, 21, 4, 48, 22],
  10230. [9, 39, 13, 16, 40, 14],
  10231. // 20
  10232. [3, 135, 107, 5, 136, 108],
  10233. [3, 67, 41, 13, 68, 42],
  10234. [15, 54, 24, 5, 55, 25],
  10235. [15, 43, 15, 10, 44, 16],
  10236. // 21
  10237. [4, 144, 116, 4, 145, 117],
  10238. [17, 68, 42],
  10239. [17, 50, 22, 6, 51, 23],
  10240. [19, 46, 16, 6, 47, 17],
  10241. // 22
  10242. [2, 139, 111, 7, 140, 112],
  10243. [17, 74, 46],
  10244. [7, 54, 24, 16, 55, 25],
  10245. [34, 37, 13],
  10246. // 23
  10247. [4, 151, 121, 5, 152, 122],
  10248. [4, 75, 47, 14, 76, 48],
  10249. [11, 54, 24, 14, 55, 25],
  10250. [16, 45, 15, 14, 46, 16],
  10251. // 24
  10252. [6, 147, 117, 4, 148, 118],
  10253. [6, 73, 45, 14, 74, 46],
  10254. [11, 54, 24, 16, 55, 25],
  10255. [30, 46, 16, 2, 47, 17],
  10256. // 25
  10257. [8, 132, 106, 4, 133, 107],
  10258. [8, 75, 47, 13, 76, 48],
  10259. [7, 54, 24, 22, 55, 25],
  10260. [22, 45, 15, 13, 46, 16],
  10261. // 26
  10262. [10, 142, 114, 2, 143, 115],
  10263. [19, 74, 46, 4, 75, 47],
  10264. [28, 50, 22, 6, 51, 23],
  10265. [33, 46, 16, 4, 47, 17],
  10266. // 27
  10267. [8, 152, 122, 4, 153, 123],
  10268. [22, 73, 45, 3, 74, 46],
  10269. [8, 53, 23, 26, 54, 24],
  10270. [12, 45, 15, 28, 46, 16],
  10271. // 28
  10272. [3, 147, 117, 10, 148, 118],
  10273. [3, 73, 45, 23, 74, 46],
  10274. [4, 54, 24, 31, 55, 25],
  10275. [11, 45, 15, 31, 46, 16],
  10276. // 29
  10277. [7, 146, 116, 7, 147, 117],
  10278. [21, 73, 45, 7, 74, 46],
  10279. [1, 53, 23, 37, 54, 24],
  10280. [19, 45, 15, 26, 46, 16],
  10281. // 30
  10282. [5, 145, 115, 10, 146, 116],
  10283. [19, 75, 47, 10, 76, 48],
  10284. [15, 54, 24, 25, 55, 25],
  10285. [23, 45, 15, 25, 46, 16],
  10286. // 31
  10287. [13, 145, 115, 3, 146, 116],
  10288. [2, 74, 46, 29, 75, 47],
  10289. [42, 54, 24, 1, 55, 25],
  10290. [23, 45, 15, 28, 46, 16],
  10291. // 32
  10292. [17, 145, 115],
  10293. [10, 74, 46, 23, 75, 47],
  10294. [10, 54, 24, 35, 55, 25],
  10295. [19, 45, 15, 35, 46, 16],
  10296. // 33
  10297. [17, 145, 115, 1, 146, 116],
  10298. [14, 74, 46, 21, 75, 47],
  10299. [29, 54, 24, 19, 55, 25],
  10300. [11, 45, 15, 46, 46, 16],
  10301. // 34
  10302. [13, 145, 115, 6, 146, 116],
  10303. [14, 74, 46, 23, 75, 47],
  10304. [44, 54, 24, 7, 55, 25],
  10305. [59, 46, 16, 1, 47, 17],
  10306. // 35
  10307. [12, 151, 121, 7, 152, 122],
  10308. [12, 75, 47, 26, 76, 48],
  10309. [39, 54, 24, 14, 55, 25],
  10310. [22, 45, 15, 41, 46, 16],
  10311. // 36
  10312. [6, 151, 121, 14, 152, 122],
  10313. [6, 75, 47, 34, 76, 48],
  10314. [46, 54, 24, 10, 55, 25],
  10315. [2, 45, 15, 64, 46, 16],
  10316. // 37
  10317. [17, 152, 122, 4, 153, 123],
  10318. [29, 74, 46, 14, 75, 47],
  10319. [49, 54, 24, 10, 55, 25],
  10320. [24, 45, 15, 46, 46, 16],
  10321. // 38
  10322. [4, 152, 122, 18, 153, 123],
  10323. [13, 74, 46, 32, 75, 47],
  10324. [48, 54, 24, 14, 55, 25],
  10325. [42, 45, 15, 32, 46, 16],
  10326. // 39
  10327. [20, 147, 117, 4, 148, 118],
  10328. [40, 75, 47, 7, 76, 48],
  10329. [43, 54, 24, 22, 55, 25],
  10330. [10, 45, 15, 67, 46, 16],
  10331. // 40
  10332. [19, 148, 118, 6, 149, 119],
  10333. [18, 75, 47, 31, 76, 48],
  10334. [34, 54, 24, 34, 55, 25],
  10335. [20, 45, 15, 61, 46, 16]];
  10336. /**
  10337. * 根据数据获取对应版本
  10338. * @return {[type]} [description]
  10339. */
  10340. QRCodeAlg.prototype.getRightType = function () {
  10341. for (var typeNumber = 1; typeNumber < 41; typeNumber++) {
  10342. var rsBlock = RS_BLOCK_TABLE[(typeNumber - 1) * 4 + this.errorCorrectLevel];
  10343. if (rsBlock == undefined) {
  10344. throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + this.errorCorrectLevel);
  10345. }
  10346. var length = rsBlock.length / 3;
  10347. var totalDataCount = 0;
  10348. for (var i = 0; i < length; i++) {
  10349. var count = rsBlock[i * 3 + 0];
  10350. var dataCount = rsBlock[i * 3 + 2];
  10351. totalDataCount += dataCount * count;
  10352. }
  10353. var lengthBytes = typeNumber > 9 ? 2 : 1;
  10354. if (this.utf8bytes.length + lengthBytes < totalDataCount || typeNumber == 40) {
  10355. this.typeNumber = typeNumber;
  10356. this.rsBlock = rsBlock;
  10357. this.totalDataCount = totalDataCount;
  10358. break;
  10359. }
  10360. }
  10361. };
  10362. //---------------------------------------------------------------------
  10363. // QRBitBuffer
  10364. //---------------------------------------------------------------------
  10365. function QRBitBuffer() {
  10366. this.buffer = new Array();
  10367. this.length = 0;
  10368. }
  10369. QRBitBuffer.prototype = {
  10370. get: function get(index) {
  10371. var bufIndex = Math.floor(index / 8);
  10372. return this.buffer[bufIndex] >>> 7 - index % 8 & 1;
  10373. },
  10374. put: function put(num, length) {
  10375. for (var i = 0; i < length; i++) {
  10376. this.putBit(num >>> length - i - 1 & 1);
  10377. }
  10378. },
  10379. putBit: function putBit(bit) {
  10380. var bufIndex = Math.floor(this.length / 8);
  10381. if (this.buffer.length <= bufIndex) {
  10382. this.buffer.push(0);
  10383. }
  10384. if (bit) {
  10385. this.buffer[bufIndex] |= 0x80 >>> this.length % 8;
  10386. }
  10387. this.length++;
  10388. } };
  10389. // xzedit
  10390. var qrcodeAlgObjCache = [];
  10391. /**
  10392. * 二维码构造函数,主要用于绘制
  10393. * @param {参数列表} opt 传递参数
  10394. * @return {}
  10395. */
  10396. QRCode = function QRCode(opt) {
  10397. //设置默认参数
  10398. this.options = {
  10399. text: '',
  10400. size: 256,
  10401. correctLevel: 3,
  10402. background: '#ffffff',
  10403. foreground: '#000000',
  10404. pdground: '#000000',
  10405. image: '',
  10406. imageSize: 30,
  10407. canvasId: opt.canvasId,
  10408. context: opt.context,
  10409. usingComponents: opt.usingComponents,
  10410. showLoading: opt.showLoading,
  10411. loadingText: opt.loadingText };
  10412. if (typeof opt === 'string') {// 只编码ASCII字符串
  10413. opt = {
  10414. text: opt };
  10415. }
  10416. if (opt) {
  10417. for (var i in opt) {
  10418. this.options[i] = opt[i];
  10419. }
  10420. }
  10421. //使用QRCodeAlg创建二维码结构
  10422. var qrCodeAlg = null;
  10423. for (var i = 0, l = qrcodeAlgObjCache.length; i < l; i++) {
  10424. if (qrcodeAlgObjCache[i].text == this.options.text && qrcodeAlgObjCache[i].text.correctLevel == this.options.correctLevel) {
  10425. qrCodeAlg = qrcodeAlgObjCache[i].obj;
  10426. break;
  10427. }
  10428. }
  10429. if (i == l) {
  10430. qrCodeAlg = new QRCodeAlg(this.options.text, this.options.correctLevel);
  10431. qrcodeAlgObjCache.push({
  10432. text: this.options.text,
  10433. correctLevel: this.options.correctLevel,
  10434. obj: qrCodeAlg });
  10435. }
  10436. /**
  10437. * 计算矩阵点的前景色
  10438. * @param {Obj} config
  10439. * @param {Number} config.row 点x坐标
  10440. * @param {Number} config.col 点y坐标
  10441. * @param {Number} config.count 矩阵大小
  10442. * @param {Number} config.options 组件的options
  10443. * @return {String}
  10444. */
  10445. var getForeGround = function getForeGround(config) {
  10446. var options = config.options;
  10447. if (options.pdground && (
  10448. config.row > 1 && config.row < 5 && config.col > 1 && config.col < 5 ||
  10449. config.row > config.count - 6 && config.row < config.count - 2 && config.col > 1 && config.col < 5 ||
  10450. config.row > 1 && config.row < 5 && config.col > config.count - 6 && config.col < config.count - 2))
  10451. {
  10452. return options.pdground;
  10453. }
  10454. return options.foreground;
  10455. };
  10456. // 创建canvas
  10457. var createCanvas = function createCanvas(options) {
  10458. if (options.showLoading) {
  10459. uni.showLoading({
  10460. title: options.loadingText,
  10461. mask: true });
  10462. }
  10463. var ctx = uni.createCanvasContext(options.canvasId, options.context);
  10464. var count = qrCodeAlg.getModuleCount();
  10465. var ratioSize = options.size;
  10466. var ratioImgSize = options.imageSize;
  10467. //计算每个点的长宽
  10468. var tileW = (ratioSize / count).toPrecision(4);
  10469. var tileH = (ratioSize / count).toPrecision(4);
  10470. //绘制
  10471. for (var row = 0; row < count; row++) {
  10472. for (var col = 0; col < count; col++) {
  10473. var w = Math.ceil((col + 1) * tileW) - Math.floor(col * tileW);
  10474. var h = Math.ceil((row + 1) * tileW) - Math.floor(row * tileW);
  10475. var foreground = getForeGround({
  10476. row: row,
  10477. col: col,
  10478. count: count,
  10479. options: options });
  10480. ctx.setFillStyle(qrCodeAlg.modules[row][col] ? foreground : options.background);
  10481. ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w, h);
  10482. }
  10483. }
  10484. if (options.image) {
  10485. // 画圆角矩形
  10486. var drawRoundedRect = function drawRoundedRect(ctxi, x, y, width, height, r, lineWidth, fill, stroke) {
  10487. ctxi.setLineWidth(lineWidth);
  10488. ctxi.setFillStyle(options.background);
  10489. ctxi.setStrokeStyle(options.background);
  10490. ctxi.beginPath(); // draw top and top right corner
  10491. ctxi.moveTo(x + r, y);
  10492. ctxi.arcTo(x + width, y, x + width, y + r, r); // draw right side and bottom right corner
  10493. ctxi.arcTo(x + width, y + height, x + width - r, y + height, r); // draw bottom and bottom left corner
  10494. ctxi.arcTo(x, y + height, x, y + height - r, r); // draw left and top left corner
  10495. ctxi.arcTo(x, y, x + r, y, r);
  10496. ctxi.closePath();
  10497. if (fill) {
  10498. ctxi.fill();
  10499. }
  10500. if (stroke) {
  10501. ctxi.stroke();
  10502. }
  10503. };var x = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));var y = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));drawRoundedRect(ctx, x, y, ratioImgSize, ratioImgSize, 2, 6, true, true);ctx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize);
  10504. }
  10505. setTimeout(function () {
  10506. ctx.draw(true, function () {
  10507. // 保存到临时区域
  10508. setTimeout(function () {
  10509. uni.canvasToTempFilePath({
  10510. width: options.width,
  10511. height: options.height,
  10512. destWidth: options.width,
  10513. destHeight: options.height,
  10514. canvasId: options.canvasId,
  10515. quality: Number(1),
  10516. success: function success(res) {
  10517. if (options.cbResult) {
  10518. options.cbResult(res.tempFilePath);
  10519. }
  10520. },
  10521. fail: function fail(res) {
  10522. if (options.cbResult) {
  10523. options.cbResult(res);
  10524. }
  10525. },
  10526. complete: function complete() {
  10527. if (options.showLoading) {
  10528. uni.hideLoading();
  10529. }
  10530. } },
  10531. options.context);
  10532. }, options.text.length + 100);
  10533. });
  10534. }, options.usingComponents ? 0 : 150);
  10535. };
  10536. createCanvas(this.options);
  10537. // 空判定
  10538. var empty = function empty(v) {
  10539. var tp = typeof v,
  10540. rt = false;
  10541. if (tp == "number" && String(v) == "") {
  10542. rt = true;
  10543. } else if (tp == "undefined") {
  10544. rt = true;
  10545. } else if (tp == "object") {
  10546. if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true;
  10547. } else if (tp == "string") {
  10548. if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true;
  10549. } else if (tp == "function") {
  10550. rt = false;
  10551. }
  10552. return rt;
  10553. };
  10554. };
  10555. QRCode.prototype.clear = function (fn) {
  10556. var ctx = uni.createCanvasContext(this.options.canvasId, this.options.context);
  10557. ctx.clearRect(0, 0, this.options.size, this.options.size);
  10558. ctx.draw(false, function () {
  10559. if (fn) {
  10560. fn();
  10561. }
  10562. });
  10563. };
  10564. })();var _default =
  10565. QRCode;exports.default = _default;
  10566. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  10567. /***/ }),
  10568. /***/ 3:
  10569. /*!***********************************!*\
  10570. !*** (webpack)/buildin/global.js ***!
  10571. \***********************************/
  10572. /*! no static exports found */
  10573. /***/ (function(module, exports) {
  10574. var g;
  10575. // This works in non-strict mode
  10576. g = (function() {
  10577. return this;
  10578. })();
  10579. try {
  10580. // This works if eval is allowed (see CSP)
  10581. g = g || new Function("return this")();
  10582. } catch (e) {
  10583. // This works if the window reference is available
  10584. if (typeof window === "object") g = window;
  10585. }
  10586. // g can still be undefined, but nothing to do about it...
  10587. // We return undefined, instead of nothing here, so it's
  10588. // easier to handle this case. if(!global) { ...}
  10589. module.exports = g;
  10590. /***/ }),
  10591. /***/ 30:
  10592. /*!************************************************************************!*\
  10593. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/type2icon.js ***!
  10594. \************************************************************************/
  10595. /*! no static exports found */
  10596. /***/ (function(module, exports, __webpack_require__) {
  10597. "use strict";
  10598. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  10599. * 根据主题type值,获取对应的图标
  10600. * @param String type 主题名称,primary|info|error|warning|success
  10601. * @param String fill 是否使用fill填充实体的图标
  10602. */
  10603. function type2icon() {var type = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'success';var fill = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  10604. // 如果非预置值,默认为success
  10605. if (['primary', 'info', 'error', 'warning', 'success'].indexOf(type) == -1) type = 'success';
  10606. var iconName = '';
  10607. // 目前(2019-12-12),info和primary使用同一个图标
  10608. switch (type) {
  10609. case 'primary':
  10610. iconName = 'info-circle';
  10611. break;
  10612. case 'info':
  10613. iconName = 'info-circle';
  10614. break;
  10615. case 'error':
  10616. iconName = 'close-circle';
  10617. break;
  10618. case 'warning':
  10619. iconName = 'error-circle';
  10620. break;
  10621. case 'success':
  10622. iconName = 'checkmark-circle';
  10623. break;
  10624. default:
  10625. iconName = 'checkmark-circle';}
  10626. // 是否是实体类型,加上-fill,在icon组件库中,实体的类名是后面加-fill的
  10627. if (fill) iconName += '-fill';
  10628. return iconName;
  10629. }var _default =
  10630. type2icon;exports.default = _default;
  10631. /***/ }),
  10632. /***/ 31:
  10633. /*!**************************************************************************!*\
  10634. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/randomArray.js ***!
  10635. \**************************************************************************/
  10636. /*! no static exports found */
  10637. /***/ (function(module, exports, __webpack_require__) {
  10638. "use strict";
  10639. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 打乱数组
  10640. function randomArray() {var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  10641. // 原理是sort排序,Math.random()产生0<= x < 1之间的数,会导致x-0.05大于或者小于0
  10642. return array.sort(function () {return Math.random() - 0.5;});
  10643. }var _default =
  10644. randomArray;exports.default = _default;
  10645. /***/ }),
  10646. /***/ 32:
  10647. /*!**********************************************************************!*\
  10648. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/addUnit.js ***!
  10649. \**********************************************************************/
  10650. /*! no static exports found */
  10651. /***/ (function(module, exports, __webpack_require__) {
  10652. "use strict";
  10653. Object.defineProperty(exports, "__esModule", { value: true });exports.default = addUnit;var _test = _interopRequireDefault(__webpack_require__(/*! ./test.js */ 19));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  10654. // 添加单位,如果有rpx,%,px等单位结尾或者值为auto,直接返回,否则加上rpx单位结尾
  10655. function addUnit() {var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'auto';var unit = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'rpx';
  10656. value = String(value);
  10657. // 用uView内置验证规则中的number判断是否为数值
  10658. return _test.default.number(value) ? "".concat(value).concat(unit) : value;
  10659. }
  10660. /***/ }),
  10661. /***/ 33:
  10662. /*!*********************************************************************!*\
  10663. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/random.js ***!
  10664. \*********************************************************************/
  10665. /*! no static exports found */
  10666. /***/ (function(module, exports, __webpack_require__) {
  10667. "use strict";
  10668. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function random(min, max) {
  10669. if (min >= 0 && max > 0 && max >= min) {
  10670. var gab = max - min + 1;
  10671. return Math.floor(Math.random() * gab + min);
  10672. } else {
  10673. return 0;
  10674. }
  10675. }var _default =
  10676. random;exports.default = _default;
  10677. /***/ }),
  10678. /***/ 34:
  10679. /*!*******************************************************************!*\
  10680. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/trim.js ***!
  10681. \*******************************************************************/
  10682. /*! no static exports found */
  10683. /***/ (function(module, exports, __webpack_require__) {
  10684. "use strict";
  10685. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function trim(str) {var pos = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'both';
  10686. if (pos == 'both') {
  10687. return str.replace(/^\s+|\s+$/g, "");
  10688. } else if (pos == "left") {
  10689. return str.replace(/^\s*/, '');
  10690. } else if (pos == 'right') {
  10691. return str.replace(/(\s*$)/g, "");
  10692. } else if (pos == 'all') {
  10693. return str.replace(/\s+/g, "");
  10694. } else {
  10695. return str;
  10696. }
  10697. }var _default =
  10698. trim;exports.default = _default;
  10699. /***/ }),
  10700. /***/ 35:
  10701. /*!********************************************************************!*\
  10702. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/toast.js ***!
  10703. \********************************************************************/
  10704. /*! no static exports found */
  10705. /***/ (function(module, exports, __webpack_require__) {
  10706. "use strict";
  10707. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function toast(title) {var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1500;
  10708. uni.showToast({
  10709. title: title,
  10710. icon: 'none',
  10711. duration: duration });
  10712. }var _default =
  10713. toast;exports.default = _default;
  10714. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  10715. /***/ }),
  10716. /***/ 36:
  10717. /*!************************************************************************!*\
  10718. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/getParent.js ***!
  10719. \************************************************************************/
  10720. /*! no static exports found */
  10721. /***/ (function(module, exports, __webpack_require__) {
  10722. "use strict";
  10723. Object.defineProperty(exports, "__esModule", { value: true });exports.default = getParent; // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  10724. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  10725. function getParent(name, keys) {
  10726. var parent = this.$parent;
  10727. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  10728. while (parent) {
  10729. // 父组件
  10730. if (parent.$options.name !== name) {
  10731. // 如果组件的name不相等,继续上一级寻找
  10732. parent = parent.$parent;
  10733. } else {var _ret = function () {
  10734. var data = {};
  10735. // 判断keys是否数组,如果传过来的是一个数组,那么直接使用数组元素值当做键值去父组件寻找
  10736. if (Array.isArray(keys)) {
  10737. keys.map(function (val) {
  10738. data[val] = parent[val] ? parent[val] : '';
  10739. });
  10740. } else {
  10741. // 历遍传过来的对象参数
  10742. for (var i in keys) {
  10743. // 如果子组件有此值则用,无此值则用父组件的值
  10744. // 判断是否空数组,如果是,则用父组件的值,否则用子组件的值
  10745. if (Array.isArray(keys[i])) {
  10746. if (keys[i].length) {
  10747. data[i] = keys[i];
  10748. } else {
  10749. data[i] = parent[i];
  10750. }
  10751. } else if (keys[i].constructor === Object) {
  10752. // 判断是否对象,如果是对象,且有属性,那么使用子组件的值,否则使用父组件的值
  10753. if (Object.keys(keys[i]).length) {
  10754. data[i] = keys[i];
  10755. } else {
  10756. data[i] = parent[i];
  10757. }
  10758. } else {
  10759. // 只要子组件有传值,即使是false值,也是“传值”了,也需要覆盖父组件的同名参数
  10760. data[i] = keys[i] || keys[i] === false ? keys[i] : parent[i];
  10761. }
  10762. }
  10763. }
  10764. return { v: data };}();if (typeof _ret === "object") return _ret.v;
  10765. }
  10766. }
  10767. return {};
  10768. }
  10769. /***/ }),
  10770. /***/ 37:
  10771. /*!**********************************************************************!*\
  10772. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/$parent.js ***!
  10773. \**********************************************************************/
  10774. /*! no static exports found */
  10775. /***/ (function(module, exports, __webpack_require__) {
  10776. "use strict";
  10777. Object.defineProperty(exports, "__esModule", { value: true });exports.default = $parent; // 获取父组件的参数,因为支付宝小程序不支持provide/inject的写法
  10778. // this.$parent在非H5中,可以准确获取到父组件,但是在H5中,需要多次this.$parent.$parent.xxx
  10779. // 这里默认值等于undefined有它的含义,因为最顶层元素(组件)的$parent就是undefined,意味着不传name
  10780. // 值(默认为undefined),就是查找最顶层的$parent
  10781. function $parent() {var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  10782. var parent = this.$parent;
  10783. // 通过while历遍,这里主要是为了H5需要多层解析的问题
  10784. while (parent) {
  10785. // 父组件
  10786. if (parent.$options && parent.$options.name !== name) {
  10787. // 如果组件的name不相等,继续上一级寻找
  10788. parent = parent.$parent;
  10789. } else {
  10790. return parent;
  10791. }
  10792. }
  10793. return false;
  10794. }
  10795. /***/ }),
  10796. /***/ 38:
  10797. /*!******************************************************************!*\
  10798. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/sys.js ***!
  10799. \******************************************************************/
  10800. /*! no static exports found */
  10801. /***/ (function(module, exports, __webpack_require__) {
  10802. "use strict";
  10803. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.os = os;exports.sys = sys;function os() {
  10804. return uni.getSystemInfoSync().platform;
  10805. };
  10806. function sys() {
  10807. return uni.getSystemInfoSync();
  10808. }
  10809. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  10810. /***/ }),
  10811. /***/ 39:
  10812. /*!***********************************************************************!*\
  10813. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/debounce.js ***!
  10814. \***********************************************************************/
  10815. /*! no static exports found */
  10816. /***/ (function(module, exports, __webpack_require__) {
  10817. "use strict";
  10818. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var timeout = null;
  10819. /**
  10820. * 防抖原理:一定时间内,只有最后一次操作,再过wait毫秒后才执行函数
  10821. *
  10822. * @param {Function} func 要执行的回调函数
  10823. * @param {Number} wait 延时的时间
  10824. * @param {Boolean} immediate 是否立即执行
  10825. * @return null
  10826. */
  10827. function debounce(func) {var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  10828. // 清除定时器
  10829. if (timeout !== null) clearTimeout(timeout);
  10830. // 立即执行,此类情况一般用不到
  10831. if (immediate) {
  10832. var callNow = !timeout;
  10833. timeout = setTimeout(function () {
  10834. timeout = null;
  10835. }, wait);
  10836. if (callNow) typeof func === 'function' && func();
  10837. } else {
  10838. // 设置定时器,当最后一次操作后,timeout不会再被清除,所以在延时wait毫秒后执行func回调方法
  10839. timeout = setTimeout(function () {
  10840. typeof func === 'function' && func();
  10841. }, wait);
  10842. }
  10843. }var _default =
  10844. debounce;exports.default = _default;
  10845. /***/ }),
  10846. /***/ 4:
  10847. /*!****************************************!*\
  10848. !*** G:/gsxm/git/yangdaxia/pages.json ***!
  10849. \****************************************/
  10850. /*! no static exports found */
  10851. /***/ (function(module, exports) {
  10852. /***/ }),
  10853. /***/ 40:
  10854. /*!***********************************************************************!*\
  10855. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/function/throttle.js ***!
  10856. \***********************************************************************/
  10857. /*! no static exports found */
  10858. /***/ (function(module, exports, __webpack_require__) {
  10859. "use strict";
  10860. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var timer, flag;
  10861. /**
  10862. * 节流原理:在一定时间内,只能触发一次
  10863. *
  10864. * @param {Function} func 要执行的回调函数
  10865. * @param {Number} wait 延时的时间
  10866. * @param {Boolean} immediate 是否立即执行
  10867. * @return null
  10868. */
  10869. function throttle(func) {var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;var immediate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  10870. if (immediate) {
  10871. if (!flag) {
  10872. flag = true;
  10873. // 如果是立即执行,则在wait毫秒内开始时执行
  10874. typeof func === 'function' && func();
  10875. timer = setTimeout(function () {
  10876. flag = false;
  10877. }, wait);
  10878. }
  10879. } else {
  10880. if (!flag) {
  10881. flag = true;
  10882. // 如果是非立即执行,则在wait毫秒内的结束处执行
  10883. timer = setTimeout(function () {
  10884. flag = false;
  10885. typeof func === 'function' && func();
  10886. }, wait);
  10887. }
  10888. }
  10889. };var _default =
  10890. throttle;exports.default = _default;
  10891. /***/ }),
  10892. /***/ 41:
  10893. /*!*******************************************************************!*\
  10894. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/config/config.js ***!
  10895. \*******************************************************************/
  10896. /*! no static exports found */
  10897. /***/ (function(module, exports, __webpack_require__) {
  10898. "use strict";
  10899. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // 此版本发布于2020-03-17
  10900. var version = '1.8.4';var _default =
  10901. {
  10902. v: version,
  10903. version: version,
  10904. // 主题名称
  10905. type: [
  10906. 'primary',
  10907. 'success',
  10908. 'info',
  10909. 'error',
  10910. 'warning'] };exports.default = _default;
  10911. /***/ }),
  10912. /***/ 42:
  10913. /*!*******************************************************************!*\
  10914. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/config/zIndex.js ***!
  10915. \*******************************************************************/
  10916. /*! no static exports found */
  10917. /***/ (function(module, exports, __webpack_require__) {
  10918. "use strict";
  10919. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; // uniapp在H5中各API的z-index值如下:
  10920. /**
  10921. * actionsheet: 999
  10922. * modal: 999
  10923. * navigate: 998
  10924. * tabbar: 998
  10925. * toast: 999
  10926. */var _default =
  10927. {
  10928. toast: 10090,
  10929. noNetwork: 10080,
  10930. // popup包含popup,actionsheet,keyboard,picker的值
  10931. popup: 10075,
  10932. mask: 10070,
  10933. navbar: 980,
  10934. topTips: 975,
  10935. sticky: 970,
  10936. indexListSticky: 965 };exports.default = _default;
  10937. /***/ }),
  10938. /***/ 49:
  10939. /*!******************************************!*\
  10940. !*** G:/gsxm/git/yangdaxia/api/index.js ***!
  10941. \******************************************/
  10942. /*! no static exports found */
  10943. /***/ (function(module, exports, __webpack_require__) {
  10944. "use strict";
  10945. Object.defineProperty(exports, "__esModule", { value: true });exports.groom4 = groom4;exports.groom1 = groom1;exports.groom3 = groom3;exports.loadIndexs = loadIndexs;exports.article = article;exports.details = details;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 50));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  10946. // 促销商品
  10947. function groom4(data) {
  10948. return (0, _request.default)({
  10949. url: '/api/groom/list/4',
  10950. method: 'get',
  10951. data: data });
  10952. }
  10953. // 精品推荐
  10954. function groom1(data) {
  10955. return (0, _request.default)({
  10956. url: '/api/groom/list/1',
  10957. method: 'get',
  10958. data: data });
  10959. }
  10960. // 新品首发
  10961. function groom3(data) {
  10962. return (0, _request.default)({
  10963. url: '/api/groom/list/3',
  10964. method: 'get',
  10965. data: data });
  10966. }
  10967. // 获取首页信息
  10968. function loadIndexs(data) {
  10969. return (0, _request.default)({
  10970. url: '/api/index',
  10971. method: 'get',
  10972. data: data });
  10973. }
  10974. //获取文章列表
  10975. function article(data, id) {
  10976. return (0, _request.default)({
  10977. url: '/api/article/list/' + id,
  10978. method: 'get',
  10979. data: data });
  10980. }
  10981. //获取文章详情
  10982. function details(data, id) {
  10983. return (0, _request.default)({
  10984. url: '/api/article/details/' + id,
  10985. method: 'GET',
  10986. data: data });
  10987. }
  10988. /***/ }),
  10989. /***/ 5:
  10990. /*!********************************************!*\
  10991. !*** G:/gsxm/git/yangdaxia/store/index.js ***!
  10992. \********************************************/
  10993. /*! no static exports found */
  10994. /***/ (function(module, exports, __webpack_require__) {
  10995. "use strict";
  10996. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 2));
  10997. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 6));
  10998. var _user = _interopRequireDefault(__webpack_require__(/*! ./model/user */ 7));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  10999. _vue.default.use(_vuex.default);
  11000. var store = new _vuex.default.Store({
  11001. state: {
  11002. // baseURL:"http://yrh.liuniu946.com",//'http://eb.shuibo.net',//请求地址配置
  11003. baseURL: 'http://www.wyrxs.com', //请求地址配置
  11004. urlFile: '/index', //项目部署所在文件夹
  11005. userInfo: {}, //登录信息
  11006. loginInterceptor: false, //是否打开强制登录
  11007. weichatInfo: {}, //保存微信注册信息
  11008. weichatObj: '' //微信对象
  11009. },
  11010. mutations: {
  11011. //保存微信信息
  11012. setWeiChatInfo: function setWeiChatInfo(state, provider) {
  11013. state.weichatInfo = provider;
  11014. },
  11015. //保存微信对象
  11016. setWeiChatObj: function setWeiChatObj(state, provider) {
  11017. state.weichatObj = provider;
  11018. } },
  11019. modules: {
  11020. user: _user.default },
  11021. actions: {} });var _default =
  11022. store;exports.default = _default;
  11023. /***/ }),
  11024. /***/ 50:
  11025. /*!**********************************************!*\
  11026. !*** G:/gsxm/git/yangdaxia/utils/request.js ***!
  11027. \**********************************************/
  11028. /*! no static exports found */
  11029. /***/ (function(module, exports, __webpack_require__) {
  11030. "use strict";
  11031. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = exports.upFilse = void 0;var _newRequest = _interopRequireDefault(__webpack_require__(/*! ./newRequest.js */ 51));
  11032. var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 5));
  11033. var _loginUtils = __webpack_require__(/*! @/utils/loginUtils.js */ 52);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  11034. // 请求完成后拦截
  11035. _newRequest.default.interceptors.response(
  11036. function (response) {
  11037. try {
  11038. var res = response.data;
  11039. // 解析字符串为数字
  11040. if (res.status !== 200) {
  11041. console.log(res.status);
  11042. if (res.status == 410000) {
  11043. // 调用退出登录方法清空用户信息
  11044. _store.default.commit('user/logout');
  11045. // 判断是否开启强制登录
  11046. uni.showModal({
  11047. title: "登陆",
  11048. content: '您未登录!是否马上登录?',
  11049. success: function success(e) {
  11050. // 判断是否点击确认按钮
  11051. if (e.confirm) {
  11052. // 保存当前页面地址
  11053. (0, _loginUtils.saveUrl)();
  11054. // 跳转页面
  11055. (0, _loginUtils.interceptor)();
  11056. }
  11057. } });
  11058. } else {
  11059. if (res.msg != '系统出现异常') {
  11060. uni.showToast({
  11061. title: res.msg,
  11062. duration: 1500,
  11063. mask: false,
  11064. icon: 'none' });
  11065. }
  11066. }
  11067. return Promise.reject(res);
  11068. } else {
  11069. return res;
  11070. }
  11071. } catch (e) {
  11072. console.log(e);
  11073. }
  11074. },
  11075. function (error) {
  11076. uni.showToast({
  11077. title: "加载错误请重试",
  11078. duration: 1500,
  11079. mask: false,
  11080. icon: 'none' });
  11081. return Promise.reject(error);
  11082. });
  11083. // 请求前拦截器
  11084. _newRequest.default.interceptors.request(
  11085. function (config) {
  11086. var token = uni.getStorageSync('token') || '';
  11087. // console.log(config);
  11088. if (!config.header) {
  11089. config.header = {
  11090. "Authori-zation": 'Bearer ' + token };
  11091. } else {
  11092. // 添加key请求头
  11093. config.header["Authori-zation"] = 'Bearer ' + token;
  11094. }
  11095. return config;
  11096. },
  11097. function (error) {
  11098. // 错误处理
  11099. console.log(error);
  11100. return Promise.reject(error);
  11101. });
  11102. var upFilse = _newRequest.default.upFilse;exports.upFilse = upFilse;var _default =
  11103. _newRequest.default.open;exports.default = _default;
  11104. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  11105. /***/ }),
  11106. /***/ 51:
  11107. /*!*************************************************!*\
  11108. !*** G:/gsxm/git/yangdaxia/utils/newRequest.js ***!
  11109. \*************************************************/
  11110. /*! no static exports found */
  11111. /***/ (function(module, exports, __webpack_require__) {
  11112. "use strict";
  11113. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _regenerator = _interopRequireDefault(__webpack_require__(/*! ./node_modules/@babel/runtime/regenerator */ 22));var _store = _interopRequireDefault(__webpack_require__(/*! ../store */ 5));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {try {var info = gen[key](arg);var value = info.value;} catch (error) {reject(error);return;}if (info.done) {resolve(value);} else {Promise.resolve(value).then(_next, _throw);}}function _asyncToGenerator(fn) {return function () {var self = this,args = arguments;return new Promise(function (resolve, reject) {var gen = fn.apply(self, args);function _next(value) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);}function _throw(err) {asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);}_next(undefined);});};}
  11114. var service = {
  11115. baseURL: _store.default.state.baseURL, // 请求头
  11116. header: {
  11117. 'Content-Type': "application/x-www-form-urlencoded" },
  11118. // 请求拦截器
  11119. interceptors: {
  11120. // 安装请求前拦截
  11121. request: function request(success, iserror) {
  11122. service.request.success = success;
  11123. service.request.error = iserror;
  11124. },
  11125. // 安装请求完成后拦截
  11126. response: function response(success, iserror) {
  11127. service.response.success = success;
  11128. service.response.error = iserror;
  11129. } },
  11130. // 请求前拦截
  11131. request: {
  11132. // 回调成功执行方法
  11133. success: function success(e) {
  11134. return e;
  11135. },
  11136. // 回调失败
  11137. error: function error(e) {
  11138. return e;
  11139. } },
  11140. // 请求完成后拦截
  11141. response: {
  11142. // 回调成功执行方法
  11143. success: function success(e) {
  11144. return e;
  11145. },
  11146. // 回调失败
  11147. error: function error(e) {
  11148. return e;
  11149. } },
  11150. // 开始请求
  11151. open: function () {var _open = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {return _regenerator.default.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0:_context.next = 2;return (
  11152. new Promise(function (resolve, reject) {
  11153. var requestData = ''; //保存处理完成后请求数据
  11154. var url = ''; //保存链接地址
  11155. //console.log(data);
  11156. // 请求前数据处理
  11157. requestData = service.request.success(data);
  11158. url = service.baseURL + requestData.url;
  11159. // 数据复制用于请求
  11160. uni.request({
  11161. url: url,
  11162. method: requestData.method || 'GET',
  11163. data: requestData.data,
  11164. header: data.header || service.header,
  11165. success: function success(res) {
  11166. if (res.statusCode == 200) {
  11167. try {
  11168. resolve(service.response.success(res));
  11169. } catch (e) {
  11170. service.response.error(e);
  11171. }
  11172. }
  11173. },
  11174. // 请求失败数据处理
  11175. fail: function fail(err) {
  11176. service.response.error(err);
  11177. } });
  11178. }));case 2:return _context.abrupt("return", _context.sent);case 3:case "end":return _context.stop();}}}, _callee);}));function open(_x) {return _open.apply(this, arguments);}return open;}(),
  11179. // 上传文件
  11180. upFilse: function () {var _upFilse = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {return _regenerator.default.wrap(function _callee4$(_context4) {while (1) {switch (_context4.prev = _context4.next) {case 0:_context4.next = 2;return (
  11181. new Promise(function (resolve, reject) {
  11182. var requestData = ''; //保存处理完成后请求数据
  11183. var url = ''; //保存请求地址
  11184. try {
  11185. // 请求前数据处理
  11186. requestData = service.request.success(data);
  11187. } catch (e) {
  11188. // 请求报错拦截
  11189. service.request.error(e);
  11190. }
  11191. url = service.baseURL + requestData.url;
  11192. var config = {
  11193. // 上传图片的API
  11194. upload_img_url: url };
  11195. var Uploader = {
  11196. // 选择图片
  11197. choose: function choose(num) {
  11198. return new Promise(function (resolve, reject) {
  11199. uni.chooseImage({
  11200. count: num,
  11201. success: function success(res) {
  11202. // console.log(res);
  11203. // 缓存文件路径
  11204. resolve(res.tempFilePaths);
  11205. },
  11206. fail: function fail(err) {
  11207. console.log(err);
  11208. reject(err);
  11209. } });
  11210. });
  11211. },
  11212. // 上传图片
  11213. upload_one: function upload_one(path) {
  11214. return new Promise(function (resolve, reject) {
  11215. uni.showLoading({
  11216. title: '上传中' });
  11217. uni.uploadFile({
  11218. url: config.upload_img_url, //仅为示例,非真实的接口地址
  11219. filePath: path,
  11220. name: 'file',
  11221. header: {
  11222. "Authori-zation": 'Bearer ' + uni.getStorageSync('token') },
  11223. success: function success(uploadFileRes) {
  11224. if ("string" === typeof uploadFileRes.data) {
  11225. resolve(JSON.parse(uploadFileRes.data).data);
  11226. } else {
  11227. resolve(uploadFileRes.data.data);
  11228. }
  11229. },
  11230. complete: function complete() {
  11231. uni.hideLoading();
  11232. } });
  11233. });
  11234. },
  11235. // 上传多个图片
  11236. upload: function upload(path_arr) {var _this = this;
  11237. var num = path_arr.length;
  11238. return new Promise( /*#__PURE__*/function () {var _ref = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee2(resolve, reject) {var img_urls, i, img_url;return _regenerator.default.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:
  11239. img_urls = [];
  11240. i = 0;case 2:if (!(i < num)) {_context2.next = 10;break;}_context2.next = 5;return (
  11241. _this.upload_one(path_arr[i]));case 5:img_url = _context2.sent;
  11242. img_urls.push(img_url);case 7:i++;_context2.next = 2;break;case 10:
  11243. ;
  11244. resolve(img_urls);case 12:case "end":return _context2.stop();}}}, _callee2);}));return function (_x3, _x4) {return _ref.apply(this, arguments);};}());
  11245. },
  11246. // 触发上传图片事件
  11247. choose_and_upload: function choose_and_upload(num) {var _this2 = this;
  11248. return new Promise( /*#__PURE__*/function () {var _ref2 = _asyncToGenerator( /*#__PURE__*/_regenerator.default.mark(function _callee3(resolve, reject) {var path_arr;return _regenerator.default.wrap(function _callee3$(_context3) {while (1) {switch (_context3.prev = _context3.next) {case 0:_context3.next = 2;return (
  11249. _this2.choose(num));case 2:path_arr = _context3.sent;_context3.next = 5;return (
  11250. _this2.upload(path_arr).then(function (e) {
  11251. resolve(e);
  11252. }).catch(function (e) {
  11253. reject(e);
  11254. }));case 5:case "end":return _context3.stop();}}}, _callee3);}));return function (_x5, _x6) {return _ref2.apply(this, arguments);};}());
  11255. } };
  11256. Uploader.choose_and_upload(1).then(function (e) {
  11257. resolve(e);
  11258. }).catch(function (e) {
  11259. console.log(e);
  11260. });
  11261. }));case 2:return _context4.abrupt("return", _context4.sent);case 3:case "end":return _context4.stop();}}}, _callee4);}));function upFilse(_x2) {return _upFilse.apply(this, arguments);}return upFilse;}() };var _default =
  11262. service;exports.default = _default;
  11263. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  11264. /***/ }),
  11265. /***/ 515:
  11266. /*!***********************************************************************!*\
  11267. !*** G:/gsxm/git/yangdaxia/components/wangding-pickerAddress/data.js ***!
  11268. \***********************************************************************/
  11269. /*! no static exports found */
  11270. /***/ (function(module, exports, __webpack_require__) {
  11271. "use strict";
  11272. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = [
  11273. {
  11274. "name": "北京市",
  11275. "city": [
  11276. {
  11277. "name": "北京市",
  11278. "area": [
  11279. "东城区",
  11280. "西城区",
  11281. "崇文区",
  11282. "宣武区",
  11283. "朝阳区",
  11284. "丰台区",
  11285. "石景山区",
  11286. "海淀区",
  11287. "门头沟区",
  11288. "房山区",
  11289. "通州区",
  11290. "顺义区",
  11291. "昌平区",
  11292. "大兴区",
  11293. "平谷区",
  11294. "怀柔区",
  11295. "密云县",
  11296. "延庆县"] }] },
  11297. {
  11298. "name": "天津市",
  11299. "city": [
  11300. {
  11301. "name": "天津市",
  11302. "area": [
  11303. "和平区",
  11304. "河东区",
  11305. "河西区",
  11306. "南开区",
  11307. "河北区",
  11308. "红桥区",
  11309. "塘沽区",
  11310. "汉沽区",
  11311. "大港区",
  11312. "东丽区",
  11313. "西青区",
  11314. "津南区",
  11315. "北辰区",
  11316. "武清区",
  11317. "宝坻区",
  11318. "宁河县",
  11319. "静海县",
  11320. "蓟 县"] }] },
  11321. {
  11322. "name": "河北省",
  11323. "city": [
  11324. {
  11325. "name": "石家庄市",
  11326. "area": [
  11327. "长安区",
  11328. "桥东区",
  11329. "桥西区",
  11330. "新华区",
  11331. "郊 区",
  11332. "井陉矿区",
  11333. "井陉县",
  11334. "正定县",
  11335. "栾城县",
  11336. "行唐县",
  11337. "灵寿县",
  11338. "高邑县",
  11339. "深泽县",
  11340. "赞皇县",
  11341. "无极县",
  11342. "平山县",
  11343. "元氏县",
  11344. "赵 县",
  11345. "辛集市",
  11346. "藁",
  11347. "晋州市",
  11348. "新乐市",
  11349. "鹿泉市"] },
  11350. {
  11351. "name": "唐山市",
  11352. "area": [
  11353. "路南区",
  11354. "路北区",
  11355. "古冶区",
  11356. "开平区",
  11357. "新 区",
  11358. "丰润县",
  11359. "滦 县",
  11360. "滦南县",
  11361. "乐亭县",
  11362. "迁西县",
  11363. "玉田县",
  11364. "唐海县",
  11365. "遵化市",
  11366. "丰南市",
  11367. "迁安市"] },
  11368. {
  11369. "name": "秦皇岛市",
  11370. "area": [
  11371. "海港区",
  11372. "山海关区",
  11373. "北戴河区",
  11374. "青龙满族自治县",
  11375. "昌黎县",
  11376. "抚宁县",
  11377. "卢龙县"] },
  11378. {
  11379. "name": "邯郸市",
  11380. "area": [
  11381. "邯山区",
  11382. "丛台区",
  11383. "复兴区",
  11384. "峰峰矿区",
  11385. "邯郸县",
  11386. "临漳县",
  11387. "成安县",
  11388. "大名县",
  11389. "涉 县",
  11390. "磁 县",
  11391. "肥乡县",
  11392. "永年县",
  11393. "邱 县",
  11394. "鸡泽县",
  11395. "广平县",
  11396. "馆陶县",
  11397. "魏 县",
  11398. "曲周县",
  11399. "武安市"] },
  11400. {
  11401. "name": "邢台市",
  11402. "area": [
  11403. "桥东区",
  11404. "桥西区",
  11405. "邢台县",
  11406. "临城县",
  11407. "内丘县",
  11408. "柏乡县",
  11409. "隆尧县",
  11410. "任 县",
  11411. "南和县",
  11412. "宁晋县",
  11413. "巨鹿县",
  11414. "新河县",
  11415. "广宗县",
  11416. "平乡县",
  11417. "威 县",
  11418. "清河县",
  11419. "临西县",
  11420. "南宫市",
  11421. "沙河市"] },
  11422. {
  11423. "name": "保定市",
  11424. "area": [
  11425. "新市区",
  11426. "北市区",
  11427. "南市区",
  11428. "满城县",
  11429. "清苑县",
  11430. "涞水县",
  11431. "阜平县",
  11432. "徐水县",
  11433. "定兴县",
  11434. "唐 县",
  11435. "高阳县",
  11436. "容城县",
  11437. "涞源县",
  11438. "望都县",
  11439. "安新县",
  11440. "易 县",
  11441. "曲阳县",
  11442. "蠡 县",
  11443. "顺平县",
  11444. "博野",
  11445. "雄县",
  11446. "涿州市",
  11447. "定州市",
  11448. "安国市",
  11449. "高碑店市"] },
  11450. {
  11451. "name": "张家口",
  11452. "area": [
  11453. "桥东区",
  11454. "桥西区",
  11455. "宣化区",
  11456. "下花园区",
  11457. "宣化县",
  11458. "张北县",
  11459. "康保县",
  11460. "沽源县",
  11461. "尚义县",
  11462. "蔚 县",
  11463. "阳原县",
  11464. "怀安县",
  11465. "万全县",
  11466. "怀来县",
  11467. "涿鹿县",
  11468. "赤城县",
  11469. "崇礼县"] },
  11470. {
  11471. "name": "承德市",
  11472. "area": [
  11473. "双桥区",
  11474. "双滦区",
  11475. "鹰手营子矿区",
  11476. "承德县",
  11477. "兴隆县",
  11478. "平泉县",
  11479. "滦平县",
  11480. "隆化县",
  11481. "丰宁满族自治县",
  11482. "宽城满族自治县",
  11483. "围场满族蒙古族自治县"] },
  11484. {
  11485. "name": "沧州市",
  11486. "area": [
  11487. "新华区",
  11488. "运河区",
  11489. "沧 县",
  11490. "青 县",
  11491. "东光县",
  11492. "海兴县",
  11493. "盐山县",
  11494. "肃宁县",
  11495. "南皮县",
  11496. "吴桥县",
  11497. "献 县",
  11498. "孟村回族自治县",
  11499. "泊头市",
  11500. "任丘市",
  11501. "黄骅市",
  11502. "河间市"] },
  11503. {
  11504. "name": "廊坊市",
  11505. "area": [
  11506. "安次区",
  11507. "固安县",
  11508. "永清县",
  11509. "香河县",
  11510. "大城县",
  11511. "文安县",
  11512. "大厂回族自治县",
  11513. "霸州市",
  11514. "三河市"] },
  11515. {
  11516. "name": "衡水市",
  11517. "area": [
  11518. "桃城区",
  11519. "枣强县",
  11520. "武邑县",
  11521. "武强县",
  11522. "饶阳县",
  11523. "安平县",
  11524. "故城县",
  11525. "景 县",
  11526. "阜城县",
  11527. "冀州市",
  11528. "深州市"] }] },
  11529. {
  11530. "name": "山西省",
  11531. "city": [
  11532. {
  11533. "name": "太原市",
  11534. "area": [
  11535. "小店区",
  11536. "迎泽区",
  11537. "杏花岭区",
  11538. "尖草坪区",
  11539. "万柏林区",
  11540. "晋源区",
  11541. "清徐县",
  11542. "阳曲县",
  11543. "娄烦县",
  11544. "古交市"] },
  11545. {
  11546. "name": "大同市",
  11547. "area": [
  11548. "城 区",
  11549. "矿 区",
  11550. "南郊区",
  11551. "新荣区",
  11552. "阳高县",
  11553. "天镇县",
  11554. "广灵县",
  11555. "灵丘县",
  11556. "浑源县",
  11557. "左云县",
  11558. "大同县"] },
  11559. {
  11560. "name": "阳泉市",
  11561. "area": [
  11562. "城 区",
  11563. "矿 区",
  11564. "郊 区",
  11565. "平定县",
  11566. "盂 县"] },
  11567. {
  11568. "name": "长治市",
  11569. "area": [
  11570. "城 区",
  11571. "郊 区",
  11572. "长治县",
  11573. "襄垣县",
  11574. "屯留县",
  11575. "平顺县",
  11576. "黎城县",
  11577. "壶关县",
  11578. "长子县",
  11579. "武乡县",
  11580. "沁 县",
  11581. "沁源县",
  11582. "潞城市"] },
  11583. {
  11584. "name": "晋城市",
  11585. "area": [
  11586. "城 区",
  11587. "沁水县",
  11588. "阳城县",
  11589. "陵川县",
  11590. "泽州县",
  11591. "高平市"] },
  11592. {
  11593. "name": "朔州市",
  11594. "area": [
  11595. "朔城区",
  11596. "平鲁区",
  11597. "山阴县",
  11598. "应 县",
  11599. "右玉县",
  11600. "怀仁县"] },
  11601. {
  11602. "name": "忻州市",
  11603. "area": [
  11604. "忻府区",
  11605. "原平市",
  11606. "定襄县",
  11607. "五台县",
  11608. "代 县",
  11609. "繁峙县",
  11610. "宁武县",
  11611. "静乐县",
  11612. "神池县",
  11613. "五寨县",
  11614. "岢岚县",
  11615. "河曲县",
  11616. "保德县",
  11617. "偏关县"] },
  11618. {
  11619. "name": "吕梁市",
  11620. "area": [
  11621. "离石区",
  11622. "孝义市",
  11623. "汾阳市",
  11624. "文水县",
  11625. "交城县",
  11626. "兴 县",
  11627. "临 县",
  11628. "柳林县",
  11629. "石楼县",
  11630. "岚 县",
  11631. "方山县",
  11632. "中阳县",
  11633. "交口县"] },
  11634. {
  11635. "name": "晋中市",
  11636. "area": [
  11637. "榆次市",
  11638. "介休市",
  11639. "榆社县",
  11640. "左权县",
  11641. "和顺县",
  11642. "昔阳县",
  11643. "寿阳县",
  11644. "太谷县",
  11645. "祁 县",
  11646. "平遥县",
  11647. "灵石县"] },
  11648. {
  11649. "name": "临汾市",
  11650. "area": [
  11651. "临汾市",
  11652. "侯马市",
  11653. "霍州市",
  11654. "曲沃县",
  11655. "翼城县",
  11656. "襄汾县",
  11657. "洪洞县",
  11658. "古 县",
  11659. "安泽县",
  11660. "浮山县",
  11661. "吉 县",
  11662. "乡宁县",
  11663. "蒲 县",
  11664. "大宁县",
  11665. "永和县",
  11666. "隰 县",
  11667. "汾西县"] },
  11668. {
  11669. "name": "运城市",
  11670. "area": [
  11671. "运城市",
  11672. "永济市",
  11673. "河津市",
  11674. "芮城县",
  11675. "临猗县",
  11676. "万荣县",
  11677. "新绛县",
  11678. "稷山县",
  11679. "闻喜县",
  11680. "夏 县",
  11681. "绛 县",
  11682. "平陆县",
  11683. "垣曲县"] }] },
  11684. {
  11685. "name": "内蒙古",
  11686. "city": [
  11687. {
  11688. "name": "呼和浩特市",
  11689. "area": [
  11690. "新城区",
  11691. "回民区",
  11692. "玉泉区",
  11693. "郊 区",
  11694. "土默特左旗",
  11695. "托克托县",
  11696. "和林格尔县",
  11697. "清水河县",
  11698. "武川县"] },
  11699. {
  11700. "name": "包头市",
  11701. "area": [
  11702. "东河区",
  11703. "昆都伦区",
  11704. "青山区",
  11705. "石拐矿区",
  11706. "白云矿区",
  11707. "郊 区",
  11708. "土默特右旗",
  11709. "固阳县",
  11710. "达尔罕茂明安联合旗"] },
  11711. {
  11712. "name": "乌海市",
  11713. "area": [
  11714. "海勃湾区",
  11715. "海南区",
  11716. "乌达区"] },
  11717. {
  11718. "name": "赤峰市",
  11719. "area": [
  11720. "红山区",
  11721. "元宝山区",
  11722. "松山区",
  11723. "阿鲁科尔沁旗",
  11724. "巴林左旗",
  11725. "巴林右旗",
  11726. "林西县",
  11727. "克什克腾旗",
  11728. "翁牛特旗",
  11729. "喀喇沁旗",
  11730. "宁城县",
  11731. "敖汉旗"] },
  11732. {
  11733. "name": "呼伦贝尔市",
  11734. "area": [
  11735. "海拉尔市",
  11736. "满洲里市",
  11737. "扎兰屯市",
  11738. "牙克石市",
  11739. "根河市",
  11740. "额尔古纳市",
  11741. "阿荣旗",
  11742. "莫力达瓦达斡尔族自治旗",
  11743. "鄂伦春自治旗",
  11744. "鄂温克族自治旗",
  11745. "新巴尔虎右旗",
  11746. "新巴尔虎左旗",
  11747. "陈巴尔虎旗"] },
  11748. {
  11749. "name": "兴安盟",
  11750. "area": [
  11751. "乌兰浩特市",
  11752. "阿尔山市",
  11753. "科尔沁右翼前旗",
  11754. "科尔沁右翼中旗",
  11755. "扎赉特旗",
  11756. "突泉县"] },
  11757. {
  11758. "name": "通辽市",
  11759. "area": [
  11760. "科尔沁区",
  11761. "霍林郭勒市",
  11762. "科尔沁左翼中旗",
  11763. "科尔沁左翼后旗",
  11764. "开鲁县",
  11765. "库伦旗",
  11766. "奈曼旗",
  11767. "扎鲁特旗"] },
  11768. {
  11769. "name": "锡林郭勒盟",
  11770. "area": [
  11771. "二连浩特市",
  11772. "锡林浩特市",
  11773. "阿巴嘎旗",
  11774. "苏尼特左旗",
  11775. "苏尼特右旗",
  11776. "东乌珠穆沁旗",
  11777. "西乌珠穆沁旗",
  11778. "太仆寺旗",
  11779. "镶黄旗",
  11780. "正镶白旗",
  11781. "正蓝旗",
  11782. "多伦县"] },
  11783. {
  11784. "name": "乌兰察布盟",
  11785. "area": [
  11786. "集宁市",
  11787. "丰镇市",
  11788. "卓资县",
  11789. "化德县",
  11790. "商都县",
  11791. "兴和县",
  11792. "凉城县",
  11793. "察哈尔右翼前旗",
  11794. "察哈尔右翼中旗",
  11795. "察哈尔右翼后旗",
  11796. "四子王旗"] },
  11797. {
  11798. "name": "伊克昭盟",
  11799. "area": [
  11800. "东胜市",
  11801. "达拉特旗",
  11802. "准格尔旗",
  11803. "鄂托克前旗",
  11804. "鄂托克旗",
  11805. "杭锦旗",
  11806. "乌审旗",
  11807. "伊金霍洛旗"] },
  11808. {
  11809. "name": "巴彦淖尔盟",
  11810. "area": [
  11811. "临河市",
  11812. "五原县",
  11813. "磴口县",
  11814. "乌拉特前旗",
  11815. "乌拉特中旗",
  11816. "乌拉特后旗",
  11817. "杭锦后旗"] },
  11818. {
  11819. "name": "阿拉善盟",
  11820. "area": [
  11821. "阿拉善左旗",
  11822. "阿拉善右旗",
  11823. "额济纳旗"] }] },
  11824. {
  11825. "name": "辽宁省",
  11826. "city": [
  11827. {
  11828. "name": "沈阳市",
  11829. "area": [
  11830. "沈河区",
  11831. "皇姑区",
  11832. "和平区",
  11833. "大东区",
  11834. "铁西区",
  11835. "苏家屯区",
  11836. "东陵区",
  11837. "于洪区",
  11838. "新民市",
  11839. "法库县",
  11840. "辽中县",
  11841. "康平县",
  11842. "新城子区"] },
  11843. {
  11844. "name": "大连市",
  11845. "area": [
  11846. "西岗区",
  11847. "中山区",
  11848. "沙河口区",
  11849. "甘井子区",
  11850. "旅顺口区",
  11851. "金州区",
  11852. "瓦房店市",
  11853. "普兰店市",
  11854. "庄河市",
  11855. "长海县"] },
  11856. {
  11857. "name": "鞍山市",
  11858. "area": [
  11859. "铁东区",
  11860. "铁西区",
  11861. "立山区",
  11862. "千山区",
  11863. "海城市",
  11864. "台安县",
  11865. "岫岩满族自治县"] },
  11866. {
  11867. "name": "抚顺市",
  11868. "area": [
  11869. "顺城区",
  11870. "新抚区",
  11871. "东洲区",
  11872. "望花区",
  11873. "抚顺县",
  11874. "清原满族自治县",
  11875. "新宾满族自治县"] },
  11876. {
  11877. "name": "本溪市",
  11878. "area": [
  11879. "平山区",
  11880. "明山区",
  11881. "溪湖区",
  11882. "南芬区",
  11883. "本溪满族自治县",
  11884. "桓仁满族自治县"] },
  11885. {
  11886. "name": "丹东市",
  11887. "area": [
  11888. "振兴区",
  11889. "元宝区",
  11890. "振安区",
  11891. "东港市",
  11892. "凤城市",
  11893. "宽甸满族自治县"] },
  11894. {
  11895. "name": "锦州市",
  11896. "area": [
  11897. "太和区",
  11898. "古塔区",
  11899. "凌河区",
  11900. "凌海市",
  11901. "黑山县",
  11902. "义县",
  11903. "北宁市"] },
  11904. {
  11905. "name": "营口市",
  11906. "area": [
  11907. "站前区",
  11908. "西市区",
  11909. "鲅鱼圈区",
  11910. "老边区",
  11911. "大石桥市",
  11912. "盖州市"] },
  11913. {
  11914. "name": "阜新市",
  11915. "area": [
  11916. "海州区",
  11917. "新邱区",
  11918. "太平区",
  11919. "清河门区",
  11920. "细河区",
  11921. "彰武县",
  11922. "阜新蒙古族自治县"] },
  11923. {
  11924. "name": "辽阳市",
  11925. "area": [
  11926. "白塔区",
  11927. "文圣区",
  11928. "宏伟区",
  11929. "太子河区",
  11930. "弓长岭区",
  11931. "灯塔市",
  11932. "辽阳县"] },
  11933. {
  11934. "name": "盘锦",
  11935. "area": [
  11936. "双台子区",
  11937. "兴隆台区",
  11938. "盘山县",
  11939. "大洼县"] },
  11940. {
  11941. "name": "铁岭市",
  11942. "area": [
  11943. "银州区",
  11944. "清河区",
  11945. "调兵山市",
  11946. "开原市",
  11947. "铁岭县",
  11948. "昌图县",
  11949. "西丰县"] },
  11950. {
  11951. "name": "朝阳市",
  11952. "area": [
  11953. "双塔区",
  11954. "龙城区",
  11955. "凌源市",
  11956. "北票市",
  11957. "朝阳县",
  11958. "建平县",
  11959. "喀喇沁左翼蒙古族自治县"] },
  11960. {
  11961. "name": "葫芦岛市",
  11962. "area": [
  11963. "龙港区",
  11964. "南票区",
  11965. "连山区",
  11966. "兴城市",
  11967. "绥中县",
  11968. "建昌县"] }] },
  11969. {
  11970. "name": "吉林省",
  11971. "city": [
  11972. {
  11973. "name": "长春市",
  11974. "area": [
  11975. "朝阳区",
  11976. "宽城区",
  11977. "二道区",
  11978. "南关区",
  11979. "绿园区",
  11980. "双阳区",
  11981. "九台市",
  11982. "榆树市",
  11983. "德惠市",
  11984. "农安县"] },
  11985. {
  11986. "name": "吉林市",
  11987. "area": [
  11988. "船营区",
  11989. "昌邑区",
  11990. "龙潭区",
  11991. "丰满区",
  11992. "舒兰市",
  11993. "桦甸市",
  11994. "蛟河市",
  11995. "磐石市",
  11996. "永吉县"] },
  11997. {
  11998. "name": "四平",
  11999. "area": [
  12000. "铁西区",
  12001. "铁东区",
  12002. "公主岭市",
  12003. "双辽市",
  12004. "梨树县",
  12005. "伊通满族自治县"] },
  12006. {
  12007. "name": "辽源市",
  12008. "area": [
  12009. "龙山区",
  12010. "西安区",
  12011. "东辽县",
  12012. "东丰县"] },
  12013. {
  12014. "name": "通化市",
  12015. "area": [
  12016. "东昌区",
  12017. "二道江区",
  12018. "梅河口市",
  12019. "集安市",
  12020. "通化县",
  12021. "辉南县",
  12022. "柳河县"] },
  12023. {
  12024. "name": "白山市",
  12025. "area": [
  12026. "八道江区",
  12027. "江源区",
  12028. "临江市",
  12029. "靖宇县",
  12030. "抚松县",
  12031. "长白朝鲜族自治县"] },
  12032. {
  12033. "name": "松原市",
  12034. "area": [
  12035. "宁江区",
  12036. "乾安县",
  12037. "长岭县",
  12038. "扶余县",
  12039. "前郭尔罗斯蒙古族自治县"] },
  12040. {
  12041. "name": "白城市",
  12042. "area": [
  12043. "洮北区",
  12044. "大安市",
  12045. "洮南市",
  12046. "镇赉县",
  12047. "通榆县"] },
  12048. {
  12049. "name": "延边朝鲜族自治州",
  12050. "area": [
  12051. "延吉市",
  12052. "图们市",
  12053. "敦化市",
  12054. "龙井市",
  12055. "珲春市",
  12056. "和龙市",
  12057. "安图县",
  12058. "汪清县"] }] },
  12059. {
  12060. "name": "黑龙江省",
  12061. "city": [
  12062. {
  12063. "name": "哈尔滨市",
  12064. "area": [
  12065. "松北区",
  12066. "道里区",
  12067. "南岗区",
  12068. "平房区",
  12069. "香坊区",
  12070. "道外区",
  12071. "呼兰区",
  12072. "阿城区",
  12073. "双城市",
  12074. "尚志市",
  12075. "五常市",
  12076. "宾县",
  12077. "方正县",
  12078. "通河县",
  12079. "巴彦县",
  12080. "延寿县",
  12081. "木兰县",
  12082. "依兰县"] },
  12083. {
  12084. "name": "齐齐哈尔市",
  12085. "area": [
  12086. "龙沙区",
  12087. "昂昂溪区",
  12088. "铁锋区",
  12089. "建华区",
  12090. "富拉尔基区",
  12091. "碾子山区",
  12092. "梅里斯达斡尔族区",
  12093. "讷河市",
  12094. "富裕县",
  12095. "拜泉县",
  12096. "甘南县",
  12097. "依安县",
  12098. "克山县",
  12099. "泰来县",
  12100. "克东县",
  12101. "龙江县"] },
  12102. {
  12103. "name": "鹤岗市",
  12104. "area": [
  12105. "兴山区",
  12106. "工农区",
  12107. "南山区",
  12108. "兴安区",
  12109. "向阳区",
  12110. "东山区",
  12111. "萝北县",
  12112. "绥滨县"] },
  12113. {
  12114. "name": "双鸭山",
  12115. "area": [
  12116. "尖山区",
  12117. "岭东区",
  12118. "四方台区",
  12119. "宝山区",
  12120. "集贤县",
  12121. "宝清县",
  12122. "友谊县",
  12123. "饶河县"] },
  12124. {
  12125. "name": "鸡西市",
  12126. "area": [
  12127. "鸡冠区",
  12128. "恒山区",
  12129. "城子河区",
  12130. "滴道区",
  12131. "梨树区",
  12132. "麻山区",
  12133. "密山市",
  12134. "虎林市",
  12135. "鸡东县"] },
  12136. {
  12137. "name": "大庆市",
  12138. "area": [
  12139. "萨尔图区",
  12140. "红岗区",
  12141. "龙凤区",
  12142. "让胡路区",
  12143. "大同区",
  12144. "林甸县",
  12145. "肇州县",
  12146. "肇源县",
  12147. "杜尔伯特蒙古族自治县"] },
  12148. {
  12149. "name": "伊春市",
  12150. "area": [
  12151. "伊春区",
  12152. "带岭区",
  12153. "南岔区",
  12154. "金山屯区",
  12155. "西林区",
  12156. "美溪区",
  12157. "乌马河区",
  12158. "翠峦区",
  12159. "友好区",
  12160. "上甘岭区",
  12161. "五营区",
  12162. "红星区",
  12163. "新青区",
  12164. "汤旺河区",
  12165. "乌伊岭区",
  12166. "铁力市",
  12167. "嘉荫县"] },
  12168. {
  12169. "name": "牡丹江市",
  12170. "area": [
  12171. "爱民区",
  12172. "东安区",
  12173. "阳明区",
  12174. "西安区",
  12175. "绥芬河市",
  12176. "宁安市",
  12177. "海林市",
  12178. "穆棱市",
  12179. "林口县",
  12180. "东宁县"] },
  12181. {
  12182. "name": "佳木斯市",
  12183. "area": [
  12184. "向阳区",
  12185. "前进区",
  12186. "东风区",
  12187. "郊区",
  12188. "同江市",
  12189. "富锦市",
  12190. "桦川县",
  12191. "抚远县",
  12192. "桦南县",
  12193. "汤原县"] },
  12194. {
  12195. "name": "七台河市",
  12196. "area": [
  12197. "桃山区",
  12198. "新兴区",
  12199. "茄子河区",
  12200. "勃利县"] },
  12201. {
  12202. "name": "黑河市",
  12203. "area": [
  12204. "爱辉区",
  12205. "北安市",
  12206. "五大连池市",
  12207. "逊克县",
  12208. "嫩江县",
  12209. "孙吴县"] },
  12210. {
  12211. "name": "绥化市",
  12212. "area": [
  12213. "北林区",
  12214. "安达市",
  12215. "肇东市",
  12216. "海伦市",
  12217. "绥棱县",
  12218. "兰西县",
  12219. "明水县",
  12220. "青冈县",
  12221. "庆安县",
  12222. "望奎县"] },
  12223. {
  12224. "name": "大兴安岭地区",
  12225. "area": [
  12226. "呼玛县",
  12227. "塔河县",
  12228. "漠河县",
  12229. "大兴安岭辖区"] }] },
  12230. {
  12231. "name": "上海市",
  12232. "city": [
  12233. {
  12234. "name": "上海市",
  12235. "area": [
  12236. "黄浦区",
  12237. "卢湾区",
  12238. "徐汇区",
  12239. "长宁区",
  12240. "静安区",
  12241. "普陀区",
  12242. "闸北区",
  12243. "虹口区",
  12244. "杨浦区",
  12245. "宝山区",
  12246. "闵行区",
  12247. "嘉定区",
  12248. "松江区",
  12249. "金山区",
  12250. "青浦区",
  12251. "南汇区",
  12252. "奉贤区",
  12253. "浦东新区",
  12254. "崇明县"] }] },
  12255. {
  12256. "name": "江苏省",
  12257. "city": [
  12258. {
  12259. "name": "南京市",
  12260. "area": [
  12261. "玄武区",
  12262. "白下区",
  12263. "秦淮区",
  12264. "建邺区",
  12265. "鼓楼区",
  12266. "下关区",
  12267. "栖霞区",
  12268. "雨花台区",
  12269. "浦口区",
  12270. "江宁区",
  12271. "六合区",
  12272. "溧水县",
  12273. "高淳县"] },
  12274. {
  12275. "name": "苏州市",
  12276. "area": [
  12277. "金阊区",
  12278. "平江区",
  12279. "沧浪区",
  12280. "虎丘区",
  12281. "吴中区",
  12282. "相城区",
  12283. "常熟市",
  12284. "张家港市",
  12285. "昆山市",
  12286. "吴江市",
  12287. "太仓市"] },
  12288. {
  12289. "name": "无锡市",
  12290. "area": [
  12291. "崇安区",
  12292. "南长区",
  12293. "北塘区",
  12294. "滨湖区",
  12295. "锡山区",
  12296. "惠山区",
  12297. "江阴市",
  12298. "宜兴市"] },
  12299. {
  12300. "name": "常州市",
  12301. "area": [
  12302. "钟楼区",
  12303. "天宁区",
  12304. "戚墅堰区",
  12305. "新北区",
  12306. "武进区",
  12307. "金坛市",
  12308. "溧阳市"] },
  12309. {
  12310. "name": "镇江市",
  12311. "area": [
  12312. "京口区",
  12313. "润州区",
  12314. "丹徒区",
  12315. "丹阳市",
  12316. "扬中市",
  12317. "句容市"] },
  12318. {
  12319. "name": "南通市",
  12320. "area": [
  12321. "崇川区",
  12322. "港闸区",
  12323. "通州市",
  12324. "如皋市",
  12325. "海门市",
  12326. "启东市",
  12327. "海安县",
  12328. "如东县"] },
  12329. {
  12330. "name": "泰州市",
  12331. "area": [
  12332. "海陵区",
  12333. "高港区",
  12334. "姜堰市",
  12335. "泰兴市",
  12336. "靖江市",
  12337. "兴化市"] },
  12338. {
  12339. "name": "扬州市",
  12340. "area": [
  12341. "广陵区",
  12342. "维扬区",
  12343. "邗江区",
  12344. "江都市",
  12345. "仪征市",
  12346. "高邮市",
  12347. "宝应县"] },
  12348. {
  12349. "name": "盐城市",
  12350. "area": [
  12351. "亭湖区",
  12352. "盐都区",
  12353. "大丰市",
  12354. "东台市",
  12355. "建湖县",
  12356. "射阳县",
  12357. "阜宁县",
  12358. "滨海县",
  12359. "响水县"] },
  12360. {
  12361. "name": "连云港市",
  12362. "area": [
  12363. "新浦区",
  12364. "海州区",
  12365. "连云区",
  12366. "东海县",
  12367. "灌云县",
  12368. "赣榆县",
  12369. "灌南县"] },
  12370. {
  12371. "name": "徐州市",
  12372. "area": [
  12373. "云龙区",
  12374. "鼓楼区",
  12375. "九里区",
  12376. "泉山区",
  12377. "贾汪区",
  12378. "邳州市",
  12379. "新沂市",
  12380. "铜山县",
  12381. "睢宁县",
  12382. "沛县",
  12383. "丰县"] },
  12384. {
  12385. "name": "淮安市",
  12386. "area": [
  12387. "清河区",
  12388. "清浦区",
  12389. "楚州区",
  12390. "淮阴区",
  12391. "涟水县",
  12392. "洪泽县",
  12393. "金湖县",
  12394. "盱眙县"] },
  12395. {
  12396. "name": "宿迁市",
  12397. "area": [
  12398. "宿城区",
  12399. "宿豫区",
  12400. "沭阳县",
  12401. "泗阳县",
  12402. "泗洪县"] }] },
  12403. {
  12404. "name": "浙江省",
  12405. "city": [
  12406. {
  12407. "name": "杭州市",
  12408. "area": [
  12409. "拱墅区",
  12410. "西湖区",
  12411. "上城区",
  12412. "下城区",
  12413. "江干区",
  12414. "滨江区",
  12415. "余杭区",
  12416. "萧山区",
  12417. "建德市",
  12418. "富阳市",
  12419. "临安市",
  12420. "桐庐县",
  12421. "淳安县"] },
  12422. {
  12423. "name": "宁波市",
  12424. "area": [
  12425. "海曙区",
  12426. "江东区",
  12427. "江北区",
  12428. "镇海区",
  12429. "北仑区",
  12430. "鄞州区",
  12431. "余姚市",
  12432. "慈溪市",
  12433. "奉化市",
  12434. "宁海县",
  12435. "象山县"] },
  12436. {
  12437. "name": "温州市",
  12438. "area": [
  12439. "鹿城区",
  12440. "龙湾区",
  12441. "瓯海区",
  12442. "瑞安市",
  12443. "乐清市",
  12444. "永嘉县",
  12445. "洞头县",
  12446. "平阳县",
  12447. "苍南县",
  12448. "文成县",
  12449. "泰顺县"] },
  12450. {
  12451. "name": "嘉兴市",
  12452. "area": [
  12453. "秀城区",
  12454. "秀洲区",
  12455. "海宁市",
  12456. "平湖市",
  12457. "桐乡市",
  12458. "嘉善县",
  12459. "海盐县"] },
  12460. {
  12461. "name": "湖州市",
  12462. "area": [
  12463. "吴兴区",
  12464. "南浔区",
  12465. "长兴县",
  12466. "德清县",
  12467. "安吉县"] },
  12468. {
  12469. "name": "绍兴市",
  12470. "area": [
  12471. "越城区",
  12472. "诸暨市",
  12473. "上虞市",
  12474. "嵊州市",
  12475. "绍兴县",
  12476. "新昌县"] },
  12477. {
  12478. "name": "金华市",
  12479. "area": [
  12480. "婺城区",
  12481. "金东区",
  12482. "兰溪市",
  12483. "义乌市",
  12484. "东阳市",
  12485. "永康市",
  12486. "武义县",
  12487. "浦江县",
  12488. "磐安县"] },
  12489. {
  12490. "name": "衢州市",
  12491. "area": [
  12492. "柯城区",
  12493. "衢江区",
  12494. "江山市",
  12495. "龙游县",
  12496. "常山县",
  12497. "开化县"] },
  12498. {
  12499. "name": "舟山市",
  12500. "area": [
  12501. "定海区",
  12502. "普陀区",
  12503. "岱山县",
  12504. "嵊泗县"] },
  12505. {
  12506. "name": "台州市",
  12507. "area": [
  12508. "椒江区",
  12509. "黄岩区",
  12510. "路桥区",
  12511. "临海市",
  12512. "温岭市",
  12513. "玉环县",
  12514. "天台县",
  12515. "仙居县",
  12516. "三门县"] },
  12517. {
  12518. "name": "丽水市",
  12519. "area": [
  12520. "莲都区",
  12521. "龙泉市",
  12522. "缙云县",
  12523. "青田县",
  12524. "云和县",
  12525. "遂昌县",
  12526. "松阳县",
  12527. "庆元县",
  12528. "景宁畲族自治县"] }] },
  12529. {
  12530. "name": "安徽省",
  12531. "city": [
  12532. {
  12533. "name": "合肥市",
  12534. "area": [
  12535. "庐阳区",
  12536. "瑶海区",
  12537. "蜀山区",
  12538. "包河区",
  12539. "长丰县",
  12540. "肥东县",
  12541. "肥西县"] },
  12542. {
  12543. "name": "芜湖市",
  12544. "area": [
  12545. "镜湖区",
  12546. "弋江区",
  12547. "鸠江区",
  12548. "三山区",
  12549. "芜湖县",
  12550. "南陵县",
  12551. "繁昌县"] },
  12552. {
  12553. "name": "蚌埠市",
  12554. "area": [
  12555. "蚌山区",
  12556. "龙子湖区",
  12557. "禹会区",
  12558. "淮上区",
  12559. "怀远县",
  12560. "固镇县",
  12561. "五河县"] },
  12562. {
  12563. "name": "淮南市",
  12564. "area": [
  12565. "田家庵区",
  12566. "大通区",
  12567. "谢家集区",
  12568. "八公山区",
  12569. "潘集区",
  12570. "凤台县"] },
  12571. {
  12572. "name": "马鞍山市",
  12573. "area": [
  12574. "雨山区",
  12575. "花山区",
  12576. "金家庄区",
  12577. "当涂县"] },
  12578. {
  12579. "name": "淮北市",
  12580. "area": [
  12581. "相山区",
  12582. "杜集区",
  12583. "烈山区",
  12584. "濉溪县"] },
  12585. {
  12586. "name": "铜陵市",
  12587. "area": [
  12588. "铜官山区",
  12589. "狮子山区",
  12590. "郊区",
  12591. "铜陵县"] },
  12592. {
  12593. "name": "安庆市",
  12594. "area": [
  12595. "迎江区",
  12596. "大观区",
  12597. "宜秀区",
  12598. "桐城市",
  12599. "宿松县",
  12600. "枞阳县",
  12601. "太湖县",
  12602. "怀宁县",
  12603. "岳西县",
  12604. "望江县",
  12605. "潜山县"] },
  12606. {
  12607. "name": "黄山市",
  12608. "area": [
  12609. "屯溪区",
  12610. "黄山区",
  12611. "徽州区",
  12612. "休宁县",
  12613. "歙县",
  12614. "祁门县",
  12615. "黟县"] },
  12616. {
  12617. "name": "滁州市",
  12618. "area": [
  12619. "琅琊区",
  12620. "南谯区",
  12621. "天长市",
  12622. "明光市",
  12623. "全椒县",
  12624. "来安县",
  12625. "定远县",
  12626. "凤阳县"] },
  12627. {
  12628. "name": "阜阳市",
  12629. "area": [
  12630. "颍州区",
  12631. "颍东区",
  12632. "颍泉区",
  12633. "界首市",
  12634. "临泉县",
  12635. "颍上县",
  12636. "阜南县",
  12637. "太和县"] },
  12638. {
  12639. "name": "宿州市",
  12640. "area": [
  12641. "埇桥区",
  12642. "萧县",
  12643. "泗县",
  12644. "砀山县",
  12645. "灵璧县"] },
  12646. {
  12647. "name": "巢湖市",
  12648. "area": [
  12649. "居巢区",
  12650. "含山县",
  12651. "无为县",
  12652. "庐江县",
  12653. "和县"] },
  12654. {
  12655. "name": "六安市",
  12656. "area": [
  12657. "金安区",
  12658. "裕安区",
  12659. "寿县",
  12660. "霍山县",
  12661. "霍邱县",
  12662. "舒城县",
  12663. "金寨县"] },
  12664. {
  12665. "name": "亳州市",
  12666. "area": [
  12667. "谯城区",
  12668. "利辛县",
  12669. "涡阳县",
  12670. "蒙城县"] },
  12671. {
  12672. "name": "池州市",
  12673. "area": [
  12674. "贵池区",
  12675. "东至县",
  12676. "石台县",
  12677. "青阳县"] },
  12678. {
  12679. "name": "宣城市",
  12680. "area": [
  12681. "宣州区",
  12682. "宁国市",
  12683. "广德县",
  12684. "郎溪县",
  12685. "泾县",
  12686. "旌德县",
  12687. "绩溪县"] }] },
  12688. {
  12689. "name": "福建省",
  12690. "city": [
  12691. {
  12692. "name": "福州市",
  12693. "area": [
  12694. "鼓楼区",
  12695. "台江区",
  12696. "仓山区",
  12697. "马尾区",
  12698. "晋安区",
  12699. "福清市",
  12700. "长乐市",
  12701. "闽侯县",
  12702. "闽清县",
  12703. "永泰县",
  12704. "连江县",
  12705. "罗源县",
  12706. "平潭县"] },
  12707. {
  12708. "name": "厦门市",
  12709. "area": [
  12710. "思明区",
  12711. "海沧区",
  12712. "湖里区",
  12713. "集美区",
  12714. "同安区",
  12715. "翔安区"] },
  12716. {
  12717. "name": "莆田市",
  12718. "area": [
  12719. "城厢区",
  12720. "涵江区",
  12721. "荔城区",
  12722. "秀屿区",
  12723. "仙游县"] },
  12724. {
  12725. "name": "三明市",
  12726. "area": [
  12727. "梅列区",
  12728. "三元区",
  12729. "永安市",
  12730. "明溪县",
  12731. "将乐县",
  12732. "大田县",
  12733. "宁化县",
  12734. "建宁县",
  12735. "沙县",
  12736. "尤溪县",
  12737. "清流县",
  12738. "泰宁县"] },
  12739. {
  12740. "name": "泉州市",
  12741. "area": [
  12742. "鲤城区",
  12743. "丰泽区",
  12744. "洛江区",
  12745. "泉港区",
  12746. "石狮市",
  12747. "晋江市",
  12748. "南安市",
  12749. "惠安县",
  12750. "永春县",
  12751. "安溪县",
  12752. "德化县",
  12753. "金门县"] },
  12754. {
  12755. "name": "漳州市",
  12756. "area": [
  12757. "芗城区",
  12758. "龙文区",
  12759. "龙海市",
  12760. "平和县",
  12761. "南靖县",
  12762. "诏安县",
  12763. "漳浦县",
  12764. "华安县",
  12765. "东山县",
  12766. "长泰县",
  12767. "云霄县"] },
  12768. {
  12769. "name": "南平市",
  12770. "area": [
  12771. "延平区",
  12772. "建瓯市",
  12773. "邵武市",
  12774. "武夷山市",
  12775. "建阳市",
  12776. "松溪县",
  12777. "光泽县",
  12778. "顺昌县",
  12779. "浦城县",
  12780. "政和县"] },
  12781. {
  12782. "name": "龙岩市",
  12783. "area": [
  12784. "新罗区",
  12785. "漳平市",
  12786. "长汀县",
  12787. "武平县",
  12788. "上杭县",
  12789. "永定县",
  12790. "连城县"] },
  12791. {
  12792. "name": "宁德市",
  12793. "area": [
  12794. "蕉城区",
  12795. "福安市",
  12796. "福鼎市",
  12797. "寿宁县",
  12798. "霞浦县",
  12799. "柘荣县",
  12800. "屏南县",
  12801. "古田县",
  12802. "周宁县"] }] },
  12803. {
  12804. "name": "江西省",
  12805. "city": [
  12806. {
  12807. "name": "南昌市",
  12808. "area": [
  12809. "东湖区",
  12810. "西湖区",
  12811. "青云谱区",
  12812. "湾里区",
  12813. "青山湖区",
  12814. "新建县",
  12815. "南昌县",
  12816. "进贤县",
  12817. "安义县"] },
  12818. {
  12819. "name": "景德镇市",
  12820. "area": [
  12821. "珠山区",
  12822. "昌江区",
  12823. "乐平市",
  12824. "浮梁县"] },
  12825. {
  12826. "name": "萍乡市",
  12827. "area": [
  12828. "安源区",
  12829. "湘东区",
  12830. "莲花县",
  12831. "上栗县",
  12832. "芦溪县"] },
  12833. {
  12834. "name": "九江市",
  12835. "area": [
  12836. "浔阳区",
  12837. "庐山区",
  12838. "瑞昌市",
  12839. "九江县",
  12840. "星子县",
  12841. "武宁县",
  12842. "彭泽县",
  12843. "永修县",
  12844. "修水县",
  12845. "湖口县",
  12846. "德安县",
  12847. "都昌县"] },
  12848. {
  12849. "name": "新余市",
  12850. "area": [
  12851. "渝水区",
  12852. "分宜县"] },
  12853. {
  12854. "name": "鹰潭市",
  12855. "area": [
  12856. "月湖区",
  12857. "贵溪市",
  12858. "余江县"] },
  12859. {
  12860. "name": "赣州市",
  12861. "area": [
  12862. "章贡区",
  12863. "瑞金市",
  12864. "南康市",
  12865. "石城县",
  12866. "安远县",
  12867. "赣县",
  12868. "宁都县",
  12869. "寻乌县",
  12870. "兴国县",
  12871. "定南县",
  12872. "上犹县",
  12873. "于都县",
  12874. "龙南县",
  12875. "崇义县",
  12876. "信丰县",
  12877. "全南县",
  12878. "大余县",
  12879. "会昌县"] },
  12880. {
  12881. "name": "吉安市",
  12882. "area": [
  12883. "吉州区",
  12884. "青原区",
  12885. "井冈山市",
  12886. "吉安县",
  12887. "永丰县",
  12888. "永新县",
  12889. "新干县",
  12890. "泰和县",
  12891. "峡江县",
  12892. "遂川县",
  12893. "安福县",
  12894. "吉水县",
  12895. "万安县"] },
  12896. {
  12897. "name": "宜春市",
  12898. "area": [
  12899. "袁州区",
  12900. "丰城市",
  12901. "樟树市",
  12902. "高安市",
  12903. "铜鼓县",
  12904. "靖安县",
  12905. "宜丰县",
  12906. "奉新县",
  12907. "万载县",
  12908. "上高县"] },
  12909. {
  12910. "name": "抚州市",
  12911. "area": [
  12912. "临川区",
  12913. "南丰县",
  12914. "乐安县",
  12915. "金溪县",
  12916. "南城县",
  12917. "东乡县",
  12918. "资溪县",
  12919. "宜黄县",
  12920. "广昌县",
  12921. "黎川县",
  12922. "崇仁县"] },
  12923. {
  12924. "name": "上饶市",
  12925. "area": [
  12926. "信州区",
  12927. "德兴市",
  12928. "上饶县",
  12929. "广丰县",
  12930. "鄱阳县",
  12931. "婺源县",
  12932. "铅山县",
  12933. "余干县",
  12934. "横峰县",
  12935. "弋阳县",
  12936. "玉山县",
  12937. "万年县"] }] },
  12938. {
  12939. "name": "山东省",
  12940. "city": [
  12941. {
  12942. "name": "济南市",
  12943. "area": [
  12944. "市中区",
  12945. "历下区",
  12946. "天桥区",
  12947. "槐荫区",
  12948. "历城区",
  12949. "长清区",
  12950. "章丘市",
  12951. "平阴县",
  12952. "济阳县",
  12953. "商河县"] },
  12954. {
  12955. "name": "青岛市",
  12956. "area": [
  12957. "市南区",
  12958. "市北区",
  12959. "城阳区",
  12960. "四方区",
  12961. "李沧区",
  12962. "黄岛区",
  12963. "崂山区",
  12964. "胶南市",
  12965. "胶州市",
  12966. "平度市",
  12967. "莱西市",
  12968. "即墨市"] },
  12969. {
  12970. "name": "淄博市",
  12971. "area": [
  12972. "张店区",
  12973. "临淄区",
  12974. "淄川区",
  12975. "博山区",
  12976. "周村区",
  12977. "桓台县",
  12978. "高青县",
  12979. "沂源县"] },
  12980. {
  12981. "name": "枣庄市",
  12982. "area": [
  12983. "市中区",
  12984. "山亭区",
  12985. "峄城区",
  12986. "台儿庄区",
  12987. "薛城区",
  12988. "滕州市"] },
  12989. {
  12990. "name": "东营市",
  12991. "area": [
  12992. "东营区",
  12993. "河口区",
  12994. "垦利县",
  12995. "广饶县",
  12996. "利津县"] },
  12997. {
  12998. "name": "烟台市",
  12999. "area": [
  13000. "芝罘区",
  13001. "福山区",
  13002. "牟平区",
  13003. "莱山区",
  13004. "龙口市",
  13005. "莱阳市",
  13006. "莱州市",
  13007. "招远市",
  13008. "蓬莱市",
  13009. "栖霞市",
  13010. "海阳市",
  13011. "长岛县"] },
  13012. {
  13013. "name": "潍坊市",
  13014. "area": [
  13015. "潍城区",
  13016. "寒亭区",
  13017. "坊子区",
  13018. "奎文区",
  13019. "青州市",
  13020. "诸城市",
  13021. "寿光市",
  13022. "安丘市",
  13023. "高密市",
  13024. "昌邑市",
  13025. "昌乐县",
  13026. "临朐县"] },
  13027. {
  13028. "name": "济宁市",
  13029. "area": [
  13030. "市中区",
  13031. "任城区",
  13032. "曲阜市",
  13033. "兖州市",
  13034. "邹城市",
  13035. "鱼台县",
  13036. "金乡县",
  13037. "嘉祥县",
  13038. "微山县",
  13039. "汶上县",
  13040. "泗水县",
  13041. "梁山县"] },
  13042. {
  13043. "name": "泰安市",
  13044. "area": [
  13045. "泰山区",
  13046. "岱岳区",
  13047. "新泰市",
  13048. "肥城市",
  13049. "宁阳县",
  13050. "东平县"] },
  13051. {
  13052. "name": "威海市",
  13053. "area": [
  13054. "环翠区",
  13055. "乳山市",
  13056. "文登市",
  13057. "荣成市"] },
  13058. {
  13059. "name": "日照市",
  13060. "area": [
  13061. "东港区",
  13062. "岚山区",
  13063. "五莲县",
  13064. "莒县"] },
  13065. {
  13066. "name": "莱芜市",
  13067. "area": [
  13068. "莱城区",
  13069. "钢城区"] },
  13070. {
  13071. "name": "临沂市",
  13072. "area": [
  13073. "兰山区",
  13074. "罗庄区",
  13075. "河东区",
  13076. "沂南县",
  13077. "郯城县",
  13078. "沂水县",
  13079. "苍山县",
  13080. "费县",
  13081. "平邑县",
  13082. "莒南县",
  13083. "蒙阴县",
  13084. "临沭县"] },
  13085. {
  13086. "name": "德州市",
  13087. "area": [
  13088. "德城区",
  13089. "乐陵市",
  13090. "禹城市",
  13091. "陵县",
  13092. "宁津县",
  13093. "齐河县",
  13094. "武城县",
  13095. "庆云县",
  13096. "平原县",
  13097. "夏津县",
  13098. "临邑县"] },
  13099. {
  13100. "name": "聊城市",
  13101. "area": [
  13102. "东昌府区",
  13103. "临清市",
  13104. "高唐县",
  13105. "阳谷县",
  13106. "茌平县",
  13107. "莘县",
  13108. "东阿县",
  13109. "冠县"] },
  13110. {
  13111. "name": "滨州市",
  13112. "area": [
  13113. "滨城区",
  13114. "邹平县",
  13115. "沾化县",
  13116. "惠民县",
  13117. "博兴县",
  13118. "阳信县",
  13119. "无棣县"] },
  13120. {
  13121. "name": "菏泽市",
  13122. "area": [
  13123. "牡丹区",
  13124. "鄄城县",
  13125. "单县",
  13126. "郓城县",
  13127. "曹县",
  13128. "定陶县",
  13129. "巨野县",
  13130. "东明县",
  13131. "成武县"] }] },
  13132. {
  13133. "name": "河南省",
  13134. "city": [
  13135. {
  13136. "name": "郑州市",
  13137. "area": [
  13138. "中原区",
  13139. "金水区",
  13140. "二七区",
  13141. "管城回族区",
  13142. "上街区",
  13143. "惠济区",
  13144. "巩义市",
  13145. "新郑市",
  13146. "新密市",
  13147. "登封市",
  13148. "荥阳市",
  13149. "中牟县"] },
  13150. {
  13151. "name": "开封市",
  13152. "area": [
  13153. "鼓楼区",
  13154. "龙亭区",
  13155. "顺河回族区",
  13156. "禹王台区",
  13157. "金明区",
  13158. "开封县",
  13159. "尉氏县",
  13160. "兰考县",
  13161. "杞县",
  13162. "通许县"] },
  13163. {
  13164. "name": "洛阳市",
  13165. "area": [
  13166. "西工区",
  13167. "老城区",
  13168. "涧西区",
  13169. "瀍河回族区",
  13170. "洛龙区",
  13171. "吉利区",
  13172. "偃师市",
  13173. "孟津县",
  13174. "汝阳县",
  13175. "伊川县",
  13176. "洛宁县",
  13177. "嵩县",
  13178. "宜阳县",
  13179. "新安县",
  13180. "栾川县"] },
  13181. {
  13182. "name": "平顶山市",
  13183. "area": [
  13184. "新华区",
  13185. "卫东区",
  13186. "湛河区",
  13187. "石龙区",
  13188. "汝州市",
  13189. "舞钢市",
  13190. "宝丰县",
  13191. "叶县",
  13192. "郏县",
  13193. "鲁山县"] },
  13194. {
  13195. "name": "安阳市",
  13196. "area": [
  13197. "北关区",
  13198. "文峰区",
  13199. "殷都区",
  13200. "龙安区",
  13201. "林州市",
  13202. "安阳县",
  13203. "滑县",
  13204. "内黄县",
  13205. "汤阴县"] },
  13206. {
  13207. "name": "鹤壁市",
  13208. "area": [
  13209. "淇滨区",
  13210. "山城区",
  13211. "鹤山区",
  13212. "浚县",
  13213. "淇县"] },
  13214. {
  13215. "name": "新乡市",
  13216. "area": [
  13217. "卫滨区",
  13218. "红旗区",
  13219. "凤泉区",
  13220. "牧野区",
  13221. "卫辉市",
  13222. "辉县市",
  13223. "新乡县",
  13224. "获嘉县",
  13225. "原阳县",
  13226. "长垣县",
  13227. "封丘县",
  13228. "延津县"] },
  13229. {
  13230. "name": "焦作市",
  13231. "area": [
  13232. "解放区",
  13233. "中站区",
  13234. "马村区",
  13235. "山阳区",
  13236. "沁阳市",
  13237. "孟州市",
  13238. "修武县",
  13239. "温县",
  13240. "武陟县",
  13241. "博爱县"] },
  13242. {
  13243. "name": "濮阳市",
  13244. "area": [
  13245. "华龙区",
  13246. "濮阳县",
  13247. "南乐县",
  13248. "台前县",
  13249. "清丰县",
  13250. "范县"] },
  13251. {
  13252. "name": "许昌市",
  13253. "area": [
  13254. "魏都区",
  13255. "禹州市",
  13256. "长葛市",
  13257. "许昌县",
  13258. "鄢陵县",
  13259. "襄城县"] },
  13260. {
  13261. "name": "漯河市",
  13262. "area": [
  13263. "源汇区",
  13264. "郾城区",
  13265. "召陵区",
  13266. "临颍县",
  13267. "舞阳县"] },
  13268. {
  13269. "name": "三门峡市",
  13270. "area": [
  13271. "湖滨区",
  13272. "义马市",
  13273. "灵宝市",
  13274. "渑池县",
  13275. "卢氏县",
  13276. "陕县"] },
  13277. {
  13278. "name": "南阳市",
  13279. "area": [
  13280. "卧龙区",
  13281. "宛城区",
  13282. "邓州市",
  13283. "桐柏县",
  13284. "方城县",
  13285. "淅川县",
  13286. "镇平县",
  13287. "唐河县",
  13288. "南召县",
  13289. "内乡县",
  13290. "新野县",
  13291. "社旗县",
  13292. "西峡县"] },
  13293. {
  13294. "name": "商丘市",
  13295. "area": [
  13296. "梁园区",
  13297. "睢阳区",
  13298. "永城市",
  13299. "宁陵县",
  13300. "虞城县",
  13301. "民权县",
  13302. "夏邑县",
  13303. "柘城县",
  13304. "睢县"] },
  13305. {
  13306. "name": "信阳市",
  13307. "area": [
  13308. "浉河区",
  13309. "平桥区",
  13310. "潢川县",
  13311. "淮滨县",
  13312. "息县",
  13313. "新县",
  13314. "商城县",
  13315. "固始县",
  13316. "罗山县",
  13317. "光山县"] },
  13318. {
  13319. "name": "周口市",
  13320. "area": [
  13321. "川汇区",
  13322. "项城市",
  13323. "商水县",
  13324. "淮阳县",
  13325. "太康县",
  13326. "鹿邑县",
  13327. "西华县",
  13328. "扶沟县",
  13329. "沈丘县",
  13330. "郸城县"] },
  13331. {
  13332. "name": "驻马店市",
  13333. "area": [
  13334. "驿城区",
  13335. "确山县",
  13336. "新蔡县",
  13337. "上蔡县",
  13338. "西平县",
  13339. "泌阳县",
  13340. "平舆县",
  13341. "汝南县",
  13342. "遂平县",
  13343. "正阳县"] },
  13344. {
  13345. "name": "焦作市",
  13346. "area": [
  13347. "济源市"] }] },
  13348. {
  13349. "name": "湖北省",
  13350. "city": [
  13351. {
  13352. "name": "武汉市",
  13353. "area": [
  13354. "江岸区",
  13355. "武昌区",
  13356. "江汉区",
  13357. "硚口区",
  13358. "汉阳区",
  13359. "青山区",
  13360. "洪山区",
  13361. "东西湖区",
  13362. "汉南区",
  13363. "蔡甸区",
  13364. "江夏区",
  13365. "黄陂区",
  13366. "新洲区"] },
  13367. {
  13368. "name": "黄石市",
  13369. "area": [
  13370. "黄石港区",
  13371. "西塞山区",
  13372. "下陆区",
  13373. "铁山区",
  13374. "大冶市",
  13375. "阳新县"] },
  13376. {
  13377. "name": "十堰市",
  13378. "area": [
  13379. "张湾区",
  13380. "茅箭区",
  13381. "丹江口市",
  13382. "郧县",
  13383. "竹山县",
  13384. "房县",
  13385. "郧西县",
  13386. "竹溪县"] },
  13387. {
  13388. "name": "荆州市",
  13389. "area": [
  13390. "沙市区",
  13391. "荆州区",
  13392. "洪湖市",
  13393. "石首市",
  13394. "松滋市",
  13395. "监利县",
  13396. "公安县",
  13397. "江陵县"] },
  13398. {
  13399. "name": "宜昌市",
  13400. "area": [
  13401. "西陵区",
  13402. "伍家岗区",
  13403. "点军区",
  13404. "猇亭区",
  13405. "夷陵区",
  13406. "宜都市",
  13407. "当阳市",
  13408. "枝江市",
  13409. "秭归县",
  13410. "远安县",
  13411. "兴山县",
  13412. "五峰土家族自治县",
  13413. "长阳土家族自治县"] },
  13414. {
  13415. "name": "襄樊市",
  13416. "area": [
  13417. "襄城区",
  13418. "樊城区",
  13419. "襄阳区",
  13420. "老河口市",
  13421. "枣阳市",
  13422. "宜城市",
  13423. "南漳县",
  13424. "谷城县",
  13425. "保康县"] },
  13426. {
  13427. "name": "鄂州市",
  13428. "area": [
  13429. "鄂城区",
  13430. "华容区",
  13431. "梁子湖区"] },
  13432. {
  13433. "name": "荆门市",
  13434. "area": [
  13435. "东宝区",
  13436. "掇刀区",
  13437. "钟祥市",
  13438. "京山县",
  13439. "沙洋县"] },
  13440. {
  13441. "name": "孝感市",
  13442. "area": [
  13443. "孝南区",
  13444. "应城市",
  13445. "安陆市",
  13446. "汉川市",
  13447. "云梦县",
  13448. "大悟县",
  13449. "孝昌县"] },
  13450. {
  13451. "name": "黄冈市",
  13452. "area": [
  13453. "黄州区",
  13454. "麻城市",
  13455. "武穴市",
  13456. "红安县",
  13457. "罗田县",
  13458. "浠水县",
  13459. "蕲春县",
  13460. "黄梅县",
  13461. "英山县",
  13462. "团风县"] },
  13463. {
  13464. "name": "咸宁市",
  13465. "area": [
  13466. "咸安区",
  13467. "赤壁市",
  13468. "嘉鱼县",
  13469. "通山县",
  13470. "崇阳县",
  13471. "通城县"] },
  13472. {
  13473. "name": "随州市",
  13474. "area": [
  13475. "曾都区",
  13476. "广水市"] },
  13477. {
  13478. "name": "恩施土家族苗族自治州",
  13479. "area": [
  13480. "恩施市",
  13481. "利川市",
  13482. "建始县",
  13483. "来凤县",
  13484. "巴东县",
  13485. "鹤峰县",
  13486. "宣恩县",
  13487. "咸丰县"] },
  13488. {
  13489. "name": "仙桃市",
  13490. "area": [
  13491. "仙桃"] },
  13492. {
  13493. "name": "天门市",
  13494. "area": [
  13495. "天门"] },
  13496. {
  13497. "name": "潜江市",
  13498. "area": [
  13499. "潜江"] },
  13500. {
  13501. "name": "神农架林区",
  13502. "area": [
  13503. "神农架林区"] }] },
  13504. {
  13505. "name": "湖南省",
  13506. "city": [
  13507. {
  13508. "name": "长沙市",
  13509. "area": [
  13510. "岳麓区",
  13511. "芙蓉区",
  13512. "天心区",
  13513. "开福区",
  13514. "雨花区",
  13515. "浏阳市",
  13516. "长沙县",
  13517. "望城县",
  13518. "宁乡县"] },
  13519. {
  13520. "name": "株洲市",
  13521. "area": [
  13522. "天元区",
  13523. "荷塘区",
  13524. "芦淞区",
  13525. "石峰区",
  13526. "醴陵市",
  13527. "株洲县",
  13528. "炎陵县",
  13529. "茶陵县",
  13530. "攸县"] },
  13531. {
  13532. "name": "湘潭市",
  13533. "area": [
  13534. "岳塘区",
  13535. "雨湖区",
  13536. "湘乡市",
  13537. "韶山市",
  13538. "湘潭县"] },
  13539. {
  13540. "name": "衡阳市",
  13541. "area": [
  13542. "雁峰区",
  13543. "珠晖区",
  13544. "石鼓区",
  13545. "蒸湘区",
  13546. "南岳区",
  13547. "耒阳市",
  13548. "常宁市",
  13549. "衡阳县",
  13550. "衡东县",
  13551. "衡山县",
  13552. "衡南县",
  13553. "祁东县"] },
  13554. {
  13555. "name": "邵阳市",
  13556. "area": [
  13557. "双清区",
  13558. "大祥区",
  13559. "北塔区",
  13560. "武冈市",
  13561. "邵东县",
  13562. "洞口县",
  13563. "新邵县",
  13564. "绥宁县",
  13565. "新宁县",
  13566. "邵阳县",
  13567. "隆回县",
  13568. "城步苗族自治县"] },
  13569. {
  13570. "name": "岳阳市",
  13571. "area": [
  13572. "岳阳楼区",
  13573. "云溪区",
  13574. "君山区",
  13575. "临湘市",
  13576. "汨罗市",
  13577. "岳阳县",
  13578. "湘阴县",
  13579. "平江县",
  13580. "华容县"] },
  13581. {
  13582. "name": "常德市",
  13583. "area": [
  13584. "武陵区",
  13585. "鼎城区",
  13586. "津市市",
  13587. "澧县",
  13588. "临澧县",
  13589. "桃源县",
  13590. "汉寿县",
  13591. "安乡县",
  13592. "石门县"] },
  13593. {
  13594. "name": "张家界市",
  13595. "area": [
  13596. "永定区",
  13597. "武陵源区",
  13598. "慈利县",
  13599. "桑植县"] },
  13600. {
  13601. "name": "益阳市",
  13602. "area": [
  13603. "赫山区",
  13604. "资阳区",
  13605. "沅江市",
  13606. "桃江县",
  13607. "南县",
  13608. "安化县"] },
  13609. {
  13610. "name": "郴州市",
  13611. "area": [
  13612. "北湖区",
  13613. "苏仙区",
  13614. "资兴市",
  13615. "宜章县",
  13616. "汝城县",
  13617. "安仁县",
  13618. "嘉禾县",
  13619. "临武县",
  13620. "桂东县",
  13621. "永兴县",
  13622. "桂阳县"] },
  13623. {
  13624. "name": "永州市",
  13625. "area": [
  13626. "冷水滩区",
  13627. "零陵区",
  13628. "祁阳县",
  13629. "蓝山县",
  13630. "宁远县",
  13631. "新田县",
  13632. "东安县",
  13633. "江永县",
  13634. "道县",
  13635. "双牌县",
  13636. "江华瑶族自治县"] },
  13637. {
  13638. "name": "怀化市",
  13639. "area": [
  13640. "鹤城区",
  13641. "洪江市",
  13642. "会同县",
  13643. "沅陵县",
  13644. "辰溪县",
  13645. "溆浦县",
  13646. "中方县",
  13647. "新晃侗族自治县",
  13648. "芷江侗族自治县",
  13649. "通道侗族自治县",
  13650. "靖州苗族侗族自治县",
  13651. "麻阳苗族自治县"] },
  13652. {
  13653. "name": "娄底市",
  13654. "area": [
  13655. "娄星区",
  13656. "冷水江市",
  13657. "涟源市",
  13658. "新化县",
  13659. "双峰县"] },
  13660. {
  13661. "name": "湘西土家族苗族自治州",
  13662. "area": [
  13663. "吉首市",
  13664. "古丈县",
  13665. "龙山县",
  13666. "永顺县",
  13667. "凤凰县",
  13668. "泸溪县",
  13669. "保靖县",
  13670. "花垣县"] }] },
  13671. {
  13672. "name": "广东省",
  13673. "city": [
  13674. {
  13675. "name": "广州市",
  13676. "area": [
  13677. "越秀区",
  13678. "荔湾区",
  13679. "海珠区",
  13680. "天河区",
  13681. "白云区",
  13682. "黄埔区",
  13683. "番禺区",
  13684. "花都区",
  13685. "南沙区",
  13686. "萝岗区",
  13687. "增城市",
  13688. "从化市"] },
  13689. {
  13690. "name": "深圳市",
  13691. "area": [
  13692. "福田区",
  13693. "罗湖区",
  13694. "南山区",
  13695. "宝安区",
  13696. "龙岗区",
  13697. "盐田区"] },
  13698. {
  13699. "name": "东莞市",
  13700. "area": [
  13701. "莞城",
  13702. "常平",
  13703. "塘厦",
  13704. "塘厦",
  13705. "塘厦"] },
  13706. {
  13707. "name": "中山市",
  13708. "area": [
  13709. "中山"] },
  13710. {
  13711. "name": "潮州市",
  13712. "area": [
  13713. "湘桥区",
  13714. "潮安县",
  13715. "饶平县"] },
  13716. {
  13717. "name": "揭阳市",
  13718. "area": [
  13719. "榕城区",
  13720. "揭东县",
  13721. "揭西县",
  13722. "惠来县",
  13723. "普宁市"] },
  13724. {
  13725. "name": "云浮市",
  13726. "area": [
  13727. "云城区",
  13728. "新兴县",
  13729. "郁南县",
  13730. "云安县",
  13731. "罗定市"] },
  13732. {
  13733. "name": "珠海市",
  13734. "area": [
  13735. "香洲区",
  13736. "斗门区",
  13737. "金湾区"] },
  13738. {
  13739. "name": "汕头市",
  13740. "area": [
  13741. "金平区",
  13742. "濠江区",
  13743. "龙湖区",
  13744. "潮阳区",
  13745. "潮南区",
  13746. "澄海区",
  13747. "南澳县"] },
  13748. {
  13749. "name": "韶关市",
  13750. "area": [
  13751. "浈江区",
  13752. "武江区",
  13753. "曲江区",
  13754. "乐昌市",
  13755. "南雄市",
  13756. "始兴县",
  13757. "仁化县",
  13758. "翁源县",
  13759. "新丰县",
  13760. "乳源瑶族自治县"] },
  13761. {
  13762. "name": "佛山市",
  13763. "area": [
  13764. "禅城区",
  13765. "南海区",
  13766. "顺德区",
  13767. "三水区",
  13768. "高明区"] },
  13769. {
  13770. "name": "江门市",
  13771. "area": [
  13772. "蓬江区",
  13773. "江海区",
  13774. "新会区",
  13775. "恩平市",
  13776. "台山市",
  13777. "开平市",
  13778. "鹤山市"] },
  13779. {
  13780. "name": "湛江市",
  13781. "area": [
  13782. "赤坎区",
  13783. "霞山区",
  13784. "坡头区",
  13785. "麻章区",
  13786. "吴川市",
  13787. "廉江市",
  13788. "雷州市",
  13789. "遂溪县",
  13790. "徐闻县"] },
  13791. {
  13792. "name": "茂名市",
  13793. "area": [
  13794. "茂南区",
  13795. "茂港区",
  13796. "化州市",
  13797. "信宜市",
  13798. "高州市",
  13799. "电白县"] },
  13800. {
  13801. "name": "肇庆市",
  13802. "area": [
  13803. "端州区",
  13804. "鼎湖区",
  13805. "高要市",
  13806. "四会市",
  13807. "广宁县",
  13808. "怀集县",
  13809. "封开县",
  13810. "德庆县"] },
  13811. {
  13812. "name": "惠州市",
  13813. "area": [
  13814. "惠城区",
  13815. "惠阳区",
  13816. "博罗县",
  13817. "惠东县",
  13818. "龙门县"] },
  13819. {
  13820. "name": "梅州市",
  13821. "area": [
  13822. "梅江区",
  13823. "兴宁市",
  13824. "梅县",
  13825. "大埔县",
  13826. "丰顺县",
  13827. "五华县",
  13828. "平远县",
  13829. "蕉岭县"] },
  13830. {
  13831. "name": "汕尾市",
  13832. "area": [
  13833. "城区",
  13834. "陆丰市",
  13835. "海丰县",
  13836. "陆河县"] },
  13837. {
  13838. "name": "河源市",
  13839. "area": [
  13840. "源城区",
  13841. "紫金县",
  13842. "龙川县",
  13843. "连平县",
  13844. "和平县",
  13845. "东源县"] },
  13846. {
  13847. "name": "阳江市",
  13848. "area": [
  13849. "江城区",
  13850. "阳春市",
  13851. "阳西县",
  13852. "阳东县"] },
  13853. {
  13854. "name": "清远市",
  13855. "area": [
  13856. "清城区",
  13857. "英德市",
  13858. "连州市",
  13859. "佛冈县",
  13860. "阳山县",
  13861. "清新县",
  13862. "连山壮族瑶族自治县",
  13863. "连南瑶族自治县"] }] },
  13864. {
  13865. "name": "广西",
  13866. "city": [
  13867. {
  13868. "name": "南宁市",
  13869. "area": [
  13870. "青秀区",
  13871. "兴宁区",
  13872. "西乡塘区",
  13873. "良庆区",
  13874. "江南区",
  13875. "邕宁区",
  13876. "武鸣县",
  13877. "隆安县",
  13878. "马山县",
  13879. "上林县",
  13880. "宾阳县",
  13881. "横县"] },
  13882. {
  13883. "name": "柳州市",
  13884. "area": [
  13885. "城中区",
  13886. "鱼峰区",
  13887. "柳北区",
  13888. "柳南区",
  13889. "柳江县",
  13890. "柳城县",
  13891. "鹿寨县",
  13892. "融安县",
  13893. "融水苗族自治县",
  13894. "三江侗族自治县"] },
  13895. {
  13896. "name": "桂林市",
  13897. "area": [
  13898. "象山区",
  13899. "秀峰区",
  13900. "叠彩区",
  13901. "七星区",
  13902. "雁山区",
  13903. "阳朔县",
  13904. "临桂县",
  13905. "灵川县",
  13906. "全州县",
  13907. "平乐县",
  13908. "兴安县",
  13909. "灌阳县",
  13910. "荔浦县",
  13911. "资源县",
  13912. "永福县",
  13913. "龙胜各族自治县",
  13914. "恭城瑶族自治县"] },
  13915. {
  13916. "name": "梧州市",
  13917. "area": [
  13918. "万秀区",
  13919. "蝶山区",
  13920. "长洲区",
  13921. "岑溪市",
  13922. "苍梧县",
  13923. "藤县",
  13924. "蒙山县"] },
  13925. {
  13926. "name": "北海市",
  13927. "area": [
  13928. "海城区",
  13929. "银海区",
  13930. "铁山港区",
  13931. "合浦县"] },
  13932. {
  13933. "name": "防城港市",
  13934. "area": [
  13935. "港口区",
  13936. "防城区",
  13937. "东兴市",
  13938. "上思县"] },
  13939. {
  13940. "name": "钦州市",
  13941. "area": [
  13942. "钦南区",
  13943. "钦北区",
  13944. "灵山县",
  13945. "浦北县"] },
  13946. {
  13947. "name": "贵港市",
  13948. "area": [
  13949. "港北区",
  13950. "港南区",
  13951. "覃塘区",
  13952. "桂平市",
  13953. "平南县"] },
  13954. {
  13955. "name": "玉林市",
  13956. "area": [
  13957. "玉州区",
  13958. "北流市",
  13959. "容县",
  13960. "陆川县",
  13961. "博白县",
  13962. "兴业县"] },
  13963. {
  13964. "name": "百色市",
  13965. "area": [
  13966. "右江区",
  13967. "凌云县",
  13968. "平果县",
  13969. "西林县",
  13970. "乐业县",
  13971. "德保县",
  13972. "田林县",
  13973. "田阳县",
  13974. "靖西县",
  13975. "田东县",
  13976. "那坡县",
  13977. "隆林各族自治县"] },
  13978. {
  13979. "name": "贺州市",
  13980. "area": [
  13981. "八步区",
  13982. "钟山县",
  13983. "昭平县",
  13984. "富川瑶族自治县"] },
  13985. {
  13986. "name": "河池市",
  13987. "area": [
  13988. "金城江区",
  13989. "宜州市",
  13990. "天峨县",
  13991. "凤山县",
  13992. "南丹县",
  13993. "东兰县",
  13994. "都安瑶族自治县",
  13995. "罗城仫佬族自治县",
  13996. "巴马瑶族自治县",
  13997. "环江毛南族自治县",
  13998. "大化瑶族自治县"] },
  13999. {
  14000. "name": "来宾市",
  14001. "area": [
  14002. "兴宾区",
  14003. "合山市",
  14004. "象州县",
  14005. "武宣县",
  14006. "忻城县",
  14007. "金秀瑶族自治县"] },
  14008. {
  14009. "name": "崇左市",
  14010. "area": [
  14011. "江州区",
  14012. "凭祥市",
  14013. "宁明县",
  14014. "扶绥县",
  14015. "龙州县",
  14016. "大新县",
  14017. "天等县"] }] },
  14018. {
  14019. "name": "海南省",
  14020. "city": [
  14021. {
  14022. "name": "海口市",
  14023. "area": [
  14024. "龙华区",
  14025. "秀英区",
  14026. "琼山区",
  14027. "美兰区"] },
  14028. {
  14029. "name": "三亚市",
  14030. "area": [
  14031. "三亚市"] },
  14032. {
  14033. "name": "五指山市",
  14034. "area": [
  14035. "五指山"] },
  14036. {
  14037. "name": "琼海市",
  14038. "area": [
  14039. "琼海"] },
  14040. {
  14041. "name": "儋州市",
  14042. "area": [
  14043. "儋州"] },
  14044. {
  14045. "name": "文昌市",
  14046. "area": [
  14047. "文昌"] },
  14048. {
  14049. "name": "万宁市",
  14050. "area": [
  14051. "万宁"] },
  14052. {
  14053. "name": "东方市",
  14054. "area": [
  14055. "东方"] },
  14056. {
  14057. "name": "澄迈县",
  14058. "area": [
  14059. "澄迈县"] },
  14060. {
  14061. "name": "定安县",
  14062. "area": [
  14063. "定安县"] },
  14064. {
  14065. "name": "屯昌县",
  14066. "area": [
  14067. "屯昌县"] },
  14068. {
  14069. "name": "临高县",
  14070. "area": [
  14071. "临高县"] },
  14072. {
  14073. "name": "白沙黎族自治县",
  14074. "area": [
  14075. "白沙黎族自治县"] },
  14076. {
  14077. "name": "昌江黎族自治县",
  14078. "area": [
  14079. "昌江黎族自治县"] },
  14080. {
  14081. "name": "乐东黎族自治县",
  14082. "area": [
  14083. "乐东黎族自治县"] },
  14084. {
  14085. "name": "陵水黎族自治县",
  14086. "area": [
  14087. "陵水黎族自治县"] },
  14088. {
  14089. "name": "保亭黎族苗族自治县",
  14090. "area": [
  14091. "保亭黎族苗族自治县"] },
  14092. {
  14093. "name": "琼中黎族苗族自治县",
  14094. "area": [
  14095. "琼中黎族苗族自治县"] }] },
  14096. {
  14097. "name": "重庆市",
  14098. "city": [
  14099. {
  14100. "name": "重庆市",
  14101. "area": [
  14102. "渝中区",
  14103. "大渡口区",
  14104. "江北区",
  14105. "南岸区",
  14106. "北碚区",
  14107. "渝北区",
  14108. "巴南区",
  14109. "长寿区",
  14110. "双桥区",
  14111. "沙坪坝区",
  14112. "万盛区",
  14113. "万州区",
  14114. "涪陵区",
  14115. "黔江区",
  14116. "永川区",
  14117. "合川区",
  14118. "江津区",
  14119. "九龙坡区",
  14120. "南川区",
  14121. "綦江县",
  14122. "潼南县",
  14123. "荣昌县",
  14124. "璧山县",
  14125. "大足县",
  14126. "铜梁县",
  14127. "梁平县",
  14128. "开县",
  14129. "忠县",
  14130. "城口县",
  14131. "垫江县",
  14132. "武隆县",
  14133. "丰都县",
  14134. "奉节县",
  14135. "云阳县",
  14136. "巫溪县",
  14137. "巫山县",
  14138. "石柱土家族自治县",
  14139. "秀山土家族苗族自治县",
  14140. "酉阳土家族苗族自治县",
  14141. "彭水苗族土家族自治县"] }] },
  14142. {
  14143. "name": "四川省",
  14144. "city": [
  14145. {
  14146. "name": "成都市",
  14147. "area": [
  14148. "青羊区",
  14149. "锦江区",
  14150. "金牛区",
  14151. "武侯区",
  14152. "成华区",
  14153. "龙泉驿区",
  14154. "青白江区",
  14155. "新都区",
  14156. "温江区",
  14157. "都江堰市",
  14158. "彭州市",
  14159. "邛崃市",
  14160. "崇州市",
  14161. "金堂县",
  14162. "郫县",
  14163. "新津县",
  14164. "双流县",
  14165. "蒲江县",
  14166. "大邑县"] },
  14167. {
  14168. "name": "自贡市",
  14169. "area": [
  14170. "大安区",
  14171. "自流井区",
  14172. "贡井区",
  14173. "沿滩区",
  14174. "荣县",
  14175. "富顺县"] },
  14176. {
  14177. "name": "攀枝花市",
  14178. "area": [
  14179. "仁和区",
  14180. "米易县",
  14181. "盐边县",
  14182. "东区",
  14183. "西区"] },
  14184. {
  14185. "name": "泸州市",
  14186. "area": [
  14187. "江阳区",
  14188. "纳溪区",
  14189. "龙马潭区",
  14190. "泸县",
  14191. "合江县",
  14192. "叙永县",
  14193. "古蔺县"] },
  14194. {
  14195. "name": "德阳市",
  14196. "area": [
  14197. "旌阳区",
  14198. "广汉市",
  14199. "什邡市",
  14200. "绵竹市",
  14201. "罗江县",
  14202. "中江县"] },
  14203. {
  14204. "name": "绵阳市",
  14205. "area": [
  14206. "涪城区",
  14207. "游仙区",
  14208. "江油市",
  14209. "盐亭县",
  14210. "三台县",
  14211. "平武县",
  14212. "安县",
  14213. "梓潼县",
  14214. "北川羌族自治县"] },
  14215. {
  14216. "name": "广元市",
  14217. "area": [
  14218. "元坝区",
  14219. "朝天区",
  14220. "青川县",
  14221. "旺苍县",
  14222. "剑阁县",
  14223. "苍溪县",
  14224. "市中区"] },
  14225. {
  14226. "name": "遂宁市",
  14227. "area": [
  14228. "船山区",
  14229. "安居区",
  14230. "射洪县",
  14231. "蓬溪县",
  14232. "大英县"] },
  14233. {
  14234. "name": "内江市",
  14235. "area": [
  14236. "市中区",
  14237. "东兴区",
  14238. "资中县",
  14239. "隆昌县",
  14240. "威远县"] },
  14241. {
  14242. "name": "乐山市",
  14243. "area": [
  14244. "市中区",
  14245. "五通桥区",
  14246. "沙湾区",
  14247. "金口河区",
  14248. "峨眉山市",
  14249. "夹江县",
  14250. "井研县",
  14251. "犍为县",
  14252. "沐川县",
  14253. "马边彝族自治县",
  14254. "峨边彝族自治县"] },
  14255. {
  14256. "name": "南充",
  14257. "area": [
  14258. "顺庆区",
  14259. "高坪区",
  14260. "嘉陵区",
  14261. "阆中市",
  14262. "营山县",
  14263. "蓬安县",
  14264. "仪陇县",
  14265. "南部县",
  14266. "西充县"] },
  14267. {
  14268. "name": "眉山市",
  14269. "area": [
  14270. "东坡区",
  14271. "仁寿县",
  14272. "彭山县",
  14273. "洪雅县",
  14274. "丹棱县",
  14275. "青神县"] },
  14276. {
  14277. "name": "宜宾市",
  14278. "area": [
  14279. "翠屏区",
  14280. "宜宾县",
  14281. "兴文县",
  14282. "南溪县",
  14283. "珙县",
  14284. "长宁县",
  14285. "高县",
  14286. "江安县",
  14287. "筠连县",
  14288. "屏山县"] },
  14289. {
  14290. "name": "广安市",
  14291. "area": [
  14292. "广安区",
  14293. "华蓥市",
  14294. "岳池县",
  14295. "邻水县",
  14296. "武胜县"] },
  14297. {
  14298. "name": "达州市",
  14299. "area": [
  14300. "通川区",
  14301. "万源市",
  14302. "达县",
  14303. "渠县",
  14304. "宣汉县",
  14305. "开江县",
  14306. "大竹县"] },
  14307. {
  14308. "name": "雅安市",
  14309. "area": [
  14310. "雨城区",
  14311. "芦山县",
  14312. "石棉县",
  14313. "名山县",
  14314. "天全县",
  14315. "荥经县",
  14316. "宝兴县",
  14317. "汉源县"] },
  14318. {
  14319. "name": "巴中市",
  14320. "area": [
  14321. "巴州区",
  14322. "南江县",
  14323. "平昌县",
  14324. "通江县"] },
  14325. {
  14326. "name": "资阳市",
  14327. "area": [
  14328. "雁江区",
  14329. "简阳市",
  14330. "安岳县",
  14331. "乐至县"] },
  14332. {
  14333. "name": "阿坝藏族羌族自治州",
  14334. "area": [
  14335. "马尔康县",
  14336. "九寨沟县",
  14337. "红原县",
  14338. "汶川县",
  14339. "阿坝县",
  14340. "理县",
  14341. "若尔盖县",
  14342. "小金县",
  14343. "黑水县",
  14344. "金川县",
  14345. "松潘县",
  14346. "壤塘县",
  14347. "茂县"] },
  14348. {
  14349. "name": "甘孜藏族自治州",
  14350. "area": [
  14351. "康定县",
  14352. "丹巴县",
  14353. "炉霍县",
  14354. "九龙县",
  14355. "甘孜县",
  14356. "雅江县",
  14357. "新龙县",
  14358. "道孚县",
  14359. "白玉县",
  14360. "理塘县",
  14361. "德格县",
  14362. "乡城县",
  14363. "石渠县",
  14364. "稻城县",
  14365. "色达县",
  14366. "巴塘县",
  14367. "泸定县",
  14368. "得荣县"] },
  14369. {
  14370. "name": "凉山彝族自治州",
  14371. "area": [
  14372. "西昌市",
  14373. "美姑县",
  14374. "昭觉县",
  14375. "金阳县",
  14376. "甘洛县",
  14377. "布拖县",
  14378. "雷波县",
  14379. "普格县",
  14380. "宁南县",
  14381. "喜德县",
  14382. "会东县",
  14383. "越西县",
  14384. "会理县",
  14385. "盐源县",
  14386. "德昌县",
  14387. "冕宁县",
  14388. "木里藏族自治县"] }] },
  14389. {
  14390. "name": "贵州省",
  14391. "city": [
  14392. {
  14393. "name": "贵阳市",
  14394. "area": [
  14395. "南明区",
  14396. "云岩区",
  14397. "花溪区",
  14398. "乌当区",
  14399. "白云区",
  14400. "小河区",
  14401. "清镇市",
  14402. "开阳县",
  14403. "修文县",
  14404. "息烽县"] },
  14405. {
  14406. "name": "六盘水市",
  14407. "area": [
  14408. "钟山区",
  14409. "水城县",
  14410. "盘县",
  14411. "六枝特区"] },
  14412. {
  14413. "name": "遵义市",
  14414. "area": [
  14415. "红花岗区",
  14416. "汇川区",
  14417. "赤水市",
  14418. "仁怀市",
  14419. "遵义县",
  14420. "绥阳县",
  14421. "桐梓县",
  14422. "习水县",
  14423. "凤冈县",
  14424. "正安县",
  14425. "余庆县",
  14426. "湄潭县",
  14427. "道真仡佬族苗族自治县",
  14428. "务川仡佬族苗族自治县"] },
  14429. {
  14430. "name": "安顺市",
  14431. "area": [
  14432. "西秀区",
  14433. "普定县",
  14434. "平坝县",
  14435. "镇宁布依族苗族自治县",
  14436. "紫云苗族布依族自治县",
  14437. "关岭布依族苗族自治县"] },
  14438. {
  14439. "name": "铜仁地区",
  14440. "area": [
  14441. "铜仁市",
  14442. "德江县",
  14443. "江口县",
  14444. "思南县",
  14445. "石阡县",
  14446. "玉屏侗族自治县",
  14447. "松桃苗族自治县",
  14448. "印江土家族苗族自治县",
  14449. "沿河土家族自治县",
  14450. "万山特区"] },
  14451. {
  14452. "name": "毕节地区",
  14453. "area": [
  14454. "毕节市",
  14455. "黔西县",
  14456. "大方县",
  14457. "织金县",
  14458. "金沙县",
  14459. "赫章县",
  14460. "纳雍县",
  14461. "威宁彝族回族苗族自治县"] },
  14462. {
  14463. "name": "黔西南布依族苗族自治州",
  14464. "area": [
  14465. "兴义市",
  14466. "望谟县",
  14467. "兴仁县",
  14468. "普安县",
  14469. "册亨县",
  14470. "晴隆县",
  14471. "贞丰县",
  14472. "安龙县"] },
  14473. {
  14474. "name": "黔东南苗族侗族自治州",
  14475. "area": [
  14476. "凯里市",
  14477. "施秉县",
  14478. "从江县",
  14479. "锦屏县",
  14480. "镇远县",
  14481. "麻江县",
  14482. "台江县",
  14483. "天柱县",
  14484. "黄平县",
  14485. "榕江县",
  14486. "剑河县",
  14487. "三穗县",
  14488. "雷山县",
  14489. "黎平县",
  14490. "岑巩县",
  14491. "丹寨县"] },
  14492. {
  14493. "name": "黔南布依族苗族自治州",
  14494. "area": [
  14495. "都匀市",
  14496. "福泉市",
  14497. "贵定县",
  14498. "惠水县",
  14499. "罗甸县",
  14500. "瓮安县",
  14501. "荔波县",
  14502. "龙里县",
  14503. "平塘县",
  14504. "长顺县",
  14505. "独山县",
  14506. "三都水族自治县"] }] },
  14507. {
  14508. "name": "云南省",
  14509. "city": [
  14510. {
  14511. "name": "昆明市",
  14512. "area": [
  14513. "盘龙区",
  14514. "五华区",
  14515. "官渡区",
  14516. "西山区",
  14517. "东川区",
  14518. "安宁市",
  14519. "呈贡县",
  14520. "晋宁县",
  14521. "富民县",
  14522. "宜良县",
  14523. "嵩明县",
  14524. "石林彝族自治县",
  14525. "禄劝彝族苗族自治县",
  14526. "寻甸回族彝族自治县"] },
  14527. {
  14528. "name": "曲靖市",
  14529. "area": [
  14530. "麒麟区",
  14531. "宣威市",
  14532. "马龙县",
  14533. "沾益县",
  14534. "富源县",
  14535. "罗平县",
  14536. "师宗县",
  14537. "陆良县",
  14538. "会泽县"] },
  14539. {
  14540. "name": "玉溪市",
  14541. "area": [
  14542. "红塔区",
  14543. "江川县",
  14544. "澄江县",
  14545. "通海县",
  14546. "华宁县",
  14547. "易门县",
  14548. "峨山彝族自治县",
  14549. "新平彝族傣族自治县",
  14550. "元江哈尼族彝族傣族自治县"] },
  14551. {
  14552. "name": "保山市",
  14553. "area": [
  14554. "隆阳区",
  14555. "施甸县",
  14556. "腾冲县",
  14557. "龙陵县",
  14558. "昌宁县"] },
  14559. {
  14560. "name": "昭通市",
  14561. "area": [
  14562. "昭阳区",
  14563. "鲁甸县",
  14564. "巧家县",
  14565. "盐津县",
  14566. "大关县",
  14567. "永善县",
  14568. "绥江县",
  14569. "镇雄县",
  14570. "彝良县",
  14571. "威信县",
  14572. "水富县"] },
  14573. {
  14574. "name": "丽江市",
  14575. "area": [
  14576. "古城区",
  14577. "永胜县",
  14578. "华坪县",
  14579. "玉龙纳西族自治县",
  14580. "宁蒗彝族自治县"] },
  14581. {
  14582. "name": "普洱市",
  14583. "area": [
  14584. "思茅区",
  14585. "普洱哈尼族彝族自治县",
  14586. "墨江哈尼族自治县",
  14587. "景东彝族自治县",
  14588. "景谷傣族彝族自治县",
  14589. "镇沅彝族哈尼族拉祜族自治县",
  14590. "江城哈尼族彝族自治县",
  14591. "孟连傣族拉祜族佤族自治县",
  14592. "澜沧拉祜族自治县",
  14593. "西盟佤族自治县"] },
  14594. {
  14595. "name": "临沧市",
  14596. "area": [
  14597. "临翔区",
  14598. "凤庆县",
  14599. "云县",
  14600. "永德县",
  14601. "镇康县",
  14602. "双江拉祜族佤族布朗族傣族自治县",
  14603. "耿马傣族佤族自治县",
  14604. "沧源佤族自治县"] },
  14605. {
  14606. "name": "德宏傣族景颇族自治州",
  14607. "area": [
  14608. "潞西市",
  14609. "瑞丽市",
  14610. "梁河县",
  14611. "盈江县",
  14612. "陇川县"] },
  14613. {
  14614. "name": "怒江傈僳族自治州",
  14615. "area": [
  14616. "泸水县",
  14617. "福贡县",
  14618. "贡山独龙族怒族自治县",
  14619. "兰坪白族普米族自治县"] },
  14620. {
  14621. "name": "迪庆藏族自治州",
  14622. "area": [
  14623. "香格里拉县",
  14624. "德钦县",
  14625. "维西傈僳族自治县"] },
  14626. {
  14627. "name": "大理白族自治州",
  14628. "area": [
  14629. "大理市",
  14630. "祥云县",
  14631. "宾川县",
  14632. "弥渡县",
  14633. "永平县",
  14634. "云龙县",
  14635. "洱源县",
  14636. "剑川县",
  14637. "鹤庆县",
  14638. "漾濞彝族自治县",
  14639. "南涧彝族自治县",
  14640. "巍山彝族回族自治县"] },
  14641. {
  14642. "name": "楚雄彝族自治州",
  14643. "area": [
  14644. "楚雄市",
  14645. "双柏县",
  14646. "牟定县",
  14647. "南华县",
  14648. "姚安县",
  14649. "大姚县",
  14650. "永仁县",
  14651. "元谋县",
  14652. "武定县",
  14653. "禄丰县"] },
  14654. {
  14655. "name": "红河哈尼族彝族自治州",
  14656. "area": [
  14657. "蒙自县",
  14658. "个旧市",
  14659. "开远市",
  14660. "绿春县",
  14661. "建水县",
  14662. "石屏县",
  14663. "弥勒县",
  14664. "泸西县",
  14665. "元阳县",
  14666. "红河县",
  14667. "金平苗族瑶族傣族自治县",
  14668. "河口瑶族自治县",
  14669. "屏边苗族自治县"] },
  14670. {
  14671. "name": "文山壮族苗族自治州",
  14672. "area": [
  14673. "文山县",
  14674. "砚山县",
  14675. "西畴县",
  14676. "麻栗坡县",
  14677. "马关县",
  14678. "丘北县",
  14679. "广南县",
  14680. "富宁县"] },
  14681. {
  14682. "name": "西双版纳傣族自治州",
  14683. "area": [
  14684. "景洪市",
  14685. "勐海县",
  14686. "勐腊县"] }] },
  14687. {
  14688. "name": "西藏",
  14689. "city": [
  14690. {
  14691. "name": "拉萨市",
  14692. "area": [
  14693. "城关区",
  14694. "林周县",
  14695. "当雄县",
  14696. "尼木县",
  14697. "曲水县",
  14698. "堆龙德庆县",
  14699. "达孜县",
  14700. "墨竹工卡县"] },
  14701. {
  14702. "name": "那曲地区",
  14703. "area": [
  14704. "那曲县",
  14705. "嘉黎县",
  14706. "比如县",
  14707. "聂荣县",
  14708. "安多县",
  14709. "申扎县",
  14710. "索县",
  14711. "班戈县",
  14712. "巴青县",
  14713. "尼玛县"] },
  14714. {
  14715. "name": "昌都地区",
  14716. "area": [
  14717. "昌都县",
  14718. "江达县",
  14719. "贡觉县",
  14720. "类乌齐县",
  14721. "丁青县",
  14722. "察雅县",
  14723. "八宿县",
  14724. "左贡县",
  14725. "芒康县",
  14726. "洛隆县",
  14727. "边坝县"] },
  14728. {
  14729. "name": "林芝地区",
  14730. "area": [
  14731. "林芝县",
  14732. "工布江达县",
  14733. "米林县",
  14734. "墨脱县",
  14735. "波密县",
  14736. "察隅县",
  14737. "朗县"] },
  14738. {
  14739. "name": "山南地区",
  14740. "area": [
  14741. "乃东县",
  14742. "扎囊县",
  14743. "贡嘎县",
  14744. "桑日县",
  14745. "琼结县",
  14746. "曲松县",
  14747. "措美县",
  14748. "洛扎县",
  14749. "加查县",
  14750. "隆子县",
  14751. "错那县",
  14752. "浪卡子县"] },
  14753. {
  14754. "name": "日喀则地区",
  14755. "area": [
  14756. "日喀则市",
  14757. "南木林县",
  14758. "江孜县",
  14759. "定日县",
  14760. "萨迦县",
  14761. "拉孜县",
  14762. "昂仁县",
  14763. "谢通门县",
  14764. "白朗县",
  14765. "仁布县",
  14766. "康马县",
  14767. "定结县",
  14768. "仲巴县",
  14769. "亚东县",
  14770. "吉隆县",
  14771. "聂拉木县",
  14772. "萨嘎县",
  14773. "岗巴县"] },
  14774. {
  14775. "name": "阿里地区",
  14776. "area": [
  14777. "噶尔县",
  14778. "普兰县",
  14779. "札达县",
  14780. "日土县",
  14781. "革吉县",
  14782. "改则县",
  14783. "措勤县"] }] },
  14784. {
  14785. "name": "陕西省",
  14786. "city": [
  14787. {
  14788. "name": "西安市",
  14789. "area": [
  14790. "莲湖区",
  14791. "新城区",
  14792. "碑林区",
  14793. "雁塔区",
  14794. "灞桥区",
  14795. "未央区",
  14796. "阎良区",
  14797. "临潼区",
  14798. "长安区",
  14799. "高陵县",
  14800. "蓝田县",
  14801. "户县",
  14802. "周至县"] },
  14803. {
  14804. "name": "铜川市",
  14805. "area": [
  14806. "耀州区",
  14807. "王益区",
  14808. "印台区",
  14809. "宜君县"] },
  14810. {
  14811. "name": "宝鸡市",
  14812. "area": [
  14813. "渭滨区",
  14814. "金台区",
  14815. "陈仓区",
  14816. "岐山县",
  14817. "凤翔县",
  14818. "陇县",
  14819. "太白县",
  14820. "麟游县",
  14821. "扶风县",
  14822. "千阳县",
  14823. "眉县",
  14824. "凤县"] },
  14825. {
  14826. "name": "咸阳市",
  14827. "area": [
  14828. "秦都区",
  14829. "渭城区",
  14830. "杨陵区",
  14831. "兴平市",
  14832. "礼泉县",
  14833. "泾阳县",
  14834. "永寿县",
  14835. "三原县",
  14836. "彬县",
  14837. "旬邑县",
  14838. "长武县",
  14839. "乾县",
  14840. "武功县",
  14841. "淳化县"] },
  14842. {
  14843. "name": "渭南市",
  14844. "area": [
  14845. "临渭区",
  14846. "韩城市",
  14847. "华阴市",
  14848. "蒲城县",
  14849. "潼关县",
  14850. "白水县",
  14851. "澄城县",
  14852. "华县",
  14853. "合阳县",
  14854. "富平县",
  14855. "大荔县"] },
  14856. {
  14857. "name": "延安市",
  14858. "area": [
  14859. "宝塔区",
  14860. "安塞县",
  14861. "洛川县",
  14862. "子长县",
  14863. "黄陵县",
  14864. "延川县",
  14865. "富县",
  14866. "延长县",
  14867. "甘泉县",
  14868. "宜川县",
  14869. "志丹县",
  14870. "黄龙县",
  14871. "吴起县"] },
  14872. {
  14873. "name": "汉中市",
  14874. "area": [
  14875. "汉台区",
  14876. "留坝县",
  14877. "镇巴县",
  14878. "城固县",
  14879. "南郑县",
  14880. "洋县",
  14881. "宁强县",
  14882. "佛坪县",
  14883. "勉县",
  14884. "西乡县",
  14885. "略阳县"] },
  14886. {
  14887. "name": "榆林市",
  14888. "area": [
  14889. "榆阳区",
  14890. "清涧县",
  14891. "绥德县",
  14892. "神木县",
  14893. "佳县",
  14894. "府谷县",
  14895. "子洲县",
  14896. "靖边县",
  14897. "横山县",
  14898. "米脂县",
  14899. "吴堡县",
  14900. "定边县"] },
  14901. {
  14902. "name": "安康市",
  14903. "area": [
  14904. "汉滨区",
  14905. "紫阳县",
  14906. "岚皋县",
  14907. "旬阳县",
  14908. "镇坪县",
  14909. "平利县",
  14910. "石泉县",
  14911. "宁陕县",
  14912. "白河县",
  14913. "汉阴县"] },
  14914. {
  14915. "name": "商洛市",
  14916. "area": [
  14917. "商州区",
  14918. "镇安县",
  14919. "山阳县",
  14920. "洛南县",
  14921. "商南县",
  14922. "丹凤县",
  14923. "柞水县"] }] },
  14924. {
  14925. "name": "甘肃省",
  14926. "city": [
  14927. {
  14928. "name": "兰州市",
  14929. "area": [
  14930. "城关区",
  14931. "七里河区",
  14932. "西固区",
  14933. "安宁区",
  14934. "红古区",
  14935. "永登县",
  14936. "皋兰县",
  14937. "榆中县"] },
  14938. {
  14939. "name": "嘉峪关市",
  14940. "area": [
  14941. "嘉峪关市"] },
  14942. {
  14943. "name": "金昌市",
  14944. "area": [
  14945. "金川区",
  14946. "永昌县"] },
  14947. {
  14948. "name": "白银市",
  14949. "area": [
  14950. "白银区",
  14951. "平川区",
  14952. "靖远县",
  14953. "会宁县",
  14954. "景泰县"] },
  14955. {
  14956. "name": "天水市",
  14957. "area": [
  14958. "清水县",
  14959. "秦安县",
  14960. "甘谷县",
  14961. "武山县",
  14962. "张家川回族自治县",
  14963. "北道区",
  14964. "秦城区"] },
  14965. {
  14966. "name": "武威市",
  14967. "area": [
  14968. "凉州区",
  14969. "民勤县",
  14970. "古浪县",
  14971. "天祝藏族自治县"] },
  14972. {
  14973. "name": "酒泉市",
  14974. "area": [
  14975. "肃州区",
  14976. "玉门市",
  14977. "敦煌市",
  14978. "金塔县",
  14979. "肃北蒙古族自治县",
  14980. "阿克塞哈萨克族自治县",
  14981. "安西县"] },
  14982. {
  14983. "name": "张掖市",
  14984. "area": [
  14985. "甘州区",
  14986. "民乐县",
  14987. "临泽县",
  14988. "高台县",
  14989. "山丹县",
  14990. "肃南裕固族自治县"] },
  14991. {
  14992. "name": "庆阳市",
  14993. "area": [
  14994. "西峰区",
  14995. "庆城县",
  14996. "环县",
  14997. "华池县",
  14998. "合水县",
  14999. "正宁县",
  15000. "宁县",
  15001. "镇原县"] },
  15002. {
  15003. "name": "平凉市",
  15004. "area": [
  15005. "崆峒区",
  15006. "泾川县",
  15007. "灵台县",
  15008. "崇信县",
  15009. "华亭县",
  15010. "庄浪县",
  15011. "静宁县"] },
  15012. {
  15013. "name": "定西市",
  15014. "area": [
  15015. "安定区",
  15016. "通渭县",
  15017. "临洮县",
  15018. "漳县",
  15019. "岷县",
  15020. "渭源县",
  15021. "陇西县"] },
  15022. {
  15023. "name": "陇南市",
  15024. "area": [
  15025. "武都区",
  15026. "成县",
  15027. "宕昌县",
  15028. "康县",
  15029. "文县",
  15030. "西和县",
  15031. "礼县",
  15032. "两当县",
  15033. "徽县"] },
  15034. {
  15035. "name": "临夏回族自治州",
  15036. "area": [
  15037. "临夏市",
  15038. "临夏县",
  15039. "康乐县",
  15040. "永靖县",
  15041. "广河县",
  15042. "和政县",
  15043. "东乡族自治县",
  15044. "积石山保安族东乡族撒拉族自治县"] },
  15045. {
  15046. "name": "甘南藏族自治州",
  15047. "area": [
  15048. "合作市",
  15049. "临潭县",
  15050. "卓尼县",
  15051. "舟曲县",
  15052. "迭部县",
  15053. "玛曲县",
  15054. "碌曲县",
  15055. "夏河县"] }] },
  15056. {
  15057. "name": "青海省",
  15058. "city": [
  15059. {
  15060. "name": "西宁市",
  15061. "area": [
  15062. "城中区",
  15063. "城东区",
  15064. "城西区",
  15065. "城北区",
  15066. "湟源县",
  15067. "湟中县",
  15068. "大通回族土族自治县"] },
  15069. {
  15070. "name": "海东地区",
  15071. "area": [
  15072. "平安县",
  15073. "乐都县",
  15074. "民和回族土族自治县",
  15075. "互助土族自治县",
  15076. "化隆回族自治县",
  15077. "循化撒拉族自治县"] },
  15078. {
  15079. "name": "海北藏族自治州",
  15080. "area": [
  15081. "海晏县",
  15082. "祁连县",
  15083. "刚察县",
  15084. "门源回族自治县"] },
  15085. {
  15086. "name": "海南藏族自治州",
  15087. "area": [
  15088. "共和县",
  15089. "同德县",
  15090. "贵德县",
  15091. "兴海县",
  15092. "贵南县"] },
  15093. {
  15094. "name": "黄南藏族自治州",
  15095. "area": [
  15096. "同仁县",
  15097. "尖扎县",
  15098. "泽库县",
  15099. "河南蒙古族自治县"] },
  15100. {
  15101. "name": "果洛藏族自治州",
  15102. "area": [
  15103. "玛沁县",
  15104. "班玛县",
  15105. "甘德县",
  15106. "达日县",
  15107. "久治县",
  15108. "玛多县"] },
  15109. {
  15110. "name": "玉树藏族自治州",
  15111. "area": [
  15112. "玉树县",
  15113. "杂多县",
  15114. "称多县",
  15115. "治多县",
  15116. "囊谦县",
  15117. "曲麻莱县"] },
  15118. {
  15119. "name": "海西蒙古族藏族自治州",
  15120. "area": [
  15121. "德令哈市",
  15122. "格尔木市",
  15123. "乌兰县",
  15124. "都兰县",
  15125. "天峻县"] }] },
  15126. {
  15127. "name": "宁夏",
  15128. "city": [
  15129. {
  15130. "name": "银川市",
  15131. "area": [
  15132. "兴庆区",
  15133. "西夏区",
  15134. "金凤区",
  15135. "灵武市",
  15136. "永宁县",
  15137. "贺兰县"] },
  15138. {
  15139. "name": "石嘴山市",
  15140. "area": [
  15141. "大武口区",
  15142. "惠农区",
  15143. "平罗县"] },
  15144. {
  15145. "name": "吴忠市",
  15146. "area": [
  15147. "利通区",
  15148. "青铜峡市",
  15149. "盐池县",
  15150. "同心县"] },
  15151. {
  15152. "name": "固原市",
  15153. "area": [
  15154. "原州区",
  15155. "西吉县",
  15156. "隆德县",
  15157. "泾源县",
  15158. "彭阳县"] },
  15159. {
  15160. "name": "中卫市",
  15161. "area": [
  15162. "沙坡头区",
  15163. "中宁县",
  15164. "海原县"] }] },
  15165. {
  15166. "name": "新疆",
  15167. "city": [
  15168. {
  15169. "name": "乌鲁木齐市",
  15170. "area": [
  15171. "天山区",
  15172. "沙依巴克区",
  15173. "新市区",
  15174. "水磨沟区",
  15175. "头屯河区",
  15176. "达坂城区",
  15177. "东山区",
  15178. "乌鲁木齐县"] },
  15179. {
  15180. "name": "克拉玛依市",
  15181. "area": [
  15182. "克拉玛依区",
  15183. "独山子区",
  15184. "白碱滩区",
  15185. "乌尔禾区"] },
  15186. {
  15187. "name": "吐鲁番地区",
  15188. "area": [
  15189. "吐鲁番市",
  15190. "托克逊县",
  15191. "鄯善县"] },
  15192. {
  15193. "name": "哈密地区",
  15194. "area": [
  15195. "哈密市",
  15196. "伊吾县",
  15197. "巴里坤哈萨克自治县"] },
  15198. {
  15199. "name": "和田地区",
  15200. "area": [
  15201. "和田市",
  15202. "和田县",
  15203. "洛浦县",
  15204. "民丰县",
  15205. "皮山县",
  15206. "策勒县",
  15207. "于田县",
  15208. "墨玉县"] },
  15209. {
  15210. "name": "阿克苏地区",
  15211. "area": [
  15212. "阿克苏市",
  15213. "温宿县",
  15214. "沙雅县",
  15215. "拜城县",
  15216. "阿瓦提县",
  15217. "库车县",
  15218. "柯坪县",
  15219. "新和县",
  15220. "乌什县"] },
  15221. {
  15222. "name": "喀什地区",
  15223. "area": [
  15224. "喀什市",
  15225. "巴楚县",
  15226. "泽普县",
  15227. "伽师县",
  15228. "叶城县",
  15229. "岳普湖县",
  15230. "疏勒县",
  15231. "麦盖提县",
  15232. "英吉沙县",
  15233. "莎车县",
  15234. "疏附县",
  15235. "塔什库尔干塔吉克自治县"] },
  15236. {
  15237. "name": "克孜勒苏柯尔克孜自治州",
  15238. "area": [
  15239. "阿图什市",
  15240. "阿合奇县",
  15241. "乌恰县",
  15242. "阿克陶县"] },
  15243. {
  15244. "name": "巴音郭楞蒙古自治州",
  15245. "area": [
  15246. "库尔勒市",
  15247. "和静县",
  15248. "尉犁县",
  15249. "和硕县",
  15250. "且末县",
  15251. "博湖县",
  15252. "轮台县",
  15253. "若羌县",
  15254. "焉耆回族自治县"] },
  15255. {
  15256. "name": "昌吉回族自治州",
  15257. "area": [
  15258. "昌吉市",
  15259. "阜康市",
  15260. "奇台县",
  15261. "玛纳斯县",
  15262. "吉木萨尔县",
  15263. "呼图壁县",
  15264. "木垒哈萨克自治县",
  15265. "米泉市"] },
  15266. {
  15267. "name": "博尔塔拉蒙古自治州",
  15268. "area": [
  15269. "博乐市",
  15270. "精河县",
  15271. "温泉县"] },
  15272. {
  15273. "name": "石河子",
  15274. "area": [
  15275. "石河子"] },
  15276. {
  15277. "name": "阿拉尔",
  15278. "area": [
  15279. "阿拉尔"] },
  15280. {
  15281. "name": "图木舒克",
  15282. "area": [
  15283. "图木舒克"] },
  15284. {
  15285. "name": "五家渠",
  15286. "area": [
  15287. "五家渠"] },
  15288. {
  15289. "name": "伊犁哈萨克自治州",
  15290. "area": [
  15291. "伊宁市",
  15292. "奎屯市",
  15293. "伊宁县",
  15294. "特克斯县",
  15295. "尼勒克县",
  15296. "昭苏县",
  15297. "新源县",
  15298. "霍城县",
  15299. "巩留县",
  15300. "察布查尔锡伯自治县",
  15301. "塔城地区",
  15302. "阿勒泰地区"] }] },
  15303. {
  15304. "name": "台湾省",
  15305. "city": [
  15306. {
  15307. "name": "台北市",
  15308. "area": [
  15309. "内湖区",
  15310. "南港区",
  15311. "中正区",
  15312. "万华区",
  15313. "大同区",
  15314. "中山区",
  15315. "松山区",
  15316. "大安区",
  15317. "信义区",
  15318. "文山区",
  15319. "士林区",
  15320. "北投区"] },
  15321. {
  15322. "name": "新北市",
  15323. "area": [
  15324. "板桥区",
  15325. "汐止区",
  15326. "新店区"] },
  15327. {
  15328. "name": "桃园市",
  15329. "area": [
  15330. "其他"] },
  15331. {
  15332. "name": "台中市",
  15333. "area": [
  15334. "其他"] },
  15335. {
  15336. "name": "台南市",
  15337. "area": [
  15338. "其他"] },
  15339. {
  15340. "name": "高雄市",
  15341. "area": [
  15342. "其他"] }] },
  15343. {
  15344. "name": "澳门",
  15345. "city": [
  15346. {
  15347. "name": "澳门",
  15348. "area": [
  15349. "花地玛堂区",
  15350. "圣安多尼堂区",
  15351. "大堂区",
  15352. "望德堂区",
  15353. "风顺堂区",
  15354. "嘉模堂区",
  15355. "圣方济各堂区",
  15356. "路凼"] }] },
  15357. {
  15358. "name": "香港",
  15359. "city": [
  15360. {
  15361. "name": "香港",
  15362. "area": [
  15363. "深水埗区",
  15364. "油尖旺区",
  15365. "九龙城区",
  15366. "黄大仙区",
  15367. "观塘区",
  15368. "北区",
  15369. "大埔区",
  15370. "沙田区",
  15371. "西贡区",
  15372. "元朗区",
  15373. "屯门区",
  15374. "荃湾区",
  15375. "葵青区",
  15376. "离岛区",
  15377. "中西区",
  15378. "湾仔区",
  15379. "东区",
  15380. "南区"] }] }];exports.default = _default;
  15381. /***/ }),
  15382. /***/ 52:
  15383. /*!*************************************************!*\
  15384. !*** G:/gsxm/git/yangdaxia/utils/loginUtils.js ***!
  15385. \*************************************************/
  15386. /*! no static exports found */
  15387. /***/ (function(module, exports, __webpack_require__) {
  15388. "use strict";
  15389. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.getActionPage = getActionPage;exports.interceptor = interceptor;exports.saveUrl = saveUrl;exports.getPageUrl = getPageUrl;function getActionPage() {
  15390. var pages = getCurrentPages();
  15391. return pages[pages.length - 1];
  15392. }
  15393. //登录拦截
  15394. function interceptor() {
  15395. var pages = getActionPage();
  15396. // 获取当前页面
  15397. var pageUrl = '/' + pages.route;
  15398. var url = '/pages/public/login';
  15399. url = '/pages/public/wxLogin';
  15400. if (pageUrl != url) {
  15401. uni.navigateTo({
  15402. url: url });
  15403. }
  15404. }
  15405. // 保存页面
  15406. function saveUrl() {
  15407. var path = getPageUrl(true);
  15408. uni.setStorageSync('present', path);
  15409. }
  15410. // 处理分享链接地址
  15411. function getPageUrl() {var showSpeard = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
  15412. var page = getActionPage();
  15413. var path = '/' + page.route;
  15414. var url = '';
  15415. // 获取对象可枚举键值列表
  15416. var objKeys = Object.keys(page.options);
  15417. // 判断有无传值
  15418. if (objKeys.length > 0) {
  15419. // 循环赋值对象数据
  15420. for (var a in page.options) {
  15421. // 判断有无邀请人
  15422. if (a != 'speard') {
  15423. url += a + "=" + page.options[a] + "&";
  15424. } else {
  15425. // 判断是否需要存储邀请人
  15426. if (showSpeard) {
  15427. url += a + "=" + page.options[a] + "&";
  15428. }
  15429. }
  15430. }
  15431. path += '?' + url.substr(0, url.length - 1);
  15432. }
  15433. // 返回处理邀请人后的邀请地址
  15434. return path;
  15435. }
  15436. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  15437. /***/ }),
  15438. /***/ 53:
  15439. /*!*****************************************!*\
  15440. !*** G:/gsxm/git/yangdaxia/api/user.js ***!
  15441. \*****************************************/
  15442. /*! no static exports found */
  15443. /***/ (function(module, exports, __webpack_require__) {
  15444. "use strict";
  15445. Object.defineProperty(exports, "__esModule", { value: true });exports.orderData = orderData;exports.getUserInfo = getUserInfo;exports.spreadBanner = spreadBanner;exports.shopList = shopList;exports.getAddressList = getAddressList;exports.addressEdit = addressEdit;exports.addressDel = addressDel;exports.setAddressDefault = setAddressDefault;exports.getCartList = getCartList;exports.getCartNum = getCartNum;exports.cartDel = cartDel;exports.getcollectList = getcollectList;exports.delcollect = delcollect;exports.spread_people = spread_people;exports.transfer = transfer;exports.orderVerific = orderVerific;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 50));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  15446. // 订单统计信息
  15447. function orderData(data) {
  15448. return (0, _request.default)({
  15449. url: '/api/order/data',
  15450. method: 'get',
  15451. data: data });
  15452. }
  15453. // 获取用户信息
  15454. function getUserInfo(data) {
  15455. return (0, _request.default)({
  15456. url: '/api/userinfo',
  15457. method: 'get',
  15458. data: data });
  15459. }
  15460. // 用户分享图
  15461. function spreadBanner(data) {
  15462. return (0, _request.default)({
  15463. url: '/api/spread/banner',
  15464. method: 'get',
  15465. data: data });
  15466. }
  15467. // 获取门店列表
  15468. function shopList(data) {
  15469. return (0, _request.default)({
  15470. url: '/api/store_list',
  15471. method: 'get',
  15472. data: data });
  15473. }
  15474. // 获取地址列表
  15475. function getAddressList(data) {
  15476. return (0, _request.default)({
  15477. url: '/api/address/list',
  15478. method: 'get',
  15479. data: data });
  15480. }
  15481. // 修改地址
  15482. function addressEdit(data) {
  15483. return (0, _request.default)({
  15484. url: '/api/address/edit',
  15485. method: 'post',
  15486. data: data });
  15487. }
  15488. // 删除地址
  15489. function addressDel(data) {
  15490. return (0, _request.default)({
  15491. url: '/api/address/del',
  15492. method: 'post',
  15493. data: data });
  15494. }
  15495. // 设为默认地址
  15496. function setAddressDefault(data) {
  15497. return (0, _request.default)({
  15498. url: '/api/address/default/set',
  15499. method: 'post',
  15500. data: data });
  15501. }
  15502. // 购物车列表
  15503. function getCartList(data) {
  15504. return (0, _request.default)({
  15505. url: '/api/cart/list',
  15506. method: 'get',
  15507. data: data });
  15508. }
  15509. // 修改购物车数量
  15510. function getCartNum(data) {
  15511. return (0, _request.default)({
  15512. url: '/api/cart/num',
  15513. method: 'post',
  15514. data: data });
  15515. }
  15516. //删除购物车
  15517. function cartDel(data) {
  15518. return (0, _request.default)({
  15519. url: '/api/cart/del',
  15520. method: 'post',
  15521. data: data });
  15522. }
  15523. //获取收藏夹列表
  15524. function getcollectList(data) {
  15525. return (0, _request.default)({
  15526. url: '/api/collect/user',
  15527. method: 'get',
  15528. data: data });
  15529. }
  15530. // 取消收藏
  15531. function delcollect(data) {
  15532. return (0, _request.default)({
  15533. url: '/api/collect/del',
  15534. method: 'post',
  15535. data: data });
  15536. }
  15537. //推荐人
  15538. function spread_people(data) {
  15539. return (0, _request.default)({
  15540. url: '/api/spread/people',
  15541. method: 'post',
  15542. data: data });
  15543. }
  15544. //积分转账
  15545. function transfer(data) {
  15546. return (0, _request.default)({
  15547. url: '/api/transfer',
  15548. method: 'post',
  15549. data: data });
  15550. }
  15551. // 扫码核销
  15552. function orderVerific(data) {
  15553. return (0, _request.default)({
  15554. url: '/api/order/order_verific',
  15555. method: 'post',
  15556. data: data });
  15557. }
  15558. /***/ }),
  15559. /***/ 535:
  15560. /*!******************************************************************!*\
  15561. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/util/emitter.js ***!
  15562. \******************************************************************/
  15563. /*! no static exports found */
  15564. /***/ (function(module, exports, __webpack_require__) {
  15565. "use strict";
  15566. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0; /**
  15567. * 递归使用 call 方式this指向
  15568. * @param componentName // 需要找的组件的名称
  15569. * @param eventName // 事件名称
  15570. * @param params // 需要传递的参数
  15571. */
  15572. function _broadcast(componentName, eventName, params) {
  15573. // 循环子节点找到名称一样的子节点 否则 递归 当前子节点
  15574. this.$children.map(function (child) {
  15575. if (componentName === child.$options.name) {
  15576. child.$emit.apply(child, [eventName].concat(params));
  15577. } else {
  15578. _broadcast.apply(child, [componentName, eventName].concat(params));
  15579. }
  15580. });
  15581. }var _default =
  15582. {
  15583. methods: {
  15584. /**
  15585. * 派发 (向上查找) (一个)
  15586. * @param componentName // 需要找的组件的名称
  15587. * @param eventName // 事件名称
  15588. * @param params // 需要传递的参数
  15589. */
  15590. dispatch: function dispatch(componentName, eventName, params) {
  15591. var parent = this.$parent || this.$root; //$parent 找到最近的父节点 $root 根节点
  15592. var name = parent.$options.name; // 获取当前组件实例的name
  15593. // 如果当前有节点 && 当前没名称 且 当前名称等于需要传进来的名称的时候就去查找当前的节点
  15594. // 循环出当前名称的一样的组件实例
  15595. while (parent && (!name || name !== componentName)) {
  15596. parent = parent.$parent;
  15597. if (parent) {
  15598. name = parent.$options.name;
  15599. }
  15600. }
  15601. // 有节点表示当前找到了name一样的实例
  15602. if (parent) {
  15603. parent.$emit.apply(parent, [eventName].concat(params));
  15604. }
  15605. },
  15606. /**
  15607. * 广播 (向下查找) (广播多个)
  15608. * @param componentName // 需要找的组件的名称
  15609. * @param eventName // 事件名称
  15610. * @param params // 需要传递的参数
  15611. */
  15612. broadcast: function broadcast(componentName, eventName, params) {
  15613. _broadcast.call(this, componentName, eventName, params);
  15614. } } };exports.default = _default;
  15615. /***/ }),
  15616. /***/ 536:
  15617. /*!**************************************************************************!*\
  15618. !*** G:/gsxm/git/yangdaxia/plugin/uview-ui/libs/util/async-validator.js ***!
  15619. \**************************************************************************/
  15620. /*! no static exports found */
  15621. /***/ (function(module, exports, __webpack_require__) {
  15622. "use strict";
  15623. /* WEBPACK VAR INJECTION */(function(process) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;function _extends() {
  15624. _extends = Object.assign || function (target) {
  15625. for (var i = 1; i < arguments.length; i++) {
  15626. var source = arguments[i];
  15627. for (var key in source) {
  15628. if (Object.prototype.hasOwnProperty.call(source, key)) {
  15629. target[key] = source[key];
  15630. }
  15631. }
  15632. }
  15633. return target;
  15634. };
  15635. return _extends.apply(this, arguments);
  15636. }
  15637. /* eslint no-console:0 */
  15638. var formatRegExp = /%[sdj%]/g;
  15639. var warning = function warning() {}; // don't print warning message when in production env or node runtime
  15640. if (typeof process !== 'undefined' && Object({"VUE_APP_NAME":"基础项目","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}) && "development" !== 'production' && typeof window !==
  15641. 'undefined' && typeof document !== 'undefined') {
  15642. warning = function warning(type, errors) {
  15643. if (typeof console !== 'undefined' && console.warn) {
  15644. if (errors.every(function (e) {
  15645. return typeof e === 'string';
  15646. })) {
  15647. console.warn(type, errors);
  15648. }
  15649. }
  15650. };
  15651. }
  15652. function convertFieldsError(errors) {
  15653. if (!errors || !errors.length) return null;
  15654. var fields = {};
  15655. errors.forEach(function (error) {
  15656. var field = error.field;
  15657. fields[field] = fields[field] || [];
  15658. fields[field].push(error);
  15659. });
  15660. return fields;
  15661. }
  15662. function format() {
  15663. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  15664. args[_key] = arguments[_key];
  15665. }
  15666. var i = 1;
  15667. var f = args[0];
  15668. var len = args.length;
  15669. if (typeof f === 'function') {
  15670. return f.apply(null, args.slice(1));
  15671. }
  15672. if (typeof f === 'string') {
  15673. var str = String(f).replace(formatRegExp, function (x) {
  15674. if (x === '%%') {
  15675. return '%';
  15676. }
  15677. if (i >= len) {
  15678. return x;
  15679. }
  15680. switch (x) {
  15681. case '%s':
  15682. return String(args[i++]);
  15683. case '%d':
  15684. return Number(args[i++]);
  15685. case '%j':
  15686. try {
  15687. return JSON.stringify(args[i++]);
  15688. } catch (_) {
  15689. return '[Circular]';
  15690. }
  15691. break;
  15692. default:
  15693. return x;}
  15694. });
  15695. for (var arg = args[i]; i < len; arg = args[++i]) {
  15696. str += " " + arg;
  15697. }
  15698. return str;
  15699. }
  15700. return f;
  15701. }
  15702. function isNativeStringType(type) {
  15703. return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
  15704. }
  15705. function isEmptyValue(value, type) {
  15706. if (value === undefined || value === null) {
  15707. return true;
  15708. }
  15709. if (type === 'array' && Array.isArray(value) && !value.length) {
  15710. return true;
  15711. }
  15712. if (isNativeStringType(type) && typeof value === 'string' && !value) {
  15713. return true;
  15714. }
  15715. return false;
  15716. }
  15717. function asyncParallelArray(arr, func, callback) {
  15718. var results = [];
  15719. var total = 0;
  15720. var arrLength = arr.length;
  15721. function count(errors) {
  15722. results.push.apply(results, errors);
  15723. total++;
  15724. if (total === arrLength) {
  15725. callback(results);
  15726. }
  15727. }
  15728. arr.forEach(function (a) {
  15729. func(a, count);
  15730. });
  15731. }
  15732. function asyncSerialArray(arr, func, callback) {
  15733. var index = 0;
  15734. var arrLength = arr.length;
  15735. function next(errors) {
  15736. if (errors && errors.length) {
  15737. callback(errors);
  15738. return;
  15739. }
  15740. var original = index;
  15741. index = index + 1;
  15742. if (original < arrLength) {
  15743. func(arr[original], next);
  15744. } else {
  15745. callback([]);
  15746. }
  15747. }
  15748. next([]);
  15749. }
  15750. function flattenObjArr(objArr) {
  15751. var ret = [];
  15752. Object.keys(objArr).forEach(function (k) {
  15753. ret.push.apply(ret, objArr[k]);
  15754. });
  15755. return ret;
  15756. }
  15757. function asyncMap(objArr, option, func, callback) {
  15758. if (option.first) {
  15759. var _pending = new Promise(function (resolve, reject) {
  15760. var next = function next(errors) {
  15761. callback(errors);
  15762. return errors.length ? reject({
  15763. errors: errors,
  15764. fields: convertFieldsError(errors) }) :
  15765. resolve();
  15766. };
  15767. var flattenArr = flattenObjArr(objArr);
  15768. asyncSerialArray(flattenArr, func, next);
  15769. });
  15770. _pending["catch"](function (e) {
  15771. return e;
  15772. });
  15773. return _pending;
  15774. }
  15775. var firstFields = option.firstFields || [];
  15776. if (firstFields === true) {
  15777. firstFields = Object.keys(objArr);
  15778. }
  15779. var objArrKeys = Object.keys(objArr);
  15780. var objArrLength = objArrKeys.length;
  15781. var total = 0;
  15782. var results = [];
  15783. var pending = new Promise(function (resolve, reject) {
  15784. var next = function next(errors) {
  15785. results.push.apply(results, errors);
  15786. total++;
  15787. if (total === objArrLength) {
  15788. callback(results);
  15789. return results.length ? reject({
  15790. errors: results,
  15791. fields: convertFieldsError(results) }) :
  15792. resolve();
  15793. }
  15794. };
  15795. if (!objArrKeys.length) {
  15796. callback(results);
  15797. resolve();
  15798. }
  15799. objArrKeys.forEach(function (key) {
  15800. var arr = objArr[key];
  15801. if (firstFields.indexOf(key) !== -1) {
  15802. asyncSerialArray(arr, func, next);
  15803. } else {
  15804. asyncParallelArray(arr, func, next);
  15805. }
  15806. });
  15807. });
  15808. pending["catch"](function (e) {
  15809. return e;
  15810. });
  15811. return pending;
  15812. }
  15813. function complementError(rule) {
  15814. return function (oe) {
  15815. if (oe && oe.message) {
  15816. oe.field = oe.field || rule.fullField;
  15817. return oe;
  15818. }
  15819. return {
  15820. message: typeof oe === 'function' ? oe() : oe,
  15821. field: oe.field || rule.fullField };
  15822. };
  15823. }
  15824. function deepMerge(target, source) {
  15825. if (source) {
  15826. for (var s in source) {
  15827. if (source.hasOwnProperty(s)) {
  15828. var value = source[s];
  15829. if (typeof value === 'object' && typeof target[s] === 'object') {
  15830. target[s] = _extends({}, target[s], {}, value);
  15831. } else {
  15832. target[s] = value;
  15833. }
  15834. }
  15835. }
  15836. }
  15837. return target;
  15838. }
  15839. /**
  15840. * Rule for validating required fields.
  15841. *
  15842. * @param rule The validation rule.
  15843. * @param value The value of the field on the source object.
  15844. * @param source The source object being validated.
  15845. * @param errors An array of errors that this rule may add
  15846. * validation errors to.
  15847. * @param options The validation options.
  15848. * @param options.messages The validation messages.
  15849. */
  15850. function required(rule, value, source, errors, options, type) {
  15851. if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
  15852. errors.push(format(options.messages.required, rule.fullField));
  15853. }
  15854. }
  15855. /**
  15856. * Rule for validating whitespace.
  15857. *
  15858. * @param rule The validation rule.
  15859. * @param value The value of the field on the source object.
  15860. * @param source The source object being validated.
  15861. * @param errors An array of errors that this rule may add
  15862. * validation errors to.
  15863. * @param options The validation options.
  15864. * @param options.messages The validation messages.
  15865. */
  15866. function whitespace(rule, value, source, errors, options) {
  15867. if (/^\s+$/.test(value) || value === '') {
  15868. errors.push(format(options.messages.whitespace, rule.fullField));
  15869. }
  15870. }
  15871. /* eslint max-len:0 */
  15872. var pattern = {
  15873. // http://emailregex.com/
  15874. email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
  15875. url: new RegExp(
  15876. "^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$",
  15877. 'i'),
  15878. hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i };
  15879. var types = {
  15880. integer: function integer(value) {
  15881. return types.number(value) && parseInt(value, 10) === value;
  15882. },
  15883. "float": function _float(value) {
  15884. return types.number(value) && !types.integer(value);
  15885. },
  15886. array: function array(value) {
  15887. return Array.isArray(value);
  15888. },
  15889. regexp: function regexp(value) {
  15890. if (value instanceof RegExp) {
  15891. return true;
  15892. }
  15893. try {
  15894. return !!new RegExp(value);
  15895. } catch (e) {
  15896. return false;
  15897. }
  15898. },
  15899. date: function date(value) {
  15900. return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear ===
  15901. 'function';
  15902. },
  15903. number: function number(value) {
  15904. if (isNaN(value)) {
  15905. return false;
  15906. }
  15907. // 修改源码,将字符串数值先转为数值
  15908. return typeof +value === 'number';
  15909. },
  15910. object: function object(value) {
  15911. return typeof value === 'object' && !types.array(value);
  15912. },
  15913. method: function method(value) {
  15914. return typeof value === 'function';
  15915. },
  15916. email: function email(value) {
  15917. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  15918. },
  15919. url: function url(value) {
  15920. return typeof value === 'string' && !!value.match(pattern.url);
  15921. },
  15922. hex: function hex(value) {
  15923. return typeof value === 'string' && !!value.match(pattern.hex);
  15924. } };
  15925. /**
  15926. * Rule for validating the type of a value.
  15927. *
  15928. * @param rule The validation rule.
  15929. * @param value The value of the field on the source object.
  15930. * @param source The source object being validated.
  15931. * @param errors An array of errors that this rule may add
  15932. * validation errors to.
  15933. * @param options The validation options.
  15934. * @param options.messages The validation messages.
  15935. */
  15936. function type(rule, value, source, errors, options) {
  15937. if (rule.required && value === undefined) {
  15938. required(rule, value, source, errors, options);
  15939. return;
  15940. }
  15941. var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
  15942. var ruleType = rule.type;
  15943. if (custom.indexOf(ruleType) > -1) {
  15944. if (!types[ruleType](value)) {
  15945. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  15946. } // straight typeof check
  15947. } else if (ruleType && typeof value !== rule.type) {
  15948. errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
  15949. }
  15950. }
  15951. /**
  15952. * Rule for validating minimum and maximum allowed values.
  15953. *
  15954. * @param rule The validation rule.
  15955. * @param value The value of the field on the source object.
  15956. * @param source The source object being validated.
  15957. * @param errors An array of errors that this rule may add
  15958. * validation errors to.
  15959. * @param options The validation options.
  15960. * @param options.messages The validation messages.
  15961. */
  15962. function range(rule, value, source, errors, options) {
  15963. var len = typeof rule.len === 'number';
  15964. var min = typeof rule.min === 'number';
  15965. var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
  15966. var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
  15967. var val = value;
  15968. var key = null;
  15969. var num = typeof value === 'number';
  15970. var str = typeof value === 'string';
  15971. var arr = Array.isArray(value);
  15972. if (num) {
  15973. key = 'number';
  15974. } else if (str) {
  15975. key = 'string';
  15976. } else if (arr) {
  15977. key = 'array';
  15978. } // if the value is not of a supported type for range validation
  15979. // the validation rule rule should use the
  15980. // type property to also test for a particular type
  15981. if (!key) {
  15982. return false;
  15983. }
  15984. if (arr) {
  15985. val = value.length;
  15986. }
  15987. if (str) {
  15988. // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
  15989. val = value.replace(spRegexp, '_').length;
  15990. }
  15991. if (len) {
  15992. if (val !== rule.len) {
  15993. errors.push(format(options.messages[key].len, rule.fullField, rule.len));
  15994. }
  15995. } else if (min && !max && val < rule.min) {
  15996. errors.push(format(options.messages[key].min, rule.fullField, rule.min));
  15997. } else if (max && !min && val > rule.max) {
  15998. errors.push(format(options.messages[key].max, rule.fullField, rule.max));
  15999. } else if (min && max && (val < rule.min || val > rule.max)) {
  16000. errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
  16001. }
  16002. }
  16003. var ENUM = 'enum';
  16004. /**
  16005. * Rule for validating a value exists in an enumerable list.
  16006. *
  16007. * @param rule The validation rule.
  16008. * @param value The value of the field on the source object.
  16009. * @param source The source object being validated.
  16010. * @param errors An array of errors that this rule may add
  16011. * validation errors to.
  16012. * @param options The validation options.
  16013. * @param options.messages The validation messages.
  16014. */
  16015. function enumerable(rule, value, source, errors, options) {
  16016. rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
  16017. if (rule[ENUM].indexOf(value) === -1) {
  16018. errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
  16019. }
  16020. }
  16021. /**
  16022. * Rule for validating a regular expression pattern.
  16023. *
  16024. * @param rule The validation rule.
  16025. * @param value The value of the field on the source object.
  16026. * @param source The source object being validated.
  16027. * @param errors An array of errors that this rule may add
  16028. * validation errors to.
  16029. * @param options The validation options.
  16030. * @param options.messages The validation messages.
  16031. */
  16032. function pattern$1(rule, value, source, errors, options) {
  16033. if (rule.pattern) {
  16034. if (rule.pattern instanceof RegExp) {
  16035. // if a RegExp instance is passed, reset `lastIndex` in case its `global`
  16036. // flag is accidentally set to `true`, which in a validation scenario
  16037. // is not necessary and the result might be misleading
  16038. rule.pattern.lastIndex = 0;
  16039. if (!rule.pattern.test(value)) {
  16040. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  16041. }
  16042. } else if (typeof rule.pattern === 'string') {
  16043. var _pattern = new RegExp(rule.pattern);
  16044. if (!_pattern.test(value)) {
  16045. errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
  16046. }
  16047. }
  16048. }
  16049. }
  16050. var rules = {
  16051. required: required,
  16052. whitespace: whitespace,
  16053. type: type,
  16054. range: range,
  16055. "enum": enumerable,
  16056. pattern: pattern$1 };
  16057. /**
  16058. * Performs validation for string types.
  16059. *
  16060. * @param rule The validation rule.
  16061. * @param value The value of the field on the source object.
  16062. * @param callback The callback function.
  16063. * @param source The source object being validated.
  16064. * @param options The validation options.
  16065. * @param options.messages The validation messages.
  16066. */
  16067. function string(rule, value, callback, source, options) {
  16068. var errors = [];
  16069. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16070. if (validate) {
  16071. if (isEmptyValue(value, 'string') && !rule.required) {
  16072. return callback();
  16073. }
  16074. rules.required(rule, value, source, errors, options, 'string');
  16075. if (!isEmptyValue(value, 'string')) {
  16076. rules.type(rule, value, source, errors, options);
  16077. rules.range(rule, value, source, errors, options);
  16078. rules.pattern(rule, value, source, errors, options);
  16079. if (rule.whitespace === true) {
  16080. rules.whitespace(rule, value, source, errors, options);
  16081. }
  16082. }
  16083. }
  16084. callback(errors);
  16085. }
  16086. /**
  16087. * Validates a function.
  16088. *
  16089. * @param rule The validation rule.
  16090. * @param value The value of the field on the source object.
  16091. * @param callback The callback function.
  16092. * @param source The source object being validated.
  16093. * @param options The validation options.
  16094. * @param options.messages The validation messages.
  16095. */
  16096. function method(rule, value, callback, source, options) {
  16097. var errors = [];
  16098. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16099. if (validate) {
  16100. if (isEmptyValue(value) && !rule.required) {
  16101. return callback();
  16102. }
  16103. rules.required(rule, value, source, errors, options);
  16104. if (value !== undefined) {
  16105. rules.type(rule, value, source, errors, options);
  16106. }
  16107. }
  16108. callback(errors);
  16109. }
  16110. /**
  16111. * Validates a number.
  16112. *
  16113. * @param rule The validation rule.
  16114. * @param value The value of the field on the source object.
  16115. * @param callback The callback function.
  16116. * @param source The source object being validated.
  16117. * @param options The validation options.
  16118. * @param options.messages The validation messages.
  16119. */
  16120. function number(rule, value, callback, source, options) {
  16121. var errors = [];
  16122. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16123. if (validate) {
  16124. if (value === '') {
  16125. value = undefined;
  16126. }
  16127. if (isEmptyValue(value) && !rule.required) {
  16128. return callback();
  16129. }
  16130. rules.required(rule, value, source, errors, options);
  16131. if (value !== undefined) {
  16132. rules.type(rule, value, source, errors, options);
  16133. rules.range(rule, value, source, errors, options);
  16134. }
  16135. }
  16136. callback(errors);
  16137. }
  16138. /**
  16139. * Validates a boolean.
  16140. *
  16141. * @param rule The validation rule.
  16142. * @param value The value of the field on the source object.
  16143. * @param callback The callback function.
  16144. * @param source The source object being validated.
  16145. * @param options The validation options.
  16146. * @param options.messages The validation messages.
  16147. */
  16148. function _boolean(rule, value, callback, source, options) {
  16149. var errors = [];
  16150. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16151. if (validate) {
  16152. if (isEmptyValue(value) && !rule.required) {
  16153. return callback();
  16154. }
  16155. rules.required(rule, value, source, errors, options);
  16156. if (value !== undefined) {
  16157. rules.type(rule, value, source, errors, options);
  16158. }
  16159. }
  16160. callback(errors);
  16161. }
  16162. /**
  16163. * Validates the regular expression type.
  16164. *
  16165. * @param rule The validation rule.
  16166. * @param value The value of the field on the source object.
  16167. * @param callback The callback function.
  16168. * @param source The source object being validated.
  16169. * @param options The validation options.
  16170. * @param options.messages The validation messages.
  16171. */
  16172. function regexp(rule, value, callback, source, options) {
  16173. var errors = [];
  16174. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16175. if (validate) {
  16176. if (isEmptyValue(value) && !rule.required) {
  16177. return callback();
  16178. }
  16179. rules.required(rule, value, source, errors, options);
  16180. if (!isEmptyValue(value)) {
  16181. rules.type(rule, value, source, errors, options);
  16182. }
  16183. }
  16184. callback(errors);
  16185. }
  16186. /**
  16187. * Validates a number is an integer.
  16188. *
  16189. * @param rule The validation rule.
  16190. * @param value The value of the field on the source object.
  16191. * @param callback The callback function.
  16192. * @param source The source object being validated.
  16193. * @param options The validation options.
  16194. * @param options.messages The validation messages.
  16195. */
  16196. function integer(rule, value, callback, source, options) {
  16197. var errors = [];
  16198. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16199. if (validate) {
  16200. if (isEmptyValue(value) && !rule.required) {
  16201. return callback();
  16202. }
  16203. rules.required(rule, value, source, errors, options);
  16204. if (value !== undefined) {
  16205. rules.type(rule, value, source, errors, options);
  16206. rules.range(rule, value, source, errors, options);
  16207. }
  16208. }
  16209. callback(errors);
  16210. }
  16211. /**
  16212. * Validates a number is a floating point number.
  16213. *
  16214. * @param rule The validation rule.
  16215. * @param value The value of the field on the source object.
  16216. * @param callback The callback function.
  16217. * @param source The source object being validated.
  16218. * @param options The validation options.
  16219. * @param options.messages The validation messages.
  16220. */
  16221. function floatFn(rule, value, callback, source, options) {
  16222. var errors = [];
  16223. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16224. if (validate) {
  16225. if (isEmptyValue(value) && !rule.required) {
  16226. return callback();
  16227. }
  16228. rules.required(rule, value, source, errors, options);
  16229. if (value !== undefined) {
  16230. rules.type(rule, value, source, errors, options);
  16231. rules.range(rule, value, source, errors, options);
  16232. }
  16233. }
  16234. callback(errors);
  16235. }
  16236. /**
  16237. * Validates an array.
  16238. *
  16239. * @param rule The validation rule.
  16240. * @param value The value of the field on the source object.
  16241. * @param callback The callback function.
  16242. * @param source The source object being validated.
  16243. * @param options The validation options.
  16244. * @param options.messages The validation messages.
  16245. */
  16246. function array(rule, value, callback, source, options) {
  16247. var errors = [];
  16248. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16249. if (validate) {
  16250. if (isEmptyValue(value, 'array') && !rule.required) {
  16251. return callback();
  16252. }
  16253. rules.required(rule, value, source, errors, options, 'array');
  16254. if (!isEmptyValue(value, 'array')) {
  16255. rules.type(rule, value, source, errors, options);
  16256. rules.range(rule, value, source, errors, options);
  16257. }
  16258. }
  16259. callback(errors);
  16260. }
  16261. /**
  16262. * Validates an object.
  16263. *
  16264. * @param rule The validation rule.
  16265. * @param value The value of the field on the source object.
  16266. * @param callback The callback function.
  16267. * @param source The source object being validated.
  16268. * @param options The validation options.
  16269. * @param options.messages The validation messages.
  16270. */
  16271. function object(rule, value, callback, source, options) {
  16272. var errors = [];
  16273. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16274. if (validate) {
  16275. if (isEmptyValue(value) && !rule.required) {
  16276. return callback();
  16277. }
  16278. rules.required(rule, value, source, errors, options);
  16279. if (value !== undefined) {
  16280. rules.type(rule, value, source, errors, options);
  16281. }
  16282. }
  16283. callback(errors);
  16284. }
  16285. var ENUM$1 = 'enum';
  16286. /**
  16287. * Validates an enumerable list.
  16288. *
  16289. * @param rule The validation rule.
  16290. * @param value The value of the field on the source object.
  16291. * @param callback The callback function.
  16292. * @param source The source object being validated.
  16293. * @param options The validation options.
  16294. * @param options.messages The validation messages.
  16295. */
  16296. function enumerable$1(rule, value, callback, source, options) {
  16297. var errors = [];
  16298. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16299. if (validate) {
  16300. if (isEmptyValue(value) && !rule.required) {
  16301. return callback();
  16302. }
  16303. rules.required(rule, value, source, errors, options);
  16304. if (value !== undefined) {
  16305. rules[ENUM$1](rule, value, source, errors, options);
  16306. }
  16307. }
  16308. callback(errors);
  16309. }
  16310. /**
  16311. * Validates a regular expression pattern.
  16312. *
  16313. * Performs validation when a rule only contains
  16314. * a pattern property but is not declared as a string type.
  16315. *
  16316. * @param rule The validation rule.
  16317. * @param value The value of the field on the source object.
  16318. * @param callback The callback function.
  16319. * @param source The source object being validated.
  16320. * @param options The validation options.
  16321. * @param options.messages The validation messages.
  16322. */
  16323. function pattern$2(rule, value, callback, source, options) {
  16324. var errors = [];
  16325. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16326. if (validate) {
  16327. if (isEmptyValue(value, 'string') && !rule.required) {
  16328. return callback();
  16329. }
  16330. rules.required(rule, value, source, errors, options);
  16331. if (!isEmptyValue(value, 'string')) {
  16332. rules.pattern(rule, value, source, errors, options);
  16333. }
  16334. }
  16335. callback(errors);
  16336. }
  16337. function date(rule, value, callback, source, options) {
  16338. var errors = [];
  16339. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16340. if (validate) {
  16341. if (isEmptyValue(value) && !rule.required) {
  16342. return callback();
  16343. }
  16344. rules.required(rule, value, source, errors, options);
  16345. if (!isEmptyValue(value)) {
  16346. var dateObject;
  16347. if (typeof value === 'number') {
  16348. dateObject = new Date(value);
  16349. } else {
  16350. dateObject = value;
  16351. }
  16352. rules.type(rule, dateObject, source, errors, options);
  16353. if (dateObject) {
  16354. rules.range(rule, dateObject.getTime(), source, errors, options);
  16355. }
  16356. }
  16357. }
  16358. callback(errors);
  16359. }
  16360. function required$1(rule, value, callback, source, options) {
  16361. var errors = [];
  16362. var type = Array.isArray(value) ? 'array' : typeof value;
  16363. rules.required(rule, value, source, errors, options, type);
  16364. callback(errors);
  16365. }
  16366. function type$1(rule, value, callback, source, options) {
  16367. var ruleType = rule.type;
  16368. var errors = [];
  16369. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16370. if (validate) {
  16371. if (isEmptyValue(value, ruleType) && !rule.required) {
  16372. return callback();
  16373. }
  16374. rules.required(rule, value, source, errors, options, ruleType);
  16375. if (!isEmptyValue(value, ruleType)) {
  16376. rules.type(rule, value, source, errors, options);
  16377. }
  16378. }
  16379. callback(errors);
  16380. }
  16381. /**
  16382. * Performs validation for any type.
  16383. *
  16384. * @param rule The validation rule.
  16385. * @param value The value of the field on the source object.
  16386. * @param callback The callback function.
  16387. * @param source The source object being validated.
  16388. * @param options The validation options.
  16389. * @param options.messages The validation messages.
  16390. */
  16391. function any(rule, value, callback, source, options) {
  16392. var errors = [];
  16393. var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
  16394. if (validate) {
  16395. if (isEmptyValue(value) && !rule.required) {
  16396. return callback();
  16397. }
  16398. rules.required(rule, value, source, errors, options);
  16399. }
  16400. callback(errors);
  16401. }
  16402. var validators = {
  16403. string: string,
  16404. method: method,
  16405. number: number,
  16406. "boolean": _boolean,
  16407. regexp: regexp,
  16408. integer: integer,
  16409. "float": floatFn,
  16410. array: array,
  16411. object: object,
  16412. "enum": enumerable$1,
  16413. pattern: pattern$2,
  16414. date: date,
  16415. url: type$1,
  16416. hex: type$1,
  16417. email: type$1,
  16418. required: required$1,
  16419. any: any };
  16420. function newMessages() {
  16421. return {
  16422. "default": 'Validation error on field %s',
  16423. required: '%s is required',
  16424. "enum": '%s must be one of %s',
  16425. whitespace: '%s cannot be empty',
  16426. date: {
  16427. format: '%s date %s is invalid for format %s',
  16428. parse: '%s date could not be parsed, %s is invalid ',
  16429. invalid: '%s date %s is invalid' },
  16430. types: {
  16431. string: '%s is not a %s',
  16432. method: '%s is not a %s (function)',
  16433. array: '%s is not an %s',
  16434. object: '%s is not an %s',
  16435. number: '%s is not a %s',
  16436. date: '%s is not a %s',
  16437. "boolean": '%s is not a %s',
  16438. integer: '%s is not an %s',
  16439. "float": '%s is not a %s',
  16440. regexp: '%s is not a valid %s',
  16441. email: '%s is not a valid %s',
  16442. url: '%s is not a valid %s',
  16443. hex: '%s is not a valid %s' },
  16444. string: {
  16445. len: '%s must be exactly %s characters',
  16446. min: '%s must be at least %s characters',
  16447. max: '%s cannot be longer than %s characters',
  16448. range: '%s must be between %s and %s characters' },
  16449. number: {
  16450. len: '%s must equal %s',
  16451. min: '%s cannot be less than %s',
  16452. max: '%s cannot be greater than %s',
  16453. range: '%s must be between %s and %s' },
  16454. array: {
  16455. len: '%s must be exactly %s in length',
  16456. min: '%s cannot be less than %s in length',
  16457. max: '%s cannot be greater than %s in length',
  16458. range: '%s must be between %s and %s in length' },
  16459. pattern: {
  16460. mismatch: '%s value %s does not match pattern %s' },
  16461. clone: function clone() {
  16462. var cloned = JSON.parse(JSON.stringify(this));
  16463. cloned.clone = this.clone;
  16464. return cloned;
  16465. } };
  16466. }
  16467. var messages = newMessages();
  16468. /**
  16469. * Encapsulates a validation schema.
  16470. *
  16471. * @param descriptor An object declaring validation rules
  16472. * for this schema.
  16473. */
  16474. function Schema(descriptor) {
  16475. this.rules = null;
  16476. this._messages = messages;
  16477. this.define(descriptor);
  16478. }
  16479. Schema.prototype = {
  16480. messages: function messages(_messages) {
  16481. if (_messages) {
  16482. this._messages = deepMerge(newMessages(), _messages);
  16483. }
  16484. return this._messages;
  16485. },
  16486. define: function define(rules) {
  16487. if (!rules) {
  16488. throw new Error('Cannot configure a schema with no rules');
  16489. }
  16490. if (typeof rules !== 'object' || Array.isArray(rules)) {
  16491. throw new Error('Rules must be an object');
  16492. }
  16493. this.rules = {};
  16494. var z;
  16495. var item;
  16496. for (z in rules) {
  16497. if (rules.hasOwnProperty(z)) {
  16498. item = rules[z];
  16499. this.rules[z] = Array.isArray(item) ? item : [item];
  16500. }
  16501. }
  16502. },
  16503. validate: function validate(source_, o, oc) {
  16504. var _this = this;
  16505. if (o === void 0) {
  16506. o = {};
  16507. }
  16508. if (oc === void 0) {
  16509. oc = function oc() {};
  16510. }
  16511. var source = source_;
  16512. var options = o;
  16513. var callback = oc;
  16514. if (typeof options === 'function') {
  16515. callback = options;
  16516. options = {};
  16517. }
  16518. if (!this.rules || Object.keys(this.rules).length === 0) {
  16519. if (callback) {
  16520. callback();
  16521. }
  16522. return Promise.resolve();
  16523. }
  16524. function complete(results) {
  16525. var i;
  16526. var errors = [];
  16527. var fields = {};
  16528. function add(e) {
  16529. if (Array.isArray(e)) {
  16530. var _errors;
  16531. errors = (_errors = errors).concat.apply(_errors, e);
  16532. } else {
  16533. errors.push(e);
  16534. }
  16535. }
  16536. for (i = 0; i < results.length; i++) {
  16537. add(results[i]);
  16538. }
  16539. if (!errors.length) {
  16540. errors = null;
  16541. fields = null;
  16542. } else {
  16543. fields = convertFieldsError(errors);
  16544. }
  16545. callback(errors, fields);
  16546. }
  16547. if (options.messages) {
  16548. var messages$1 = this.messages();
  16549. if (messages$1 === messages) {
  16550. messages$1 = newMessages();
  16551. }
  16552. deepMerge(messages$1, options.messages);
  16553. options.messages = messages$1;
  16554. } else {
  16555. options.messages = this.messages();
  16556. }
  16557. var arr;
  16558. var value;
  16559. var series = {};
  16560. var keys = options.keys || Object.keys(this.rules);
  16561. keys.forEach(function (z) {
  16562. arr = _this.rules[z];
  16563. value = source[z];
  16564. arr.forEach(function (r) {
  16565. var rule = r;
  16566. if (typeof rule.transform === 'function') {
  16567. if (source === source_) {
  16568. source = _extends({}, source);
  16569. }
  16570. value = source[z] = rule.transform(value);
  16571. }
  16572. if (typeof rule === 'function') {
  16573. rule = {
  16574. validator: rule };
  16575. } else {
  16576. rule = _extends({}, rule);
  16577. }
  16578. rule.validator = _this.getValidationMethod(rule);
  16579. rule.field = z;
  16580. rule.fullField = rule.fullField || z;
  16581. rule.type = _this.getType(rule);
  16582. if (!rule.validator) {
  16583. return;
  16584. }
  16585. series[z] = series[z] || [];
  16586. series[z].push({
  16587. rule: rule,
  16588. value: value,
  16589. source: source,
  16590. field: z });
  16591. });
  16592. });
  16593. var errorFields = {};
  16594. return asyncMap(series, options, function (data, doIt) {
  16595. var rule = data.rule;
  16596. var deep = (rule.type === 'object' || rule.type === 'array') && (typeof rule.fields === 'object' || typeof rule.defaultField ===
  16597. 'object');
  16598. deep = deep && (rule.required || !rule.required && data.value);
  16599. rule.field = data.field;
  16600. function addFullfield(key, schema) {
  16601. return _extends({}, schema, {
  16602. fullField: rule.fullField + "." + key });
  16603. }
  16604. function cb(e) {
  16605. if (e === void 0) {
  16606. e = [];
  16607. }
  16608. var errors = e;
  16609. if (!Array.isArray(errors)) {
  16610. errors = [errors];
  16611. }
  16612. if (!options.suppressWarning && errors.length) {
  16613. Schema.warning('async-validator:', errors);
  16614. }
  16615. if (errors.length && rule.message) {
  16616. errors = [].concat(rule.message);
  16617. }
  16618. errors = errors.map(complementError(rule));
  16619. if (options.first && errors.length) {
  16620. errorFields[rule.field] = 1;
  16621. return doIt(errors);
  16622. }
  16623. if (!deep) {
  16624. doIt(errors);
  16625. } else {
  16626. // if rule is required but the target object
  16627. // does not exist fail at the rule level and don't
  16628. // go deeper
  16629. if (rule.required && !data.value) {
  16630. if (rule.message) {
  16631. errors = [].concat(rule.message).map(complementError(rule));
  16632. } else if (options.error) {
  16633. errors = [options.error(rule, format(options.messages.required, rule.field))];
  16634. } else {
  16635. errors = [];
  16636. }
  16637. return doIt(errors);
  16638. }
  16639. var fieldsSchema = {};
  16640. if (rule.defaultField) {
  16641. for (var k in data.value) {
  16642. if (data.value.hasOwnProperty(k)) {
  16643. fieldsSchema[k] = rule.defaultField;
  16644. }
  16645. }
  16646. }
  16647. fieldsSchema = _extends({}, fieldsSchema, {}, data.rule.fields);
  16648. for (var f in fieldsSchema) {
  16649. if (fieldsSchema.hasOwnProperty(f)) {
  16650. var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
  16651. fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
  16652. }
  16653. }
  16654. var schema = new Schema(fieldsSchema);
  16655. schema.messages(options.messages);
  16656. if (data.rule.options) {
  16657. data.rule.options.messages = options.messages;
  16658. data.rule.options.error = options.error;
  16659. }
  16660. schema.validate(data.value, data.rule.options || options, function (errs) {
  16661. var finalErrors = [];
  16662. if (errors && errors.length) {
  16663. finalErrors.push.apply(finalErrors, errors);
  16664. }
  16665. if (errs && errs.length) {
  16666. finalErrors.push.apply(finalErrors, errs);
  16667. }
  16668. doIt(finalErrors.length ? finalErrors : null);
  16669. });
  16670. }
  16671. }
  16672. var res;
  16673. if (rule.asyncValidator) {
  16674. res = rule.asyncValidator(rule, data.value, cb, data.source, options);
  16675. } else if (rule.validator) {
  16676. res = rule.validator(rule, data.value, cb, data.source, options);
  16677. if (res === true) {
  16678. cb();
  16679. } else if (res === false) {
  16680. cb(rule.message || rule.field + " fails");
  16681. } else if (res instanceof Array) {
  16682. cb(res);
  16683. } else if (res instanceof Error) {
  16684. cb(res.message);
  16685. }
  16686. }
  16687. if (res && res.then) {
  16688. res.then(function () {
  16689. return cb();
  16690. }, function (e) {
  16691. return cb(e);
  16692. });
  16693. }
  16694. }, function (results) {
  16695. complete(results);
  16696. });
  16697. },
  16698. getType: function getType(rule) {
  16699. if (rule.type === undefined && rule.pattern instanceof RegExp) {
  16700. rule.type = 'pattern';
  16701. }
  16702. if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
  16703. throw new Error(format('Unknown rule type %s', rule.type));
  16704. }
  16705. return rule.type || 'string';
  16706. },
  16707. getValidationMethod: function getValidationMethod(rule) {
  16708. if (typeof rule.validator === 'function') {
  16709. return rule.validator;
  16710. }
  16711. var keys = Object.keys(rule);
  16712. var messageIndex = keys.indexOf('message');
  16713. if (messageIndex !== -1) {
  16714. keys.splice(messageIndex, 1);
  16715. }
  16716. if (keys.length === 1 && keys[0] === 'required') {
  16717. return validators.required;
  16718. }
  16719. return validators[this.getType(rule)] || false;
  16720. } };
  16721. Schema.register = function register(type, validator) {
  16722. if (typeof validator !== 'function') {
  16723. throw new Error('Cannot register a validator by type, validator is not a function');
  16724. }
  16725. validators[type] = validator;
  16726. };
  16727. Schema.warning = warning;
  16728. Schema.messages = messages;var _default =
  16729. Schema;exports.default = _default;
  16730. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/node-libs-browser/mock/process.js */ 537)))
  16731. /***/ }),
  16732. /***/ 537:
  16733. /*!********************************************************!*\
  16734. !*** ./node_modules/node-libs-browser/mock/process.js ***!
  16735. \********************************************************/
  16736. /*! no static exports found */
  16737. /***/ (function(module, exports, __webpack_require__) {
  16738. exports.nextTick = function nextTick(fn) {
  16739. var args = Array.prototype.slice.call(arguments);
  16740. args.shift();
  16741. setTimeout(function () {
  16742. fn.apply(null, args);
  16743. }, 0);
  16744. };
  16745. exports.platform = exports.arch =
  16746. exports.execPath = exports.title = 'browser';
  16747. exports.pid = 1;
  16748. exports.browser = true;
  16749. exports.env = {};
  16750. exports.argv = [];
  16751. exports.binding = function (name) {
  16752. throw new Error('No such module. (Possibly not yet loaded)')
  16753. };
  16754. (function () {
  16755. var cwd = '/';
  16756. var path;
  16757. exports.cwd = function () { return cwd };
  16758. exports.chdir = function (dir) {
  16759. if (!path) path = __webpack_require__(/*! path */ 538);
  16760. cwd = path.resolve(dir, cwd);
  16761. };
  16762. })();
  16763. exports.exit = exports.kill =
  16764. exports.umask = exports.dlopen =
  16765. exports.uptime = exports.memoryUsage =
  16766. exports.uvCounters = function() {};
  16767. exports.features = {};
  16768. /***/ }),
  16769. /***/ 538:
  16770. /*!***********************************************!*\
  16771. !*** ./node_modules/path-browserify/index.js ***!
  16772. \***********************************************/
  16773. /*! no static exports found */
  16774. /***/ (function(module, exports, __webpack_require__) {
  16775. /* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
  16776. // backported and transplited with Babel, with backwards-compat fixes
  16777. // Copyright Joyent, Inc. and other Node contributors.
  16778. //
  16779. // Permission is hereby granted, free of charge, to any person obtaining a
  16780. // copy of this software and associated documentation files (the
  16781. // "Software"), to deal in the Software without restriction, including
  16782. // without limitation the rights to use, copy, modify, merge, publish,
  16783. // distribute, sublicense, and/or sell copies of the Software, and to permit
  16784. // persons to whom the Software is furnished to do so, subject to the
  16785. // following conditions:
  16786. //
  16787. // The above copyright notice and this permission notice shall be included
  16788. // in all copies or substantial portions of the Software.
  16789. //
  16790. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  16791. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  16792. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  16793. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  16794. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  16795. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  16796. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  16797. // resolves . and .. elements in a path array with directory names there
  16798. // must be no slashes, empty elements, or device names (c:\) in the array
  16799. // (so also no leading and trailing slashes - it does not distinguish
  16800. // relative and absolute paths)
  16801. function normalizeArray(parts, allowAboveRoot) {
  16802. // if the path tries to go above the root, `up` ends up > 0
  16803. var up = 0;
  16804. for (var i = parts.length - 1; i >= 0; i--) {
  16805. var last = parts[i];
  16806. if (last === '.') {
  16807. parts.splice(i, 1);
  16808. } else if (last === '..') {
  16809. parts.splice(i, 1);
  16810. up++;
  16811. } else if (up) {
  16812. parts.splice(i, 1);
  16813. up--;
  16814. }
  16815. }
  16816. // if the path is allowed to go above the root, restore leading ..s
  16817. if (allowAboveRoot) {
  16818. for (; up--; up) {
  16819. parts.unshift('..');
  16820. }
  16821. }
  16822. return parts;
  16823. }
  16824. // path.resolve([from ...], to)
  16825. // posix version
  16826. exports.resolve = function() {
  16827. var resolvedPath = '',
  16828. resolvedAbsolute = false;
  16829. for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
  16830. var path = (i >= 0) ? arguments[i] : process.cwd();
  16831. // Skip empty and invalid entries
  16832. if (typeof path !== 'string') {
  16833. throw new TypeError('Arguments to path.resolve must be strings');
  16834. } else if (!path) {
  16835. continue;
  16836. }
  16837. resolvedPath = path + '/' + resolvedPath;
  16838. resolvedAbsolute = path.charAt(0) === '/';
  16839. }
  16840. // At this point the path should be resolved to a full absolute path, but
  16841. // handle relative paths to be safe (might happen when process.cwd() fails)
  16842. // Normalize the path
  16843. resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
  16844. return !!p;
  16845. }), !resolvedAbsolute).join('/');
  16846. return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
  16847. };
  16848. // path.normalize(path)
  16849. // posix version
  16850. exports.normalize = function(path) {
  16851. var isAbsolute = exports.isAbsolute(path),
  16852. trailingSlash = substr(path, -1) === '/';
  16853. // Normalize the path
  16854. path = normalizeArray(filter(path.split('/'), function(p) {
  16855. return !!p;
  16856. }), !isAbsolute).join('/');
  16857. if (!path && !isAbsolute) {
  16858. path = '.';
  16859. }
  16860. if (path && trailingSlash) {
  16861. path += '/';
  16862. }
  16863. return (isAbsolute ? '/' : '') + path;
  16864. };
  16865. // posix version
  16866. exports.isAbsolute = function(path) {
  16867. return path.charAt(0) === '/';
  16868. };
  16869. // posix version
  16870. exports.join = function() {
  16871. var paths = Array.prototype.slice.call(arguments, 0);
  16872. return exports.normalize(filter(paths, function(p, index) {
  16873. if (typeof p !== 'string') {
  16874. throw new TypeError('Arguments to path.join must be strings');
  16875. }
  16876. return p;
  16877. }).join('/'));
  16878. };
  16879. // path.relative(from, to)
  16880. // posix version
  16881. exports.relative = function(from, to) {
  16882. from = exports.resolve(from).substr(1);
  16883. to = exports.resolve(to).substr(1);
  16884. function trim(arr) {
  16885. var start = 0;
  16886. for (; start < arr.length; start++) {
  16887. if (arr[start] !== '') break;
  16888. }
  16889. var end = arr.length - 1;
  16890. for (; end >= 0; end--) {
  16891. if (arr[end] !== '') break;
  16892. }
  16893. if (start > end) return [];
  16894. return arr.slice(start, end - start + 1);
  16895. }
  16896. var fromParts = trim(from.split('/'));
  16897. var toParts = trim(to.split('/'));
  16898. var length = Math.min(fromParts.length, toParts.length);
  16899. var samePartsLength = length;
  16900. for (var i = 0; i < length; i++) {
  16901. if (fromParts[i] !== toParts[i]) {
  16902. samePartsLength = i;
  16903. break;
  16904. }
  16905. }
  16906. var outputParts = [];
  16907. for (var i = samePartsLength; i < fromParts.length; i++) {
  16908. outputParts.push('..');
  16909. }
  16910. outputParts = outputParts.concat(toParts.slice(samePartsLength));
  16911. return outputParts.join('/');
  16912. };
  16913. exports.sep = '/';
  16914. exports.delimiter = ':';
  16915. exports.dirname = function (path) {
  16916. if (typeof path !== 'string') path = path + '';
  16917. if (path.length === 0) return '.';
  16918. var code = path.charCodeAt(0);
  16919. var hasRoot = code === 47 /*/*/;
  16920. var end = -1;
  16921. var matchedSlash = true;
  16922. for (var i = path.length - 1; i >= 1; --i) {
  16923. code = path.charCodeAt(i);
  16924. if (code === 47 /*/*/) {
  16925. if (!matchedSlash) {
  16926. end = i;
  16927. break;
  16928. }
  16929. } else {
  16930. // We saw the first non-path separator
  16931. matchedSlash = false;
  16932. }
  16933. }
  16934. if (end === -1) return hasRoot ? '/' : '.';
  16935. if (hasRoot && end === 1) {
  16936. // return '//';
  16937. // Backwards-compat fix:
  16938. return '/';
  16939. }
  16940. return path.slice(0, end);
  16941. };
  16942. function basename(path) {
  16943. if (typeof path !== 'string') path = path + '';
  16944. var start = 0;
  16945. var end = -1;
  16946. var matchedSlash = true;
  16947. var i;
  16948. for (i = path.length - 1; i >= 0; --i) {
  16949. if (path.charCodeAt(i) === 47 /*/*/) {
  16950. // If we reached a path separator that was not part of a set of path
  16951. // separators at the end of the string, stop now
  16952. if (!matchedSlash) {
  16953. start = i + 1;
  16954. break;
  16955. }
  16956. } else if (end === -1) {
  16957. // We saw the first non-path separator, mark this as the end of our
  16958. // path component
  16959. matchedSlash = false;
  16960. end = i + 1;
  16961. }
  16962. }
  16963. if (end === -1) return '';
  16964. return path.slice(start, end);
  16965. }
  16966. // Uses a mixed approach for backwards-compatibility, as ext behavior changed
  16967. // in new Node.js versions, so only basename() above is backported here
  16968. exports.basename = function (path, ext) {
  16969. var f = basename(path);
  16970. if (ext && f.substr(-1 * ext.length) === ext) {
  16971. f = f.substr(0, f.length - ext.length);
  16972. }
  16973. return f;
  16974. };
  16975. exports.extname = function (path) {
  16976. if (typeof path !== 'string') path = path + '';
  16977. var startDot = -1;
  16978. var startPart = 0;
  16979. var end = -1;
  16980. var matchedSlash = true;
  16981. // Track the state of characters (if any) we see before our first dot and
  16982. // after any path separator we find
  16983. var preDotState = 0;
  16984. for (var i = path.length - 1; i >= 0; --i) {
  16985. var code = path.charCodeAt(i);
  16986. if (code === 47 /*/*/) {
  16987. // If we reached a path separator that was not part of a set of path
  16988. // separators at the end of the string, stop now
  16989. if (!matchedSlash) {
  16990. startPart = i + 1;
  16991. break;
  16992. }
  16993. continue;
  16994. }
  16995. if (end === -1) {
  16996. // We saw the first non-path separator, mark this as the end of our
  16997. // extension
  16998. matchedSlash = false;
  16999. end = i + 1;
  17000. }
  17001. if (code === 46 /*.*/) {
  17002. // If this is our first dot, mark it as the start of our extension
  17003. if (startDot === -1)
  17004. startDot = i;
  17005. else if (preDotState !== 1)
  17006. preDotState = 1;
  17007. } else if (startDot !== -1) {
  17008. // We saw a non-dot and non-path separator before our dot, so we should
  17009. // have a good chance at having a non-empty extension
  17010. preDotState = -1;
  17011. }
  17012. }
  17013. if (startDot === -1 || end === -1 ||
  17014. // We saw a non-dot character immediately before the dot
  17015. preDotState === 0 ||
  17016. // The (right-most) trimmed path component is exactly '..'
  17017. preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
  17018. return '';
  17019. }
  17020. return path.slice(startDot, end);
  17021. };
  17022. function filter (xs, f) {
  17023. if (xs.filter) return xs.filter(f);
  17024. var res = [];
  17025. for (var i = 0; i < xs.length; i++) {
  17026. if (f(xs[i], i, xs)) res.push(xs[i]);
  17027. }
  17028. return res;
  17029. }
  17030. // String.prototype.substr - negative index don't work in IE8
  17031. var substr = 'ab'.substr(-1) === 'b'
  17032. ? function (str, start, len) { return str.substr(start, len) }
  17033. : function (str, start, len) {
  17034. if (start < 0) start = str.length + start;
  17035. return str.substr(start, len);
  17036. }
  17037. ;
  17038. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ 537)))
  17039. /***/ }),
  17040. /***/ 54:
  17041. /*!********************************************!*\
  17042. !*** G:/gsxm/git/yangdaxia/api/product.js ***!
  17043. \********************************************/
  17044. /*! no static exports found */
  17045. /***/ (function(module, exports, __webpack_require__) {
  17046. "use strict";
  17047. Object.defineProperty(exports, "__esModule", { value: true });exports.getProducts = getProducts;exports.goodsDetail = goodsDetail;exports.getBargainList = getBargainList;exports.cartAdd = cartAdd;exports.collectAdd = collectAdd;exports.collectDel = collectDel;exports.searchKeyword = searchKeyword;exports.groomList = groomList;exports.seckillGoods = seckillGoods;exports.groupGoods = groupGoods;exports.getCategoryList = getCategoryList;exports.getCombinationList = getCombinationList;exports.getCombinationLisRemove = getCombinationLisRemove;exports.getCombinationLisPink = getCombinationLisPink;exports.getCombinationPoster = getCombinationPoster;exports.getSeckillClass = getSeckillClass;exports.getSeckillList = getSeckillList;exports.reply_config = reply_config;exports.reply_list = reply_list;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 50));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  17048. // 获取商品列表
  17049. function getProducts(data) {
  17050. // {
  17051. // 参数名称 是否必须 示例 备注
  17052. // sid 否 二级分类编号
  17053. // cid 否 一级分类编号(!)
  17054. // keyword 否 搜索
  17055. // priceOrder 否 价格排序
  17056. // salesOrder 否 销量排序
  17057. // news 否 是否新品
  17058. // page 否 分页参数起始值
  17059. // limit 否 分页数步长值
  17060. // }
  17061. return (0, _request.default)({
  17062. url: '/api/products',
  17063. method: 'get',
  17064. data: data });
  17065. }
  17066. // 获取商品详情
  17067. function goodsDetail(data, id) {
  17068. return (0, _request.default)({
  17069. url: '/api/product/detail/' + id,
  17070. method: 'get',
  17071. data: data });
  17072. }
  17073. // 砍价列表
  17074. function getBargainList(data) {
  17075. return (0, _request.default)({
  17076. url: '/api/bargain/list',
  17077. method: 'get',
  17078. data: data });
  17079. }
  17080. // 加入购物车
  17081. function cartAdd(data) {
  17082. return (0, _request.default)({
  17083. url: '/api/cart/add',
  17084. method: 'post',
  17085. data: data });
  17086. }
  17087. // 收藏商品
  17088. function collectAdd(data) {
  17089. return (0, _request.default)({
  17090. url: '/api/collect/add',
  17091. method: 'post',
  17092. data: data });
  17093. }
  17094. // 取消收藏商品
  17095. function collectDel(data) {
  17096. return (0, _request.default)({
  17097. url: '/api/collect/del',
  17098. method: 'post',
  17099. data: data });
  17100. }
  17101. // 获取搜搜关键字
  17102. function searchKeyword(data) {
  17103. return (0, _request.default)({
  17104. url: '/api/search/keyword',
  17105. method: 'get',
  17106. data: data });
  17107. }
  17108. // 获取热门分类信息
  17109. function groomList(data, type) {
  17110. // 获取产品类型 1 精品推荐 2 热门榜单 3首发新品 4促销单品
  17111. return (0, _request.default)({
  17112. url: '/api/groom/list/' + type,
  17113. method: 'get',
  17114. data: data });
  17115. }
  17116. // 获取秒杀商品详细
  17117. function seckillGoods(data, id) {
  17118. return (0, _request.default)({
  17119. url: '/api/seckill/detail/' + id,
  17120. method: 'get',
  17121. data: data });
  17122. }
  17123. // 获取拼团商品详细
  17124. function groupGoods(data, id) {
  17125. return (0, _request.default)({
  17126. url: '/api/combination/detail/' + id,
  17127. method: 'get',
  17128. data: data });
  17129. }
  17130. // 获取商品分类
  17131. function getCategoryList(data) {
  17132. return (0, _request.default)({
  17133. url: '/api/category',
  17134. method: 'get',
  17135. data: data });
  17136. }
  17137. // 获取拼团列表
  17138. function getCombinationList(data) {
  17139. return (0, _request.default)({
  17140. url: '/api/combination/list',
  17141. method: 'get',
  17142. data: data });
  17143. }
  17144. //取消拼团
  17145. function getCombinationLisRemove(data, id) {
  17146. return (0, _request.default)({
  17147. url: '/api/combination/remove' + id,
  17148. method: 'get',
  17149. data: data });
  17150. }
  17151. //拼团开团页面数据
  17152. function getCombinationLisPink(data, id) {
  17153. return (0, _request.default)({
  17154. url: '/api/combination/pink/' + id,
  17155. method: 'get',
  17156. data: data });
  17157. }
  17158. // 获取拼团海报
  17159. function getCombinationPoster(data) {
  17160. return (0, _request.default)({
  17161. url: '/api/combination/poster',
  17162. method: 'post',
  17163. data: data });
  17164. }
  17165. // 获取秒杀分类
  17166. function getSeckillClass(data) {
  17167. return (0, _request.default)({
  17168. url: '/api/seckill/index',
  17169. method: 'get',
  17170. data: data });
  17171. }
  17172. // 获取秒杀列表
  17173. function getSeckillList(data, id) {
  17174. return (0, _request.default)({
  17175. url: '/api/seckill/list/' + id,
  17176. method: 'get',
  17177. data: data });
  17178. }
  17179. // 产品评价数量和好评度
  17180. function reply_config(data, id) {
  17181. return (0, _request.default)({
  17182. url: '/api/reply/config/' + id,
  17183. method: 'get',
  17184. data: data });
  17185. }
  17186. // 获取产品评论
  17187. function reply_list(data, id) {
  17188. return (0, _request.default)({
  17189. url: '/api/reply/list/' + id,
  17190. method: 'get',
  17191. data: data });
  17192. }
  17193. /***/ }),
  17194. /***/ 6:
  17195. /*!********************************************!*\
  17196. !*** ./node_modules/vuex/dist/vuex.esm.js ***!
  17197. \********************************************/
  17198. /*! exports provided: default, Store, createNamespacedHelpers, install, mapActions, mapGetters, mapMutations, mapState */
  17199. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  17200. "use strict";
  17201. __webpack_require__.r(__webpack_exports__);
  17202. /* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Store", function() { return Store; });
  17203. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNamespacedHelpers", function() { return createNamespacedHelpers; });
  17204. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; });
  17205. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return mapActions; });
  17206. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapGetters", function() { return mapGetters; });
  17207. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapMutations", function() { return mapMutations; });
  17208. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapState", function() { return mapState; });
  17209. /*!
  17210. * vuex v3.4.0
  17211. * (c) 2020 Evan You
  17212. * @license MIT
  17213. */
  17214. function applyMixin (Vue) {
  17215. var version = Number(Vue.version.split('.')[0]);
  17216. if (version >= 2) {
  17217. Vue.mixin({ beforeCreate: vuexInit });
  17218. } else {
  17219. // override init and inject vuex init procedure
  17220. // for 1.x backwards compatibility.
  17221. var _init = Vue.prototype._init;
  17222. Vue.prototype._init = function (options) {
  17223. if ( options === void 0 ) options = {};
  17224. options.init = options.init
  17225. ? [vuexInit].concat(options.init)
  17226. : vuexInit;
  17227. _init.call(this, options);
  17228. };
  17229. }
  17230. /**
  17231. * Vuex init hook, injected into each instances init hooks list.
  17232. */
  17233. function vuexInit () {
  17234. var options = this.$options;
  17235. // store injection
  17236. if (options.store) {
  17237. this.$store = typeof options.store === 'function'
  17238. ? options.store()
  17239. : options.store;
  17240. } else if (options.parent && options.parent.$store) {
  17241. this.$store = options.parent.$store;
  17242. }
  17243. }
  17244. }
  17245. var target = typeof window !== 'undefined'
  17246. ? window
  17247. : typeof global !== 'undefined'
  17248. ? global
  17249. : {};
  17250. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  17251. function devtoolPlugin (store) {
  17252. if (!devtoolHook) { return }
  17253. store._devtoolHook = devtoolHook;
  17254. devtoolHook.emit('vuex:init', store);
  17255. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  17256. store.replaceState(targetState);
  17257. });
  17258. store.subscribe(function (mutation, state) {
  17259. devtoolHook.emit('vuex:mutation', mutation, state);
  17260. }, { prepend: true });
  17261. store.subscribeAction(function (action, state) {
  17262. devtoolHook.emit('vuex:action', action, state);
  17263. }, { prepend: true });
  17264. }
  17265. /**
  17266. * Get the first item that pass the test
  17267. * by second argument function
  17268. *
  17269. * @param {Array} list
  17270. * @param {Function} f
  17271. * @return {*}
  17272. */
  17273. /**
  17274. * forEach for object
  17275. */
  17276. function forEachValue (obj, fn) {
  17277. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  17278. }
  17279. function isObject (obj) {
  17280. return obj !== null && typeof obj === 'object'
  17281. }
  17282. function isPromise (val) {
  17283. return val && typeof val.then === 'function'
  17284. }
  17285. function assert (condition, msg) {
  17286. if (!condition) { throw new Error(("[vuex] " + msg)) }
  17287. }
  17288. function partial (fn, arg) {
  17289. return function () {
  17290. return fn(arg)
  17291. }
  17292. }
  17293. // Base data struct for store's module, package with some attribute and method
  17294. var Module = function Module (rawModule, runtime) {
  17295. this.runtime = runtime;
  17296. // Store some children item
  17297. this._children = Object.create(null);
  17298. // Store the origin module object which passed by programmer
  17299. this._rawModule = rawModule;
  17300. var rawState = rawModule.state;
  17301. // Store the origin module's state
  17302. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  17303. };
  17304. var prototypeAccessors = { namespaced: { configurable: true } };
  17305. prototypeAccessors.namespaced.get = function () {
  17306. return !!this._rawModule.namespaced
  17307. };
  17308. Module.prototype.addChild = function addChild (key, module) {
  17309. this._children[key] = module;
  17310. };
  17311. Module.prototype.removeChild = function removeChild (key) {
  17312. delete this._children[key];
  17313. };
  17314. Module.prototype.getChild = function getChild (key) {
  17315. return this._children[key]
  17316. };
  17317. Module.prototype.hasChild = function hasChild (key) {
  17318. return key in this._children
  17319. };
  17320. Module.prototype.update = function update (rawModule) {
  17321. this._rawModule.namespaced = rawModule.namespaced;
  17322. if (rawModule.actions) {
  17323. this._rawModule.actions = rawModule.actions;
  17324. }
  17325. if (rawModule.mutations) {
  17326. this._rawModule.mutations = rawModule.mutations;
  17327. }
  17328. if (rawModule.getters) {
  17329. this._rawModule.getters = rawModule.getters;
  17330. }
  17331. };
  17332. Module.prototype.forEachChild = function forEachChild (fn) {
  17333. forEachValue(this._children, fn);
  17334. };
  17335. Module.prototype.forEachGetter = function forEachGetter (fn) {
  17336. if (this._rawModule.getters) {
  17337. forEachValue(this._rawModule.getters, fn);
  17338. }
  17339. };
  17340. Module.prototype.forEachAction = function forEachAction (fn) {
  17341. if (this._rawModule.actions) {
  17342. forEachValue(this._rawModule.actions, fn);
  17343. }
  17344. };
  17345. Module.prototype.forEachMutation = function forEachMutation (fn) {
  17346. if (this._rawModule.mutations) {
  17347. forEachValue(this._rawModule.mutations, fn);
  17348. }
  17349. };
  17350. Object.defineProperties( Module.prototype, prototypeAccessors );
  17351. var ModuleCollection = function ModuleCollection (rawRootModule) {
  17352. // register root module (Vuex.Store options)
  17353. this.register([], rawRootModule, false);
  17354. };
  17355. ModuleCollection.prototype.get = function get (path) {
  17356. return path.reduce(function (module, key) {
  17357. return module.getChild(key)
  17358. }, this.root)
  17359. };
  17360. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  17361. var module = this.root;
  17362. return path.reduce(function (namespace, key) {
  17363. module = module.getChild(key);
  17364. return namespace + (module.namespaced ? key + '/' : '')
  17365. }, '')
  17366. };
  17367. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  17368. update([], this.root, rawRootModule);
  17369. };
  17370. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  17371. var this$1 = this;
  17372. if ( runtime === void 0 ) runtime = true;
  17373. if ((true)) {
  17374. assertRawModule(path, rawModule);
  17375. }
  17376. var newModule = new Module(rawModule, runtime);
  17377. if (path.length === 0) {
  17378. this.root = newModule;
  17379. } else {
  17380. var parent = this.get(path.slice(0, -1));
  17381. parent.addChild(path[path.length - 1], newModule);
  17382. }
  17383. // register nested modules
  17384. if (rawModule.modules) {
  17385. forEachValue(rawModule.modules, function (rawChildModule, key) {
  17386. this$1.register(path.concat(key), rawChildModule, runtime);
  17387. });
  17388. }
  17389. };
  17390. ModuleCollection.prototype.unregister = function unregister (path) {
  17391. var parent = this.get(path.slice(0, -1));
  17392. var key = path[path.length - 1];
  17393. if (!parent.getChild(key).runtime) { return }
  17394. parent.removeChild(key);
  17395. };
  17396. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  17397. var parent = this.get(path.slice(0, -1));
  17398. var key = path[path.length - 1];
  17399. return parent.hasChild(key)
  17400. };
  17401. function update (path, targetModule, newModule) {
  17402. if ((true)) {
  17403. assertRawModule(path, newModule);
  17404. }
  17405. // update target module
  17406. targetModule.update(newModule);
  17407. // update nested modules
  17408. if (newModule.modules) {
  17409. for (var key in newModule.modules) {
  17410. if (!targetModule.getChild(key)) {
  17411. if ((true)) {
  17412. console.warn(
  17413. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  17414. 'manual reload is needed'
  17415. );
  17416. }
  17417. return
  17418. }
  17419. update(
  17420. path.concat(key),
  17421. targetModule.getChild(key),
  17422. newModule.modules[key]
  17423. );
  17424. }
  17425. }
  17426. }
  17427. var functionAssert = {
  17428. assert: function (value) { return typeof value === 'function'; },
  17429. expected: 'function'
  17430. };
  17431. var objectAssert = {
  17432. assert: function (value) { return typeof value === 'function' ||
  17433. (typeof value === 'object' && typeof value.handler === 'function'); },
  17434. expected: 'function or object with "handler" function'
  17435. };
  17436. var assertTypes = {
  17437. getters: functionAssert,
  17438. mutations: functionAssert,
  17439. actions: objectAssert
  17440. };
  17441. function assertRawModule (path, rawModule) {
  17442. Object.keys(assertTypes).forEach(function (key) {
  17443. if (!rawModule[key]) { return }
  17444. var assertOptions = assertTypes[key];
  17445. forEachValue(rawModule[key], function (value, type) {
  17446. assert(
  17447. assertOptions.assert(value),
  17448. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  17449. );
  17450. });
  17451. });
  17452. }
  17453. function makeAssertionMessage (path, key, type, value, expected) {
  17454. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  17455. if (path.length > 0) {
  17456. buf += " in module \"" + (path.join('.')) + "\"";
  17457. }
  17458. buf += " is " + (JSON.stringify(value)) + ".";
  17459. return buf
  17460. }
  17461. var Vue; // bind on install
  17462. var Store = function Store (options) {
  17463. var this$1 = this;
  17464. if ( options === void 0 ) options = {};
  17465. // Auto install if it is not done yet and `window` has `Vue`.
  17466. // To allow users to avoid auto-installation in some cases,
  17467. // this code should be placed here. See #731
  17468. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  17469. install(window.Vue);
  17470. }
  17471. if ((true)) {
  17472. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  17473. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  17474. assert(this instanceof Store, "store must be called with the new operator.");
  17475. }
  17476. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  17477. var strict = options.strict; if ( strict === void 0 ) strict = false;
  17478. // store internal state
  17479. this._committing = false;
  17480. this._actions = Object.create(null);
  17481. this._actionSubscribers = [];
  17482. this._mutations = Object.create(null);
  17483. this._wrappedGetters = Object.create(null);
  17484. this._modules = new ModuleCollection(options);
  17485. this._modulesNamespaceMap = Object.create(null);
  17486. this._subscribers = [];
  17487. this._watcherVM = new Vue();
  17488. this._makeLocalGettersCache = Object.create(null);
  17489. // bind commit and dispatch to self
  17490. var store = this;
  17491. var ref = this;
  17492. var dispatch = ref.dispatch;
  17493. var commit = ref.commit;
  17494. this.dispatch = function boundDispatch (type, payload) {
  17495. return dispatch.call(store, type, payload)
  17496. };
  17497. this.commit = function boundCommit (type, payload, options) {
  17498. return commit.call(store, type, payload, options)
  17499. };
  17500. // strict mode
  17501. this.strict = strict;
  17502. var state = this._modules.root.state;
  17503. // init root module.
  17504. // this also recursively registers all sub-modules
  17505. // and collects all module getters inside this._wrappedGetters
  17506. installModule(this, state, [], this._modules.root);
  17507. // initialize the store vm, which is responsible for the reactivity
  17508. // (also registers _wrappedGetters as computed properties)
  17509. resetStoreVM(this, state);
  17510. // apply plugins
  17511. plugins.forEach(function (plugin) { return plugin(this$1); });
  17512. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  17513. if (useDevtools) {
  17514. devtoolPlugin(this);
  17515. }
  17516. };
  17517. var prototypeAccessors$1 = { state: { configurable: true } };
  17518. prototypeAccessors$1.state.get = function () {
  17519. return this._vm._data.$$state
  17520. };
  17521. prototypeAccessors$1.state.set = function (v) {
  17522. if ((true)) {
  17523. assert(false, "use store.replaceState() to explicit replace store state.");
  17524. }
  17525. };
  17526. Store.prototype.commit = function commit (_type, _payload, _options) {
  17527. var this$1 = this;
  17528. // check object-style commit
  17529. var ref = unifyObjectStyle(_type, _payload, _options);
  17530. var type = ref.type;
  17531. var payload = ref.payload;
  17532. var options = ref.options;
  17533. var mutation = { type: type, payload: payload };
  17534. var entry = this._mutations[type];
  17535. if (!entry) {
  17536. if ((true)) {
  17537. console.error(("[vuex] unknown mutation type: " + type));
  17538. }
  17539. return
  17540. }
  17541. this._withCommit(function () {
  17542. entry.forEach(function commitIterator (handler) {
  17543. handler(payload);
  17544. });
  17545. });
  17546. this._subscribers
  17547. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  17548. .forEach(function (sub) { return sub(mutation, this$1.state); });
  17549. if (
  17550. ( true) &&
  17551. options && options.silent
  17552. ) {
  17553. console.warn(
  17554. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  17555. 'Use the filter functionality in the vue-devtools'
  17556. );
  17557. }
  17558. };
  17559. Store.prototype.dispatch = function dispatch (_type, _payload) {
  17560. var this$1 = this;
  17561. // check object-style dispatch
  17562. var ref = unifyObjectStyle(_type, _payload);
  17563. var type = ref.type;
  17564. var payload = ref.payload;
  17565. var action = { type: type, payload: payload };
  17566. var entry = this._actions[type];
  17567. if (!entry) {
  17568. if ((true)) {
  17569. console.error(("[vuex] unknown action type: " + type));
  17570. }
  17571. return
  17572. }
  17573. try {
  17574. this._actionSubscribers
  17575. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  17576. .filter(function (sub) { return sub.before; })
  17577. .forEach(function (sub) { return sub.before(action, this$1.state); });
  17578. } catch (e) {
  17579. if ((true)) {
  17580. console.warn("[vuex] error in before action subscribers: ");
  17581. console.error(e);
  17582. }
  17583. }
  17584. var result = entry.length > 1
  17585. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  17586. : entry[0](payload);
  17587. return new Promise(function (resolve, reject) {
  17588. result.then(function (res) {
  17589. try {
  17590. this$1._actionSubscribers
  17591. .filter(function (sub) { return sub.after; })
  17592. .forEach(function (sub) { return sub.after(action, this$1.state); });
  17593. } catch (e) {
  17594. if ((true)) {
  17595. console.warn("[vuex] error in after action subscribers: ");
  17596. console.error(e);
  17597. }
  17598. }
  17599. resolve(res);
  17600. }, function (error) {
  17601. try {
  17602. this$1._actionSubscribers
  17603. .filter(function (sub) { return sub.error; })
  17604. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  17605. } catch (e) {
  17606. if ((true)) {
  17607. console.warn("[vuex] error in error action subscribers: ");
  17608. console.error(e);
  17609. }
  17610. }
  17611. reject(error);
  17612. });
  17613. })
  17614. };
  17615. Store.prototype.subscribe = function subscribe (fn, options) {
  17616. return genericSubscribe(fn, this._subscribers, options)
  17617. };
  17618. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  17619. var subs = typeof fn === 'function' ? { before: fn } : fn;
  17620. return genericSubscribe(subs, this._actionSubscribers, options)
  17621. };
  17622. Store.prototype.watch = function watch (getter, cb, options) {
  17623. var this$1 = this;
  17624. if ((true)) {
  17625. assert(typeof getter === 'function', "store.watch only accepts a function.");
  17626. }
  17627. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  17628. };
  17629. Store.prototype.replaceState = function replaceState (state) {
  17630. var this$1 = this;
  17631. this._withCommit(function () {
  17632. this$1._vm._data.$$state = state;
  17633. });
  17634. };
  17635. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  17636. if ( options === void 0 ) options = {};
  17637. if (typeof path === 'string') { path = [path]; }
  17638. if ((true)) {
  17639. assert(Array.isArray(path), "module path must be a string or an Array.");
  17640. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  17641. }
  17642. this._modules.register(path, rawModule);
  17643. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  17644. // reset store to update getters...
  17645. resetStoreVM(this, this.state);
  17646. };
  17647. Store.prototype.unregisterModule = function unregisterModule (path) {
  17648. var this$1 = this;
  17649. if (typeof path === 'string') { path = [path]; }
  17650. if ((true)) {
  17651. assert(Array.isArray(path), "module path must be a string or an Array.");
  17652. }
  17653. this._modules.unregister(path);
  17654. this._withCommit(function () {
  17655. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  17656. Vue.delete(parentState, path[path.length - 1]);
  17657. });
  17658. resetStore(this);
  17659. };
  17660. Store.prototype.hasModule = function hasModule (path) {
  17661. if (typeof path === 'string') { path = [path]; }
  17662. if ((true)) {
  17663. assert(Array.isArray(path), "module path must be a string or an Array.");
  17664. }
  17665. return this._modules.isRegistered(path)
  17666. };
  17667. Store.prototype.hotUpdate = function hotUpdate (newOptions) {
  17668. this._modules.update(newOptions);
  17669. resetStore(this, true);
  17670. };
  17671. Store.prototype._withCommit = function _withCommit (fn) {
  17672. var committing = this._committing;
  17673. this._committing = true;
  17674. fn();
  17675. this._committing = committing;
  17676. };
  17677. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  17678. function genericSubscribe (fn, subs, options) {
  17679. if (subs.indexOf(fn) < 0) {
  17680. options && options.prepend
  17681. ? subs.unshift(fn)
  17682. : subs.push(fn);
  17683. }
  17684. return function () {
  17685. var i = subs.indexOf(fn);
  17686. if (i > -1) {
  17687. subs.splice(i, 1);
  17688. }
  17689. }
  17690. }
  17691. function resetStore (store, hot) {
  17692. store._actions = Object.create(null);
  17693. store._mutations = Object.create(null);
  17694. store._wrappedGetters = Object.create(null);
  17695. store._modulesNamespaceMap = Object.create(null);
  17696. var state = store.state;
  17697. // init all modules
  17698. installModule(store, state, [], store._modules.root, true);
  17699. // reset vm
  17700. resetStoreVM(store, state, hot);
  17701. }
  17702. function resetStoreVM (store, state, hot) {
  17703. var oldVm = store._vm;
  17704. // bind store public getters
  17705. store.getters = {};
  17706. // reset local getters cache
  17707. store._makeLocalGettersCache = Object.create(null);
  17708. var wrappedGetters = store._wrappedGetters;
  17709. var computed = {};
  17710. forEachValue(wrappedGetters, function (fn, key) {
  17711. // use computed to leverage its lazy-caching mechanism
  17712. // direct inline function use will lead to closure preserving oldVm.
  17713. // using partial to return function with only arguments preserved in closure environment.
  17714. computed[key] = partial(fn, store);
  17715. Object.defineProperty(store.getters, key, {
  17716. get: function () { return store._vm[key]; },
  17717. enumerable: true // for local getters
  17718. });
  17719. });
  17720. // use a Vue instance to store the state tree
  17721. // suppress warnings just in case the user has added
  17722. // some funky global mixins
  17723. var silent = Vue.config.silent;
  17724. Vue.config.silent = true;
  17725. store._vm = new Vue({
  17726. data: {
  17727. $$state: state
  17728. },
  17729. computed: computed
  17730. });
  17731. Vue.config.silent = silent;
  17732. // enable strict mode for new vm
  17733. if (store.strict) {
  17734. enableStrictMode(store);
  17735. }
  17736. if (oldVm) {
  17737. if (hot) {
  17738. // dispatch changes in all subscribed watchers
  17739. // to force getter re-evaluation for hot reloading.
  17740. store._withCommit(function () {
  17741. oldVm._data.$$state = null;
  17742. });
  17743. }
  17744. Vue.nextTick(function () { return oldVm.$destroy(); });
  17745. }
  17746. }
  17747. function installModule (store, rootState, path, module, hot) {
  17748. var isRoot = !path.length;
  17749. var namespace = store._modules.getNamespace(path);
  17750. // register in namespace map
  17751. if (module.namespaced) {
  17752. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  17753. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  17754. }
  17755. store._modulesNamespaceMap[namespace] = module;
  17756. }
  17757. // set state
  17758. if (!isRoot && !hot) {
  17759. var parentState = getNestedState(rootState, path.slice(0, -1));
  17760. var moduleName = path[path.length - 1];
  17761. store._withCommit(function () {
  17762. if ((true)) {
  17763. if (moduleName in parentState) {
  17764. console.warn(
  17765. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  17766. );
  17767. }
  17768. }
  17769. Vue.set(parentState, moduleName, module.state);
  17770. });
  17771. }
  17772. var local = module.context = makeLocalContext(store, namespace, path);
  17773. module.forEachMutation(function (mutation, key) {
  17774. var namespacedType = namespace + key;
  17775. registerMutation(store, namespacedType, mutation, local);
  17776. });
  17777. module.forEachAction(function (action, key) {
  17778. var type = action.root ? key : namespace + key;
  17779. var handler = action.handler || action;
  17780. registerAction(store, type, handler, local);
  17781. });
  17782. module.forEachGetter(function (getter, key) {
  17783. var namespacedType = namespace + key;
  17784. registerGetter(store, namespacedType, getter, local);
  17785. });
  17786. module.forEachChild(function (child, key) {
  17787. installModule(store, rootState, path.concat(key), child, hot);
  17788. });
  17789. }
  17790. /**
  17791. * make localized dispatch, commit, getters and state
  17792. * if there is no namespace, just use root ones
  17793. */
  17794. function makeLocalContext (store, namespace, path) {
  17795. var noNamespace = namespace === '';
  17796. var local = {
  17797. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  17798. var args = unifyObjectStyle(_type, _payload, _options);
  17799. var payload = args.payload;
  17800. var options = args.options;
  17801. var type = args.type;
  17802. if (!options || !options.root) {
  17803. type = namespace + type;
  17804. if (( true) && !store._actions[type]) {
  17805. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  17806. return
  17807. }
  17808. }
  17809. return store.dispatch(type, payload)
  17810. },
  17811. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  17812. var args = unifyObjectStyle(_type, _payload, _options);
  17813. var payload = args.payload;
  17814. var options = args.options;
  17815. var type = args.type;
  17816. if (!options || !options.root) {
  17817. type = namespace + type;
  17818. if (( true) && !store._mutations[type]) {
  17819. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  17820. return
  17821. }
  17822. }
  17823. store.commit(type, payload, options);
  17824. }
  17825. };
  17826. // getters and state object must be gotten lazily
  17827. // because they will be changed by vm update
  17828. Object.defineProperties(local, {
  17829. getters: {
  17830. get: noNamespace
  17831. ? function () { return store.getters; }
  17832. : function () { return makeLocalGetters(store, namespace); }
  17833. },
  17834. state: {
  17835. get: function () { return getNestedState(store.state, path); }
  17836. }
  17837. });
  17838. return local
  17839. }
  17840. function makeLocalGetters (store, namespace) {
  17841. if (!store._makeLocalGettersCache[namespace]) {
  17842. var gettersProxy = {};
  17843. var splitPos = namespace.length;
  17844. Object.keys(store.getters).forEach(function (type) {
  17845. // skip if the target getter is not match this namespace
  17846. if (type.slice(0, splitPos) !== namespace) { return }
  17847. // extract local getter type
  17848. var localType = type.slice(splitPos);
  17849. // Add a port to the getters proxy.
  17850. // Define as getter property because
  17851. // we do not want to evaluate the getters in this time.
  17852. Object.defineProperty(gettersProxy, localType, {
  17853. get: function () { return store.getters[type]; },
  17854. enumerable: true
  17855. });
  17856. });
  17857. store._makeLocalGettersCache[namespace] = gettersProxy;
  17858. }
  17859. return store._makeLocalGettersCache[namespace]
  17860. }
  17861. function registerMutation (store, type, handler, local) {
  17862. var entry = store._mutations[type] || (store._mutations[type] = []);
  17863. entry.push(function wrappedMutationHandler (payload) {
  17864. handler.call(store, local.state, payload);
  17865. });
  17866. }
  17867. function registerAction (store, type, handler, local) {
  17868. var entry = store._actions[type] || (store._actions[type] = []);
  17869. entry.push(function wrappedActionHandler (payload) {
  17870. var res = handler.call(store, {
  17871. dispatch: local.dispatch,
  17872. commit: local.commit,
  17873. getters: local.getters,
  17874. state: local.state,
  17875. rootGetters: store.getters,
  17876. rootState: store.state
  17877. }, payload);
  17878. if (!isPromise(res)) {
  17879. res = Promise.resolve(res);
  17880. }
  17881. if (store._devtoolHook) {
  17882. return res.catch(function (err) {
  17883. store._devtoolHook.emit('vuex:error', err);
  17884. throw err
  17885. })
  17886. } else {
  17887. return res
  17888. }
  17889. });
  17890. }
  17891. function registerGetter (store, type, rawGetter, local) {
  17892. if (store._wrappedGetters[type]) {
  17893. if ((true)) {
  17894. console.error(("[vuex] duplicate getter key: " + type));
  17895. }
  17896. return
  17897. }
  17898. store._wrappedGetters[type] = function wrappedGetter (store) {
  17899. return rawGetter(
  17900. local.state, // local state
  17901. local.getters, // local getters
  17902. store.state, // root state
  17903. store.getters // root getters
  17904. )
  17905. };
  17906. }
  17907. function enableStrictMode (store) {
  17908. store._vm.$watch(function () { return this._data.$$state }, function () {
  17909. if ((true)) {
  17910. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  17911. }
  17912. }, { deep: true, sync: true });
  17913. }
  17914. function getNestedState (state, path) {
  17915. return path.reduce(function (state, key) { return state[key]; }, state)
  17916. }
  17917. function unifyObjectStyle (type, payload, options) {
  17918. if (isObject(type) && type.type) {
  17919. options = payload;
  17920. payload = type;
  17921. type = type.type;
  17922. }
  17923. if ((true)) {
  17924. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  17925. }
  17926. return { type: type, payload: payload, options: options }
  17927. }
  17928. function install (_Vue) {
  17929. if (Vue && _Vue === Vue) {
  17930. if ((true)) {
  17931. console.error(
  17932. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  17933. );
  17934. }
  17935. return
  17936. }
  17937. Vue = _Vue;
  17938. applyMixin(Vue);
  17939. }
  17940. /**
  17941. * Reduce the code which written in Vue.js for getting the state.
  17942. * @param {String} [namespace] - Module's namespace
  17943. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  17944. * @param {Object}
  17945. */
  17946. var mapState = normalizeNamespace(function (namespace, states) {
  17947. var res = {};
  17948. if (( true) && !isValidMap(states)) {
  17949. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  17950. }
  17951. normalizeMap(states).forEach(function (ref) {
  17952. var key = ref.key;
  17953. var val = ref.val;
  17954. res[key] = function mappedState () {
  17955. var state = this.$store.state;
  17956. var getters = this.$store.getters;
  17957. if (namespace) {
  17958. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  17959. if (!module) {
  17960. return
  17961. }
  17962. state = module.context.state;
  17963. getters = module.context.getters;
  17964. }
  17965. return typeof val === 'function'
  17966. ? val.call(this, state, getters)
  17967. : state[val]
  17968. };
  17969. // mark vuex getter for devtools
  17970. res[key].vuex = true;
  17971. });
  17972. return res
  17973. });
  17974. /**
  17975. * Reduce the code which written in Vue.js for committing the mutation
  17976. * @param {String} [namespace] - Module's namespace
  17977. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept anthor params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  17978. * @return {Object}
  17979. */
  17980. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  17981. var res = {};
  17982. if (( true) && !isValidMap(mutations)) {
  17983. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  17984. }
  17985. normalizeMap(mutations).forEach(function (ref) {
  17986. var key = ref.key;
  17987. var val = ref.val;
  17988. res[key] = function mappedMutation () {
  17989. var args = [], len = arguments.length;
  17990. while ( len-- ) args[ len ] = arguments[ len ];
  17991. // Get the commit method from store
  17992. var commit = this.$store.commit;
  17993. if (namespace) {
  17994. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  17995. if (!module) {
  17996. return
  17997. }
  17998. commit = module.context.commit;
  17999. }
  18000. return typeof val === 'function'
  18001. ? val.apply(this, [commit].concat(args))
  18002. : commit.apply(this.$store, [val].concat(args))
  18003. };
  18004. });
  18005. return res
  18006. });
  18007. /**
  18008. * Reduce the code which written in Vue.js for getting the getters
  18009. * @param {String} [namespace] - Module's namespace
  18010. * @param {Object|Array} getters
  18011. * @return {Object}
  18012. */
  18013. var mapGetters = normalizeNamespace(function (namespace, getters) {
  18014. var res = {};
  18015. if (( true) && !isValidMap(getters)) {
  18016. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  18017. }
  18018. normalizeMap(getters).forEach(function (ref) {
  18019. var key = ref.key;
  18020. var val = ref.val;
  18021. // The namespace has been mutated by normalizeNamespace
  18022. val = namespace + val;
  18023. res[key] = function mappedGetter () {
  18024. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  18025. return
  18026. }
  18027. if (( true) && !(val in this.$store.getters)) {
  18028. console.error(("[vuex] unknown getter: " + val));
  18029. return
  18030. }
  18031. return this.$store.getters[val]
  18032. };
  18033. // mark vuex getter for devtools
  18034. res[key].vuex = true;
  18035. });
  18036. return res
  18037. });
  18038. /**
  18039. * Reduce the code which written in Vue.js for dispatch the action
  18040. * @param {String} [namespace] - Module's namespace
  18041. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  18042. * @return {Object}
  18043. */
  18044. var mapActions = normalizeNamespace(function (namespace, actions) {
  18045. var res = {};
  18046. if (( true) && !isValidMap(actions)) {
  18047. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  18048. }
  18049. normalizeMap(actions).forEach(function (ref) {
  18050. var key = ref.key;
  18051. var val = ref.val;
  18052. res[key] = function mappedAction () {
  18053. var args = [], len = arguments.length;
  18054. while ( len-- ) args[ len ] = arguments[ len ];
  18055. // get dispatch function from store
  18056. var dispatch = this.$store.dispatch;
  18057. if (namespace) {
  18058. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  18059. if (!module) {
  18060. return
  18061. }
  18062. dispatch = module.context.dispatch;
  18063. }
  18064. return typeof val === 'function'
  18065. ? val.apply(this, [dispatch].concat(args))
  18066. : dispatch.apply(this.$store, [val].concat(args))
  18067. };
  18068. });
  18069. return res
  18070. });
  18071. /**
  18072. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  18073. * @param {String} namespace
  18074. * @return {Object}
  18075. */
  18076. var createNamespacedHelpers = function (namespace) { return ({
  18077. mapState: mapState.bind(null, namespace),
  18078. mapGetters: mapGetters.bind(null, namespace),
  18079. mapMutations: mapMutations.bind(null, namespace),
  18080. mapActions: mapActions.bind(null, namespace)
  18081. }); };
  18082. /**
  18083. * Normalize the map
  18084. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  18085. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  18086. * @param {Array|Object} map
  18087. * @return {Object}
  18088. */
  18089. function normalizeMap (map) {
  18090. if (!isValidMap(map)) {
  18091. return []
  18092. }
  18093. return Array.isArray(map)
  18094. ? map.map(function (key) { return ({ key: key, val: key }); })
  18095. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  18096. }
  18097. /**
  18098. * Validate whether given map is valid or not
  18099. * @param {*} map
  18100. * @return {Boolean}
  18101. */
  18102. function isValidMap (map) {
  18103. return Array.isArray(map) || isObject(map)
  18104. }
  18105. /**
  18106. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  18107. * @param {Function} fn
  18108. * @return {Function}
  18109. */
  18110. function normalizeNamespace (fn) {
  18111. return function (namespace, map) {
  18112. if (typeof namespace !== 'string') {
  18113. map = namespace;
  18114. namespace = '';
  18115. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  18116. namespace += '/';
  18117. }
  18118. return fn(namespace, map)
  18119. }
  18120. }
  18121. /**
  18122. * Search a special module from store by namespace. if module not exist, print error message.
  18123. * @param {Object} store
  18124. * @param {String} helper
  18125. * @param {String} namespace
  18126. * @return {Object}
  18127. */
  18128. function getModuleByNamespace (store, helper, namespace) {
  18129. var module = store._modulesNamespaceMap[namespace];
  18130. if (( true) && !module) {
  18131. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  18132. }
  18133. return module
  18134. }
  18135. var index = {
  18136. Store: Store,
  18137. install: install,
  18138. version: '3.4.0',
  18139. mapState: mapState,
  18140. mapMutations: mapMutations,
  18141. mapGetters: mapGetters,
  18142. mapActions: mapActions,
  18143. createNamespacedHelpers: createNamespacedHelpers
  18144. };
  18145. /* harmony default export */ __webpack_exports__["default"] = (index);
  18146. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ 3)))
  18147. /***/ }),
  18148. /***/ 602:
  18149. /*!***********************************************************!*\
  18150. !*** G:/gsxm/git/yangdaxia/components/uni-icons/icons.js ***!
  18151. \***********************************************************/
  18152. /*! no static exports found */
  18153. /***/ (function(module, exports, __webpack_require__) {
  18154. "use strict";
  18155. Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _default = {
  18156. 'contact': "\uE100",
  18157. 'person': "\uE101",
  18158. 'personadd': "\uE102",
  18159. 'contact-filled': "\uE130",
  18160. 'person-filled': "\uE131",
  18161. 'personadd-filled': "\uE132",
  18162. 'phone': "\uE200",
  18163. 'email': "\uE201",
  18164. 'chatbubble': "\uE202",
  18165. 'chatboxes': "\uE203",
  18166. 'phone-filled': "\uE230",
  18167. 'email-filled': "\uE231",
  18168. 'chatbubble-filled': "\uE232",
  18169. 'chatboxes-filled': "\uE233",
  18170. 'weibo': "\uE260",
  18171. 'weixin': "\uE261",
  18172. 'pengyouquan': "\uE262",
  18173. 'chat': "\uE263",
  18174. 'qq': "\uE264",
  18175. 'videocam': "\uE300",
  18176. 'camera': "\uE301",
  18177. 'mic': "\uE302",
  18178. 'location': "\uE303",
  18179. 'mic-filled': "\uE332",
  18180. 'speech': "\uE332",
  18181. 'location-filled': "\uE333",
  18182. 'micoff': "\uE360",
  18183. 'image': "\uE363",
  18184. 'map': "\uE364",
  18185. 'compose': "\uE400",
  18186. 'trash': "\uE401",
  18187. 'upload': "\uE402",
  18188. 'download': "\uE403",
  18189. 'close': "\uE404",
  18190. 'redo': "\uE405",
  18191. 'undo': "\uE406",
  18192. 'refresh': "\uE407",
  18193. 'star': "\uE408",
  18194. 'plus': "\uE409",
  18195. 'minus': "\uE410",
  18196. 'circle': "\uE411",
  18197. 'checkbox': "\uE411",
  18198. 'close-filled': "\uE434",
  18199. 'clear': "\uE434",
  18200. 'refresh-filled': "\uE437",
  18201. 'star-filled': "\uE438",
  18202. 'plus-filled': "\uE439",
  18203. 'minus-filled': "\uE440",
  18204. 'circle-filled': "\uE441",
  18205. 'checkbox-filled': "\uE442",
  18206. 'closeempty': "\uE460",
  18207. 'refreshempty': "\uE461",
  18208. 'reload': "\uE462",
  18209. 'starhalf': "\uE463",
  18210. 'spinner': "\uE464",
  18211. 'spinner-cycle': "\uE465",
  18212. 'search': "\uE466",
  18213. 'plusempty': "\uE468",
  18214. 'forward': "\uE470",
  18215. 'back': "\uE471",
  18216. 'left-nav': "\uE471",
  18217. 'checkmarkempty': "\uE472",
  18218. 'home': "\uE500",
  18219. 'navigate': "\uE501",
  18220. 'gear': "\uE502",
  18221. 'paperplane': "\uE503",
  18222. 'info': "\uE504",
  18223. 'help': "\uE505",
  18224. 'locked': "\uE506",
  18225. 'more': "\uE507",
  18226. 'flag': "\uE508",
  18227. 'home-filled': "\uE530",
  18228. 'gear-filled': "\uE532",
  18229. 'info-filled': "\uE534",
  18230. 'help-filled': "\uE535",
  18231. 'more-filled': "\uE537",
  18232. 'settings': "\uE560",
  18233. 'list': "\uE562",
  18234. 'bars': "\uE563",
  18235. 'loop': "\uE565",
  18236. 'paperclip': "\uE567",
  18237. 'eye': "\uE568",
  18238. 'arrowup': "\uE580",
  18239. 'arrowdown': "\uE581",
  18240. 'arrowleft': "\uE582",
  18241. 'arrowright': "\uE583",
  18242. 'arrowthinup': "\uE584",
  18243. 'arrowthindown': "\uE585",
  18244. 'arrowthinleft': "\uE586",
  18245. 'arrowthinright': "\uE587",
  18246. 'pulldown': "\uE588",
  18247. 'closefill': "\uE589",
  18248. 'sound': "\uE590",
  18249. 'scan': "\uE612" };exports.default = _default;
  18250. /***/ }),
  18251. /***/ 69:
  18252. /*!******************************************!*\
  18253. !*** G:/gsxm/git/yangdaxia/api/login.js ***!
  18254. \******************************************/
  18255. /*! no static exports found */
  18256. /***/ (function(module, exports, __webpack_require__) {
  18257. "use strict";
  18258. Object.defineProperty(exports, "__esModule", { value: true });exports.login = login;exports.register = register;exports.verify = verify;exports.getUserInfo = getUserInfo;exports.loginMobile = loginMobile;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 50));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  18259. // 登录
  18260. function login(data) {
  18261. return (0, _request.default)({
  18262. url: '/api/login',
  18263. method: 'post',
  18264. data: data });
  18265. }
  18266. // 注册
  18267. function register(data) {
  18268. return (0, _request.default)({
  18269. url: '/api/register',
  18270. method: 'post',
  18271. data: data });
  18272. }
  18273. // 验证码
  18274. function verify(data) {
  18275. // type=register为注册
  18276. // type=login为登录
  18277. return (0, _request.default)({
  18278. url: '/api/register/verify',
  18279. method: 'post',
  18280. data: data });
  18281. }
  18282. // 获取用户信息
  18283. function getUserInfo(data) {
  18284. return (0, _request.default)({
  18285. url: '/api/userinfo',
  18286. method: 'get',
  18287. data: data });
  18288. }
  18289. // 短信登录
  18290. function loginMobile(data) {
  18291. return (0, _request.default)({
  18292. url: '/api/login/mobile',
  18293. method: 'post',
  18294. data: data });
  18295. }
  18296. /***/ }),
  18297. /***/ 7:
  18298. /*!*************************************************!*\
  18299. !*** G:/gsxm/git/yangdaxia/store/model/user.js ***!
  18300. \*************************************************/
  18301. /*! no static exports found */
  18302. /***/ (function(module, exports, __webpack_require__) {
  18303. "use strict";
  18304. /* WEBPACK VAR INJECTION */(function(uni) {Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var state = {
  18305. userInfo: {}, //用户信息
  18306. orderInfo: {
  18307. complete_count: 0, //完成
  18308. received_count: 0, //待收货
  18309. unshipped_count: 0, //待发货
  18310. order_count: 0, //订单总数
  18311. unpaid_count: 0 //待付款
  18312. }, //订单信息
  18313. hasLogin: false //是否登录
  18314. };
  18315. var mutations = {
  18316. // 登录
  18317. login: function login(state) {
  18318. state.hasLogin = true;
  18319. },
  18320. // 退出登录
  18321. logout: function logout(state, provider) {
  18322. state.hasLogin = false;
  18323. // 清空基础信息
  18324. state.userInfo = {};
  18325. state.orderInfo = {
  18326. complete_count: 0, //完成
  18327. received_count: 0, //待收货
  18328. unshipped_count: 0, //待发货
  18329. order_count: 0, //订单总数
  18330. unpaid_count: 0 //待付款
  18331. };
  18332. // 清除缓存用户信息
  18333. uni.removeStorage({
  18334. key: 'userInfo' });
  18335. // 清除缓存token
  18336. uni.removeStorage({
  18337. key: 'token' });
  18338. },
  18339. // 保存用户信息
  18340. setUserInfo: function setUserInfo(state, provider) {
  18341. state.userInfo = provider;
  18342. uni.setStorage({ //缓存用户登陆状态
  18343. key: 'userInfo',
  18344. data: provider });
  18345. },
  18346. // 保存订单信息
  18347. setOrderInfo: function setOrderInfo(state, provider) {
  18348. state.orderInfo = provider;
  18349. } };
  18350. var getters = {};var _default =
  18351. {
  18352. namespaced: true,
  18353. state: state,
  18354. mutations: mutations,
  18355. getters: getters };exports.default = _default;
  18356. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
  18357. /***/ }),
  18358. /***/ 86:
  18359. /*!***************************************!*\
  18360. !*** G:/gsxm/git/yangdaxia/api/wx.js ***!
  18361. \***************************************/
  18362. /*! no static exports found */
  18363. /***/ (function(module, exports, __webpack_require__) {
  18364. "use strict";
  18365. Object.defineProperty(exports, "__esModule", { value: true });exports.wechatMpAuth = wechatMpAuth;var _request = _interopRequireDefault(__webpack_require__(/*! @/utils/request */ 50));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}
  18366. // 微信code地址
  18367. function wechatMpAuth(data) {
  18368. return (0, _request.default)({
  18369. url: '/api/wechat/mp_auth',
  18370. method: 'post',
  18371. data: data });
  18372. }
  18373. /***/ })
  18374. }]);
  18375. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map