vendor.js 770 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891158921589315894158951589615897158981589915900159011590215903159041590515906159071590815909159101591115912159131591415915159161591715918159191592015921159221592315924159251592615927159281592915930159311593215933159341593515936159371593815939159401594115942159431594415945159461594715948159491595015951159521595315954159551595615957159581595915960159611596215963159641596515966159671596815969159701597115972159731597415975159761597715978159791598015981159821598315984159851598615987159881598915990159911599215993159941599515996159971599815999160001600116002160031600416005160061600716008160091601016011160121601316014160151601616017160181601916020160211602216023160241602516026160271602816029160301603116032160331603416035160361603716038160391604016041160421604316044160451604616047160481604916050160511605216053160541605516056160571605816059160601606116062160631606416065160661606716068160691607016071160721607316074160751607616077160781607916080160811608216083160841608516086160871608816089160901609116092160931609416095160961609716098160991610016101161021610316104161051610616107161081610916110161111611216113161141611516116161171611816119161201612116122161231612416125161261612716128161291613016131161321613316134161351613616137161381613916140161411614216143161441614516146161471614816149161501615116152161531615416155161561615716158161591616016161161621616316164161651616616167161681616916170161711617216173161741617516176161771617816179161801618116182161831618416185161861618716188161891619016191161921619316194161951619616197161981619916200162011620216203162041620516206162071620816209162101621116212162131621416215162161621716218162191622016221162221622316224162251622616227162281622916230162311623216233162341623516236162371623816239162401624116242162431624416245162461624716248162491625016251162521625316254162551625616257162581625916260162611626216263162641626516266162671626816269162701627116272162731627416275162761627716278162791628016281162821628316284162851628616287162881628916290162911629216293162941629516296162971629816299163001630116302163031630416305163061630716308163091631016311163121631316314163151631616317163181631916320163211632216323163241632516326163271632816329163301633116332163331633416335163361633716338163391634016341163421634316344163451634616347163481634916350163511635216353163541635516356163571635816359163601636116362163631636416365163661636716368163691637016371163721637316374163751637616377163781637916380163811638216383163841638516386163871638816389163901639116392163931639416395163961639716398163991640016401164021640316404164051640616407164081640916410164111641216413164141641516416164171641816419164201642116422164231642416425164261642716428164291643016431164321643316434164351643616437164381643916440164411644216443164441644516446164471644816449164501645116452164531645416455164561645716458164591646016461164621646316464164651646616467164681646916470164711647216473164741647516476164771647816479164801648116482164831648416485164861648716488164891649016491164921649316494164951649616497164981649916500165011650216503165041650516506165071650816509165101651116512165131651416515165161651716518165191652016521165221652316524165251652616527165281652916530165311653216533165341653516536165371653816539165401654116542165431654416545165461654716548165491655016551165521655316554165551655616557165581655916560165611656216563165641656516566165671656816569165701657116572165731657416575165761657716578165791658016581165821658316584165851658616587165881658916590165911659216593165941659516596165971659816599166001660116602166031660416605166061660716608166091661016611166121661316614166151661616617166181661916620166211662216623166241662516626166271662816629166301663116632166331663416635166361663716638166391664016641166421664316644166451664616647166481664916650166511665216653166541665516656166571665816659166601666116662166631666416665166661666716668166691667016671166721667316674166751667616677166781667916680166811668216683166841668516686166871668816689166901669116692166931669416695166961669716698166991670016701167021670316704167051670616707167081670916710167111671216713167141671516716167171671816719167201672116722167231672416725167261672716728167291673016731167321673316734167351673616737167381673916740167411674216743167441674516746167471674816749167501675116752167531675416755167561675716758167591676016761167621676316764167651676616767167681676916770167711677216773167741677516776167771677816779167801678116782167831678416785167861678716788167891679016791167921679316794167951679616797167981679916800168011680216803168041680516806168071680816809168101681116812168131681416815168161681716818168191682016821168221682316824168251682616827168281682916830168311683216833168341683516836168371683816839168401684116842168431684416845168461684716848168491685016851168521685316854168551685616857168581685916860168611686216863168641686516866168671686816869168701687116872168731687416875168761687716878168791688016881168821688316884168851688616887168881688916890168911689216893168941689516896168971689816899169001690116902169031690416905169061690716908169091691016911169121691316914169151691616917169181691916920169211692216923169241692516926169271692816929169301693116932169331693416935169361693716938169391694016941169421694316944169451694616947169481694916950169511695216953169541695516956169571695816959169601696116962169631696416965169661696716968169691697016971169721697316974169751697616977169781697916980169811698216983169841698516986169871698816989169901699116992169931699416995169961699716998169991700017001170021700317004170051700617007170081700917010170111701217013170141701517016170171701817019170201702117022170231702417025170261702717028170291703017031170321703317034170351703617037170381703917040170411704217043170441704517046170471704817049170501705117052170531705417055170561705717058170591706017061170621706317064170651706617067170681706917070170711707217073170741707517076170771707817079170801708117082170831708417085170861708717088170891709017091170921709317094170951709617097170981709917100171011710217103171041710517106171071710817109171101711117112171131711417115171161711717118171191712017121171221712317124171251712617127171281712917130171311713217133171341713517136171371713817139171401714117142171431714417145171461714717148171491715017151171521715317154171551715617157171581715917160171611716217163171641716517166171671716817169171701717117172171731717417175171761717717178171791718017181171821718317184171851718617187171881718917190171911719217193171941719517196171971719817199172001720117202172031720417205172061720717208172091721017211172121721317214172151721617217172181721917220172211722217223172241722517226172271722817229172301723117232172331723417235172361723717238172391724017241172421724317244172451724617247172481724917250172511725217253172541725517256172571725817259172601726117262172631726417265172661726717268172691727017271172721727317274172751727617277172781727917280172811728217283172841728517286172871728817289172901729117292172931729417295172961729717298172991730017301173021730317304173051730617307173081730917310173111731217313173141731517316173171731817319173201732117322173231732417325173261732717328173291733017331173321733317334173351733617337173381733917340173411734217343173441734517346173471734817349173501735117352173531735417355173561735717358173591736017361173621736317364173651736617367173681736917370173711737217373173741737517376173771737817379173801738117382173831738417385173861738717388173891739017391173921739317394173951739617397173981739917400174011740217403174041740517406174071740817409174101741117412174131741417415174161741717418174191742017421174221742317424174251742617427174281742917430174311743217433174341743517436174371743817439174401744117442174431744417445174461744717448174491745017451174521745317454174551745617457174581745917460174611746217463174641746517466174671746817469174701747117472174731747417475174761747717478174791748017481174821748317484174851748617487174881748917490174911749217493174941749517496174971749817499175001750117502175031750417505175061750717508175091751017511175121751317514175151751617517175181751917520175211752217523175241752517526175271752817529175301753117532175331753417535175361753717538175391754017541175421754317544175451754617547175481754917550175511755217553175541755517556175571755817559175601756117562175631756417565175661756717568175691757017571175721757317574175751757617577175781757917580175811758217583175841758517586175871758817589175901759117592175931759417595175961759717598175991760017601176021760317604176051760617607176081760917610176111761217613176141761517616176171761817619176201762117622176231762417625176261762717628176291763017631176321763317634176351763617637176381763917640176411764217643176441764517646176471764817649176501765117652176531765417655176561765717658176591766017661176621766317664176651766617667176681766917670176711767217673176741767517676176771767817679176801768117682176831768417685176861768717688176891769017691176921769317694176951769617697176981769917700177011770217703177041770517706177071770817709177101771117712177131771417715177161771717718177191772017721177221772317724177251772617727177281772917730177311773217733177341773517736177371773817739177401774117742177431774417745177461774717748177491775017751177521775317754177551775617757177581775917760177611776217763177641776517766177671776817769177701777117772177731777417775177761777717778177791778017781177821778317784177851778617787177881778917790177911779217793177941779517796177971779817799178001780117802178031780417805178061780717808178091781017811178121781317814178151781617817178181781917820178211782217823178241782517826178271782817829178301783117832178331783417835178361783717838178391784017841178421784317844178451784617847178481784917850178511785217853178541785517856178571785817859178601786117862178631786417865178661786717868178691787017871178721787317874178751787617877178781787917880178811788217883178841788517886178871788817889178901789117892178931789417895178961789717898178991790017901179021790317904179051790617907179081790917910179111791217913179141791517916179171791817919179201792117922179231792417925179261792717928179291793017931179321793317934179351793617937179381793917940179411794217943179441794517946179471794817949179501795117952179531795417955179561795717958179591796017961179621796317964179651796617967179681796917970179711797217973179741797517976179771797817979179801798117982179831798417985179861798717988179891799017991179921799317994179951799617997179981799918000180011800218003180041800518006180071800818009180101801118012180131801418015180161801718018180191802018021180221802318024180251802618027180281802918030180311803218033180341803518036180371803818039180401804118042180431804418045180461804718048180491805018051180521805318054180551805618057180581805918060180611806218063180641806518066180671806818069180701807118072180731807418075180761807718078180791808018081180821808318084180851808618087180881808918090180911809218093180941809518096180971809818099181001810118102181031810418105181061810718108181091811018111181121811318114181151811618117181181811918120181211812218123181241812518126181271812818129181301813118132181331813418135181361813718138181391814018141181421814318144181451814618147181481814918150181511815218153181541815518156181571815818159181601816118162181631816418165181661816718168181691817018171181721817318174181751817618177181781817918180181811818218183181841818518186181871818818189181901819118192181931819418195181961819718198181991820018201182021820318204182051820618207182081820918210182111821218213182141821518216182171821818219182201822118222182231822418225182261822718228182291823018231182321823318234182351823618237182381823918240182411824218243182441824518246182471824818249182501825118252182531825418255182561825718258182591826018261182621826318264182651826618267182681826918270182711827218273182741827518276182771827818279182801828118282182831828418285182861828718288182891829018291182921829318294182951829618297182981829918300183011830218303183041830518306183071830818309183101831118312183131831418315183161831718318183191832018321183221832318324183251832618327183281832918330183311833218333183341833518336183371833818339183401834118342183431834418345183461834718348183491835018351183521835318354183551835618357183581835918360183611836218363183641836518366183671836818369183701837118372183731837418375183761837718378183791838018381183821838318384183851838618387183881838918390183911839218393183941839518396183971839818399184001840118402184031840418405184061840718408184091841018411184121841318414184151841618417184181841918420184211842218423184241842518426184271842818429184301843118432184331843418435184361843718438184391844018441184421844318444184451844618447184481844918450184511845218453184541845518456184571845818459184601846118462184631846418465184661846718468184691847018471184721847318474184751847618477184781847918480184811848218483184841848518486184871848818489184901849118492184931849418495184961849718498184991850018501185021850318504185051850618507185081850918510185111851218513185141851518516185171851818519185201852118522185231852418525185261852718528185291853018531185321853318534185351853618537185381853918540185411854218543185441854518546185471854818549185501855118552185531855418555185561855718558185591856018561185621856318564185651856618567185681856918570185711857218573185741857518576185771857818579185801858118582185831858418585185861858718588185891859018591185921859318594185951859618597185981859918600186011860218603186041860518606186071860818609186101861118612186131861418615186161861718618186191862018621186221862318624186251862618627186281862918630186311863218633186341863518636186371863818639186401864118642186431864418645186461864718648186491865018651186521865318654186551865618657186581865918660186611866218663186641866518666186671866818669186701867118672186731867418675186761867718678186791868018681186821868318684186851868618687186881868918690186911869218693186941869518696186971869818699187001870118702187031870418705187061870718708187091871018711187121871318714187151871618717187181871918720187211872218723187241872518726187271872818729187301873118732187331873418735187361873718738187391874018741187421874318744187451874618747187481874918750187511875218753187541875518756187571875818759187601876118762187631876418765187661876718768187691877018771187721877318774187751877618777187781877918780187811878218783187841878518786187871878818789187901879118792187931879418795187961879718798187991880018801188021880318804188051880618807188081880918810188111881218813188141881518816188171881818819188201882118822188231882418825188261882718828188291883018831188321883318834188351883618837188381883918840188411884218843188441884518846188471884818849188501885118852188531885418855188561885718858188591886018861188621886318864188651886618867188681886918870188711887218873188741887518876188771887818879188801888118882188831888418885188861888718888188891889018891188921889318894188951889618897188981889918900189011890218903189041890518906189071890818909189101891118912189131891418915189161891718918189191892018921189221892318924189251892618927189281892918930189311893218933189341893518936189371893818939189401894118942189431894418945189461894718948189491895018951189521895318954189551895618957189581895918960189611896218963189641896518966189671896818969189701897118972189731897418975189761897718978189791898018981189821898318984189851898618987189881898918990189911899218993189941899518996189971899818999190001900119002190031900419005190061900719008190091901019011190121901319014190151901619017190181901919020190211902219023190241902519026190271902819029190301903119032190331903419035190361903719038190391904019041190421904319044190451904619047190481904919050190511905219053190541905519056190571905819059190601906119062190631906419065190661906719068190691907019071190721907319074190751907619077190781907919080190811908219083190841908519086190871908819089190901909119092190931909419095190961909719098190991910019101191021910319104191051910619107191081910919110191111911219113191141911519116191171911819119191201912119122191231912419125191261912719128191291913019131191321913319134191351913619137191381913919140191411914219143191441914519146191471914819149191501915119152191531915419155191561915719158191591916019161191621916319164191651916619167191681916919170191711917219173191741917519176191771917819179191801918119182191831918419185191861918719188191891919019191191921919319194191951919619197191981919919200192011920219203192041920519206192071920819209192101921119212192131921419215192161921719218192191922019221192221922319224192251922619227192281922919230192311923219233192341923519236192371923819239192401924119242192431924419245192461924719248192491925019251192521925319254192551925619257192581925919260192611926219263192641926519266192671926819269192701927119272192731927419275192761927719278192791928019281192821928319284192851928619287192881928919290192911929219293192941929519296192971929819299193001930119302193031930419305193061930719308193091931019311193121931319314193151931619317193181931919320193211932219323193241932519326193271932819329193301933119332193331933419335193361933719338193391934019341193421934319344193451934619347193481934919350193511935219353193541935519356193571935819359193601936119362193631936419365193661936719368193691937019371193721937319374193751937619377193781937919380193811938219383193841938519386193871938819389193901939119392193931939419395193961939719398193991940019401194021940319404194051940619407194081940919410194111941219413194141941519416194171941819419194201942119422194231942419425194261942719428194291943019431194321943319434194351943619437194381943919440194411944219443194441944519446194471944819449194501945119452194531945419455194561945719458194591946019461194621946319464194651946619467194681946919470194711947219473194741947519476194771947819479194801948119482194831948419485194861948719488194891949019491194921949319494194951949619497194981949919500195011950219503195041950519506195071950819509195101951119512195131951419515195161951719518195191952019521195221952319524195251952619527195281952919530195311953219533195341953519536195371953819539195401954119542195431954419545195461954719548195491955019551195521955319554195551955619557195581955919560195611956219563195641956519566195671956819569195701957119572195731957419575195761957719578195791958019581195821958319584195851958619587195881958919590195911959219593195941959519596195971959819599196001960119602196031960419605196061960719608196091961019611196121961319614196151961619617196181961919620196211962219623196241962519626196271962819629196301963119632196331963419635196361963719638196391964019641196421964319644196451964619647196481964919650196511965219653196541965519656196571965819659196601966119662196631966419665196661966719668196691967019671196721967319674196751967619677196781967919680196811968219683196841968519686196871968819689196901969119692196931969419695196961969719698196991970019701197021970319704197051970619707197081970919710197111971219713197141971519716197171971819719197201972119722197231972419725197261972719728197291973019731197321973319734197351973619737197381973919740197411974219743197441974519746197471974819749197501975119752197531975419755197561975719758197591976019761197621976319764197651976619767197681976919770197711977219773197741977519776197771977819779197801978119782197831978419785197861978719788197891979019791197921979319794197951979619797197981979919800198011980219803198041980519806198071980819809198101981119812198131981419815198161981719818198191982019821198221982319824198251982619827198281982919830198311983219833198341983519836198371983819839198401984119842198431984419845198461984719848198491985019851198521985319854198551985619857198581985919860198611986219863198641986519866198671986819869198701987119872198731987419875198761987719878198791988019881198821988319884198851988619887198881988919890198911989219893198941989519896198971989819899199001990119902199031990419905199061990719908199091991019911199121991319914199151991619917199181991919920199211992219923199241992519926199271992819929199301993119932199331993419935199361993719938199391994019941199421994319944199451994619947199481994919950199511995219953199541995519956199571995819959199601996119962199631996419965199661996719968199691997019971199721997319974199751997619977199781997919980199811998219983199841998519986199871998819989199901999119992199931999419995199961999719998199992000020001200022000320004200052000620007200082000920010200112001220013200142001520016200172001820019200202002120022200232002420025200262002720028200292003020031200322003320034200352003620037200382003920040200412004220043200442004520046200472004820049200502005120052200532005420055200562005720058200592006020061200622006320064200652006620067200682006920070200712007220073200742007520076200772007820079200802008120082200832008420085200862008720088200892009020091200922009320094200952009620097200982009920100201012010220103201042010520106201072010820109201102011120112201132011420115201162011720118201192012020121201222012320124201252012620127201282012920130201312013220133201342013520136201372013820139201402014120142201432014420145201462014720148201492015020151201522015320154201552015620157201582015920160201612016220163201642016520166201672016820169201702017120172201732017420175201762017720178201792018020181201822018320184201852018620187201882018920190201912019220193201942019520196201972019820199202002020120202202032020420205202062020720208202092021020211202122021320214202152021620217202182021920220202212022220223202242022520226202272022820229202302023120232202332023420235202362023720238202392024020241202422024320244202452024620247202482024920250202512025220253202542025520256202572025820259202602026120262202632026420265202662026720268202692027020271202722027320274202752027620277202782027920280202812028220283202842028520286202872028820289202902029120292202932029420295202962029720298202992030020301203022030320304203052030620307203082030920310203112031220313203142031520316203172031820319203202032120322203232032420325203262032720328203292033020331203322033320334203352033620337203382033920340203412034220343203442034520346203472034820349203502035120352203532035420355203562035720358203592036020361203622036320364203652036620367203682036920370203712037220373203742037520376203772037820379203802038120382203832038420385203862038720388203892039020391203922039320394203952039620397203982039920400204012040220403204042040520406204072040820409204102041120412204132041420415204162041720418204192042020421204222042320424204252042620427204282042920430204312043220433204342043520436204372043820439204402044120442204432044420445204462044720448204492045020451204522045320454204552045620457204582045920460204612046220463204642046520466204672046820469204702047120472204732047420475204762047720478204792048020481204822048320484204852048620487204882048920490204912049220493204942049520496204972049820499205002050120502205032050420505205062050720508205092051020511205122051320514205152051620517205182051920520205212052220523205242052520526205272052820529205302053120532205332053420535205362053720538205392054020541205422054320544205452054620547205482054920550205512055220553205542055520556205572055820559205602056120562205632056420565205662056720568205692057020571205722057320574205752057620577205782057920580205812058220583205842058520586205872058820589205902059120592205932059420595205962059720598205992060020601206022060320604206052060620607206082060920610206112061220613206142061520616206172061820619206202062120622206232062420625206262062720628206292063020631206322063320634206352063620637206382063920640206412064220643206442064520646206472064820649206502065120652206532065420655206562065720658206592066020661206622066320664206652066620667206682066920670206712067220673206742067520676206772067820679206802068120682206832068420685206862068720688206892069020691206922069320694206952069620697206982069920700207012070220703207042070520706207072070820709207102071120712207132071420715207162071720718207192072020721207222072320724207252072620727207282072920730207312073220733207342073520736207372073820739207402074120742207432074420745207462074720748207492075020751207522075320754207552075620757207582075920760207612076220763207642076520766207672076820769207702077120772207732077420775207762077720778207792078020781207822078320784207852078620787207882078920790207912079220793207942079520796207972079820799208002080120802208032080420805208062080720808208092081020811208122081320814208152081620817208182081920820208212082220823208242082520826208272082820829208302083120832208332083420835208362083720838208392084020841208422084320844208452084620847208482084920850208512085220853208542085520856208572085820859208602086120862208632086420865208662086720868208692087020871208722087320874208752087620877208782087920880208812088220883208842088520886208872088820889208902089120892208932089420895208962089720898208992090020901209022090320904209052090620907209082090920910209112091220913209142091520916209172091820919209202092120922209232092420925209262092720928209292093020931209322093320934209352093620937209382093920940209412094220943209442094520946209472094820949209502095120952209532095420955209562095720958209592096020961209622096320964209652096620967209682096920970209712097220973209742097520976209772097820979209802098120982209832098420985209862098720988209892099020991209922099320994209952099620997209982099921000210012100221003210042100521006210072100821009210102101121012210132101421015210162101721018210192102021021210222102321024210252102621027210282102921030210312103221033210342103521036210372103821039210402104121042210432104421045210462104721048210492105021051210522105321054210552105621057210582105921060210612106221063210642106521066210672106821069210702107121072210732107421075210762107721078210792108021081210822108321084210852108621087210882108921090210912109221093210942109521096210972109821099211002110121102211032110421105211062110721108211092111021111211122111321114211152111621117211182111921120211212112221123211242112521126211272112821129211302113121132211332113421135211362113721138211392114021141211422114321144211452114621147211482114921150211512115221153211542115521156211572115821159211602116121162211632116421165211662116721168211692117021171211722117321174211752117621177211782117921180211812118221183211842118521186211872118821189211902119121192211932119421195211962119721198211992120021201212022120321204212052120621207212082120921210212112121221213212142121521216212172121821219212202122121222212232122421225212262122721228212292123021231212322123321234212352123621237212382123921240212412124221243212442124521246212472124821249212502125121252212532125421255212562125721258212592126021261212622126321264212652126621267212682126921270212712127221273212742127521276212772127821279212802128121282212832128421285212862128721288212892129021291212922129321294212952129621297212982129921300213012130221303213042130521306213072130821309213102131121312213132131421315213162131721318213192132021321213222132321324213252132621327213282132921330213312133221333213342133521336213372133821339213402134121342213432134421345213462134721348213492135021351213522135321354213552135621357213582135921360213612136221363213642136521366213672136821369213702137121372213732137421375213762137721378213792138021381213822138321384213852138621387213882138921390213912139221393213942139521396213972139821399214002140121402214032140421405214062140721408214092141021411214122141321414214152141621417214182141921420214212142221423214242142521426214272142821429214302143121432214332143421435214362143721438214392144021441214422144321444214452144621447214482144921450214512145221453214542145521456214572145821459214602146121462214632146421465214662146721468214692147021471214722147321474214752147621477214782147921480214812148221483214842148521486214872148821489214902149121492214932149421495214962149721498214992150021501215022150321504215052150621507215082150921510215112151221513215142151521516215172151821519215202152121522215232152421525215262152721528215292153021531215322153321534215352153621537215382153921540215412154221543215442154521546215472154821549215502155121552215532155421555215562155721558215592156021561215622156321564215652156621567215682156921570215712157221573215742157521576215772157821579215802158121582215832158421585215862158721588215892159021591215922159321594215952159621597215982159921600216012160221603216042160521606216072160821609216102161121612216132161421615216162161721618216192162021621216222162321624216252162621627216282162921630216312163221633216342163521636216372163821639216402164121642216432164421645216462164721648216492165021651216522165321654216552165621657216582165921660216612166221663216642166521666216672166821669216702167121672216732167421675216762167721678216792168021681216822168321684216852168621687216882168921690216912169221693216942169521696216972169821699217002170121702217032170421705217062170721708217092171021711217122171321714217152171621717217182171921720217212172221723217242172521726217272172821729217302173121732217332173421735217362173721738217392174021741217422174321744217452174621747217482174921750217512175221753217542175521756217572175821759217602176121762217632176421765217662176721768217692177021771217722177321774217752177621777217782177921780217812178221783217842178521786217872178821789217902179121792217932179421795217962179721798217992180021801218022180321804218052180621807218082180921810218112181221813218142181521816218172181821819218202182121822218232182421825218262182721828218292183021831218322183321834218352183621837218382183921840218412184221843218442184521846218472184821849218502185121852218532185421855218562185721858218592186021861218622186321864218652186621867218682186921870218712187221873218742187521876218772187821879218802188121882218832188421885218862188721888218892189021891218922189321894218952189621897218982189921900219012190221903219042190521906219072190821909219102191121912219132191421915219162191721918219192192021921219222192321924219252192621927219282192921930219312193221933219342193521936219372193821939219402194121942219432194421945219462194721948219492195021951219522195321954219552195621957219582195921960219612196221963219642196521966219672196821969219702197121972219732197421975219762197721978219792198021981219822198321984219852198621987219882198921990219912199221993219942199521996219972199821999220002200122002220032200422005220062200722008220092201022011220122201322014220152201622017220182201922020220212202222023220242202522026220272202822029220302203122032220332203422035220362203722038220392204022041220422204322044220452204622047220482204922050220512205222053220542205522056220572205822059220602206122062220632206422065220662206722068220692207022071220722207322074220752207622077220782207922080220812208222083220842208522086220872208822089220902209122092220932209422095220962209722098220992210022101221022210322104221052210622107221082210922110221112211222113221142211522116221172211822119221202212122122221232212422125221262212722128221292213022131221322213322134221352213622137221382213922140221412214222143221442214522146221472214822149221502215122152221532215422155221562215722158221592216022161221622216322164221652216622167221682216922170221712217222173221742217522176221772217822179221802218122182221832218422185221862218722188221892219022191221922219322194221952219622197221982219922200222012220222203222042220522206222072220822209222102221122212222132221422215222162221722218222192222022221222222222322224222252222622227222282222922230222312223222233222342223522236222372223822239222402224122242222432224422245222462224722248222492225022251222522225322254222552225622257222582225922260222612226222263222642226522266222672226822269222702227122272222732227422275222762227722278222792228022281222822228322284222852228622287222882228922290222912229222293222942229522296222972229822299223002230122302223032230422305223062230722308223092231022311223122231322314223152231622317223182231922320223212232222323223242232522326223272232822329223302233122332223332233422335223362233722338223392234022341223422234322344223452234622347223482234922350223512235222353223542235522356223572235822359223602236122362223632236422365223662236722368223692237022371223722237322374223752237622377223782237922380223812238222383223842238522386223872238822389223902239122392223932239422395223962239722398223992240022401224022240322404224052240622407224082240922410224112241222413224142241522416224172241822419224202242122422224232242422425224262242722428224292243022431224322243322434224352243622437224382243922440224412244222443224442244522446224472244822449224502245122452224532245422455224562245722458224592246022461224622246322464224652246622467224682246922470224712247222473224742247522476224772247822479224802248122482224832248422485224862248722488224892249022491224922249322494224952249622497224982249922500225012250222503225042250522506225072250822509225102251122512225132251422515225162251722518225192252022521225222252322524225252252622527225282252922530225312253222533225342253522536225372253822539225402254122542225432254422545225462254722548225492255022551225522255322554225552255622557225582255922560225612256222563225642256522566225672256822569225702257122572225732257422575225762257722578225792258022581225822258322584225852258622587225882258922590225912259222593225942259522596225972259822599226002260122602226032260422605226062260722608226092261022611226122261322614226152261622617226182261922620226212262222623226242262522626226272262822629226302263122632226332263422635226362263722638226392264022641226422264322644226452264622647226482264922650226512265222653226542265522656226572265822659226602266122662226632266422665226662266722668226692267022671226722267322674226752267622677226782267922680226812268222683226842268522686226872268822689226902269122692226932269422695226962269722698226992270022701227022270322704227052270622707227082270922710227112271222713227142271522716227172271822719227202272122722227232272422725227262272722728227292273022731227322273322734227352273622737227382273922740227412274222743227442274522746227472274822749227502275122752227532275422755227562275722758227592276022761227622276322764227652276622767227682276922770227712277222773227742277522776227772277822779227802278122782227832278422785227862278722788227892279022791227922279322794227952279622797227982279922800228012280222803228042280522806228072280822809228102281122812228132281422815228162281722818228192282022821228222282322824228252282622827228282282922830228312283222833228342283522836228372283822839228402284122842228432284422845228462284722848228492285022851228522285322854228552285622857228582285922860228612286222863228642286522866228672286822869228702287122872228732287422875228762287722878228792288022881228822288322884228852288622887228882288922890228912289222893228942289522896228972289822899229002290122902229032290422905229062290722908229092291022911229122291322914229152291622917229182291922920229212292222923229242292522926229272292822929229302293122932229332293422935229362293722938229392294022941229422294322944229452294622947229482294922950229512295222953229542295522956229572295822959229602296122962229632296422965229662296722968229692297022971229722297322974229752297622977229782297922980229812298222983229842298522986229872298822989229902299122992229932299422995229962299722998229992300023001230022300323004230052300623007230082300923010230112301223013230142301523016230172301823019230202302123022230232302423025230262302723028230292303023031230322303323034230352303623037230382303923040230412304223043230442304523046230472304823049230502305123052230532305423055230562305723058230592306023061230622306323064230652306623067230682306923070230712307223073230742307523076230772307823079230802308123082230832308423085230862308723088230892309023091230922309323094230952309623097230982309923100231012310223103231042310523106231072310823109231102311123112231132311423115231162311723118231192312023121231222312323124231252312623127231282312923130231312313223133231342313523136231372313823139231402314123142231432314423145231462314723148231492315023151231522315323154231552315623157231582315923160231612316223163231642316523166231672316823169231702317123172231732317423175231762317723178231792318023181231822318323184231852318623187231882318923190231912319223193231942319523196231972319823199232002320123202232032320423205232062320723208232092321023211232122321323214232152321623217232182321923220232212322223223232242322523226232272322823229232302323123232232332323423235232362323723238232392324023241232422324323244232452324623247232482324923250232512325223253232542325523256232572325823259232602326123262232632326423265232662326723268232692327023271232722327323274232752327623277232782327923280232812328223283232842328523286232872328823289232902329123292232932329423295232962329723298232992330023301233022330323304233052330623307233082330923310233112331223313233142331523316233172331823319233202332123322233232332423325233262332723328233292333023331233322333323334233352333623337233382333923340233412334223343233442334523346233472334823349233502335123352233532335423355233562335723358233592336023361233622336323364233652336623367233682336923370233712337223373233742337523376233772337823379233802338123382233832338423385233862338723388233892339023391233922339323394233952339623397233982339923400234012340223403234042340523406234072340823409234102341123412234132341423415234162341723418234192342023421234222342323424234252342623427234282342923430234312343223433234342343523436234372343823439234402344123442234432344423445234462344723448234492345023451234522345323454234552345623457234582345923460234612346223463234642346523466234672346823469234702347123472234732347423475234762347723478234792348023481234822348323484234852348623487234882348923490234912349223493234942349523496234972349823499235002350123502235032350423505235062350723508235092351023511235122351323514235152351623517235182351923520235212352223523235242352523526235272352823529235302353123532235332353423535235362353723538235392354023541235422354323544235452354623547235482354923550235512355223553235542355523556235572355823559235602356123562235632356423565235662356723568235692357023571235722357323574235752357623577235782357923580235812358223583235842358523586235872358823589235902359123592235932359423595235962359723598235992360023601236022360323604236052360623607236082360923610236112361223613236142361523616236172361823619236202362123622236232362423625236262362723628236292363023631236322363323634236352363623637236382363923640236412364223643236442364523646236472364823649236502365123652236532365423655236562365723658236592366023661236622366323664236652366623667236682366923670236712367223673236742367523676236772367823679236802368123682236832368423685236862368723688236892369023691236922369323694236952369623697236982369923700237012370223703237042370523706237072370823709237102371123712237132371423715237162371723718237192372023721237222372323724237252372623727237282372923730237312373223733237342373523736237372373823739237402374123742237432374423745237462374723748237492375023751237522375323754237552375623757237582375923760237612376223763237642376523766237672376823769237702377123772237732377423775237762377723778237792378023781237822378323784237852378623787237882378923790237912379223793237942379523796237972379823799238002380123802238032380423805238062380723808238092381023811238122381323814238152381623817238182381923820238212382223823238242382523826238272382823829238302383123832238332383423835238362383723838238392384023841238422384323844238452384623847238482384923850238512385223853
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],{
  2. /***/ 1:
  3. /*!*********************************************************!*\
  4. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  5. \*********************************************************/
  6. /*! no static exports found */
  7. /***/ (function(module, exports, __webpack_require__) {
  8. "use strict";
  9. Object.defineProperty(exports, "__esModule", {
  10. value: true
  11. });
  12. exports.default = void 0;
  13. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet'];
  14. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  15. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  16. return this;
  17. }();
  18. var key = ['w', 'x'].join('');
  19. var oldWx = target[key];
  20. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  21. function isWxKey(key) {
  22. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  23. return false;
  24. }
  25. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  26. }
  27. function initWx() {
  28. var newWx = {};
  29. for (var _key in oldWx) {
  30. if (isWxKey(_key)) {
  31. // TODO wrapper function
  32. newWx[_key] = oldWx[_key];
  33. }
  34. }
  35. return newWx;
  36. }
  37. target[key] = initWx();
  38. var _default = target[key];
  39. exports.default = _default;
  40. /***/ }),
  41. /***/ 10:
  42. /*!****************************************************************!*\
  43. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  44. \****************************************************************/
  45. /*! no static exports found */
  46. /***/ (function(module, exports) {
  47. function _nonIterableRest() {
  48. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  49. }
  50. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  51. /***/ }),
  52. /***/ 11:
  53. /*!***************************************************************!*\
  54. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  55. \***************************************************************/
  56. /*! no static exports found */
  57. /***/ (function(module, exports, __webpack_require__) {
  58. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  59. function _defineProperty(obj, key, value) {
  60. key = toPropertyKey(key);
  61. if (key in obj) {
  62. Object.defineProperty(obj, key, {
  63. value: value,
  64. enumerable: true,
  65. configurable: true,
  66. writable: true
  67. });
  68. } else {
  69. obj[key] = value;
  70. }
  71. return obj;
  72. }
  73. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  74. /***/ }),
  75. /***/ 12:
  76. /*!**************************************************************!*\
  77. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  78. \**************************************************************/
  79. /*! no static exports found */
  80. /***/ (function(module, exports, __webpack_require__) {
  81. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  82. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  83. function _toPropertyKey(arg) {
  84. var key = toPrimitive(arg, "string");
  85. return _typeof(key) === "symbol" ? key : String(key);
  86. }
  87. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  88. /***/ }),
  89. /***/ 13:
  90. /*!*******************************************************!*\
  91. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  92. \*******************************************************/
  93. /*! no static exports found */
  94. /***/ (function(module, exports) {
  95. function _typeof(obj) {
  96. "@babel/helpers - typeof";
  97. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  98. return typeof obj;
  99. } : function (obj) {
  100. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  101. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  102. }
  103. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  104. /***/ }),
  105. /***/ 14:
  106. /*!************************************************************!*\
  107. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  108. \************************************************************/
  109. /*! no static exports found */
  110. /***/ (function(module, exports, __webpack_require__) {
  111. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  112. function _toPrimitive(input, hint) {
  113. if (_typeof(input) !== "object" || input === null) return input;
  114. var prim = input[Symbol.toPrimitive];
  115. if (prim !== undefined) {
  116. var res = prim.call(input, hint || "default");
  117. if (_typeof(res) !== "object") return res;
  118. throw new TypeError("@@toPrimitive must return a primitive value.");
  119. }
  120. return (hint === "string" ? String : Number)(input);
  121. }
  122. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  123. /***/ }),
  124. /***/ 15:
  125. /*!**********************************************************!*\
  126. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  127. \**********************************************************/
  128. /*! no static exports found */
  129. /***/ (function(module, exports, __webpack_require__) {
  130. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  131. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  132. function _construct(Parent, args, Class) {
  133. if (isNativeReflectConstruct()) {
  134. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  135. } else {
  136. module.exports = _construct = function _construct(Parent, args, Class) {
  137. var a = [null];
  138. a.push.apply(a, args);
  139. var Constructor = Function.bind.apply(Parent, a);
  140. var instance = new Constructor();
  141. if (Class) setPrototypeOf(instance, Class.prototype);
  142. return instance;
  143. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  144. }
  145. return _construct.apply(null, arguments);
  146. }
  147. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  148. /***/ }),
  149. /***/ 16:
  150. /*!***************************************************************!*\
  151. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  152. \***************************************************************/
  153. /*! no static exports found */
  154. /***/ (function(module, exports) {
  155. function _setPrototypeOf(o, p) {
  156. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  157. o.__proto__ = p;
  158. return o;
  159. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  160. return _setPrototypeOf(o, p);
  161. }
  162. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  163. /***/ }),
  164. /***/ 17:
  165. /*!*************************************************************************!*\
  166. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  167. \*************************************************************************/
  168. /*! no static exports found */
  169. /***/ (function(module, exports) {
  170. function _isNativeReflectConstruct() {
  171. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  172. if (Reflect.construct.sham) return false;
  173. if (typeof Proxy === "function") return true;
  174. try {
  175. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  176. return true;
  177. } catch (e) {
  178. return false;
  179. }
  180. }
  181. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  182. /***/ }),
  183. /***/ 18:
  184. /*!******************************************************************!*\
  185. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  186. \******************************************************************/
  187. /*! no static exports found */
  188. /***/ (function(module, exports, __webpack_require__) {
  189. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  190. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  191. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  192. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  193. function _toConsumableArray(arr) {
  194. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  195. }
  196. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  197. /***/ }),
  198. /***/ 184:
  199. /*!*******************************************!*\
  200. !*** E:/项目资料/智慧社区/Applet/api/integral.js ***!
  201. \*******************************************/
  202. /*! no static exports found */
  203. /***/ (function(module, exports, __webpack_require__) {
  204. "use strict";
  205. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  206. Object.defineProperty(exports, "__esModule", {
  207. value: true
  208. });
  209. exports.default = void 0;
  210. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  211. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  212. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  213. var getIntegral = /*#__PURE__*/function () {
  214. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  215. var res;
  216. return _regenerator.default.wrap(function _callee$(_context) {
  217. while (1) {
  218. switch (_context.prev = _context.next) {
  219. case 0:
  220. _context.next = 2;
  221. return _request.default.get({
  222. url: "/wx/points/point",
  223. data: data
  224. });
  225. case 2:
  226. res = _context.sent;
  227. return _context.abrupt("return", res.data);
  228. case 4:
  229. case "end":
  230. return _context.stop();
  231. }
  232. }
  233. }, _callee);
  234. }));
  235. return function getIntegral(_x) {
  236. return _ref.apply(this, arguments);
  237. };
  238. }();
  239. var getRanking = /*#__PURE__*/function () {
  240. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  241. var res;
  242. return _regenerator.default.wrap(function _callee2$(_context2) {
  243. while (1) {
  244. switch (_context2.prev = _context2.next) {
  245. case 0:
  246. _context2.next = 2;
  247. return _request.default.get({
  248. url: '/wx/points/ranking-list'
  249. });
  250. case 2:
  251. res = _context2.sent;
  252. return _context2.abrupt("return", res.data);
  253. case 4:
  254. case "end":
  255. return _context2.stop();
  256. }
  257. }
  258. }, _callee2);
  259. }));
  260. return function getRanking(_x2) {
  261. return _ref2.apply(this, arguments);
  262. };
  263. }();
  264. var _default = {
  265. getIntegral: getIntegral,
  266. getRanking: getRanking
  267. };
  268. exports.default = _default;
  269. /***/ }),
  270. /***/ 19:
  271. /*!******************************************************************!*\
  272. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  273. \******************************************************************/
  274. /*! no static exports found */
  275. /***/ (function(module, exports, __webpack_require__) {
  276. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  277. function _arrayWithoutHoles(arr) {
  278. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  279. }
  280. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  281. /***/ }),
  282. /***/ 193:
  283. /*!*******************************************!*\
  284. !*** E:/项目资料/智慧社区/Applet/api/activity.js ***!
  285. \*******************************************/
  286. /*! no static exports found */
  287. /***/ (function(module, exports, __webpack_require__) {
  288. "use strict";
  289. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  290. Object.defineProperty(exports, "__esModule", {
  291. value: true
  292. });
  293. exports.default = void 0;
  294. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  295. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  296. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  297. var getActivity = /*#__PURE__*/function () {
  298. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  299. var res;
  300. return _regenerator.default.wrap(function _callee$(_context) {
  301. while (1) {
  302. switch (_context.prev = _context.next) {
  303. case 0:
  304. _context.next = 2;
  305. return _request.default.get({
  306. url: "/activity/list",
  307. data: data
  308. });
  309. case 2:
  310. res = _context.sent;
  311. return _context.abrupt("return", res.data);
  312. case 4:
  313. case "end":
  314. return _context.stop();
  315. }
  316. }
  317. }, _callee);
  318. }));
  319. return function getActivity(_x) {
  320. return _ref.apply(this, arguments);
  321. };
  322. }();
  323. var getdetails = /*#__PURE__*/function () {
  324. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref2) {
  325. var activityId, res;
  326. return _regenerator.default.wrap(function _callee2$(_context2) {
  327. while (1) {
  328. switch (_context2.prev = _context2.next) {
  329. case 0:
  330. activityId = _ref2.activityId;
  331. _context2.next = 3;
  332. return _request.default.get({
  333. url: "/activity/".concat(activityId)
  334. });
  335. case 3:
  336. res = _context2.sent;
  337. return _context2.abrupt("return", res.data);
  338. case 5:
  339. case "end":
  340. return _context2.stop();
  341. }
  342. }
  343. }, _callee2);
  344. }));
  345. return function getdetails(_x2) {
  346. return _ref3.apply(this, arguments);
  347. };
  348. }();
  349. var getstatus = /*#__PURE__*/function () {
  350. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref4) {
  351. var activityId, res;
  352. return _regenerator.default.wrap(function _callee3$(_context3) {
  353. while (1) {
  354. switch (_context3.prev = _context3.next) {
  355. case 0:
  356. activityId = _ref4.activityId;
  357. _context3.next = 3;
  358. return _request.default.get({
  359. url: "/activity/status/".concat(activityId)
  360. });
  361. case 3:
  362. res = _context3.sent;
  363. return _context3.abrupt("return", res.data);
  364. case 5:
  365. case "end":
  366. return _context3.stop();
  367. }
  368. }
  369. }, _callee3);
  370. }));
  371. return function getstatus(_x3) {
  372. return _ref5.apply(this, arguments);
  373. };
  374. }();
  375. var report = /*#__PURE__*/function () {
  376. var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref6) {
  377. var activityId, res;
  378. return _regenerator.default.wrap(function _callee4$(_context4) {
  379. while (1) {
  380. switch (_context4.prev = _context4.next) {
  381. case 0:
  382. activityId = _ref6.activityId;
  383. _context4.next = 3;
  384. return _request.default.post({
  385. url: "/activity/report/".concat(activityId)
  386. });
  387. case 3:
  388. res = _context4.sent;
  389. return _context4.abrupt("return", res.data);
  390. case 5:
  391. case "end":
  392. return _context4.stop();
  393. }
  394. }
  395. }, _callee4);
  396. }));
  397. return function report(_x4) {
  398. return _ref7.apply(this, arguments);
  399. };
  400. }();
  401. var offReport = /*#__PURE__*/function () {
  402. var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_ref8) {
  403. var activityId, res;
  404. return _regenerator.default.wrap(function _callee5$(_context5) {
  405. while (1) {
  406. switch (_context5.prev = _context5.next) {
  407. case 0:
  408. activityId = _ref8.activityId;
  409. _context5.next = 3;
  410. return _request.default.del({
  411. url: "/activity/report-cancel/".concat(activityId)
  412. });
  413. case 3:
  414. res = _context5.sent;
  415. return _context5.abrupt("return", res.data);
  416. case 5:
  417. case "end":
  418. return _context5.stop();
  419. }
  420. }
  421. }, _callee5);
  422. }));
  423. return function offReport(_x5) {
  424. return _ref9.apply(this, arguments);
  425. };
  426. }();
  427. var uploadImgs = /*#__PURE__*/function () {
  428. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(data) {
  429. var res;
  430. return _regenerator.default.wrap(function _callee6$(_context6) {
  431. while (1) {
  432. switch (_context6.prev = _context6.next) {
  433. case 0:
  434. _context6.next = 2;
  435. return _request.default.post({
  436. url: "/activity/submit-photo",
  437. data: data
  438. });
  439. case 2:
  440. res = _context6.sent;
  441. return _context6.abrupt("return", res.data);
  442. case 4:
  443. case "end":
  444. return _context6.stop();
  445. }
  446. }
  447. }, _callee6);
  448. }));
  449. return function uploadImgs(_x6) {
  450. return _ref10.apply(this, arguments);
  451. };
  452. }();
  453. var getPhotos = /*#__PURE__*/function () {
  454. var _ref12 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(_ref11) {
  455. var activityId, res;
  456. return _regenerator.default.wrap(function _callee7$(_context7) {
  457. while (1) {
  458. switch (_context7.prev = _context7.next) {
  459. case 0:
  460. activityId = _ref11.activityId;
  461. _context7.next = 3;
  462. return _request.default.get({
  463. url: "/activity/log-details/".concat(activityId)
  464. });
  465. case 3:
  466. res = _context7.sent;
  467. return _context7.abrupt("return", res.data);
  468. case 5:
  469. case "end":
  470. return _context7.stop();
  471. }
  472. }
  473. }, _callee7);
  474. }));
  475. return function getPhotos(_x7) {
  476. return _ref12.apply(this, arguments);
  477. };
  478. }();
  479. var getTypeList = /*#__PURE__*/function () {
  480. var _ref14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(_ref13) {
  481. var alias, res;
  482. return _regenerator.default.wrap(function _callee8$(_context8) {
  483. while (1) {
  484. switch (_context8.prev = _context8.next) {
  485. case 0:
  486. alias = _ref13.alias;
  487. _context8.next = 3;
  488. return _request.default.get({
  489. url: "/cms/type/sublist/".concat(alias)
  490. });
  491. case 3:
  492. res = _context8.sent;
  493. return _context8.abrupt("return", res.data);
  494. case 5:
  495. case "end":
  496. return _context8.stop();
  497. }
  498. }
  499. }, _callee8);
  500. }));
  501. return function getTypeList(_x8) {
  502. return _ref14.apply(this, arguments);
  503. };
  504. }();
  505. var _default = {
  506. getActivity: getActivity,
  507. getdetails: getdetails,
  508. getstatus: getstatus,
  509. report: report,
  510. offReport: offReport,
  511. uploadImgs: uploadImgs,
  512. getPhotos: getPhotos,
  513. getTypeList: getTypeList
  514. };
  515. exports.default = _default;
  516. /***/ }),
  517. /***/ 2:
  518. /*!************************************************************!*\
  519. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  520. \************************************************************/
  521. /*! no static exports found */
  522. /***/ (function(module, exports, __webpack_require__) {
  523. "use strict";
  524. /* WEBPACK VAR INJECTION */(function(wx, global) {
  525. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  526. Object.defineProperty(exports, "__esModule", {
  527. value: true
  528. });
  529. exports.createApp = createApp;
  530. exports.createComponent = createComponent;
  531. exports.createPage = createPage;
  532. exports.createPlugin = createPlugin;
  533. exports.createSubpackageApp = createSubpackageApp;
  534. exports.default = void 0;
  535. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  536. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  537. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  538. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  539. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  540. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  541. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  542. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  543. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  544. var realAtob;
  545. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  546. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  547. if (typeof atob !== 'function') {
  548. realAtob = function realAtob(str) {
  549. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  550. if (!b64re.test(str)) {
  551. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  552. }
  553. // Adding the padding if missing, for semplicity
  554. str += '=='.slice(2 - (str.length & 3));
  555. var bitmap;
  556. var result = '';
  557. var r1;
  558. var r2;
  559. var i = 0;
  560. for (; i < str.length;) {
  561. bitmap = b64.indexOf(str.charAt(i++)) << 18 | b64.indexOf(str.charAt(i++)) << 12 | (r1 = b64.indexOf(str.charAt(i++))) << 6 | (r2 = b64.indexOf(str.charAt(i++)));
  562. result += r1 === 64 ? String.fromCharCode(bitmap >> 16 & 255) : r2 === 64 ? String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255) : String.fromCharCode(bitmap >> 16 & 255, bitmap >> 8 & 255, bitmap & 255);
  563. }
  564. return result;
  565. };
  566. } else {
  567. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  568. realAtob = atob;
  569. }
  570. function b64DecodeUnicode(str) {
  571. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  572. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  573. }).join(''));
  574. }
  575. function getCurrentUserInfo() {
  576. var token = wx.getStorageSync('uni_id_token') || '';
  577. var tokenArr = token.split('.');
  578. if (!token || tokenArr.length !== 3) {
  579. return {
  580. uid: null,
  581. role: [],
  582. permission: [],
  583. tokenExpired: 0
  584. };
  585. }
  586. var userInfo;
  587. try {
  588. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  589. } catch (error) {
  590. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  591. }
  592. userInfo.tokenExpired = userInfo.exp * 1000;
  593. delete userInfo.exp;
  594. delete userInfo.iat;
  595. return userInfo;
  596. }
  597. function uniIdMixin(Vue) {
  598. Vue.prototype.uniIDHasRole = function (roleId) {
  599. var _getCurrentUserInfo = getCurrentUserInfo(),
  600. role = _getCurrentUserInfo.role;
  601. return role.indexOf(roleId) > -1;
  602. };
  603. Vue.prototype.uniIDHasPermission = function (permissionId) {
  604. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  605. permission = _getCurrentUserInfo2.permission;
  606. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  607. };
  608. Vue.prototype.uniIDTokenValid = function () {
  609. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  610. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  611. return tokenExpired > Date.now();
  612. };
  613. }
  614. var _toString = Object.prototype.toString;
  615. var hasOwnProperty = Object.prototype.hasOwnProperty;
  616. function isFn(fn) {
  617. return typeof fn === 'function';
  618. }
  619. function isStr(str) {
  620. return typeof str === 'string';
  621. }
  622. function isObject(obj) {
  623. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  624. }
  625. function isPlainObject(obj) {
  626. return _toString.call(obj) === '[object Object]';
  627. }
  628. function hasOwn(obj, key) {
  629. return hasOwnProperty.call(obj, key);
  630. }
  631. function noop() {}
  632. /**
  633. * Create a cached version of a pure function.
  634. */
  635. function cached(fn) {
  636. var cache = Object.create(null);
  637. return function cachedFn(str) {
  638. var hit = cache[str];
  639. return hit || (cache[str] = fn(str));
  640. };
  641. }
  642. /**
  643. * Camelize a hyphen-delimited string.
  644. */
  645. var camelizeRE = /-(\w)/g;
  646. var camelize = cached(function (str) {
  647. return str.replace(camelizeRE, function (_, c) {
  648. return c ? c.toUpperCase() : '';
  649. });
  650. });
  651. function sortObject(obj) {
  652. var sortObj = {};
  653. if (isPlainObject(obj)) {
  654. Object.keys(obj).sort().forEach(function (key) {
  655. sortObj[key] = obj[key];
  656. });
  657. }
  658. return !Object.keys(sortObj) ? obj : sortObj;
  659. }
  660. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  661. var globalInterceptors = {};
  662. var scopedInterceptors = {};
  663. function mergeHook(parentVal, childVal) {
  664. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  665. return res ? dedupeHooks(res) : res;
  666. }
  667. function dedupeHooks(hooks) {
  668. var res = [];
  669. for (var i = 0; i < hooks.length; i++) {
  670. if (res.indexOf(hooks[i]) === -1) {
  671. res.push(hooks[i]);
  672. }
  673. }
  674. return res;
  675. }
  676. function removeHook(hooks, hook) {
  677. var index = hooks.indexOf(hook);
  678. if (index !== -1) {
  679. hooks.splice(index, 1);
  680. }
  681. }
  682. function mergeInterceptorHook(interceptor, option) {
  683. Object.keys(option).forEach(function (hook) {
  684. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  685. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  686. }
  687. });
  688. }
  689. function removeInterceptorHook(interceptor, option) {
  690. if (!interceptor || !option) {
  691. return;
  692. }
  693. Object.keys(option).forEach(function (hook) {
  694. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  695. removeHook(interceptor[hook], option[hook]);
  696. }
  697. });
  698. }
  699. function addInterceptor(method, option) {
  700. if (typeof method === 'string' && isPlainObject(option)) {
  701. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  702. } else if (isPlainObject(method)) {
  703. mergeInterceptorHook(globalInterceptors, method);
  704. }
  705. }
  706. function removeInterceptor(method, option) {
  707. if (typeof method === 'string') {
  708. if (isPlainObject(option)) {
  709. removeInterceptorHook(scopedInterceptors[method], option);
  710. } else {
  711. delete scopedInterceptors[method];
  712. }
  713. } else if (isPlainObject(method)) {
  714. removeInterceptorHook(globalInterceptors, method);
  715. }
  716. }
  717. function wrapperHook(hook, params) {
  718. return function (data) {
  719. return hook(data, params) || data;
  720. };
  721. }
  722. function isPromise(obj) {
  723. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  724. }
  725. function queue(hooks, data, params) {
  726. var promise = false;
  727. for (var i = 0; i < hooks.length; i++) {
  728. var hook = hooks[i];
  729. if (promise) {
  730. promise = Promise.resolve(wrapperHook(hook, params));
  731. } else {
  732. var res = hook(data, params);
  733. if (isPromise(res)) {
  734. promise = Promise.resolve(res);
  735. }
  736. if (res === false) {
  737. return {
  738. then: function then() {}
  739. };
  740. }
  741. }
  742. }
  743. return promise || {
  744. then: function then(callback) {
  745. return callback(data);
  746. }
  747. };
  748. }
  749. function wrapperOptions(interceptor) {
  750. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  751. ['success', 'fail', 'complete'].forEach(function (name) {
  752. if (Array.isArray(interceptor[name])) {
  753. var oldCallback = options[name];
  754. options[name] = function callbackInterceptor(res) {
  755. queue(interceptor[name], res, options).then(function (res) {
  756. /* eslint-disable no-mixed-operators */
  757. return isFn(oldCallback) && oldCallback(res) || res;
  758. });
  759. };
  760. }
  761. });
  762. return options;
  763. }
  764. function wrapperReturnValue(method, returnValue) {
  765. var returnValueHooks = [];
  766. if (Array.isArray(globalInterceptors.returnValue)) {
  767. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  768. }
  769. var interceptor = scopedInterceptors[method];
  770. if (interceptor && Array.isArray(interceptor.returnValue)) {
  771. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  772. }
  773. returnValueHooks.forEach(function (hook) {
  774. returnValue = hook(returnValue) || returnValue;
  775. });
  776. return returnValue;
  777. }
  778. function getApiInterceptorHooks(method) {
  779. var interceptor = Object.create(null);
  780. Object.keys(globalInterceptors).forEach(function (hook) {
  781. if (hook !== 'returnValue') {
  782. interceptor[hook] = globalInterceptors[hook].slice();
  783. }
  784. });
  785. var scopedInterceptor = scopedInterceptors[method];
  786. if (scopedInterceptor) {
  787. Object.keys(scopedInterceptor).forEach(function (hook) {
  788. if (hook !== 'returnValue') {
  789. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  790. }
  791. });
  792. }
  793. return interceptor;
  794. }
  795. function invokeApi(method, api, options) {
  796. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  797. params[_key - 3] = arguments[_key];
  798. }
  799. var interceptor = getApiInterceptorHooks(method);
  800. if (interceptor && Object.keys(interceptor).length) {
  801. if (Array.isArray(interceptor.invoke)) {
  802. var res = queue(interceptor.invoke, options);
  803. return res.then(function (options) {
  804. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  805. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  806. });
  807. } else {
  808. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  809. }
  810. }
  811. return api.apply(void 0, [options].concat(params));
  812. }
  813. var promiseInterceptor = {
  814. returnValue: function returnValue(res) {
  815. if (!isPromise(res)) {
  816. return res;
  817. }
  818. return new Promise(function (resolve, reject) {
  819. res.then(function (res) {
  820. if (res[0]) {
  821. reject(res[0]);
  822. } else {
  823. resolve(res[1]);
  824. }
  825. });
  826. });
  827. }
  828. };
  829. var SYNC_API_RE = /^\$|Window$|WindowStyle$|sendHostEvent|sendNativeEvent|restoreGlobal|requireGlobal|getCurrentSubNVue|getMenuButtonBoundingClientRect|^report|interceptors|Interceptor$|getSubNVueById|requireNativePlugin|upx2px|hideKeyboard|canIUse|^create|Sync$|Manager$|base64ToArrayBuffer|arrayBufferToBase64|getLocale|setLocale|invokePushCallback|getWindowInfo|getDeviceInfo|getAppBaseInfo|getSystemSetting|getAppAuthorizeSetting|initUTS|requireUTS|registerUTS/;
  830. var CONTEXT_API_RE = /^create|Manager$/;
  831. // Context例外情况
  832. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  833. // 同步例外情况
  834. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  835. var CALLBACK_API_RE = /^on|^off/;
  836. function isContextApi(name) {
  837. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  838. }
  839. function isSyncApi(name) {
  840. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  841. }
  842. function isCallbackApi(name) {
  843. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  844. }
  845. function handlePromise(promise) {
  846. return promise.then(function (data) {
  847. return [null, data];
  848. }).catch(function (err) {
  849. return [err];
  850. });
  851. }
  852. function shouldPromise(name) {
  853. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  854. return false;
  855. }
  856. return true;
  857. }
  858. /* eslint-disable no-extend-native */
  859. if (!Promise.prototype.finally) {
  860. Promise.prototype.finally = function (callback) {
  861. var promise = this.constructor;
  862. return this.then(function (value) {
  863. return promise.resolve(callback()).then(function () {
  864. return value;
  865. });
  866. }, function (reason) {
  867. return promise.resolve(callback()).then(function () {
  868. throw reason;
  869. });
  870. });
  871. };
  872. }
  873. function promisify(name, api) {
  874. if (!shouldPromise(name) || !isFn(api)) {
  875. return api;
  876. }
  877. return function promiseApi() {
  878. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  879. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  880. params[_key2 - 1] = arguments[_key2];
  881. }
  882. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  883. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  884. }
  885. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  886. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  887. success: resolve,
  888. fail: reject
  889. })].concat(params));
  890. })));
  891. };
  892. }
  893. var EPS = 1e-4;
  894. var BASE_DEVICE_WIDTH = 750;
  895. var isIOS = false;
  896. var deviceWidth = 0;
  897. var deviceDPR = 0;
  898. function checkDeviceWidth() {
  899. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  900. platform = _wx$getSystemInfoSync.platform,
  901. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  902. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  903. deviceWidth = windowWidth;
  904. deviceDPR = pixelRatio;
  905. isIOS = platform === 'ios';
  906. }
  907. function upx2px(number, newDeviceWidth) {
  908. if (deviceWidth === 0) {
  909. checkDeviceWidth();
  910. }
  911. number = Number(number);
  912. if (number === 0) {
  913. return 0;
  914. }
  915. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  916. if (result < 0) {
  917. result = -result;
  918. }
  919. result = Math.floor(result + EPS);
  920. if (result === 0) {
  921. if (deviceDPR === 1 || !isIOS) {
  922. result = 1;
  923. } else {
  924. result = 0.5;
  925. }
  926. }
  927. return number < 0 ? -result : result;
  928. }
  929. var LOCALE_ZH_HANS = 'zh-Hans';
  930. var LOCALE_ZH_HANT = 'zh-Hant';
  931. var LOCALE_EN = 'en';
  932. var LOCALE_FR = 'fr';
  933. var LOCALE_ES = 'es';
  934. var messages = {};
  935. var locale;
  936. {
  937. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  938. }
  939. function initI18nMessages() {
  940. if (!isEnableLocale()) {
  941. return;
  942. }
  943. var localeKeys = Object.keys(__uniConfig.locales);
  944. if (localeKeys.length) {
  945. localeKeys.forEach(function (locale) {
  946. var curMessages = messages[locale];
  947. var userMessages = __uniConfig.locales[locale];
  948. if (curMessages) {
  949. Object.assign(curMessages, userMessages);
  950. } else {
  951. messages[locale] = userMessages;
  952. }
  953. });
  954. }
  955. }
  956. initI18nMessages();
  957. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  958. var t = i18n.t;
  959. var i18nMixin = i18n.mixin = {
  960. beforeCreate: function beforeCreate() {
  961. var _this = this;
  962. var unwatch = i18n.i18n.watchLocale(function () {
  963. _this.$forceUpdate();
  964. });
  965. this.$once('hook:beforeDestroy', function () {
  966. unwatch();
  967. });
  968. },
  969. methods: {
  970. $$t: function $$t(key, values) {
  971. return t(key, values);
  972. }
  973. }
  974. };
  975. var setLocale = i18n.setLocale;
  976. var getLocale = i18n.getLocale;
  977. function initAppLocale(Vue, appVm, locale) {
  978. var state = Vue.observable({
  979. locale: locale || i18n.getLocale()
  980. });
  981. var localeWatchers = [];
  982. appVm.$watchLocale = function (fn) {
  983. localeWatchers.push(fn);
  984. };
  985. Object.defineProperty(appVm, '$locale', {
  986. get: function get() {
  987. return state.locale;
  988. },
  989. set: function set(v) {
  990. state.locale = v;
  991. localeWatchers.forEach(function (watch) {
  992. return watch(v);
  993. });
  994. }
  995. });
  996. }
  997. function isEnableLocale() {
  998. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  999. }
  1000. function include(str, parts) {
  1001. return !!parts.find(function (part) {
  1002. return str.indexOf(part) !== -1;
  1003. });
  1004. }
  1005. function startsWith(str, parts) {
  1006. return parts.find(function (part) {
  1007. return str.indexOf(part) === 0;
  1008. });
  1009. }
  1010. function normalizeLocale(locale, messages) {
  1011. if (!locale) {
  1012. return;
  1013. }
  1014. locale = locale.trim().replace(/_/g, '-');
  1015. if (messages && messages[locale]) {
  1016. return locale;
  1017. }
  1018. locale = locale.toLowerCase();
  1019. if (locale === 'chinese') {
  1020. // 支付宝
  1021. return LOCALE_ZH_HANS;
  1022. }
  1023. if (locale.indexOf('zh') === 0) {
  1024. if (locale.indexOf('-hans') > -1) {
  1025. return LOCALE_ZH_HANS;
  1026. }
  1027. if (locale.indexOf('-hant') > -1) {
  1028. return LOCALE_ZH_HANT;
  1029. }
  1030. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  1031. return LOCALE_ZH_HANT;
  1032. }
  1033. return LOCALE_ZH_HANS;
  1034. }
  1035. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  1036. if (lang) {
  1037. return lang;
  1038. }
  1039. }
  1040. // export function initI18n() {
  1041. // const localeKeys = Object.keys(__uniConfig.locales || {})
  1042. // if (localeKeys.length) {
  1043. // localeKeys.forEach((locale) =>
  1044. // i18n.add(locale, __uniConfig.locales[locale])
  1045. // )
  1046. // }
  1047. // }
  1048. function getLocale$1() {
  1049. // 优先使用 $locale
  1050. if (isFn(getApp)) {
  1051. var app = getApp({
  1052. allowDefault: true
  1053. });
  1054. if (app && app.$vm) {
  1055. return app.$vm.$locale;
  1056. }
  1057. }
  1058. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  1059. }
  1060. function setLocale$1(locale) {
  1061. var app = isFn(getApp) ? getApp() : false;
  1062. if (!app) {
  1063. return false;
  1064. }
  1065. var oldLocale = app.$vm.$locale;
  1066. if (oldLocale !== locale) {
  1067. app.$vm.$locale = locale;
  1068. onLocaleChangeCallbacks.forEach(function (fn) {
  1069. return fn({
  1070. locale: locale
  1071. });
  1072. });
  1073. return true;
  1074. }
  1075. return false;
  1076. }
  1077. var onLocaleChangeCallbacks = [];
  1078. function onLocaleChange(fn) {
  1079. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  1080. onLocaleChangeCallbacks.push(fn);
  1081. }
  1082. }
  1083. if (typeof global !== 'undefined') {
  1084. global.getLocale = getLocale$1;
  1085. }
  1086. var interceptors = {
  1087. promiseInterceptor: promiseInterceptor
  1088. };
  1089. var baseApi = /*#__PURE__*/Object.freeze({
  1090. __proto__: null,
  1091. upx2px: upx2px,
  1092. getLocale: getLocale$1,
  1093. setLocale: setLocale$1,
  1094. onLocaleChange: onLocaleChange,
  1095. addInterceptor: addInterceptor,
  1096. removeInterceptor: removeInterceptor,
  1097. interceptors: interceptors
  1098. });
  1099. function findExistsPageIndex(url) {
  1100. var pages = getCurrentPages();
  1101. var len = pages.length;
  1102. while (len--) {
  1103. var page = pages[len];
  1104. if (page.$page && page.$page.fullPath === url) {
  1105. return len;
  1106. }
  1107. }
  1108. return -1;
  1109. }
  1110. var redirectTo = {
  1111. name: function name(fromArgs) {
  1112. if (fromArgs.exists === 'back' && fromArgs.delta) {
  1113. return 'navigateBack';
  1114. }
  1115. return 'redirectTo';
  1116. },
  1117. args: function args(fromArgs) {
  1118. if (fromArgs.exists === 'back' && fromArgs.url) {
  1119. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  1120. if (existsPageIndex !== -1) {
  1121. var delta = getCurrentPages().length - 1 - existsPageIndex;
  1122. if (delta > 0) {
  1123. fromArgs.delta = delta;
  1124. }
  1125. }
  1126. }
  1127. }
  1128. };
  1129. var previewImage = {
  1130. args: function args(fromArgs) {
  1131. var currentIndex = parseInt(fromArgs.current);
  1132. if (isNaN(currentIndex)) {
  1133. return;
  1134. }
  1135. var urls = fromArgs.urls;
  1136. if (!Array.isArray(urls)) {
  1137. return;
  1138. }
  1139. var len = urls.length;
  1140. if (!len) {
  1141. return;
  1142. }
  1143. if (currentIndex < 0) {
  1144. currentIndex = 0;
  1145. } else if (currentIndex >= len) {
  1146. currentIndex = len - 1;
  1147. }
  1148. if (currentIndex > 0) {
  1149. fromArgs.current = urls[currentIndex];
  1150. fromArgs.urls = urls.filter(function (item, index) {
  1151. return index < currentIndex ? item !== urls[currentIndex] : true;
  1152. });
  1153. } else {
  1154. fromArgs.current = urls[0];
  1155. }
  1156. return {
  1157. indicator: false,
  1158. loop: false
  1159. };
  1160. }
  1161. };
  1162. var UUID_KEY = '__DC_STAT_UUID';
  1163. var deviceId;
  1164. function useDeviceId(result) {
  1165. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  1166. if (!deviceId) {
  1167. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  1168. wx.setStorage({
  1169. key: UUID_KEY,
  1170. data: deviceId
  1171. });
  1172. }
  1173. result.deviceId = deviceId;
  1174. }
  1175. function addSafeAreaInsets(result) {
  1176. if (result.safeArea) {
  1177. var safeArea = result.safeArea;
  1178. result.safeAreaInsets = {
  1179. top: safeArea.top,
  1180. left: safeArea.left,
  1181. right: result.windowWidth - safeArea.right,
  1182. bottom: result.screenHeight - safeArea.bottom
  1183. };
  1184. }
  1185. }
  1186. function populateParameters(result) {
  1187. var _result$brand = result.brand,
  1188. brand = _result$brand === void 0 ? '' : _result$brand,
  1189. _result$model = result.model,
  1190. model = _result$model === void 0 ? '' : _result$model,
  1191. _result$system = result.system,
  1192. system = _result$system === void 0 ? '' : _result$system,
  1193. _result$language = result.language,
  1194. language = _result$language === void 0 ? '' : _result$language,
  1195. theme = result.theme,
  1196. version = result.version,
  1197. platform = result.platform,
  1198. fontSizeSetting = result.fontSizeSetting,
  1199. SDKVersion = result.SDKVersion,
  1200. pixelRatio = result.pixelRatio,
  1201. deviceOrientation = result.deviceOrientation;
  1202. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  1203. var extraParam = {};
  1204. // osName osVersion
  1205. var osName = '';
  1206. var osVersion = '';
  1207. {
  1208. osName = system.split(' ')[0] || '';
  1209. osVersion = system.split(' ')[1] || '';
  1210. }
  1211. var hostVersion = version;
  1212. // deviceType
  1213. var deviceType = getGetDeviceType(result, model);
  1214. // deviceModel
  1215. var deviceBrand = getDeviceBrand(brand);
  1216. // hostName
  1217. var _hostName = getHostName(result);
  1218. // deviceOrientation
  1219. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  1220. // devicePixelRatio
  1221. var _devicePixelRatio = pixelRatio;
  1222. // SDKVersion
  1223. var _SDKVersion = SDKVersion;
  1224. // hostLanguage
  1225. var hostLanguage = language.replace(/_/g, '-');
  1226. // wx.getAccountInfoSync
  1227. var parameters = {
  1228. appId: "__UNI__5B783AC",
  1229. appName: "Applet",
  1230. appVersion: "1.0.0",
  1231. appVersionCode: "100",
  1232. appLanguage: getAppLanguage(hostLanguage),
  1233. uniCompileVersion: "3.8.4",
  1234. uniRuntimeVersion: "3.8.4",
  1235. uniPlatform: undefined || "mp-weixin",
  1236. deviceBrand: deviceBrand,
  1237. deviceModel: model,
  1238. deviceType: deviceType,
  1239. devicePixelRatio: _devicePixelRatio,
  1240. deviceOrientation: _deviceOrientation,
  1241. osName: osName.toLocaleLowerCase(),
  1242. osVersion: osVersion,
  1243. hostTheme: theme,
  1244. hostVersion: hostVersion,
  1245. hostLanguage: hostLanguage,
  1246. hostName: _hostName,
  1247. hostSDKVersion: _SDKVersion,
  1248. hostFontSizeSetting: fontSizeSetting,
  1249. windowTop: 0,
  1250. windowBottom: 0,
  1251. // TODO
  1252. osLanguage: undefined,
  1253. osTheme: undefined,
  1254. ua: undefined,
  1255. hostPackageName: undefined,
  1256. browserName: undefined,
  1257. browserVersion: undefined
  1258. };
  1259. Object.assign(result, parameters, extraParam);
  1260. }
  1261. function getGetDeviceType(result, model) {
  1262. var deviceType = result.deviceType || 'phone';
  1263. {
  1264. var deviceTypeMaps = {
  1265. ipad: 'pad',
  1266. windows: 'pc',
  1267. mac: 'pc'
  1268. };
  1269. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  1270. var _model = model.toLocaleLowerCase();
  1271. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  1272. var _m = deviceTypeMapsKeys[index];
  1273. if (_model.indexOf(_m) !== -1) {
  1274. deviceType = deviceTypeMaps[_m];
  1275. break;
  1276. }
  1277. }
  1278. }
  1279. return deviceType;
  1280. }
  1281. function getDeviceBrand(brand) {
  1282. var deviceBrand = brand;
  1283. if (deviceBrand) {
  1284. deviceBrand = brand.toLocaleLowerCase();
  1285. }
  1286. return deviceBrand;
  1287. }
  1288. function getAppLanguage(defaultLanguage) {
  1289. return getLocale$1 ? getLocale$1() : defaultLanguage;
  1290. }
  1291. function getHostName(result) {
  1292. var _platform = 'WeChat';
  1293. var _hostName = result.hostName || _platform; // mp-jd
  1294. {
  1295. if (result.environment) {
  1296. _hostName = result.environment;
  1297. } else if (result.host && result.host.env) {
  1298. _hostName = result.host.env;
  1299. }
  1300. }
  1301. return _hostName;
  1302. }
  1303. var getSystemInfo = {
  1304. returnValue: function returnValue(result) {
  1305. useDeviceId(result);
  1306. addSafeAreaInsets(result);
  1307. populateParameters(result);
  1308. }
  1309. };
  1310. var showActionSheet = {
  1311. args: function args(fromArgs) {
  1312. if ((0, _typeof2.default)(fromArgs) === 'object') {
  1313. fromArgs.alertText = fromArgs.title;
  1314. }
  1315. }
  1316. };
  1317. var getAppBaseInfo = {
  1318. returnValue: function returnValue(result) {
  1319. var _result = result,
  1320. version = _result.version,
  1321. language = _result.language,
  1322. SDKVersion = _result.SDKVersion,
  1323. theme = _result.theme;
  1324. var _hostName = getHostName(result);
  1325. var hostLanguage = language.replace('_', '-');
  1326. result = sortObject(Object.assign(result, {
  1327. appId: "__UNI__5B783AC",
  1328. appName: "Applet",
  1329. appVersion: "1.0.0",
  1330. appVersionCode: "100",
  1331. appLanguage: getAppLanguage(hostLanguage),
  1332. hostVersion: version,
  1333. hostLanguage: hostLanguage,
  1334. hostName: _hostName,
  1335. hostSDKVersion: SDKVersion,
  1336. hostTheme: theme
  1337. }));
  1338. }
  1339. };
  1340. var getDeviceInfo = {
  1341. returnValue: function returnValue(result) {
  1342. var _result2 = result,
  1343. brand = _result2.brand,
  1344. model = _result2.model;
  1345. var deviceType = getGetDeviceType(result, model);
  1346. var deviceBrand = getDeviceBrand(brand);
  1347. useDeviceId(result);
  1348. result = sortObject(Object.assign(result, {
  1349. deviceType: deviceType,
  1350. deviceBrand: deviceBrand,
  1351. deviceModel: model
  1352. }));
  1353. }
  1354. };
  1355. var getWindowInfo = {
  1356. returnValue: function returnValue(result) {
  1357. addSafeAreaInsets(result);
  1358. result = sortObject(Object.assign(result, {
  1359. windowTop: 0,
  1360. windowBottom: 0
  1361. }));
  1362. }
  1363. };
  1364. var getAppAuthorizeSetting = {
  1365. returnValue: function returnValue(result) {
  1366. var locationReducedAccuracy = result.locationReducedAccuracy;
  1367. result.locationAccuracy = 'unsupported';
  1368. if (locationReducedAccuracy === true) {
  1369. result.locationAccuracy = 'reduced';
  1370. } else if (locationReducedAccuracy === false) {
  1371. result.locationAccuracy = 'full';
  1372. }
  1373. }
  1374. };
  1375. // import navigateTo from 'uni-helpers/navigate-to'
  1376. var compressImage = {
  1377. args: function args(fromArgs) {
  1378. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  1379. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  1380. fromArgs.compressHeight = fromArgs.compressedHeight;
  1381. }
  1382. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  1383. fromArgs.compressWidth = fromArgs.compressedWidth;
  1384. }
  1385. }
  1386. };
  1387. var protocols = {
  1388. redirectTo: redirectTo,
  1389. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  1390. previewImage: previewImage,
  1391. getSystemInfo: getSystemInfo,
  1392. getSystemInfoSync: getSystemInfo,
  1393. showActionSheet: showActionSheet,
  1394. getAppBaseInfo: getAppBaseInfo,
  1395. getDeviceInfo: getDeviceInfo,
  1396. getWindowInfo: getWindowInfo,
  1397. getAppAuthorizeSetting: getAppAuthorizeSetting,
  1398. compressImage: compressImage
  1399. };
  1400. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  1401. var canIUses = [];
  1402. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  1403. function processCallback(methodName, method, returnValue) {
  1404. return function (res) {
  1405. return method(processReturnValue(methodName, res, returnValue));
  1406. };
  1407. }
  1408. function processArgs(methodName, fromArgs) {
  1409. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  1410. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  1411. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  1412. if (isPlainObject(fromArgs)) {
  1413. // 一般 api 的参数解析
  1414. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  1415. if (isFn(argsOption)) {
  1416. argsOption = argsOption(fromArgs, toArgs) || {};
  1417. }
  1418. for (var key in fromArgs) {
  1419. if (hasOwn(argsOption, key)) {
  1420. var keyOption = argsOption[key];
  1421. if (isFn(keyOption)) {
  1422. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  1423. }
  1424. if (!keyOption) {
  1425. // 不支持的参数
  1426. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  1427. } else if (isStr(keyOption)) {
  1428. // 重写参数 key
  1429. toArgs[keyOption] = fromArgs[key];
  1430. } else if (isPlainObject(keyOption)) {
  1431. // {name:newName,value:value}可重新指定参数 key:value
  1432. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  1433. }
  1434. } else if (CALLBACKS.indexOf(key) !== -1) {
  1435. if (isFn(fromArgs[key])) {
  1436. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  1437. }
  1438. } else {
  1439. if (!keepFromArgs) {
  1440. toArgs[key] = fromArgs[key];
  1441. }
  1442. }
  1443. }
  1444. return toArgs;
  1445. } else if (isFn(fromArgs)) {
  1446. fromArgs = processCallback(methodName, fromArgs, returnValue);
  1447. }
  1448. return fromArgs;
  1449. }
  1450. function processReturnValue(methodName, res, returnValue) {
  1451. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  1452. if (isFn(protocols.returnValue)) {
  1453. // 处理通用 returnValue
  1454. res = protocols.returnValue(methodName, res);
  1455. }
  1456. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  1457. }
  1458. function wrapper(methodName, method) {
  1459. if (hasOwn(protocols, methodName)) {
  1460. var protocol = protocols[methodName];
  1461. if (!protocol) {
  1462. // 暂不支持的 api
  1463. return function () {
  1464. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  1465. };
  1466. }
  1467. return function (arg1, arg2) {
  1468. // 目前 api 最多两个参数
  1469. var options = protocol;
  1470. if (isFn(protocol)) {
  1471. options = protocol(arg1);
  1472. }
  1473. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  1474. var args = [arg1];
  1475. if (typeof arg2 !== 'undefined') {
  1476. args.push(arg2);
  1477. }
  1478. if (isFn(options.name)) {
  1479. methodName = options.name(arg1);
  1480. } else if (isStr(options.name)) {
  1481. methodName = options.name;
  1482. }
  1483. var returnValue = wx[methodName].apply(wx, args);
  1484. if (isSyncApi(methodName)) {
  1485. // 同步 api
  1486. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1487. }
  1488. return returnValue;
  1489. };
  1490. }
  1491. return method;
  1492. }
  1493. var todoApis = Object.create(null);
  1494. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1495. function createTodoApi(name) {
  1496. return function todoApi(_ref) {
  1497. var fail = _ref.fail,
  1498. complete = _ref.complete;
  1499. var res = {
  1500. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1501. };
  1502. isFn(fail) && fail(res);
  1503. isFn(complete) && complete(res);
  1504. };
  1505. }
  1506. TODOS.forEach(function (name) {
  1507. todoApis[name] = createTodoApi(name);
  1508. });
  1509. var providers = {
  1510. oauth: ['weixin'],
  1511. share: ['weixin'],
  1512. payment: ['wxpay'],
  1513. push: ['weixin']
  1514. };
  1515. function getProvider(_ref2) {
  1516. var service = _ref2.service,
  1517. success = _ref2.success,
  1518. fail = _ref2.fail,
  1519. complete = _ref2.complete;
  1520. var res = false;
  1521. if (providers[service]) {
  1522. res = {
  1523. errMsg: 'getProvider:ok',
  1524. service: service,
  1525. provider: providers[service]
  1526. };
  1527. isFn(success) && success(res);
  1528. } else {
  1529. res = {
  1530. errMsg: 'getProvider:fail service not found'
  1531. };
  1532. isFn(fail) && fail(res);
  1533. }
  1534. isFn(complete) && complete(res);
  1535. }
  1536. var extraApi = /*#__PURE__*/Object.freeze({
  1537. __proto__: null,
  1538. getProvider: getProvider
  1539. });
  1540. var getEmitter = function () {
  1541. var Emitter;
  1542. return function getUniEmitter() {
  1543. if (!Emitter) {
  1544. Emitter = new _vue.default();
  1545. }
  1546. return Emitter;
  1547. };
  1548. }();
  1549. function apply(ctx, method, args) {
  1550. return ctx[method].apply(ctx, args);
  1551. }
  1552. function $on() {
  1553. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1554. }
  1555. function $off() {
  1556. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1557. }
  1558. function $once() {
  1559. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1560. }
  1561. function $emit() {
  1562. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1563. }
  1564. var eventApi = /*#__PURE__*/Object.freeze({
  1565. __proto__: null,
  1566. $on: $on,
  1567. $off: $off,
  1568. $once: $once,
  1569. $emit: $emit
  1570. });
  1571. /**
  1572. * 框架内 try-catch
  1573. */
  1574. /**
  1575. * 开发者 try-catch
  1576. */
  1577. function tryCatch(fn) {
  1578. return function () {
  1579. try {
  1580. return fn.apply(fn, arguments);
  1581. } catch (e) {
  1582. // TODO
  1583. console.error(e);
  1584. }
  1585. };
  1586. }
  1587. function getApiCallbacks(params) {
  1588. var apiCallbacks = {};
  1589. for (var name in params) {
  1590. var param = params[name];
  1591. if (isFn(param)) {
  1592. apiCallbacks[name] = tryCatch(param);
  1593. delete params[name];
  1594. }
  1595. }
  1596. return apiCallbacks;
  1597. }
  1598. var cid;
  1599. var cidErrMsg;
  1600. var enabled;
  1601. function normalizePushMessage(message) {
  1602. try {
  1603. return JSON.parse(message);
  1604. } catch (e) {}
  1605. return message;
  1606. }
  1607. function invokePushCallback(args) {
  1608. if (args.type === 'enabled') {
  1609. enabled = true;
  1610. } else if (args.type === 'clientId') {
  1611. cid = args.cid;
  1612. cidErrMsg = args.errMsg;
  1613. invokeGetPushCidCallbacks(cid, args.errMsg);
  1614. } else if (args.type === 'pushMsg') {
  1615. var message = {
  1616. type: 'receive',
  1617. data: normalizePushMessage(args.message)
  1618. };
  1619. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1620. var callback = onPushMessageCallbacks[i];
  1621. callback(message);
  1622. // 该消息已被阻止
  1623. if (message.stopped) {
  1624. break;
  1625. }
  1626. }
  1627. } else if (args.type === 'click') {
  1628. onPushMessageCallbacks.forEach(function (callback) {
  1629. callback({
  1630. type: 'click',
  1631. data: normalizePushMessage(args.message)
  1632. });
  1633. });
  1634. }
  1635. }
  1636. var getPushCidCallbacks = [];
  1637. function invokeGetPushCidCallbacks(cid, errMsg) {
  1638. getPushCidCallbacks.forEach(function (callback) {
  1639. callback(cid, errMsg);
  1640. });
  1641. getPushCidCallbacks.length = 0;
  1642. }
  1643. function getPushClientId(args) {
  1644. if (!isPlainObject(args)) {
  1645. args = {};
  1646. }
  1647. var _getApiCallbacks = getApiCallbacks(args),
  1648. success = _getApiCallbacks.success,
  1649. fail = _getApiCallbacks.fail,
  1650. complete = _getApiCallbacks.complete;
  1651. var hasSuccess = isFn(success);
  1652. var hasFail = isFn(fail);
  1653. var hasComplete = isFn(complete);
  1654. Promise.resolve().then(function () {
  1655. if (typeof enabled === 'undefined') {
  1656. enabled = false;
  1657. cid = '';
  1658. cidErrMsg = 'uniPush is not enabled';
  1659. }
  1660. getPushCidCallbacks.push(function (cid, errMsg) {
  1661. var res;
  1662. if (cid) {
  1663. res = {
  1664. errMsg: 'getPushClientId:ok',
  1665. cid: cid
  1666. };
  1667. hasSuccess && success(res);
  1668. } else {
  1669. res = {
  1670. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1671. };
  1672. hasFail && fail(res);
  1673. }
  1674. hasComplete && complete(res);
  1675. });
  1676. if (typeof cid !== 'undefined') {
  1677. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1678. }
  1679. });
  1680. }
  1681. var onPushMessageCallbacks = [];
  1682. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1683. var onPushMessage = function onPushMessage(fn) {
  1684. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1685. onPushMessageCallbacks.push(fn);
  1686. }
  1687. };
  1688. var offPushMessage = function offPushMessage(fn) {
  1689. if (!fn) {
  1690. onPushMessageCallbacks.length = 0;
  1691. } else {
  1692. var index = onPushMessageCallbacks.indexOf(fn);
  1693. if (index > -1) {
  1694. onPushMessageCallbacks.splice(index, 1);
  1695. }
  1696. }
  1697. };
  1698. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1699. if (!baseInfo) {
  1700. baseInfo = wx.getSystemInfoSync();
  1701. }
  1702. var host = baseInfo ? baseInfo.host : null;
  1703. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1704. var api = /*#__PURE__*/Object.freeze({
  1705. __proto__: null,
  1706. shareVideoMessage: shareVideoMessage,
  1707. getPushClientId: getPushClientId,
  1708. onPushMessage: onPushMessage,
  1709. offPushMessage: offPushMessage,
  1710. invokePushCallback: invokePushCallback
  1711. });
  1712. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1713. function findVmByVueId(vm, vuePid) {
  1714. var $children = vm.$children;
  1715. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1716. for (var i = $children.length - 1; i >= 0; i--) {
  1717. var childVm = $children[i];
  1718. if (childVm.$scope._$vueId === vuePid) {
  1719. return childVm;
  1720. }
  1721. }
  1722. // 反向递归查找
  1723. var parentVm;
  1724. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1725. parentVm = findVmByVueId($children[_i], vuePid);
  1726. if (parentVm) {
  1727. return parentVm;
  1728. }
  1729. }
  1730. }
  1731. function initBehavior(options) {
  1732. return Behavior(options);
  1733. }
  1734. function isPage() {
  1735. return !!this.route;
  1736. }
  1737. function initRelation(detail) {
  1738. this.triggerEvent('__l', detail);
  1739. }
  1740. function selectAllComponents(mpInstance, selector, $refs) {
  1741. var components = mpInstance.selectAllComponents(selector) || [];
  1742. components.forEach(function (component) {
  1743. var ref = component.dataset.ref;
  1744. $refs[ref] = component.$vm || toSkip(component);
  1745. {
  1746. if (component.dataset.vueGeneric === 'scoped') {
  1747. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1748. selectAllComponents(scopedComponent, selector, $refs);
  1749. });
  1750. }
  1751. }
  1752. });
  1753. }
  1754. function syncRefs(refs, newRefs) {
  1755. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1756. var newKeys = Object.keys(newRefs);
  1757. newKeys.forEach(function (key) {
  1758. var oldValue = refs[key];
  1759. var newValue = newRefs[key];
  1760. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1761. return oldValue.includes(value);
  1762. })) {
  1763. return;
  1764. }
  1765. refs[key] = newValue;
  1766. oldKeys.delete(key);
  1767. });
  1768. oldKeys.forEach(function (key) {
  1769. delete refs[key];
  1770. });
  1771. return refs;
  1772. }
  1773. function initRefs(vm) {
  1774. var mpInstance = vm.$scope;
  1775. var refs = {};
  1776. Object.defineProperty(vm, '$refs', {
  1777. get: function get() {
  1778. var $refs = {};
  1779. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1780. // TODO 暂不考虑 for 中的 scoped
  1781. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1782. forComponents.forEach(function (component) {
  1783. var ref = component.dataset.ref;
  1784. if (!$refs[ref]) {
  1785. $refs[ref] = [];
  1786. }
  1787. $refs[ref].push(component.$vm || toSkip(component));
  1788. });
  1789. return syncRefs(refs, $refs);
  1790. }
  1791. });
  1792. }
  1793. function handleLink(event) {
  1794. var _ref3 = event.detail || event.value,
  1795. vuePid = _ref3.vuePid,
  1796. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1797. var parentVm;
  1798. if (vuePid) {
  1799. parentVm = findVmByVueId(this.$vm, vuePid);
  1800. }
  1801. if (!parentVm) {
  1802. parentVm = this.$vm;
  1803. }
  1804. vueOptions.parent = parentVm;
  1805. }
  1806. function markMPComponent(component) {
  1807. // 在 Vue 中标记为小程序组件
  1808. var IS_MP = '__v_isMPComponent';
  1809. Object.defineProperty(component, IS_MP, {
  1810. configurable: true,
  1811. enumerable: false,
  1812. value: true
  1813. });
  1814. return component;
  1815. }
  1816. function toSkip(obj) {
  1817. var OB = '__ob__';
  1818. var SKIP = '__v_skip';
  1819. if (isObject(obj) && Object.isExtensible(obj)) {
  1820. // 避免被 @vue/composition-api 观测
  1821. Object.defineProperty(obj, OB, {
  1822. configurable: true,
  1823. enumerable: false,
  1824. value: (0, _defineProperty2.default)({}, SKIP, true)
  1825. });
  1826. }
  1827. return obj;
  1828. }
  1829. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1830. function initWorkletMethods(mpMethods, vueMethods) {
  1831. if (vueMethods) {
  1832. Object.keys(vueMethods).forEach(function (name) {
  1833. var matches = name.match(WORKLET_RE);
  1834. if (matches) {
  1835. var workletName = matches[1];
  1836. mpMethods[name] = vueMethods[name];
  1837. mpMethods[workletName] = vueMethods[workletName];
  1838. }
  1839. });
  1840. }
  1841. }
  1842. var MPPage = Page;
  1843. var MPComponent = Component;
  1844. var customizeRE = /:/g;
  1845. var customize = cached(function (str) {
  1846. return camelize(str.replace(customizeRE, '-'));
  1847. });
  1848. function initTriggerEvent(mpInstance) {
  1849. var oldTriggerEvent = mpInstance.triggerEvent;
  1850. var newTriggerEvent = function newTriggerEvent(event) {
  1851. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1852. args[_key3 - 1] = arguments[_key3];
  1853. }
  1854. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1855. if (this.$vm || this.dataset && this.dataset.comType) {
  1856. event = customize(event);
  1857. } else {
  1858. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1859. var newEvent = customize(event);
  1860. if (newEvent !== event) {
  1861. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1862. }
  1863. }
  1864. return oldTriggerEvent.apply(this, [event].concat(args));
  1865. };
  1866. try {
  1867. // 京东小程序 triggerEvent 为只读
  1868. mpInstance.triggerEvent = newTriggerEvent;
  1869. } catch (error) {
  1870. mpInstance._triggerEvent = newTriggerEvent;
  1871. }
  1872. }
  1873. function initHook(name, options, isComponent) {
  1874. var oldHook = options[name];
  1875. options[name] = function () {
  1876. markMPComponent(this);
  1877. initTriggerEvent(this);
  1878. if (oldHook) {
  1879. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1880. args[_key4] = arguments[_key4];
  1881. }
  1882. return oldHook.apply(this, args);
  1883. }
  1884. };
  1885. }
  1886. if (!MPPage.__$wrappered) {
  1887. MPPage.__$wrappered = true;
  1888. Page = function Page() {
  1889. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1890. initHook('onLoad', options);
  1891. return MPPage(options);
  1892. };
  1893. Page.after = MPPage.after;
  1894. Component = function Component() {
  1895. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1896. initHook('created', options);
  1897. return MPComponent(options);
  1898. };
  1899. }
  1900. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1901. function initMocks(vm, mocks) {
  1902. var mpInstance = vm.$mp[vm.mpType];
  1903. mocks.forEach(function (mock) {
  1904. if (hasOwn(mpInstance, mock)) {
  1905. vm[mock] = mpInstance[mock];
  1906. }
  1907. });
  1908. }
  1909. function hasHook(hook, vueOptions) {
  1910. if (!vueOptions) {
  1911. return true;
  1912. }
  1913. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1914. return true;
  1915. }
  1916. vueOptions = vueOptions.default || vueOptions;
  1917. if (isFn(vueOptions)) {
  1918. if (isFn(vueOptions.extendOptions[hook])) {
  1919. return true;
  1920. }
  1921. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1922. return true;
  1923. }
  1924. return false;
  1925. }
  1926. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1927. return true;
  1928. }
  1929. var mixins = vueOptions.mixins;
  1930. if (Array.isArray(mixins)) {
  1931. return !!mixins.find(function (mixin) {
  1932. return hasHook(hook, mixin);
  1933. });
  1934. }
  1935. }
  1936. function initHooks(mpOptions, hooks, vueOptions) {
  1937. hooks.forEach(function (hook) {
  1938. if (hasHook(hook, vueOptions)) {
  1939. mpOptions[hook] = function (args) {
  1940. return this.$vm && this.$vm.__call_hook(hook, args);
  1941. };
  1942. }
  1943. });
  1944. }
  1945. function initUnknownHooks(mpOptions, vueOptions) {
  1946. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1947. findHooks(vueOptions).forEach(function (hook) {
  1948. return initHook$1(mpOptions, hook, excludes);
  1949. });
  1950. }
  1951. function findHooks(vueOptions) {
  1952. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1953. if (vueOptions) {
  1954. Object.keys(vueOptions).forEach(function (name) {
  1955. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1956. hooks.push(name);
  1957. }
  1958. });
  1959. }
  1960. return hooks;
  1961. }
  1962. function initHook$1(mpOptions, hook, excludes) {
  1963. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1964. mpOptions[hook] = function (args) {
  1965. return this.$vm && this.$vm.__call_hook(hook, args);
  1966. };
  1967. }
  1968. }
  1969. function initVueComponent(Vue, vueOptions) {
  1970. vueOptions = vueOptions.default || vueOptions;
  1971. var VueComponent;
  1972. if (isFn(vueOptions)) {
  1973. VueComponent = vueOptions;
  1974. } else {
  1975. VueComponent = Vue.extend(vueOptions);
  1976. }
  1977. vueOptions = VueComponent.options;
  1978. return [VueComponent, vueOptions];
  1979. }
  1980. function initSlots(vm, vueSlots) {
  1981. if (Array.isArray(vueSlots) && vueSlots.length) {
  1982. var $slots = Object.create(null);
  1983. vueSlots.forEach(function (slotName) {
  1984. $slots[slotName] = true;
  1985. });
  1986. vm.$scopedSlots = vm.$slots = $slots;
  1987. }
  1988. }
  1989. function initVueIds(vueIds, mpInstance) {
  1990. vueIds = (vueIds || '').split(',');
  1991. var len = vueIds.length;
  1992. if (len === 1) {
  1993. mpInstance._$vueId = vueIds[0];
  1994. } else if (len === 2) {
  1995. mpInstance._$vueId = vueIds[0];
  1996. mpInstance._$vuePid = vueIds[1];
  1997. }
  1998. }
  1999. function initData(vueOptions, context) {
  2000. var data = vueOptions.data || {};
  2001. var methods = vueOptions.methods || {};
  2002. if (typeof data === 'function') {
  2003. try {
  2004. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  2005. } catch (e) {
  2006. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  2007. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  2008. }
  2009. }
  2010. } else {
  2011. try {
  2012. // 对 data 格式化
  2013. data = JSON.parse(JSON.stringify(data));
  2014. } catch (e) {}
  2015. }
  2016. if (!isPlainObject(data)) {
  2017. data = {};
  2018. }
  2019. Object.keys(methods).forEach(function (methodName) {
  2020. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  2021. data[methodName] = methods[methodName];
  2022. }
  2023. });
  2024. return data;
  2025. }
  2026. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  2027. function createObserver(name) {
  2028. return function observer(newVal, oldVal) {
  2029. if (this.$vm) {
  2030. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  2031. }
  2032. };
  2033. }
  2034. function initBehaviors(vueOptions, initBehavior) {
  2035. var vueBehaviors = vueOptions.behaviors;
  2036. var vueExtends = vueOptions.extends;
  2037. var vueMixins = vueOptions.mixins;
  2038. var vueProps = vueOptions.props;
  2039. if (!vueProps) {
  2040. vueOptions.props = vueProps = [];
  2041. }
  2042. var behaviors = [];
  2043. if (Array.isArray(vueBehaviors)) {
  2044. vueBehaviors.forEach(function (behavior) {
  2045. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  2046. if (behavior === 'uni://form-field') {
  2047. if (Array.isArray(vueProps)) {
  2048. vueProps.push('name');
  2049. vueProps.push('value');
  2050. } else {
  2051. vueProps.name = {
  2052. type: String,
  2053. default: ''
  2054. };
  2055. vueProps.value = {
  2056. type: [String, Number, Boolean, Array, Object, Date],
  2057. default: ''
  2058. };
  2059. }
  2060. }
  2061. });
  2062. }
  2063. if (isPlainObject(vueExtends) && vueExtends.props) {
  2064. behaviors.push(initBehavior({
  2065. properties: initProperties(vueExtends.props, true)
  2066. }));
  2067. }
  2068. if (Array.isArray(vueMixins)) {
  2069. vueMixins.forEach(function (vueMixin) {
  2070. if (isPlainObject(vueMixin) && vueMixin.props) {
  2071. behaviors.push(initBehavior({
  2072. properties: initProperties(vueMixin.props, true)
  2073. }));
  2074. }
  2075. });
  2076. }
  2077. return behaviors;
  2078. }
  2079. function parsePropType(key, type, defaultValue, file) {
  2080. // [String]=>String
  2081. if (Array.isArray(type) && type.length === 1) {
  2082. return type[0];
  2083. }
  2084. return type;
  2085. }
  2086. function initProperties(props) {
  2087. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  2088. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  2089. var options = arguments.length > 3 ? arguments[3] : undefined;
  2090. var properties = {};
  2091. if (!isBehavior) {
  2092. properties.vueId = {
  2093. type: String,
  2094. value: ''
  2095. };
  2096. {
  2097. if (options.virtualHost) {
  2098. properties.virtualHostStyle = {
  2099. type: null,
  2100. value: ''
  2101. };
  2102. properties.virtualHostClass = {
  2103. type: null,
  2104. value: ''
  2105. };
  2106. }
  2107. }
  2108. // scopedSlotsCompiler auto
  2109. properties.scopedSlotsCompiler = {
  2110. type: String,
  2111. value: ''
  2112. };
  2113. properties.vueSlots = {
  2114. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  2115. type: null,
  2116. value: [],
  2117. observer: function observer(newVal, oldVal) {
  2118. var $slots = Object.create(null);
  2119. newVal.forEach(function (slotName) {
  2120. $slots[slotName] = true;
  2121. });
  2122. this.setData({
  2123. $slots: $slots
  2124. });
  2125. }
  2126. };
  2127. }
  2128. if (Array.isArray(props)) {
  2129. // ['title']
  2130. props.forEach(function (key) {
  2131. properties[key] = {
  2132. type: null,
  2133. observer: createObserver(key)
  2134. };
  2135. });
  2136. } else if (isPlainObject(props)) {
  2137. // {title:{type:String,default:''},content:String}
  2138. Object.keys(props).forEach(function (key) {
  2139. var opts = props[key];
  2140. if (isPlainObject(opts)) {
  2141. // title:{type:String,default:''}
  2142. var value = opts.default;
  2143. if (isFn(value)) {
  2144. value = value();
  2145. }
  2146. opts.type = parsePropType(key, opts.type);
  2147. properties[key] = {
  2148. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  2149. value: value,
  2150. observer: createObserver(key)
  2151. };
  2152. } else {
  2153. // content:String
  2154. var type = parsePropType(key, opts);
  2155. properties[key] = {
  2156. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  2157. observer: createObserver(key)
  2158. };
  2159. }
  2160. });
  2161. }
  2162. return properties;
  2163. }
  2164. function wrapper$1(event) {
  2165. // TODO 又得兼容 mpvue 的 mp 对象
  2166. try {
  2167. event.mp = JSON.parse(JSON.stringify(event));
  2168. } catch (e) {}
  2169. event.stopPropagation = noop;
  2170. event.preventDefault = noop;
  2171. event.target = event.target || {};
  2172. if (!hasOwn(event, 'detail')) {
  2173. event.detail = {};
  2174. }
  2175. if (hasOwn(event, 'markerId')) {
  2176. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  2177. event.detail.markerId = event.markerId;
  2178. }
  2179. if (isPlainObject(event.detail)) {
  2180. event.target = Object.assign({}, event.target, event.detail);
  2181. }
  2182. return event;
  2183. }
  2184. function getExtraValue(vm, dataPathsArray) {
  2185. var context = vm;
  2186. dataPathsArray.forEach(function (dataPathArray) {
  2187. var dataPath = dataPathArray[0];
  2188. var value = dataPathArray[2];
  2189. if (dataPath || typeof value !== 'undefined') {
  2190. // ['','',index,'disable']
  2191. var propPath = dataPathArray[1];
  2192. var valuePath = dataPathArray[3];
  2193. var vFor;
  2194. if (Number.isInteger(dataPath)) {
  2195. vFor = dataPath;
  2196. } else if (!dataPath) {
  2197. vFor = context;
  2198. } else if (typeof dataPath === 'string' && dataPath) {
  2199. if (dataPath.indexOf('#s#') === 0) {
  2200. vFor = dataPath.substr(3);
  2201. } else {
  2202. vFor = vm.__get_value(dataPath, context);
  2203. }
  2204. }
  2205. if (Number.isInteger(vFor)) {
  2206. context = value;
  2207. } else if (!propPath) {
  2208. context = vFor[value];
  2209. } else {
  2210. if (Array.isArray(vFor)) {
  2211. context = vFor.find(function (vForItem) {
  2212. return vm.__get_value(propPath, vForItem) === value;
  2213. });
  2214. } else if (isPlainObject(vFor)) {
  2215. context = Object.keys(vFor).find(function (vForKey) {
  2216. return vm.__get_value(propPath, vFor[vForKey]) === value;
  2217. });
  2218. } else {
  2219. console.error('v-for 暂不支持循环数据:', vFor);
  2220. }
  2221. }
  2222. if (valuePath) {
  2223. context = vm.__get_value(valuePath, context);
  2224. }
  2225. }
  2226. });
  2227. return context;
  2228. }
  2229. function processEventExtra(vm, extra, event, __args__) {
  2230. var extraObj = {};
  2231. if (Array.isArray(extra) && extra.length) {
  2232. /**
  2233. *[
  2234. * ['data.items', 'data.id', item.data.id],
  2235. * ['metas', 'id', meta.id]
  2236. *],
  2237. *[
  2238. * ['data.items', 'data.id', item.data.id],
  2239. * ['metas', 'id', meta.id]
  2240. *],
  2241. *'test'
  2242. */
  2243. extra.forEach(function (dataPath, index) {
  2244. if (typeof dataPath === 'string') {
  2245. if (!dataPath) {
  2246. // model,prop.sync
  2247. extraObj['$' + index] = vm;
  2248. } else {
  2249. if (dataPath === '$event') {
  2250. // $event
  2251. extraObj['$' + index] = event;
  2252. } else if (dataPath === 'arguments') {
  2253. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  2254. } else if (dataPath.indexOf('$event.') === 0) {
  2255. // $event.target.value
  2256. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  2257. } else {
  2258. extraObj['$' + index] = vm.__get_value(dataPath);
  2259. }
  2260. }
  2261. } else {
  2262. extraObj['$' + index] = getExtraValue(vm, dataPath);
  2263. }
  2264. });
  2265. }
  2266. return extraObj;
  2267. }
  2268. function getObjByArray(arr) {
  2269. var obj = {};
  2270. for (var i = 1; i < arr.length; i++) {
  2271. var element = arr[i];
  2272. obj[element[0]] = element[1];
  2273. }
  2274. return obj;
  2275. }
  2276. function processEventArgs(vm, event) {
  2277. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  2278. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  2279. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  2280. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  2281. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  2282. // fixed 用户直接触发 mpInstance.triggerEvent
  2283. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  2284. if (isCustom) {
  2285. // 自定义事件
  2286. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  2287. if (!args.length) {
  2288. // 无参数,直接传入 event 或 detail 数组
  2289. if (isCustomMPEvent) {
  2290. return [event];
  2291. }
  2292. return __args__;
  2293. }
  2294. }
  2295. var extraObj = processEventExtra(vm, extra, event, __args__);
  2296. var ret = [];
  2297. args.forEach(function (arg) {
  2298. if (arg === '$event') {
  2299. if (methodName === '__set_model' && !isCustom) {
  2300. // input v-model value
  2301. ret.push(event.target.value);
  2302. } else {
  2303. if (isCustom && !isCustomMPEvent) {
  2304. ret.push(__args__[0]);
  2305. } else {
  2306. // wxcomponent 组件或内置组件
  2307. ret.push(event);
  2308. }
  2309. }
  2310. } else {
  2311. if (Array.isArray(arg) && arg[0] === 'o') {
  2312. ret.push(getObjByArray(arg));
  2313. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  2314. ret.push(extraObj[arg]);
  2315. } else {
  2316. ret.push(arg);
  2317. }
  2318. }
  2319. });
  2320. return ret;
  2321. }
  2322. var ONCE = '~';
  2323. var CUSTOM = '^';
  2324. function isMatchEventType(eventType, optType) {
  2325. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  2326. }
  2327. function getContextVm(vm) {
  2328. var $parent = vm.$parent;
  2329. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  2330. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  2331. $parent = $parent.$parent;
  2332. }
  2333. return $parent && $parent.$parent;
  2334. }
  2335. function handleEvent(event) {
  2336. var _this2 = this;
  2337. event = wrapper$1(event);
  2338. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  2339. var dataset = (event.currentTarget || event.target).dataset;
  2340. if (!dataset) {
  2341. return console.warn('事件信息不存在');
  2342. }
  2343. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  2344. if (!eventOpts) {
  2345. return console.warn('事件信息不存在');
  2346. }
  2347. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  2348. var eventType = event.type;
  2349. var ret = [];
  2350. eventOpts.forEach(function (eventOpt) {
  2351. var type = eventOpt[0];
  2352. var eventsArray = eventOpt[1];
  2353. var isCustom = type.charAt(0) === CUSTOM;
  2354. type = isCustom ? type.slice(1) : type;
  2355. var isOnce = type.charAt(0) === ONCE;
  2356. type = isOnce ? type.slice(1) : type;
  2357. if (eventsArray && isMatchEventType(eventType, type)) {
  2358. eventsArray.forEach(function (eventArray) {
  2359. var methodName = eventArray[0];
  2360. if (methodName) {
  2361. var handlerCtx = _this2.$vm;
  2362. if (handlerCtx.$options.generic) {
  2363. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  2364. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  2365. }
  2366. if (methodName === '$emit') {
  2367. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  2368. return;
  2369. }
  2370. var handler = handlerCtx[methodName];
  2371. if (!isFn(handler)) {
  2372. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  2373. var path = _this2.route || _this2.is;
  2374. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  2375. }
  2376. if (isOnce) {
  2377. if (handler.once) {
  2378. return;
  2379. }
  2380. handler.once = true;
  2381. }
  2382. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  2383. params = Array.isArray(params) ? params : [];
  2384. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  2385. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  2386. // eslint-disable-next-line no-sparse-arrays
  2387. params = params.concat([,,,,,,,,,, event]);
  2388. }
  2389. ret.push(handler.apply(handlerCtx, params));
  2390. }
  2391. });
  2392. }
  2393. });
  2394. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  2395. return ret[0];
  2396. }
  2397. }
  2398. var eventChannels = {};
  2399. var eventChannelStack = [];
  2400. function getEventChannel(id) {
  2401. if (id) {
  2402. var eventChannel = eventChannels[id];
  2403. delete eventChannels[id];
  2404. return eventChannel;
  2405. }
  2406. return eventChannelStack.shift();
  2407. }
  2408. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  2409. function initEventChannel() {
  2410. _vue.default.prototype.getOpenerEventChannel = function () {
  2411. // 微信小程序使用自身getOpenerEventChannel
  2412. {
  2413. return this.$scope.getOpenerEventChannel();
  2414. }
  2415. };
  2416. var callHook = _vue.default.prototype.__call_hook;
  2417. _vue.default.prototype.__call_hook = function (hook, args) {
  2418. if (hook === 'onLoad' && args && args.__id__) {
  2419. this.__eventChannel__ = getEventChannel(args.__id__);
  2420. delete args.__id__;
  2421. }
  2422. return callHook.call(this, hook, args);
  2423. };
  2424. }
  2425. function initScopedSlotsParams() {
  2426. var center = {};
  2427. var parents = {};
  2428. function currentId(fn) {
  2429. var vueIds = this.$options.propsData.vueId;
  2430. if (vueIds) {
  2431. var vueId = vueIds.split(',')[0];
  2432. fn(vueId);
  2433. }
  2434. }
  2435. _vue.default.prototype.$hasSSP = function (vueId) {
  2436. var slot = center[vueId];
  2437. if (!slot) {
  2438. parents[vueId] = this;
  2439. this.$on('hook:destroyed', function () {
  2440. delete parents[vueId];
  2441. });
  2442. }
  2443. return slot;
  2444. };
  2445. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  2446. var slot = center[vueId];
  2447. if (slot) {
  2448. var params = slot[name] || [];
  2449. if (needAll) {
  2450. return params;
  2451. }
  2452. return params[0];
  2453. }
  2454. };
  2455. _vue.default.prototype.$setSSP = function (name, value) {
  2456. var index = 0;
  2457. currentId.call(this, function (vueId) {
  2458. var slot = center[vueId];
  2459. var params = slot[name] = slot[name] || [];
  2460. params.push(value);
  2461. index = params.length - 1;
  2462. });
  2463. return index;
  2464. };
  2465. _vue.default.prototype.$initSSP = function () {
  2466. currentId.call(this, function (vueId) {
  2467. center[vueId] = {};
  2468. });
  2469. };
  2470. _vue.default.prototype.$callSSP = function () {
  2471. currentId.call(this, function (vueId) {
  2472. if (parents[vueId]) {
  2473. parents[vueId].$forceUpdate();
  2474. }
  2475. });
  2476. };
  2477. _vue.default.mixin({
  2478. destroyed: function destroyed() {
  2479. var propsData = this.$options.propsData;
  2480. var vueId = propsData && propsData.vueId;
  2481. if (vueId) {
  2482. delete center[vueId];
  2483. delete parents[vueId];
  2484. }
  2485. }
  2486. });
  2487. }
  2488. function parseBaseApp(vm, _ref4) {
  2489. var mocks = _ref4.mocks,
  2490. initRefs = _ref4.initRefs;
  2491. initEventChannel();
  2492. {
  2493. initScopedSlotsParams();
  2494. }
  2495. if (vm.$options.store) {
  2496. _vue.default.prototype.$store = vm.$options.store;
  2497. }
  2498. uniIdMixin(_vue.default);
  2499. _vue.default.prototype.mpHost = "mp-weixin";
  2500. _vue.default.mixin({
  2501. beforeCreate: function beforeCreate() {
  2502. if (!this.$options.mpType) {
  2503. return;
  2504. }
  2505. this.mpType = this.$options.mpType;
  2506. this.$mp = (0, _defineProperty2.default)({
  2507. data: {}
  2508. }, this.mpType, this.$options.mpInstance);
  2509. this.$scope = this.$options.mpInstance;
  2510. delete this.$options.mpType;
  2511. delete this.$options.mpInstance;
  2512. if (this.mpType === 'page' && typeof getApp === 'function') {
  2513. // hack vue-i18n
  2514. var app = getApp();
  2515. if (app.$vm && app.$vm.$i18n) {
  2516. this._i18n = app.$vm.$i18n;
  2517. }
  2518. }
  2519. if (this.mpType !== 'app') {
  2520. initRefs(this);
  2521. initMocks(this, mocks);
  2522. }
  2523. }
  2524. });
  2525. var appOptions = {
  2526. onLaunch: function onLaunch(args) {
  2527. if (this.$vm) {
  2528. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2529. return;
  2530. }
  2531. {
  2532. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2533. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2534. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2535. }
  2536. }
  2537. this.$vm = vm;
  2538. this.$vm.$mp = {
  2539. app: this
  2540. };
  2541. this.$vm.$scope = this;
  2542. // vm 上也挂载 globalData
  2543. this.$vm.globalData = this.globalData;
  2544. this.$vm._isMounted = true;
  2545. this.$vm.__call_hook('mounted', args);
  2546. this.$vm.__call_hook('onLaunch', args);
  2547. }
  2548. };
  2549. // 兼容旧版本 globalData
  2550. appOptions.globalData = vm.$options.globalData || {};
  2551. // 将 methods 中的方法挂在 getApp() 中
  2552. var methods = vm.$options.methods;
  2553. if (methods) {
  2554. Object.keys(methods).forEach(function (name) {
  2555. appOptions[name] = methods[name];
  2556. });
  2557. }
  2558. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2559. initHooks(appOptions, hooks);
  2560. initUnknownHooks(appOptions, vm.$options);
  2561. return appOptions;
  2562. }
  2563. function parseApp(vm) {
  2564. return parseBaseApp(vm, {
  2565. mocks: mocks,
  2566. initRefs: initRefs
  2567. });
  2568. }
  2569. function createApp(vm) {
  2570. App(parseApp(vm));
  2571. return vm;
  2572. }
  2573. var encodeReserveRE = /[!'()*]/g;
  2574. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2575. return '%' + c.charCodeAt(0).toString(16);
  2576. };
  2577. var commaRE = /%2C/g;
  2578. // fixed encodeURIComponent which is more conformant to RFC3986:
  2579. // - escapes [!'()*]
  2580. // - preserve commas
  2581. var encode = function encode(str) {
  2582. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2583. };
  2584. function stringifyQuery(obj) {
  2585. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2586. var res = obj ? Object.keys(obj).map(function (key) {
  2587. var val = obj[key];
  2588. if (val === undefined) {
  2589. return '';
  2590. }
  2591. if (val === null) {
  2592. return encodeStr(key);
  2593. }
  2594. if (Array.isArray(val)) {
  2595. var result = [];
  2596. val.forEach(function (val2) {
  2597. if (val2 === undefined) {
  2598. return;
  2599. }
  2600. if (val2 === null) {
  2601. result.push(encodeStr(key));
  2602. } else {
  2603. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2604. }
  2605. });
  2606. return result.join('&');
  2607. }
  2608. return encodeStr(key) + '=' + encodeStr(val);
  2609. }).filter(function (x) {
  2610. return x.length > 0;
  2611. }).join('&') : null;
  2612. return res ? "?".concat(res) : '';
  2613. }
  2614. function parseBaseComponent(vueComponentOptions) {
  2615. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2616. isPage = _ref5.isPage,
  2617. initRelation = _ref5.initRelation;
  2618. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2619. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2620. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2621. VueComponent = _initVueComponent2[0],
  2622. vueOptions = _initVueComponent2[1];
  2623. var options = _objectSpread({
  2624. multipleSlots: true,
  2625. // styleIsolation: 'apply-shared',
  2626. addGlobalClass: true
  2627. }, vueOptions.options || {});
  2628. {
  2629. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2630. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2631. Object.assign(options, vueOptions['mp-weixin'].options);
  2632. }
  2633. }
  2634. var componentOptions = {
  2635. options: options,
  2636. data: initData(vueOptions, _vue.default.prototype),
  2637. behaviors: initBehaviors(vueOptions, initBehavior),
  2638. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2639. lifetimes: {
  2640. attached: function attached() {
  2641. var properties = this.properties;
  2642. var options = {
  2643. mpType: isPage.call(this) ? 'page' : 'component',
  2644. mpInstance: this,
  2645. propsData: properties
  2646. };
  2647. initVueIds(properties.vueId, this);
  2648. // 处理父子关系
  2649. initRelation.call(this, {
  2650. vuePid: this._$vuePid,
  2651. vueOptions: options
  2652. });
  2653. // 初始化 vue 实例
  2654. this.$vm = new VueComponent(options);
  2655. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2656. initSlots(this.$vm, properties.vueSlots);
  2657. // 触发首次 setData
  2658. this.$vm.$mount();
  2659. },
  2660. ready: function ready() {
  2661. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2662. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2663. if (this.$vm) {
  2664. this.$vm._isMounted = true;
  2665. this.$vm.__call_hook('mounted');
  2666. this.$vm.__call_hook('onReady');
  2667. }
  2668. },
  2669. detached: function detached() {
  2670. this.$vm && this.$vm.$destroy();
  2671. }
  2672. },
  2673. pageLifetimes: {
  2674. show: function show(args) {
  2675. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2676. },
  2677. hide: function hide() {
  2678. this.$vm && this.$vm.__call_hook('onPageHide');
  2679. },
  2680. resize: function resize(size) {
  2681. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2682. }
  2683. },
  2684. methods: {
  2685. __l: handleLink,
  2686. __e: handleEvent
  2687. }
  2688. };
  2689. // externalClasses
  2690. if (vueOptions.externalClasses) {
  2691. componentOptions.externalClasses = vueOptions.externalClasses;
  2692. }
  2693. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2694. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2695. componentOptions.methods[callMethod] = function (args) {
  2696. return this.$vm[callMethod](args);
  2697. };
  2698. });
  2699. }
  2700. if (needVueOptions) {
  2701. return [componentOptions, vueOptions, VueComponent];
  2702. }
  2703. if (isPage) {
  2704. return componentOptions;
  2705. }
  2706. return [componentOptions, VueComponent];
  2707. }
  2708. function parseComponent(vueComponentOptions, needVueOptions) {
  2709. return parseBaseComponent(vueComponentOptions, {
  2710. isPage: isPage,
  2711. initRelation: initRelation
  2712. }, needVueOptions);
  2713. }
  2714. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2715. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2716. function parseBasePage(vuePageOptions) {
  2717. var _parseComponent = parseComponent(vuePageOptions, true),
  2718. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2719. pageOptions = _parseComponent2[0],
  2720. vueOptions = _parseComponent2[1];
  2721. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2722. pageOptions.methods.onLoad = function (query) {
  2723. this.options = query;
  2724. var copyQuery = Object.assign({}, query);
  2725. delete copyQuery.__id__;
  2726. this.$page = {
  2727. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2728. };
  2729. this.$vm.$mp.query = query; // 兼容 mpvue
  2730. this.$vm.__call_hook('onLoad', query);
  2731. };
  2732. {
  2733. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2734. }
  2735. {
  2736. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2737. }
  2738. return pageOptions;
  2739. }
  2740. function parsePage(vuePageOptions) {
  2741. return parseBasePage(vuePageOptions);
  2742. }
  2743. function createPage(vuePageOptions) {
  2744. {
  2745. return Component(parsePage(vuePageOptions));
  2746. }
  2747. }
  2748. function createComponent(vueOptions) {
  2749. {
  2750. return Component(parseComponent(vueOptions));
  2751. }
  2752. }
  2753. function createSubpackageApp(vm) {
  2754. var appOptions = parseApp(vm);
  2755. var app = getApp({
  2756. allowDefault: true
  2757. });
  2758. vm.$scope = app;
  2759. var globalData = app.globalData;
  2760. if (globalData) {
  2761. Object.keys(appOptions.globalData).forEach(function (name) {
  2762. if (!hasOwn(globalData, name)) {
  2763. globalData[name] = appOptions.globalData[name];
  2764. }
  2765. });
  2766. }
  2767. Object.keys(appOptions).forEach(function (name) {
  2768. if (!hasOwn(app, name)) {
  2769. app[name] = appOptions[name];
  2770. }
  2771. });
  2772. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2773. wx.onAppShow(function () {
  2774. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2775. args[_key5] = arguments[_key5];
  2776. }
  2777. vm.__call_hook('onShow', args);
  2778. });
  2779. }
  2780. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2781. wx.onAppHide(function () {
  2782. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2783. args[_key6] = arguments[_key6];
  2784. }
  2785. vm.__call_hook('onHide', args);
  2786. });
  2787. }
  2788. if (isFn(appOptions.onLaunch)) {
  2789. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2790. vm.__call_hook('onLaunch', args);
  2791. }
  2792. return vm;
  2793. }
  2794. function createPlugin(vm) {
  2795. var appOptions = parseApp(vm);
  2796. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2797. wx.onAppShow(function () {
  2798. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2799. args[_key7] = arguments[_key7];
  2800. }
  2801. vm.__call_hook('onShow', args);
  2802. });
  2803. }
  2804. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2805. wx.onAppHide(function () {
  2806. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2807. args[_key8] = arguments[_key8];
  2808. }
  2809. vm.__call_hook('onHide', args);
  2810. });
  2811. }
  2812. if (isFn(appOptions.onLaunch)) {
  2813. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2814. vm.__call_hook('onLaunch', args);
  2815. }
  2816. return vm;
  2817. }
  2818. todos.forEach(function (todoApi) {
  2819. protocols[todoApi] = false;
  2820. });
  2821. canIUses.forEach(function (canIUseApi) {
  2822. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2823. if (!wx.canIUse(apiName)) {
  2824. protocols[canIUseApi] = false;
  2825. }
  2826. });
  2827. var uni = {};
  2828. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2829. uni = new Proxy({}, {
  2830. get: function get(target, name) {
  2831. if (hasOwn(target, name)) {
  2832. return target[name];
  2833. }
  2834. if (baseApi[name]) {
  2835. return baseApi[name];
  2836. }
  2837. if (api[name]) {
  2838. return promisify(name, api[name]);
  2839. }
  2840. {
  2841. if (extraApi[name]) {
  2842. return promisify(name, extraApi[name]);
  2843. }
  2844. if (todoApis[name]) {
  2845. return promisify(name, todoApis[name]);
  2846. }
  2847. }
  2848. if (eventApi[name]) {
  2849. return eventApi[name];
  2850. }
  2851. return promisify(name, wrapper(name, wx[name]));
  2852. },
  2853. set: function set(target, name, value) {
  2854. target[name] = value;
  2855. return true;
  2856. }
  2857. });
  2858. } else {
  2859. Object.keys(baseApi).forEach(function (name) {
  2860. uni[name] = baseApi[name];
  2861. });
  2862. {
  2863. Object.keys(todoApis).forEach(function (name) {
  2864. uni[name] = promisify(name, todoApis[name]);
  2865. });
  2866. Object.keys(extraApi).forEach(function (name) {
  2867. uni[name] = promisify(name, todoApis[name]);
  2868. });
  2869. }
  2870. Object.keys(eventApi).forEach(function (name) {
  2871. uni[name] = eventApi[name];
  2872. });
  2873. Object.keys(api).forEach(function (name) {
  2874. uni[name] = promisify(name, api[name]);
  2875. });
  2876. Object.keys(wx).forEach(function (name) {
  2877. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2878. uni[name] = promisify(name, wrapper(name, wx[name]));
  2879. }
  2880. });
  2881. }
  2882. wx.createApp = createApp;
  2883. wx.createPage = createPage;
  2884. wx.createComponent = createComponent;
  2885. wx.createSubpackageApp = createSubpackageApp;
  2886. wx.createPlugin = createPlugin;
  2887. var uni$1 = uni;
  2888. var _default = uni$1;
  2889. exports.default = _default;
  2890. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  2891. /***/ }),
  2892. /***/ 20:
  2893. /*!****************************************************************!*\
  2894. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2895. \****************************************************************/
  2896. /*! no static exports found */
  2897. /***/ (function(module, exports) {
  2898. function _iterableToArray(iter) {
  2899. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2900. }
  2901. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2902. /***/ }),
  2903. /***/ 21:
  2904. /*!******************************************************************!*\
  2905. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2906. \******************************************************************/
  2907. /*! no static exports found */
  2908. /***/ (function(module, exports) {
  2909. function _nonIterableSpread() {
  2910. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2911. }
  2912. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2913. /***/ }),
  2914. /***/ 22:
  2915. /*!*************************************************************!*\
  2916. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2917. \*************************************************************/
  2918. /*! no static exports found */
  2919. /***/ (function(module, exports, __webpack_require__) {
  2920. "use strict";
  2921. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2922. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2923. Object.defineProperty(exports, "__esModule", {
  2924. value: true
  2925. });
  2926. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2927. exports.compileI18nJsonStr = compileI18nJsonStr;
  2928. exports.hasI18nJson = hasI18nJson;
  2929. exports.initVueI18n = initVueI18n;
  2930. exports.isI18nStr = isI18nStr;
  2931. exports.isString = void 0;
  2932. exports.normalizeLocale = normalizeLocale;
  2933. exports.parseI18nJson = parseI18nJson;
  2934. exports.resolveLocale = resolveLocale;
  2935. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2936. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2937. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2938. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2939. var isObject = function isObject(val) {
  2940. return val !== null && (0, _typeof2.default)(val) === 'object';
  2941. };
  2942. var defaultDelimiters = ['{', '}'];
  2943. var BaseFormatter = /*#__PURE__*/function () {
  2944. function BaseFormatter() {
  2945. (0, _classCallCheck2.default)(this, BaseFormatter);
  2946. this._caches = Object.create(null);
  2947. }
  2948. (0, _createClass2.default)(BaseFormatter, [{
  2949. key: "interpolate",
  2950. value: function interpolate(message, values) {
  2951. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2952. if (!values) {
  2953. return [message];
  2954. }
  2955. var tokens = this._caches[message];
  2956. if (!tokens) {
  2957. tokens = parse(message, delimiters);
  2958. this._caches[message] = tokens;
  2959. }
  2960. return compile(tokens, values);
  2961. }
  2962. }]);
  2963. return BaseFormatter;
  2964. }();
  2965. exports.Formatter = BaseFormatter;
  2966. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2967. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2968. function parse(format, _ref) {
  2969. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2970. startDelimiter = _ref2[0],
  2971. endDelimiter = _ref2[1];
  2972. var tokens = [];
  2973. var position = 0;
  2974. var text = '';
  2975. while (position < format.length) {
  2976. var char = format[position++];
  2977. if (char === startDelimiter) {
  2978. if (text) {
  2979. tokens.push({
  2980. type: 'text',
  2981. value: text
  2982. });
  2983. }
  2984. text = '';
  2985. var sub = '';
  2986. char = format[position++];
  2987. while (char !== undefined && char !== endDelimiter) {
  2988. sub += char;
  2989. char = format[position++];
  2990. }
  2991. var isClosed = char === endDelimiter;
  2992. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2993. tokens.push({
  2994. value: sub,
  2995. type: type
  2996. });
  2997. }
  2998. // else if (char === '%') {
  2999. // // when found rails i18n syntax, skip text capture
  3000. // if (format[position] !== '{') {
  3001. // text += char
  3002. // }
  3003. // }
  3004. else {
  3005. text += char;
  3006. }
  3007. }
  3008. text && tokens.push({
  3009. type: 'text',
  3010. value: text
  3011. });
  3012. return tokens;
  3013. }
  3014. function compile(tokens, values) {
  3015. var compiled = [];
  3016. var index = 0;
  3017. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  3018. if (mode === 'unknown') {
  3019. return compiled;
  3020. }
  3021. while (index < tokens.length) {
  3022. var token = tokens[index];
  3023. switch (token.type) {
  3024. case 'text':
  3025. compiled.push(token.value);
  3026. break;
  3027. case 'list':
  3028. compiled.push(values[parseInt(token.value, 10)]);
  3029. break;
  3030. case 'named':
  3031. if (mode === 'named') {
  3032. compiled.push(values[token.value]);
  3033. } else {
  3034. if (true) {
  3035. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  3036. }
  3037. }
  3038. break;
  3039. case 'unknown':
  3040. if (true) {
  3041. console.warn("Detect 'unknown' type of token!");
  3042. }
  3043. break;
  3044. }
  3045. index++;
  3046. }
  3047. return compiled;
  3048. }
  3049. var LOCALE_ZH_HANS = 'zh-Hans';
  3050. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  3051. var LOCALE_ZH_HANT = 'zh-Hant';
  3052. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  3053. var LOCALE_EN = 'en';
  3054. exports.LOCALE_EN = LOCALE_EN;
  3055. var LOCALE_FR = 'fr';
  3056. exports.LOCALE_FR = LOCALE_FR;
  3057. var LOCALE_ES = 'es';
  3058. exports.LOCALE_ES = LOCALE_ES;
  3059. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3060. var hasOwn = function hasOwn(val, key) {
  3061. return hasOwnProperty.call(val, key);
  3062. };
  3063. var defaultFormatter = new BaseFormatter();
  3064. function include(str, parts) {
  3065. return !!parts.find(function (part) {
  3066. return str.indexOf(part) !== -1;
  3067. });
  3068. }
  3069. function startsWith(str, parts) {
  3070. return parts.find(function (part) {
  3071. return str.indexOf(part) === 0;
  3072. });
  3073. }
  3074. function normalizeLocale(locale, messages) {
  3075. if (!locale) {
  3076. return;
  3077. }
  3078. locale = locale.trim().replace(/_/g, '-');
  3079. if (messages && messages[locale]) {
  3080. return locale;
  3081. }
  3082. locale = locale.toLowerCase();
  3083. if (locale === 'chinese') {
  3084. // 支付宝
  3085. return LOCALE_ZH_HANS;
  3086. }
  3087. if (locale.indexOf('zh') === 0) {
  3088. if (locale.indexOf('-hans') > -1) {
  3089. return LOCALE_ZH_HANS;
  3090. }
  3091. if (locale.indexOf('-hant') > -1) {
  3092. return LOCALE_ZH_HANT;
  3093. }
  3094. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  3095. return LOCALE_ZH_HANT;
  3096. }
  3097. return LOCALE_ZH_HANS;
  3098. }
  3099. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  3100. if (messages && Object.keys(messages).length > 0) {
  3101. locales = Object.keys(messages);
  3102. }
  3103. var lang = startsWith(locale, locales);
  3104. if (lang) {
  3105. return lang;
  3106. }
  3107. }
  3108. var I18n = /*#__PURE__*/function () {
  3109. function I18n(_ref3) {
  3110. var locale = _ref3.locale,
  3111. fallbackLocale = _ref3.fallbackLocale,
  3112. messages = _ref3.messages,
  3113. watcher = _ref3.watcher,
  3114. formater = _ref3.formater;
  3115. (0, _classCallCheck2.default)(this, I18n);
  3116. this.locale = LOCALE_EN;
  3117. this.fallbackLocale = LOCALE_EN;
  3118. this.message = {};
  3119. this.messages = {};
  3120. this.watchers = [];
  3121. if (fallbackLocale) {
  3122. this.fallbackLocale = fallbackLocale;
  3123. }
  3124. this.formater = formater || defaultFormatter;
  3125. this.messages = messages || {};
  3126. this.setLocale(locale || LOCALE_EN);
  3127. if (watcher) {
  3128. this.watchLocale(watcher);
  3129. }
  3130. }
  3131. (0, _createClass2.default)(I18n, [{
  3132. key: "setLocale",
  3133. value: function setLocale(locale) {
  3134. var _this = this;
  3135. var oldLocale = this.locale;
  3136. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  3137. if (!this.messages[this.locale]) {
  3138. // 可能初始化时不存在
  3139. this.messages[this.locale] = {};
  3140. }
  3141. this.message = this.messages[this.locale];
  3142. // 仅发生变化时,通知
  3143. if (oldLocale !== this.locale) {
  3144. this.watchers.forEach(function (watcher) {
  3145. watcher(_this.locale, oldLocale);
  3146. });
  3147. }
  3148. }
  3149. }, {
  3150. key: "getLocale",
  3151. value: function getLocale() {
  3152. return this.locale;
  3153. }
  3154. }, {
  3155. key: "watchLocale",
  3156. value: function watchLocale(fn) {
  3157. var _this2 = this;
  3158. var index = this.watchers.push(fn) - 1;
  3159. return function () {
  3160. _this2.watchers.splice(index, 1);
  3161. };
  3162. }
  3163. }, {
  3164. key: "add",
  3165. value: function add(locale, message) {
  3166. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3167. var curMessages = this.messages[locale];
  3168. if (curMessages) {
  3169. if (override) {
  3170. Object.assign(curMessages, message);
  3171. } else {
  3172. Object.keys(message).forEach(function (key) {
  3173. if (!hasOwn(curMessages, key)) {
  3174. curMessages[key] = message[key];
  3175. }
  3176. });
  3177. }
  3178. } else {
  3179. this.messages[locale] = message;
  3180. }
  3181. }
  3182. }, {
  3183. key: "f",
  3184. value: function f(message, values, delimiters) {
  3185. return this.formater.interpolate(message, values, delimiters).join('');
  3186. }
  3187. }, {
  3188. key: "t",
  3189. value: function t(key, locale, values) {
  3190. var message = this.message;
  3191. if (typeof locale === 'string') {
  3192. locale = normalizeLocale(locale, this.messages);
  3193. locale && (message = this.messages[locale]);
  3194. } else {
  3195. values = locale;
  3196. }
  3197. if (!hasOwn(message, key)) {
  3198. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  3199. return key;
  3200. }
  3201. return this.formater.interpolate(message[key], values).join('');
  3202. }
  3203. }]);
  3204. return I18n;
  3205. }();
  3206. exports.I18n = I18n;
  3207. function watchAppLocale(appVm, i18n) {
  3208. // 需要保证 watch 的触发在组件渲染之前
  3209. if (appVm.$watchLocale) {
  3210. // vue2
  3211. appVm.$watchLocale(function (newLocale) {
  3212. i18n.setLocale(newLocale);
  3213. });
  3214. } else {
  3215. appVm.$watch(function () {
  3216. return appVm.$locale;
  3217. }, function (newLocale) {
  3218. i18n.setLocale(newLocale);
  3219. });
  3220. }
  3221. }
  3222. function getDefaultLocale() {
  3223. if (typeof uni !== 'undefined' && uni.getLocale) {
  3224. return uni.getLocale();
  3225. }
  3226. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  3227. if (typeof global !== 'undefined' && global.getLocale) {
  3228. return global.getLocale();
  3229. }
  3230. return LOCALE_EN;
  3231. }
  3232. function initVueI18n(locale) {
  3233. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3234. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  3235. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  3236. // 兼容旧版本入参
  3237. if (typeof locale !== 'string') {
  3238. var _ref4 = [messages, locale];
  3239. locale = _ref4[0];
  3240. messages = _ref4[1];
  3241. }
  3242. if (typeof locale !== 'string') {
  3243. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  3244. locale = getDefaultLocale();
  3245. }
  3246. if (typeof fallbackLocale !== 'string') {
  3247. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  3248. }
  3249. var i18n = new I18n({
  3250. locale: locale,
  3251. fallbackLocale: fallbackLocale,
  3252. messages: messages,
  3253. watcher: watcher
  3254. });
  3255. var _t = function t(key, values) {
  3256. if (typeof getApp !== 'function') {
  3257. // app view
  3258. /* eslint-disable no-func-assign */
  3259. _t = function t(key, values) {
  3260. return i18n.t(key, values);
  3261. };
  3262. } else {
  3263. var isWatchedAppLocale = false;
  3264. _t = function t(key, values) {
  3265. var appVm = getApp().$vm;
  3266. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  3267. // options: {
  3268. // type: Array,
  3269. // default () {
  3270. // return [{
  3271. // icon: 'shop',
  3272. // text: t("uni-goods-nav.options.shop"),
  3273. // }, {
  3274. // icon: 'cart',
  3275. // text: t("uni-goods-nav.options.cart")
  3276. // }]
  3277. // }
  3278. // },
  3279. if (appVm) {
  3280. // 触发响应式
  3281. appVm.$locale;
  3282. if (!isWatchedAppLocale) {
  3283. isWatchedAppLocale = true;
  3284. watchAppLocale(appVm, i18n);
  3285. }
  3286. }
  3287. return i18n.t(key, values);
  3288. };
  3289. }
  3290. return _t(key, values);
  3291. };
  3292. return {
  3293. i18n: i18n,
  3294. f: function f(message, values, delimiters) {
  3295. return i18n.f(message, values, delimiters);
  3296. },
  3297. t: function t(key, values) {
  3298. return _t(key, values);
  3299. },
  3300. add: function add(locale, message) {
  3301. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3302. return i18n.add(locale, message, override);
  3303. },
  3304. watch: function watch(fn) {
  3305. return i18n.watchLocale(fn);
  3306. },
  3307. getLocale: function getLocale() {
  3308. return i18n.getLocale();
  3309. },
  3310. setLocale: function setLocale(newLocale) {
  3311. return i18n.setLocale(newLocale);
  3312. }
  3313. };
  3314. }
  3315. var isString = function isString(val) {
  3316. return typeof val === 'string';
  3317. };
  3318. exports.isString = isString;
  3319. var formater;
  3320. function hasI18nJson(jsonObj, delimiters) {
  3321. if (!formater) {
  3322. formater = new BaseFormatter();
  3323. }
  3324. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3325. var value = jsonObj[key];
  3326. if (isString(value)) {
  3327. if (isI18nStr(value, delimiters)) {
  3328. return true;
  3329. }
  3330. } else {
  3331. return hasI18nJson(value, delimiters);
  3332. }
  3333. });
  3334. }
  3335. function parseI18nJson(jsonObj, values, delimiters) {
  3336. if (!formater) {
  3337. formater = new BaseFormatter();
  3338. }
  3339. walkJsonObj(jsonObj, function (jsonObj, key) {
  3340. var value = jsonObj[key];
  3341. if (isString(value)) {
  3342. if (isI18nStr(value, delimiters)) {
  3343. jsonObj[key] = compileStr(value, values, delimiters);
  3344. }
  3345. } else {
  3346. parseI18nJson(value, values, delimiters);
  3347. }
  3348. });
  3349. return jsonObj;
  3350. }
  3351. function compileI18nJsonStr(jsonStr, _ref5) {
  3352. var locale = _ref5.locale,
  3353. locales = _ref5.locales,
  3354. delimiters = _ref5.delimiters;
  3355. if (!isI18nStr(jsonStr, delimiters)) {
  3356. return jsonStr;
  3357. }
  3358. if (!formater) {
  3359. formater = new BaseFormatter();
  3360. }
  3361. var localeValues = [];
  3362. Object.keys(locales).forEach(function (name) {
  3363. if (name !== locale) {
  3364. localeValues.push({
  3365. locale: name,
  3366. values: locales[name]
  3367. });
  3368. }
  3369. });
  3370. localeValues.unshift({
  3371. locale: locale,
  3372. values: locales[locale]
  3373. });
  3374. try {
  3375. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3376. } catch (e) {}
  3377. return jsonStr;
  3378. }
  3379. function isI18nStr(value, delimiters) {
  3380. return value.indexOf(delimiters[0]) > -1;
  3381. }
  3382. function compileStr(value, values, delimiters) {
  3383. return formater.interpolate(value, values, delimiters).join('');
  3384. }
  3385. function compileValue(jsonObj, key, localeValues, delimiters) {
  3386. var value = jsonObj[key];
  3387. if (isString(value)) {
  3388. // 存在国际化
  3389. if (isI18nStr(value, delimiters)) {
  3390. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3391. if (localeValues.length > 1) {
  3392. // 格式化国际化语言
  3393. var valueLocales = jsonObj[key + 'Locales'] = {};
  3394. localeValues.forEach(function (localValue) {
  3395. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3396. });
  3397. }
  3398. }
  3399. } else {
  3400. compileJsonObj(value, localeValues, delimiters);
  3401. }
  3402. }
  3403. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3404. walkJsonObj(jsonObj, function (jsonObj, key) {
  3405. compileValue(jsonObj, key, localeValues, delimiters);
  3406. });
  3407. return jsonObj;
  3408. }
  3409. function walkJsonObj(jsonObj, walk) {
  3410. if (Array.isArray(jsonObj)) {
  3411. for (var i = 0; i < jsonObj.length; i++) {
  3412. if (walk(jsonObj, i)) {
  3413. return true;
  3414. }
  3415. }
  3416. } else if (isObject(jsonObj)) {
  3417. for (var key in jsonObj) {
  3418. if (walk(jsonObj, key)) {
  3419. return true;
  3420. }
  3421. }
  3422. }
  3423. return false;
  3424. }
  3425. function resolveLocale(locales) {
  3426. return function (locale) {
  3427. if (!locale) {
  3428. return locale;
  3429. }
  3430. locale = normalizeLocale(locale) || locale;
  3431. return resolveLocaleChain(locale).find(function (locale) {
  3432. return locales.indexOf(locale) > -1;
  3433. });
  3434. };
  3435. }
  3436. function resolveLocaleChain(locale) {
  3437. var chain = [];
  3438. var tokens = locale.split('-');
  3439. while (tokens.length) {
  3440. chain.push(tokens.join('-'));
  3441. tokens.pop();
  3442. }
  3443. return chain;
  3444. }
  3445. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./../../../webpack/buildin/global.js */ 3)))
  3446. /***/ }),
  3447. /***/ 23:
  3448. /*!***************************************************************!*\
  3449. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3450. \***************************************************************/
  3451. /*! no static exports found */
  3452. /***/ (function(module, exports) {
  3453. function _classCallCheck(instance, Constructor) {
  3454. if (!(instance instanceof Constructor)) {
  3455. throw new TypeError("Cannot call a class as a function");
  3456. }
  3457. }
  3458. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3459. /***/ }),
  3460. /***/ 24:
  3461. /*!************************************************************!*\
  3462. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3463. \************************************************************/
  3464. /*! no static exports found */
  3465. /***/ (function(module, exports, __webpack_require__) {
  3466. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3467. function _defineProperties(target, props) {
  3468. for (var i = 0; i < props.length; i++) {
  3469. var descriptor = props[i];
  3470. descriptor.enumerable = descriptor.enumerable || false;
  3471. descriptor.configurable = true;
  3472. if ("value" in descriptor) descriptor.writable = true;
  3473. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3474. }
  3475. }
  3476. function _createClass(Constructor, protoProps, staticProps) {
  3477. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3478. if (staticProps) _defineProperties(Constructor, staticProps);
  3479. Object.defineProperty(Constructor, "prototype", {
  3480. writable: false
  3481. });
  3482. return Constructor;
  3483. }
  3484. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3485. /***/ }),
  3486. /***/ 242:
  3487. /*!*****************************************!*\
  3488. !*** E:/项目资料/智慧社区/Applet/api/report.js ***!
  3489. \*****************************************/
  3490. /*! no static exports found */
  3491. /***/ (function(module, exports, __webpack_require__) {
  3492. "use strict";
  3493. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  3494. Object.defineProperty(exports, "__esModule", {
  3495. value: true
  3496. });
  3497. exports.default = void 0;
  3498. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  3499. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  3500. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  3501. var getDict = /*#__PURE__*/function () {
  3502. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(dictType) {
  3503. var res;
  3504. return _regenerator.default.wrap(function _callee$(_context) {
  3505. while (1) {
  3506. switch (_context.prev = _context.next) {
  3507. case 0:
  3508. _context.next = 2;
  3509. return _request.default.get({
  3510. url: "/dict/data/type/".concat(dictType)
  3511. });
  3512. case 2:
  3513. res = _context.sent;
  3514. return _context.abrupt("return", res.data);
  3515. case 4:
  3516. case "end":
  3517. return _context.stop();
  3518. }
  3519. }
  3520. }, _callee);
  3521. }));
  3522. return function getDict(_x) {
  3523. return _ref.apply(this, arguments);
  3524. };
  3525. }();
  3526. var submitgb = /*#__PURE__*/function () {
  3527. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  3528. var res;
  3529. return _regenerator.default.wrap(function _callee2$(_context2) {
  3530. while (1) {
  3531. switch (_context2.prev = _context2.next) {
  3532. case 0:
  3533. _context2.next = 2;
  3534. return _request.default.post({
  3535. url: "/dangjian/xiachenganbu",
  3536. data: data
  3537. });
  3538. case 2:
  3539. res = _context2.sent;
  3540. return _context2.abrupt("return", res.data);
  3541. case 4:
  3542. case "end":
  3543. return _context2.stop();
  3544. }
  3545. }
  3546. }, _callee2);
  3547. }));
  3548. return function submitgb(_x2) {
  3549. return _ref2.apply(this, arguments);
  3550. };
  3551. }();
  3552. var updategb = /*#__PURE__*/function () {
  3553. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(data) {
  3554. var res;
  3555. return _regenerator.default.wrap(function _callee3$(_context3) {
  3556. while (1) {
  3557. switch (_context3.prev = _context3.next) {
  3558. case 0:
  3559. _context3.next = 2;
  3560. return _request.default.post({
  3561. url: "/dangjian/xiachenganbu-update",
  3562. data: data
  3563. });
  3564. case 2:
  3565. res = _context3.sent;
  3566. return _context3.abrupt("return", res.data);
  3567. case 4:
  3568. case "end":
  3569. return _context3.stop();
  3570. }
  3571. }
  3572. }, _callee3);
  3573. }));
  3574. return function updategb(_x3) {
  3575. return _ref3.apply(this, arguments);
  3576. };
  3577. }();
  3578. var submitdy = /*#__PURE__*/function () {
  3579. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
  3580. var res;
  3581. return _regenerator.default.wrap(function _callee4$(_context4) {
  3582. while (1) {
  3583. switch (_context4.prev = _context4.next) {
  3584. case 0:
  3585. _context4.next = 2;
  3586. return _request.default.post({
  3587. url: "/dangjian/dangyuan",
  3588. data: data
  3589. });
  3590. case 2:
  3591. res = _context4.sent;
  3592. return _context4.abrupt("return", res.data);
  3593. case 4:
  3594. case "end":
  3595. return _context4.stop();
  3596. }
  3597. }
  3598. }, _callee4);
  3599. }));
  3600. return function submitdy(_x4) {
  3601. return _ref4.apply(this, arguments);
  3602. };
  3603. }();
  3604. var updatedy = /*#__PURE__*/function () {
  3605. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data) {
  3606. var res;
  3607. return _regenerator.default.wrap(function _callee5$(_context5) {
  3608. while (1) {
  3609. switch (_context5.prev = _context5.next) {
  3610. case 0:
  3611. _context5.next = 2;
  3612. return _request.default.post({
  3613. url: "/dangjian/dangyuan-update",
  3614. data: data
  3615. });
  3616. case 2:
  3617. res = _context5.sent;
  3618. return _context5.abrupt("return", res.data);
  3619. case 4:
  3620. case "end":
  3621. return _context5.stop();
  3622. }
  3623. }
  3624. }, _callee5);
  3625. }));
  3626. return function updatedy(_x5) {
  3627. return _ref5.apply(this, arguments);
  3628. };
  3629. }();
  3630. var getGbStatus = /*#__PURE__*/function () {
  3631. var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
  3632. var res;
  3633. return _regenerator.default.wrap(function _callee6$(_context6) {
  3634. while (1) {
  3635. switch (_context6.prev = _context6.next) {
  3636. case 0:
  3637. _context6.next = 2;
  3638. return _request.default.get({
  3639. url: "/dangjian/xiachenganbu-status"
  3640. });
  3641. case 2:
  3642. res = _context6.sent;
  3643. return _context6.abrupt("return", res.data);
  3644. case 4:
  3645. case "end":
  3646. return _context6.stop();
  3647. }
  3648. }
  3649. }, _callee6);
  3650. }));
  3651. return function getGbStatus() {
  3652. return _ref6.apply(this, arguments);
  3653. };
  3654. }();
  3655. var getDyStatus = /*#__PURE__*/function () {
  3656. var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  3657. var res;
  3658. return _regenerator.default.wrap(function _callee7$(_context7) {
  3659. while (1) {
  3660. switch (_context7.prev = _context7.next) {
  3661. case 0:
  3662. _context7.next = 2;
  3663. return _request.default.get({
  3664. url: "/dangjian/dangyuan-status"
  3665. });
  3666. case 2:
  3667. res = _context7.sent;
  3668. return _context7.abrupt("return", res.data);
  3669. case 4:
  3670. case "end":
  3671. return _context7.stop();
  3672. }
  3673. }
  3674. }, _callee7);
  3675. }));
  3676. return function getDyStatus() {
  3677. return _ref7.apply(this, arguments);
  3678. };
  3679. }();
  3680. var getCommunity = /*#__PURE__*/function () {
  3681. var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  3682. var res;
  3683. return _regenerator.default.wrap(function _callee8$(_context8) {
  3684. while (1) {
  3685. switch (_context8.prev = _context8.next) {
  3686. case 0:
  3687. _context8.next = 2;
  3688. return _request.default.get({
  3689. url: "/wx/addr/community"
  3690. });
  3691. case 2:
  3692. res = _context8.sent;
  3693. return _context8.abrupt("return", res.data);
  3694. case 4:
  3695. case "end":
  3696. return _context8.stop();
  3697. }
  3698. }
  3699. }, _callee8);
  3700. }));
  3701. return function getCommunity() {
  3702. return _ref8.apply(this, arguments);
  3703. };
  3704. }();
  3705. // 签到
  3706. // 查询是否是党员
  3707. var getisdy = /*#__PURE__*/function () {
  3708. var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  3709. var res;
  3710. return _regenerator.default.wrap(function _callee9$(_context9) {
  3711. while (1) {
  3712. switch (_context9.prev = _context9.next) {
  3713. case 0:
  3714. _context9.next = 2;
  3715. return _request.default.get({
  3716. url: "/dangjian/is-dangyuan"
  3717. });
  3718. case 2:
  3719. res = _context9.sent;
  3720. return _context9.abrupt("return", res.data);
  3721. case 4:
  3722. case "end":
  3723. return _context9.stop();
  3724. }
  3725. }
  3726. }, _callee9);
  3727. }));
  3728. return function getisdy() {
  3729. return _ref9.apply(this, arguments);
  3730. };
  3731. }();
  3732. // 查询是否签到
  3733. var getqdstatus = /*#__PURE__*/function () {
  3734. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10() {
  3735. var res;
  3736. return _regenerator.default.wrap(function _callee10$(_context10) {
  3737. while (1) {
  3738. switch (_context10.prev = _context10.next) {
  3739. case 0:
  3740. _context10.next = 2;
  3741. return _request.default.get({
  3742. url: "/dangjian/clockin-status"
  3743. });
  3744. case 2:
  3745. res = _context10.sent;
  3746. return _context10.abrupt("return", res.data);
  3747. case 4:
  3748. case "end":
  3749. return _context10.stop();
  3750. }
  3751. }
  3752. }, _callee10);
  3753. }));
  3754. return function getqdstatus() {
  3755. return _ref10.apply(this, arguments);
  3756. };
  3757. }();
  3758. // 签到
  3759. var clockin = /*#__PURE__*/function () {
  3760. var _ref11 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(data) {
  3761. var res;
  3762. return _regenerator.default.wrap(function _callee11$(_context11) {
  3763. while (1) {
  3764. switch (_context11.prev = _context11.next) {
  3765. case 0:
  3766. _context11.next = 2;
  3767. return _request.default.post({
  3768. url: "/dangjian/clockin",
  3769. data: data
  3770. });
  3771. case 2:
  3772. res = _context11.sent;
  3773. return _context11.abrupt("return", res.data);
  3774. case 4:
  3775. case "end":
  3776. return _context11.stop();
  3777. }
  3778. }
  3779. }, _callee11);
  3780. }));
  3781. return function clockin(_x6) {
  3782. return _ref11.apply(this, arguments);
  3783. };
  3784. }();
  3785. var _default = {
  3786. getDict: getDict,
  3787. submitgb: submitgb,
  3788. submitdy: submitdy,
  3789. getDyStatus: getDyStatus,
  3790. getGbStatus: getGbStatus,
  3791. getCommunity: getCommunity,
  3792. updatedy: updatedy,
  3793. updategb: updategb,
  3794. getisdy: getisdy,
  3795. getqdstatus: getqdstatus,
  3796. clockin: clockin
  3797. };
  3798. exports.default = _default;
  3799. /***/ }),
  3800. /***/ 25:
  3801. /*!******************************************************************************************!*\
  3802. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3803. \******************************************************************************************/
  3804. /*! exports provided: default */
  3805. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3806. "use strict";
  3807. __webpack_require__.r(__webpack_exports__);
  3808. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3809. * Vue.js v2.6.11
  3810. * (c) 2014-2023 Evan You
  3811. * Released under the MIT License.
  3812. */
  3813. /* */
  3814. var emptyObject = Object.freeze({});
  3815. // These helpers produce better VM code in JS engines due to their
  3816. // explicitness and function inlining.
  3817. function isUndef (v) {
  3818. return v === undefined || v === null
  3819. }
  3820. function isDef (v) {
  3821. return v !== undefined && v !== null
  3822. }
  3823. function isTrue (v) {
  3824. return v === true
  3825. }
  3826. function isFalse (v) {
  3827. return v === false
  3828. }
  3829. /**
  3830. * Check if value is primitive.
  3831. */
  3832. function isPrimitive (value) {
  3833. return (
  3834. typeof value === 'string' ||
  3835. typeof value === 'number' ||
  3836. // $flow-disable-line
  3837. typeof value === 'symbol' ||
  3838. typeof value === 'boolean'
  3839. )
  3840. }
  3841. /**
  3842. * Quick object check - this is primarily used to tell
  3843. * Objects from primitive values when we know the value
  3844. * is a JSON-compliant type.
  3845. */
  3846. function isObject (obj) {
  3847. return obj !== null && typeof obj === 'object'
  3848. }
  3849. /**
  3850. * Get the raw type string of a value, e.g., [object Object].
  3851. */
  3852. var _toString = Object.prototype.toString;
  3853. function toRawType (value) {
  3854. return _toString.call(value).slice(8, -1)
  3855. }
  3856. /**
  3857. * Strict object type check. Only returns true
  3858. * for plain JavaScript objects.
  3859. */
  3860. function isPlainObject (obj) {
  3861. return _toString.call(obj) === '[object Object]'
  3862. }
  3863. function isRegExp (v) {
  3864. return _toString.call(v) === '[object RegExp]'
  3865. }
  3866. /**
  3867. * Check if val is a valid array index.
  3868. */
  3869. function isValidArrayIndex (val) {
  3870. var n = parseFloat(String(val));
  3871. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3872. }
  3873. function isPromise (val) {
  3874. return (
  3875. isDef(val) &&
  3876. typeof val.then === 'function' &&
  3877. typeof val.catch === 'function'
  3878. )
  3879. }
  3880. /**
  3881. * Convert a value to a string that is actually rendered.
  3882. */
  3883. function toString (val) {
  3884. return val == null
  3885. ? ''
  3886. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3887. ? JSON.stringify(val, null, 2)
  3888. : String(val)
  3889. }
  3890. /**
  3891. * Convert an input value to a number for persistence.
  3892. * If the conversion fails, return original string.
  3893. */
  3894. function toNumber (val) {
  3895. var n = parseFloat(val);
  3896. return isNaN(n) ? val : n
  3897. }
  3898. /**
  3899. * Make a map and return a function for checking if a key
  3900. * is in that map.
  3901. */
  3902. function makeMap (
  3903. str,
  3904. expectsLowerCase
  3905. ) {
  3906. var map = Object.create(null);
  3907. var list = str.split(',');
  3908. for (var i = 0; i < list.length; i++) {
  3909. map[list[i]] = true;
  3910. }
  3911. return expectsLowerCase
  3912. ? function (val) { return map[val.toLowerCase()]; }
  3913. : function (val) { return map[val]; }
  3914. }
  3915. /**
  3916. * Check if a tag is a built-in tag.
  3917. */
  3918. var isBuiltInTag = makeMap('slot,component', true);
  3919. /**
  3920. * Check if an attribute is a reserved attribute.
  3921. */
  3922. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3923. /**
  3924. * Remove an item from an array.
  3925. */
  3926. function remove (arr, item) {
  3927. if (arr.length) {
  3928. var index = arr.indexOf(item);
  3929. if (index > -1) {
  3930. return arr.splice(index, 1)
  3931. }
  3932. }
  3933. }
  3934. /**
  3935. * Check whether an object has the property.
  3936. */
  3937. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3938. function hasOwn (obj, key) {
  3939. return hasOwnProperty.call(obj, key)
  3940. }
  3941. /**
  3942. * Create a cached version of a pure function.
  3943. */
  3944. function cached (fn) {
  3945. var cache = Object.create(null);
  3946. return (function cachedFn (str) {
  3947. var hit = cache[str];
  3948. return hit || (cache[str] = fn(str))
  3949. })
  3950. }
  3951. /**
  3952. * Camelize a hyphen-delimited string.
  3953. */
  3954. var camelizeRE = /-(\w)/g;
  3955. var camelize = cached(function (str) {
  3956. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3957. });
  3958. /**
  3959. * Capitalize a string.
  3960. */
  3961. var capitalize = cached(function (str) {
  3962. return str.charAt(0).toUpperCase() + str.slice(1)
  3963. });
  3964. /**
  3965. * Hyphenate a camelCase string.
  3966. */
  3967. var hyphenateRE = /\B([A-Z])/g;
  3968. var hyphenate = cached(function (str) {
  3969. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3970. });
  3971. /**
  3972. * Simple bind polyfill for environments that do not support it,
  3973. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3974. * since native bind is now performant enough in most browsers.
  3975. * But removing it would mean breaking code that was able to run in
  3976. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3977. */
  3978. /* istanbul ignore next */
  3979. function polyfillBind (fn, ctx) {
  3980. function boundFn (a) {
  3981. var l = arguments.length;
  3982. return l
  3983. ? l > 1
  3984. ? fn.apply(ctx, arguments)
  3985. : fn.call(ctx, a)
  3986. : fn.call(ctx)
  3987. }
  3988. boundFn._length = fn.length;
  3989. return boundFn
  3990. }
  3991. function nativeBind (fn, ctx) {
  3992. return fn.bind(ctx)
  3993. }
  3994. var bind = Function.prototype.bind
  3995. ? nativeBind
  3996. : polyfillBind;
  3997. /**
  3998. * Convert an Array-like object to a real Array.
  3999. */
  4000. function toArray (list, start) {
  4001. start = start || 0;
  4002. var i = list.length - start;
  4003. var ret = new Array(i);
  4004. while (i--) {
  4005. ret[i] = list[i + start];
  4006. }
  4007. return ret
  4008. }
  4009. /**
  4010. * Mix properties into target object.
  4011. */
  4012. function extend (to, _from) {
  4013. for (var key in _from) {
  4014. to[key] = _from[key];
  4015. }
  4016. return to
  4017. }
  4018. /**
  4019. * Merge an Array of Objects into a single Object.
  4020. */
  4021. function toObject (arr) {
  4022. var res = {};
  4023. for (var i = 0; i < arr.length; i++) {
  4024. if (arr[i]) {
  4025. extend(res, arr[i]);
  4026. }
  4027. }
  4028. return res
  4029. }
  4030. /* eslint-disable no-unused-vars */
  4031. /**
  4032. * Perform no operation.
  4033. * Stubbing args to make Flow happy without leaving useless transpiled code
  4034. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4035. */
  4036. function noop (a, b, c) {}
  4037. /**
  4038. * Always return false.
  4039. */
  4040. var no = function (a, b, c) { return false; };
  4041. /* eslint-enable no-unused-vars */
  4042. /**
  4043. * Return the same value.
  4044. */
  4045. var identity = function (_) { return _; };
  4046. /**
  4047. * Check if two values are loosely equal - that is,
  4048. * if they are plain objects, do they have the same shape?
  4049. */
  4050. function looseEqual (a, b) {
  4051. if (a === b) { return true }
  4052. var isObjectA = isObject(a);
  4053. var isObjectB = isObject(b);
  4054. if (isObjectA && isObjectB) {
  4055. try {
  4056. var isArrayA = Array.isArray(a);
  4057. var isArrayB = Array.isArray(b);
  4058. if (isArrayA && isArrayB) {
  4059. return a.length === b.length && a.every(function (e, i) {
  4060. return looseEqual(e, b[i])
  4061. })
  4062. } else if (a instanceof Date && b instanceof Date) {
  4063. return a.getTime() === b.getTime()
  4064. } else if (!isArrayA && !isArrayB) {
  4065. var keysA = Object.keys(a);
  4066. var keysB = Object.keys(b);
  4067. return keysA.length === keysB.length && keysA.every(function (key) {
  4068. return looseEqual(a[key], b[key])
  4069. })
  4070. } else {
  4071. /* istanbul ignore next */
  4072. return false
  4073. }
  4074. } catch (e) {
  4075. /* istanbul ignore next */
  4076. return false
  4077. }
  4078. } else if (!isObjectA && !isObjectB) {
  4079. return String(a) === String(b)
  4080. } else {
  4081. return false
  4082. }
  4083. }
  4084. /**
  4085. * Return the first index at which a loosely equal value can be
  4086. * found in the array (if value is a plain object, the array must
  4087. * contain an object of the same shape), or -1 if it is not present.
  4088. */
  4089. function looseIndexOf (arr, val) {
  4090. for (var i = 0; i < arr.length; i++) {
  4091. if (looseEqual(arr[i], val)) { return i }
  4092. }
  4093. return -1
  4094. }
  4095. /**
  4096. * Ensure a function is called only once.
  4097. */
  4098. function once (fn) {
  4099. var called = false;
  4100. return function () {
  4101. if (!called) {
  4102. called = true;
  4103. fn.apply(this, arguments);
  4104. }
  4105. }
  4106. }
  4107. var ASSET_TYPES = [
  4108. 'component',
  4109. 'directive',
  4110. 'filter'
  4111. ];
  4112. var LIFECYCLE_HOOKS = [
  4113. 'beforeCreate',
  4114. 'created',
  4115. 'beforeMount',
  4116. 'mounted',
  4117. 'beforeUpdate',
  4118. 'updated',
  4119. 'beforeDestroy',
  4120. 'destroyed',
  4121. 'activated',
  4122. 'deactivated',
  4123. 'errorCaptured',
  4124. 'serverPrefetch'
  4125. ];
  4126. /* */
  4127. var config = ({
  4128. /**
  4129. * Option merge strategies (used in core/util/options)
  4130. */
  4131. // $flow-disable-line
  4132. optionMergeStrategies: Object.create(null),
  4133. /**
  4134. * Whether to suppress warnings.
  4135. */
  4136. silent: false,
  4137. /**
  4138. * Show production mode tip message on boot?
  4139. */
  4140. productionTip: "development" !== 'production',
  4141. /**
  4142. * Whether to enable devtools
  4143. */
  4144. devtools: "development" !== 'production',
  4145. /**
  4146. * Whether to record perf
  4147. */
  4148. performance: false,
  4149. /**
  4150. * Error handler for watcher errors
  4151. */
  4152. errorHandler: null,
  4153. /**
  4154. * Warn handler for watcher warns
  4155. */
  4156. warnHandler: null,
  4157. /**
  4158. * Ignore certain custom elements
  4159. */
  4160. ignoredElements: [],
  4161. /**
  4162. * Custom user key aliases for v-on
  4163. */
  4164. // $flow-disable-line
  4165. keyCodes: Object.create(null),
  4166. /**
  4167. * Check if a tag is reserved so that it cannot be registered as a
  4168. * component. This is platform-dependent and may be overwritten.
  4169. */
  4170. isReservedTag: no,
  4171. /**
  4172. * Check if an attribute is reserved so that it cannot be used as a component
  4173. * prop. This is platform-dependent and may be overwritten.
  4174. */
  4175. isReservedAttr: no,
  4176. /**
  4177. * Check if a tag is an unknown element.
  4178. * Platform-dependent.
  4179. */
  4180. isUnknownElement: no,
  4181. /**
  4182. * Get the namespace of an element
  4183. */
  4184. getTagNamespace: noop,
  4185. /**
  4186. * Parse the real tag name for the specific platform.
  4187. */
  4188. parsePlatformTagName: identity,
  4189. /**
  4190. * Check if an attribute must be bound using property, e.g. value
  4191. * Platform-dependent.
  4192. */
  4193. mustUseProp: no,
  4194. /**
  4195. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  4196. * This will significantly reduce performance if set to false.
  4197. */
  4198. async: true,
  4199. /**
  4200. * Exposed for legacy reasons
  4201. */
  4202. _lifecycleHooks: LIFECYCLE_HOOKS
  4203. });
  4204. /* */
  4205. /**
  4206. * unicode letters used for parsing html tags, component names and property paths.
  4207. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  4208. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  4209. */
  4210. 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/;
  4211. /**
  4212. * Check if a string starts with $ or _
  4213. */
  4214. function isReserved (str) {
  4215. var c = (str + '').charCodeAt(0);
  4216. return c === 0x24 || c === 0x5F
  4217. }
  4218. /**
  4219. * Define a property.
  4220. */
  4221. function def (obj, key, val, enumerable) {
  4222. Object.defineProperty(obj, key, {
  4223. value: val,
  4224. enumerable: !!enumerable,
  4225. writable: true,
  4226. configurable: true
  4227. });
  4228. }
  4229. /**
  4230. * Parse simple path.
  4231. */
  4232. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  4233. function parsePath (path) {
  4234. if (bailRE.test(path)) {
  4235. return
  4236. }
  4237. var segments = path.split('.');
  4238. return function (obj) {
  4239. for (var i = 0; i < segments.length; i++) {
  4240. if (!obj) { return }
  4241. obj = obj[segments[i]];
  4242. }
  4243. return obj
  4244. }
  4245. }
  4246. /* */
  4247. // can we use __proto__?
  4248. var hasProto = '__proto__' in {};
  4249. // Browser environment sniffing
  4250. var inBrowser = typeof window !== 'undefined';
  4251. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  4252. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  4253. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  4254. var isIE = UA && /msie|trident/.test(UA);
  4255. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  4256. var isEdge = UA && UA.indexOf('edge/') > 0;
  4257. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  4258. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  4259. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  4260. var isPhantomJS = UA && /phantomjs/.test(UA);
  4261. var isFF = UA && UA.match(/firefox\/(\d+)/);
  4262. // Firefox has a "watch" function on Object.prototype...
  4263. var nativeWatch = ({}).watch;
  4264. if (inBrowser) {
  4265. try {
  4266. var opts = {};
  4267. Object.defineProperty(opts, 'passive', ({
  4268. get: function get () {
  4269. }
  4270. })); // https://github.com/facebook/flow/issues/285
  4271. window.addEventListener('test-passive', null, opts);
  4272. } catch (e) {}
  4273. }
  4274. // this needs to be lazy-evaled because vue may be required before
  4275. // vue-server-renderer can set VUE_ENV
  4276. var _isServer;
  4277. var isServerRendering = function () {
  4278. if (_isServer === undefined) {
  4279. /* istanbul ignore if */
  4280. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  4281. // detect presence of vue-server-renderer and avoid
  4282. // Webpack shimming the process
  4283. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  4284. } else {
  4285. _isServer = false;
  4286. }
  4287. }
  4288. return _isServer
  4289. };
  4290. // detect devtools
  4291. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  4292. /* istanbul ignore next */
  4293. function isNative (Ctor) {
  4294. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  4295. }
  4296. var hasSymbol =
  4297. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  4298. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  4299. var _Set;
  4300. /* istanbul ignore if */ // $flow-disable-line
  4301. if (typeof Set !== 'undefined' && isNative(Set)) {
  4302. // use native Set when available.
  4303. _Set = Set;
  4304. } else {
  4305. // a non-standard Set polyfill that only works with primitive keys.
  4306. _Set = /*@__PURE__*/(function () {
  4307. function Set () {
  4308. this.set = Object.create(null);
  4309. }
  4310. Set.prototype.has = function has (key) {
  4311. return this.set[key] === true
  4312. };
  4313. Set.prototype.add = function add (key) {
  4314. this.set[key] = true;
  4315. };
  4316. Set.prototype.clear = function clear () {
  4317. this.set = Object.create(null);
  4318. };
  4319. return Set;
  4320. }());
  4321. }
  4322. /* */
  4323. var warn = noop;
  4324. var tip = noop;
  4325. var generateComponentTrace = (noop); // work around flow check
  4326. var formatComponentName = (noop);
  4327. if (true) {
  4328. var hasConsole = typeof console !== 'undefined';
  4329. var classifyRE = /(?:^|[-_])(\w)/g;
  4330. var classify = function (str) { return str
  4331. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  4332. .replace(/[-_]/g, ''); };
  4333. warn = function (msg, vm) {
  4334. var trace = vm ? generateComponentTrace(vm) : '';
  4335. if (config.warnHandler) {
  4336. config.warnHandler.call(null, msg, vm, trace);
  4337. } else if (hasConsole && (!config.silent)) {
  4338. console.error(("[Vue warn]: " + msg + trace));
  4339. }
  4340. };
  4341. tip = function (msg, vm) {
  4342. if (hasConsole && (!config.silent)) {
  4343. console.warn("[Vue tip]: " + msg + (
  4344. vm ? generateComponentTrace(vm) : ''
  4345. ));
  4346. }
  4347. };
  4348. formatComponentName = function (vm, includeFile) {
  4349. if (vm.$root === vm) {
  4350. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  4351. return ('') + vm.$options.__file
  4352. }
  4353. return '<Root>'
  4354. }
  4355. var options = typeof vm === 'function' && vm.cid != null
  4356. ? vm.options
  4357. : vm._isVue
  4358. ? vm.$options || vm.constructor.options
  4359. : vm;
  4360. var name = options.name || options._componentTag;
  4361. var file = options.__file;
  4362. if (!name && file) {
  4363. var match = file.match(/([^/\\]+)\.vue$/);
  4364. name = match && match[1];
  4365. }
  4366. return (
  4367. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  4368. (file && includeFile !== false ? (" at " + file) : '')
  4369. )
  4370. };
  4371. var repeat = function (str, n) {
  4372. var res = '';
  4373. while (n) {
  4374. if (n % 2 === 1) { res += str; }
  4375. if (n > 1) { str += str; }
  4376. n >>= 1;
  4377. }
  4378. return res
  4379. };
  4380. generateComponentTrace = function (vm) {
  4381. if (vm._isVue && vm.$parent) {
  4382. var tree = [];
  4383. var currentRecursiveSequence = 0;
  4384. while (vm && vm.$options.name !== 'PageBody') {
  4385. if (tree.length > 0) {
  4386. var last = tree[tree.length - 1];
  4387. if (last.constructor === vm.constructor) {
  4388. currentRecursiveSequence++;
  4389. vm = vm.$parent;
  4390. continue
  4391. } else if (currentRecursiveSequence > 0) {
  4392. tree[tree.length - 1] = [last, currentRecursiveSequence];
  4393. currentRecursiveSequence = 0;
  4394. }
  4395. }
  4396. !vm.$options.isReserved && tree.push(vm);
  4397. vm = vm.$parent;
  4398. }
  4399. return '\n\nfound in\n\n' + tree
  4400. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  4401. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  4402. : formatComponentName(vm))); })
  4403. .join('\n')
  4404. } else {
  4405. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  4406. }
  4407. };
  4408. }
  4409. /* */
  4410. var uid = 0;
  4411. /**
  4412. * A dep is an observable that can have multiple
  4413. * directives subscribing to it.
  4414. */
  4415. var Dep = function Dep () {
  4416. this.id = uid++;
  4417. this.subs = [];
  4418. };
  4419. Dep.prototype.addSub = function addSub (sub) {
  4420. this.subs.push(sub);
  4421. };
  4422. Dep.prototype.removeSub = function removeSub (sub) {
  4423. remove(this.subs, sub);
  4424. };
  4425. Dep.prototype.depend = function depend () {
  4426. if (Dep.SharedObject.target) {
  4427. Dep.SharedObject.target.addDep(this);
  4428. }
  4429. };
  4430. Dep.prototype.notify = function notify () {
  4431. // stabilize the subscriber list first
  4432. var subs = this.subs.slice();
  4433. if ( true && !config.async) {
  4434. // subs aren't sorted in scheduler if not running async
  4435. // we need to sort them now to make sure they fire in correct
  4436. // order
  4437. subs.sort(function (a, b) { return a.id - b.id; });
  4438. }
  4439. for (var i = 0, l = subs.length; i < l; i++) {
  4440. subs[i].update();
  4441. }
  4442. };
  4443. // The current target watcher being evaluated.
  4444. // This is globally unique because only one watcher
  4445. // can be evaluated at a time.
  4446. // fixed by xxxxxx (nvue shared vuex)
  4447. /* eslint-disable no-undef */
  4448. Dep.SharedObject = {};
  4449. Dep.SharedObject.target = null;
  4450. Dep.SharedObject.targetStack = [];
  4451. function pushTarget (target) {
  4452. Dep.SharedObject.targetStack.push(target);
  4453. Dep.SharedObject.target = target;
  4454. Dep.target = target;
  4455. }
  4456. function popTarget () {
  4457. Dep.SharedObject.targetStack.pop();
  4458. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  4459. Dep.target = Dep.SharedObject.target;
  4460. }
  4461. /* */
  4462. var VNode = function VNode (
  4463. tag,
  4464. data,
  4465. children,
  4466. text,
  4467. elm,
  4468. context,
  4469. componentOptions,
  4470. asyncFactory
  4471. ) {
  4472. this.tag = tag;
  4473. this.data = data;
  4474. this.children = children;
  4475. this.text = text;
  4476. this.elm = elm;
  4477. this.ns = undefined;
  4478. this.context = context;
  4479. this.fnContext = undefined;
  4480. this.fnOptions = undefined;
  4481. this.fnScopeId = undefined;
  4482. this.key = data && data.key;
  4483. this.componentOptions = componentOptions;
  4484. this.componentInstance = undefined;
  4485. this.parent = undefined;
  4486. this.raw = false;
  4487. this.isStatic = false;
  4488. this.isRootInsert = true;
  4489. this.isComment = false;
  4490. this.isCloned = false;
  4491. this.isOnce = false;
  4492. this.asyncFactory = asyncFactory;
  4493. this.asyncMeta = undefined;
  4494. this.isAsyncPlaceholder = false;
  4495. };
  4496. var prototypeAccessors = { child: { configurable: true } };
  4497. // DEPRECATED: alias for componentInstance for backwards compat.
  4498. /* istanbul ignore next */
  4499. prototypeAccessors.child.get = function () {
  4500. return this.componentInstance
  4501. };
  4502. Object.defineProperties( VNode.prototype, prototypeAccessors );
  4503. var createEmptyVNode = function (text) {
  4504. if ( text === void 0 ) text = '';
  4505. var node = new VNode();
  4506. node.text = text;
  4507. node.isComment = true;
  4508. return node
  4509. };
  4510. function createTextVNode (val) {
  4511. return new VNode(undefined, undefined, undefined, String(val))
  4512. }
  4513. // optimized shallow clone
  4514. // used for static nodes and slot nodes because they may be reused across
  4515. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4516. // on their elm reference.
  4517. function cloneVNode (vnode) {
  4518. var cloned = new VNode(
  4519. vnode.tag,
  4520. vnode.data,
  4521. // #7975
  4522. // clone children array to avoid mutating original in case of cloning
  4523. // a child.
  4524. vnode.children && vnode.children.slice(),
  4525. vnode.text,
  4526. vnode.elm,
  4527. vnode.context,
  4528. vnode.componentOptions,
  4529. vnode.asyncFactory
  4530. );
  4531. cloned.ns = vnode.ns;
  4532. cloned.isStatic = vnode.isStatic;
  4533. cloned.key = vnode.key;
  4534. cloned.isComment = vnode.isComment;
  4535. cloned.fnContext = vnode.fnContext;
  4536. cloned.fnOptions = vnode.fnOptions;
  4537. cloned.fnScopeId = vnode.fnScopeId;
  4538. cloned.asyncMeta = vnode.asyncMeta;
  4539. cloned.isCloned = true;
  4540. return cloned
  4541. }
  4542. /*
  4543. * not type checking this file because flow doesn't play well with
  4544. * dynamically accessing methods on Array prototype
  4545. */
  4546. var arrayProto = Array.prototype;
  4547. var arrayMethods = Object.create(arrayProto);
  4548. var methodsToPatch = [
  4549. 'push',
  4550. 'pop',
  4551. 'shift',
  4552. 'unshift',
  4553. 'splice',
  4554. 'sort',
  4555. 'reverse'
  4556. ];
  4557. /**
  4558. * Intercept mutating methods and emit events
  4559. */
  4560. methodsToPatch.forEach(function (method) {
  4561. // cache original method
  4562. var original = arrayProto[method];
  4563. def(arrayMethods, method, function mutator () {
  4564. var args = [], len = arguments.length;
  4565. while ( len-- ) args[ len ] = arguments[ len ];
  4566. var result = original.apply(this, args);
  4567. var ob = this.__ob__;
  4568. var inserted;
  4569. switch (method) {
  4570. case 'push':
  4571. case 'unshift':
  4572. inserted = args;
  4573. break
  4574. case 'splice':
  4575. inserted = args.slice(2);
  4576. break
  4577. }
  4578. if (inserted) { ob.observeArray(inserted); }
  4579. // notify change
  4580. ob.dep.notify();
  4581. return result
  4582. });
  4583. });
  4584. /* */
  4585. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4586. /**
  4587. * In some cases we may want to disable observation inside a component's
  4588. * update computation.
  4589. */
  4590. var shouldObserve = true;
  4591. function toggleObserving (value) {
  4592. shouldObserve = value;
  4593. }
  4594. /**
  4595. * Observer class that is attached to each observed
  4596. * object. Once attached, the observer converts the target
  4597. * object's property keys into getter/setters that
  4598. * collect dependencies and dispatch updates.
  4599. */
  4600. var Observer = function Observer (value) {
  4601. this.value = value;
  4602. this.dep = new Dep();
  4603. this.vmCount = 0;
  4604. def(value, '__ob__', this);
  4605. if (Array.isArray(value)) {
  4606. if (hasProto) {
  4607. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4608. if(value.push !== value.__proto__.push){
  4609. copyAugment(value, arrayMethods, arrayKeys);
  4610. } else {
  4611. protoAugment(value, arrayMethods);
  4612. }
  4613. }
  4614. } else {
  4615. copyAugment(value, arrayMethods, arrayKeys);
  4616. }
  4617. this.observeArray(value);
  4618. } else {
  4619. this.walk(value);
  4620. }
  4621. };
  4622. /**
  4623. * Walk through all properties and convert them into
  4624. * getter/setters. This method should only be called when
  4625. * value type is Object.
  4626. */
  4627. Observer.prototype.walk = function walk (obj) {
  4628. var keys = Object.keys(obj);
  4629. for (var i = 0; i < keys.length; i++) {
  4630. defineReactive$$1(obj, keys[i]);
  4631. }
  4632. };
  4633. /**
  4634. * Observe a list of Array items.
  4635. */
  4636. Observer.prototype.observeArray = function observeArray (items) {
  4637. for (var i = 0, l = items.length; i < l; i++) {
  4638. observe(items[i]);
  4639. }
  4640. };
  4641. // helpers
  4642. /**
  4643. * Augment a target Object or Array by intercepting
  4644. * the prototype chain using __proto__
  4645. */
  4646. function protoAugment (target, src) {
  4647. /* eslint-disable no-proto */
  4648. target.__proto__ = src;
  4649. /* eslint-enable no-proto */
  4650. }
  4651. /**
  4652. * Augment a target Object or Array by defining
  4653. * hidden properties.
  4654. */
  4655. /* istanbul ignore next */
  4656. function copyAugment (target, src, keys) {
  4657. for (var i = 0, l = keys.length; i < l; i++) {
  4658. var key = keys[i];
  4659. def(target, key, src[key]);
  4660. }
  4661. }
  4662. /**
  4663. * Attempt to create an observer instance for a value,
  4664. * returns the new observer if successfully observed,
  4665. * or the existing observer if the value already has one.
  4666. */
  4667. function observe (value, asRootData) {
  4668. if (!isObject(value) || value instanceof VNode) {
  4669. return
  4670. }
  4671. var ob;
  4672. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4673. ob = value.__ob__;
  4674. } else if (
  4675. shouldObserve &&
  4676. !isServerRendering() &&
  4677. (Array.isArray(value) || isPlainObject(value)) &&
  4678. Object.isExtensible(value) &&
  4679. !value._isVue &&
  4680. !value.__v_isMPComponent
  4681. ) {
  4682. ob = new Observer(value);
  4683. }
  4684. if (asRootData && ob) {
  4685. ob.vmCount++;
  4686. }
  4687. return ob
  4688. }
  4689. /**
  4690. * Define a reactive property on an Object.
  4691. */
  4692. function defineReactive$$1 (
  4693. obj,
  4694. key,
  4695. val,
  4696. customSetter,
  4697. shallow
  4698. ) {
  4699. var dep = new Dep();
  4700. var property = Object.getOwnPropertyDescriptor(obj, key);
  4701. if (property && property.configurable === false) {
  4702. return
  4703. }
  4704. // cater for pre-defined getter/setters
  4705. var getter = property && property.get;
  4706. var setter = property && property.set;
  4707. if ((!getter || setter) && arguments.length === 2) {
  4708. val = obj[key];
  4709. }
  4710. var childOb = !shallow && observe(val);
  4711. Object.defineProperty(obj, key, {
  4712. enumerable: true,
  4713. configurable: true,
  4714. get: function reactiveGetter () {
  4715. var value = getter ? getter.call(obj) : val;
  4716. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4717. dep.depend();
  4718. if (childOb) {
  4719. childOb.dep.depend();
  4720. if (Array.isArray(value)) {
  4721. dependArray(value);
  4722. }
  4723. }
  4724. }
  4725. return value
  4726. },
  4727. set: function reactiveSetter (newVal) {
  4728. var value = getter ? getter.call(obj) : val;
  4729. /* eslint-disable no-self-compare */
  4730. if (newVal === value || (newVal !== newVal && value !== value)) {
  4731. return
  4732. }
  4733. /* eslint-enable no-self-compare */
  4734. if ( true && customSetter) {
  4735. customSetter();
  4736. }
  4737. // #7981: for accessor properties without setter
  4738. if (getter && !setter) { return }
  4739. if (setter) {
  4740. setter.call(obj, newVal);
  4741. } else {
  4742. val = newVal;
  4743. }
  4744. childOb = !shallow && observe(newVal);
  4745. dep.notify();
  4746. }
  4747. });
  4748. }
  4749. /**
  4750. * Set a property on an object. Adds the new property and
  4751. * triggers change notification if the property doesn't
  4752. * already exist.
  4753. */
  4754. function set (target, key, val) {
  4755. if ( true &&
  4756. (isUndef(target) || isPrimitive(target))
  4757. ) {
  4758. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4759. }
  4760. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4761. target.length = Math.max(target.length, key);
  4762. target.splice(key, 1, val);
  4763. return val
  4764. }
  4765. if (key in target && !(key in Object.prototype)) {
  4766. target[key] = val;
  4767. return val
  4768. }
  4769. var ob = (target).__ob__;
  4770. if (target._isVue || (ob && ob.vmCount)) {
  4771. true && warn(
  4772. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4773. 'at runtime - declare it upfront in the data option.'
  4774. );
  4775. return val
  4776. }
  4777. if (!ob) {
  4778. target[key] = val;
  4779. return val
  4780. }
  4781. defineReactive$$1(ob.value, key, val);
  4782. ob.dep.notify();
  4783. return val
  4784. }
  4785. /**
  4786. * Delete a property and trigger change if necessary.
  4787. */
  4788. function del (target, key) {
  4789. if ( true &&
  4790. (isUndef(target) || isPrimitive(target))
  4791. ) {
  4792. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4793. }
  4794. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4795. target.splice(key, 1);
  4796. return
  4797. }
  4798. var ob = (target).__ob__;
  4799. if (target._isVue || (ob && ob.vmCount)) {
  4800. true && warn(
  4801. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4802. '- just set it to null.'
  4803. );
  4804. return
  4805. }
  4806. if (!hasOwn(target, key)) {
  4807. return
  4808. }
  4809. delete target[key];
  4810. if (!ob) {
  4811. return
  4812. }
  4813. ob.dep.notify();
  4814. }
  4815. /**
  4816. * Collect dependencies on array elements when the array is touched, since
  4817. * we cannot intercept array element access like property getters.
  4818. */
  4819. function dependArray (value) {
  4820. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4821. e = value[i];
  4822. e && e.__ob__ && e.__ob__.dep.depend();
  4823. if (Array.isArray(e)) {
  4824. dependArray(e);
  4825. }
  4826. }
  4827. }
  4828. /* */
  4829. /**
  4830. * Option overwriting strategies are functions that handle
  4831. * how to merge a parent option value and a child option
  4832. * value into the final value.
  4833. */
  4834. var strats = config.optionMergeStrategies;
  4835. /**
  4836. * Options with restrictions
  4837. */
  4838. if (true) {
  4839. strats.el = strats.propsData = function (parent, child, vm, key) {
  4840. if (!vm) {
  4841. warn(
  4842. "option \"" + key + "\" can only be used during instance " +
  4843. 'creation with the `new` keyword.'
  4844. );
  4845. }
  4846. return defaultStrat(parent, child)
  4847. };
  4848. }
  4849. /**
  4850. * Helper that recursively merges two data objects together.
  4851. */
  4852. function mergeData (to, from) {
  4853. if (!from) { return to }
  4854. var key, toVal, fromVal;
  4855. var keys = hasSymbol
  4856. ? Reflect.ownKeys(from)
  4857. : Object.keys(from);
  4858. for (var i = 0; i < keys.length; i++) {
  4859. key = keys[i];
  4860. // in case the object is already observed...
  4861. if (key === '__ob__') { continue }
  4862. toVal = to[key];
  4863. fromVal = from[key];
  4864. if (!hasOwn(to, key)) {
  4865. set(to, key, fromVal);
  4866. } else if (
  4867. toVal !== fromVal &&
  4868. isPlainObject(toVal) &&
  4869. isPlainObject(fromVal)
  4870. ) {
  4871. mergeData(toVal, fromVal);
  4872. }
  4873. }
  4874. return to
  4875. }
  4876. /**
  4877. * Data
  4878. */
  4879. function mergeDataOrFn (
  4880. parentVal,
  4881. childVal,
  4882. vm
  4883. ) {
  4884. if (!vm) {
  4885. // in a Vue.extend merge, both should be functions
  4886. if (!childVal) {
  4887. return parentVal
  4888. }
  4889. if (!parentVal) {
  4890. return childVal
  4891. }
  4892. // when parentVal & childVal are both present,
  4893. // we need to return a function that returns the
  4894. // merged result of both functions... no need to
  4895. // check if parentVal is a function here because
  4896. // it has to be a function to pass previous merges.
  4897. return function mergedDataFn () {
  4898. return mergeData(
  4899. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4900. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4901. )
  4902. }
  4903. } else {
  4904. return function mergedInstanceDataFn () {
  4905. // instance merge
  4906. var instanceData = typeof childVal === 'function'
  4907. ? childVal.call(vm, vm)
  4908. : childVal;
  4909. var defaultData = typeof parentVal === 'function'
  4910. ? parentVal.call(vm, vm)
  4911. : parentVal;
  4912. if (instanceData) {
  4913. return mergeData(instanceData, defaultData)
  4914. } else {
  4915. return defaultData
  4916. }
  4917. }
  4918. }
  4919. }
  4920. strats.data = function (
  4921. parentVal,
  4922. childVal,
  4923. vm
  4924. ) {
  4925. if (!vm) {
  4926. if (childVal && typeof childVal !== 'function') {
  4927. true && warn(
  4928. 'The "data" option should be a function ' +
  4929. 'that returns a per-instance value in component ' +
  4930. 'definitions.',
  4931. vm
  4932. );
  4933. return parentVal
  4934. }
  4935. return mergeDataOrFn(parentVal, childVal)
  4936. }
  4937. return mergeDataOrFn(parentVal, childVal, vm)
  4938. };
  4939. /**
  4940. * Hooks and props are merged as arrays.
  4941. */
  4942. function mergeHook (
  4943. parentVal,
  4944. childVal
  4945. ) {
  4946. var res = childVal
  4947. ? parentVal
  4948. ? parentVal.concat(childVal)
  4949. : Array.isArray(childVal)
  4950. ? childVal
  4951. : [childVal]
  4952. : parentVal;
  4953. return res
  4954. ? dedupeHooks(res)
  4955. : res
  4956. }
  4957. function dedupeHooks (hooks) {
  4958. var res = [];
  4959. for (var i = 0; i < hooks.length; i++) {
  4960. if (res.indexOf(hooks[i]) === -1) {
  4961. res.push(hooks[i]);
  4962. }
  4963. }
  4964. return res
  4965. }
  4966. LIFECYCLE_HOOKS.forEach(function (hook) {
  4967. strats[hook] = mergeHook;
  4968. });
  4969. /**
  4970. * Assets
  4971. *
  4972. * When a vm is present (instance creation), we need to do
  4973. * a three-way merge between constructor options, instance
  4974. * options and parent options.
  4975. */
  4976. function mergeAssets (
  4977. parentVal,
  4978. childVal,
  4979. vm,
  4980. key
  4981. ) {
  4982. var res = Object.create(parentVal || null);
  4983. if (childVal) {
  4984. true && assertObjectType(key, childVal, vm);
  4985. return extend(res, childVal)
  4986. } else {
  4987. return res
  4988. }
  4989. }
  4990. ASSET_TYPES.forEach(function (type) {
  4991. strats[type + 's'] = mergeAssets;
  4992. });
  4993. /**
  4994. * Watchers.
  4995. *
  4996. * Watchers hashes should not overwrite one
  4997. * another, so we merge them as arrays.
  4998. */
  4999. strats.watch = function (
  5000. parentVal,
  5001. childVal,
  5002. vm,
  5003. key
  5004. ) {
  5005. // work around Firefox's Object.prototype.watch...
  5006. if (parentVal === nativeWatch) { parentVal = undefined; }
  5007. if (childVal === nativeWatch) { childVal = undefined; }
  5008. /* istanbul ignore if */
  5009. if (!childVal) { return Object.create(parentVal || null) }
  5010. if (true) {
  5011. assertObjectType(key, childVal, vm);
  5012. }
  5013. if (!parentVal) { return childVal }
  5014. var ret = {};
  5015. extend(ret, parentVal);
  5016. for (var key$1 in childVal) {
  5017. var parent = ret[key$1];
  5018. var child = childVal[key$1];
  5019. if (parent && !Array.isArray(parent)) {
  5020. parent = [parent];
  5021. }
  5022. ret[key$1] = parent
  5023. ? parent.concat(child)
  5024. : Array.isArray(child) ? child : [child];
  5025. }
  5026. return ret
  5027. };
  5028. /**
  5029. * Other object hashes.
  5030. */
  5031. strats.props =
  5032. strats.methods =
  5033. strats.inject =
  5034. strats.computed = function (
  5035. parentVal,
  5036. childVal,
  5037. vm,
  5038. key
  5039. ) {
  5040. if (childVal && "development" !== 'production') {
  5041. assertObjectType(key, childVal, vm);
  5042. }
  5043. if (!parentVal) { return childVal }
  5044. var ret = Object.create(null);
  5045. extend(ret, parentVal);
  5046. if (childVal) { extend(ret, childVal); }
  5047. return ret
  5048. };
  5049. strats.provide = mergeDataOrFn;
  5050. /**
  5051. * Default strategy.
  5052. */
  5053. var defaultStrat = function (parentVal, childVal) {
  5054. return childVal === undefined
  5055. ? parentVal
  5056. : childVal
  5057. };
  5058. /**
  5059. * Validate component names
  5060. */
  5061. function checkComponents (options) {
  5062. for (var key in options.components) {
  5063. validateComponentName(key);
  5064. }
  5065. }
  5066. function validateComponentName (name) {
  5067. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  5068. warn(
  5069. 'Invalid component name: "' + name + '". Component names ' +
  5070. 'should conform to valid custom element name in html5 specification.'
  5071. );
  5072. }
  5073. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  5074. warn(
  5075. 'Do not use built-in or reserved HTML elements as component ' +
  5076. 'id: ' + name
  5077. );
  5078. }
  5079. }
  5080. /**
  5081. * Ensure all props option syntax are normalized into the
  5082. * Object-based format.
  5083. */
  5084. function normalizeProps (options, vm) {
  5085. var props = options.props;
  5086. if (!props) { return }
  5087. var res = {};
  5088. var i, val, name;
  5089. if (Array.isArray(props)) {
  5090. i = props.length;
  5091. while (i--) {
  5092. val = props[i];
  5093. if (typeof val === 'string') {
  5094. name = camelize(val);
  5095. res[name] = { type: null };
  5096. } else if (true) {
  5097. warn('props must be strings when using array syntax.');
  5098. }
  5099. }
  5100. } else if (isPlainObject(props)) {
  5101. for (var key in props) {
  5102. val = props[key];
  5103. name = camelize(key);
  5104. res[name] = isPlainObject(val)
  5105. ? val
  5106. : { type: val };
  5107. }
  5108. } else if (true) {
  5109. warn(
  5110. "Invalid value for option \"props\": expected an Array or an Object, " +
  5111. "but got " + (toRawType(props)) + ".",
  5112. vm
  5113. );
  5114. }
  5115. options.props = res;
  5116. }
  5117. /**
  5118. * Normalize all injections into Object-based format
  5119. */
  5120. function normalizeInject (options, vm) {
  5121. var inject = options.inject;
  5122. if (!inject) { return }
  5123. var normalized = options.inject = {};
  5124. if (Array.isArray(inject)) {
  5125. for (var i = 0; i < inject.length; i++) {
  5126. normalized[inject[i]] = { from: inject[i] };
  5127. }
  5128. } else if (isPlainObject(inject)) {
  5129. for (var key in inject) {
  5130. var val = inject[key];
  5131. normalized[key] = isPlainObject(val)
  5132. ? extend({ from: key }, val)
  5133. : { from: val };
  5134. }
  5135. } else if (true) {
  5136. warn(
  5137. "Invalid value for option \"inject\": expected an Array or an Object, " +
  5138. "but got " + (toRawType(inject)) + ".",
  5139. vm
  5140. );
  5141. }
  5142. }
  5143. /**
  5144. * Normalize raw function directives into object format.
  5145. */
  5146. function normalizeDirectives (options) {
  5147. var dirs = options.directives;
  5148. if (dirs) {
  5149. for (var key in dirs) {
  5150. var def$$1 = dirs[key];
  5151. if (typeof def$$1 === 'function') {
  5152. dirs[key] = { bind: def$$1, update: def$$1 };
  5153. }
  5154. }
  5155. }
  5156. }
  5157. function assertObjectType (name, value, vm) {
  5158. if (!isPlainObject(value)) {
  5159. warn(
  5160. "Invalid value for option \"" + name + "\": expected an Object, " +
  5161. "but got " + (toRawType(value)) + ".",
  5162. vm
  5163. );
  5164. }
  5165. }
  5166. /**
  5167. * Merge two option objects into a new one.
  5168. * Core utility used in both instantiation and inheritance.
  5169. */
  5170. function mergeOptions (
  5171. parent,
  5172. child,
  5173. vm
  5174. ) {
  5175. if (true) {
  5176. checkComponents(child);
  5177. }
  5178. if (typeof child === 'function') {
  5179. child = child.options;
  5180. }
  5181. normalizeProps(child, vm);
  5182. normalizeInject(child, vm);
  5183. normalizeDirectives(child);
  5184. // Apply extends and mixins on the child options,
  5185. // but only if it is a raw options object that isn't
  5186. // the result of another mergeOptions call.
  5187. // Only merged options has the _base property.
  5188. if (!child._base) {
  5189. if (child.extends) {
  5190. parent = mergeOptions(parent, child.extends, vm);
  5191. }
  5192. if (child.mixins) {
  5193. for (var i = 0, l = child.mixins.length; i < l; i++) {
  5194. parent = mergeOptions(parent, child.mixins[i], vm);
  5195. }
  5196. }
  5197. }
  5198. var options = {};
  5199. var key;
  5200. for (key in parent) {
  5201. mergeField(key);
  5202. }
  5203. for (key in child) {
  5204. if (!hasOwn(parent, key)) {
  5205. mergeField(key);
  5206. }
  5207. }
  5208. function mergeField (key) {
  5209. var strat = strats[key] || defaultStrat;
  5210. options[key] = strat(parent[key], child[key], vm, key);
  5211. }
  5212. return options
  5213. }
  5214. /**
  5215. * Resolve an asset.
  5216. * This function is used because child instances need access
  5217. * to assets defined in its ancestor chain.
  5218. */
  5219. function resolveAsset (
  5220. options,
  5221. type,
  5222. id,
  5223. warnMissing
  5224. ) {
  5225. /* istanbul ignore if */
  5226. if (typeof id !== 'string') {
  5227. return
  5228. }
  5229. var assets = options[type];
  5230. // check local registration variations first
  5231. if (hasOwn(assets, id)) { return assets[id] }
  5232. var camelizedId = camelize(id);
  5233. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  5234. var PascalCaseId = capitalize(camelizedId);
  5235. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  5236. // fallback to prototype chain
  5237. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  5238. if ( true && warnMissing && !res) {
  5239. warn(
  5240. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  5241. options
  5242. );
  5243. }
  5244. return res
  5245. }
  5246. /* */
  5247. function validateProp (
  5248. key,
  5249. propOptions,
  5250. propsData,
  5251. vm
  5252. ) {
  5253. var prop = propOptions[key];
  5254. var absent = !hasOwn(propsData, key);
  5255. var value = propsData[key];
  5256. // boolean casting
  5257. var booleanIndex = getTypeIndex(Boolean, prop.type);
  5258. if (booleanIndex > -1) {
  5259. if (absent && !hasOwn(prop, 'default')) {
  5260. value = false;
  5261. } else if (value === '' || value === hyphenate(key)) {
  5262. // only cast empty string / same name to boolean if
  5263. // boolean has higher priority
  5264. var stringIndex = getTypeIndex(String, prop.type);
  5265. if (stringIndex < 0 || booleanIndex < stringIndex) {
  5266. value = true;
  5267. }
  5268. }
  5269. }
  5270. // check default value
  5271. if (value === undefined) {
  5272. value = getPropDefaultValue(vm, prop, key);
  5273. // since the default value is a fresh copy,
  5274. // make sure to observe it.
  5275. var prevShouldObserve = shouldObserve;
  5276. toggleObserving(true);
  5277. observe(value);
  5278. toggleObserving(prevShouldObserve);
  5279. }
  5280. if (
  5281. true
  5282. ) {
  5283. assertProp(prop, key, value, vm, absent);
  5284. }
  5285. return value
  5286. }
  5287. /**
  5288. * Get the default value of a prop.
  5289. */
  5290. function getPropDefaultValue (vm, prop, key) {
  5291. // no default, return undefined
  5292. if (!hasOwn(prop, 'default')) {
  5293. return undefined
  5294. }
  5295. var def = prop.default;
  5296. // warn against non-factory defaults for Object & Array
  5297. if ( true && isObject(def)) {
  5298. warn(
  5299. 'Invalid default value for prop "' + key + '": ' +
  5300. 'Props with type Object/Array must use a factory function ' +
  5301. 'to return the default value.',
  5302. vm
  5303. );
  5304. }
  5305. // the raw prop value was also undefined from previous render,
  5306. // return previous default value to avoid unnecessary watcher trigger
  5307. if (vm && vm.$options.propsData &&
  5308. vm.$options.propsData[key] === undefined &&
  5309. vm._props[key] !== undefined
  5310. ) {
  5311. return vm._props[key]
  5312. }
  5313. // call factory function for non-Function types
  5314. // a value is Function if its prototype is function even across different execution context
  5315. return typeof def === 'function' && getType(prop.type) !== 'Function'
  5316. ? def.call(vm)
  5317. : def
  5318. }
  5319. /**
  5320. * Assert whether a prop is valid.
  5321. */
  5322. function assertProp (
  5323. prop,
  5324. name,
  5325. value,
  5326. vm,
  5327. absent
  5328. ) {
  5329. if (prop.required && absent) {
  5330. warn(
  5331. 'Missing required prop: "' + name + '"',
  5332. vm
  5333. );
  5334. return
  5335. }
  5336. if (value == null && !prop.required) {
  5337. return
  5338. }
  5339. var type = prop.type;
  5340. var valid = !type || type === true;
  5341. var expectedTypes = [];
  5342. if (type) {
  5343. if (!Array.isArray(type)) {
  5344. type = [type];
  5345. }
  5346. for (var i = 0; i < type.length && !valid; i++) {
  5347. var assertedType = assertType(value, type[i]);
  5348. expectedTypes.push(assertedType.expectedType || '');
  5349. valid = assertedType.valid;
  5350. }
  5351. }
  5352. if (!valid) {
  5353. warn(
  5354. getInvalidTypeMessage(name, value, expectedTypes),
  5355. vm
  5356. );
  5357. return
  5358. }
  5359. var validator = prop.validator;
  5360. if (validator) {
  5361. if (!validator(value)) {
  5362. warn(
  5363. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  5364. vm
  5365. );
  5366. }
  5367. }
  5368. }
  5369. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  5370. function assertType (value, type) {
  5371. var valid;
  5372. var expectedType = getType(type);
  5373. if (simpleCheckRE.test(expectedType)) {
  5374. var t = typeof value;
  5375. valid = t === expectedType.toLowerCase();
  5376. // for primitive wrapper objects
  5377. if (!valid && t === 'object') {
  5378. valid = value instanceof type;
  5379. }
  5380. } else if (expectedType === 'Object') {
  5381. valid = isPlainObject(value);
  5382. } else if (expectedType === 'Array') {
  5383. valid = Array.isArray(value);
  5384. } else {
  5385. valid = value instanceof type;
  5386. }
  5387. return {
  5388. valid: valid,
  5389. expectedType: expectedType
  5390. }
  5391. }
  5392. /**
  5393. * Use function string name to check built-in types,
  5394. * because a simple equality check will fail when running
  5395. * across different vms / iframes.
  5396. */
  5397. function getType (fn) {
  5398. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  5399. return match ? match[1] : ''
  5400. }
  5401. function isSameType (a, b) {
  5402. return getType(a) === getType(b)
  5403. }
  5404. function getTypeIndex (type, expectedTypes) {
  5405. if (!Array.isArray(expectedTypes)) {
  5406. return isSameType(expectedTypes, type) ? 0 : -1
  5407. }
  5408. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  5409. if (isSameType(expectedTypes[i], type)) {
  5410. return i
  5411. }
  5412. }
  5413. return -1
  5414. }
  5415. function getInvalidTypeMessage (name, value, expectedTypes) {
  5416. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  5417. " Expected " + (expectedTypes.map(capitalize).join(', '));
  5418. var expectedType = expectedTypes[0];
  5419. var receivedType = toRawType(value);
  5420. var expectedValue = styleValue(value, expectedType);
  5421. var receivedValue = styleValue(value, receivedType);
  5422. // check if we need to specify expected value
  5423. if (expectedTypes.length === 1 &&
  5424. isExplicable(expectedType) &&
  5425. !isBoolean(expectedType, receivedType)) {
  5426. message += " with value " + expectedValue;
  5427. }
  5428. message += ", got " + receivedType + " ";
  5429. // check if we need to specify received value
  5430. if (isExplicable(receivedType)) {
  5431. message += "with value " + receivedValue + ".";
  5432. }
  5433. return message
  5434. }
  5435. function styleValue (value, type) {
  5436. if (type === 'String') {
  5437. return ("\"" + value + "\"")
  5438. } else if (type === 'Number') {
  5439. return ("" + (Number(value)))
  5440. } else {
  5441. return ("" + value)
  5442. }
  5443. }
  5444. function isExplicable (value) {
  5445. var explicitTypes = ['string', 'number', 'boolean'];
  5446. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  5447. }
  5448. function isBoolean () {
  5449. var args = [], len = arguments.length;
  5450. while ( len-- ) args[ len ] = arguments[ len ];
  5451. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  5452. }
  5453. /* */
  5454. function handleError (err, vm, info) {
  5455. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  5456. // See: https://github.com/vuejs/vuex/issues/1505
  5457. pushTarget();
  5458. try {
  5459. if (vm) {
  5460. var cur = vm;
  5461. while ((cur = cur.$parent)) {
  5462. var hooks = cur.$options.errorCaptured;
  5463. if (hooks) {
  5464. for (var i = 0; i < hooks.length; i++) {
  5465. try {
  5466. var capture = hooks[i].call(cur, err, vm, info) === false;
  5467. if (capture) { return }
  5468. } catch (e) {
  5469. globalHandleError(e, cur, 'errorCaptured hook');
  5470. }
  5471. }
  5472. }
  5473. }
  5474. }
  5475. globalHandleError(err, vm, info);
  5476. } finally {
  5477. popTarget();
  5478. }
  5479. }
  5480. function invokeWithErrorHandling (
  5481. handler,
  5482. context,
  5483. args,
  5484. vm,
  5485. info
  5486. ) {
  5487. var res;
  5488. try {
  5489. res = args ? handler.apply(context, args) : handler.call(context);
  5490. if (res && !res._isVue && isPromise(res) && !res._handled) {
  5491. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  5492. // issue #9511
  5493. // avoid catch triggering multiple times when nested calls
  5494. res._handled = true;
  5495. }
  5496. } catch (e) {
  5497. handleError(e, vm, info);
  5498. }
  5499. return res
  5500. }
  5501. function globalHandleError (err, vm, info) {
  5502. if (config.errorHandler) {
  5503. try {
  5504. return config.errorHandler.call(null, err, vm, info)
  5505. } catch (e) {
  5506. // if the user intentionally throws the original error in the handler,
  5507. // do not log it twice
  5508. if (e !== err) {
  5509. logError(e, null, 'config.errorHandler');
  5510. }
  5511. }
  5512. }
  5513. logError(err, vm, info);
  5514. }
  5515. function logError (err, vm, info) {
  5516. if (true) {
  5517. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5518. }
  5519. /* istanbul ignore else */
  5520. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5521. console.error(err);
  5522. } else {
  5523. throw err
  5524. }
  5525. }
  5526. /* */
  5527. var callbacks = [];
  5528. var pending = false;
  5529. function flushCallbacks () {
  5530. pending = false;
  5531. var copies = callbacks.slice(0);
  5532. callbacks.length = 0;
  5533. for (var i = 0; i < copies.length; i++) {
  5534. copies[i]();
  5535. }
  5536. }
  5537. // Here we have async deferring wrappers using microtasks.
  5538. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5539. // However, it has subtle problems when state is changed right before repaint
  5540. // (e.g. #6813, out-in transitions).
  5541. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5542. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5543. // So we now use microtasks everywhere, again.
  5544. // A major drawback of this tradeoff is that there are some scenarios
  5545. // where microtasks have too high a priority and fire in between supposedly
  5546. // sequential events (e.g. #4521, #6690, which have workarounds)
  5547. // or even between bubbling of the same event (#6566).
  5548. var timerFunc;
  5549. // The nextTick behavior leverages the microtask queue, which can be accessed
  5550. // via either native Promise.then or MutationObserver.
  5551. // MutationObserver has wider support, however it is seriously bugged in
  5552. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5553. // completely stops working after triggering a few times... so, if native
  5554. // Promise is available, we will use it:
  5555. /* istanbul ignore next, $flow-disable-line */
  5556. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5557. var p = Promise.resolve();
  5558. timerFunc = function () {
  5559. p.then(flushCallbacks);
  5560. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5561. // it can get stuck in a weird state where callbacks are pushed into the
  5562. // microtask queue but the queue isn't being flushed, until the browser
  5563. // needs to do some other work, e.g. handle a timer. Therefore we can
  5564. // "force" the microtask queue to be flushed by adding an empty timer.
  5565. if (isIOS) { setTimeout(noop); }
  5566. };
  5567. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5568. isNative(MutationObserver) ||
  5569. // PhantomJS and iOS 7.x
  5570. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5571. )) {
  5572. // Use MutationObserver where native Promise is not available,
  5573. // e.g. PhantomJS, iOS7, Android 4.4
  5574. // (#6466 MutationObserver is unreliable in IE11)
  5575. var counter = 1;
  5576. var observer = new MutationObserver(flushCallbacks);
  5577. var textNode = document.createTextNode(String(counter));
  5578. observer.observe(textNode, {
  5579. characterData: true
  5580. });
  5581. timerFunc = function () {
  5582. counter = (counter + 1) % 2;
  5583. textNode.data = String(counter);
  5584. };
  5585. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5586. // Fallback to setImmediate.
  5587. // Technically it leverages the (macro) task queue,
  5588. // but it is still a better choice than setTimeout.
  5589. timerFunc = function () {
  5590. setImmediate(flushCallbacks);
  5591. };
  5592. } else {
  5593. // Fallback to setTimeout.
  5594. timerFunc = function () {
  5595. setTimeout(flushCallbacks, 0);
  5596. };
  5597. }
  5598. function nextTick (cb, ctx) {
  5599. var _resolve;
  5600. callbacks.push(function () {
  5601. if (cb) {
  5602. try {
  5603. cb.call(ctx);
  5604. } catch (e) {
  5605. handleError(e, ctx, 'nextTick');
  5606. }
  5607. } else if (_resolve) {
  5608. _resolve(ctx);
  5609. }
  5610. });
  5611. if (!pending) {
  5612. pending = true;
  5613. timerFunc();
  5614. }
  5615. // $flow-disable-line
  5616. if (!cb && typeof Promise !== 'undefined') {
  5617. return new Promise(function (resolve) {
  5618. _resolve = resolve;
  5619. })
  5620. }
  5621. }
  5622. /* */
  5623. /* not type checking this file because flow doesn't play well with Proxy */
  5624. var initProxy;
  5625. if (true) {
  5626. var allowedGlobals = makeMap(
  5627. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5628. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5629. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5630. 'require' // for Webpack/Browserify
  5631. );
  5632. var warnNonPresent = function (target, key) {
  5633. warn(
  5634. "Property or method \"" + key + "\" is not defined on the instance but " +
  5635. 'referenced during render. Make sure that this property is reactive, ' +
  5636. 'either in the data option, or for class-based components, by ' +
  5637. 'initializing the property. ' +
  5638. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5639. target
  5640. );
  5641. };
  5642. var warnReservedPrefix = function (target, key) {
  5643. warn(
  5644. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5645. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5646. 'prevent conflicts with Vue internals. ' +
  5647. 'See: https://vuejs.org/v2/api/#data',
  5648. target
  5649. );
  5650. };
  5651. var hasProxy =
  5652. typeof Proxy !== 'undefined' && isNative(Proxy);
  5653. if (hasProxy) {
  5654. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5655. config.keyCodes = new Proxy(config.keyCodes, {
  5656. set: function set (target, key, value) {
  5657. if (isBuiltInModifier(key)) {
  5658. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5659. return false
  5660. } else {
  5661. target[key] = value;
  5662. return true
  5663. }
  5664. }
  5665. });
  5666. }
  5667. var hasHandler = {
  5668. has: function has (target, key) {
  5669. var has = key in target;
  5670. var isAllowed = allowedGlobals(key) ||
  5671. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5672. if (!has && !isAllowed) {
  5673. if (key in target.$data) { warnReservedPrefix(target, key); }
  5674. else { warnNonPresent(target, key); }
  5675. }
  5676. return has || !isAllowed
  5677. }
  5678. };
  5679. var getHandler = {
  5680. get: function get (target, key) {
  5681. if (typeof key === 'string' && !(key in target)) {
  5682. if (key in target.$data) { warnReservedPrefix(target, key); }
  5683. else { warnNonPresent(target, key); }
  5684. }
  5685. return target[key]
  5686. }
  5687. };
  5688. initProxy = function initProxy (vm) {
  5689. if (hasProxy) {
  5690. // determine which proxy handler to use
  5691. var options = vm.$options;
  5692. var handlers = options.render && options.render._withStripped
  5693. ? getHandler
  5694. : hasHandler;
  5695. vm._renderProxy = new Proxy(vm, handlers);
  5696. } else {
  5697. vm._renderProxy = vm;
  5698. }
  5699. };
  5700. }
  5701. /* */
  5702. var seenObjects = new _Set();
  5703. /**
  5704. * Recursively traverse an object to evoke all converted
  5705. * getters, so that every nested property inside the object
  5706. * is collected as a "deep" dependency.
  5707. */
  5708. function traverse (val) {
  5709. _traverse(val, seenObjects);
  5710. seenObjects.clear();
  5711. }
  5712. function _traverse (val, seen) {
  5713. var i, keys;
  5714. var isA = Array.isArray(val);
  5715. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5716. return
  5717. }
  5718. if (val.__ob__) {
  5719. var depId = val.__ob__.dep.id;
  5720. if (seen.has(depId)) {
  5721. return
  5722. }
  5723. seen.add(depId);
  5724. }
  5725. if (isA) {
  5726. i = val.length;
  5727. while (i--) { _traverse(val[i], seen); }
  5728. } else {
  5729. keys = Object.keys(val);
  5730. i = keys.length;
  5731. while (i--) { _traverse(val[keys[i]], seen); }
  5732. }
  5733. }
  5734. var mark;
  5735. var measure;
  5736. if (true) {
  5737. var perf = inBrowser && window.performance;
  5738. /* istanbul ignore if */
  5739. if (
  5740. perf &&
  5741. perf.mark &&
  5742. perf.measure &&
  5743. perf.clearMarks &&
  5744. perf.clearMeasures
  5745. ) {
  5746. mark = function (tag) { return perf.mark(tag); };
  5747. measure = function (name, startTag, endTag) {
  5748. perf.measure(name, startTag, endTag);
  5749. perf.clearMarks(startTag);
  5750. perf.clearMarks(endTag);
  5751. // perf.clearMeasures(name)
  5752. };
  5753. }
  5754. }
  5755. /* */
  5756. var normalizeEvent = cached(function (name) {
  5757. var passive = name.charAt(0) === '&';
  5758. name = passive ? name.slice(1) : name;
  5759. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5760. name = once$$1 ? name.slice(1) : name;
  5761. var capture = name.charAt(0) === '!';
  5762. name = capture ? name.slice(1) : name;
  5763. return {
  5764. name: name,
  5765. once: once$$1,
  5766. capture: capture,
  5767. passive: passive
  5768. }
  5769. });
  5770. function createFnInvoker (fns, vm) {
  5771. function invoker () {
  5772. var arguments$1 = arguments;
  5773. var fns = invoker.fns;
  5774. if (Array.isArray(fns)) {
  5775. var cloned = fns.slice();
  5776. for (var i = 0; i < cloned.length; i++) {
  5777. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5778. }
  5779. } else {
  5780. // return handler return value for single handlers
  5781. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5782. }
  5783. }
  5784. invoker.fns = fns;
  5785. return invoker
  5786. }
  5787. function updateListeners (
  5788. on,
  5789. oldOn,
  5790. add,
  5791. remove$$1,
  5792. createOnceHandler,
  5793. vm
  5794. ) {
  5795. var name, def$$1, cur, old, event;
  5796. for (name in on) {
  5797. def$$1 = cur = on[name];
  5798. old = oldOn[name];
  5799. event = normalizeEvent(name);
  5800. if (isUndef(cur)) {
  5801. true && warn(
  5802. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5803. vm
  5804. );
  5805. } else if (isUndef(old)) {
  5806. if (isUndef(cur.fns)) {
  5807. cur = on[name] = createFnInvoker(cur, vm);
  5808. }
  5809. if (isTrue(event.once)) {
  5810. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5811. }
  5812. add(event.name, cur, event.capture, event.passive, event.params);
  5813. } else if (cur !== old) {
  5814. old.fns = cur;
  5815. on[name] = old;
  5816. }
  5817. }
  5818. for (name in oldOn) {
  5819. if (isUndef(on[name])) {
  5820. event = normalizeEvent(name);
  5821. remove$$1(event.name, oldOn[name], event.capture);
  5822. }
  5823. }
  5824. }
  5825. /* */
  5826. /* */
  5827. // fixed by xxxxxx (mp properties)
  5828. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5829. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5830. if (isUndef(propOptions)) {
  5831. return res
  5832. }
  5833. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5834. var attrs = data.attrs;
  5835. var props = data.props;
  5836. if (isDef(attrs) || isDef(props)) {
  5837. for (var key in propOptions) {
  5838. var altKey = hyphenate(key);
  5839. var result = checkProp(res, props, key, altKey, true) ||
  5840. checkProp(res, attrs, key, altKey, false);
  5841. // externalClass
  5842. if (
  5843. result &&
  5844. res[key] &&
  5845. externalClasses.indexOf(altKey) !== -1 &&
  5846. context[camelize(res[key])]
  5847. ) {
  5848. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5849. res[key] = context[camelize(res[key])];
  5850. }
  5851. }
  5852. }
  5853. return res
  5854. }
  5855. function extractPropsFromVNodeData (
  5856. data,
  5857. Ctor,
  5858. tag,
  5859. context// fixed by xxxxxx
  5860. ) {
  5861. // we are only extracting raw values here.
  5862. // validation and default values are handled in the child
  5863. // component itself.
  5864. var propOptions = Ctor.options.props;
  5865. if (isUndef(propOptions)) {
  5866. // fixed by xxxxxx
  5867. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5868. }
  5869. var res = {};
  5870. var attrs = data.attrs;
  5871. var props = data.props;
  5872. if (isDef(attrs) || isDef(props)) {
  5873. for (var key in propOptions) {
  5874. var altKey = hyphenate(key);
  5875. if (true) {
  5876. var keyInLowerCase = key.toLowerCase();
  5877. if (
  5878. key !== keyInLowerCase &&
  5879. attrs && hasOwn(attrs, keyInLowerCase)
  5880. ) {
  5881. tip(
  5882. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5883. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5884. " \"" + key + "\". " +
  5885. "Note that HTML attributes are case-insensitive and camelCased " +
  5886. "props need to use their kebab-case equivalents when using in-DOM " +
  5887. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5888. );
  5889. }
  5890. }
  5891. checkProp(res, props, key, altKey, true) ||
  5892. checkProp(res, attrs, key, altKey, false);
  5893. }
  5894. }
  5895. // fixed by xxxxxx
  5896. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5897. }
  5898. function checkProp (
  5899. res,
  5900. hash,
  5901. key,
  5902. altKey,
  5903. preserve
  5904. ) {
  5905. if (isDef(hash)) {
  5906. if (hasOwn(hash, key)) {
  5907. res[key] = hash[key];
  5908. if (!preserve) {
  5909. delete hash[key];
  5910. }
  5911. return true
  5912. } else if (hasOwn(hash, altKey)) {
  5913. res[key] = hash[altKey];
  5914. if (!preserve) {
  5915. delete hash[altKey];
  5916. }
  5917. return true
  5918. }
  5919. }
  5920. return false
  5921. }
  5922. /* */
  5923. // The template compiler attempts to minimize the need for normalization by
  5924. // statically analyzing the template at compile time.
  5925. //
  5926. // For plain HTML markup, normalization can be completely skipped because the
  5927. // generated render function is guaranteed to return Array<VNode>. There are
  5928. // two cases where extra normalization is needed:
  5929. // 1. When the children contains components - because a functional component
  5930. // may return an Array instead of a single root. In this case, just a simple
  5931. // normalization is needed - if any child is an Array, we flatten the whole
  5932. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5933. // because functional components already normalize their own children.
  5934. function simpleNormalizeChildren (children) {
  5935. for (var i = 0; i < children.length; i++) {
  5936. if (Array.isArray(children[i])) {
  5937. return Array.prototype.concat.apply([], children)
  5938. }
  5939. }
  5940. return children
  5941. }
  5942. // 2. When the children contains constructs that always generated nested Arrays,
  5943. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5944. // with hand-written render functions / JSX. In such cases a full normalization
  5945. // is needed to cater to all possible types of children values.
  5946. function normalizeChildren (children) {
  5947. return isPrimitive(children)
  5948. ? [createTextVNode(children)]
  5949. : Array.isArray(children)
  5950. ? normalizeArrayChildren(children)
  5951. : undefined
  5952. }
  5953. function isTextNode (node) {
  5954. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5955. }
  5956. function normalizeArrayChildren (children, nestedIndex) {
  5957. var res = [];
  5958. var i, c, lastIndex, last;
  5959. for (i = 0; i < children.length; i++) {
  5960. c = children[i];
  5961. if (isUndef(c) || typeof c === 'boolean') { continue }
  5962. lastIndex = res.length - 1;
  5963. last = res[lastIndex];
  5964. // nested
  5965. if (Array.isArray(c)) {
  5966. if (c.length > 0) {
  5967. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5968. // merge adjacent text nodes
  5969. if (isTextNode(c[0]) && isTextNode(last)) {
  5970. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5971. c.shift();
  5972. }
  5973. res.push.apply(res, c);
  5974. }
  5975. } else if (isPrimitive(c)) {
  5976. if (isTextNode(last)) {
  5977. // merge adjacent text nodes
  5978. // this is necessary for SSR hydration because text nodes are
  5979. // essentially merged when rendered to HTML strings
  5980. res[lastIndex] = createTextVNode(last.text + c);
  5981. } else if (c !== '') {
  5982. // convert primitive to vnode
  5983. res.push(createTextVNode(c));
  5984. }
  5985. } else {
  5986. if (isTextNode(c) && isTextNode(last)) {
  5987. // merge adjacent text nodes
  5988. res[lastIndex] = createTextVNode(last.text + c.text);
  5989. } else {
  5990. // default key for nested array children (likely generated by v-for)
  5991. if (isTrue(children._isVList) &&
  5992. isDef(c.tag) &&
  5993. isUndef(c.key) &&
  5994. isDef(nestedIndex)) {
  5995. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5996. }
  5997. res.push(c);
  5998. }
  5999. }
  6000. }
  6001. return res
  6002. }
  6003. /* */
  6004. function initProvide (vm) {
  6005. var provide = vm.$options.provide;
  6006. if (provide) {
  6007. vm._provided = typeof provide === 'function'
  6008. ? provide.call(vm)
  6009. : provide;
  6010. }
  6011. }
  6012. function initInjections (vm) {
  6013. var result = resolveInject(vm.$options.inject, vm);
  6014. if (result) {
  6015. toggleObserving(false);
  6016. Object.keys(result).forEach(function (key) {
  6017. /* istanbul ignore else */
  6018. if (true) {
  6019. defineReactive$$1(vm, key, result[key], function () {
  6020. warn(
  6021. "Avoid mutating an injected value directly since the changes will be " +
  6022. "overwritten whenever the provided component re-renders. " +
  6023. "injection being mutated: \"" + key + "\"",
  6024. vm
  6025. );
  6026. });
  6027. } else {}
  6028. });
  6029. toggleObserving(true);
  6030. }
  6031. }
  6032. function resolveInject (inject, vm) {
  6033. if (inject) {
  6034. // inject is :any because flow is not smart enough to figure out cached
  6035. var result = Object.create(null);
  6036. var keys = hasSymbol
  6037. ? Reflect.ownKeys(inject)
  6038. : Object.keys(inject);
  6039. for (var i = 0; i < keys.length; i++) {
  6040. var key = keys[i];
  6041. // #6574 in case the inject object is observed...
  6042. if (key === '__ob__') { continue }
  6043. var provideKey = inject[key].from;
  6044. var source = vm;
  6045. while (source) {
  6046. if (source._provided && hasOwn(source._provided, provideKey)) {
  6047. result[key] = source._provided[provideKey];
  6048. break
  6049. }
  6050. source = source.$parent;
  6051. }
  6052. if (!source) {
  6053. if ('default' in inject[key]) {
  6054. var provideDefault = inject[key].default;
  6055. result[key] = typeof provideDefault === 'function'
  6056. ? provideDefault.call(vm)
  6057. : provideDefault;
  6058. } else if (true) {
  6059. warn(("Injection \"" + key + "\" not found"), vm);
  6060. }
  6061. }
  6062. }
  6063. return result
  6064. }
  6065. }
  6066. /* */
  6067. /**
  6068. * Runtime helper for resolving raw children VNodes into a slot object.
  6069. */
  6070. function resolveSlots (
  6071. children,
  6072. context
  6073. ) {
  6074. if (!children || !children.length) {
  6075. return {}
  6076. }
  6077. var slots = {};
  6078. for (var i = 0, l = children.length; i < l; i++) {
  6079. var child = children[i];
  6080. var data = child.data;
  6081. // remove slot attribute if the node is resolved as a Vue slot node
  6082. if (data && data.attrs && data.attrs.slot) {
  6083. delete data.attrs.slot;
  6084. }
  6085. // named slots should only be respected if the vnode was rendered in the
  6086. // same context.
  6087. if ((child.context === context || child.fnContext === context) &&
  6088. data && data.slot != null
  6089. ) {
  6090. var name = data.slot;
  6091. var slot = (slots[name] || (slots[name] = []));
  6092. if (child.tag === 'template') {
  6093. slot.push.apply(slot, child.children || []);
  6094. } else {
  6095. slot.push(child);
  6096. }
  6097. } else {
  6098. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  6099. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  6100. (slots['page'] || (slots['page'] = [])).push(child);
  6101. }else{
  6102. (slots.default || (slots.default = [])).push(child);
  6103. }
  6104. }
  6105. }
  6106. // ignore slots that contains only whitespace
  6107. for (var name$1 in slots) {
  6108. if (slots[name$1].every(isWhitespace)) {
  6109. delete slots[name$1];
  6110. }
  6111. }
  6112. return slots
  6113. }
  6114. function isWhitespace (node) {
  6115. return (node.isComment && !node.asyncFactory) || node.text === ' '
  6116. }
  6117. /* */
  6118. function normalizeScopedSlots (
  6119. slots,
  6120. normalSlots,
  6121. prevSlots
  6122. ) {
  6123. var res;
  6124. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  6125. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  6126. var key = slots && slots.$key;
  6127. if (!slots) {
  6128. res = {};
  6129. } else if (slots._normalized) {
  6130. // fast path 1: child component re-render only, parent did not change
  6131. return slots._normalized
  6132. } else if (
  6133. isStable &&
  6134. prevSlots &&
  6135. prevSlots !== emptyObject &&
  6136. key === prevSlots.$key &&
  6137. !hasNormalSlots &&
  6138. !prevSlots.$hasNormal
  6139. ) {
  6140. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  6141. // only need to normalize once
  6142. return prevSlots
  6143. } else {
  6144. res = {};
  6145. for (var key$1 in slots) {
  6146. if (slots[key$1] && key$1[0] !== '$') {
  6147. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  6148. }
  6149. }
  6150. }
  6151. // expose normal slots on scopedSlots
  6152. for (var key$2 in normalSlots) {
  6153. if (!(key$2 in res)) {
  6154. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  6155. }
  6156. }
  6157. // avoriaz seems to mock a non-extensible $scopedSlots object
  6158. // and when that is passed down this would cause an error
  6159. if (slots && Object.isExtensible(slots)) {
  6160. (slots)._normalized = res;
  6161. }
  6162. def(res, '$stable', isStable);
  6163. def(res, '$key', key);
  6164. def(res, '$hasNormal', hasNormalSlots);
  6165. return res
  6166. }
  6167. function normalizeScopedSlot(normalSlots, key, fn) {
  6168. var normalized = function () {
  6169. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  6170. res = res && typeof res === 'object' && !Array.isArray(res)
  6171. ? [res] // single vnode
  6172. : normalizeChildren(res);
  6173. return res && (
  6174. res.length === 0 ||
  6175. (res.length === 1 && res[0].isComment) // #9658
  6176. ) ? undefined
  6177. : res
  6178. };
  6179. // this is a slot using the new v-slot syntax without scope. although it is
  6180. // compiled as a scoped slot, render fn users would expect it to be present
  6181. // on this.$slots because the usage is semantically a normal slot.
  6182. if (fn.proxy) {
  6183. Object.defineProperty(normalSlots, key, {
  6184. get: normalized,
  6185. enumerable: true,
  6186. configurable: true
  6187. });
  6188. }
  6189. return normalized
  6190. }
  6191. function proxyNormalSlot(slots, key) {
  6192. return function () { return slots[key]; }
  6193. }
  6194. /* */
  6195. /**
  6196. * Runtime helper for rendering v-for lists.
  6197. */
  6198. function renderList (
  6199. val,
  6200. render
  6201. ) {
  6202. var ret, i, l, keys, key;
  6203. if (Array.isArray(val) || typeof val === 'string') {
  6204. ret = new Array(val.length);
  6205. for (i = 0, l = val.length; i < l; i++) {
  6206. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  6207. }
  6208. } else if (typeof val === 'number') {
  6209. ret = new Array(val);
  6210. for (i = 0; i < val; i++) {
  6211. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  6212. }
  6213. } else if (isObject(val)) {
  6214. if (hasSymbol && val[Symbol.iterator]) {
  6215. ret = [];
  6216. var iterator = val[Symbol.iterator]();
  6217. var result = iterator.next();
  6218. while (!result.done) {
  6219. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  6220. result = iterator.next();
  6221. }
  6222. } else {
  6223. keys = Object.keys(val);
  6224. ret = new Array(keys.length);
  6225. for (i = 0, l = keys.length; i < l; i++) {
  6226. key = keys[i];
  6227. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  6228. }
  6229. }
  6230. }
  6231. if (!isDef(ret)) {
  6232. ret = [];
  6233. }
  6234. (ret)._isVList = true;
  6235. return ret
  6236. }
  6237. /* */
  6238. /**
  6239. * Runtime helper for rendering <slot>
  6240. */
  6241. function renderSlot (
  6242. name,
  6243. fallback,
  6244. props,
  6245. bindObject
  6246. ) {
  6247. var scopedSlotFn = this.$scopedSlots[name];
  6248. var nodes;
  6249. if (scopedSlotFn) { // scoped slot
  6250. props = props || {};
  6251. if (bindObject) {
  6252. if ( true && !isObject(bindObject)) {
  6253. warn(
  6254. 'slot v-bind without argument expects an Object',
  6255. this
  6256. );
  6257. }
  6258. props = extend(extend({}, bindObject), props);
  6259. }
  6260. // fixed by xxxxxx app-plus scopedSlot
  6261. nodes = scopedSlotFn(props, this, props._i) || fallback;
  6262. } else {
  6263. nodes = this.$slots[name] || fallback;
  6264. }
  6265. var target = props && props.slot;
  6266. if (target) {
  6267. return this.$createElement('template', { slot: target }, nodes)
  6268. } else {
  6269. return nodes
  6270. }
  6271. }
  6272. /* */
  6273. /**
  6274. * Runtime helper for resolving filters
  6275. */
  6276. function resolveFilter (id) {
  6277. return resolveAsset(this.$options, 'filters', id, true) || identity
  6278. }
  6279. /* */
  6280. function isKeyNotMatch (expect, actual) {
  6281. if (Array.isArray(expect)) {
  6282. return expect.indexOf(actual) === -1
  6283. } else {
  6284. return expect !== actual
  6285. }
  6286. }
  6287. /**
  6288. * Runtime helper for checking keyCodes from config.
  6289. * exposed as Vue.prototype._k
  6290. * passing in eventKeyName as last argument separately for backwards compat
  6291. */
  6292. function checkKeyCodes (
  6293. eventKeyCode,
  6294. key,
  6295. builtInKeyCode,
  6296. eventKeyName,
  6297. builtInKeyName
  6298. ) {
  6299. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  6300. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  6301. return isKeyNotMatch(builtInKeyName, eventKeyName)
  6302. } else if (mappedKeyCode) {
  6303. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  6304. } else if (eventKeyName) {
  6305. return hyphenate(eventKeyName) !== key
  6306. }
  6307. }
  6308. /* */
  6309. /**
  6310. * Runtime helper for merging v-bind="object" into a VNode's data.
  6311. */
  6312. function bindObjectProps (
  6313. data,
  6314. tag,
  6315. value,
  6316. asProp,
  6317. isSync
  6318. ) {
  6319. if (value) {
  6320. if (!isObject(value)) {
  6321. true && warn(
  6322. 'v-bind without argument expects an Object or Array value',
  6323. this
  6324. );
  6325. } else {
  6326. if (Array.isArray(value)) {
  6327. value = toObject(value);
  6328. }
  6329. var hash;
  6330. var loop = function ( key ) {
  6331. if (
  6332. key === 'class' ||
  6333. key === 'style' ||
  6334. isReservedAttribute(key)
  6335. ) {
  6336. hash = data;
  6337. } else {
  6338. var type = data.attrs && data.attrs.type;
  6339. hash = asProp || config.mustUseProp(tag, type, key)
  6340. ? data.domProps || (data.domProps = {})
  6341. : data.attrs || (data.attrs = {});
  6342. }
  6343. var camelizedKey = camelize(key);
  6344. var hyphenatedKey = hyphenate(key);
  6345. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  6346. hash[key] = value[key];
  6347. if (isSync) {
  6348. var on = data.on || (data.on = {});
  6349. on[("update:" + key)] = function ($event) {
  6350. value[key] = $event;
  6351. };
  6352. }
  6353. }
  6354. };
  6355. for (var key in value) loop( key );
  6356. }
  6357. }
  6358. return data
  6359. }
  6360. /* */
  6361. /**
  6362. * Runtime helper for rendering static trees.
  6363. */
  6364. function renderStatic (
  6365. index,
  6366. isInFor
  6367. ) {
  6368. var cached = this._staticTrees || (this._staticTrees = []);
  6369. var tree = cached[index];
  6370. // if has already-rendered static tree and not inside v-for,
  6371. // we can reuse the same tree.
  6372. if (tree && !isInFor) {
  6373. return tree
  6374. }
  6375. // otherwise, render a fresh tree.
  6376. tree = cached[index] = this.$options.staticRenderFns[index].call(
  6377. this._renderProxy,
  6378. null,
  6379. this // for render fns generated for functional component templates
  6380. );
  6381. markStatic(tree, ("__static__" + index), false);
  6382. return tree
  6383. }
  6384. /**
  6385. * Runtime helper for v-once.
  6386. * Effectively it means marking the node as static with a unique key.
  6387. */
  6388. function markOnce (
  6389. tree,
  6390. index,
  6391. key
  6392. ) {
  6393. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  6394. return tree
  6395. }
  6396. function markStatic (
  6397. tree,
  6398. key,
  6399. isOnce
  6400. ) {
  6401. if (Array.isArray(tree)) {
  6402. for (var i = 0; i < tree.length; i++) {
  6403. if (tree[i] && typeof tree[i] !== 'string') {
  6404. markStaticNode(tree[i], (key + "_" + i), isOnce);
  6405. }
  6406. }
  6407. } else {
  6408. markStaticNode(tree, key, isOnce);
  6409. }
  6410. }
  6411. function markStaticNode (node, key, isOnce) {
  6412. node.isStatic = true;
  6413. node.key = key;
  6414. node.isOnce = isOnce;
  6415. }
  6416. /* */
  6417. function bindObjectListeners (data, value) {
  6418. if (value) {
  6419. if (!isPlainObject(value)) {
  6420. true && warn(
  6421. 'v-on without argument expects an Object value',
  6422. this
  6423. );
  6424. } else {
  6425. var on = data.on = data.on ? extend({}, data.on) : {};
  6426. for (var key in value) {
  6427. var existing = on[key];
  6428. var ours = value[key];
  6429. on[key] = existing ? [].concat(existing, ours) : ours;
  6430. }
  6431. }
  6432. }
  6433. return data
  6434. }
  6435. /* */
  6436. function resolveScopedSlots (
  6437. fns, // see flow/vnode
  6438. res,
  6439. // the following are added in 2.6
  6440. hasDynamicKeys,
  6441. contentHashKey
  6442. ) {
  6443. res = res || { $stable: !hasDynamicKeys };
  6444. for (var i = 0; i < fns.length; i++) {
  6445. var slot = fns[i];
  6446. if (Array.isArray(slot)) {
  6447. resolveScopedSlots(slot, res, hasDynamicKeys);
  6448. } else if (slot) {
  6449. // marker for reverse proxying v-slot without scope on this.$slots
  6450. if (slot.proxy) {
  6451. slot.fn.proxy = true;
  6452. }
  6453. res[slot.key] = slot.fn;
  6454. }
  6455. }
  6456. if (contentHashKey) {
  6457. (res).$key = contentHashKey;
  6458. }
  6459. return res
  6460. }
  6461. /* */
  6462. function bindDynamicKeys (baseObj, values) {
  6463. for (var i = 0; i < values.length; i += 2) {
  6464. var key = values[i];
  6465. if (typeof key === 'string' && key) {
  6466. baseObj[values[i]] = values[i + 1];
  6467. } else if ( true && key !== '' && key !== null) {
  6468. // null is a special value for explicitly removing a binding
  6469. warn(
  6470. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  6471. this
  6472. );
  6473. }
  6474. }
  6475. return baseObj
  6476. }
  6477. // helper to dynamically append modifier runtime markers to event names.
  6478. // ensure only append when value is already string, otherwise it will be cast
  6479. // to string and cause the type check to miss.
  6480. function prependModifier (value, symbol) {
  6481. return typeof value === 'string' ? symbol + value : value
  6482. }
  6483. /* */
  6484. function installRenderHelpers (target) {
  6485. target._o = markOnce;
  6486. target._n = toNumber;
  6487. target._s = toString;
  6488. target._l = renderList;
  6489. target._t = renderSlot;
  6490. target._q = looseEqual;
  6491. target._i = looseIndexOf;
  6492. target._m = renderStatic;
  6493. target._f = resolveFilter;
  6494. target._k = checkKeyCodes;
  6495. target._b = bindObjectProps;
  6496. target._v = createTextVNode;
  6497. target._e = createEmptyVNode;
  6498. target._u = resolveScopedSlots;
  6499. target._g = bindObjectListeners;
  6500. target._d = bindDynamicKeys;
  6501. target._p = prependModifier;
  6502. }
  6503. /* */
  6504. function FunctionalRenderContext (
  6505. data,
  6506. props,
  6507. children,
  6508. parent,
  6509. Ctor
  6510. ) {
  6511. var this$1 = this;
  6512. var options = Ctor.options;
  6513. // ensure the createElement function in functional components
  6514. // gets a unique context - this is necessary for correct named slot check
  6515. var contextVm;
  6516. if (hasOwn(parent, '_uid')) {
  6517. contextVm = Object.create(parent);
  6518. // $flow-disable-line
  6519. contextVm._original = parent;
  6520. } else {
  6521. // the context vm passed in is a functional context as well.
  6522. // in this case we want to make sure we are able to get a hold to the
  6523. // real context instance.
  6524. contextVm = parent;
  6525. // $flow-disable-line
  6526. parent = parent._original;
  6527. }
  6528. var isCompiled = isTrue(options._compiled);
  6529. var needNormalization = !isCompiled;
  6530. this.data = data;
  6531. this.props = props;
  6532. this.children = children;
  6533. this.parent = parent;
  6534. this.listeners = data.on || emptyObject;
  6535. this.injections = resolveInject(options.inject, parent);
  6536. this.slots = function () {
  6537. if (!this$1.$slots) {
  6538. normalizeScopedSlots(
  6539. data.scopedSlots,
  6540. this$1.$slots = resolveSlots(children, parent)
  6541. );
  6542. }
  6543. return this$1.$slots
  6544. };
  6545. Object.defineProperty(this, 'scopedSlots', ({
  6546. enumerable: true,
  6547. get: function get () {
  6548. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6549. }
  6550. }));
  6551. // support for compiled functional template
  6552. if (isCompiled) {
  6553. // exposing $options for renderStatic()
  6554. this.$options = options;
  6555. // pre-resolve slots for renderSlot()
  6556. this.$slots = this.slots();
  6557. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6558. }
  6559. if (options._scopeId) {
  6560. this._c = function (a, b, c, d) {
  6561. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6562. if (vnode && !Array.isArray(vnode)) {
  6563. vnode.fnScopeId = options._scopeId;
  6564. vnode.fnContext = parent;
  6565. }
  6566. return vnode
  6567. };
  6568. } else {
  6569. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6570. }
  6571. }
  6572. installRenderHelpers(FunctionalRenderContext.prototype);
  6573. function createFunctionalComponent (
  6574. Ctor,
  6575. propsData,
  6576. data,
  6577. contextVm,
  6578. children
  6579. ) {
  6580. var options = Ctor.options;
  6581. var props = {};
  6582. var propOptions = options.props;
  6583. if (isDef(propOptions)) {
  6584. for (var key in propOptions) {
  6585. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6586. }
  6587. } else {
  6588. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6589. if (isDef(data.props)) { mergeProps(props, data.props); }
  6590. }
  6591. var renderContext = new FunctionalRenderContext(
  6592. data,
  6593. props,
  6594. children,
  6595. contextVm,
  6596. Ctor
  6597. );
  6598. var vnode = options.render.call(null, renderContext._c, renderContext);
  6599. if (vnode instanceof VNode) {
  6600. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6601. } else if (Array.isArray(vnode)) {
  6602. var vnodes = normalizeChildren(vnode) || [];
  6603. var res = new Array(vnodes.length);
  6604. for (var i = 0; i < vnodes.length; i++) {
  6605. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6606. }
  6607. return res
  6608. }
  6609. }
  6610. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6611. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6612. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6613. // that should not be matched to match.
  6614. var clone = cloneVNode(vnode);
  6615. clone.fnContext = contextVm;
  6616. clone.fnOptions = options;
  6617. if (true) {
  6618. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6619. }
  6620. if (data.slot) {
  6621. (clone.data || (clone.data = {})).slot = data.slot;
  6622. }
  6623. return clone
  6624. }
  6625. function mergeProps (to, from) {
  6626. for (var key in from) {
  6627. to[camelize(key)] = from[key];
  6628. }
  6629. }
  6630. /* */
  6631. /* */
  6632. /* */
  6633. /* */
  6634. // inline hooks to be invoked on component VNodes during patch
  6635. var componentVNodeHooks = {
  6636. init: function init (vnode, hydrating) {
  6637. if (
  6638. vnode.componentInstance &&
  6639. !vnode.componentInstance._isDestroyed &&
  6640. vnode.data.keepAlive
  6641. ) {
  6642. // kept-alive components, treat as a patch
  6643. var mountedNode = vnode; // work around flow
  6644. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6645. } else {
  6646. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6647. vnode,
  6648. activeInstance
  6649. );
  6650. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6651. }
  6652. },
  6653. prepatch: function prepatch (oldVnode, vnode) {
  6654. var options = vnode.componentOptions;
  6655. var child = vnode.componentInstance = oldVnode.componentInstance;
  6656. updateChildComponent(
  6657. child,
  6658. options.propsData, // updated props
  6659. options.listeners, // updated listeners
  6660. vnode, // new parent vnode
  6661. options.children // new children
  6662. );
  6663. },
  6664. insert: function insert (vnode) {
  6665. var context = vnode.context;
  6666. var componentInstance = vnode.componentInstance;
  6667. if (!componentInstance._isMounted) {
  6668. callHook(componentInstance, 'onServiceCreated');
  6669. callHook(componentInstance, 'onServiceAttached');
  6670. componentInstance._isMounted = true;
  6671. callHook(componentInstance, 'mounted');
  6672. }
  6673. if (vnode.data.keepAlive) {
  6674. if (context._isMounted) {
  6675. // vue-router#1212
  6676. // During updates, a kept-alive component's child components may
  6677. // change, so directly walking the tree here may call activated hooks
  6678. // on incorrect children. Instead we push them into a queue which will
  6679. // be processed after the whole patch process ended.
  6680. queueActivatedComponent(componentInstance);
  6681. } else {
  6682. activateChildComponent(componentInstance, true /* direct */);
  6683. }
  6684. }
  6685. },
  6686. destroy: function destroy (vnode) {
  6687. var componentInstance = vnode.componentInstance;
  6688. if (!componentInstance._isDestroyed) {
  6689. if (!vnode.data.keepAlive) {
  6690. componentInstance.$destroy();
  6691. } else {
  6692. deactivateChildComponent(componentInstance, true /* direct */);
  6693. }
  6694. }
  6695. }
  6696. };
  6697. var hooksToMerge = Object.keys(componentVNodeHooks);
  6698. function createComponent (
  6699. Ctor,
  6700. data,
  6701. context,
  6702. children,
  6703. tag
  6704. ) {
  6705. if (isUndef(Ctor)) {
  6706. return
  6707. }
  6708. var baseCtor = context.$options._base;
  6709. // plain options object: turn it into a constructor
  6710. if (isObject(Ctor)) {
  6711. Ctor = baseCtor.extend(Ctor);
  6712. }
  6713. // if at this stage it's not a constructor or an async component factory,
  6714. // reject.
  6715. if (typeof Ctor !== 'function') {
  6716. if (true) {
  6717. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6718. }
  6719. return
  6720. }
  6721. // async component
  6722. var asyncFactory;
  6723. if (isUndef(Ctor.cid)) {
  6724. asyncFactory = Ctor;
  6725. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6726. if (Ctor === undefined) {
  6727. // return a placeholder node for async component, which is rendered
  6728. // as a comment node but preserves all the raw information for the node.
  6729. // the information will be used for async server-rendering and hydration.
  6730. return createAsyncPlaceholder(
  6731. asyncFactory,
  6732. data,
  6733. context,
  6734. children,
  6735. tag
  6736. )
  6737. }
  6738. }
  6739. data = data || {};
  6740. // resolve constructor options in case global mixins are applied after
  6741. // component constructor creation
  6742. resolveConstructorOptions(Ctor);
  6743. // transform component v-model data into props & events
  6744. if (isDef(data.model)) {
  6745. transformModel(Ctor.options, data);
  6746. }
  6747. // extract props
  6748. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6749. // functional component
  6750. if (isTrue(Ctor.options.functional)) {
  6751. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6752. }
  6753. // extract listeners, since these needs to be treated as
  6754. // child component listeners instead of DOM listeners
  6755. var listeners = data.on;
  6756. // replace with listeners with .native modifier
  6757. // so it gets processed during parent component patch.
  6758. data.on = data.nativeOn;
  6759. if (isTrue(Ctor.options.abstract)) {
  6760. // abstract components do not keep anything
  6761. // other than props & listeners & slot
  6762. // work around flow
  6763. var slot = data.slot;
  6764. data = {};
  6765. if (slot) {
  6766. data.slot = slot;
  6767. }
  6768. }
  6769. // install component management hooks onto the placeholder node
  6770. installComponentHooks(data);
  6771. // return a placeholder vnode
  6772. var name = Ctor.options.name || tag;
  6773. var vnode = new VNode(
  6774. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6775. data, undefined, undefined, undefined, context,
  6776. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6777. asyncFactory
  6778. );
  6779. return vnode
  6780. }
  6781. function createComponentInstanceForVnode (
  6782. vnode, // we know it's MountedComponentVNode but flow doesn't
  6783. parent // activeInstance in lifecycle state
  6784. ) {
  6785. var options = {
  6786. _isComponent: true,
  6787. _parentVnode: vnode,
  6788. parent: parent
  6789. };
  6790. // check inline-template render functions
  6791. var inlineTemplate = vnode.data.inlineTemplate;
  6792. if (isDef(inlineTemplate)) {
  6793. options.render = inlineTemplate.render;
  6794. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6795. }
  6796. return new vnode.componentOptions.Ctor(options)
  6797. }
  6798. function installComponentHooks (data) {
  6799. var hooks = data.hook || (data.hook = {});
  6800. for (var i = 0; i < hooksToMerge.length; i++) {
  6801. var key = hooksToMerge[i];
  6802. var existing = hooks[key];
  6803. var toMerge = componentVNodeHooks[key];
  6804. if (existing !== toMerge && !(existing && existing._merged)) {
  6805. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6806. }
  6807. }
  6808. }
  6809. function mergeHook$1 (f1, f2) {
  6810. var merged = function (a, b) {
  6811. // flow complains about extra args which is why we use any
  6812. f1(a, b);
  6813. f2(a, b);
  6814. };
  6815. merged._merged = true;
  6816. return merged
  6817. }
  6818. // transform component v-model info (value and callback) into
  6819. // prop and event handler respectively.
  6820. function transformModel (options, data) {
  6821. var prop = (options.model && options.model.prop) || 'value';
  6822. var event = (options.model && options.model.event) || 'input'
  6823. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6824. var on = data.on || (data.on = {});
  6825. var existing = on[event];
  6826. var callback = data.model.callback;
  6827. if (isDef(existing)) {
  6828. if (
  6829. Array.isArray(existing)
  6830. ? existing.indexOf(callback) === -1
  6831. : existing !== callback
  6832. ) {
  6833. on[event] = [callback].concat(existing);
  6834. }
  6835. } else {
  6836. on[event] = callback;
  6837. }
  6838. }
  6839. /* */
  6840. var SIMPLE_NORMALIZE = 1;
  6841. var ALWAYS_NORMALIZE = 2;
  6842. // wrapper function for providing a more flexible interface
  6843. // without getting yelled at by flow
  6844. function createElement (
  6845. context,
  6846. tag,
  6847. data,
  6848. children,
  6849. normalizationType,
  6850. alwaysNormalize
  6851. ) {
  6852. if (Array.isArray(data) || isPrimitive(data)) {
  6853. normalizationType = children;
  6854. children = data;
  6855. data = undefined;
  6856. }
  6857. if (isTrue(alwaysNormalize)) {
  6858. normalizationType = ALWAYS_NORMALIZE;
  6859. }
  6860. return _createElement(context, tag, data, children, normalizationType)
  6861. }
  6862. function _createElement (
  6863. context,
  6864. tag,
  6865. data,
  6866. children,
  6867. normalizationType
  6868. ) {
  6869. if (isDef(data) && isDef((data).__ob__)) {
  6870. true && warn(
  6871. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6872. 'Always create fresh vnode data objects in each render!',
  6873. context
  6874. );
  6875. return createEmptyVNode()
  6876. }
  6877. // object syntax in v-bind
  6878. if (isDef(data) && isDef(data.is)) {
  6879. tag = data.is;
  6880. }
  6881. if (!tag) {
  6882. // in case of component :is set to falsy value
  6883. return createEmptyVNode()
  6884. }
  6885. // warn against non-primitive key
  6886. if ( true &&
  6887. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6888. ) {
  6889. {
  6890. warn(
  6891. 'Avoid using non-primitive value as key, ' +
  6892. 'use string/number value instead.',
  6893. context
  6894. );
  6895. }
  6896. }
  6897. // support single function children as default scoped slot
  6898. if (Array.isArray(children) &&
  6899. typeof children[0] === 'function'
  6900. ) {
  6901. data = data || {};
  6902. data.scopedSlots = { default: children[0] };
  6903. children.length = 0;
  6904. }
  6905. if (normalizationType === ALWAYS_NORMALIZE) {
  6906. children = normalizeChildren(children);
  6907. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6908. children = simpleNormalizeChildren(children);
  6909. }
  6910. var vnode, ns;
  6911. if (typeof tag === 'string') {
  6912. var Ctor;
  6913. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6914. if (config.isReservedTag(tag)) {
  6915. // platform built-in elements
  6916. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6917. warn(
  6918. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6919. context
  6920. );
  6921. }
  6922. vnode = new VNode(
  6923. config.parsePlatformTagName(tag), data, children,
  6924. undefined, undefined, context
  6925. );
  6926. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6927. // component
  6928. vnode = createComponent(Ctor, data, context, children, tag);
  6929. } else {
  6930. // unknown or unlisted namespaced elements
  6931. // check at runtime because it may get assigned a namespace when its
  6932. // parent normalizes children
  6933. vnode = new VNode(
  6934. tag, data, children,
  6935. undefined, undefined, context
  6936. );
  6937. }
  6938. } else {
  6939. // direct component options / constructor
  6940. vnode = createComponent(tag, data, context, children);
  6941. }
  6942. if (Array.isArray(vnode)) {
  6943. return vnode
  6944. } else if (isDef(vnode)) {
  6945. if (isDef(ns)) { applyNS(vnode, ns); }
  6946. if (isDef(data)) { registerDeepBindings(data); }
  6947. return vnode
  6948. } else {
  6949. return createEmptyVNode()
  6950. }
  6951. }
  6952. function applyNS (vnode, ns, force) {
  6953. vnode.ns = ns;
  6954. if (vnode.tag === 'foreignObject') {
  6955. // use default namespace inside foreignObject
  6956. ns = undefined;
  6957. force = true;
  6958. }
  6959. if (isDef(vnode.children)) {
  6960. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6961. var child = vnode.children[i];
  6962. if (isDef(child.tag) && (
  6963. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6964. applyNS(child, ns, force);
  6965. }
  6966. }
  6967. }
  6968. }
  6969. // ref #5318
  6970. // necessary to ensure parent re-render when deep bindings like :style and
  6971. // :class are used on slot nodes
  6972. function registerDeepBindings (data) {
  6973. if (isObject(data.style)) {
  6974. traverse(data.style);
  6975. }
  6976. if (isObject(data.class)) {
  6977. traverse(data.class);
  6978. }
  6979. }
  6980. /* */
  6981. function initRender (vm) {
  6982. vm._vnode = null; // the root of the child tree
  6983. vm._staticTrees = null; // v-once cached trees
  6984. var options = vm.$options;
  6985. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6986. var renderContext = parentVnode && parentVnode.context;
  6987. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6988. vm.$scopedSlots = emptyObject;
  6989. // bind the createElement fn to this instance
  6990. // so that we get proper render context inside it.
  6991. // args order: tag, data, children, normalizationType, alwaysNormalize
  6992. // internal version is used by render functions compiled from templates
  6993. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6994. // normalization is always applied for the public version, used in
  6995. // user-written render functions.
  6996. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6997. // $attrs & $listeners are exposed for easier HOC creation.
  6998. // they need to be reactive so that HOCs using them are always updated
  6999. var parentData = parentVnode && parentVnode.data;
  7000. /* istanbul ignore else */
  7001. if (true) {
  7002. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7003. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7004. }, true);
  7005. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7006. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7007. }, true);
  7008. } else {}
  7009. }
  7010. var currentRenderingInstance = null;
  7011. function renderMixin (Vue) {
  7012. // install runtime convenience helpers
  7013. installRenderHelpers(Vue.prototype);
  7014. Vue.prototype.$nextTick = function (fn) {
  7015. return nextTick(fn, this)
  7016. };
  7017. Vue.prototype._render = function () {
  7018. var vm = this;
  7019. var ref = vm.$options;
  7020. var render = ref.render;
  7021. var _parentVnode = ref._parentVnode;
  7022. if (_parentVnode) {
  7023. vm.$scopedSlots = normalizeScopedSlots(
  7024. _parentVnode.data.scopedSlots,
  7025. vm.$slots,
  7026. vm.$scopedSlots
  7027. );
  7028. }
  7029. // set parent vnode. this allows render functions to have access
  7030. // to the data on the placeholder node.
  7031. vm.$vnode = _parentVnode;
  7032. // render self
  7033. var vnode;
  7034. try {
  7035. // There's no need to maintain a stack because all render fns are called
  7036. // separately from one another. Nested component's render fns are called
  7037. // when parent component is patched.
  7038. currentRenderingInstance = vm;
  7039. vnode = render.call(vm._renderProxy, vm.$createElement);
  7040. } catch (e) {
  7041. handleError(e, vm, "render");
  7042. // return error render result,
  7043. // or previous vnode to prevent render error causing blank component
  7044. /* istanbul ignore else */
  7045. if ( true && vm.$options.renderError) {
  7046. try {
  7047. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  7048. } catch (e) {
  7049. handleError(e, vm, "renderError");
  7050. vnode = vm._vnode;
  7051. }
  7052. } else {
  7053. vnode = vm._vnode;
  7054. }
  7055. } finally {
  7056. currentRenderingInstance = null;
  7057. }
  7058. // if the returned array contains only a single node, allow it
  7059. if (Array.isArray(vnode) && vnode.length === 1) {
  7060. vnode = vnode[0];
  7061. }
  7062. // return empty vnode in case the render function errored out
  7063. if (!(vnode instanceof VNode)) {
  7064. if ( true && Array.isArray(vnode)) {
  7065. warn(
  7066. 'Multiple root nodes returned from render function. Render function ' +
  7067. 'should return a single root node.',
  7068. vm
  7069. );
  7070. }
  7071. vnode = createEmptyVNode();
  7072. }
  7073. // set parent
  7074. vnode.parent = _parentVnode;
  7075. return vnode
  7076. };
  7077. }
  7078. /* */
  7079. function ensureCtor (comp, base) {
  7080. if (
  7081. comp.__esModule ||
  7082. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  7083. ) {
  7084. comp = comp.default;
  7085. }
  7086. return isObject(comp)
  7087. ? base.extend(comp)
  7088. : comp
  7089. }
  7090. function createAsyncPlaceholder (
  7091. factory,
  7092. data,
  7093. context,
  7094. children,
  7095. tag
  7096. ) {
  7097. var node = createEmptyVNode();
  7098. node.asyncFactory = factory;
  7099. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  7100. return node
  7101. }
  7102. function resolveAsyncComponent (
  7103. factory,
  7104. baseCtor
  7105. ) {
  7106. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  7107. return factory.errorComp
  7108. }
  7109. if (isDef(factory.resolved)) {
  7110. return factory.resolved
  7111. }
  7112. var owner = currentRenderingInstance;
  7113. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  7114. // already pending
  7115. factory.owners.push(owner);
  7116. }
  7117. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  7118. return factory.loadingComp
  7119. }
  7120. if (owner && !isDef(factory.owners)) {
  7121. var owners = factory.owners = [owner];
  7122. var sync = true;
  7123. var timerLoading = null;
  7124. var timerTimeout = null
  7125. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  7126. var forceRender = function (renderCompleted) {
  7127. for (var i = 0, l = owners.length; i < l; i++) {
  7128. (owners[i]).$forceUpdate();
  7129. }
  7130. if (renderCompleted) {
  7131. owners.length = 0;
  7132. if (timerLoading !== null) {
  7133. clearTimeout(timerLoading);
  7134. timerLoading = null;
  7135. }
  7136. if (timerTimeout !== null) {
  7137. clearTimeout(timerTimeout);
  7138. timerTimeout = null;
  7139. }
  7140. }
  7141. };
  7142. var resolve = once(function (res) {
  7143. // cache resolved
  7144. factory.resolved = ensureCtor(res, baseCtor);
  7145. // invoke callbacks only if this is not a synchronous resolve
  7146. // (async resolves are shimmed as synchronous during SSR)
  7147. if (!sync) {
  7148. forceRender(true);
  7149. } else {
  7150. owners.length = 0;
  7151. }
  7152. });
  7153. var reject = once(function (reason) {
  7154. true && warn(
  7155. "Failed to resolve async component: " + (String(factory)) +
  7156. (reason ? ("\nReason: " + reason) : '')
  7157. );
  7158. if (isDef(factory.errorComp)) {
  7159. factory.error = true;
  7160. forceRender(true);
  7161. }
  7162. });
  7163. var res = factory(resolve, reject);
  7164. if (isObject(res)) {
  7165. if (isPromise(res)) {
  7166. // () => Promise
  7167. if (isUndef(factory.resolved)) {
  7168. res.then(resolve, reject);
  7169. }
  7170. } else if (isPromise(res.component)) {
  7171. res.component.then(resolve, reject);
  7172. if (isDef(res.error)) {
  7173. factory.errorComp = ensureCtor(res.error, baseCtor);
  7174. }
  7175. if (isDef(res.loading)) {
  7176. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  7177. if (res.delay === 0) {
  7178. factory.loading = true;
  7179. } else {
  7180. timerLoading = setTimeout(function () {
  7181. timerLoading = null;
  7182. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  7183. factory.loading = true;
  7184. forceRender(false);
  7185. }
  7186. }, res.delay || 200);
  7187. }
  7188. }
  7189. if (isDef(res.timeout)) {
  7190. timerTimeout = setTimeout(function () {
  7191. timerTimeout = null;
  7192. if (isUndef(factory.resolved)) {
  7193. reject(
  7194. true
  7195. ? ("timeout (" + (res.timeout) + "ms)")
  7196. : undefined
  7197. );
  7198. }
  7199. }, res.timeout);
  7200. }
  7201. }
  7202. }
  7203. sync = false;
  7204. // return in case resolved synchronously
  7205. return factory.loading
  7206. ? factory.loadingComp
  7207. : factory.resolved
  7208. }
  7209. }
  7210. /* */
  7211. function isAsyncPlaceholder (node) {
  7212. return node.isComment && node.asyncFactory
  7213. }
  7214. /* */
  7215. function getFirstComponentChild (children) {
  7216. if (Array.isArray(children)) {
  7217. for (var i = 0; i < children.length; i++) {
  7218. var c = children[i];
  7219. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  7220. return c
  7221. }
  7222. }
  7223. }
  7224. }
  7225. /* */
  7226. /* */
  7227. function initEvents (vm) {
  7228. vm._events = Object.create(null);
  7229. vm._hasHookEvent = false;
  7230. // init parent attached events
  7231. var listeners = vm.$options._parentListeners;
  7232. if (listeners) {
  7233. updateComponentListeners(vm, listeners);
  7234. }
  7235. }
  7236. var target;
  7237. function add (event, fn) {
  7238. target.$on(event, fn);
  7239. }
  7240. function remove$1 (event, fn) {
  7241. target.$off(event, fn);
  7242. }
  7243. function createOnceHandler (event, fn) {
  7244. var _target = target;
  7245. return function onceHandler () {
  7246. var res = fn.apply(null, arguments);
  7247. if (res !== null) {
  7248. _target.$off(event, onceHandler);
  7249. }
  7250. }
  7251. }
  7252. function updateComponentListeners (
  7253. vm,
  7254. listeners,
  7255. oldListeners
  7256. ) {
  7257. target = vm;
  7258. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  7259. target = undefined;
  7260. }
  7261. function eventsMixin (Vue) {
  7262. var hookRE = /^hook:/;
  7263. Vue.prototype.$on = function (event, fn) {
  7264. var vm = this;
  7265. if (Array.isArray(event)) {
  7266. for (var i = 0, l = event.length; i < l; i++) {
  7267. vm.$on(event[i], fn);
  7268. }
  7269. } else {
  7270. (vm._events[event] || (vm._events[event] = [])).push(fn);
  7271. // optimize hook:event cost by using a boolean flag marked at registration
  7272. // instead of a hash lookup
  7273. if (hookRE.test(event)) {
  7274. vm._hasHookEvent = true;
  7275. }
  7276. }
  7277. return vm
  7278. };
  7279. Vue.prototype.$once = function (event, fn) {
  7280. var vm = this;
  7281. function on () {
  7282. vm.$off(event, on);
  7283. fn.apply(vm, arguments);
  7284. }
  7285. on.fn = fn;
  7286. vm.$on(event, on);
  7287. return vm
  7288. };
  7289. Vue.prototype.$off = function (event, fn) {
  7290. var vm = this;
  7291. // all
  7292. if (!arguments.length) {
  7293. vm._events = Object.create(null);
  7294. return vm
  7295. }
  7296. // array of events
  7297. if (Array.isArray(event)) {
  7298. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  7299. vm.$off(event[i$1], fn);
  7300. }
  7301. return vm
  7302. }
  7303. // specific event
  7304. var cbs = vm._events[event];
  7305. if (!cbs) {
  7306. return vm
  7307. }
  7308. if (!fn) {
  7309. vm._events[event] = null;
  7310. return vm
  7311. }
  7312. // specific handler
  7313. var cb;
  7314. var i = cbs.length;
  7315. while (i--) {
  7316. cb = cbs[i];
  7317. if (cb === fn || cb.fn === fn) {
  7318. cbs.splice(i, 1);
  7319. break
  7320. }
  7321. }
  7322. return vm
  7323. };
  7324. Vue.prototype.$emit = function (event) {
  7325. var vm = this;
  7326. if (true) {
  7327. var lowerCaseEvent = event.toLowerCase();
  7328. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  7329. tip(
  7330. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  7331. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  7332. "Note that HTML attributes are case-insensitive and you cannot use " +
  7333. "v-on to listen to camelCase events when using in-DOM templates. " +
  7334. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  7335. );
  7336. }
  7337. }
  7338. var cbs = vm._events[event];
  7339. if (cbs) {
  7340. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  7341. var args = toArray(arguments, 1);
  7342. var info = "event handler for \"" + event + "\"";
  7343. for (var i = 0, l = cbs.length; i < l; i++) {
  7344. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  7345. }
  7346. }
  7347. return vm
  7348. };
  7349. }
  7350. /* */
  7351. var activeInstance = null;
  7352. var isUpdatingChildComponent = false;
  7353. function setActiveInstance(vm) {
  7354. var prevActiveInstance = activeInstance;
  7355. activeInstance = vm;
  7356. return function () {
  7357. activeInstance = prevActiveInstance;
  7358. }
  7359. }
  7360. function initLifecycle (vm) {
  7361. var options = vm.$options;
  7362. // locate first non-abstract parent
  7363. var parent = options.parent;
  7364. if (parent && !options.abstract) {
  7365. while (parent.$options.abstract && parent.$parent) {
  7366. parent = parent.$parent;
  7367. }
  7368. parent.$children.push(vm);
  7369. }
  7370. vm.$parent = parent;
  7371. vm.$root = parent ? parent.$root : vm;
  7372. vm.$children = [];
  7373. vm.$refs = {};
  7374. vm._watcher = null;
  7375. vm._inactive = null;
  7376. vm._directInactive = false;
  7377. vm._isMounted = false;
  7378. vm._isDestroyed = false;
  7379. vm._isBeingDestroyed = false;
  7380. }
  7381. function lifecycleMixin (Vue) {
  7382. Vue.prototype._update = function (vnode, hydrating) {
  7383. var vm = this;
  7384. var prevEl = vm.$el;
  7385. var prevVnode = vm._vnode;
  7386. var restoreActiveInstance = setActiveInstance(vm);
  7387. vm._vnode = vnode;
  7388. // Vue.prototype.__patch__ is injected in entry points
  7389. // based on the rendering backend used.
  7390. if (!prevVnode) {
  7391. // initial render
  7392. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  7393. } else {
  7394. // updates
  7395. vm.$el = vm.__patch__(prevVnode, vnode);
  7396. }
  7397. restoreActiveInstance();
  7398. // update __vue__ reference
  7399. if (prevEl) {
  7400. prevEl.__vue__ = null;
  7401. }
  7402. if (vm.$el) {
  7403. vm.$el.__vue__ = vm;
  7404. }
  7405. // if parent is an HOC, update its $el as well
  7406. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  7407. vm.$parent.$el = vm.$el;
  7408. }
  7409. // updated hook is called by the scheduler to ensure that children are
  7410. // updated in a parent's updated hook.
  7411. };
  7412. Vue.prototype.$forceUpdate = function () {
  7413. var vm = this;
  7414. if (vm._watcher) {
  7415. vm._watcher.update();
  7416. }
  7417. };
  7418. Vue.prototype.$destroy = function () {
  7419. var vm = this;
  7420. if (vm._isBeingDestroyed) {
  7421. return
  7422. }
  7423. callHook(vm, 'beforeDestroy');
  7424. vm._isBeingDestroyed = true;
  7425. // remove self from parent
  7426. var parent = vm.$parent;
  7427. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  7428. remove(parent.$children, vm);
  7429. }
  7430. // teardown watchers
  7431. if (vm._watcher) {
  7432. vm._watcher.teardown();
  7433. }
  7434. var i = vm._watchers.length;
  7435. while (i--) {
  7436. vm._watchers[i].teardown();
  7437. }
  7438. // remove reference from data ob
  7439. // frozen object may not have observer.
  7440. if (vm._data.__ob__) {
  7441. vm._data.__ob__.vmCount--;
  7442. }
  7443. // call the last hook...
  7444. vm._isDestroyed = true;
  7445. // invoke destroy hooks on current rendered tree
  7446. vm.__patch__(vm._vnode, null);
  7447. // fire destroyed hook
  7448. callHook(vm, 'destroyed');
  7449. // turn off all instance listeners.
  7450. vm.$off();
  7451. // remove __vue__ reference
  7452. if (vm.$el) {
  7453. vm.$el.__vue__ = null;
  7454. }
  7455. // release circular reference (#6759)
  7456. if (vm.$vnode) {
  7457. vm.$vnode.parent = null;
  7458. }
  7459. };
  7460. }
  7461. function updateChildComponent (
  7462. vm,
  7463. propsData,
  7464. listeners,
  7465. parentVnode,
  7466. renderChildren
  7467. ) {
  7468. if (true) {
  7469. isUpdatingChildComponent = true;
  7470. }
  7471. // determine whether component has slot children
  7472. // we need to do this before overwriting $options._renderChildren.
  7473. // check if there are dynamic scopedSlots (hand-written or compiled but with
  7474. // dynamic slot names). Static scoped slots compiled from template has the
  7475. // "$stable" marker.
  7476. var newScopedSlots = parentVnode.data.scopedSlots;
  7477. var oldScopedSlots = vm.$scopedSlots;
  7478. var hasDynamicScopedSlot = !!(
  7479. (newScopedSlots && !newScopedSlots.$stable) ||
  7480. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  7481. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  7482. );
  7483. // Any static slot children from the parent may have changed during parent's
  7484. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  7485. // update is necessary to ensure correctness.
  7486. var needsForceUpdate = !!(
  7487. renderChildren || // has new static slots
  7488. vm.$options._renderChildren || // has old static slots
  7489. hasDynamicScopedSlot
  7490. );
  7491. vm.$options._parentVnode = parentVnode;
  7492. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  7493. if (vm._vnode) { // update child tree's parent
  7494. vm._vnode.parent = parentVnode;
  7495. }
  7496. vm.$options._renderChildren = renderChildren;
  7497. // update $attrs and $listeners hash
  7498. // these are also reactive so they may trigger child update if the child
  7499. // used them during render
  7500. vm.$attrs = parentVnode.data.attrs || emptyObject;
  7501. vm.$listeners = listeners || emptyObject;
  7502. // update props
  7503. if (propsData && vm.$options.props) {
  7504. toggleObserving(false);
  7505. var props = vm._props;
  7506. var propKeys = vm.$options._propKeys || [];
  7507. for (var i = 0; i < propKeys.length; i++) {
  7508. var key = propKeys[i];
  7509. var propOptions = vm.$options.props; // wtf flow?
  7510. props[key] = validateProp(key, propOptions, propsData, vm);
  7511. }
  7512. toggleObserving(true);
  7513. // keep a copy of raw propsData
  7514. vm.$options.propsData = propsData;
  7515. }
  7516. // fixed by xxxxxx update properties(mp runtime)
  7517. vm._$updateProperties && vm._$updateProperties(vm);
  7518. // update listeners
  7519. listeners = listeners || emptyObject;
  7520. var oldListeners = vm.$options._parentListeners;
  7521. vm.$options._parentListeners = listeners;
  7522. updateComponentListeners(vm, listeners, oldListeners);
  7523. // resolve slots + force update if has children
  7524. if (needsForceUpdate) {
  7525. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7526. vm.$forceUpdate();
  7527. }
  7528. if (true) {
  7529. isUpdatingChildComponent = false;
  7530. }
  7531. }
  7532. function isInInactiveTree (vm) {
  7533. while (vm && (vm = vm.$parent)) {
  7534. if (vm._inactive) { return true }
  7535. }
  7536. return false
  7537. }
  7538. function activateChildComponent (vm, direct) {
  7539. if (direct) {
  7540. vm._directInactive = false;
  7541. if (isInInactiveTree(vm)) {
  7542. return
  7543. }
  7544. } else if (vm._directInactive) {
  7545. return
  7546. }
  7547. if (vm._inactive || vm._inactive === null) {
  7548. vm._inactive = false;
  7549. for (var i = 0; i < vm.$children.length; i++) {
  7550. activateChildComponent(vm.$children[i]);
  7551. }
  7552. callHook(vm, 'activated');
  7553. }
  7554. }
  7555. function deactivateChildComponent (vm, direct) {
  7556. if (direct) {
  7557. vm._directInactive = true;
  7558. if (isInInactiveTree(vm)) {
  7559. return
  7560. }
  7561. }
  7562. if (!vm._inactive) {
  7563. vm._inactive = true;
  7564. for (var i = 0; i < vm.$children.length; i++) {
  7565. deactivateChildComponent(vm.$children[i]);
  7566. }
  7567. callHook(vm, 'deactivated');
  7568. }
  7569. }
  7570. function callHook (vm, hook) {
  7571. // #7573 disable dep collection when invoking lifecycle hooks
  7572. pushTarget();
  7573. var handlers = vm.$options[hook];
  7574. var info = hook + " hook";
  7575. if (handlers) {
  7576. for (var i = 0, j = handlers.length; i < j; i++) {
  7577. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7578. }
  7579. }
  7580. if (vm._hasHookEvent) {
  7581. vm.$emit('hook:' + hook);
  7582. }
  7583. popTarget();
  7584. }
  7585. /* */
  7586. var MAX_UPDATE_COUNT = 100;
  7587. var queue = [];
  7588. var activatedChildren = [];
  7589. var has = {};
  7590. var circular = {};
  7591. var waiting = false;
  7592. var flushing = false;
  7593. var index = 0;
  7594. /**
  7595. * Reset the scheduler's state.
  7596. */
  7597. function resetSchedulerState () {
  7598. index = queue.length = activatedChildren.length = 0;
  7599. has = {};
  7600. if (true) {
  7601. circular = {};
  7602. }
  7603. waiting = flushing = false;
  7604. }
  7605. // Async edge case #6566 requires saving the timestamp when event listeners are
  7606. // attached. However, calling performance.now() has a perf overhead especially
  7607. // if the page has thousands of event listeners. Instead, we take a timestamp
  7608. // every time the scheduler flushes and use that for all event listeners
  7609. // attached during that flush.
  7610. var currentFlushTimestamp = 0;
  7611. // Async edge case fix requires storing an event listener's attach timestamp.
  7612. var getNow = Date.now;
  7613. // Determine what event timestamp the browser is using. Annoyingly, the
  7614. // timestamp can either be hi-res (relative to page load) or low-res
  7615. // (relative to UNIX epoch), so in order to compare time we have to use the
  7616. // same timestamp type when saving the flush timestamp.
  7617. // All IE versions use low-res event timestamps, and have problematic clock
  7618. // implementations (#9632)
  7619. if (inBrowser && !isIE) {
  7620. var performance = window.performance;
  7621. if (
  7622. performance &&
  7623. typeof performance.now === 'function' &&
  7624. getNow() > document.createEvent('Event').timeStamp
  7625. ) {
  7626. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7627. // smaller than it, it means the event is using a hi-res timestamp,
  7628. // and we need to use the hi-res version for event listener timestamps as
  7629. // well.
  7630. getNow = function () { return performance.now(); };
  7631. }
  7632. }
  7633. /**
  7634. * Flush both queues and run the watchers.
  7635. */
  7636. function flushSchedulerQueue () {
  7637. currentFlushTimestamp = getNow();
  7638. flushing = true;
  7639. var watcher, id;
  7640. // Sort queue before flush.
  7641. // This ensures that:
  7642. // 1. Components are updated from parent to child. (because parent is always
  7643. // created before the child)
  7644. // 2. A component's user watchers are run before its render watcher (because
  7645. // user watchers are created before the render watcher)
  7646. // 3. If a component is destroyed during a parent component's watcher run,
  7647. // its watchers can be skipped.
  7648. queue.sort(function (a, b) { return a.id - b.id; });
  7649. // do not cache length because more watchers might be pushed
  7650. // as we run existing watchers
  7651. for (index = 0; index < queue.length; index++) {
  7652. watcher = queue[index];
  7653. if (watcher.before) {
  7654. watcher.before();
  7655. }
  7656. id = watcher.id;
  7657. has[id] = null;
  7658. watcher.run();
  7659. // in dev build, check and stop circular updates.
  7660. if ( true && has[id] != null) {
  7661. circular[id] = (circular[id] || 0) + 1;
  7662. if (circular[id] > MAX_UPDATE_COUNT) {
  7663. warn(
  7664. 'You may have an infinite update loop ' + (
  7665. watcher.user
  7666. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7667. : "in a component render function."
  7668. ),
  7669. watcher.vm
  7670. );
  7671. break
  7672. }
  7673. }
  7674. }
  7675. // keep copies of post queues before resetting state
  7676. var activatedQueue = activatedChildren.slice();
  7677. var updatedQueue = queue.slice();
  7678. resetSchedulerState();
  7679. // call component updated and activated hooks
  7680. callActivatedHooks(activatedQueue);
  7681. callUpdatedHooks(updatedQueue);
  7682. // devtool hook
  7683. /* istanbul ignore if */
  7684. if (devtools && config.devtools) {
  7685. devtools.emit('flush');
  7686. }
  7687. }
  7688. function callUpdatedHooks (queue) {
  7689. var i = queue.length;
  7690. while (i--) {
  7691. var watcher = queue[i];
  7692. var vm = watcher.vm;
  7693. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7694. callHook(vm, 'updated');
  7695. }
  7696. }
  7697. }
  7698. /**
  7699. * Queue a kept-alive component that was activated during patch.
  7700. * The queue will be processed after the entire tree has been patched.
  7701. */
  7702. function queueActivatedComponent (vm) {
  7703. // setting _inactive to false here so that a render function can
  7704. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7705. vm._inactive = false;
  7706. activatedChildren.push(vm);
  7707. }
  7708. function callActivatedHooks (queue) {
  7709. for (var i = 0; i < queue.length; i++) {
  7710. queue[i]._inactive = true;
  7711. activateChildComponent(queue[i], true /* true */);
  7712. }
  7713. }
  7714. /**
  7715. * Push a watcher into the watcher queue.
  7716. * Jobs with duplicate IDs will be skipped unless it's
  7717. * pushed when the queue is being flushed.
  7718. */
  7719. function queueWatcher (watcher) {
  7720. var id = watcher.id;
  7721. if (has[id] == null) {
  7722. has[id] = true;
  7723. if (!flushing) {
  7724. queue.push(watcher);
  7725. } else {
  7726. // if already flushing, splice the watcher based on its id
  7727. // if already past its id, it will be run next immediately.
  7728. var i = queue.length - 1;
  7729. while (i > index && queue[i].id > watcher.id) {
  7730. i--;
  7731. }
  7732. queue.splice(i + 1, 0, watcher);
  7733. }
  7734. // queue the flush
  7735. if (!waiting) {
  7736. waiting = true;
  7737. if ( true && !config.async) {
  7738. flushSchedulerQueue();
  7739. return
  7740. }
  7741. nextTick(flushSchedulerQueue);
  7742. }
  7743. }
  7744. }
  7745. /* */
  7746. var uid$2 = 0;
  7747. /**
  7748. * A watcher parses an expression, collects dependencies,
  7749. * and fires callback when the expression value changes.
  7750. * This is used for both the $watch() api and directives.
  7751. */
  7752. var Watcher = function Watcher (
  7753. vm,
  7754. expOrFn,
  7755. cb,
  7756. options,
  7757. isRenderWatcher
  7758. ) {
  7759. this.vm = vm;
  7760. if (isRenderWatcher) {
  7761. vm._watcher = this;
  7762. }
  7763. vm._watchers.push(this);
  7764. // options
  7765. if (options) {
  7766. this.deep = !!options.deep;
  7767. this.user = !!options.user;
  7768. this.lazy = !!options.lazy;
  7769. this.sync = !!options.sync;
  7770. this.before = options.before;
  7771. } else {
  7772. this.deep = this.user = this.lazy = this.sync = false;
  7773. }
  7774. this.cb = cb;
  7775. this.id = ++uid$2; // uid for batching
  7776. this.active = true;
  7777. this.dirty = this.lazy; // for lazy watchers
  7778. this.deps = [];
  7779. this.newDeps = [];
  7780. this.depIds = new _Set();
  7781. this.newDepIds = new _Set();
  7782. this.expression = true
  7783. ? expOrFn.toString()
  7784. : undefined;
  7785. // parse expression for getter
  7786. if (typeof expOrFn === 'function') {
  7787. this.getter = expOrFn;
  7788. } else {
  7789. this.getter = parsePath(expOrFn);
  7790. if (!this.getter) {
  7791. this.getter = noop;
  7792. true && warn(
  7793. "Failed watching path: \"" + expOrFn + "\" " +
  7794. 'Watcher only accepts simple dot-delimited paths. ' +
  7795. 'For full control, use a function instead.',
  7796. vm
  7797. );
  7798. }
  7799. }
  7800. this.value = this.lazy
  7801. ? undefined
  7802. : this.get();
  7803. };
  7804. /**
  7805. * Evaluate the getter, and re-collect dependencies.
  7806. */
  7807. Watcher.prototype.get = function get () {
  7808. pushTarget(this);
  7809. var value;
  7810. var vm = this.vm;
  7811. try {
  7812. value = this.getter.call(vm, vm);
  7813. } catch (e) {
  7814. if (this.user) {
  7815. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7816. } else {
  7817. throw e
  7818. }
  7819. } finally {
  7820. // "touch" every property so they are all tracked as
  7821. // dependencies for deep watching
  7822. if (this.deep) {
  7823. traverse(value);
  7824. }
  7825. popTarget();
  7826. this.cleanupDeps();
  7827. }
  7828. return value
  7829. };
  7830. /**
  7831. * Add a dependency to this directive.
  7832. */
  7833. Watcher.prototype.addDep = function addDep (dep) {
  7834. var id = dep.id;
  7835. if (!this.newDepIds.has(id)) {
  7836. this.newDepIds.add(id);
  7837. this.newDeps.push(dep);
  7838. if (!this.depIds.has(id)) {
  7839. dep.addSub(this);
  7840. }
  7841. }
  7842. };
  7843. /**
  7844. * Clean up for dependency collection.
  7845. */
  7846. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7847. var i = this.deps.length;
  7848. while (i--) {
  7849. var dep = this.deps[i];
  7850. if (!this.newDepIds.has(dep.id)) {
  7851. dep.removeSub(this);
  7852. }
  7853. }
  7854. var tmp = this.depIds;
  7855. this.depIds = this.newDepIds;
  7856. this.newDepIds = tmp;
  7857. this.newDepIds.clear();
  7858. tmp = this.deps;
  7859. this.deps = this.newDeps;
  7860. this.newDeps = tmp;
  7861. this.newDeps.length = 0;
  7862. };
  7863. /**
  7864. * Subscriber interface.
  7865. * Will be called when a dependency changes.
  7866. */
  7867. Watcher.prototype.update = function update () {
  7868. /* istanbul ignore else */
  7869. if (this.lazy) {
  7870. this.dirty = true;
  7871. } else if (this.sync) {
  7872. this.run();
  7873. } else {
  7874. queueWatcher(this);
  7875. }
  7876. };
  7877. /**
  7878. * Scheduler job interface.
  7879. * Will be called by the scheduler.
  7880. */
  7881. Watcher.prototype.run = function run () {
  7882. if (this.active) {
  7883. var value = this.get();
  7884. if (
  7885. value !== this.value ||
  7886. // Deep watchers and watchers on Object/Arrays should fire even
  7887. // when the value is the same, because the value may
  7888. // have mutated.
  7889. isObject(value) ||
  7890. this.deep
  7891. ) {
  7892. // set new value
  7893. var oldValue = this.value;
  7894. this.value = value;
  7895. if (this.user) {
  7896. try {
  7897. this.cb.call(this.vm, value, oldValue);
  7898. } catch (e) {
  7899. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7900. }
  7901. } else {
  7902. this.cb.call(this.vm, value, oldValue);
  7903. }
  7904. }
  7905. }
  7906. };
  7907. /**
  7908. * Evaluate the value of the watcher.
  7909. * This only gets called for lazy watchers.
  7910. */
  7911. Watcher.prototype.evaluate = function evaluate () {
  7912. this.value = this.get();
  7913. this.dirty = false;
  7914. };
  7915. /**
  7916. * Depend on all deps collected by this watcher.
  7917. */
  7918. Watcher.prototype.depend = function depend () {
  7919. var i = this.deps.length;
  7920. while (i--) {
  7921. this.deps[i].depend();
  7922. }
  7923. };
  7924. /**
  7925. * Remove self from all dependencies' subscriber list.
  7926. */
  7927. Watcher.prototype.teardown = function teardown () {
  7928. if (this.active) {
  7929. // remove self from vm's watcher list
  7930. // this is a somewhat expensive operation so we skip it
  7931. // if the vm is being destroyed.
  7932. if (!this.vm._isBeingDestroyed) {
  7933. remove(this.vm._watchers, this);
  7934. }
  7935. var i = this.deps.length;
  7936. while (i--) {
  7937. this.deps[i].removeSub(this);
  7938. }
  7939. this.active = false;
  7940. }
  7941. };
  7942. /* */
  7943. var sharedPropertyDefinition = {
  7944. enumerable: true,
  7945. configurable: true,
  7946. get: noop,
  7947. set: noop
  7948. };
  7949. function proxy (target, sourceKey, key) {
  7950. sharedPropertyDefinition.get = function proxyGetter () {
  7951. return this[sourceKey][key]
  7952. };
  7953. sharedPropertyDefinition.set = function proxySetter (val) {
  7954. this[sourceKey][key] = val;
  7955. };
  7956. Object.defineProperty(target, key, sharedPropertyDefinition);
  7957. }
  7958. function initState (vm) {
  7959. vm._watchers = [];
  7960. var opts = vm.$options;
  7961. if (opts.props) { initProps(vm, opts.props); }
  7962. if (opts.methods) { initMethods(vm, opts.methods); }
  7963. if (opts.data) {
  7964. initData(vm);
  7965. } else {
  7966. observe(vm._data = {}, true /* asRootData */);
  7967. }
  7968. if (opts.computed) { initComputed(vm, opts.computed); }
  7969. if (opts.watch && opts.watch !== nativeWatch) {
  7970. initWatch(vm, opts.watch);
  7971. }
  7972. }
  7973. function initProps (vm, propsOptions) {
  7974. var propsData = vm.$options.propsData || {};
  7975. var props = vm._props = {};
  7976. // cache prop keys so that future props updates can iterate using Array
  7977. // instead of dynamic object key enumeration.
  7978. var keys = vm.$options._propKeys = [];
  7979. var isRoot = !vm.$parent;
  7980. // root instance props should be converted
  7981. if (!isRoot) {
  7982. toggleObserving(false);
  7983. }
  7984. var loop = function ( key ) {
  7985. keys.push(key);
  7986. var value = validateProp(key, propsOptions, propsData, vm);
  7987. /* istanbul ignore else */
  7988. if (true) {
  7989. var hyphenatedKey = hyphenate(key);
  7990. if (isReservedAttribute(hyphenatedKey) ||
  7991. config.isReservedAttr(hyphenatedKey)) {
  7992. warn(
  7993. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7994. vm
  7995. );
  7996. }
  7997. defineReactive$$1(props, key, value, function () {
  7998. if (!isRoot && !isUpdatingChildComponent) {
  7999. {
  8000. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  8001. return
  8002. }
  8003. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8004. if(
  8005. key === 'value' &&
  8006. Array.isArray(vm.$options.behaviors) &&
  8007. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8008. ){
  8009. return
  8010. }
  8011. if(vm._getFormData){
  8012. return
  8013. }
  8014. var $parent = vm.$parent;
  8015. while($parent){
  8016. if($parent.__next_tick_pending){
  8017. return
  8018. }
  8019. $parent = $parent.$parent;
  8020. }
  8021. }
  8022. warn(
  8023. "Avoid mutating a prop directly since the value will be " +
  8024. "overwritten whenever the parent component re-renders. " +
  8025. "Instead, use a data or computed property based on the prop's " +
  8026. "value. Prop being mutated: \"" + key + "\"",
  8027. vm
  8028. );
  8029. }
  8030. });
  8031. } else {}
  8032. // static props are already proxied on the component's prototype
  8033. // during Vue.extend(). We only need to proxy props defined at
  8034. // instantiation here.
  8035. if (!(key in vm)) {
  8036. proxy(vm, "_props", key);
  8037. }
  8038. };
  8039. for (var key in propsOptions) loop( key );
  8040. toggleObserving(true);
  8041. }
  8042. function initData (vm) {
  8043. var data = vm.$options.data;
  8044. data = vm._data = typeof data === 'function'
  8045. ? getData(data, vm)
  8046. : data || {};
  8047. if (!isPlainObject(data)) {
  8048. data = {};
  8049. true && warn(
  8050. 'data functions should return an object:\n' +
  8051. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  8052. vm
  8053. );
  8054. }
  8055. // proxy data on instance
  8056. var keys = Object.keys(data);
  8057. var props = vm.$options.props;
  8058. var methods = vm.$options.methods;
  8059. var i = keys.length;
  8060. while (i--) {
  8061. var key = keys[i];
  8062. if (true) {
  8063. if (methods && hasOwn(methods, key)) {
  8064. warn(
  8065. ("Method \"" + key + "\" has already been defined as a data property."),
  8066. vm
  8067. );
  8068. }
  8069. }
  8070. if (props && hasOwn(props, key)) {
  8071. true && warn(
  8072. "The data property \"" + key + "\" is already declared as a prop. " +
  8073. "Use prop default value instead.",
  8074. vm
  8075. );
  8076. } else if (!isReserved(key)) {
  8077. proxy(vm, "_data", key);
  8078. }
  8079. }
  8080. // observe data
  8081. observe(data, true /* asRootData */);
  8082. }
  8083. function getData (data, vm) {
  8084. // #7573 disable dep collection when invoking data getters
  8085. pushTarget();
  8086. try {
  8087. return data.call(vm, vm)
  8088. } catch (e) {
  8089. handleError(e, vm, "data()");
  8090. return {}
  8091. } finally {
  8092. popTarget();
  8093. }
  8094. }
  8095. var computedWatcherOptions = { lazy: true };
  8096. function initComputed (vm, computed) {
  8097. // $flow-disable-line
  8098. var watchers = vm._computedWatchers = Object.create(null);
  8099. // computed properties are just getters during SSR
  8100. var isSSR = isServerRendering();
  8101. for (var key in computed) {
  8102. var userDef = computed[key];
  8103. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  8104. if ( true && getter == null) {
  8105. warn(
  8106. ("Getter is missing for computed property \"" + key + "\"."),
  8107. vm
  8108. );
  8109. }
  8110. if (!isSSR) {
  8111. // create internal watcher for the computed property.
  8112. watchers[key] = new Watcher(
  8113. vm,
  8114. getter || noop,
  8115. noop,
  8116. computedWatcherOptions
  8117. );
  8118. }
  8119. // component-defined computed properties are already defined on the
  8120. // component prototype. We only need to define computed properties defined
  8121. // at instantiation here.
  8122. if (!(key in vm)) {
  8123. defineComputed(vm, key, userDef);
  8124. } else if (true) {
  8125. if (key in vm.$data) {
  8126. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  8127. } else if (vm.$options.props && key in vm.$options.props) {
  8128. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  8129. }
  8130. }
  8131. }
  8132. }
  8133. function defineComputed (
  8134. target,
  8135. key,
  8136. userDef
  8137. ) {
  8138. var shouldCache = !isServerRendering();
  8139. if (typeof userDef === 'function') {
  8140. sharedPropertyDefinition.get = shouldCache
  8141. ? createComputedGetter(key)
  8142. : createGetterInvoker(userDef);
  8143. sharedPropertyDefinition.set = noop;
  8144. } else {
  8145. sharedPropertyDefinition.get = userDef.get
  8146. ? shouldCache && userDef.cache !== false
  8147. ? createComputedGetter(key)
  8148. : createGetterInvoker(userDef.get)
  8149. : noop;
  8150. sharedPropertyDefinition.set = userDef.set || noop;
  8151. }
  8152. if ( true &&
  8153. sharedPropertyDefinition.set === noop) {
  8154. sharedPropertyDefinition.set = function () {
  8155. warn(
  8156. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  8157. this
  8158. );
  8159. };
  8160. }
  8161. Object.defineProperty(target, key, sharedPropertyDefinition);
  8162. }
  8163. function createComputedGetter (key) {
  8164. return function computedGetter () {
  8165. var watcher = this._computedWatchers && this._computedWatchers[key];
  8166. if (watcher) {
  8167. if (watcher.dirty) {
  8168. watcher.evaluate();
  8169. }
  8170. if (Dep.SharedObject.target) {// fixed by xxxxxx
  8171. watcher.depend();
  8172. }
  8173. return watcher.value
  8174. }
  8175. }
  8176. }
  8177. function createGetterInvoker(fn) {
  8178. return function computedGetter () {
  8179. return fn.call(this, this)
  8180. }
  8181. }
  8182. function initMethods (vm, methods) {
  8183. var props = vm.$options.props;
  8184. for (var key in methods) {
  8185. if (true) {
  8186. if (typeof methods[key] !== 'function') {
  8187. warn(
  8188. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  8189. "Did you reference the function correctly?",
  8190. vm
  8191. );
  8192. }
  8193. if (props && hasOwn(props, key)) {
  8194. warn(
  8195. ("Method \"" + key + "\" has already been defined as a prop."),
  8196. vm
  8197. );
  8198. }
  8199. if ((key in vm) && isReserved(key)) {
  8200. warn(
  8201. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  8202. "Avoid defining component methods that start with _ or $."
  8203. );
  8204. }
  8205. }
  8206. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  8207. }
  8208. }
  8209. function initWatch (vm, watch) {
  8210. for (var key in watch) {
  8211. var handler = watch[key];
  8212. if (Array.isArray(handler)) {
  8213. for (var i = 0; i < handler.length; i++) {
  8214. createWatcher(vm, key, handler[i]);
  8215. }
  8216. } else {
  8217. createWatcher(vm, key, handler);
  8218. }
  8219. }
  8220. }
  8221. function createWatcher (
  8222. vm,
  8223. expOrFn,
  8224. handler,
  8225. options
  8226. ) {
  8227. if (isPlainObject(handler)) {
  8228. options = handler;
  8229. handler = handler.handler;
  8230. }
  8231. if (typeof handler === 'string') {
  8232. handler = vm[handler];
  8233. }
  8234. return vm.$watch(expOrFn, handler, options)
  8235. }
  8236. function stateMixin (Vue) {
  8237. // flow somehow has problems with directly declared definition object
  8238. // when using Object.defineProperty, so we have to procedurally build up
  8239. // the object here.
  8240. var dataDef = {};
  8241. dataDef.get = function () { return this._data };
  8242. var propsDef = {};
  8243. propsDef.get = function () { return this._props };
  8244. if (true) {
  8245. dataDef.set = function () {
  8246. warn(
  8247. 'Avoid replacing instance root $data. ' +
  8248. 'Use nested data properties instead.',
  8249. this
  8250. );
  8251. };
  8252. propsDef.set = function () {
  8253. warn("$props is readonly.", this);
  8254. };
  8255. }
  8256. Object.defineProperty(Vue.prototype, '$data', dataDef);
  8257. Object.defineProperty(Vue.prototype, '$props', propsDef);
  8258. Vue.prototype.$set = set;
  8259. Vue.prototype.$delete = del;
  8260. Vue.prototype.$watch = function (
  8261. expOrFn,
  8262. cb,
  8263. options
  8264. ) {
  8265. var vm = this;
  8266. if (isPlainObject(cb)) {
  8267. return createWatcher(vm, expOrFn, cb, options)
  8268. }
  8269. options = options || {};
  8270. options.user = true;
  8271. var watcher = new Watcher(vm, expOrFn, cb, options);
  8272. if (options.immediate) {
  8273. try {
  8274. cb.call(vm, watcher.value);
  8275. } catch (error) {
  8276. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  8277. }
  8278. }
  8279. return function unwatchFn () {
  8280. watcher.teardown();
  8281. }
  8282. };
  8283. }
  8284. /* */
  8285. var uid$3 = 0;
  8286. function initMixin (Vue) {
  8287. Vue.prototype._init = function (options) {
  8288. var vm = this;
  8289. // a uid
  8290. vm._uid = uid$3++;
  8291. var startTag, endTag;
  8292. /* istanbul ignore if */
  8293. if ( true && config.performance && mark) {
  8294. startTag = "vue-perf-start:" + (vm._uid);
  8295. endTag = "vue-perf-end:" + (vm._uid);
  8296. mark(startTag);
  8297. }
  8298. // a flag to avoid this being observed
  8299. vm._isVue = true;
  8300. // merge options
  8301. if (options && options._isComponent) {
  8302. // optimize internal component instantiation
  8303. // since dynamic options merging is pretty slow, and none of the
  8304. // internal component options needs special treatment.
  8305. initInternalComponent(vm, options);
  8306. } else {
  8307. vm.$options = mergeOptions(
  8308. resolveConstructorOptions(vm.constructor),
  8309. options || {},
  8310. vm
  8311. );
  8312. }
  8313. /* istanbul ignore else */
  8314. if (true) {
  8315. initProxy(vm);
  8316. } else {}
  8317. // expose real self
  8318. vm._self = vm;
  8319. initLifecycle(vm);
  8320. initEvents(vm);
  8321. initRender(vm);
  8322. callHook(vm, 'beforeCreate');
  8323. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  8324. initState(vm);
  8325. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  8326. !vm._$fallback && callHook(vm, 'created');
  8327. /* istanbul ignore if */
  8328. if ( true && config.performance && mark) {
  8329. vm._name = formatComponentName(vm, false);
  8330. mark(endTag);
  8331. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  8332. }
  8333. if (vm.$options.el) {
  8334. vm.$mount(vm.$options.el);
  8335. }
  8336. };
  8337. }
  8338. function initInternalComponent (vm, options) {
  8339. var opts = vm.$options = Object.create(vm.constructor.options);
  8340. // doing this because it's faster than dynamic enumeration.
  8341. var parentVnode = options._parentVnode;
  8342. opts.parent = options.parent;
  8343. opts._parentVnode = parentVnode;
  8344. var vnodeComponentOptions = parentVnode.componentOptions;
  8345. opts.propsData = vnodeComponentOptions.propsData;
  8346. opts._parentListeners = vnodeComponentOptions.listeners;
  8347. opts._renderChildren = vnodeComponentOptions.children;
  8348. opts._componentTag = vnodeComponentOptions.tag;
  8349. if (options.render) {
  8350. opts.render = options.render;
  8351. opts.staticRenderFns = options.staticRenderFns;
  8352. }
  8353. }
  8354. function resolveConstructorOptions (Ctor) {
  8355. var options = Ctor.options;
  8356. if (Ctor.super) {
  8357. var superOptions = resolveConstructorOptions(Ctor.super);
  8358. var cachedSuperOptions = Ctor.superOptions;
  8359. if (superOptions !== cachedSuperOptions) {
  8360. // super option changed,
  8361. // need to resolve new options.
  8362. Ctor.superOptions = superOptions;
  8363. // check if there are any late-modified/attached options (#4976)
  8364. var modifiedOptions = resolveModifiedOptions(Ctor);
  8365. // update base extend options
  8366. if (modifiedOptions) {
  8367. extend(Ctor.extendOptions, modifiedOptions);
  8368. }
  8369. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  8370. if (options.name) {
  8371. options.components[options.name] = Ctor;
  8372. }
  8373. }
  8374. }
  8375. return options
  8376. }
  8377. function resolveModifiedOptions (Ctor) {
  8378. var modified;
  8379. var latest = Ctor.options;
  8380. var sealed = Ctor.sealedOptions;
  8381. for (var key in latest) {
  8382. if (latest[key] !== sealed[key]) {
  8383. if (!modified) { modified = {}; }
  8384. modified[key] = latest[key];
  8385. }
  8386. }
  8387. return modified
  8388. }
  8389. function Vue (options) {
  8390. if ( true &&
  8391. !(this instanceof Vue)
  8392. ) {
  8393. warn('Vue is a constructor and should be called with the `new` keyword');
  8394. }
  8395. this._init(options);
  8396. }
  8397. initMixin(Vue);
  8398. stateMixin(Vue);
  8399. eventsMixin(Vue);
  8400. lifecycleMixin(Vue);
  8401. renderMixin(Vue);
  8402. /* */
  8403. function initUse (Vue) {
  8404. Vue.use = function (plugin) {
  8405. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  8406. if (installedPlugins.indexOf(plugin) > -1) {
  8407. return this
  8408. }
  8409. // additional parameters
  8410. var args = toArray(arguments, 1);
  8411. args.unshift(this);
  8412. if (typeof plugin.install === 'function') {
  8413. plugin.install.apply(plugin, args);
  8414. } else if (typeof plugin === 'function') {
  8415. plugin.apply(null, args);
  8416. }
  8417. installedPlugins.push(plugin);
  8418. return this
  8419. };
  8420. }
  8421. /* */
  8422. function initMixin$1 (Vue) {
  8423. Vue.mixin = function (mixin) {
  8424. this.options = mergeOptions(this.options, mixin);
  8425. return this
  8426. };
  8427. }
  8428. /* */
  8429. function initExtend (Vue) {
  8430. /**
  8431. * Each instance constructor, including Vue, has a unique
  8432. * cid. This enables us to create wrapped "child
  8433. * constructors" for prototypal inheritance and cache them.
  8434. */
  8435. Vue.cid = 0;
  8436. var cid = 1;
  8437. /**
  8438. * Class inheritance
  8439. */
  8440. Vue.extend = function (extendOptions) {
  8441. extendOptions = extendOptions || {};
  8442. var Super = this;
  8443. var SuperId = Super.cid;
  8444. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  8445. if (cachedCtors[SuperId]) {
  8446. return cachedCtors[SuperId]
  8447. }
  8448. var name = extendOptions.name || Super.options.name;
  8449. if ( true && name) {
  8450. validateComponentName(name);
  8451. }
  8452. var Sub = function VueComponent (options) {
  8453. this._init(options);
  8454. };
  8455. Sub.prototype = Object.create(Super.prototype);
  8456. Sub.prototype.constructor = Sub;
  8457. Sub.cid = cid++;
  8458. Sub.options = mergeOptions(
  8459. Super.options,
  8460. extendOptions
  8461. );
  8462. Sub['super'] = Super;
  8463. // For props and computed properties, we define the proxy getters on
  8464. // the Vue instances at extension time, on the extended prototype. This
  8465. // avoids Object.defineProperty calls for each instance created.
  8466. if (Sub.options.props) {
  8467. initProps$1(Sub);
  8468. }
  8469. if (Sub.options.computed) {
  8470. initComputed$1(Sub);
  8471. }
  8472. // allow further extension/mixin/plugin usage
  8473. Sub.extend = Super.extend;
  8474. Sub.mixin = Super.mixin;
  8475. Sub.use = Super.use;
  8476. // create asset registers, so extended classes
  8477. // can have their private assets too.
  8478. ASSET_TYPES.forEach(function (type) {
  8479. Sub[type] = Super[type];
  8480. });
  8481. // enable recursive self-lookup
  8482. if (name) {
  8483. Sub.options.components[name] = Sub;
  8484. }
  8485. // keep a reference to the super options at extension time.
  8486. // later at instantiation we can check if Super's options have
  8487. // been updated.
  8488. Sub.superOptions = Super.options;
  8489. Sub.extendOptions = extendOptions;
  8490. Sub.sealedOptions = extend({}, Sub.options);
  8491. // cache constructor
  8492. cachedCtors[SuperId] = Sub;
  8493. return Sub
  8494. };
  8495. }
  8496. function initProps$1 (Comp) {
  8497. var props = Comp.options.props;
  8498. for (var key in props) {
  8499. proxy(Comp.prototype, "_props", key);
  8500. }
  8501. }
  8502. function initComputed$1 (Comp) {
  8503. var computed = Comp.options.computed;
  8504. for (var key in computed) {
  8505. defineComputed(Comp.prototype, key, computed[key]);
  8506. }
  8507. }
  8508. /* */
  8509. function initAssetRegisters (Vue) {
  8510. /**
  8511. * Create asset registration methods.
  8512. */
  8513. ASSET_TYPES.forEach(function (type) {
  8514. Vue[type] = function (
  8515. id,
  8516. definition
  8517. ) {
  8518. if (!definition) {
  8519. return this.options[type + 's'][id]
  8520. } else {
  8521. /* istanbul ignore if */
  8522. if ( true && type === 'component') {
  8523. validateComponentName(id);
  8524. }
  8525. if (type === 'component' && isPlainObject(definition)) {
  8526. definition.name = definition.name || id;
  8527. definition = this.options._base.extend(definition);
  8528. }
  8529. if (type === 'directive' && typeof definition === 'function') {
  8530. definition = { bind: definition, update: definition };
  8531. }
  8532. this.options[type + 's'][id] = definition;
  8533. return definition
  8534. }
  8535. };
  8536. });
  8537. }
  8538. /* */
  8539. function getComponentName (opts) {
  8540. return opts && (opts.Ctor.options.name || opts.tag)
  8541. }
  8542. function matches (pattern, name) {
  8543. if (Array.isArray(pattern)) {
  8544. return pattern.indexOf(name) > -1
  8545. } else if (typeof pattern === 'string') {
  8546. return pattern.split(',').indexOf(name) > -1
  8547. } else if (isRegExp(pattern)) {
  8548. return pattern.test(name)
  8549. }
  8550. /* istanbul ignore next */
  8551. return false
  8552. }
  8553. function pruneCache (keepAliveInstance, filter) {
  8554. var cache = keepAliveInstance.cache;
  8555. var keys = keepAliveInstance.keys;
  8556. var _vnode = keepAliveInstance._vnode;
  8557. for (var key in cache) {
  8558. var cachedNode = cache[key];
  8559. if (cachedNode) {
  8560. var name = getComponentName(cachedNode.componentOptions);
  8561. if (name && !filter(name)) {
  8562. pruneCacheEntry(cache, key, keys, _vnode);
  8563. }
  8564. }
  8565. }
  8566. }
  8567. function pruneCacheEntry (
  8568. cache,
  8569. key,
  8570. keys,
  8571. current
  8572. ) {
  8573. var cached$$1 = cache[key];
  8574. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8575. cached$$1.componentInstance.$destroy();
  8576. }
  8577. cache[key] = null;
  8578. remove(keys, key);
  8579. }
  8580. var patternTypes = [String, RegExp, Array];
  8581. var KeepAlive = {
  8582. name: 'keep-alive',
  8583. abstract: true,
  8584. props: {
  8585. include: patternTypes,
  8586. exclude: patternTypes,
  8587. max: [String, Number]
  8588. },
  8589. created: function created () {
  8590. this.cache = Object.create(null);
  8591. this.keys = [];
  8592. },
  8593. destroyed: function destroyed () {
  8594. for (var key in this.cache) {
  8595. pruneCacheEntry(this.cache, key, this.keys);
  8596. }
  8597. },
  8598. mounted: function mounted () {
  8599. var this$1 = this;
  8600. this.$watch('include', function (val) {
  8601. pruneCache(this$1, function (name) { return matches(val, name); });
  8602. });
  8603. this.$watch('exclude', function (val) {
  8604. pruneCache(this$1, function (name) { return !matches(val, name); });
  8605. });
  8606. },
  8607. render: function render () {
  8608. var slot = this.$slots.default;
  8609. var vnode = getFirstComponentChild(slot);
  8610. var componentOptions = vnode && vnode.componentOptions;
  8611. if (componentOptions) {
  8612. // check pattern
  8613. var name = getComponentName(componentOptions);
  8614. var ref = this;
  8615. var include = ref.include;
  8616. var exclude = ref.exclude;
  8617. if (
  8618. // not included
  8619. (include && (!name || !matches(include, name))) ||
  8620. // excluded
  8621. (exclude && name && matches(exclude, name))
  8622. ) {
  8623. return vnode
  8624. }
  8625. var ref$1 = this;
  8626. var cache = ref$1.cache;
  8627. var keys = ref$1.keys;
  8628. var key = vnode.key == null
  8629. // same constructor may get registered as different local components
  8630. // so cid alone is not enough (#3269)
  8631. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8632. : vnode.key;
  8633. if (cache[key]) {
  8634. vnode.componentInstance = cache[key].componentInstance;
  8635. // make current key freshest
  8636. remove(keys, key);
  8637. keys.push(key);
  8638. } else {
  8639. cache[key] = vnode;
  8640. keys.push(key);
  8641. // prune oldest entry
  8642. if (this.max && keys.length > parseInt(this.max)) {
  8643. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8644. }
  8645. }
  8646. vnode.data.keepAlive = true;
  8647. }
  8648. return vnode || (slot && slot[0])
  8649. }
  8650. };
  8651. var builtInComponents = {
  8652. KeepAlive: KeepAlive
  8653. };
  8654. /* */
  8655. function initGlobalAPI (Vue) {
  8656. // config
  8657. var configDef = {};
  8658. configDef.get = function () { return config; };
  8659. if (true) {
  8660. configDef.set = function () {
  8661. warn(
  8662. 'Do not replace the Vue.config object, set individual fields instead.'
  8663. );
  8664. };
  8665. }
  8666. Object.defineProperty(Vue, 'config', configDef);
  8667. // exposed util methods.
  8668. // NOTE: these are not considered part of the public API - avoid relying on
  8669. // them unless you are aware of the risk.
  8670. Vue.util = {
  8671. warn: warn,
  8672. extend: extend,
  8673. mergeOptions: mergeOptions,
  8674. defineReactive: defineReactive$$1
  8675. };
  8676. Vue.set = set;
  8677. Vue.delete = del;
  8678. Vue.nextTick = nextTick;
  8679. // 2.6 explicit observable API
  8680. Vue.observable = function (obj) {
  8681. observe(obj);
  8682. return obj
  8683. };
  8684. Vue.options = Object.create(null);
  8685. ASSET_TYPES.forEach(function (type) {
  8686. Vue.options[type + 's'] = Object.create(null);
  8687. });
  8688. // this is used to identify the "base" constructor to extend all plain-object
  8689. // components with in Weex's multi-instance scenarios.
  8690. Vue.options._base = Vue;
  8691. extend(Vue.options.components, builtInComponents);
  8692. initUse(Vue);
  8693. initMixin$1(Vue);
  8694. initExtend(Vue);
  8695. initAssetRegisters(Vue);
  8696. }
  8697. initGlobalAPI(Vue);
  8698. Object.defineProperty(Vue.prototype, '$isServer', {
  8699. get: isServerRendering
  8700. });
  8701. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8702. get: function get () {
  8703. /* istanbul ignore next */
  8704. return this.$vnode && this.$vnode.ssrContext
  8705. }
  8706. });
  8707. // expose FunctionalRenderContext for ssr runtime helper installation
  8708. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8709. value: FunctionalRenderContext
  8710. });
  8711. Vue.version = '2.6.11';
  8712. /**
  8713. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8714. */
  8715. var ARRAYTYPE = '[object Array]';
  8716. var OBJECTTYPE = '[object Object]';
  8717. var NULLTYPE = '[object Null]';
  8718. var UNDEFINEDTYPE = '[object Undefined]';
  8719. // const FUNCTIONTYPE = '[object Function]'
  8720. function diff(current, pre) {
  8721. var result = {};
  8722. syncKeys(current, pre);
  8723. _diff(current, pre, '', result);
  8724. return result
  8725. }
  8726. function syncKeys(current, pre) {
  8727. if (current === pre) { return }
  8728. var rootCurrentType = type(current);
  8729. var rootPreType = type(pre);
  8730. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8731. if(Object.keys(current).length >= Object.keys(pre).length){
  8732. for (var key in pre) {
  8733. var currentValue = current[key];
  8734. if (currentValue === undefined) {
  8735. current[key] = null;
  8736. } else {
  8737. syncKeys(currentValue, pre[key]);
  8738. }
  8739. }
  8740. }
  8741. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8742. if (current.length >= pre.length) {
  8743. pre.forEach(function (item, index) {
  8744. syncKeys(current[index], item);
  8745. });
  8746. }
  8747. }
  8748. }
  8749. function nullOrUndefined(currentType, preType) {
  8750. if(
  8751. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8752. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8753. ) {
  8754. return false
  8755. }
  8756. return true
  8757. }
  8758. function _diff(current, pre, path, result) {
  8759. if (current === pre) { return }
  8760. var rootCurrentType = type(current);
  8761. var rootPreType = type(pre);
  8762. if (rootCurrentType == OBJECTTYPE) {
  8763. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8764. setResult(result, path, current);
  8765. } else {
  8766. var loop = function ( key ) {
  8767. var currentValue = current[key];
  8768. var preValue = pre[key];
  8769. var currentType = type(currentValue);
  8770. var preType = type(preValue);
  8771. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8772. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8773. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8774. }
  8775. } else if (currentType == ARRAYTYPE) {
  8776. if (preType != ARRAYTYPE) {
  8777. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8778. } else {
  8779. if (currentValue.length < preValue.length) {
  8780. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8781. } else {
  8782. currentValue.forEach(function (item, index) {
  8783. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8784. });
  8785. }
  8786. }
  8787. } else if (currentType == OBJECTTYPE) {
  8788. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8789. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8790. } else {
  8791. for (var subKey in currentValue) {
  8792. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8793. }
  8794. }
  8795. }
  8796. };
  8797. for (var key in current) loop( key );
  8798. }
  8799. } else if (rootCurrentType == ARRAYTYPE) {
  8800. if (rootPreType != ARRAYTYPE) {
  8801. setResult(result, path, current);
  8802. } else {
  8803. if (current.length < pre.length) {
  8804. setResult(result, path, current);
  8805. } else {
  8806. current.forEach(function (item, index) {
  8807. _diff(item, pre[index], path + '[' + index + ']', result);
  8808. });
  8809. }
  8810. }
  8811. } else {
  8812. setResult(result, path, current);
  8813. }
  8814. }
  8815. function setResult(result, k, v) {
  8816. // if (type(v) != FUNCTIONTYPE) {
  8817. result[k] = v;
  8818. // }
  8819. }
  8820. function type(obj) {
  8821. return Object.prototype.toString.call(obj)
  8822. }
  8823. /* */
  8824. function flushCallbacks$1(vm) {
  8825. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8826. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8827. var mpInstance = vm.$scope;
  8828. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8829. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8830. }
  8831. var copies = vm.__next_tick_callbacks.slice(0);
  8832. vm.__next_tick_callbacks.length = 0;
  8833. for (var i = 0; i < copies.length; i++) {
  8834. copies[i]();
  8835. }
  8836. }
  8837. }
  8838. function hasRenderWatcher(vm) {
  8839. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8840. }
  8841. function nextTick$1(vm, cb) {
  8842. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8843. //2.nextTick 之前存在 render watcher
  8844. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8845. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  8846. var mpInstance = vm.$scope;
  8847. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8848. ']:nextVueTick');
  8849. }
  8850. return nextTick(cb, vm)
  8851. }else{
  8852. if(Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG){
  8853. var mpInstance$1 = vm.$scope;
  8854. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8855. ']:nextMPTick');
  8856. }
  8857. }
  8858. var _resolve;
  8859. if (!vm.__next_tick_callbacks) {
  8860. vm.__next_tick_callbacks = [];
  8861. }
  8862. vm.__next_tick_callbacks.push(function () {
  8863. if (cb) {
  8864. try {
  8865. cb.call(vm);
  8866. } catch (e) {
  8867. handleError(e, vm, 'nextTick');
  8868. }
  8869. } else if (_resolve) {
  8870. _resolve(vm);
  8871. }
  8872. });
  8873. // $flow-disable-line
  8874. if (!cb && typeof Promise !== 'undefined') {
  8875. return new Promise(function (resolve) {
  8876. _resolve = resolve;
  8877. })
  8878. }
  8879. }
  8880. /* */
  8881. function clearInstance(key, value) {
  8882. // 简易去除 Vue 和小程序组件实例
  8883. if (value) {
  8884. if (value._isVue || value.__v_isMPComponent) {
  8885. return {}
  8886. }
  8887. }
  8888. return value
  8889. }
  8890. function cloneWithData(vm) {
  8891. // 确保当前 vm 所有数据被同步
  8892. var ret = Object.create(null);
  8893. var dataKeys = [].concat(
  8894. Object.keys(vm._data || {}),
  8895. Object.keys(vm._computedWatchers || {}));
  8896. dataKeys.reduce(function(ret, key) {
  8897. ret[key] = vm[key];
  8898. return ret
  8899. }, ret);
  8900. // vue-composition-api
  8901. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8902. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8903. if (rawBindings) {
  8904. Object.keys(rawBindings).forEach(function (key) {
  8905. ret[key] = vm[key];
  8906. });
  8907. }
  8908. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8909. Object.assign(ret, vm.$mp.data || {});
  8910. if (
  8911. Array.isArray(vm.$options.behaviors) &&
  8912. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8913. ) { //form-field
  8914. ret['name'] = vm.name;
  8915. ret['value'] = vm.value;
  8916. }
  8917. return JSON.parse(JSON.stringify(ret, clearInstance))
  8918. }
  8919. var patch = function(oldVnode, vnode) {
  8920. var this$1 = this;
  8921. if (vnode === null) { //destroy
  8922. return
  8923. }
  8924. if (this.mpType === 'page' || this.mpType === 'component') {
  8925. var mpInstance = this.$scope;
  8926. var data = Object.create(null);
  8927. try {
  8928. data = cloneWithData(this);
  8929. } catch (err) {
  8930. console.error(err);
  8931. }
  8932. data.__webviewId__ = mpInstance.data.__webviewId__;
  8933. var mpData = Object.create(null);
  8934. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8935. mpData[key] = mpInstance.data[key];
  8936. });
  8937. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8938. if (Object.keys(diffData).length) {
  8939. if (Object({"VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"Applet","VUE_APP_PLATFORM":"mp-weixin","NODE_ENV":"development","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8940. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8941. ']差量更新',
  8942. JSON.stringify(diffData));
  8943. }
  8944. this.__next_tick_pending = true;
  8945. mpInstance.setData(diffData, function () {
  8946. this$1.__next_tick_pending = false;
  8947. flushCallbacks$1(this$1);
  8948. });
  8949. } else {
  8950. flushCallbacks$1(this);
  8951. }
  8952. }
  8953. };
  8954. /* */
  8955. function createEmptyRender() {
  8956. }
  8957. function mountComponent$1(
  8958. vm,
  8959. el,
  8960. hydrating
  8961. ) {
  8962. if (!vm.mpType) {//main.js 中的 new Vue
  8963. return vm
  8964. }
  8965. if (vm.mpType === 'app') {
  8966. vm.$options.render = createEmptyRender;
  8967. }
  8968. if (!vm.$options.render) {
  8969. vm.$options.render = createEmptyRender;
  8970. if (true) {
  8971. /* istanbul ignore if */
  8972. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8973. vm.$options.el || el) {
  8974. warn(
  8975. 'You are using the runtime-only build of Vue where the template ' +
  8976. 'compiler is not available. Either pre-compile the templates into ' +
  8977. 'render functions, or use the compiler-included build.',
  8978. vm
  8979. );
  8980. } else {
  8981. warn(
  8982. 'Failed to mount component: template or render function not defined.',
  8983. vm
  8984. );
  8985. }
  8986. }
  8987. }
  8988. !vm._$fallback && callHook(vm, 'beforeMount');
  8989. var updateComponent = function () {
  8990. vm._update(vm._render(), hydrating);
  8991. };
  8992. // we set this to vm._watcher inside the watcher's constructor
  8993. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8994. // component's mounted hook), which relies on vm._watcher being already defined
  8995. new Watcher(vm, updateComponent, noop, {
  8996. before: function before() {
  8997. if (vm._isMounted && !vm._isDestroyed) {
  8998. callHook(vm, 'beforeUpdate');
  8999. }
  9000. }
  9001. }, true /* isRenderWatcher */);
  9002. hydrating = false;
  9003. return vm
  9004. }
  9005. /* */
  9006. function renderClass (
  9007. staticClass,
  9008. dynamicClass
  9009. ) {
  9010. if (isDef(staticClass) || isDef(dynamicClass)) {
  9011. return concat(staticClass, stringifyClass(dynamicClass))
  9012. }
  9013. /* istanbul ignore next */
  9014. return ''
  9015. }
  9016. function concat (a, b) {
  9017. return a ? b ? (a + ' ' + b) : a : (b || '')
  9018. }
  9019. function stringifyClass (value) {
  9020. if (Array.isArray(value)) {
  9021. return stringifyArray(value)
  9022. }
  9023. if (isObject(value)) {
  9024. return stringifyObject(value)
  9025. }
  9026. if (typeof value === 'string') {
  9027. return value
  9028. }
  9029. /* istanbul ignore next */
  9030. return ''
  9031. }
  9032. function stringifyArray (value) {
  9033. var res = '';
  9034. var stringified;
  9035. for (var i = 0, l = value.length; i < l; i++) {
  9036. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  9037. if (res) { res += ' '; }
  9038. res += stringified;
  9039. }
  9040. }
  9041. return res
  9042. }
  9043. function stringifyObject (value) {
  9044. var res = '';
  9045. for (var key in value) {
  9046. if (value[key]) {
  9047. if (res) { res += ' '; }
  9048. res += key;
  9049. }
  9050. }
  9051. return res
  9052. }
  9053. /* */
  9054. var parseStyleText = cached(function (cssText) {
  9055. var res = {};
  9056. var listDelimiter = /;(?![^(]*\))/g;
  9057. var propertyDelimiter = /:(.+)/;
  9058. cssText.split(listDelimiter).forEach(function (item) {
  9059. if (item) {
  9060. var tmp = item.split(propertyDelimiter);
  9061. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  9062. }
  9063. });
  9064. return res
  9065. });
  9066. // normalize possible array / string values into Object
  9067. function normalizeStyleBinding (bindingStyle) {
  9068. if (Array.isArray(bindingStyle)) {
  9069. return toObject(bindingStyle)
  9070. }
  9071. if (typeof bindingStyle === 'string') {
  9072. return parseStyleText(bindingStyle)
  9073. }
  9074. return bindingStyle
  9075. }
  9076. /* */
  9077. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  9078. function getTarget(obj, path) {
  9079. var parts = path.split('.');
  9080. var key = parts[0];
  9081. if (key.indexOf('__$n') === 0) { //number index
  9082. key = parseInt(key.replace('__$n', ''));
  9083. }
  9084. if (parts.length === 1) {
  9085. return obj[key]
  9086. }
  9087. return getTarget(obj[key], parts.slice(1).join('.'))
  9088. }
  9089. function internalMixin(Vue) {
  9090. Vue.config.errorHandler = function(err, vm, info) {
  9091. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  9092. console.error(err);
  9093. /* eslint-disable no-undef */
  9094. var app = typeof getApp === 'function' && getApp();
  9095. if (app && app.onError) {
  9096. app.onError(err);
  9097. }
  9098. };
  9099. var oldEmit = Vue.prototype.$emit;
  9100. Vue.prototype.$emit = function(event) {
  9101. if (this.$scope && event) {
  9102. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  9103. if (triggerEvent) {
  9104. try {
  9105. triggerEvent.call(this.$scope, event, {
  9106. __args__: toArray(arguments, 1)
  9107. });
  9108. } catch (error) {
  9109. }
  9110. }
  9111. }
  9112. return oldEmit.apply(this, arguments)
  9113. };
  9114. Vue.prototype.$nextTick = function(fn) {
  9115. return nextTick$1(this, fn)
  9116. };
  9117. MP_METHODS.forEach(function (method) {
  9118. Vue.prototype[method] = function(args) {
  9119. if (this.$scope && this.$scope[method]) {
  9120. return this.$scope[method](args)
  9121. }
  9122. // mp-alipay
  9123. if (typeof my === 'undefined') {
  9124. return
  9125. }
  9126. if (method === 'createSelectorQuery') {
  9127. /* eslint-disable no-undef */
  9128. return my.createSelectorQuery(args)
  9129. } else if (method === 'createIntersectionObserver') {
  9130. /* eslint-disable no-undef */
  9131. return my.createIntersectionObserver(args)
  9132. }
  9133. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  9134. };
  9135. });
  9136. Vue.prototype.__init_provide = initProvide;
  9137. Vue.prototype.__init_injections = initInjections;
  9138. Vue.prototype.__call_hook = function(hook, args) {
  9139. var vm = this;
  9140. // #7573 disable dep collection when invoking lifecycle hooks
  9141. pushTarget();
  9142. var handlers = vm.$options[hook];
  9143. var info = hook + " hook";
  9144. var ret;
  9145. if (handlers) {
  9146. for (var i = 0, j = handlers.length; i < j; i++) {
  9147. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  9148. }
  9149. }
  9150. if (vm._hasHookEvent) {
  9151. vm.$emit('hook:' + hook, args);
  9152. }
  9153. popTarget();
  9154. return ret
  9155. };
  9156. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  9157. if (Array.isArray(modifiers)) {
  9158. if (modifiers.indexOf('trim') !== -1) {
  9159. value = value.trim();
  9160. }
  9161. if (modifiers.indexOf('number') !== -1) {
  9162. value = this._n(value);
  9163. }
  9164. }
  9165. if (!target) {
  9166. target = this;
  9167. }
  9168. // 解决动态属性添加
  9169. Vue.set(target, key, value);
  9170. };
  9171. Vue.prototype.__set_sync = function(target, key, value) {
  9172. if (!target) {
  9173. target = this;
  9174. }
  9175. // 解决动态属性添加
  9176. Vue.set(target, key, value);
  9177. };
  9178. Vue.prototype.__get_orig = function(item) {
  9179. if (isPlainObject(item)) {
  9180. return item['$orig'] || item
  9181. }
  9182. return item
  9183. };
  9184. Vue.prototype.__get_value = function(dataPath, target) {
  9185. return getTarget(target || this, dataPath)
  9186. };
  9187. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  9188. return renderClass(staticClass, dynamicClass)
  9189. };
  9190. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  9191. if (!dynamicStyle && !staticStyle) {
  9192. return ''
  9193. }
  9194. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  9195. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  9196. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  9197. };
  9198. Vue.prototype.__map = function(val, iteratee) {
  9199. //TODO 暂不考虑 string
  9200. var ret, i, l, keys, key;
  9201. if (Array.isArray(val)) {
  9202. ret = new Array(val.length);
  9203. for (i = 0, l = val.length; i < l; i++) {
  9204. ret[i] = iteratee(val[i], i);
  9205. }
  9206. return ret
  9207. } else if (isObject(val)) {
  9208. keys = Object.keys(val);
  9209. ret = Object.create(null);
  9210. for (i = 0, l = keys.length; i < l; i++) {
  9211. key = keys[i];
  9212. ret[key] = iteratee(val[key], key, i);
  9213. }
  9214. return ret
  9215. } else if (typeof val === 'number') {
  9216. ret = new Array(val);
  9217. for (i = 0, l = val; i < l; i++) {
  9218. // 第一个参数暂时仍和小程序一致
  9219. ret[i] = iteratee(i, i);
  9220. }
  9221. return ret
  9222. }
  9223. return []
  9224. };
  9225. }
  9226. /* */
  9227. var LIFECYCLE_HOOKS$1 = [
  9228. //App
  9229. 'onLaunch',
  9230. 'onShow',
  9231. 'onHide',
  9232. 'onUniNViewMessage',
  9233. 'onPageNotFound',
  9234. 'onThemeChange',
  9235. 'onError',
  9236. 'onUnhandledRejection',
  9237. //Page
  9238. 'onInit',
  9239. 'onLoad',
  9240. // 'onShow',
  9241. 'onReady',
  9242. // 'onHide',
  9243. 'onUnload',
  9244. 'onPullDownRefresh',
  9245. 'onReachBottom',
  9246. 'onTabItemTap',
  9247. 'onAddToFavorites',
  9248. 'onShareTimeline',
  9249. 'onShareAppMessage',
  9250. 'onResize',
  9251. 'onPageScroll',
  9252. 'onNavigationBarButtonTap',
  9253. 'onBackPress',
  9254. 'onNavigationBarSearchInputChanged',
  9255. 'onNavigationBarSearchInputConfirmed',
  9256. 'onNavigationBarSearchInputClicked',
  9257. 'onUploadDouyinVideo',
  9258. 'onNFCReadMessage',
  9259. //Component
  9260. // 'onReady', // 兼容旧版本,应该移除该事件
  9261. 'onPageShow',
  9262. 'onPageHide',
  9263. 'onPageResize'
  9264. ];
  9265. function lifecycleMixin$1(Vue) {
  9266. //fixed vue-class-component
  9267. var oldExtend = Vue.extend;
  9268. Vue.extend = function(extendOptions) {
  9269. extendOptions = extendOptions || {};
  9270. var methods = extendOptions.methods;
  9271. if (methods) {
  9272. Object.keys(methods).forEach(function (methodName) {
  9273. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  9274. extendOptions[methodName] = methods[methodName];
  9275. delete methods[methodName];
  9276. }
  9277. });
  9278. }
  9279. return oldExtend.call(this, extendOptions)
  9280. };
  9281. var strategies = Vue.config.optionMergeStrategies;
  9282. var mergeHook = strategies.created;
  9283. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  9284. strategies[hook] = mergeHook;
  9285. });
  9286. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  9287. }
  9288. /* */
  9289. // install platform patch function
  9290. Vue.prototype.__patch__ = patch;
  9291. // public mount method
  9292. Vue.prototype.$mount = function(
  9293. el ,
  9294. hydrating
  9295. ) {
  9296. return mountComponent$1(this, el, hydrating)
  9297. };
  9298. lifecycleMixin$1(Vue);
  9299. internalMixin(Vue);
  9300. /* */
  9301. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  9302. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  9303. /***/ }),
  9304. /***/ 26:
  9305. /*!**************************************!*\
  9306. !*** E:/项目资料/智慧社区/Applet/pages.json ***!
  9307. \**************************************/
  9308. /*! no static exports found */
  9309. /***/ (function(module, exports) {
  9310. /***/ }),
  9311. /***/ 267:
  9312. /*!******************************************!*\
  9313. !*** E:/项目资料/智慧社区/Applet/api/recruit.js ***!
  9314. \******************************************/
  9315. /*! no static exports found */
  9316. /***/ (function(module, exports, __webpack_require__) {
  9317. "use strict";
  9318. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9319. Object.defineProperty(exports, "__esModule", {
  9320. value: true
  9321. });
  9322. exports.default = void 0;
  9323. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  9324. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  9325. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  9326. var getList = /*#__PURE__*/function () {
  9327. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  9328. var res;
  9329. return _regenerator.default.wrap(function _callee$(_context) {
  9330. while (1) {
  9331. switch (_context.prev = _context.next) {
  9332. case 0:
  9333. _context.next = 2;
  9334. return _request.default.get({
  9335. url: "/recruit/list",
  9336. data: data
  9337. });
  9338. case 2:
  9339. res = _context.sent;
  9340. return _context.abrupt("return", res.data);
  9341. case 4:
  9342. case "end":
  9343. return _context.stop();
  9344. }
  9345. }
  9346. }, _callee);
  9347. }));
  9348. return function getList(_x) {
  9349. return _ref.apply(this, arguments);
  9350. };
  9351. }();
  9352. var getDetails = /*#__PURE__*/function () {
  9353. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref2) {
  9354. var id, res;
  9355. return _regenerator.default.wrap(function _callee2$(_context2) {
  9356. while (1) {
  9357. switch (_context2.prev = _context2.next) {
  9358. case 0:
  9359. id = _ref2.id;
  9360. _context2.next = 3;
  9361. return _request.default.get({
  9362. url: "/recruit/details/".concat(id)
  9363. });
  9364. case 3:
  9365. res = _context2.sent;
  9366. return _context2.abrupt("return", res.data);
  9367. case 5:
  9368. case "end":
  9369. return _context2.stop();
  9370. }
  9371. }
  9372. }, _callee2);
  9373. }));
  9374. return function getDetails(_x2) {
  9375. return _ref3.apply(this, arguments);
  9376. };
  9377. }();
  9378. var getStatus = /*#__PURE__*/function () {
  9379. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref4) {
  9380. var id, res;
  9381. return _regenerator.default.wrap(function _callee3$(_context3) {
  9382. while (1) {
  9383. switch (_context3.prev = _context3.next) {
  9384. case 0:
  9385. id = _ref4.id;
  9386. _context3.next = 3;
  9387. return _request.default.get({
  9388. url: "/recruit/status/".concat(id)
  9389. });
  9390. case 3:
  9391. res = _context3.sent;
  9392. return _context3.abrupt("return", res.data);
  9393. case 5:
  9394. case "end":
  9395. return _context3.stop();
  9396. }
  9397. }
  9398. }, _callee3);
  9399. }));
  9400. return function getStatus(_x3) {
  9401. return _ref5.apply(this, arguments);
  9402. };
  9403. }();
  9404. var report = /*#__PURE__*/function () {
  9405. var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref6) {
  9406. var id, res;
  9407. return _regenerator.default.wrap(function _callee4$(_context4) {
  9408. while (1) {
  9409. switch (_context4.prev = _context4.next) {
  9410. case 0:
  9411. id = _ref6.id;
  9412. _context4.next = 3;
  9413. return _request.default.post({
  9414. url: "/recruit/report/".concat(id)
  9415. });
  9416. case 3:
  9417. res = _context4.sent;
  9418. return _context4.abrupt("return", res.data);
  9419. case 5:
  9420. case "end":
  9421. return _context4.stop();
  9422. }
  9423. }
  9424. }, _callee4);
  9425. }));
  9426. return function report(_x4) {
  9427. return _ref7.apply(this, arguments);
  9428. };
  9429. }();
  9430. var _default = {
  9431. getList: getList,
  9432. getDetails: getDetails,
  9433. getStatus: getStatus,
  9434. report: report
  9435. };
  9436. exports.default = _default;
  9437. /***/ }),
  9438. /***/ 293:
  9439. /*!***************************************************************************************************!*\
  9440. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-transition/components/uni-transition/createAnimation.js ***!
  9441. \***************************************************************************************************/
  9442. /*! no static exports found */
  9443. /***/ (function(module, exports, __webpack_require__) {
  9444. "use strict";
  9445. /* WEBPACK VAR INJECTION */(function(uni) {
  9446. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9447. Object.defineProperty(exports, "__esModule", {
  9448. value: true
  9449. });
  9450. exports.createAnimation = createAnimation;
  9451. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  9452. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  9453. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  9454. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  9455. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  9456. // const defaultOption = {
  9457. // duration: 300,
  9458. // timingFunction: 'linear',
  9459. // delay: 0,
  9460. // transformOrigin: '50% 50% 0'
  9461. // }
  9462. var MPAnimation = /*#__PURE__*/function () {
  9463. function MPAnimation(options, _this) {
  9464. (0, _classCallCheck2.default)(this, MPAnimation);
  9465. this.options = options;
  9466. this.animation = uni.createAnimation(options);
  9467. this.currentStepAnimates = {};
  9468. this.next = 0;
  9469. this.$ = _this;
  9470. }
  9471. (0, _createClass2.default)(MPAnimation, [{
  9472. key: "_nvuePushAnimates",
  9473. value: function _nvuePushAnimates(type, args) {
  9474. var aniObj = this.currentStepAnimates[this.next];
  9475. var styles = {};
  9476. if (!aniObj) {
  9477. styles = {
  9478. styles: {},
  9479. config: {}
  9480. };
  9481. } else {
  9482. styles = aniObj;
  9483. }
  9484. if (animateTypes1.includes(type)) {
  9485. if (!styles.styles.transform) {
  9486. styles.styles.transform = '';
  9487. }
  9488. var unit = '';
  9489. if (type === 'rotate') {
  9490. unit = 'deg';
  9491. }
  9492. styles.styles.transform += "".concat(type, "(").concat(args + unit, ") ");
  9493. } else {
  9494. styles.styles[type] = "".concat(args);
  9495. }
  9496. this.currentStepAnimates[this.next] = styles;
  9497. }
  9498. }, {
  9499. key: "_animateRun",
  9500. value: function _animateRun() {
  9501. var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  9502. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  9503. var ref = this.$.$refs['ani'].ref;
  9504. if (!ref) return;
  9505. return new Promise(function (resolve, reject) {
  9506. nvueAnimation.transition(ref, _objectSpread({
  9507. styles: styles
  9508. }, config), function (res) {
  9509. resolve();
  9510. });
  9511. });
  9512. }
  9513. }, {
  9514. key: "_nvueNextAnimate",
  9515. value: function _nvueNextAnimate(animates) {
  9516. var _this2 = this;
  9517. var step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  9518. var fn = arguments.length > 2 ? arguments[2] : undefined;
  9519. var obj = animates[step];
  9520. if (obj) {
  9521. var styles = obj.styles,
  9522. config = obj.config;
  9523. this._animateRun(styles, config).then(function () {
  9524. step += 1;
  9525. _this2._nvueNextAnimate(animates, step, fn);
  9526. });
  9527. } else {
  9528. this.currentStepAnimates = {};
  9529. typeof fn === 'function' && fn();
  9530. this.isEnd = true;
  9531. }
  9532. }
  9533. }, {
  9534. key: "step",
  9535. value: function step() {
  9536. var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  9537. this.animation.step(config);
  9538. return this;
  9539. }
  9540. }, {
  9541. key: "run",
  9542. value: function run(fn) {
  9543. this.$.animationData = this.animation.export();
  9544. this.$.timer = setTimeout(function () {
  9545. typeof fn === 'function' && fn();
  9546. }, this.$.durationTime);
  9547. }
  9548. }]);
  9549. return MPAnimation;
  9550. }();
  9551. var animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', 'translateZ'];
  9552. var animateTypes2 = ['opacity', 'backgroundColor'];
  9553. var animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'];
  9554. animateTypes1.concat(animateTypes2, animateTypes3).forEach(function (type) {
  9555. MPAnimation.prototype[type] = function () {
  9556. var _this$animation;
  9557. (_this$animation = this.animation)[type].apply(_this$animation, arguments);
  9558. return this;
  9559. };
  9560. });
  9561. function createAnimation(option, _this) {
  9562. if (!_this) return;
  9563. clearTimeout(_this.timer);
  9564. return new MPAnimation(option, _this);
  9565. }
  9566. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  9567. /***/ }),
  9568. /***/ 3:
  9569. /*!***********************************!*\
  9570. !*** (webpack)/buildin/global.js ***!
  9571. \***********************************/
  9572. /*! no static exports found */
  9573. /***/ (function(module, exports) {
  9574. var g;
  9575. // This works in non-strict mode
  9576. g = (function() {
  9577. return this;
  9578. })();
  9579. try {
  9580. // This works if eval is allowed (see CSP)
  9581. g = g || new Function("return this")();
  9582. } catch (e) {
  9583. // This works if the window reference is available
  9584. if (typeof window === "object") g = window;
  9585. }
  9586. // g can still be undefined, but nothing to do about it...
  9587. // We return undefined, instead of nothing here, so it's
  9588. // easier to handle this case. if(!global) { ...}
  9589. module.exports = g;
  9590. /***/ }),
  9591. /***/ 32:
  9592. /*!**********************************************************************************************************!*\
  9593. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  9594. \**********************************************************************************************************/
  9595. /*! exports provided: default */
  9596. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  9597. "use strict";
  9598. __webpack_require__.r(__webpack_exports__);
  9599. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  9600. /* globals __VUE_SSR_CONTEXT__ */
  9601. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  9602. // This module is a runtime utility for cleaner component module output and will
  9603. // be included in the final webpack user bundle.
  9604. function normalizeComponent (
  9605. scriptExports,
  9606. render,
  9607. staticRenderFns,
  9608. functionalTemplate,
  9609. injectStyles,
  9610. scopeId,
  9611. moduleIdentifier, /* server only */
  9612. shadowMode, /* vue-cli only */
  9613. components, // fixed by xxxxxx auto components
  9614. renderjs // fixed by xxxxxx renderjs
  9615. ) {
  9616. // Vue.extend constructor export interop
  9617. var options = typeof scriptExports === 'function'
  9618. ? scriptExports.options
  9619. : scriptExports
  9620. // fixed by xxxxxx auto components
  9621. if (components) {
  9622. if (!options.components) {
  9623. options.components = {}
  9624. }
  9625. var hasOwn = Object.prototype.hasOwnProperty
  9626. for (var name in components) {
  9627. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  9628. options.components[name] = components[name]
  9629. }
  9630. }
  9631. }
  9632. // fixed by xxxxxx renderjs
  9633. if (renderjs) {
  9634. if(typeof renderjs.beforeCreate === 'function'){
  9635. renderjs.beforeCreate = [renderjs.beforeCreate]
  9636. }
  9637. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  9638. this[renderjs.__module] = this
  9639. });
  9640. (options.mixins || (options.mixins = [])).push(renderjs)
  9641. }
  9642. // render functions
  9643. if (render) {
  9644. options.render = render
  9645. options.staticRenderFns = staticRenderFns
  9646. options._compiled = true
  9647. }
  9648. // functional template
  9649. if (functionalTemplate) {
  9650. options.functional = true
  9651. }
  9652. // scopedId
  9653. if (scopeId) {
  9654. options._scopeId = 'data-v-' + scopeId
  9655. }
  9656. var hook
  9657. if (moduleIdentifier) { // server build
  9658. hook = function (context) {
  9659. // 2.3 injection
  9660. context =
  9661. context || // cached call
  9662. (this.$vnode && this.$vnode.ssrContext) || // stateful
  9663. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  9664. // 2.2 with runInNewContext: true
  9665. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  9666. context = __VUE_SSR_CONTEXT__
  9667. }
  9668. // inject component styles
  9669. if (injectStyles) {
  9670. injectStyles.call(this, context)
  9671. }
  9672. // register component module identifier for async chunk inferrence
  9673. if (context && context._registeredComponents) {
  9674. context._registeredComponents.add(moduleIdentifier)
  9675. }
  9676. }
  9677. // used by ssr in case component is cached and beforeCreate
  9678. // never gets called
  9679. options._ssrRegister = hook
  9680. } else if (injectStyles) {
  9681. hook = shadowMode
  9682. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  9683. : injectStyles
  9684. }
  9685. if (hook) {
  9686. if (options.functional) {
  9687. // for template-only hot-reload because in that case the render fn doesn't
  9688. // go through the normalizer
  9689. options._injectStyles = hook
  9690. // register for functioal component in vue file
  9691. var originalRender = options.render
  9692. options.render = function renderWithStyleInjection (h, context) {
  9693. hook.call(context)
  9694. return originalRender(h, context)
  9695. }
  9696. } else {
  9697. // inject component registration as beforeCreate hook
  9698. var existing = options.beforeCreate
  9699. options.beforeCreate = existing
  9700. ? [].concat(existing, hook)
  9701. : [hook]
  9702. }
  9703. }
  9704. return {
  9705. exports: scriptExports,
  9706. options: options
  9707. }
  9708. }
  9709. /***/ }),
  9710. /***/ 33:
  9711. /*!*******************************************!*\
  9712. !*** E:/项目资料/智慧社区/Applet/mixins/share.js ***!
  9713. \*******************************************/
  9714. /*! no static exports found */
  9715. /***/ (function(module, exports, __webpack_require__) {
  9716. "use strict";
  9717. /* WEBPACK VAR INJECTION */(function(wx) {
  9718. Object.defineProperty(exports, "__esModule", {
  9719. value: true
  9720. });
  9721. exports.default = void 0;
  9722. var _default = {
  9723. created: function created() {
  9724. wx.showShareMenu({
  9725. withShareTicket: true,
  9726. menus: ['shareAppMessage']
  9727. });
  9728. }
  9729. };
  9730. exports.default = _default;
  9731. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  9732. /***/ }),
  9733. /***/ 341:
  9734. /*!********************************************************************************************!*\
  9735. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js ***!
  9736. \********************************************************************************************/
  9737. /*! no static exports found */
  9738. /***/ (function(module, exports, __webpack_require__) {
  9739. "use strict";
  9740. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  9741. Object.defineProperty(exports, "__esModule", {
  9742. value: true
  9743. });
  9744. exports.default = void 0;
  9745. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 342));
  9746. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 343));
  9747. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 344));
  9748. var _default = {
  9749. en: _en.default,
  9750. 'zh-Hans': _zhHans.default,
  9751. 'zh-Hant': _zhHant.default
  9752. };
  9753. exports.default = _default;
  9754. /***/ }),
  9755. /***/ 342:
  9756. /*!*******************************************************************************************!*\
  9757. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json ***!
  9758. \*******************************************************************************************/
  9759. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  9760. /***/ (function(module) {
  9761. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"Pull up to show more\",\"uni-load-more.contentrefresh\":\"loading...\",\"uni-load-more.contentnomore\":\"No more data\"}");
  9762. /***/ }),
  9763. /***/ 343:
  9764. /*!************************************************************************************************!*\
  9765. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json ***!
  9766. \************************************************************************************************/
  9767. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  9768. /***/ (function(module) {
  9769. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉显示更多\",\"uni-load-more.contentrefresh\":\"正在加载...\",\"uni-load-more.contentnomore\":\"没有更多数据了\"}");
  9770. /***/ }),
  9771. /***/ 344:
  9772. /*!************************************************************************************************!*\
  9773. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json ***!
  9774. \************************************************************************************************/
  9775. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  9776. /***/ (function(module) {
  9777. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉顯示更多\",\"uni-load-more.contentrefresh\":\"正在加載...\",\"uni-load-more.contentnomore\":\"沒有更多數據了\"}");
  9778. /***/ }),
  9779. /***/ 359:
  9780. /*!*******************************************************************************!*\
  9781. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  9782. \*******************************************************************************/
  9783. /*! no static exports found */
  9784. /***/ (function(module, exports, __webpack_require__) {
  9785. "use strict";
  9786. Object.defineProperty(exports, "__esModule", {
  9787. value: true
  9788. });
  9789. exports.default = void 0;
  9790. var _default = {
  9791. "id": "2852637",
  9792. "name": "uniui图标库",
  9793. "font_family": "uniicons",
  9794. "css_prefix_text": "uniui-",
  9795. "description": "",
  9796. "glyphs": [{
  9797. "icon_id": "25027049",
  9798. "name": "yanse",
  9799. "font_class": "color",
  9800. "unicode": "e6cf",
  9801. "unicode_decimal": 59087
  9802. }, {
  9803. "icon_id": "25027048",
  9804. "name": "wallet",
  9805. "font_class": "wallet",
  9806. "unicode": "e6b1",
  9807. "unicode_decimal": 59057
  9808. }, {
  9809. "icon_id": "25015720",
  9810. "name": "settings-filled",
  9811. "font_class": "settings-filled",
  9812. "unicode": "e6ce",
  9813. "unicode_decimal": 59086
  9814. }, {
  9815. "icon_id": "25015434",
  9816. "name": "shimingrenzheng-filled",
  9817. "font_class": "auth-filled",
  9818. "unicode": "e6cc",
  9819. "unicode_decimal": 59084
  9820. }, {
  9821. "icon_id": "24934246",
  9822. "name": "shop-filled",
  9823. "font_class": "shop-filled",
  9824. "unicode": "e6cd",
  9825. "unicode_decimal": 59085
  9826. }, {
  9827. "icon_id": "24934159",
  9828. "name": "staff-filled-01",
  9829. "font_class": "staff-filled",
  9830. "unicode": "e6cb",
  9831. "unicode_decimal": 59083
  9832. }, {
  9833. "icon_id": "24932461",
  9834. "name": "VIP-filled",
  9835. "font_class": "vip-filled",
  9836. "unicode": "e6c6",
  9837. "unicode_decimal": 59078
  9838. }, {
  9839. "icon_id": "24932462",
  9840. "name": "plus_circle_fill",
  9841. "font_class": "plus-filled",
  9842. "unicode": "e6c7",
  9843. "unicode_decimal": 59079
  9844. }, {
  9845. "icon_id": "24932463",
  9846. "name": "folder_add-filled",
  9847. "font_class": "folder-add-filled",
  9848. "unicode": "e6c8",
  9849. "unicode_decimal": 59080
  9850. }, {
  9851. "icon_id": "24932464",
  9852. "name": "yanse-filled",
  9853. "font_class": "color-filled",
  9854. "unicode": "e6c9",
  9855. "unicode_decimal": 59081
  9856. }, {
  9857. "icon_id": "24932465",
  9858. "name": "tune-filled",
  9859. "font_class": "tune-filled",
  9860. "unicode": "e6ca",
  9861. "unicode_decimal": 59082
  9862. }, {
  9863. "icon_id": "24932455",
  9864. "name": "a-rilidaka-filled",
  9865. "font_class": "calendar-filled",
  9866. "unicode": "e6c0",
  9867. "unicode_decimal": 59072
  9868. }, {
  9869. "icon_id": "24932456",
  9870. "name": "notification-filled",
  9871. "font_class": "notification-filled",
  9872. "unicode": "e6c1",
  9873. "unicode_decimal": 59073
  9874. }, {
  9875. "icon_id": "24932457",
  9876. "name": "wallet-filled",
  9877. "font_class": "wallet-filled",
  9878. "unicode": "e6c2",
  9879. "unicode_decimal": 59074
  9880. }, {
  9881. "icon_id": "24932458",
  9882. "name": "paihangbang-filled",
  9883. "font_class": "medal-filled",
  9884. "unicode": "e6c3",
  9885. "unicode_decimal": 59075
  9886. }, {
  9887. "icon_id": "24932459",
  9888. "name": "gift-filled",
  9889. "font_class": "gift-filled",
  9890. "unicode": "e6c4",
  9891. "unicode_decimal": 59076
  9892. }, {
  9893. "icon_id": "24932460",
  9894. "name": "fire-filled",
  9895. "font_class": "fire-filled",
  9896. "unicode": "e6c5",
  9897. "unicode_decimal": 59077
  9898. }, {
  9899. "icon_id": "24928001",
  9900. "name": "refreshempty",
  9901. "font_class": "refreshempty",
  9902. "unicode": "e6bf",
  9903. "unicode_decimal": 59071
  9904. }, {
  9905. "icon_id": "24926853",
  9906. "name": "location-ellipse",
  9907. "font_class": "location-filled",
  9908. "unicode": "e6af",
  9909. "unicode_decimal": 59055
  9910. }, {
  9911. "icon_id": "24926735",
  9912. "name": "person-filled",
  9913. "font_class": "person-filled",
  9914. "unicode": "e69d",
  9915. "unicode_decimal": 59037
  9916. }, {
  9917. "icon_id": "24926703",
  9918. "name": "personadd-filled",
  9919. "font_class": "personadd-filled",
  9920. "unicode": "e698",
  9921. "unicode_decimal": 59032
  9922. }, {
  9923. "icon_id": "24923351",
  9924. "name": "back",
  9925. "font_class": "back",
  9926. "unicode": "e6b9",
  9927. "unicode_decimal": 59065
  9928. }, {
  9929. "icon_id": "24923352",
  9930. "name": "forward",
  9931. "font_class": "forward",
  9932. "unicode": "e6ba",
  9933. "unicode_decimal": 59066
  9934. }, {
  9935. "icon_id": "24923353",
  9936. "name": "arrowthinright",
  9937. "font_class": "arrow-right",
  9938. "unicode": "e6bb",
  9939. "unicode_decimal": 59067
  9940. }, {
  9941. "icon_id": "24923353",
  9942. "name": "arrowthinright",
  9943. "font_class": "arrowthinright",
  9944. "unicode": "e6bb",
  9945. "unicode_decimal": 59067
  9946. }, {
  9947. "icon_id": "24923354",
  9948. "name": "arrowthinleft",
  9949. "font_class": "arrow-left",
  9950. "unicode": "e6bc",
  9951. "unicode_decimal": 59068
  9952. }, {
  9953. "icon_id": "24923354",
  9954. "name": "arrowthinleft",
  9955. "font_class": "arrowthinleft",
  9956. "unicode": "e6bc",
  9957. "unicode_decimal": 59068
  9958. }, {
  9959. "icon_id": "24923355",
  9960. "name": "arrowthinup",
  9961. "font_class": "arrow-up",
  9962. "unicode": "e6bd",
  9963. "unicode_decimal": 59069
  9964. }, {
  9965. "icon_id": "24923355",
  9966. "name": "arrowthinup",
  9967. "font_class": "arrowthinup",
  9968. "unicode": "e6bd",
  9969. "unicode_decimal": 59069
  9970. }, {
  9971. "icon_id": "24923356",
  9972. "name": "arrowthindown",
  9973. "font_class": "arrow-down",
  9974. "unicode": "e6be",
  9975. "unicode_decimal": 59070
  9976. }, {
  9977. "icon_id": "24923356",
  9978. "name": "arrowthindown",
  9979. "font_class": "arrowthindown",
  9980. "unicode": "e6be",
  9981. "unicode_decimal": 59070
  9982. }, {
  9983. "icon_id": "24923349",
  9984. "name": "arrowdown",
  9985. "font_class": "bottom",
  9986. "unicode": "e6b8",
  9987. "unicode_decimal": 59064
  9988. }, {
  9989. "icon_id": "24923349",
  9990. "name": "arrowdown",
  9991. "font_class": "arrowdown",
  9992. "unicode": "e6b8",
  9993. "unicode_decimal": 59064
  9994. }, {
  9995. "icon_id": "24923346",
  9996. "name": "arrowright",
  9997. "font_class": "right",
  9998. "unicode": "e6b5",
  9999. "unicode_decimal": 59061
  10000. }, {
  10001. "icon_id": "24923346",
  10002. "name": "arrowright",
  10003. "font_class": "arrowright",
  10004. "unicode": "e6b5",
  10005. "unicode_decimal": 59061
  10006. }, {
  10007. "icon_id": "24923347",
  10008. "name": "arrowup",
  10009. "font_class": "top",
  10010. "unicode": "e6b6",
  10011. "unicode_decimal": 59062
  10012. }, {
  10013. "icon_id": "24923347",
  10014. "name": "arrowup",
  10015. "font_class": "arrowup",
  10016. "unicode": "e6b6",
  10017. "unicode_decimal": 59062
  10018. }, {
  10019. "icon_id": "24923348",
  10020. "name": "arrowleft",
  10021. "font_class": "left",
  10022. "unicode": "e6b7",
  10023. "unicode_decimal": 59063
  10024. }, {
  10025. "icon_id": "24923348",
  10026. "name": "arrowleft",
  10027. "font_class": "arrowleft",
  10028. "unicode": "e6b7",
  10029. "unicode_decimal": 59063
  10030. }, {
  10031. "icon_id": "24923334",
  10032. "name": "eye",
  10033. "font_class": "eye",
  10034. "unicode": "e651",
  10035. "unicode_decimal": 58961
  10036. }, {
  10037. "icon_id": "24923335",
  10038. "name": "eye-filled",
  10039. "font_class": "eye-filled",
  10040. "unicode": "e66a",
  10041. "unicode_decimal": 58986
  10042. }, {
  10043. "icon_id": "24923336",
  10044. "name": "eye-slash",
  10045. "font_class": "eye-slash",
  10046. "unicode": "e6b3",
  10047. "unicode_decimal": 59059
  10048. }, {
  10049. "icon_id": "24923337",
  10050. "name": "eye-slash-filled",
  10051. "font_class": "eye-slash-filled",
  10052. "unicode": "e6b4",
  10053. "unicode_decimal": 59060
  10054. }, {
  10055. "icon_id": "24923305",
  10056. "name": "info-filled",
  10057. "font_class": "info-filled",
  10058. "unicode": "e649",
  10059. "unicode_decimal": 58953
  10060. }, {
  10061. "icon_id": "24923299",
  10062. "name": "reload-01",
  10063. "font_class": "reload",
  10064. "unicode": "e6b2",
  10065. "unicode_decimal": 59058
  10066. }, {
  10067. "icon_id": "24923195",
  10068. "name": "mic_slash_fill",
  10069. "font_class": "micoff-filled",
  10070. "unicode": "e6b0",
  10071. "unicode_decimal": 59056
  10072. }, {
  10073. "icon_id": "24923165",
  10074. "name": "map-pin-ellipse",
  10075. "font_class": "map-pin-ellipse",
  10076. "unicode": "e6ac",
  10077. "unicode_decimal": 59052
  10078. }, {
  10079. "icon_id": "24923166",
  10080. "name": "map-pin",
  10081. "font_class": "map-pin",
  10082. "unicode": "e6ad",
  10083. "unicode_decimal": 59053
  10084. }, {
  10085. "icon_id": "24923167",
  10086. "name": "location",
  10087. "font_class": "location",
  10088. "unicode": "e6ae",
  10089. "unicode_decimal": 59054
  10090. }, {
  10091. "icon_id": "24923064",
  10092. "name": "starhalf",
  10093. "font_class": "starhalf",
  10094. "unicode": "e683",
  10095. "unicode_decimal": 59011
  10096. }, {
  10097. "icon_id": "24923065",
  10098. "name": "star",
  10099. "font_class": "star",
  10100. "unicode": "e688",
  10101. "unicode_decimal": 59016
  10102. }, {
  10103. "icon_id": "24923066",
  10104. "name": "star-filled",
  10105. "font_class": "star-filled",
  10106. "unicode": "e68f",
  10107. "unicode_decimal": 59023
  10108. }, {
  10109. "icon_id": "24899646",
  10110. "name": "a-rilidaka",
  10111. "font_class": "calendar",
  10112. "unicode": "e6a0",
  10113. "unicode_decimal": 59040
  10114. }, {
  10115. "icon_id": "24899647",
  10116. "name": "fire",
  10117. "font_class": "fire",
  10118. "unicode": "e6a1",
  10119. "unicode_decimal": 59041
  10120. }, {
  10121. "icon_id": "24899648",
  10122. "name": "paihangbang",
  10123. "font_class": "medal",
  10124. "unicode": "e6a2",
  10125. "unicode_decimal": 59042
  10126. }, {
  10127. "icon_id": "24899649",
  10128. "name": "font",
  10129. "font_class": "font",
  10130. "unicode": "e6a3",
  10131. "unicode_decimal": 59043
  10132. }, {
  10133. "icon_id": "24899650",
  10134. "name": "gift",
  10135. "font_class": "gift",
  10136. "unicode": "e6a4",
  10137. "unicode_decimal": 59044
  10138. }, {
  10139. "icon_id": "24899651",
  10140. "name": "link",
  10141. "font_class": "link",
  10142. "unicode": "e6a5",
  10143. "unicode_decimal": 59045
  10144. }, {
  10145. "icon_id": "24899652",
  10146. "name": "notification",
  10147. "font_class": "notification",
  10148. "unicode": "e6a6",
  10149. "unicode_decimal": 59046
  10150. }, {
  10151. "icon_id": "24899653",
  10152. "name": "staff",
  10153. "font_class": "staff",
  10154. "unicode": "e6a7",
  10155. "unicode_decimal": 59047
  10156. }, {
  10157. "icon_id": "24899654",
  10158. "name": "VIP",
  10159. "font_class": "vip",
  10160. "unicode": "e6a8",
  10161. "unicode_decimal": 59048
  10162. }, {
  10163. "icon_id": "24899655",
  10164. "name": "folder_add",
  10165. "font_class": "folder-add",
  10166. "unicode": "e6a9",
  10167. "unicode_decimal": 59049
  10168. }, {
  10169. "icon_id": "24899656",
  10170. "name": "tune",
  10171. "font_class": "tune",
  10172. "unicode": "e6aa",
  10173. "unicode_decimal": 59050
  10174. }, {
  10175. "icon_id": "24899657",
  10176. "name": "shimingrenzheng",
  10177. "font_class": "auth",
  10178. "unicode": "e6ab",
  10179. "unicode_decimal": 59051
  10180. }, {
  10181. "icon_id": "24899565",
  10182. "name": "person",
  10183. "font_class": "person",
  10184. "unicode": "e699",
  10185. "unicode_decimal": 59033
  10186. }, {
  10187. "icon_id": "24899566",
  10188. "name": "email-filled",
  10189. "font_class": "email-filled",
  10190. "unicode": "e69a",
  10191. "unicode_decimal": 59034
  10192. }, {
  10193. "icon_id": "24899567",
  10194. "name": "phone-filled",
  10195. "font_class": "phone-filled",
  10196. "unicode": "e69b",
  10197. "unicode_decimal": 59035
  10198. }, {
  10199. "icon_id": "24899568",
  10200. "name": "phone",
  10201. "font_class": "phone",
  10202. "unicode": "e69c",
  10203. "unicode_decimal": 59036
  10204. }, {
  10205. "icon_id": "24899570",
  10206. "name": "email",
  10207. "font_class": "email",
  10208. "unicode": "e69e",
  10209. "unicode_decimal": 59038
  10210. }, {
  10211. "icon_id": "24899571",
  10212. "name": "personadd",
  10213. "font_class": "personadd",
  10214. "unicode": "e69f",
  10215. "unicode_decimal": 59039
  10216. }, {
  10217. "icon_id": "24899558",
  10218. "name": "chatboxes-filled",
  10219. "font_class": "chatboxes-filled",
  10220. "unicode": "e692",
  10221. "unicode_decimal": 59026
  10222. }, {
  10223. "icon_id": "24899559",
  10224. "name": "contact",
  10225. "font_class": "contact",
  10226. "unicode": "e693",
  10227. "unicode_decimal": 59027
  10228. }, {
  10229. "icon_id": "24899560",
  10230. "name": "chatbubble-filled",
  10231. "font_class": "chatbubble-filled",
  10232. "unicode": "e694",
  10233. "unicode_decimal": 59028
  10234. }, {
  10235. "icon_id": "24899561",
  10236. "name": "contact-filled",
  10237. "font_class": "contact-filled",
  10238. "unicode": "e695",
  10239. "unicode_decimal": 59029
  10240. }, {
  10241. "icon_id": "24899562",
  10242. "name": "chatboxes",
  10243. "font_class": "chatboxes",
  10244. "unicode": "e696",
  10245. "unicode_decimal": 59030
  10246. }, {
  10247. "icon_id": "24899563",
  10248. "name": "chatbubble",
  10249. "font_class": "chatbubble",
  10250. "unicode": "e697",
  10251. "unicode_decimal": 59031
  10252. }, {
  10253. "icon_id": "24881290",
  10254. "name": "upload-filled",
  10255. "font_class": "upload-filled",
  10256. "unicode": "e68e",
  10257. "unicode_decimal": 59022
  10258. }, {
  10259. "icon_id": "24881292",
  10260. "name": "upload",
  10261. "font_class": "upload",
  10262. "unicode": "e690",
  10263. "unicode_decimal": 59024
  10264. }, {
  10265. "icon_id": "24881293",
  10266. "name": "weixin",
  10267. "font_class": "weixin",
  10268. "unicode": "e691",
  10269. "unicode_decimal": 59025
  10270. }, {
  10271. "icon_id": "24881274",
  10272. "name": "compose",
  10273. "font_class": "compose",
  10274. "unicode": "e67f",
  10275. "unicode_decimal": 59007
  10276. }, {
  10277. "icon_id": "24881275",
  10278. "name": "qq",
  10279. "font_class": "qq",
  10280. "unicode": "e680",
  10281. "unicode_decimal": 59008
  10282. }, {
  10283. "icon_id": "24881276",
  10284. "name": "download-filled",
  10285. "font_class": "download-filled",
  10286. "unicode": "e681",
  10287. "unicode_decimal": 59009
  10288. }, {
  10289. "icon_id": "24881277",
  10290. "name": "pengyouquan",
  10291. "font_class": "pyq",
  10292. "unicode": "e682",
  10293. "unicode_decimal": 59010
  10294. }, {
  10295. "icon_id": "24881279",
  10296. "name": "sound",
  10297. "font_class": "sound",
  10298. "unicode": "e684",
  10299. "unicode_decimal": 59012
  10300. }, {
  10301. "icon_id": "24881280",
  10302. "name": "trash-filled",
  10303. "font_class": "trash-filled",
  10304. "unicode": "e685",
  10305. "unicode_decimal": 59013
  10306. }, {
  10307. "icon_id": "24881281",
  10308. "name": "sound-filled",
  10309. "font_class": "sound-filled",
  10310. "unicode": "e686",
  10311. "unicode_decimal": 59014
  10312. }, {
  10313. "icon_id": "24881282",
  10314. "name": "trash",
  10315. "font_class": "trash",
  10316. "unicode": "e687",
  10317. "unicode_decimal": 59015
  10318. }, {
  10319. "icon_id": "24881284",
  10320. "name": "videocam-filled",
  10321. "font_class": "videocam-filled",
  10322. "unicode": "e689",
  10323. "unicode_decimal": 59017
  10324. }, {
  10325. "icon_id": "24881285",
  10326. "name": "spinner-cycle",
  10327. "font_class": "spinner-cycle",
  10328. "unicode": "e68a",
  10329. "unicode_decimal": 59018
  10330. }, {
  10331. "icon_id": "24881286",
  10332. "name": "weibo",
  10333. "font_class": "weibo",
  10334. "unicode": "e68b",
  10335. "unicode_decimal": 59019
  10336. }, {
  10337. "icon_id": "24881288",
  10338. "name": "videocam",
  10339. "font_class": "videocam",
  10340. "unicode": "e68c",
  10341. "unicode_decimal": 59020
  10342. }, {
  10343. "icon_id": "24881289",
  10344. "name": "download",
  10345. "font_class": "download",
  10346. "unicode": "e68d",
  10347. "unicode_decimal": 59021
  10348. }, {
  10349. "icon_id": "24879601",
  10350. "name": "help",
  10351. "font_class": "help",
  10352. "unicode": "e679",
  10353. "unicode_decimal": 59001
  10354. }, {
  10355. "icon_id": "24879602",
  10356. "name": "navigate-filled",
  10357. "font_class": "navigate-filled",
  10358. "unicode": "e67a",
  10359. "unicode_decimal": 59002
  10360. }, {
  10361. "icon_id": "24879603",
  10362. "name": "plusempty",
  10363. "font_class": "plusempty",
  10364. "unicode": "e67b",
  10365. "unicode_decimal": 59003
  10366. }, {
  10367. "icon_id": "24879604",
  10368. "name": "smallcircle",
  10369. "font_class": "smallcircle",
  10370. "unicode": "e67c",
  10371. "unicode_decimal": 59004
  10372. }, {
  10373. "icon_id": "24879605",
  10374. "name": "minus-filled",
  10375. "font_class": "minus-filled",
  10376. "unicode": "e67d",
  10377. "unicode_decimal": 59005
  10378. }, {
  10379. "icon_id": "24879606",
  10380. "name": "micoff",
  10381. "font_class": "micoff",
  10382. "unicode": "e67e",
  10383. "unicode_decimal": 59006
  10384. }, {
  10385. "icon_id": "24879588",
  10386. "name": "closeempty",
  10387. "font_class": "closeempty",
  10388. "unicode": "e66c",
  10389. "unicode_decimal": 58988
  10390. }, {
  10391. "icon_id": "24879589",
  10392. "name": "clear",
  10393. "font_class": "clear",
  10394. "unicode": "e66d",
  10395. "unicode_decimal": 58989
  10396. }, {
  10397. "icon_id": "24879590",
  10398. "name": "navigate",
  10399. "font_class": "navigate",
  10400. "unicode": "e66e",
  10401. "unicode_decimal": 58990
  10402. }, {
  10403. "icon_id": "24879591",
  10404. "name": "minus",
  10405. "font_class": "minus",
  10406. "unicode": "e66f",
  10407. "unicode_decimal": 58991
  10408. }, {
  10409. "icon_id": "24879592",
  10410. "name": "image",
  10411. "font_class": "image",
  10412. "unicode": "e670",
  10413. "unicode_decimal": 58992
  10414. }, {
  10415. "icon_id": "24879593",
  10416. "name": "mic",
  10417. "font_class": "mic",
  10418. "unicode": "e671",
  10419. "unicode_decimal": 58993
  10420. }, {
  10421. "icon_id": "24879594",
  10422. "name": "paperplane",
  10423. "font_class": "paperplane",
  10424. "unicode": "e672",
  10425. "unicode_decimal": 58994
  10426. }, {
  10427. "icon_id": "24879595",
  10428. "name": "close",
  10429. "font_class": "close",
  10430. "unicode": "e673",
  10431. "unicode_decimal": 58995
  10432. }, {
  10433. "icon_id": "24879596",
  10434. "name": "help-filled",
  10435. "font_class": "help-filled",
  10436. "unicode": "e674",
  10437. "unicode_decimal": 58996
  10438. }, {
  10439. "icon_id": "24879597",
  10440. "name": "plus-filled",
  10441. "font_class": "paperplane-filled",
  10442. "unicode": "e675",
  10443. "unicode_decimal": 58997
  10444. }, {
  10445. "icon_id": "24879598",
  10446. "name": "plus",
  10447. "font_class": "plus",
  10448. "unicode": "e676",
  10449. "unicode_decimal": 58998
  10450. }, {
  10451. "icon_id": "24879599",
  10452. "name": "mic-filled",
  10453. "font_class": "mic-filled",
  10454. "unicode": "e677",
  10455. "unicode_decimal": 58999
  10456. }, {
  10457. "icon_id": "24879600",
  10458. "name": "image-filled",
  10459. "font_class": "image-filled",
  10460. "unicode": "e678",
  10461. "unicode_decimal": 59000
  10462. }, {
  10463. "icon_id": "24855900",
  10464. "name": "locked-filled",
  10465. "font_class": "locked-filled",
  10466. "unicode": "e668",
  10467. "unicode_decimal": 58984
  10468. }, {
  10469. "icon_id": "24855901",
  10470. "name": "info",
  10471. "font_class": "info",
  10472. "unicode": "e669",
  10473. "unicode_decimal": 58985
  10474. }, {
  10475. "icon_id": "24855903",
  10476. "name": "locked",
  10477. "font_class": "locked",
  10478. "unicode": "e66b",
  10479. "unicode_decimal": 58987
  10480. }, {
  10481. "icon_id": "24855884",
  10482. "name": "camera-filled",
  10483. "font_class": "camera-filled",
  10484. "unicode": "e658",
  10485. "unicode_decimal": 58968
  10486. }, {
  10487. "icon_id": "24855885",
  10488. "name": "chat-filled",
  10489. "font_class": "chat-filled",
  10490. "unicode": "e659",
  10491. "unicode_decimal": 58969
  10492. }, {
  10493. "icon_id": "24855886",
  10494. "name": "camera",
  10495. "font_class": "camera",
  10496. "unicode": "e65a",
  10497. "unicode_decimal": 58970
  10498. }, {
  10499. "icon_id": "24855887",
  10500. "name": "circle",
  10501. "font_class": "circle",
  10502. "unicode": "e65b",
  10503. "unicode_decimal": 58971
  10504. }, {
  10505. "icon_id": "24855888",
  10506. "name": "checkmarkempty",
  10507. "font_class": "checkmarkempty",
  10508. "unicode": "e65c",
  10509. "unicode_decimal": 58972
  10510. }, {
  10511. "icon_id": "24855889",
  10512. "name": "chat",
  10513. "font_class": "chat",
  10514. "unicode": "e65d",
  10515. "unicode_decimal": 58973
  10516. }, {
  10517. "icon_id": "24855890",
  10518. "name": "circle-filled",
  10519. "font_class": "circle-filled",
  10520. "unicode": "e65e",
  10521. "unicode_decimal": 58974
  10522. }, {
  10523. "icon_id": "24855891",
  10524. "name": "flag",
  10525. "font_class": "flag",
  10526. "unicode": "e65f",
  10527. "unicode_decimal": 58975
  10528. }, {
  10529. "icon_id": "24855892",
  10530. "name": "flag-filled",
  10531. "font_class": "flag-filled",
  10532. "unicode": "e660",
  10533. "unicode_decimal": 58976
  10534. }, {
  10535. "icon_id": "24855893",
  10536. "name": "gear-filled",
  10537. "font_class": "gear-filled",
  10538. "unicode": "e661",
  10539. "unicode_decimal": 58977
  10540. }, {
  10541. "icon_id": "24855894",
  10542. "name": "home",
  10543. "font_class": "home",
  10544. "unicode": "e662",
  10545. "unicode_decimal": 58978
  10546. }, {
  10547. "icon_id": "24855895",
  10548. "name": "home-filled",
  10549. "font_class": "home-filled",
  10550. "unicode": "e663",
  10551. "unicode_decimal": 58979
  10552. }, {
  10553. "icon_id": "24855896",
  10554. "name": "gear",
  10555. "font_class": "gear",
  10556. "unicode": "e664",
  10557. "unicode_decimal": 58980
  10558. }, {
  10559. "icon_id": "24855897",
  10560. "name": "smallcircle-filled",
  10561. "font_class": "smallcircle-filled",
  10562. "unicode": "e665",
  10563. "unicode_decimal": 58981
  10564. }, {
  10565. "icon_id": "24855898",
  10566. "name": "map-filled",
  10567. "font_class": "map-filled",
  10568. "unicode": "e666",
  10569. "unicode_decimal": 58982
  10570. }, {
  10571. "icon_id": "24855899",
  10572. "name": "map",
  10573. "font_class": "map",
  10574. "unicode": "e667",
  10575. "unicode_decimal": 58983
  10576. }, {
  10577. "icon_id": "24855825",
  10578. "name": "refresh-filled",
  10579. "font_class": "refresh-filled",
  10580. "unicode": "e656",
  10581. "unicode_decimal": 58966
  10582. }, {
  10583. "icon_id": "24855826",
  10584. "name": "refresh",
  10585. "font_class": "refresh",
  10586. "unicode": "e657",
  10587. "unicode_decimal": 58967
  10588. }, {
  10589. "icon_id": "24855808",
  10590. "name": "cloud-upload",
  10591. "font_class": "cloud-upload",
  10592. "unicode": "e645",
  10593. "unicode_decimal": 58949
  10594. }, {
  10595. "icon_id": "24855809",
  10596. "name": "cloud-download-filled",
  10597. "font_class": "cloud-download-filled",
  10598. "unicode": "e646",
  10599. "unicode_decimal": 58950
  10600. }, {
  10601. "icon_id": "24855810",
  10602. "name": "cloud-download",
  10603. "font_class": "cloud-download",
  10604. "unicode": "e647",
  10605. "unicode_decimal": 58951
  10606. }, {
  10607. "icon_id": "24855811",
  10608. "name": "cloud-upload-filled",
  10609. "font_class": "cloud-upload-filled",
  10610. "unicode": "e648",
  10611. "unicode_decimal": 58952
  10612. }, {
  10613. "icon_id": "24855813",
  10614. "name": "redo",
  10615. "font_class": "redo",
  10616. "unicode": "e64a",
  10617. "unicode_decimal": 58954
  10618. }, {
  10619. "icon_id": "24855814",
  10620. "name": "images-filled",
  10621. "font_class": "images-filled",
  10622. "unicode": "e64b",
  10623. "unicode_decimal": 58955
  10624. }, {
  10625. "icon_id": "24855815",
  10626. "name": "undo-filled",
  10627. "font_class": "undo-filled",
  10628. "unicode": "e64c",
  10629. "unicode_decimal": 58956
  10630. }, {
  10631. "icon_id": "24855816",
  10632. "name": "more",
  10633. "font_class": "more",
  10634. "unicode": "e64d",
  10635. "unicode_decimal": 58957
  10636. }, {
  10637. "icon_id": "24855817",
  10638. "name": "more-filled",
  10639. "font_class": "more-filled",
  10640. "unicode": "e64e",
  10641. "unicode_decimal": 58958
  10642. }, {
  10643. "icon_id": "24855818",
  10644. "name": "undo",
  10645. "font_class": "undo",
  10646. "unicode": "e64f",
  10647. "unicode_decimal": 58959
  10648. }, {
  10649. "icon_id": "24855819",
  10650. "name": "images",
  10651. "font_class": "images",
  10652. "unicode": "e650",
  10653. "unicode_decimal": 58960
  10654. }, {
  10655. "icon_id": "24855821",
  10656. "name": "paperclip",
  10657. "font_class": "paperclip",
  10658. "unicode": "e652",
  10659. "unicode_decimal": 58962
  10660. }, {
  10661. "icon_id": "24855822",
  10662. "name": "settings",
  10663. "font_class": "settings",
  10664. "unicode": "e653",
  10665. "unicode_decimal": 58963
  10666. }, {
  10667. "icon_id": "24855823",
  10668. "name": "search",
  10669. "font_class": "search",
  10670. "unicode": "e654",
  10671. "unicode_decimal": 58964
  10672. }, {
  10673. "icon_id": "24855824",
  10674. "name": "redo-filled",
  10675. "font_class": "redo-filled",
  10676. "unicode": "e655",
  10677. "unicode_decimal": 58965
  10678. }, {
  10679. "icon_id": "24841702",
  10680. "name": "list",
  10681. "font_class": "list",
  10682. "unicode": "e644",
  10683. "unicode_decimal": 58948
  10684. }, {
  10685. "icon_id": "24841489",
  10686. "name": "mail-open-filled",
  10687. "font_class": "mail-open-filled",
  10688. "unicode": "e63a",
  10689. "unicode_decimal": 58938
  10690. }, {
  10691. "icon_id": "24841491",
  10692. "name": "hand-thumbsdown-filled",
  10693. "font_class": "hand-down-filled",
  10694. "unicode": "e63c",
  10695. "unicode_decimal": 58940
  10696. }, {
  10697. "icon_id": "24841492",
  10698. "name": "hand-thumbsdown",
  10699. "font_class": "hand-down",
  10700. "unicode": "e63d",
  10701. "unicode_decimal": 58941
  10702. }, {
  10703. "icon_id": "24841493",
  10704. "name": "hand-thumbsup-filled",
  10705. "font_class": "hand-up-filled",
  10706. "unicode": "e63e",
  10707. "unicode_decimal": 58942
  10708. }, {
  10709. "icon_id": "24841494",
  10710. "name": "hand-thumbsup",
  10711. "font_class": "hand-up",
  10712. "unicode": "e63f",
  10713. "unicode_decimal": 58943
  10714. }, {
  10715. "icon_id": "24841496",
  10716. "name": "heart-filled",
  10717. "font_class": "heart-filled",
  10718. "unicode": "e641",
  10719. "unicode_decimal": 58945
  10720. }, {
  10721. "icon_id": "24841498",
  10722. "name": "mail-open",
  10723. "font_class": "mail-open",
  10724. "unicode": "e643",
  10725. "unicode_decimal": 58947
  10726. }, {
  10727. "icon_id": "24841488",
  10728. "name": "heart",
  10729. "font_class": "heart",
  10730. "unicode": "e639",
  10731. "unicode_decimal": 58937
  10732. }, {
  10733. "icon_id": "24839963",
  10734. "name": "loop",
  10735. "font_class": "loop",
  10736. "unicode": "e633",
  10737. "unicode_decimal": 58931
  10738. }, {
  10739. "icon_id": "24839866",
  10740. "name": "pulldown",
  10741. "font_class": "pulldown",
  10742. "unicode": "e632",
  10743. "unicode_decimal": 58930
  10744. }, {
  10745. "icon_id": "24813798",
  10746. "name": "scan",
  10747. "font_class": "scan",
  10748. "unicode": "e62a",
  10749. "unicode_decimal": 58922
  10750. }, {
  10751. "icon_id": "24813786",
  10752. "name": "bars",
  10753. "font_class": "bars",
  10754. "unicode": "e627",
  10755. "unicode_decimal": 58919
  10756. }, {
  10757. "icon_id": "24813788",
  10758. "name": "cart-filled",
  10759. "font_class": "cart-filled",
  10760. "unicode": "e629",
  10761. "unicode_decimal": 58921
  10762. }, {
  10763. "icon_id": "24813790",
  10764. "name": "checkbox",
  10765. "font_class": "checkbox",
  10766. "unicode": "e62b",
  10767. "unicode_decimal": 58923
  10768. }, {
  10769. "icon_id": "24813791",
  10770. "name": "checkbox-filled",
  10771. "font_class": "checkbox-filled",
  10772. "unicode": "e62c",
  10773. "unicode_decimal": 58924
  10774. }, {
  10775. "icon_id": "24813794",
  10776. "name": "shop",
  10777. "font_class": "shop",
  10778. "unicode": "e62f",
  10779. "unicode_decimal": 58927
  10780. }, {
  10781. "icon_id": "24813795",
  10782. "name": "headphones",
  10783. "font_class": "headphones",
  10784. "unicode": "e630",
  10785. "unicode_decimal": 58928
  10786. }, {
  10787. "icon_id": "24813796",
  10788. "name": "cart",
  10789. "font_class": "cart",
  10790. "unicode": "e631",
  10791. "unicode_decimal": 58929
  10792. }]
  10793. };
  10794. exports.default = _default;
  10795. /***/ }),
  10796. /***/ 374:
  10797. /*!**********************************************************************************!*\
  10798. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-forms/components/uni-forms/validate.js ***!
  10799. \**********************************************************************************/
  10800. /*! no static exports found */
  10801. /***/ (function(module, exports, __webpack_require__) {
  10802. "use strict";
  10803. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10804. Object.defineProperty(exports, "__esModule", {
  10805. value: true
  10806. });
  10807. exports.default = void 0;
  10808. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  10809. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 375));
  10810. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 376));
  10811. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 378));
  10812. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  10813. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  10814. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  10815. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  10816. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
  10817. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  10818. var pattern = {
  10819. email: /^\S+?@\S+?\.\S+?$/,
  10820. idcard: /^[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]$/,
  10821. url: new RegExp("^(?!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]*)?$", 'i')
  10822. };
  10823. var FORMAT_MAPPING = {
  10824. "int": 'integer',
  10825. "bool": 'boolean',
  10826. "double": 'number',
  10827. "long": 'number',
  10828. "password": 'string'
  10829. // "fileurls": 'array'
  10830. };
  10831. function formatMessage(args) {
  10832. var resources = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  10833. var defaultMessage = ['label'];
  10834. defaultMessage.forEach(function (item) {
  10835. if (args[item] === undefined) {
  10836. args[item] = '';
  10837. }
  10838. });
  10839. var str = resources;
  10840. for (var key in args) {
  10841. var reg = new RegExp('{' + key + '}');
  10842. str = str.replace(reg, args[key]);
  10843. }
  10844. return str;
  10845. }
  10846. function isEmptyValue(value, type) {
  10847. if (value === undefined || value === null) {
  10848. return true;
  10849. }
  10850. if (typeof value === 'string' && !value) {
  10851. return true;
  10852. }
  10853. if (Array.isArray(value) && !value.length) {
  10854. return true;
  10855. }
  10856. if (type === 'object' && !Object.keys(value).length) {
  10857. return true;
  10858. }
  10859. return false;
  10860. }
  10861. var types = {
  10862. integer: function integer(value) {
  10863. return types.number(value) && parseInt(value, 10) === value;
  10864. },
  10865. string: function string(value) {
  10866. return typeof value === 'string';
  10867. },
  10868. number: function number(value) {
  10869. if (isNaN(value)) {
  10870. return false;
  10871. }
  10872. return typeof value === 'number';
  10873. },
  10874. "boolean": function boolean(value) {
  10875. return typeof value === 'boolean';
  10876. },
  10877. "float": function float(value) {
  10878. return types.number(value) && !types.integer(value);
  10879. },
  10880. array: function array(value) {
  10881. return Array.isArray(value);
  10882. },
  10883. object: function object(value) {
  10884. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  10885. },
  10886. date: function date(value) {
  10887. return value instanceof Date;
  10888. },
  10889. timestamp: function timestamp(value) {
  10890. if (!this.integer(value) || Math.abs(value).toString().length > 16) {
  10891. return false;
  10892. }
  10893. return true;
  10894. },
  10895. file: function file(value) {
  10896. return typeof value.url === 'string';
  10897. },
  10898. email: function email(value) {
  10899. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  10900. },
  10901. url: function url(value) {
  10902. return typeof value === 'string' && !!value.match(pattern.url);
  10903. },
  10904. pattern: function pattern(reg, value) {
  10905. try {
  10906. return new RegExp(reg).test(value);
  10907. } catch (e) {
  10908. return false;
  10909. }
  10910. },
  10911. method: function method(value) {
  10912. return typeof value === 'function';
  10913. },
  10914. idcard: function idcard(value) {
  10915. return typeof value === 'string' && !!value.match(pattern.idcard);
  10916. },
  10917. 'url-https': function urlHttps(value) {
  10918. return this.url(value) && value.startsWith('https://');
  10919. },
  10920. 'url-scheme': function urlScheme(value) {
  10921. return value.startsWith('://');
  10922. },
  10923. 'url-web': function urlWeb(value) {
  10924. return false;
  10925. }
  10926. };
  10927. var RuleValidator = /*#__PURE__*/function () {
  10928. function RuleValidator(message) {
  10929. (0, _classCallCheck2.default)(this, RuleValidator);
  10930. this._message = message;
  10931. }
  10932. (0, _createClass2.default)(RuleValidator, [{
  10933. key: "validateRule",
  10934. value: function () {
  10935. var _validateRule = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(fieldKey, fieldValue, value, data, allData) {
  10936. var result, rules, hasRequired, message, i, rule, vt, now, resultExpr;
  10937. return _regenerator.default.wrap(function _callee$(_context) {
  10938. while (1) {
  10939. switch (_context.prev = _context.next) {
  10940. case 0:
  10941. result = null;
  10942. rules = fieldValue.rules;
  10943. hasRequired = rules.findIndex(function (item) {
  10944. return item.required;
  10945. });
  10946. if (!(hasRequired < 0)) {
  10947. _context.next = 8;
  10948. break;
  10949. }
  10950. if (!(value === null || value === undefined)) {
  10951. _context.next = 6;
  10952. break;
  10953. }
  10954. return _context.abrupt("return", result);
  10955. case 6:
  10956. if (!(typeof value === 'string' && !value.length)) {
  10957. _context.next = 8;
  10958. break;
  10959. }
  10960. return _context.abrupt("return", result);
  10961. case 8:
  10962. message = this._message;
  10963. if (!(rules === undefined)) {
  10964. _context.next = 11;
  10965. break;
  10966. }
  10967. return _context.abrupt("return", message['default']);
  10968. case 11:
  10969. i = 0;
  10970. case 12:
  10971. if (!(i < rules.length)) {
  10972. _context.next = 35;
  10973. break;
  10974. }
  10975. rule = rules[i];
  10976. vt = this._getValidateType(rule);
  10977. Object.assign(rule, {
  10978. label: fieldValue.label || "[\"".concat(fieldKey, "\"]")
  10979. });
  10980. if (!RuleValidatorHelper[vt]) {
  10981. _context.next = 20;
  10982. break;
  10983. }
  10984. result = RuleValidatorHelper[vt](rule, value, message);
  10985. if (!(result != null)) {
  10986. _context.next = 20;
  10987. break;
  10988. }
  10989. return _context.abrupt("break", 35);
  10990. case 20:
  10991. if (!rule.validateExpr) {
  10992. _context.next = 26;
  10993. break;
  10994. }
  10995. now = Date.now();
  10996. resultExpr = rule.validateExpr(value, allData, now);
  10997. if (!(resultExpr === false)) {
  10998. _context.next = 26;
  10999. break;
  11000. }
  11001. result = this._getMessage(rule, rule.errorMessage || this._message['default']);
  11002. return _context.abrupt("break", 35);
  11003. case 26:
  11004. if (!rule.validateFunction) {
  11005. _context.next = 32;
  11006. break;
  11007. }
  11008. _context.next = 29;
  11009. return this.validateFunction(rule, value, data, allData, vt);
  11010. case 29:
  11011. result = _context.sent;
  11012. if (!(result !== null)) {
  11013. _context.next = 32;
  11014. break;
  11015. }
  11016. return _context.abrupt("break", 35);
  11017. case 32:
  11018. i++;
  11019. _context.next = 12;
  11020. break;
  11021. case 35:
  11022. if (result !== null) {
  11023. result = message.TAG + result;
  11024. }
  11025. return _context.abrupt("return", result);
  11026. case 37:
  11027. case "end":
  11028. return _context.stop();
  11029. }
  11030. }
  11031. }, _callee, this);
  11032. }));
  11033. function validateRule(_x, _x2, _x3, _x4, _x5) {
  11034. return _validateRule.apply(this, arguments);
  11035. }
  11036. return validateRule;
  11037. }()
  11038. }, {
  11039. key: "validateFunction",
  11040. value: function () {
  11041. var _validateFunction = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(rule, value, data, allData, vt) {
  11042. var result, callbackMessage, res;
  11043. return _regenerator.default.wrap(function _callee2$(_context2) {
  11044. while (1) {
  11045. switch (_context2.prev = _context2.next) {
  11046. case 0:
  11047. result = null;
  11048. _context2.prev = 1;
  11049. callbackMessage = null;
  11050. _context2.next = 5;
  11051. return rule.validateFunction(rule, value, allData || data, function (message) {
  11052. callbackMessage = message;
  11053. });
  11054. case 5:
  11055. res = _context2.sent;
  11056. if (callbackMessage || typeof res === 'string' && res || res === false) {
  11057. result = this._getMessage(rule, callbackMessage || res, vt);
  11058. }
  11059. _context2.next = 12;
  11060. break;
  11061. case 9:
  11062. _context2.prev = 9;
  11063. _context2.t0 = _context2["catch"](1);
  11064. result = this._getMessage(rule, _context2.t0.message, vt);
  11065. case 12:
  11066. return _context2.abrupt("return", result);
  11067. case 13:
  11068. case "end":
  11069. return _context2.stop();
  11070. }
  11071. }
  11072. }, _callee2, this, [[1, 9]]);
  11073. }));
  11074. function validateFunction(_x6, _x7, _x8, _x9, _x10) {
  11075. return _validateFunction.apply(this, arguments);
  11076. }
  11077. return validateFunction;
  11078. }()
  11079. }, {
  11080. key: "_getMessage",
  11081. value: function _getMessage(rule, message, vt) {
  11082. return formatMessage(rule, message || rule.errorMessage || this._message[vt] || message['default']);
  11083. }
  11084. }, {
  11085. key: "_getValidateType",
  11086. value: function _getValidateType(rule) {
  11087. var result = '';
  11088. if (rule.required) {
  11089. result = 'required';
  11090. } else if (rule.format) {
  11091. result = 'format';
  11092. } else if (rule.arrayType) {
  11093. result = 'arrayTypeFormat';
  11094. } else if (rule.range) {
  11095. result = 'range';
  11096. } else if (rule.maximum !== undefined || rule.minimum !== undefined) {
  11097. result = 'rangeNumber';
  11098. } else if (rule.maxLength !== undefined || rule.minLength !== undefined) {
  11099. result = 'rangeLength';
  11100. } else if (rule.pattern) {
  11101. result = 'pattern';
  11102. } else if (rule.validateFunction) {
  11103. result = 'validateFunction';
  11104. }
  11105. return result;
  11106. }
  11107. }]);
  11108. return RuleValidator;
  11109. }();
  11110. var RuleValidatorHelper = {
  11111. required: function required(rule, value, message) {
  11112. if (rule.required && isEmptyValue(value, rule.format || (0, _typeof2.default)(value))) {
  11113. return formatMessage(rule, rule.errorMessage || message.required);
  11114. }
  11115. return null;
  11116. },
  11117. range: function range(rule, value, message) {
  11118. var range = rule.range,
  11119. errorMessage = rule.errorMessage;
  11120. var list = new Array(range.length);
  11121. for (var i = 0; i < range.length; i++) {
  11122. var item = range[i];
  11123. if (types.object(item) && item.value !== undefined) {
  11124. list[i] = item.value;
  11125. } else {
  11126. list[i] = item;
  11127. }
  11128. }
  11129. var result = false;
  11130. if (Array.isArray(value)) {
  11131. result = new Set(value.concat(list)).size === list.length;
  11132. } else {
  11133. if (list.indexOf(value) > -1) {
  11134. result = true;
  11135. }
  11136. }
  11137. if (!result) {
  11138. return formatMessage(rule, errorMessage || message['enum']);
  11139. }
  11140. return null;
  11141. },
  11142. rangeNumber: function rangeNumber(rule, value, message) {
  11143. if (!types.number(value)) {
  11144. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  11145. }
  11146. var minimum = rule.minimum,
  11147. maximum = rule.maximum,
  11148. exclusiveMinimum = rule.exclusiveMinimum,
  11149. exclusiveMaximum = rule.exclusiveMaximum;
  11150. var min = exclusiveMinimum ? value <= minimum : value < minimum;
  11151. var max = exclusiveMaximum ? value >= maximum : value > maximum;
  11152. if (minimum !== undefined && min) {
  11153. return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMinimum ? 'exclusiveMinimum' : 'minimum']);
  11154. } else if (maximum !== undefined && max) {
  11155. return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMaximum ? 'exclusiveMaximum' : 'maximum']);
  11156. } else if (minimum !== undefined && maximum !== undefined && (min || max)) {
  11157. return formatMessage(rule, rule.errorMessage || message['number'].range);
  11158. }
  11159. return null;
  11160. },
  11161. rangeLength: function rangeLength(rule, value, message) {
  11162. if (!types.string(value) && !types.array(value)) {
  11163. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  11164. }
  11165. var min = rule.minLength;
  11166. var max = rule.maxLength;
  11167. var val = value.length;
  11168. if (min !== undefined && val < min) {
  11169. return formatMessage(rule, rule.errorMessage || message['length'].minLength);
  11170. } else if (max !== undefined && val > max) {
  11171. return formatMessage(rule, rule.errorMessage || message['length'].maxLength);
  11172. } else if (min !== undefined && max !== undefined && (val < min || val > max)) {
  11173. return formatMessage(rule, rule.errorMessage || message['length'].range);
  11174. }
  11175. return null;
  11176. },
  11177. pattern: function pattern(rule, value, message) {
  11178. if (!types['pattern'](rule.pattern, value)) {
  11179. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  11180. }
  11181. return null;
  11182. },
  11183. format: function format(rule, value, message) {
  11184. var customTypes = Object.keys(types);
  11185. var format = FORMAT_MAPPING[rule.format] ? FORMAT_MAPPING[rule.format] : rule.format || rule.arrayType;
  11186. if (customTypes.indexOf(format) > -1) {
  11187. if (!types[format](value)) {
  11188. return formatMessage(rule, rule.errorMessage || message.typeError);
  11189. }
  11190. }
  11191. return null;
  11192. },
  11193. arrayTypeFormat: function arrayTypeFormat(rule, value, message) {
  11194. if (!Array.isArray(value)) {
  11195. return formatMessage(rule, rule.errorMessage || message.typeError);
  11196. }
  11197. for (var i = 0; i < value.length; i++) {
  11198. var element = value[i];
  11199. var formatResult = this.format(rule, element, message);
  11200. if (formatResult !== null) {
  11201. return formatResult;
  11202. }
  11203. }
  11204. return null;
  11205. }
  11206. };
  11207. var SchemaValidator = /*#__PURE__*/function (_RuleValidator) {
  11208. (0, _inherits2.default)(SchemaValidator, _RuleValidator);
  11209. var _super = _createSuper(SchemaValidator);
  11210. function SchemaValidator(schema, options) {
  11211. var _this;
  11212. (0, _classCallCheck2.default)(this, SchemaValidator);
  11213. _this = _super.call(this, SchemaValidator.message);
  11214. _this._schema = schema;
  11215. _this._options = options || null;
  11216. return _this;
  11217. }
  11218. (0, _createClass2.default)(SchemaValidator, [{
  11219. key: "updateSchema",
  11220. value: function updateSchema(schema) {
  11221. this._schema = schema;
  11222. }
  11223. }, {
  11224. key: "validate",
  11225. value: function () {
  11226. var _validate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(data, allData) {
  11227. var result;
  11228. return _regenerator.default.wrap(function _callee3$(_context3) {
  11229. while (1) {
  11230. switch (_context3.prev = _context3.next) {
  11231. case 0:
  11232. result = this._checkFieldInSchema(data);
  11233. if (result) {
  11234. _context3.next = 5;
  11235. break;
  11236. }
  11237. _context3.next = 4;
  11238. return this.invokeValidate(data, false, allData);
  11239. case 4:
  11240. result = _context3.sent;
  11241. case 5:
  11242. return _context3.abrupt("return", result.length ? result[0] : null);
  11243. case 6:
  11244. case "end":
  11245. return _context3.stop();
  11246. }
  11247. }
  11248. }, _callee3, this);
  11249. }));
  11250. function validate(_x11, _x12) {
  11251. return _validate.apply(this, arguments);
  11252. }
  11253. return validate;
  11254. }()
  11255. }, {
  11256. key: "validateAll",
  11257. value: function () {
  11258. var _validateAll = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data, allData) {
  11259. var result;
  11260. return _regenerator.default.wrap(function _callee4$(_context4) {
  11261. while (1) {
  11262. switch (_context4.prev = _context4.next) {
  11263. case 0:
  11264. result = this._checkFieldInSchema(data);
  11265. if (result) {
  11266. _context4.next = 5;
  11267. break;
  11268. }
  11269. _context4.next = 4;
  11270. return this.invokeValidate(data, true, allData);
  11271. case 4:
  11272. result = _context4.sent;
  11273. case 5:
  11274. return _context4.abrupt("return", result);
  11275. case 6:
  11276. case "end":
  11277. return _context4.stop();
  11278. }
  11279. }
  11280. }, _callee4, this);
  11281. }));
  11282. function validateAll(_x13, _x14) {
  11283. return _validateAll.apply(this, arguments);
  11284. }
  11285. return validateAll;
  11286. }()
  11287. }, {
  11288. key: "validateUpdate",
  11289. value: function () {
  11290. var _validateUpdate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data, allData) {
  11291. var result;
  11292. return _regenerator.default.wrap(function _callee5$(_context5) {
  11293. while (1) {
  11294. switch (_context5.prev = _context5.next) {
  11295. case 0:
  11296. result = this._checkFieldInSchema(data);
  11297. if (result) {
  11298. _context5.next = 5;
  11299. break;
  11300. }
  11301. _context5.next = 4;
  11302. return this.invokeValidateUpdate(data, false, allData);
  11303. case 4:
  11304. result = _context5.sent;
  11305. case 5:
  11306. return _context5.abrupt("return", result.length ? result[0] : null);
  11307. case 6:
  11308. case "end":
  11309. return _context5.stop();
  11310. }
  11311. }
  11312. }, _callee5, this);
  11313. }));
  11314. function validateUpdate(_x15, _x16) {
  11315. return _validateUpdate.apply(this, arguments);
  11316. }
  11317. return validateUpdate;
  11318. }()
  11319. }, {
  11320. key: "invokeValidate",
  11321. value: function () {
  11322. var _invokeValidate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(data, all, allData) {
  11323. var result, schema, key, value, errorMessage;
  11324. return _regenerator.default.wrap(function _callee6$(_context6) {
  11325. while (1) {
  11326. switch (_context6.prev = _context6.next) {
  11327. case 0:
  11328. result = [];
  11329. schema = this._schema;
  11330. _context6.t0 = _regenerator.default.keys(schema);
  11331. case 3:
  11332. if ((_context6.t1 = _context6.t0()).done) {
  11333. _context6.next = 15;
  11334. break;
  11335. }
  11336. key = _context6.t1.value;
  11337. value = schema[key];
  11338. _context6.next = 8;
  11339. return this.validateRule(key, value, data[key], data, allData);
  11340. case 8:
  11341. errorMessage = _context6.sent;
  11342. if (!(errorMessage != null)) {
  11343. _context6.next = 13;
  11344. break;
  11345. }
  11346. result.push({
  11347. key: key,
  11348. errorMessage: errorMessage
  11349. });
  11350. if (all) {
  11351. _context6.next = 13;
  11352. break;
  11353. }
  11354. return _context6.abrupt("break", 15);
  11355. case 13:
  11356. _context6.next = 3;
  11357. break;
  11358. case 15:
  11359. return _context6.abrupt("return", result);
  11360. case 16:
  11361. case "end":
  11362. return _context6.stop();
  11363. }
  11364. }
  11365. }, _callee6, this);
  11366. }));
  11367. function invokeValidate(_x17, _x18, _x19) {
  11368. return _invokeValidate.apply(this, arguments);
  11369. }
  11370. return invokeValidate;
  11371. }()
  11372. }, {
  11373. key: "invokeValidateUpdate",
  11374. value: function () {
  11375. var _invokeValidateUpdate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(data, all, allData) {
  11376. var result, key, errorMessage;
  11377. return _regenerator.default.wrap(function _callee7$(_context7) {
  11378. while (1) {
  11379. switch (_context7.prev = _context7.next) {
  11380. case 0:
  11381. result = [];
  11382. _context7.t0 = _regenerator.default.keys(data);
  11383. case 2:
  11384. if ((_context7.t1 = _context7.t0()).done) {
  11385. _context7.next = 13;
  11386. break;
  11387. }
  11388. key = _context7.t1.value;
  11389. _context7.next = 6;
  11390. return this.validateRule(key, this._schema[key], data[key], data, allData);
  11391. case 6:
  11392. errorMessage = _context7.sent;
  11393. if (!(errorMessage != null)) {
  11394. _context7.next = 11;
  11395. break;
  11396. }
  11397. result.push({
  11398. key: key,
  11399. errorMessage: errorMessage
  11400. });
  11401. if (all) {
  11402. _context7.next = 11;
  11403. break;
  11404. }
  11405. return _context7.abrupt("break", 13);
  11406. case 11:
  11407. _context7.next = 2;
  11408. break;
  11409. case 13:
  11410. return _context7.abrupt("return", result);
  11411. case 14:
  11412. case "end":
  11413. return _context7.stop();
  11414. }
  11415. }
  11416. }, _callee7, this);
  11417. }));
  11418. function invokeValidateUpdate(_x20, _x21, _x22) {
  11419. return _invokeValidateUpdate.apply(this, arguments);
  11420. }
  11421. return invokeValidateUpdate;
  11422. }()
  11423. }, {
  11424. key: "_checkFieldInSchema",
  11425. value: function _checkFieldInSchema(data) {
  11426. var keys = Object.keys(data);
  11427. var keys2 = Object.keys(this._schema);
  11428. if (new Set(keys.concat(keys2)).size === keys2.length) {
  11429. return '';
  11430. }
  11431. var noExistFields = keys.filter(function (key) {
  11432. return keys2.indexOf(key) < 0;
  11433. });
  11434. var errorMessage = formatMessage({
  11435. field: JSON.stringify(noExistFields)
  11436. }, SchemaValidator.message.TAG + SchemaValidator.message['defaultInvalid']);
  11437. return [{
  11438. key: 'invalid',
  11439. errorMessage: errorMessage
  11440. }];
  11441. }
  11442. }]);
  11443. return SchemaValidator;
  11444. }(RuleValidator);
  11445. function Message() {
  11446. return {
  11447. TAG: "",
  11448. default: '验证错误',
  11449. defaultInvalid: '提交的字段{field}在数据库中并不存在',
  11450. validateFunction: '验证无效',
  11451. required: '{label}必填',
  11452. 'enum': '{label}超出范围',
  11453. timestamp: '{label}格式无效',
  11454. whitespace: '{label}不能为空',
  11455. typeError: '{label}类型无效',
  11456. date: {
  11457. format: '{label}日期{value}格式无效',
  11458. parse: '{label}日期无法解析,{value}无效',
  11459. invalid: '{label}日期{value}无效'
  11460. },
  11461. length: {
  11462. minLength: '{label}长度不能少于{minLength}',
  11463. maxLength: '{label}长度不能超过{maxLength}',
  11464. range: '{label}必须介于{minLength}和{maxLength}之间'
  11465. },
  11466. number: {
  11467. minimum: '{label}不能小于{minimum}',
  11468. maximum: '{label}不能大于{maximum}',
  11469. exclusiveMinimum: '{label}不能小于等于{minimum}',
  11470. exclusiveMaximum: '{label}不能大于等于{maximum}',
  11471. range: '{label}必须介于{minimum}and{maximum}之间'
  11472. },
  11473. pattern: {
  11474. mismatch: '{label}格式不匹配'
  11475. }
  11476. };
  11477. }
  11478. SchemaValidator.message = new Message();
  11479. var _default = SchemaValidator;
  11480. exports.default = _default;
  11481. /***/ }),
  11482. /***/ 375:
  11483. /*!*********************************************************!*\
  11484. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  11485. \*********************************************************/
  11486. /*! no static exports found */
  11487. /***/ (function(module, exports, __webpack_require__) {
  11488. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  11489. function _inherits(subClass, superClass) {
  11490. if (typeof superClass !== "function" && superClass !== null) {
  11491. throw new TypeError("Super expression must either be null or a function");
  11492. }
  11493. subClass.prototype = Object.create(superClass && superClass.prototype, {
  11494. constructor: {
  11495. value: subClass,
  11496. writable: true,
  11497. configurable: true
  11498. }
  11499. });
  11500. Object.defineProperty(subClass, "prototype", {
  11501. writable: false
  11502. });
  11503. if (superClass) setPrototypeOf(subClass, superClass);
  11504. }
  11505. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11506. /***/ }),
  11507. /***/ 376:
  11508. /*!**************************************************************************!*\
  11509. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  11510. \**************************************************************************/
  11511. /*! no static exports found */
  11512. /***/ (function(module, exports, __webpack_require__) {
  11513. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  11514. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 377);
  11515. function _possibleConstructorReturn(self, call) {
  11516. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  11517. return call;
  11518. } else if (call !== void 0) {
  11519. throw new TypeError("Derived constructors may only return object or undefined");
  11520. }
  11521. return assertThisInitialized(self);
  11522. }
  11523. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11524. /***/ }),
  11525. /***/ 377:
  11526. /*!**********************************************************************!*\
  11527. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  11528. \**********************************************************************/
  11529. /*! no static exports found */
  11530. /***/ (function(module, exports) {
  11531. function _assertThisInitialized(self) {
  11532. if (self === void 0) {
  11533. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  11534. }
  11535. return self;
  11536. }
  11537. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11538. /***/ }),
  11539. /***/ 378:
  11540. /*!***************************************************************!*\
  11541. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  11542. \***************************************************************/
  11543. /*! no static exports found */
  11544. /***/ (function(module, exports) {
  11545. function _getPrototypeOf(o) {
  11546. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  11547. return o.__proto__ || Object.getPrototypeOf(o);
  11548. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11549. return _getPrototypeOf(o);
  11550. }
  11551. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11552. /***/ }),
  11553. /***/ 379:
  11554. /*!*******************************************************************************!*\
  11555. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-forms/components/uni-forms/utils.js ***!
  11556. \*******************************************************************************/
  11557. /*! no static exports found */
  11558. /***/ (function(module, exports, __webpack_require__) {
  11559. "use strict";
  11560. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11561. Object.defineProperty(exports, "__esModule", {
  11562. value: true
  11563. });
  11564. exports.typeFilter = exports.type = exports.setDataValue = exports.realName = exports.rawData = exports.objSet = exports.objGet = exports.name2arr = exports.isRequiredField = exports.isRealName = exports.isNumber = exports.isEqual = exports.isBoolean = exports.getValue = exports.getDataValueType = exports.getDataValue = exports.deepCopy = void 0;
  11565. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  11566. /**
  11567. * 简单处理对象拷贝
  11568. * @param {Obejct} 被拷贝对象
  11569. * @@return {Object} 拷贝对象
  11570. */
  11571. var deepCopy = function deepCopy(val) {
  11572. return JSON.parse(JSON.stringify(val));
  11573. };
  11574. /**
  11575. * 过滤数字类型
  11576. * @param {String} format 数字类型
  11577. * @@return {Boolean} 返回是否为数字类型
  11578. */
  11579. exports.deepCopy = deepCopy;
  11580. var typeFilter = function typeFilter(format) {
  11581. return format === 'int' || format === 'double' || format === 'number' || format === 'timestamp';
  11582. };
  11583. /**
  11584. * 把 value 转换成指定的类型,用于处理初始值,原因是初始值需要入库不能为 undefined
  11585. * @param {String} key 字段名
  11586. * @param {any} value 字段值
  11587. * @param {Object} rules 表单校验规则
  11588. */
  11589. exports.typeFilter = typeFilter;
  11590. var getValue = function getValue(key, value, rules) {
  11591. var isRuleNumType = rules.find(function (val) {
  11592. return val.format && typeFilter(val.format);
  11593. });
  11594. var isRuleBoolType = rules.find(function (val) {
  11595. return val.format && val.format === 'boolean' || val.format === 'bool';
  11596. });
  11597. // 输入类型为 number
  11598. if (!!isRuleNumType) {
  11599. if (!value && value !== 0) {
  11600. value = null;
  11601. } else {
  11602. value = isNumber(Number(value)) ? Number(value) : value;
  11603. }
  11604. }
  11605. // 输入类型为 boolean
  11606. if (!!isRuleBoolType) {
  11607. value = isBoolean(value) ? value : false;
  11608. }
  11609. return value;
  11610. };
  11611. /**
  11612. * 获取表单数据
  11613. * @param {String|Array} name 真实名称,需要使用 realName 获取
  11614. * @param {Object} data 原始数据
  11615. * @param {any} value 需要设置的值
  11616. */
  11617. exports.getValue = getValue;
  11618. var setDataValue = function setDataValue(field, formdata, value) {
  11619. formdata[field] = value;
  11620. return value || '';
  11621. };
  11622. /**
  11623. * 获取表单数据
  11624. * @param {String|Array} field 真实名称,需要使用 realName 获取
  11625. * @param {Object} data 原始数据
  11626. */
  11627. exports.setDataValue = setDataValue;
  11628. var getDataValue = function getDataValue(field, data) {
  11629. return objGet(data, field);
  11630. };
  11631. /**
  11632. * 获取表单类型
  11633. * @param {String|Array} field 真实名称,需要使用 realName 获取
  11634. */
  11635. exports.getDataValue = getDataValue;
  11636. var getDataValueType = function getDataValueType(field, data) {
  11637. var value = getDataValue(field, data);
  11638. return {
  11639. type: type(value),
  11640. value: value
  11641. };
  11642. };
  11643. /**
  11644. * 获取表单可用的真实name
  11645. * @param {String|Array} name 表单name
  11646. * @@return {String} 表单可用的真实name
  11647. */
  11648. exports.getDataValueType = getDataValueType;
  11649. var realName = function realName(name) {
  11650. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  11651. var base_name = _basePath(name);
  11652. if ((0, _typeof2.default)(base_name) === 'object' && Array.isArray(base_name) && base_name.length > 1) {
  11653. var realname = base_name.reduce(function (a, b) {
  11654. return a += "#".concat(b);
  11655. }, '_formdata_');
  11656. return realname;
  11657. }
  11658. return base_name[0] || name;
  11659. };
  11660. /**
  11661. * 判断是否表单可用的真实name
  11662. * @param {String|Array} name 表单name
  11663. * @@return {String} 表单可用的真实name
  11664. */
  11665. exports.realName = realName;
  11666. var isRealName = function isRealName(name) {
  11667. var reg = /^_formdata_#*/;
  11668. return reg.test(name);
  11669. };
  11670. /**
  11671. * 获取表单数据的原始格式
  11672. * @@return {Object|Array} object 需要解析的数据
  11673. */
  11674. exports.isRealName = isRealName;
  11675. var rawData = function rawData() {
  11676. var object = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11677. var name = arguments.length > 1 ? arguments[1] : undefined;
  11678. var newData = JSON.parse(JSON.stringify(object));
  11679. var formData = {};
  11680. for (var i in newData) {
  11681. var path = name2arr(i);
  11682. objSet(formData, path, newData[i]);
  11683. }
  11684. return formData;
  11685. };
  11686. /**
  11687. * 真实name还原为 array
  11688. * @param {*} name
  11689. */
  11690. exports.rawData = rawData;
  11691. var name2arr = function name2arr(name) {
  11692. var field = name.replace('_formdata_#', '');
  11693. field = field.split('#').map(function (v) {
  11694. return isNumber(v) ? Number(v) : v;
  11695. });
  11696. return field;
  11697. };
  11698. /**
  11699. * 对象中设置值
  11700. * @param {Object|Array} object 源数据
  11701. * @param {String| Array} path 'a.b.c' 或 ['a',0,'b','c']
  11702. * @param {String} value 需要设置的值
  11703. */
  11704. exports.name2arr = name2arr;
  11705. var objSet = function objSet(object, path, value) {
  11706. if ((0, _typeof2.default)(object) !== 'object') return object;
  11707. _basePath(path).reduce(function (o, k, i, _) {
  11708. if (i === _.length - 1) {
  11709. // 若遍历结束直接赋值
  11710. o[k] = value;
  11711. return null;
  11712. } else if (k in o) {
  11713. // 若存在对应路径,则返回找到的对象,进行下一次遍历
  11714. return o[k];
  11715. } else {
  11716. // 若不存在对应路径,则创建对应对象,若下一路径是数字,新对象赋值为空数组,否则赋值为空对象
  11717. o[k] = /^[0-9]{1,}$/.test(_[i + 1]) ? [] : {};
  11718. return o[k];
  11719. }
  11720. }, object);
  11721. // 返回object
  11722. return object;
  11723. };
  11724. // 处理 path, path有三种形式:'a[0].b.c'、'a.0.b.c' 和 ['a','0','b','c'],需要统一处理成数组,便于后续使用
  11725. exports.objSet = objSet;
  11726. function _basePath(path) {
  11727. // 若是数组,则直接返回
  11728. if (Array.isArray(path)) return path;
  11729. // 若有 '[',']',则替换成将 '[' 替换成 '.',去掉 ']'
  11730. return path.replace(/\[/g, '.').replace(/\]/g, '').split('.');
  11731. }
  11732. /**
  11733. * 从对象中获取值
  11734. * @param {Object|Array} object 源数据
  11735. * @param {String| Array} path 'a.b.c' 或 ['a',0,'b','c']
  11736. * @param {String} defaultVal 如果无法从调用链中获取值的默认值
  11737. */
  11738. var objGet = function objGet(object, path) {
  11739. var defaultVal = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'undefined';
  11740. // 先将path处理成统一格式
  11741. var newPath = _basePath(path);
  11742. // 递归处理,返回最后结果
  11743. var val = newPath.reduce(function (o, k) {
  11744. return (o || {})[k];
  11745. }, object);
  11746. return !val || val !== undefined ? val : defaultVal;
  11747. };
  11748. /**
  11749. * 是否为 number 类型
  11750. * @param {any} num 需要判断的值
  11751. * @return {Boolean} 是否为 number
  11752. */
  11753. exports.objGet = objGet;
  11754. var isNumber = function isNumber(num) {
  11755. return !isNaN(Number(num));
  11756. };
  11757. /**
  11758. * 是否为 boolean 类型
  11759. * @param {any} bool 需要判断的值
  11760. * @return {Boolean} 是否为 boolean
  11761. */
  11762. exports.isNumber = isNumber;
  11763. var isBoolean = function isBoolean(bool) {
  11764. return typeof bool === 'boolean';
  11765. };
  11766. /**
  11767. * 是否有必填字段
  11768. * @param {Object} rules 规则
  11769. * @return {Boolean} 是否有必填字段
  11770. */
  11771. exports.isBoolean = isBoolean;
  11772. var isRequiredField = function isRequiredField(rules) {
  11773. var isNoField = false;
  11774. for (var i = 0; i < rules.length; i++) {
  11775. var ruleData = rules[i];
  11776. if (ruleData.required) {
  11777. isNoField = true;
  11778. break;
  11779. }
  11780. }
  11781. return isNoField;
  11782. };
  11783. /**
  11784. * 获取数据类型
  11785. * @param {Any} obj 需要获取数据类型的值
  11786. */
  11787. exports.isRequiredField = isRequiredField;
  11788. var type = function type(obj) {
  11789. var class2type = {};
  11790. // 生成class2type映射
  11791. "Boolean Number String Function Array Date RegExp Object Error".split(" ").map(function (item, index) {
  11792. class2type["[object " + item + "]"] = item.toLowerCase();
  11793. });
  11794. if (obj == null) {
  11795. return obj + "";
  11796. }
  11797. return (0, _typeof2.default)(obj) === "object" || typeof obj === "function" ? class2type[Object.prototype.toString.call(obj)] || "object" : (0, _typeof2.default)(obj);
  11798. };
  11799. /**
  11800. * 判断两个值是否相等
  11801. * @param {any} a 值
  11802. * @param {any} b 值
  11803. * @return {Boolean} 是否相等
  11804. */
  11805. exports.type = type;
  11806. var isEqual = function isEqual(a, b) {
  11807. //如果a和b本来就全等
  11808. if (a === b) {
  11809. //判断是否为0和-0
  11810. return a !== 0 || 1 / a === 1 / b;
  11811. }
  11812. //判断是否为null和undefined
  11813. if (a == null || b == null) {
  11814. return a === b;
  11815. }
  11816. //接下来判断a和b的数据类型
  11817. var classNameA = toString.call(a),
  11818. classNameB = toString.call(b);
  11819. //如果数据类型不相等,则返回false
  11820. if (classNameA !== classNameB) {
  11821. return false;
  11822. }
  11823. //如果数据类型相等,再根据不同数据类型分别判断
  11824. switch (classNameA) {
  11825. case '[object RegExp]':
  11826. case '[object String]':
  11827. //进行字符串转换比较
  11828. return '' + a === '' + b;
  11829. case '[object Number]':
  11830. //进行数字转换比较,判断是否为NaN
  11831. if (+a !== +a) {
  11832. return +b !== +b;
  11833. }
  11834. //判断是否为0或-0
  11835. return +a === 0 ? 1 / +a === 1 / b : +a === +b;
  11836. case '[object Date]':
  11837. case '[object Boolean]':
  11838. return +a === +b;
  11839. }
  11840. //如果是对象类型
  11841. if (classNameA == '[object Object]') {
  11842. //获取a和b的属性长度
  11843. var propsA = Object.getOwnPropertyNames(a),
  11844. propsB = Object.getOwnPropertyNames(b);
  11845. if (propsA.length != propsB.length) {
  11846. return false;
  11847. }
  11848. for (var i = 0; i < propsA.length; i++) {
  11849. var propName = propsA[i];
  11850. //如果对应属性对应值不相等,则返回false
  11851. if (a[propName] !== b[propName]) {
  11852. return false;
  11853. }
  11854. }
  11855. return true;
  11856. }
  11857. //如果是数组类型
  11858. if (classNameA == '[object Array]') {
  11859. if (a.toString() == b.toString()) {
  11860. return true;
  11861. }
  11862. return false;
  11863. }
  11864. };
  11865. exports.isEqual = isEqual;
  11866. /***/ }),
  11867. /***/ 394:
  11868. /*!************************************************************************************!*\
  11869. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  11870. \************************************************************************************/
  11871. /*! no static exports found */
  11872. /***/ (function(module, exports, __webpack_require__) {
  11873. "use strict";
  11874. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  11875. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11876. Object.defineProperty(exports, "__esModule", {
  11877. value: true
  11878. });
  11879. exports.default = void 0;
  11880. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  11881. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 377));
  11882. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  11883. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  11884. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  11885. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  11886. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 375));
  11887. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 376));
  11888. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 378));
  11889. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 395));
  11890. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  11891. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  11892. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  11893. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  11894. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 397));
  11895. function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e34) { throw _e34; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e35) { didErr = true; err = _e35; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
  11896. 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); }
  11897. 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; }
  11898. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
  11899. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
  11900. function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
  11901. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
  11902. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  11903. function n(e) {
  11904. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  11905. }
  11906. function s(e, t, n) {
  11907. return e(n = {
  11908. path: t,
  11909. exports: {},
  11910. require: function require(e, t) {
  11911. return function () {
  11912. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  11913. }(null == t && n.path);
  11914. }
  11915. }, n.exports), n.exports;
  11916. }
  11917. var r = s(function (e, t) {
  11918. var n;
  11919. e.exports = (n = n || function (e, t) {
  11920. var n = Object.create || function () {
  11921. function e() {}
  11922. return function (t) {
  11923. var n;
  11924. return e.prototype = t, n = new e(), e.prototype = null, n;
  11925. };
  11926. }(),
  11927. s = {},
  11928. r = s.lib = {},
  11929. i = r.Base = {
  11930. extend: function extend(e) {
  11931. var t = n(this);
  11932. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  11933. t.$super.init.apply(this, arguments);
  11934. }), t.init.prototype = t, t.$super = this, t;
  11935. },
  11936. create: function create() {
  11937. var e = this.extend();
  11938. return e.init.apply(e, arguments), e;
  11939. },
  11940. init: function init() {},
  11941. mixIn: function mixIn(e) {
  11942. for (var t in e) {
  11943. e.hasOwnProperty(t) && (this[t] = e[t]);
  11944. }
  11945. e.hasOwnProperty("toString") && (this.toString = e.toString);
  11946. },
  11947. clone: function clone() {
  11948. return this.init.prototype.extend(this);
  11949. }
  11950. },
  11951. o = r.WordArray = i.extend({
  11952. init: function init(e, n) {
  11953. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  11954. },
  11955. toString: function toString(e) {
  11956. return (e || c).stringify(this);
  11957. },
  11958. concat: function concat(e) {
  11959. var t = this.words,
  11960. n = e.words,
  11961. s = this.sigBytes,
  11962. r = e.sigBytes;
  11963. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  11964. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  11965. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  11966. } else for (i = 0; i < r; i += 4) {
  11967. t[s + i >>> 2] = n[i >>> 2];
  11968. }
  11969. return this.sigBytes += r, this;
  11970. },
  11971. clamp: function clamp() {
  11972. var t = this.words,
  11973. n = this.sigBytes;
  11974. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  11975. },
  11976. clone: function clone() {
  11977. var e = i.clone.call(this);
  11978. return e.words = this.words.slice(0), e;
  11979. },
  11980. random: function random(t) {
  11981. for (var n, s = [], r = function r(t) {
  11982. t = t;
  11983. var n = 987654321,
  11984. s = 4294967295;
  11985. return function () {
  11986. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  11987. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  11988. };
  11989. }, i = 0; i < t; i += 4) {
  11990. var a = r(4294967296 * (n || e.random()));
  11991. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  11992. }
  11993. return new o.init(s, t);
  11994. }
  11995. }),
  11996. a = s.enc = {},
  11997. c = a.Hex = {
  11998. stringify: function stringify(e) {
  11999. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  12000. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  12001. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  12002. }
  12003. return s.join("");
  12004. },
  12005. parse: function parse(e) {
  12006. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  12007. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  12008. }
  12009. return new o.init(n, t / 2);
  12010. }
  12011. },
  12012. u = a.Latin1 = {
  12013. stringify: function stringify(e) {
  12014. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  12015. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  12016. s.push(String.fromCharCode(i));
  12017. }
  12018. return s.join("");
  12019. },
  12020. parse: function parse(e) {
  12021. for (var t = e.length, n = [], s = 0; s < t; s++) {
  12022. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  12023. }
  12024. return new o.init(n, t);
  12025. }
  12026. },
  12027. h = a.Utf8 = {
  12028. stringify: function stringify(e) {
  12029. try {
  12030. return decodeURIComponent(escape(u.stringify(e)));
  12031. } catch (e) {
  12032. throw new Error("Malformed UTF-8 data");
  12033. }
  12034. },
  12035. parse: function parse(e) {
  12036. return u.parse(unescape(encodeURIComponent(e)));
  12037. }
  12038. },
  12039. l = r.BufferedBlockAlgorithm = i.extend({
  12040. reset: function reset() {
  12041. this._data = new o.init(), this._nDataBytes = 0;
  12042. },
  12043. _append: function _append(e) {
  12044. "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  12045. },
  12046. _process: function _process(t) {
  12047. var n = this._data,
  12048. s = n.words,
  12049. r = n.sigBytes,
  12050. i = this.blockSize,
  12051. a = r / (4 * i),
  12052. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  12053. u = e.min(4 * c, r);
  12054. if (c) {
  12055. for (var h = 0; h < c; h += i) {
  12056. this._doProcessBlock(s, h);
  12057. }
  12058. var l = s.splice(0, c);
  12059. n.sigBytes -= u;
  12060. }
  12061. return new o.init(l, u);
  12062. },
  12063. clone: function clone() {
  12064. var e = i.clone.call(this);
  12065. return e._data = this._data.clone(), e;
  12066. },
  12067. _minBufferSize: 0
  12068. });
  12069. r.Hasher = l.extend({
  12070. cfg: i.extend(),
  12071. init: function init(e) {
  12072. this.cfg = this.cfg.extend(e), this.reset();
  12073. },
  12074. reset: function reset() {
  12075. l.reset.call(this), this._doReset();
  12076. },
  12077. update: function update(e) {
  12078. return this._append(e), this._process(), this;
  12079. },
  12080. finalize: function finalize(e) {
  12081. return e && this._append(e), this._doFinalize();
  12082. },
  12083. blockSize: 16,
  12084. _createHelper: function _createHelper(e) {
  12085. return function (t, n) {
  12086. return new e.init(n).finalize(t);
  12087. };
  12088. },
  12089. _createHmacHelper: function _createHmacHelper(e) {
  12090. return function (t, n) {
  12091. return new d.HMAC.init(e, n).finalize(t);
  12092. };
  12093. }
  12094. });
  12095. var d = s.algo = {};
  12096. return s;
  12097. }(Math), n);
  12098. }),
  12099. i = r,
  12100. o = (s(function (e, t) {
  12101. var n;
  12102. e.exports = (n = i, function (e) {
  12103. var t = n,
  12104. s = t.lib,
  12105. r = s.WordArray,
  12106. i = s.Hasher,
  12107. o = t.algo,
  12108. a = [];
  12109. !function () {
  12110. for (var t = 0; t < 64; t++) {
  12111. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  12112. }
  12113. }();
  12114. var c = o.MD5 = i.extend({
  12115. _doReset: function _doReset() {
  12116. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  12117. },
  12118. _doProcessBlock: function _doProcessBlock(e, t) {
  12119. for (var n = 0; n < 16; n++) {
  12120. var s = t + n,
  12121. r = e[s];
  12122. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  12123. }
  12124. var i = this._hash.words,
  12125. o = e[t + 0],
  12126. c = e[t + 1],
  12127. p = e[t + 2],
  12128. f = e[t + 3],
  12129. g = e[t + 4],
  12130. m = e[t + 5],
  12131. y = e[t + 6],
  12132. _ = e[t + 7],
  12133. w = e[t + 8],
  12134. v = e[t + 9],
  12135. S = e[t + 10],
  12136. I = e[t + 11],
  12137. b = e[t + 12],
  12138. k = e[t + 13],
  12139. T = e[t + 14],
  12140. C = e[t + 15],
  12141. P = i[0],
  12142. A = i[1],
  12143. E = i[2],
  12144. O = i[3];
  12145. P = u(P, A, E, O, o, 7, a[0]), O = u(O, P, A, E, c, 12, a[1]), E = u(E, O, P, A, p, 17, a[2]), A = u(A, E, O, P, f, 22, a[3]), P = u(P, A, E, O, g, 7, a[4]), O = u(O, P, A, E, m, 12, a[5]), E = u(E, O, P, A, y, 17, a[6]), A = u(A, E, O, P, _, 22, a[7]), P = u(P, A, E, O, w, 7, a[8]), O = u(O, P, A, E, v, 12, a[9]), E = u(E, O, P, A, S, 17, a[10]), A = u(A, E, O, P, I, 22, a[11]), P = u(P, A, E, O, b, 7, a[12]), O = u(O, P, A, E, k, 12, a[13]), E = u(E, O, P, A, T, 17, a[14]), P = h(P, A = u(A, E, O, P, C, 22, a[15]), E, O, c, 5, a[16]), O = h(O, P, A, E, y, 9, a[17]), E = h(E, O, P, A, I, 14, a[18]), A = h(A, E, O, P, o, 20, a[19]), P = h(P, A, E, O, m, 5, a[20]), O = h(O, P, A, E, S, 9, a[21]), E = h(E, O, P, A, C, 14, a[22]), A = h(A, E, O, P, g, 20, a[23]), P = h(P, A, E, O, v, 5, a[24]), O = h(O, P, A, E, T, 9, a[25]), E = h(E, O, P, A, f, 14, a[26]), A = h(A, E, O, P, w, 20, a[27]), P = h(P, A, E, O, k, 5, a[28]), O = h(O, P, A, E, p, 9, a[29]), E = h(E, O, P, A, _, 14, a[30]), P = l(P, A = h(A, E, O, P, b, 20, a[31]), E, O, m, 4, a[32]), O = l(O, P, A, E, w, 11, a[33]), E = l(E, O, P, A, I, 16, a[34]), A = l(A, E, O, P, T, 23, a[35]), P = l(P, A, E, O, c, 4, a[36]), O = l(O, P, A, E, g, 11, a[37]), E = l(E, O, P, A, _, 16, a[38]), A = l(A, E, O, P, S, 23, a[39]), P = l(P, A, E, O, k, 4, a[40]), O = l(O, P, A, E, o, 11, a[41]), E = l(E, O, P, A, f, 16, a[42]), A = l(A, E, O, P, y, 23, a[43]), P = l(P, A, E, O, v, 4, a[44]), O = l(O, P, A, E, b, 11, a[45]), E = l(E, O, P, A, C, 16, a[46]), P = d(P, A = l(A, E, O, P, p, 23, a[47]), E, O, o, 6, a[48]), O = d(O, P, A, E, _, 10, a[49]), E = d(E, O, P, A, T, 15, a[50]), A = d(A, E, O, P, m, 21, a[51]), P = d(P, A, E, O, b, 6, a[52]), O = d(O, P, A, E, f, 10, a[53]), E = d(E, O, P, A, S, 15, a[54]), A = d(A, E, O, P, c, 21, a[55]), P = d(P, A, E, O, w, 6, a[56]), O = d(O, P, A, E, C, 10, a[57]), E = d(E, O, P, A, y, 15, a[58]), A = d(A, E, O, P, k, 21, a[59]), P = d(P, A, E, O, g, 6, a[60]), O = d(O, P, A, E, I, 10, a[61]), E = d(E, O, P, A, p, 15, a[62]), A = d(A, E, O, P, v, 21, a[63]), i[0] = i[0] + P | 0, i[1] = i[1] + A | 0, i[2] = i[2] + E | 0, i[3] = i[3] + O | 0;
  12146. },
  12147. _doFinalize: function _doFinalize() {
  12148. var t = this._data,
  12149. n = t.words,
  12150. s = 8 * this._nDataBytes,
  12151. r = 8 * t.sigBytes;
  12152. n[r >>> 5] |= 128 << 24 - r % 32;
  12153. var i = e.floor(s / 4294967296),
  12154. o = s;
  12155. n[15 + (r + 64 >>> 9 << 4)] = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8), n[14 + (r + 64 >>> 9 << 4)] = 16711935 & (o << 8 | o >>> 24) | 4278255360 & (o << 24 | o >>> 8), t.sigBytes = 4 * (n.length + 1), this._process();
  12156. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  12157. var h = c[u];
  12158. c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  12159. }
  12160. return a;
  12161. },
  12162. clone: function clone() {
  12163. var e = i.clone.call(this);
  12164. return e._hash = this._hash.clone(), e;
  12165. }
  12166. });
  12167. function u(e, t, n, s, r, i, o) {
  12168. var a = e + (t & n | ~t & s) + r + o;
  12169. return (a << i | a >>> 32 - i) + t;
  12170. }
  12171. function h(e, t, n, s, r, i, o) {
  12172. var a = e + (t & s | n & ~s) + r + o;
  12173. return (a << i | a >>> 32 - i) + t;
  12174. }
  12175. function l(e, t, n, s, r, i, o) {
  12176. var a = e + (t ^ n ^ s) + r + o;
  12177. return (a << i | a >>> 32 - i) + t;
  12178. }
  12179. function d(e, t, n, s, r, i, o) {
  12180. var a = e + (n ^ (t | ~s)) + r + o;
  12181. return (a << i | a >>> 32 - i) + t;
  12182. }
  12183. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  12184. }(Math), n.MD5);
  12185. }), s(function (e, t) {
  12186. var n;
  12187. e.exports = (n = i, void function () {
  12188. var e = n,
  12189. t = e.lib.Base,
  12190. s = e.enc.Utf8;
  12191. e.algo.HMAC = t.extend({
  12192. init: function init(e, t) {
  12193. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  12194. var n = e.blockSize,
  12195. r = 4 * n;
  12196. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  12197. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  12198. a[u] ^= 1549556828, c[u] ^= 909522486;
  12199. }
  12200. i.sigBytes = o.sigBytes = r, this.reset();
  12201. },
  12202. reset: function reset() {
  12203. var e = this._hasher;
  12204. e.reset(), e.update(this._iKey);
  12205. },
  12206. update: function update(e) {
  12207. return this._hasher.update(e), this;
  12208. },
  12209. finalize: function finalize(e) {
  12210. var t = this._hasher,
  12211. n = t.finalize(e);
  12212. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  12213. }
  12214. });
  12215. }());
  12216. }), s(function (e, t) {
  12217. e.exports = i.HmacMD5;
  12218. })),
  12219. a = s(function (e, t) {
  12220. e.exports = i.enc.Utf8;
  12221. }),
  12222. c = s(function (e, t) {
  12223. var n;
  12224. e.exports = (n = i, function () {
  12225. var e = n,
  12226. t = e.lib.WordArray;
  12227. function s(e, n, s) {
  12228. for (var r = [], i = 0, o = 0; o < n; o++) {
  12229. if (o % 4) {
  12230. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  12231. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  12232. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  12233. }
  12234. }
  12235. return t.create(r, i);
  12236. }
  12237. e.enc.Base64 = {
  12238. stringify: function stringify(e) {
  12239. var t = e.words,
  12240. n = e.sigBytes,
  12241. s = this._map;
  12242. e.clamp();
  12243. for (var r = [], i = 0; i < n; i += 3) {
  12244. for (var o = (t[i >>> 2] >>> 24 - i % 4 * 8 & 255) << 16 | (t[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255) << 8 | t[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255, a = 0; a < 4 && i + .75 * a < n; a++) {
  12245. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  12246. }
  12247. }
  12248. var c = s.charAt(64);
  12249. if (c) for (; r.length % 4;) {
  12250. r.push(c);
  12251. }
  12252. return r.join("");
  12253. },
  12254. parse: function parse(e) {
  12255. var t = e.length,
  12256. n = this._map,
  12257. r = this._reverseMap;
  12258. if (!r) {
  12259. r = this._reverseMap = [];
  12260. for (var i = 0; i < n.length; i++) {
  12261. r[n.charCodeAt(i)] = i;
  12262. }
  12263. }
  12264. var o = n.charAt(64);
  12265. if (o) {
  12266. var a = e.indexOf(o);
  12267. -1 !== a && (t = a);
  12268. }
  12269. return s(e, t, r);
  12270. },
  12271. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  12272. };
  12273. }(), n.enc.Base64);
  12274. });
  12275. var u = "FUNCTION",
  12276. h = "OBJECT",
  12277. l = "CLIENT_DB",
  12278. d = "pending",
  12279. p = "fullfilled",
  12280. f = "rejected";
  12281. function g(e) {
  12282. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  12283. }
  12284. function m(e) {
  12285. return "object" === g(e);
  12286. }
  12287. function y(e) {
  12288. return "function" == typeof e;
  12289. }
  12290. function _(e) {
  12291. return function () {
  12292. try {
  12293. return e.apply(e, arguments);
  12294. } catch (e) {
  12295. console.error(e);
  12296. }
  12297. };
  12298. }
  12299. var w = "REJECTED",
  12300. v = "NOT_PENDING";
  12301. var S = /*#__PURE__*/function () {
  12302. function S() {
  12303. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  12304. e = _ref.createPromise,
  12305. _ref$retryRule = _ref.retryRule,
  12306. t = _ref$retryRule === void 0 ? w : _ref$retryRule;
  12307. (0, _classCallCheck2.default)(this, S);
  12308. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  12309. }
  12310. (0, _createClass2.default)(S, [{
  12311. key: "needRetry",
  12312. get: function get() {
  12313. if (!this.status) return !0;
  12314. switch (this.retryRule) {
  12315. case w:
  12316. return this.status === f;
  12317. case v:
  12318. return this.status !== d;
  12319. }
  12320. }
  12321. }, {
  12322. key: "exec",
  12323. value: function exec() {
  12324. var _this = this;
  12325. return this.needRetry ? (this.status = d, this.promise = this.createPromise().then(function (e) {
  12326. return _this.status = p, Promise.resolve(e);
  12327. }, function (e) {
  12328. return _this.status = f, Promise.reject(e);
  12329. }), this.promise) : this.promise;
  12330. }
  12331. }]);
  12332. return S;
  12333. }();
  12334. function I(e) {
  12335. return function (t) {
  12336. return new Promise(function (n, s) {
  12337. uni[e](_objectSpread(_objectSpread({}, t), {}, {
  12338. success: function success(e) {
  12339. n(e);
  12340. },
  12341. fail: function fail(e) {
  12342. s(e);
  12343. }
  12344. }));
  12345. });
  12346. };
  12347. }
  12348. function b(e) {
  12349. return e && "string" == typeof e ? JSON.parse(e) : e;
  12350. }
  12351. var k = "development" === "development",
  12352. T = "mp-weixin",
  12353. C = "true" === undefined || !0 === undefined,
  12354. P = b([]),
  12355. A = "h5" === T ? "web" : "app-plus" === T ? "app" : T,
  12356. E = b(undefined),
  12357. O = b([]) || [],
  12358. x = true;
  12359. var R = "";
  12360. try {
  12361. R = (__webpack_require__(/*! uni-stat-config */ 398).default || __webpack_require__(/*! uni-stat-config */ 398)).appid;
  12362. } catch (e) {}
  12363. var U = {};
  12364. function L(e) {
  12365. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12366. var n, s;
  12367. return n = U, s = e, Object.prototype.hasOwnProperty.call(n, s) || (U[e] = t), U[e];
  12368. }
  12369. "app" === A && (U = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  12370. var N = ["invoke", "success", "fail", "complete"],
  12371. D = L("_globalUniCloudInterceptor");
  12372. function F(e, t) {
  12373. D[e] || (D[e] = {}), m(t) && Object.keys(t).forEach(function (n) {
  12374. N.indexOf(n) > -1 && function (e, t, n) {
  12375. var s = D[e][t];
  12376. s || (s = D[e][t] = []), -1 === s.indexOf(n) && y(n) && s.push(n);
  12377. }(e, n, t[n]);
  12378. });
  12379. }
  12380. function q(e, t) {
  12381. D[e] || (D[e] = {}), m(t) ? Object.keys(t).forEach(function (n) {
  12382. N.indexOf(n) > -1 && function (e, t, n) {
  12383. var s = D[e][t];
  12384. if (!s) return;
  12385. var r = s.indexOf(n);
  12386. r > -1 && s.splice(r, 1);
  12387. }(e, n, t[n]);
  12388. }) : delete D[e];
  12389. }
  12390. function M(e, t) {
  12391. return e && 0 !== e.length ? e.reduce(function (e, n) {
  12392. return e.then(function () {
  12393. return n(t);
  12394. });
  12395. }, Promise.resolve()) : Promise.resolve();
  12396. }
  12397. function K(e, t) {
  12398. return D[e] && D[e][t] || [];
  12399. }
  12400. function j(e) {
  12401. F("callObject", e);
  12402. }
  12403. var B = L("_globalUniCloudListener"),
  12404. $ = "response",
  12405. W = "needLogin",
  12406. z = "refreshToken",
  12407. J = "clientdb",
  12408. H = "cloudfunction",
  12409. G = "cloudobject";
  12410. function V(e) {
  12411. return B[e] || (B[e] = []), B[e];
  12412. }
  12413. function Q(e, t) {
  12414. var n = V(e);
  12415. n.includes(t) || n.push(t);
  12416. }
  12417. function Y(e, t) {
  12418. var n = V(e),
  12419. s = n.indexOf(t);
  12420. -1 !== s && n.splice(s, 1);
  12421. }
  12422. function X(e, t) {
  12423. var n = V(e);
  12424. for (var _e2 = 0; _e2 < n.length; _e2++) {
  12425. (0, n[_e2])(t);
  12426. }
  12427. }
  12428. var Z,
  12429. ee = !1;
  12430. function te() {
  12431. return Z || (Z = new Promise(function (e) {
  12432. ee && e(), function t() {
  12433. if ("function" == typeof getCurrentPages) {
  12434. var _t2 = getCurrentPages();
  12435. _t2 && _t2[0] && (ee = !0, e());
  12436. }
  12437. ee || setTimeout(function () {
  12438. t();
  12439. }, 30);
  12440. }();
  12441. }), Z);
  12442. }
  12443. function ne(e) {
  12444. var t = {};
  12445. for (var _n2 in e) {
  12446. var _s2 = e[_n2];
  12447. y(_s2) && (t[_n2] = _(_s2));
  12448. }
  12449. return t;
  12450. }
  12451. var se = /*#__PURE__*/function (_Error) {
  12452. (0, _inherits2.default)(se, _Error);
  12453. var _super = _createSuper(se);
  12454. function se(e) {
  12455. var _this2;
  12456. (0, _classCallCheck2.default)(this, se);
  12457. _this2 = _super.call(this, e.message), _this2.errMsg = e.message || e.errMsg || "unknown system error", _this2.code = _this2.errCode = e.code || e.errCode || "SYSTEM_ERROR", _this2.errSubject = _this2.subject = e.subject || e.errSubject, _this2.cause = e.cause, _this2.requestId = e.requestId;
  12458. return _this2;
  12459. }
  12460. (0, _createClass2.default)(se, [{
  12461. key: "toJson",
  12462. value: function toJson() {
  12463. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  12464. if (!(e >= 10)) return e++, {
  12465. errCode: this.errCode,
  12466. errMsg: this.errMsg,
  12467. errSubject: this.errSubject,
  12468. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  12469. };
  12470. }
  12471. }]);
  12472. return se;
  12473. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  12474. var re = {
  12475. request: function request(e) {
  12476. return uni.request(e);
  12477. },
  12478. uploadFile: function uploadFile(e) {
  12479. return uni.uploadFile(e);
  12480. },
  12481. setStorageSync: function setStorageSync(e, t) {
  12482. return uni.setStorageSync(e, t);
  12483. },
  12484. getStorageSync: function getStorageSync(e) {
  12485. return uni.getStorageSync(e);
  12486. },
  12487. removeStorageSync: function removeStorageSync(e) {
  12488. return uni.removeStorageSync(e);
  12489. },
  12490. clearStorageSync: function clearStorageSync() {
  12491. return uni.clearStorageSync();
  12492. }
  12493. };
  12494. function ie() {
  12495. return {
  12496. token: re.getStorageSync("uni_id_token") || re.getStorageSync("uniIdToken"),
  12497. tokenExpired: re.getStorageSync("uni_id_token_expired")
  12498. };
  12499. }
  12500. function oe() {
  12501. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  12502. e = _ref2.token,
  12503. t = _ref2.tokenExpired;
  12504. e && re.setStorageSync("uni_id_token", e), t && re.setStorageSync("uni_id_token_expired", t);
  12505. }
  12506. var ae, ce;
  12507. function ue() {
  12508. return ae || (ae = uni.getSystemInfoSync()), ae;
  12509. }
  12510. function he() {
  12511. var e, t;
  12512. try {
  12513. if (uni.getLaunchOptionsSync) {
  12514. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  12515. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  12516. _n3 = _uni$getLaunchOptions.scene,
  12517. _s3 = _uni$getLaunchOptions.channel;
  12518. e = _s3, t = _n3;
  12519. }
  12520. } catch (e) {}
  12521. return {
  12522. channel: e,
  12523. scene: t
  12524. };
  12525. }
  12526. function le() {
  12527. var e = uni.getLocale && uni.getLocale() || "en";
  12528. if (ce) return _objectSpread(_objectSpread({}, ce), {}, {
  12529. locale: e,
  12530. LOCALE: e
  12531. });
  12532. var t = ue(),
  12533. n = t.deviceId,
  12534. s = t.osName,
  12535. r = t.uniPlatform,
  12536. i = t.appId,
  12537. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  12538. for (var _e3 = 0; _e3 < o.length; _e3++) {
  12539. delete t[o[_e3]];
  12540. }
  12541. return ce = _objectSpread(_objectSpread({
  12542. PLATFORM: r,
  12543. OS: s,
  12544. APPID: i,
  12545. DEVICEID: n
  12546. }, he()), t), _objectSpread(_objectSpread({}, ce), {}, {
  12547. locale: e,
  12548. LOCALE: e
  12549. });
  12550. }
  12551. var de = {
  12552. sign: function sign(e, t) {
  12553. var n = "";
  12554. return Object.keys(e).sort().forEach(function (t) {
  12555. e[t] && (n = n + "&" + t + "=" + e[t]);
  12556. }), n = n.slice(1), o(n, t).toString();
  12557. },
  12558. wrappedRequest: function wrappedRequest(e, t) {
  12559. return new Promise(function (n, s) {
  12560. t(Object.assign(e, {
  12561. complete: function complete(e) {
  12562. e || (e = {}), k && "web" === A && e.errMsg && 0 === e.errMsg.indexOf("request:fail") && console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");
  12563. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  12564. if (!e.statusCode || e.statusCode >= 400) return s(new se({
  12565. code: "SYS_ERR",
  12566. message: e.errMsg || "request:fail",
  12567. requestId: t
  12568. }));
  12569. var r = e.data;
  12570. if (r.error) return s(new se({
  12571. code: r.error.code,
  12572. message: r.error.message,
  12573. requestId: t
  12574. }));
  12575. r.result = r.data, r.requestId = t, delete r.data, n(r);
  12576. }
  12577. }));
  12578. });
  12579. },
  12580. toBase64: function toBase64(e) {
  12581. return c.stringify(a.parse(e));
  12582. }
  12583. },
  12584. pe = {
  12585. "uniCloud.init.paramRequired": "{param} required",
  12586. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  12587. };
  12588. var _e4 = (0, _uniI18n.initVueI18n)({
  12589. "zh-Hans": {
  12590. "uniCloud.init.paramRequired": "缺少参数:{param}",
  12591. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  12592. },
  12593. "zh-Hant": {
  12594. "uniCloud.init.paramRequired": "缺少参数:{param}",
  12595. "uniCloud.uploadFile.fileError": "filePath应为File对象"
  12596. },
  12597. en: pe,
  12598. fr: {
  12599. "uniCloud.init.paramRequired": "{param} required",
  12600. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  12601. },
  12602. es: {
  12603. "uniCloud.init.paramRequired": "{param} required",
  12604. "uniCloud.uploadFile.fileError": "filePath should be instance of File"
  12605. },
  12606. ja: pe
  12607. }, "zh-Hans"),
  12608. fe = _e4.t;
  12609. var ge = /*#__PURE__*/function () {
  12610. function ge(e) {
  12611. var _this3 = this;
  12612. (0, _classCallCheck2.default)(this, ge);
  12613. ["spaceId", "clientSecret"].forEach(function (t) {
  12614. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error(fe("uniCloud.init.paramRequired", {
  12615. param: t
  12616. }));
  12617. }), this.config = Object.assign({}, {
  12618. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  12619. }, e), this.config.provider = "aliyun", this.config.requestUrl = this.config.endpoint + "/client", this.config.envType = this.config.envType || "public", this.config.accessTokenKey = "access_token_" + this.config.spaceId, this.adapter = re, this._getAccessTokenPromiseHub = new S({
  12620. createPromise: function createPromise() {
  12621. return _this3.requestAuth(_this3.setupRequest({
  12622. method: "serverless.auth.user.anonymousAuthorize",
  12623. params: "{}"
  12624. }, "auth")).then(function (e) {
  12625. if (!e.result || !e.result.accessToken) throw new se({
  12626. code: "AUTH_FAILED",
  12627. message: "获取accessToken失败"
  12628. });
  12629. _this3.setAccessToken(e.result.accessToken);
  12630. });
  12631. },
  12632. retryRule: v
  12633. });
  12634. }
  12635. (0, _createClass2.default)(ge, [{
  12636. key: "hasAccessToken",
  12637. get: function get() {
  12638. return !!this.accessToken;
  12639. }
  12640. }, {
  12641. key: "setAccessToken",
  12642. value: function setAccessToken(e) {
  12643. this.accessToken = e;
  12644. }
  12645. }, {
  12646. key: "requestWrapped",
  12647. value: function requestWrapped(e) {
  12648. return de.wrappedRequest(e, this.adapter.request);
  12649. }
  12650. }, {
  12651. key: "requestAuth",
  12652. value: function requestAuth(e) {
  12653. return this.requestWrapped(e);
  12654. }
  12655. }, {
  12656. key: "request",
  12657. value: function request(e, t) {
  12658. var _this4 = this;
  12659. return Promise.resolve().then(function () {
  12660. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  12661. return new Promise(function (e, n) {
  12662. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  12663. }).then(function () {
  12664. return _this4.getAccessToken();
  12665. }).then(function () {
  12666. var t = _this4.rebuildRequest(e);
  12667. return _this4.request(t, !0);
  12668. });
  12669. }) : _this4.getAccessToken().then(function () {
  12670. var t = _this4.rebuildRequest(e);
  12671. return _this4.request(t, !0);
  12672. });
  12673. });
  12674. }
  12675. }, {
  12676. key: "rebuildRequest",
  12677. value: function rebuildRequest(e) {
  12678. var t = Object.assign({}, e);
  12679. return t.data.token = this.accessToken, t.header["x-basement-token"] = this.accessToken, t.header["x-serverless-sign"] = de.sign(t.data, this.config.clientSecret), t;
  12680. }
  12681. }, {
  12682. key: "setupRequest",
  12683. value: function setupRequest(e, t) {
  12684. var n = Object.assign({}, e, {
  12685. spaceId: this.config.spaceId,
  12686. timestamp: Date.now()
  12687. }),
  12688. s = {
  12689. "Content-Type": "application/json"
  12690. };
  12691. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = de.sign(n, this.config.clientSecret), {
  12692. url: this.config.requestUrl,
  12693. method: "POST",
  12694. data: n,
  12695. dataType: "json",
  12696. header: s
  12697. };
  12698. }
  12699. }, {
  12700. key: "getAccessToken",
  12701. value: function getAccessToken() {
  12702. return this._getAccessTokenPromiseHub.exec();
  12703. }
  12704. }, {
  12705. key: "authorize",
  12706. value: function () {
  12707. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  12708. return _regenerator.default.wrap(function _callee$(_context) {
  12709. while (1) {
  12710. switch (_context.prev = _context.next) {
  12711. case 0:
  12712. _context.next = 2;
  12713. return this.getAccessToken();
  12714. case 2:
  12715. case "end":
  12716. return _context.stop();
  12717. }
  12718. }
  12719. }, _callee, this);
  12720. }));
  12721. function authorize() {
  12722. return _authorize.apply(this, arguments);
  12723. }
  12724. return authorize;
  12725. }()
  12726. }, {
  12727. key: "callFunction",
  12728. value: function callFunction(e) {
  12729. var t = {
  12730. method: "serverless.function.runtime.invoke",
  12731. params: JSON.stringify({
  12732. functionTarget: e.name,
  12733. functionArgs: e.data || {}
  12734. })
  12735. };
  12736. return this.request(this.setupRequest(t));
  12737. }
  12738. }, {
  12739. key: "getOSSUploadOptionsFromPath",
  12740. value: function getOSSUploadOptionsFromPath(e) {
  12741. var t = {
  12742. method: "serverless.file.resource.generateProximalSign",
  12743. params: JSON.stringify(e)
  12744. };
  12745. return this.request(this.setupRequest(t));
  12746. }
  12747. }, {
  12748. key: "uploadFileToOSS",
  12749. value: function uploadFileToOSS(_ref3) {
  12750. var _this5 = this;
  12751. var e = _ref3.url,
  12752. t = _ref3.formData,
  12753. n = _ref3.name,
  12754. s = _ref3.filePath,
  12755. r = _ref3.fileType,
  12756. i = _ref3.onUploadProgress;
  12757. return new Promise(function (o, a) {
  12758. var c = _this5.adapter.uploadFile({
  12759. url: e,
  12760. formData: t,
  12761. name: n,
  12762. filePath: s,
  12763. fileType: r,
  12764. header: {
  12765. "X-OSS-server-side-encrpytion": "AES256"
  12766. },
  12767. success: function success(e) {
  12768. e && e.statusCode < 400 ? o(e) : a(new se({
  12769. code: "UPLOAD_FAILED",
  12770. message: "文件上传失败"
  12771. }));
  12772. },
  12773. fail: function fail(e) {
  12774. a(new se({
  12775. code: e.code || "UPLOAD_FAILED",
  12776. message: e.message || e.errMsg || "文件上传失败"
  12777. }));
  12778. }
  12779. });
  12780. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  12781. i({
  12782. loaded: e.totalBytesSent,
  12783. total: e.totalBytesExpectedToSend
  12784. });
  12785. });
  12786. });
  12787. }
  12788. }, {
  12789. key: "reportOSSUpload",
  12790. value: function reportOSSUpload(e) {
  12791. var t = {
  12792. method: "serverless.file.resource.report",
  12793. params: JSON.stringify(e)
  12794. };
  12795. return this.request(this.setupRequest(t));
  12796. }
  12797. }, {
  12798. key: "uploadFile",
  12799. value: function () {
  12800. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  12801. var e, t, _ref4$fileType, n, s, r, i, o, a, c, u, h, l, d, p, f, m, y, _e5, _;
  12802. return _regenerator.default.wrap(function _callee2$(_context2) {
  12803. while (1) {
  12804. switch (_context2.prev = _context2.next) {
  12805. case 0:
  12806. e = _ref4.filePath, t = _ref4.cloudPath, _ref4$fileType = _ref4.fileType, n = _ref4$fileType === void 0 ? "image" : _ref4$fileType, s = _ref4.onUploadProgress, r = _ref4.config;
  12807. if (!("string" !== g(t))) {
  12808. _context2.next = 3;
  12809. break;
  12810. }
  12811. throw new se({
  12812. code: "INVALID_PARAM",
  12813. message: "cloudPath必须为字符串类型"
  12814. });
  12815. case 3:
  12816. if (t = t.trim()) {
  12817. _context2.next = 5;
  12818. break;
  12819. }
  12820. throw new se({
  12821. code: "CLOUDPATH_REQUIRED",
  12822. message: "cloudPath不可为空"
  12823. });
  12824. case 5:
  12825. if (!/:\/\//.test(t)) {
  12826. _context2.next = 7;
  12827. break;
  12828. }
  12829. throw new se({
  12830. code: "INVALID_PARAM",
  12831. message: "cloudPath不合法"
  12832. });
  12833. case 7:
  12834. i = r && r.envType || this.config.envType;
  12835. _context2.next = 10;
  12836. return this.getOSSUploadOptionsFromPath({
  12837. env: i,
  12838. filename: t
  12839. });
  12840. case 10:
  12841. o = _context2.sent.result;
  12842. a = "https://" + o.cdnDomain + "/" + o.ossPath;
  12843. c = o.securityToken;
  12844. u = o.accessKeyId;
  12845. h = o.signature;
  12846. l = o.host;
  12847. d = o.ossPath;
  12848. p = o.id;
  12849. f = o.policy;
  12850. m = o.ossCallbackUrl;
  12851. y = {
  12852. "Cache-Control": "max-age=2592000",
  12853. "Content-Disposition": "attachment",
  12854. OSSAccessKeyId: u,
  12855. Signature: h,
  12856. host: l,
  12857. id: p,
  12858. key: d,
  12859. policy: f,
  12860. success_action_status: 200
  12861. };
  12862. if (c && (y["x-oss-security-token"] = c), m) {
  12863. _e5 = JSON.stringify({
  12864. callbackUrl: m,
  12865. callbackBody: JSON.stringify({
  12866. fileId: p,
  12867. spaceId: this.config.spaceId
  12868. }),
  12869. callbackBodyType: "application/json"
  12870. });
  12871. y.callback = de.toBase64(_e5);
  12872. }
  12873. _ = {
  12874. url: "https://" + o.host,
  12875. formData: y,
  12876. fileName: "file",
  12877. name: "file",
  12878. filePath: e,
  12879. fileType: n
  12880. };
  12881. _context2.next = 25;
  12882. return this.uploadFileToOSS(Object.assign({}, _, {
  12883. onUploadProgress: s
  12884. }));
  12885. case 25:
  12886. if (!m) {
  12887. _context2.next = 27;
  12888. break;
  12889. }
  12890. return _context2.abrupt("return", {
  12891. success: !0,
  12892. filePath: e,
  12893. fileID: a
  12894. });
  12895. case 27:
  12896. _context2.next = 29;
  12897. return this.reportOSSUpload({
  12898. id: p
  12899. });
  12900. case 29:
  12901. if (!_context2.sent.success) {
  12902. _context2.next = 31;
  12903. break;
  12904. }
  12905. return _context2.abrupt("return", {
  12906. success: !0,
  12907. filePath: e,
  12908. fileID: a
  12909. });
  12910. case 31:
  12911. throw new se({
  12912. code: "UPLOAD_FAILED",
  12913. message: "文件上传失败"
  12914. });
  12915. case 32:
  12916. case "end":
  12917. return _context2.stop();
  12918. }
  12919. }
  12920. }, _callee2, this);
  12921. }));
  12922. function uploadFile(_x) {
  12923. return _uploadFile.apply(this, arguments);
  12924. }
  12925. return uploadFile;
  12926. }()
  12927. }, {
  12928. key: "getTempFileURL",
  12929. value: function getTempFileURL() {
  12930. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  12931. e = _ref5.fileList;
  12932. return new Promise(function (t, n) {
  12933. Array.isArray(e) && 0 !== e.length || n(new se({
  12934. code: "INVALID_PARAM",
  12935. message: "fileList的元素必须是非空的字符串"
  12936. })), t({
  12937. fileList: e.map(function (e) {
  12938. return {
  12939. fileID: e,
  12940. tempFileURL: e
  12941. };
  12942. })
  12943. });
  12944. });
  12945. }
  12946. }, {
  12947. key: "getFileInfo",
  12948. value: function () {
  12949. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  12950. var _ref6,
  12951. e,
  12952. t,
  12953. _args3 = arguments;
  12954. return _regenerator.default.wrap(function _callee3$(_context3) {
  12955. while (1) {
  12956. switch (_context3.prev = _context3.next) {
  12957. case 0:
  12958. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  12959. if (!(!Array.isArray(e) || 0 === e.length)) {
  12960. _context3.next = 3;
  12961. break;
  12962. }
  12963. throw new se({
  12964. code: "INVALID_PARAM",
  12965. message: "fileList的元素必须是非空的字符串"
  12966. });
  12967. case 3:
  12968. t = {
  12969. method: "serverless.file.resource.info",
  12970. params: JSON.stringify({
  12971. id: e.map(function (e) {
  12972. return e.split("?")[0];
  12973. }).join(",")
  12974. })
  12975. };
  12976. _context3.next = 6;
  12977. return this.request(this.setupRequest(t));
  12978. case 6:
  12979. _context3.t0 = _context3.sent.result;
  12980. return _context3.abrupt("return", {
  12981. fileList: _context3.t0
  12982. });
  12983. case 8:
  12984. case "end":
  12985. return _context3.stop();
  12986. }
  12987. }
  12988. }, _callee3, this);
  12989. }));
  12990. function getFileInfo() {
  12991. return _getFileInfo.apply(this, arguments);
  12992. }
  12993. return getFileInfo;
  12994. }()
  12995. }]);
  12996. return ge;
  12997. }();
  12998. var me = {
  12999. init: function init(e) {
  13000. var t = new ge(e),
  13001. n = {
  13002. signInAnonymously: function signInAnonymously() {
  13003. return t.authorize();
  13004. },
  13005. getLoginState: function getLoginState() {
  13006. return Promise.resolve(!1);
  13007. }
  13008. };
  13009. return t.auth = function () {
  13010. return n;
  13011. }, t.customAuth = t.auth, t;
  13012. }
  13013. };
  13014. var ye = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  13015. var _e;
  13016. !function (e) {
  13017. e.local = "local", e.none = "none", e.session = "session";
  13018. }(_e || (_e = {}));
  13019. var we = function we() {};
  13020. var ve = function ve() {
  13021. var e;
  13022. if (!Promise) {
  13023. e = function e() {}, e.promise = {};
  13024. var _t3 = function _t3() {
  13025. throw new se({
  13026. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  13027. });
  13028. };
  13029. return Object.defineProperty(e.promise, "then", {
  13030. get: _t3
  13031. }), Object.defineProperty(e.promise, "catch", {
  13032. get: _t3
  13033. }), e;
  13034. }
  13035. var t = new Promise(function (t, n) {
  13036. e = function e(_e6, s) {
  13037. return _e6 ? n(_e6) : t(s);
  13038. };
  13039. });
  13040. return e.promise = t, e;
  13041. };
  13042. function Se(e) {
  13043. return void 0 === e;
  13044. }
  13045. function Ie(e) {
  13046. return "[object Null]" === Object.prototype.toString.call(e);
  13047. }
  13048. var be;
  13049. function ke(e) {
  13050. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  13051. var n;
  13052. var _iterator = _createForOfIteratorHelper(t),
  13053. _step;
  13054. try {
  13055. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  13056. var _e7 = _step.value;
  13057. var _t4 = _e7.isMatch,
  13058. _n4 = _e7.genAdapter,
  13059. _s4 = _e7.runtime;
  13060. if (_t4()) return {
  13061. adapter: _n4(),
  13062. runtime: _s4
  13063. };
  13064. }
  13065. } catch (err) {
  13066. _iterator.e(err);
  13067. } finally {
  13068. _iterator.f();
  13069. }
  13070. }
  13071. !function (e) {
  13072. e.WEB = "web", e.WX_MP = "wx_mp";
  13073. }(be || (be = {}));
  13074. var Te = {
  13075. adapter: null,
  13076. runtime: void 0
  13077. },
  13078. Ce = ["anonymousUuidKey"];
  13079. var Pe = /*#__PURE__*/function (_we) {
  13080. (0, _inherits2.default)(Pe, _we);
  13081. var _super2 = _createSuper(Pe);
  13082. function Pe() {
  13083. var _this6;
  13084. (0, _classCallCheck2.default)(this, Pe);
  13085. _this6 = _super2.call(this), Te.adapter.root.tcbObject || (Te.adapter.root.tcbObject = {});
  13086. return _this6;
  13087. }
  13088. (0, _createClass2.default)(Pe, [{
  13089. key: "setItem",
  13090. value: function setItem(e, t) {
  13091. Te.adapter.root.tcbObject[e] = t;
  13092. }
  13093. }, {
  13094. key: "getItem",
  13095. value: function getItem(e) {
  13096. return Te.adapter.root.tcbObject[e];
  13097. }
  13098. }, {
  13099. key: "removeItem",
  13100. value: function removeItem(e) {
  13101. delete Te.adapter.root.tcbObject[e];
  13102. }
  13103. }, {
  13104. key: "clear",
  13105. value: function clear() {
  13106. delete Te.adapter.root.tcbObject;
  13107. }
  13108. }]);
  13109. return Pe;
  13110. }(we);
  13111. function Ae(e, t) {
  13112. switch (e) {
  13113. case "local":
  13114. return t.localStorage || new Pe();
  13115. case "none":
  13116. return new Pe();
  13117. default:
  13118. return t.sessionStorage || new Pe();
  13119. }
  13120. }
  13121. var Ee = /*#__PURE__*/function () {
  13122. function Ee(e) {
  13123. (0, _classCallCheck2.default)(this, Ee);
  13124. if (!this._storage) {
  13125. this._persistence = Te.adapter.primaryStorage || e.persistence, this._storage = Ae(this._persistence, Te.adapter);
  13126. var _t5 = "access_token_".concat(e.env),
  13127. _n5 = "access_token_expire_".concat(e.env),
  13128. _s5 = "refresh_token_".concat(e.env),
  13129. _r = "anonymous_uuid_".concat(e.env),
  13130. _i = "login_type_".concat(e.env),
  13131. _o = "user_info_".concat(e.env);
  13132. this.keys = {
  13133. accessTokenKey: _t5,
  13134. accessTokenExpireKey: _n5,
  13135. refreshTokenKey: _s5,
  13136. anonymousUuidKey: _r,
  13137. loginTypeKey: _i,
  13138. userInfoKey: _o
  13139. };
  13140. }
  13141. }
  13142. (0, _createClass2.default)(Ee, [{
  13143. key: "updatePersistence",
  13144. value: function updatePersistence(e) {
  13145. if (e === this._persistence) return;
  13146. var t = "local" === this._persistence;
  13147. this._persistence = e;
  13148. var n = Ae(e, Te.adapter);
  13149. for (var _e8 in this.keys) {
  13150. var _s6 = this.keys[_e8];
  13151. if (t && Ce.includes(_e8)) continue;
  13152. var _r2 = this._storage.getItem(_s6);
  13153. Se(_r2) || Ie(_r2) || (n.setItem(_s6, _r2), this._storage.removeItem(_s6));
  13154. }
  13155. this._storage = n;
  13156. }
  13157. }, {
  13158. key: "setStore",
  13159. value: function setStore(e, t, n) {
  13160. if (!this._storage) return;
  13161. var s = {
  13162. version: n || "localCachev1",
  13163. content: t
  13164. },
  13165. r = JSON.stringify(s);
  13166. try {
  13167. this._storage.setItem(e, r);
  13168. } catch (e) {
  13169. throw e;
  13170. }
  13171. }
  13172. }, {
  13173. key: "getStore",
  13174. value: function getStore(e, t) {
  13175. try {
  13176. if (!this._storage) return;
  13177. } catch (e) {
  13178. return "";
  13179. }
  13180. t = t || "localCachev1";
  13181. var n = this._storage.getItem(e);
  13182. if (!n) return "";
  13183. if (n.indexOf(t) >= 0) {
  13184. return JSON.parse(n).content;
  13185. }
  13186. return "";
  13187. }
  13188. }, {
  13189. key: "removeStore",
  13190. value: function removeStore(e) {
  13191. this._storage.removeItem(e);
  13192. }
  13193. }]);
  13194. return Ee;
  13195. }();
  13196. var Oe = {},
  13197. xe = {};
  13198. function Re(e) {
  13199. return Oe[e];
  13200. }
  13201. var Ue = /*#__PURE__*/(0, _createClass2.default)(function Ue(e, t) {
  13202. (0, _classCallCheck2.default)(this, Ue);
  13203. this.data = t || null, this.name = e;
  13204. });
  13205. var Le = /*#__PURE__*/function (_Ue) {
  13206. (0, _inherits2.default)(Le, _Ue);
  13207. var _super3 = _createSuper(Le);
  13208. function Le(e, t) {
  13209. var _this7;
  13210. (0, _classCallCheck2.default)(this, Le);
  13211. _this7 = _super3.call(this, "error", {
  13212. error: e,
  13213. data: t
  13214. }), _this7.error = e;
  13215. return _this7;
  13216. }
  13217. return (0, _createClass2.default)(Le);
  13218. }(Ue);
  13219. var Ne = new ( /*#__PURE__*/function () {
  13220. function _class() {
  13221. (0, _classCallCheck2.default)(this, _class);
  13222. this._listeners = {};
  13223. }
  13224. (0, _createClass2.default)(_class, [{
  13225. key: "on",
  13226. value: function on(e, t) {
  13227. return function (e, t, n) {
  13228. n[e] = n[e] || [], n[e].push(t);
  13229. }(e, t, this._listeners), this;
  13230. }
  13231. }, {
  13232. key: "off",
  13233. value: function off(e, t) {
  13234. return function (e, t, n) {
  13235. if (n && n[e]) {
  13236. var _s7 = n[e].indexOf(t);
  13237. -1 !== _s7 && n[e].splice(_s7, 1);
  13238. }
  13239. }(e, t, this._listeners), this;
  13240. }
  13241. }, {
  13242. key: "fire",
  13243. value: function fire(e, t) {
  13244. if (e instanceof Le) return console.error(e.error), this;
  13245. var n = "string" == typeof e ? new Ue(e, t || {}) : e;
  13246. var s = n.name;
  13247. if (this._listens(s)) {
  13248. n.target = this;
  13249. var _e9 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  13250. var _iterator2 = _createForOfIteratorHelper(_e9),
  13251. _step2;
  13252. try {
  13253. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  13254. var _t6 = _step2.value;
  13255. _t6.call(this, n);
  13256. }
  13257. } catch (err) {
  13258. _iterator2.e(err);
  13259. } finally {
  13260. _iterator2.f();
  13261. }
  13262. }
  13263. return this;
  13264. }
  13265. }, {
  13266. key: "_listens",
  13267. value: function _listens(e) {
  13268. return this._listeners[e] && this._listeners[e].length > 0;
  13269. }
  13270. }]);
  13271. return _class;
  13272. }())();
  13273. function De(e, t) {
  13274. Ne.on(e, t);
  13275. }
  13276. function Fe(e) {
  13277. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  13278. Ne.fire(e, t);
  13279. }
  13280. function qe(e, t) {
  13281. Ne.off(e, t);
  13282. }
  13283. var Me = "loginStateChanged",
  13284. Ke = "loginStateExpire",
  13285. je = "loginTypeChanged",
  13286. Be = "anonymousConverted",
  13287. $e = "refreshAccessToken";
  13288. var We;
  13289. !function (e) {
  13290. e.ANONYMOUS = "ANONYMOUS", e.WECHAT = "WECHAT", e.WECHAT_PUBLIC = "WECHAT-PUBLIC", e.WECHAT_OPEN = "WECHAT-OPEN", e.CUSTOM = "CUSTOM", e.EMAIL = "EMAIL", e.USERNAME = "USERNAME", e.NULL = "NULL";
  13291. }(We || (We = {}));
  13292. var ze = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  13293. Je = {
  13294. "X-SDK-Version": "1.3.5"
  13295. };
  13296. function He(e, t, n) {
  13297. var s = e[t];
  13298. e[t] = function (t) {
  13299. var r = {},
  13300. i = {};
  13301. n.forEach(function (n) {
  13302. var _n$call = n.call(e, t),
  13303. s = _n$call.data,
  13304. o = _n$call.headers;
  13305. Object.assign(r, s), Object.assign(i, o);
  13306. });
  13307. var o = t.data;
  13308. return o && function () {
  13309. var e;
  13310. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e10 in r) {
  13311. o.append(_e10, r[_e10]);
  13312. }
  13313. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  13314. };
  13315. }
  13316. function Ge() {
  13317. var e = Math.random().toString(16).slice(2);
  13318. return {
  13319. data: {
  13320. seqId: e
  13321. },
  13322. headers: _objectSpread(_objectSpread({}, Je), {}, {
  13323. "x-seqid": e
  13324. })
  13325. };
  13326. }
  13327. var Ve = /*#__PURE__*/function () {
  13328. function Ve() {
  13329. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  13330. (0, _classCallCheck2.default)(this, Ve);
  13331. var t;
  13332. this.config = e, this._reqClass = new Te.adapter.reqClass({
  13333. timeout: this.config.timeout,
  13334. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  13335. restrictedMethods: ["post"]
  13336. }), this._cache = Re(this.config.env), this._localCache = (t = this.config.env, xe[t]), He(this._reqClass, "post", [Ge]), He(this._reqClass, "upload", [Ge]), He(this._reqClass, "download", [Ge]);
  13337. }
  13338. (0, _createClass2.default)(Ve, [{
  13339. key: "post",
  13340. value: function () {
  13341. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  13342. return _regenerator.default.wrap(function _callee4$(_context4) {
  13343. while (1) {
  13344. switch (_context4.prev = _context4.next) {
  13345. case 0:
  13346. _context4.next = 2;
  13347. return this._reqClass.post(e);
  13348. case 2:
  13349. return _context4.abrupt("return", _context4.sent);
  13350. case 3:
  13351. case "end":
  13352. return _context4.stop();
  13353. }
  13354. }
  13355. }, _callee4, this);
  13356. }));
  13357. function post(_x2) {
  13358. return _post.apply(this, arguments);
  13359. }
  13360. return post;
  13361. }()
  13362. }, {
  13363. key: "upload",
  13364. value: function () {
  13365. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  13366. return _regenerator.default.wrap(function _callee5$(_context5) {
  13367. while (1) {
  13368. switch (_context5.prev = _context5.next) {
  13369. case 0:
  13370. _context5.next = 2;
  13371. return this._reqClass.upload(e);
  13372. case 2:
  13373. return _context5.abrupt("return", _context5.sent);
  13374. case 3:
  13375. case "end":
  13376. return _context5.stop();
  13377. }
  13378. }
  13379. }, _callee5, this);
  13380. }));
  13381. function upload(_x3) {
  13382. return _upload.apply(this, arguments);
  13383. }
  13384. return upload;
  13385. }()
  13386. }, {
  13387. key: "download",
  13388. value: function () {
  13389. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  13390. return _regenerator.default.wrap(function _callee6$(_context6) {
  13391. while (1) {
  13392. switch (_context6.prev = _context6.next) {
  13393. case 0:
  13394. _context6.next = 2;
  13395. return this._reqClass.download(e);
  13396. case 2:
  13397. return _context6.abrupt("return", _context6.sent);
  13398. case 3:
  13399. case "end":
  13400. return _context6.stop();
  13401. }
  13402. }
  13403. }, _callee6, this);
  13404. }));
  13405. function download(_x4) {
  13406. return _download.apply(this, arguments);
  13407. }
  13408. return download;
  13409. }()
  13410. }, {
  13411. key: "refreshAccessToken",
  13412. value: function () {
  13413. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  13414. var e, t;
  13415. return _regenerator.default.wrap(function _callee7$(_context7) {
  13416. while (1) {
  13417. switch (_context7.prev = _context7.next) {
  13418. case 0:
  13419. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  13420. _context7.prev = 1;
  13421. _context7.next = 4;
  13422. return this._refreshAccessTokenPromise;
  13423. case 4:
  13424. e = _context7.sent;
  13425. _context7.next = 10;
  13426. break;
  13427. case 7:
  13428. _context7.prev = 7;
  13429. _context7.t0 = _context7["catch"](1);
  13430. t = _context7.t0;
  13431. case 10:
  13432. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  13433. _context7.next = 12;
  13434. break;
  13435. }
  13436. throw t;
  13437. case 12:
  13438. return _context7.abrupt("return", e);
  13439. case 13:
  13440. case "end":
  13441. return _context7.stop();
  13442. }
  13443. }
  13444. }, _callee7, this, [[1, 7]]);
  13445. }));
  13446. function refreshAccessToken() {
  13447. return _refreshAccessToken2.apply(this, arguments);
  13448. }
  13449. return refreshAccessToken;
  13450. }()
  13451. }, {
  13452. key: "_refreshAccessToken",
  13453. value: function () {
  13454. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  13455. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e11, _e12, _t7, _s8;
  13456. return _regenerator.default.wrap(function _callee8$(_context8) {
  13457. while (1) {
  13458. switch (_context8.prev = _context8.next) {
  13459. case 0:
  13460. _this$_cache$keys = this._cache.keys, e = _this$_cache$keys.accessTokenKey, t = _this$_cache$keys.accessTokenExpireKey, n = _this$_cache$keys.refreshTokenKey, s = _this$_cache$keys.loginTypeKey, r = _this$_cache$keys.anonymousUuidKey;
  13461. this._cache.removeStore(e), this._cache.removeStore(t);
  13462. i = this._cache.getStore(n);
  13463. if (i) {
  13464. _context8.next = 5;
  13465. break;
  13466. }
  13467. throw new se({
  13468. message: "未登录CloudBase"
  13469. });
  13470. case 5:
  13471. o = {
  13472. refresh_token: i
  13473. };
  13474. _context8.next = 8;
  13475. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  13476. case 8:
  13477. a = _context8.sent;
  13478. if (!a.data.code) {
  13479. _context8.next = 21;
  13480. break;
  13481. }
  13482. _e11 = a.data.code;
  13483. if (!("SIGN_PARAM_INVALID" === _e11 || "REFRESH_TOKEN_EXPIRED" === _e11 || "INVALID_REFRESH_TOKEN" === _e11)) {
  13484. _context8.next = 20;
  13485. break;
  13486. }
  13487. if (!(this._cache.getStore(s) === We.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e11)) {
  13488. _context8.next = 19;
  13489. break;
  13490. }
  13491. _e12 = this._cache.getStore(r);
  13492. _t7 = this._cache.getStore(n);
  13493. _context8.next = 17;
  13494. return this.send("auth.signInAnonymously", {
  13495. anonymous_uuid: _e12,
  13496. refresh_token: _t7
  13497. });
  13498. case 17:
  13499. _s8 = _context8.sent;
  13500. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  13501. case 19:
  13502. Fe(Ke), this._cache.removeStore(n);
  13503. case 20:
  13504. throw new se({
  13505. code: a.data.code,
  13506. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  13507. });
  13508. case 21:
  13509. if (!a.data.access_token) {
  13510. _context8.next = 23;
  13511. break;
  13512. }
  13513. return _context8.abrupt("return", (Fe($e), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), {
  13514. accessToken: a.data.access_token,
  13515. accessTokenExpire: a.data.access_token_expire
  13516. }));
  13517. case 23:
  13518. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  13519. case 24:
  13520. case "end":
  13521. return _context8.stop();
  13522. }
  13523. }
  13524. }, _callee8, this);
  13525. }));
  13526. function _refreshAccessToken() {
  13527. return _refreshAccessToken3.apply(this, arguments);
  13528. }
  13529. return _refreshAccessToken;
  13530. }()
  13531. }, {
  13532. key: "getAccessToken",
  13533. value: function () {
  13534. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  13535. var _this$_cache$keys2, e, t, n, s, r, i;
  13536. return _regenerator.default.wrap(function _callee9$(_context9) {
  13537. while (1) {
  13538. switch (_context9.prev = _context9.next) {
  13539. case 0:
  13540. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  13541. if (this._cache.getStore(n)) {
  13542. _context9.next = 3;
  13543. break;
  13544. }
  13545. throw new se({
  13546. message: "refresh token不存在,登录状态异常"
  13547. });
  13548. case 3:
  13549. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  13550. _context9.t0 = this._shouldRefreshAccessTokenHook;
  13551. if (!_context9.t0) {
  13552. _context9.next = 9;
  13553. break;
  13554. }
  13555. _context9.next = 8;
  13556. return this._shouldRefreshAccessTokenHook(s, r);
  13557. case 8:
  13558. _context9.t0 = !_context9.sent;
  13559. case 9:
  13560. _context9.t1 = _context9.t0;
  13561. if (!_context9.t1) {
  13562. _context9.next = 12;
  13563. break;
  13564. }
  13565. i = !1;
  13566. case 12:
  13567. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  13568. accessToken: s,
  13569. accessTokenExpire: r
  13570. });
  13571. case 13:
  13572. case "end":
  13573. return _context9.stop();
  13574. }
  13575. }
  13576. }, _callee9, this);
  13577. }));
  13578. function getAccessToken() {
  13579. return _getAccessToken.apply(this, arguments);
  13580. }
  13581. return getAccessToken;
  13582. }()
  13583. }, {
  13584. key: "request",
  13585. value: function () {
  13586. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  13587. var s, r, i, _e13, o, _e14, _e15, a, c, u, h, l, d, p, f, g;
  13588. return _regenerator.default.wrap(function _callee10$(_context10) {
  13589. while (1) {
  13590. switch (_context10.prev = _context10.next) {
  13591. case 0:
  13592. s = "x-tcb-trace_".concat(this.config.env);
  13593. r = "application/x-www-form-urlencoded";
  13594. i = _objectSpread({
  13595. action: e,
  13596. env: this.config.env,
  13597. dataVersion: "2019-08-16"
  13598. }, t);
  13599. if (!(-1 === ze.indexOf(e))) {
  13600. _context10.next = 10;
  13601. break;
  13602. }
  13603. _e13 = this._cache.keys.refreshTokenKey;
  13604. _context10.t0 = this._cache.getStore(_e13);
  13605. if (!_context10.t0) {
  13606. _context10.next = 10;
  13607. break;
  13608. }
  13609. _context10.next = 9;
  13610. return this.getAccessToken();
  13611. case 9:
  13612. i.access_token = _context10.sent.accessToken;
  13613. case 10:
  13614. if ("storage.uploadFile" === e) {
  13615. o = new FormData();
  13616. for (_e14 in o) {
  13617. o.hasOwnProperty(_e14) && void 0 !== o[_e14] && o.append(_e14, i[_e14]);
  13618. }
  13619. r = "multipart/form-data";
  13620. } else {
  13621. r = "application/json", o = {};
  13622. for (_e15 in i) {
  13623. void 0 !== i[_e15] && (o[_e15] = i[_e15]);
  13624. }
  13625. }
  13626. a = {
  13627. headers: {
  13628. "content-type": r
  13629. }
  13630. };
  13631. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  13632. c = this._localCache.getStore(s);
  13633. c && (a.headers["X-TCB-Trace"] = c);
  13634. u = t.parse, h = t.inQuery, l = t.search;
  13635. d = {
  13636. env: this.config.env
  13637. };
  13638. u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));
  13639. p = function (e, t) {
  13640. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  13641. var s = /\?/.test(t);
  13642. var r = "";
  13643. for (var _e16 in n) {
  13644. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e16, "=").concat(encodeURIComponent(n[_e16]));
  13645. }
  13646. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  13647. }(ye, "//tcb-api.tencentcloudapi.com/web", d);
  13648. l && (p += l);
  13649. _context10.next = 22;
  13650. return this.post(_objectSpread({
  13651. url: p,
  13652. data: o
  13653. }, a));
  13654. case 22:
  13655. f = _context10.sent;
  13656. g = f.header && f.header["x-tcb-trace"];
  13657. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  13658. _context10.next = 26;
  13659. break;
  13660. }
  13661. throw new se({
  13662. code: "NETWORK_ERROR",
  13663. message: "network request error"
  13664. });
  13665. case 26:
  13666. return _context10.abrupt("return", f);
  13667. case 27:
  13668. case "end":
  13669. return _context10.stop();
  13670. }
  13671. }
  13672. }, _callee10, this);
  13673. }));
  13674. function request(_x5, _x6, _x7) {
  13675. return _request.apply(this, arguments);
  13676. }
  13677. return request;
  13678. }()
  13679. }, {
  13680. key: "send",
  13681. value: function () {
  13682. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  13683. var t,
  13684. n,
  13685. _n6,
  13686. _args11 = arguments;
  13687. return _regenerator.default.wrap(function _callee11$(_context11) {
  13688. while (1) {
  13689. switch (_context11.prev = _context11.next) {
  13690. case 0:
  13691. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  13692. _context11.next = 3;
  13693. return this.request(e, t, {
  13694. onUploadProgress: t.onUploadProgress
  13695. });
  13696. case 3:
  13697. n = _context11.sent;
  13698. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === ze.indexOf(e))) {
  13699. _context11.next = 13;
  13700. break;
  13701. }
  13702. _context11.next = 7;
  13703. return this.refreshAccessToken();
  13704. case 7:
  13705. _context11.next = 9;
  13706. return this.request(e, t, {
  13707. onUploadProgress: t.onUploadProgress
  13708. });
  13709. case 9:
  13710. _n6 = _context11.sent;
  13711. if (!_n6.data.code) {
  13712. _context11.next = 12;
  13713. break;
  13714. }
  13715. throw new se({
  13716. code: _n6.data.code,
  13717. message: _n6.data.message
  13718. });
  13719. case 12:
  13720. return _context11.abrupt("return", _n6.data);
  13721. case 13:
  13722. if (!n.data.code) {
  13723. _context11.next = 15;
  13724. break;
  13725. }
  13726. throw new se({
  13727. code: n.data.code,
  13728. message: n.data.message
  13729. });
  13730. case 15:
  13731. return _context11.abrupt("return", n.data);
  13732. case 16:
  13733. case "end":
  13734. return _context11.stop();
  13735. }
  13736. }
  13737. }, _callee11, this);
  13738. }));
  13739. function send(_x8) {
  13740. return _send.apply(this, arguments);
  13741. }
  13742. return send;
  13743. }()
  13744. }, {
  13745. key: "setRefreshToken",
  13746. value: function setRefreshToken(e) {
  13747. var _this$_cache$keys3 = this._cache.keys,
  13748. t = _this$_cache$keys3.accessTokenKey,
  13749. n = _this$_cache$keys3.accessTokenExpireKey,
  13750. s = _this$_cache$keys3.refreshTokenKey;
  13751. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  13752. }
  13753. }]);
  13754. return Ve;
  13755. }();
  13756. var Qe = {};
  13757. function Ye(e) {
  13758. return Qe[e];
  13759. }
  13760. var Xe = /*#__PURE__*/function () {
  13761. function Xe(e) {
  13762. (0, _classCallCheck2.default)(this, Xe);
  13763. this.config = e, this._cache = Re(e.env), this._request = Ye(e.env);
  13764. }
  13765. (0, _createClass2.default)(Xe, [{
  13766. key: "setRefreshToken",
  13767. value: function setRefreshToken(e) {
  13768. var _this$_cache$keys4 = this._cache.keys,
  13769. t = _this$_cache$keys4.accessTokenKey,
  13770. n = _this$_cache$keys4.accessTokenExpireKey,
  13771. s = _this$_cache$keys4.refreshTokenKey;
  13772. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  13773. }
  13774. }, {
  13775. key: "setAccessToken",
  13776. value: function setAccessToken(e, t) {
  13777. var _this$_cache$keys5 = this._cache.keys,
  13778. n = _this$_cache$keys5.accessTokenKey,
  13779. s = _this$_cache$keys5.accessTokenExpireKey;
  13780. this._cache.setStore(n, e), this._cache.setStore(s, t);
  13781. }
  13782. }, {
  13783. key: "refreshUserInfo",
  13784. value: function () {
  13785. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  13786. var _yield$this$_request$, e;
  13787. return _regenerator.default.wrap(function _callee12$(_context12) {
  13788. while (1) {
  13789. switch (_context12.prev = _context12.next) {
  13790. case 0:
  13791. _context12.next = 2;
  13792. return this._request.send("auth.getUserInfo", {});
  13793. case 2:
  13794. _yield$this$_request$ = _context12.sent;
  13795. e = _yield$this$_request$.data;
  13796. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  13797. case 5:
  13798. case "end":
  13799. return _context12.stop();
  13800. }
  13801. }
  13802. }, _callee12, this);
  13803. }));
  13804. function refreshUserInfo() {
  13805. return _refreshUserInfo.apply(this, arguments);
  13806. }
  13807. return refreshUserInfo;
  13808. }()
  13809. }, {
  13810. key: "setLocalUserInfo",
  13811. value: function setLocalUserInfo(e) {
  13812. var t = this._cache.keys.userInfoKey;
  13813. this._cache.setStore(t, e);
  13814. }
  13815. }]);
  13816. return Xe;
  13817. }();
  13818. var Ze = /*#__PURE__*/function () {
  13819. function Ze(e) {
  13820. (0, _classCallCheck2.default)(this, Ze);
  13821. if (!e) throw new se({
  13822. code: "PARAM_ERROR",
  13823. message: "envId is not defined"
  13824. });
  13825. this._envId = e, this._cache = Re(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  13826. }
  13827. (0, _createClass2.default)(Ze, [{
  13828. key: "linkWithTicket",
  13829. value: function linkWithTicket(e) {
  13830. if ("string" != typeof e) throw new se({
  13831. code: "PARAM_ERROR",
  13832. message: "ticket must be string"
  13833. });
  13834. return this._request.send("auth.linkWithTicket", {
  13835. ticket: e
  13836. });
  13837. }
  13838. }, {
  13839. key: "linkWithRedirect",
  13840. value: function linkWithRedirect(e) {
  13841. e.signInWithRedirect();
  13842. }
  13843. }, {
  13844. key: "updatePassword",
  13845. value: function updatePassword(e, t) {
  13846. return this._request.send("auth.updatePassword", {
  13847. oldPassword: t,
  13848. newPassword: e
  13849. });
  13850. }
  13851. }, {
  13852. key: "updateEmail",
  13853. value: function updateEmail(e) {
  13854. return this._request.send("auth.updateEmail", {
  13855. newEmail: e
  13856. });
  13857. }
  13858. }, {
  13859. key: "updateUsername",
  13860. value: function updateUsername(e) {
  13861. if ("string" != typeof e) throw new se({
  13862. code: "PARAM_ERROR",
  13863. message: "username must be a string"
  13864. });
  13865. return this._request.send("auth.updateUsername", {
  13866. username: e
  13867. });
  13868. }
  13869. }, {
  13870. key: "getLinkedUidList",
  13871. value: function () {
  13872. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  13873. var _yield$this$_request$2, e, t, n;
  13874. return _regenerator.default.wrap(function _callee13$(_context13) {
  13875. while (1) {
  13876. switch (_context13.prev = _context13.next) {
  13877. case 0:
  13878. _context13.next = 2;
  13879. return this._request.send("auth.getLinkedUidList", {});
  13880. case 2:
  13881. _yield$this$_request$2 = _context13.sent;
  13882. e = _yield$this$_request$2.data;
  13883. t = !1;
  13884. n = e.users;
  13885. return _context13.abrupt("return", (n.forEach(function (e) {
  13886. e.wxOpenId && e.wxPublicId && (t = !0);
  13887. }), {
  13888. users: n,
  13889. hasPrimaryUid: t
  13890. }));
  13891. case 7:
  13892. case "end":
  13893. return _context13.stop();
  13894. }
  13895. }
  13896. }, _callee13, this);
  13897. }));
  13898. function getLinkedUidList() {
  13899. return _getLinkedUidList.apply(this, arguments);
  13900. }
  13901. return getLinkedUidList;
  13902. }()
  13903. }, {
  13904. key: "setPrimaryUid",
  13905. value: function setPrimaryUid(e) {
  13906. return this._request.send("auth.setPrimaryUid", {
  13907. uid: e
  13908. });
  13909. }
  13910. }, {
  13911. key: "unlink",
  13912. value: function unlink(e) {
  13913. return this._request.send("auth.unlink", {
  13914. platform: e
  13915. });
  13916. }
  13917. }, {
  13918. key: "update",
  13919. value: function () {
  13920. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  13921. var t, n, s, r, i, o, _yield$this$_request$3, a;
  13922. return _regenerator.default.wrap(function _callee14$(_context14) {
  13923. while (1) {
  13924. switch (_context14.prev = _context14.next) {
  13925. case 0:
  13926. t = e.nickName;
  13927. n = e.gender;
  13928. s = e.avatarUrl;
  13929. r = e.province;
  13930. i = e.country;
  13931. o = e.city;
  13932. _context14.next = 8;
  13933. return this._request.send("auth.updateUserInfo", {
  13934. nickName: t,
  13935. gender: n,
  13936. avatarUrl: s,
  13937. province: r,
  13938. country: i,
  13939. city: o
  13940. });
  13941. case 8:
  13942. _yield$this$_request$3 = _context14.sent;
  13943. a = _yield$this$_request$3.data;
  13944. this.setLocalUserInfo(a);
  13945. case 11:
  13946. case "end":
  13947. return _context14.stop();
  13948. }
  13949. }
  13950. }, _callee14, this);
  13951. }));
  13952. function update(_x9) {
  13953. return _update.apply(this, arguments);
  13954. }
  13955. return update;
  13956. }()
  13957. }, {
  13958. key: "refresh",
  13959. value: function () {
  13960. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  13961. var _yield$this$_request$4, e;
  13962. return _regenerator.default.wrap(function _callee15$(_context15) {
  13963. while (1) {
  13964. switch (_context15.prev = _context15.next) {
  13965. case 0:
  13966. _context15.next = 2;
  13967. return this._request.send("auth.getUserInfo", {});
  13968. case 2:
  13969. _yield$this$_request$4 = _context15.sent;
  13970. e = _yield$this$_request$4.data;
  13971. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  13972. case 5:
  13973. case "end":
  13974. return _context15.stop();
  13975. }
  13976. }
  13977. }, _callee15, this);
  13978. }));
  13979. function refresh() {
  13980. return _refresh.apply(this, arguments);
  13981. }
  13982. return refresh;
  13983. }()
  13984. }, {
  13985. key: "setUserInfo",
  13986. value: function setUserInfo() {
  13987. var _this8 = this;
  13988. var e = this._cache.keys.userInfoKey,
  13989. t = this._cache.getStore(e);
  13990. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  13991. _this8[e] = t[e];
  13992. }), this.location = {
  13993. country: t.country,
  13994. province: t.province,
  13995. city: t.city
  13996. };
  13997. }
  13998. }, {
  13999. key: "setLocalUserInfo",
  14000. value: function setLocalUserInfo(e) {
  14001. var t = this._cache.keys.userInfoKey;
  14002. this._cache.setStore(t, e), this.setUserInfo();
  14003. }
  14004. }]);
  14005. return Ze;
  14006. }();
  14007. var et = /*#__PURE__*/function () {
  14008. function et(e) {
  14009. (0, _classCallCheck2.default)(this, et);
  14010. if (!e) throw new se({
  14011. code: "PARAM_ERROR",
  14012. message: "envId is not defined"
  14013. });
  14014. this._cache = Re(e);
  14015. var _this$_cache$keys6 = this._cache.keys,
  14016. t = _this$_cache$keys6.refreshTokenKey,
  14017. n = _this$_cache$keys6.accessTokenKey,
  14018. s = _this$_cache$keys6.accessTokenExpireKey,
  14019. r = this._cache.getStore(t),
  14020. i = this._cache.getStore(n),
  14021. o = this._cache.getStore(s);
  14022. this.credential = {
  14023. refreshToken: r,
  14024. accessToken: i,
  14025. accessTokenExpire: o
  14026. }, this.user = new Ze(e);
  14027. }
  14028. (0, _createClass2.default)(et, [{
  14029. key: "isAnonymousAuth",
  14030. get: function get() {
  14031. return this.loginType === We.ANONYMOUS;
  14032. }
  14033. }, {
  14034. key: "isCustomAuth",
  14035. get: function get() {
  14036. return this.loginType === We.CUSTOM;
  14037. }
  14038. }, {
  14039. key: "isWeixinAuth",
  14040. get: function get() {
  14041. return this.loginType === We.WECHAT || this.loginType === We.WECHAT_OPEN || this.loginType === We.WECHAT_PUBLIC;
  14042. }
  14043. }, {
  14044. key: "loginType",
  14045. get: function get() {
  14046. return this._cache.getStore(this._cache.keys.loginTypeKey);
  14047. }
  14048. }]);
  14049. return et;
  14050. }();
  14051. var tt = /*#__PURE__*/function (_Xe) {
  14052. (0, _inherits2.default)(tt, _Xe);
  14053. var _super4 = _createSuper(tt);
  14054. function tt() {
  14055. (0, _classCallCheck2.default)(this, tt);
  14056. return _super4.apply(this, arguments);
  14057. }
  14058. (0, _createClass2.default)(tt, [{
  14059. key: "signIn",
  14060. value: function () {
  14061. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  14062. var _this$_cache$keys7, e, t, n, s, r, _e17;
  14063. return _regenerator.default.wrap(function _callee16$(_context16) {
  14064. while (1) {
  14065. switch (_context16.prev = _context16.next) {
  14066. case 0:
  14067. this._cache.updatePersistence("local");
  14068. _this$_cache$keys7 = this._cache.keys;
  14069. e = _this$_cache$keys7.anonymousUuidKey;
  14070. t = _this$_cache$keys7.refreshTokenKey;
  14071. n = this._cache.getStore(e) || void 0;
  14072. s = this._cache.getStore(t) || void 0;
  14073. _context16.next = 8;
  14074. return this._request.send("auth.signInAnonymously", {
  14075. anonymous_uuid: n,
  14076. refresh_token: s
  14077. });
  14078. case 8:
  14079. r = _context16.sent;
  14080. if (!(r.uuid && r.refresh_token)) {
  14081. _context16.next = 20;
  14082. break;
  14083. }
  14084. this._setAnonymousUUID(r.uuid);
  14085. this.setRefreshToken(r.refresh_token);
  14086. _context16.next = 14;
  14087. return this._request.refreshAccessToken();
  14088. case 14:
  14089. Fe(Me);
  14090. Fe(je, {
  14091. env: this.config.env,
  14092. loginType: We.ANONYMOUS,
  14093. persistence: "local"
  14094. });
  14095. _e17 = new et(this.config.env);
  14096. _context16.next = 19;
  14097. return _e17.user.refresh();
  14098. case 19:
  14099. return _context16.abrupt("return", _e17);
  14100. case 20:
  14101. throw new se({
  14102. message: "匿名登录失败"
  14103. });
  14104. case 21:
  14105. case "end":
  14106. return _context16.stop();
  14107. }
  14108. }
  14109. }, _callee16, this);
  14110. }));
  14111. function signIn() {
  14112. return _signIn.apply(this, arguments);
  14113. }
  14114. return signIn;
  14115. }()
  14116. }, {
  14117. key: "linkAndRetrieveDataWithTicket",
  14118. value: function () {
  14119. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  14120. var _this$_cache$keys8, t, n, s, r, i;
  14121. return _regenerator.default.wrap(function _callee17$(_context17) {
  14122. while (1) {
  14123. switch (_context17.prev = _context17.next) {
  14124. case 0:
  14125. _this$_cache$keys8 = this._cache.keys;
  14126. t = _this$_cache$keys8.anonymousUuidKey;
  14127. n = _this$_cache$keys8.refreshTokenKey;
  14128. s = this._cache.getStore(t);
  14129. r = this._cache.getStore(n);
  14130. _context17.next = 7;
  14131. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  14132. anonymous_uuid: s,
  14133. refresh_token: r,
  14134. ticket: e
  14135. });
  14136. case 7:
  14137. i = _context17.sent;
  14138. if (!i.refresh_token) {
  14139. _context17.next = 16;
  14140. break;
  14141. }
  14142. this._clearAnonymousUUID();
  14143. this.setRefreshToken(i.refresh_token);
  14144. _context17.next = 13;
  14145. return this._request.refreshAccessToken();
  14146. case 13:
  14147. Fe(Be, {
  14148. env: this.config.env
  14149. });
  14150. Fe(je, {
  14151. loginType: We.CUSTOM,
  14152. persistence: "local"
  14153. });
  14154. return _context17.abrupt("return", {
  14155. credential: {
  14156. refreshToken: i.refresh_token
  14157. }
  14158. });
  14159. case 16:
  14160. throw new se({
  14161. message: "匿名转化失败"
  14162. });
  14163. case 17:
  14164. case "end":
  14165. return _context17.stop();
  14166. }
  14167. }
  14168. }, _callee17, this);
  14169. }));
  14170. function linkAndRetrieveDataWithTicket(_x10) {
  14171. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  14172. }
  14173. return linkAndRetrieveDataWithTicket;
  14174. }()
  14175. }, {
  14176. key: "_setAnonymousUUID",
  14177. value: function _setAnonymousUUID(e) {
  14178. var _this$_cache$keys9 = this._cache.keys,
  14179. t = _this$_cache$keys9.anonymousUuidKey,
  14180. n = _this$_cache$keys9.loginTypeKey;
  14181. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, We.ANONYMOUS);
  14182. }
  14183. }, {
  14184. key: "_clearAnonymousUUID",
  14185. value: function _clearAnonymousUUID() {
  14186. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  14187. }
  14188. }]);
  14189. return tt;
  14190. }(Xe);
  14191. var nt = /*#__PURE__*/function (_Xe2) {
  14192. (0, _inherits2.default)(nt, _Xe2);
  14193. var _super5 = _createSuper(nt);
  14194. function nt() {
  14195. (0, _classCallCheck2.default)(this, nt);
  14196. return _super5.apply(this, arguments);
  14197. }
  14198. (0, _createClass2.default)(nt, [{
  14199. key: "signIn",
  14200. value: function () {
  14201. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  14202. var t, n;
  14203. return _regenerator.default.wrap(function _callee18$(_context18) {
  14204. while (1) {
  14205. switch (_context18.prev = _context18.next) {
  14206. case 0:
  14207. if (!("string" != typeof e)) {
  14208. _context18.next = 2;
  14209. break;
  14210. }
  14211. throw new se({
  14212. code: "PARAM_ERROR",
  14213. message: "ticket must be a string"
  14214. });
  14215. case 2:
  14216. t = this._cache.keys.refreshTokenKey;
  14217. _context18.next = 5;
  14218. return this._request.send("auth.signInWithTicket", {
  14219. ticket: e,
  14220. refresh_token: this._cache.getStore(t) || ""
  14221. });
  14222. case 5:
  14223. n = _context18.sent;
  14224. if (!n.refresh_token) {
  14225. _context18.next = 15;
  14226. break;
  14227. }
  14228. this.setRefreshToken(n.refresh_token);
  14229. _context18.next = 10;
  14230. return this._request.refreshAccessToken();
  14231. case 10:
  14232. Fe(Me);
  14233. Fe(je, {
  14234. env: this.config.env,
  14235. loginType: We.CUSTOM,
  14236. persistence: this.config.persistence
  14237. });
  14238. _context18.next = 14;
  14239. return this.refreshUserInfo();
  14240. case 14:
  14241. return _context18.abrupt("return", new et(this.config.env));
  14242. case 15:
  14243. throw new se({
  14244. message: "自定义登录失败"
  14245. });
  14246. case 16:
  14247. case "end":
  14248. return _context18.stop();
  14249. }
  14250. }
  14251. }, _callee18, this);
  14252. }));
  14253. function signIn(_x11) {
  14254. return _signIn2.apply(this, arguments);
  14255. }
  14256. return signIn;
  14257. }()
  14258. }]);
  14259. return nt;
  14260. }(Xe);
  14261. var st = /*#__PURE__*/function (_Xe3) {
  14262. (0, _inherits2.default)(st, _Xe3);
  14263. var _super6 = _createSuper(st);
  14264. function st() {
  14265. (0, _classCallCheck2.default)(this, st);
  14266. return _super6.apply(this, arguments);
  14267. }
  14268. (0, _createClass2.default)(st, [{
  14269. key: "signIn",
  14270. value: function () {
  14271. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  14272. var n, s, r, i, o;
  14273. return _regenerator.default.wrap(function _callee19$(_context19) {
  14274. while (1) {
  14275. switch (_context19.prev = _context19.next) {
  14276. case 0:
  14277. if (!("string" != typeof e)) {
  14278. _context19.next = 2;
  14279. break;
  14280. }
  14281. throw new se({
  14282. code: "PARAM_ERROR",
  14283. message: "email must be a string"
  14284. });
  14285. case 2:
  14286. n = this._cache.keys.refreshTokenKey;
  14287. _context19.next = 5;
  14288. return this._request.send("auth.signIn", {
  14289. loginType: "EMAIL",
  14290. email: e,
  14291. password: t,
  14292. refresh_token: this._cache.getStore(n) || ""
  14293. });
  14294. case 5:
  14295. s = _context19.sent;
  14296. r = s.refresh_token;
  14297. i = s.access_token;
  14298. o = s.access_token_expire;
  14299. if (!r) {
  14300. _context19.next = 22;
  14301. break;
  14302. }
  14303. this.setRefreshToken(r);
  14304. if (!(i && o)) {
  14305. _context19.next = 15;
  14306. break;
  14307. }
  14308. this.setAccessToken(i, o);
  14309. _context19.next = 17;
  14310. break;
  14311. case 15:
  14312. _context19.next = 17;
  14313. return this._request.refreshAccessToken();
  14314. case 17:
  14315. _context19.next = 19;
  14316. return this.refreshUserInfo();
  14317. case 19:
  14318. Fe(Me);
  14319. Fe(je, {
  14320. env: this.config.env,
  14321. loginType: We.EMAIL,
  14322. persistence: this.config.persistence
  14323. });
  14324. return _context19.abrupt("return", new et(this.config.env));
  14325. case 22:
  14326. throw s.code ? new se({
  14327. code: s.code,
  14328. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  14329. }) : new se({
  14330. message: "邮箱登录失败"
  14331. });
  14332. case 23:
  14333. case "end":
  14334. return _context19.stop();
  14335. }
  14336. }
  14337. }, _callee19, this);
  14338. }));
  14339. function signIn(_x12, _x13) {
  14340. return _signIn3.apply(this, arguments);
  14341. }
  14342. return signIn;
  14343. }()
  14344. }, {
  14345. key: "activate",
  14346. value: function () {
  14347. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  14348. return _regenerator.default.wrap(function _callee20$(_context20) {
  14349. while (1) {
  14350. switch (_context20.prev = _context20.next) {
  14351. case 0:
  14352. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  14353. token: e
  14354. }));
  14355. case 1:
  14356. case "end":
  14357. return _context20.stop();
  14358. }
  14359. }
  14360. }, _callee20, this);
  14361. }));
  14362. function activate(_x14) {
  14363. return _activate.apply(this, arguments);
  14364. }
  14365. return activate;
  14366. }()
  14367. }, {
  14368. key: "resetPasswordWithToken",
  14369. value: function () {
  14370. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  14371. return _regenerator.default.wrap(function _callee21$(_context21) {
  14372. while (1) {
  14373. switch (_context21.prev = _context21.next) {
  14374. case 0:
  14375. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  14376. token: e,
  14377. newPassword: t
  14378. }));
  14379. case 1:
  14380. case "end":
  14381. return _context21.stop();
  14382. }
  14383. }
  14384. }, _callee21, this);
  14385. }));
  14386. function resetPasswordWithToken(_x15, _x16) {
  14387. return _resetPasswordWithToken.apply(this, arguments);
  14388. }
  14389. return resetPasswordWithToken;
  14390. }()
  14391. }]);
  14392. return st;
  14393. }(Xe);
  14394. var rt = /*#__PURE__*/function (_Xe4) {
  14395. (0, _inherits2.default)(rt, _Xe4);
  14396. var _super7 = _createSuper(rt);
  14397. function rt() {
  14398. (0, _classCallCheck2.default)(this, rt);
  14399. return _super7.apply(this, arguments);
  14400. }
  14401. (0, _createClass2.default)(rt, [{
  14402. key: "signIn",
  14403. value: function () {
  14404. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  14405. var n, s, r, i, o;
  14406. return _regenerator.default.wrap(function _callee22$(_context22) {
  14407. while (1) {
  14408. switch (_context22.prev = _context22.next) {
  14409. case 0:
  14410. if (!("string" != typeof e)) {
  14411. _context22.next = 2;
  14412. break;
  14413. }
  14414. throw new se({
  14415. code: "PARAM_ERROR",
  14416. message: "username must be a string"
  14417. });
  14418. case 2:
  14419. "string" != typeof t && (t = "", console.warn("password is empty"));
  14420. n = this._cache.keys.refreshTokenKey;
  14421. _context22.next = 6;
  14422. return this._request.send("auth.signIn", {
  14423. loginType: We.USERNAME,
  14424. username: e,
  14425. password: t,
  14426. refresh_token: this._cache.getStore(n) || ""
  14427. });
  14428. case 6:
  14429. s = _context22.sent;
  14430. r = s.refresh_token;
  14431. i = s.access_token_expire;
  14432. o = s.access_token;
  14433. if (!r) {
  14434. _context22.next = 23;
  14435. break;
  14436. }
  14437. this.setRefreshToken(r);
  14438. if (!(o && i)) {
  14439. _context22.next = 16;
  14440. break;
  14441. }
  14442. this.setAccessToken(o, i);
  14443. _context22.next = 18;
  14444. break;
  14445. case 16:
  14446. _context22.next = 18;
  14447. return this._request.refreshAccessToken();
  14448. case 18:
  14449. _context22.next = 20;
  14450. return this.refreshUserInfo();
  14451. case 20:
  14452. Fe(Me);
  14453. Fe(je, {
  14454. env: this.config.env,
  14455. loginType: We.USERNAME,
  14456. persistence: this.config.persistence
  14457. });
  14458. return _context22.abrupt("return", new et(this.config.env));
  14459. case 23:
  14460. throw s.code ? new se({
  14461. code: s.code,
  14462. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  14463. }) : new se({
  14464. message: "用户名密码登录失败"
  14465. });
  14466. case 24:
  14467. case "end":
  14468. return _context22.stop();
  14469. }
  14470. }
  14471. }, _callee22, this);
  14472. }));
  14473. function signIn(_x17, _x18) {
  14474. return _signIn4.apply(this, arguments);
  14475. }
  14476. return signIn;
  14477. }()
  14478. }]);
  14479. return rt;
  14480. }(Xe);
  14481. var it = /*#__PURE__*/function () {
  14482. function it(e) {
  14483. (0, _classCallCheck2.default)(this, it);
  14484. this.config = e, this._cache = Re(e.env), this._request = Ye(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), De(je, this._onLoginTypeChanged);
  14485. }
  14486. (0, _createClass2.default)(it, [{
  14487. key: "currentUser",
  14488. get: function get() {
  14489. var e = this.hasLoginState();
  14490. return e && e.user || null;
  14491. }
  14492. }, {
  14493. key: "loginType",
  14494. get: function get() {
  14495. return this._cache.getStore(this._cache.keys.loginTypeKey);
  14496. }
  14497. }, {
  14498. key: "anonymousAuthProvider",
  14499. value: function anonymousAuthProvider() {
  14500. return new tt(this.config);
  14501. }
  14502. }, {
  14503. key: "customAuthProvider",
  14504. value: function customAuthProvider() {
  14505. return new nt(this.config);
  14506. }
  14507. }, {
  14508. key: "emailAuthProvider",
  14509. value: function emailAuthProvider() {
  14510. return new st(this.config);
  14511. }
  14512. }, {
  14513. key: "usernameAuthProvider",
  14514. value: function usernameAuthProvider() {
  14515. return new rt(this.config);
  14516. }
  14517. }, {
  14518. key: "signInAnonymously",
  14519. value: function () {
  14520. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  14521. return _regenerator.default.wrap(function _callee23$(_context23) {
  14522. while (1) {
  14523. switch (_context23.prev = _context23.next) {
  14524. case 0:
  14525. return _context23.abrupt("return", new tt(this.config).signIn());
  14526. case 1:
  14527. case "end":
  14528. return _context23.stop();
  14529. }
  14530. }
  14531. }, _callee23, this);
  14532. }));
  14533. function signInAnonymously() {
  14534. return _signInAnonymously.apply(this, arguments);
  14535. }
  14536. return signInAnonymously;
  14537. }()
  14538. }, {
  14539. key: "signInWithEmailAndPassword",
  14540. value: function () {
  14541. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  14542. return _regenerator.default.wrap(function _callee24$(_context24) {
  14543. while (1) {
  14544. switch (_context24.prev = _context24.next) {
  14545. case 0:
  14546. return _context24.abrupt("return", new st(this.config).signIn(e, t));
  14547. case 1:
  14548. case "end":
  14549. return _context24.stop();
  14550. }
  14551. }
  14552. }, _callee24, this);
  14553. }));
  14554. function signInWithEmailAndPassword(_x19, _x20) {
  14555. return _signInWithEmailAndPassword.apply(this, arguments);
  14556. }
  14557. return signInWithEmailAndPassword;
  14558. }()
  14559. }, {
  14560. key: "signInWithUsernameAndPassword",
  14561. value: function signInWithUsernameAndPassword(e, t) {
  14562. return new rt(this.config).signIn(e, t);
  14563. }
  14564. }, {
  14565. key: "linkAndRetrieveDataWithTicket",
  14566. value: function () {
  14567. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  14568. return _regenerator.default.wrap(function _callee25$(_context25) {
  14569. while (1) {
  14570. switch (_context25.prev = _context25.next) {
  14571. case 0:
  14572. this._anonymousAuthProvider || (this._anonymousAuthProvider = new tt(this.config)), De(Be, this._onAnonymousConverted);
  14573. _context25.next = 3;
  14574. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  14575. case 3:
  14576. return _context25.abrupt("return", _context25.sent);
  14577. case 4:
  14578. case "end":
  14579. return _context25.stop();
  14580. }
  14581. }
  14582. }, _callee25, this);
  14583. }));
  14584. function linkAndRetrieveDataWithTicket(_x21) {
  14585. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  14586. }
  14587. return linkAndRetrieveDataWithTicket;
  14588. }()
  14589. }, {
  14590. key: "signOut",
  14591. value: function () {
  14592. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  14593. var _this$_cache$keys10, e, t, n, s, r;
  14594. return _regenerator.default.wrap(function _callee26$(_context26) {
  14595. while (1) {
  14596. switch (_context26.prev = _context26.next) {
  14597. case 0:
  14598. if (!(this.loginType === We.ANONYMOUS)) {
  14599. _context26.next = 2;
  14600. break;
  14601. }
  14602. throw new se({
  14603. message: "匿名用户不支持登出操作"
  14604. });
  14605. case 2:
  14606. _this$_cache$keys10 = this._cache.keys, e = _this$_cache$keys10.refreshTokenKey, t = _this$_cache$keys10.accessTokenKey, n = _this$_cache$keys10.accessTokenExpireKey, s = this._cache.getStore(e);
  14607. if (s) {
  14608. _context26.next = 5;
  14609. break;
  14610. }
  14611. return _context26.abrupt("return");
  14612. case 5:
  14613. _context26.next = 7;
  14614. return this._request.send("auth.logout", {
  14615. refresh_token: s
  14616. });
  14617. case 7:
  14618. r = _context26.sent;
  14619. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), Fe(Me), Fe(je, {
  14620. env: this.config.env,
  14621. loginType: We.NULL,
  14622. persistence: this.config.persistence
  14623. }), r));
  14624. case 9:
  14625. case "end":
  14626. return _context26.stop();
  14627. }
  14628. }
  14629. }, _callee26, this);
  14630. }));
  14631. function signOut() {
  14632. return _signOut.apply(this, arguments);
  14633. }
  14634. return signOut;
  14635. }()
  14636. }, {
  14637. key: "signUpWithEmailAndPassword",
  14638. value: function () {
  14639. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  14640. return _regenerator.default.wrap(function _callee27$(_context27) {
  14641. while (1) {
  14642. switch (_context27.prev = _context27.next) {
  14643. case 0:
  14644. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  14645. email: e,
  14646. password: t
  14647. }));
  14648. case 1:
  14649. case "end":
  14650. return _context27.stop();
  14651. }
  14652. }
  14653. }, _callee27, this);
  14654. }));
  14655. function signUpWithEmailAndPassword(_x22, _x23) {
  14656. return _signUpWithEmailAndPassword.apply(this, arguments);
  14657. }
  14658. return signUpWithEmailAndPassword;
  14659. }()
  14660. }, {
  14661. key: "sendPasswordResetEmail",
  14662. value: function () {
  14663. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  14664. return _regenerator.default.wrap(function _callee28$(_context28) {
  14665. while (1) {
  14666. switch (_context28.prev = _context28.next) {
  14667. case 0:
  14668. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  14669. email: e
  14670. }));
  14671. case 1:
  14672. case "end":
  14673. return _context28.stop();
  14674. }
  14675. }
  14676. }, _callee28, this);
  14677. }));
  14678. function sendPasswordResetEmail(_x24) {
  14679. return _sendPasswordResetEmail.apply(this, arguments);
  14680. }
  14681. return sendPasswordResetEmail;
  14682. }()
  14683. }, {
  14684. key: "onLoginStateChanged",
  14685. value: function onLoginStateChanged(e) {
  14686. var _this9 = this;
  14687. De(Me, function () {
  14688. var t = _this9.hasLoginState();
  14689. e.call(_this9, t);
  14690. });
  14691. var t = this.hasLoginState();
  14692. e.call(this, t);
  14693. }
  14694. }, {
  14695. key: "onLoginStateExpired",
  14696. value: function onLoginStateExpired(e) {
  14697. De(Ke, e.bind(this));
  14698. }
  14699. }, {
  14700. key: "onAccessTokenRefreshed",
  14701. value: function onAccessTokenRefreshed(e) {
  14702. De($e, e.bind(this));
  14703. }
  14704. }, {
  14705. key: "onAnonymousConverted",
  14706. value: function onAnonymousConverted(e) {
  14707. De(Be, e.bind(this));
  14708. }
  14709. }, {
  14710. key: "onLoginTypeChanged",
  14711. value: function onLoginTypeChanged(e) {
  14712. var _this10 = this;
  14713. De(je, function () {
  14714. var t = _this10.hasLoginState();
  14715. e.call(_this10, t);
  14716. });
  14717. }
  14718. }, {
  14719. key: "getAccessToken",
  14720. value: function () {
  14721. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  14722. return _regenerator.default.wrap(function _callee29$(_context29) {
  14723. while (1) {
  14724. switch (_context29.prev = _context29.next) {
  14725. case 0:
  14726. _context29.next = 2;
  14727. return this._request.getAccessToken();
  14728. case 2:
  14729. _context29.t0 = _context29.sent.accessToken;
  14730. _context29.t1 = this.config.env;
  14731. return _context29.abrupt("return", {
  14732. accessToken: _context29.t0,
  14733. env: _context29.t1
  14734. });
  14735. case 5:
  14736. case "end":
  14737. return _context29.stop();
  14738. }
  14739. }
  14740. }, _callee29, this);
  14741. }));
  14742. function getAccessToken() {
  14743. return _getAccessToken2.apply(this, arguments);
  14744. }
  14745. return getAccessToken;
  14746. }()
  14747. }, {
  14748. key: "hasLoginState",
  14749. value: function hasLoginState() {
  14750. var e = this._cache.keys.refreshTokenKey;
  14751. return this._cache.getStore(e) ? new et(this.config.env) : null;
  14752. }
  14753. }, {
  14754. key: "isUsernameRegistered",
  14755. value: function () {
  14756. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  14757. var _yield$this$_request$5, t;
  14758. return _regenerator.default.wrap(function _callee30$(_context30) {
  14759. while (1) {
  14760. switch (_context30.prev = _context30.next) {
  14761. case 0:
  14762. if (!("string" != typeof e)) {
  14763. _context30.next = 2;
  14764. break;
  14765. }
  14766. throw new se({
  14767. code: "PARAM_ERROR",
  14768. message: "username must be a string"
  14769. });
  14770. case 2:
  14771. _context30.next = 4;
  14772. return this._request.send("auth.isUsernameRegistered", {
  14773. username: e
  14774. });
  14775. case 4:
  14776. _yield$this$_request$5 = _context30.sent;
  14777. t = _yield$this$_request$5.data;
  14778. return _context30.abrupt("return", t && t.isRegistered);
  14779. case 7:
  14780. case "end":
  14781. return _context30.stop();
  14782. }
  14783. }
  14784. }, _callee30, this);
  14785. }));
  14786. function isUsernameRegistered(_x25) {
  14787. return _isUsernameRegistered.apply(this, arguments);
  14788. }
  14789. return isUsernameRegistered;
  14790. }()
  14791. }, {
  14792. key: "getLoginState",
  14793. value: function getLoginState() {
  14794. return Promise.resolve(this.hasLoginState());
  14795. }
  14796. }, {
  14797. key: "signInWithTicket",
  14798. value: function () {
  14799. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  14800. return _regenerator.default.wrap(function _callee31$(_context31) {
  14801. while (1) {
  14802. switch (_context31.prev = _context31.next) {
  14803. case 0:
  14804. return _context31.abrupt("return", new nt(this.config).signIn(e));
  14805. case 1:
  14806. case "end":
  14807. return _context31.stop();
  14808. }
  14809. }
  14810. }, _callee31, this);
  14811. }));
  14812. function signInWithTicket(_x26) {
  14813. return _signInWithTicket.apply(this, arguments);
  14814. }
  14815. return signInWithTicket;
  14816. }()
  14817. }, {
  14818. key: "shouldRefreshAccessToken",
  14819. value: function shouldRefreshAccessToken(e) {
  14820. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  14821. }
  14822. }, {
  14823. key: "getUserInfo",
  14824. value: function getUserInfo() {
  14825. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  14826. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  14827. requestId: e.seqId
  14828. });
  14829. });
  14830. }
  14831. }, {
  14832. key: "getAuthHeader",
  14833. value: function getAuthHeader() {
  14834. var _this$_cache$keys11 = this._cache.keys,
  14835. e = _this$_cache$keys11.refreshTokenKey,
  14836. t = _this$_cache$keys11.accessTokenKey,
  14837. n = this._cache.getStore(e);
  14838. return {
  14839. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  14840. };
  14841. }
  14842. }, {
  14843. key: "_onAnonymousConverted",
  14844. value: function _onAnonymousConverted(e) {
  14845. var t = e.data.env;
  14846. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  14847. }
  14848. }, {
  14849. key: "_onLoginTypeChanged",
  14850. value: function _onLoginTypeChanged(e) {
  14851. var _e$data = e.data,
  14852. t = _e$data.loginType,
  14853. n = _e$data.persistence,
  14854. s = _e$data.env;
  14855. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  14856. }
  14857. }]);
  14858. return it;
  14859. }();
  14860. var ot = function ot(e, t) {
  14861. t = t || ve();
  14862. var n = Ye(this.config.env),
  14863. s = e.cloudPath,
  14864. r = e.filePath,
  14865. i = e.onUploadProgress,
  14866. _e$fileType = e.fileType,
  14867. o = _e$fileType === void 0 ? "image" : _e$fileType;
  14868. return n.send("storage.getUploadMetadata", {
  14869. path: s
  14870. }).then(function (e) {
  14871. var _e$data2 = e.data,
  14872. a = _e$data2.url,
  14873. c = _e$data2.authorization,
  14874. u = _e$data2.token,
  14875. h = _e$data2.fileId,
  14876. l = _e$data2.cosFileId,
  14877. d = e.requestId,
  14878. p = {
  14879. key: s,
  14880. signature: c,
  14881. "x-cos-meta-fileid": l,
  14882. success_action_status: "201",
  14883. "x-cos-security-token": u
  14884. };
  14885. n.upload({
  14886. url: a,
  14887. data: p,
  14888. file: r,
  14889. name: s,
  14890. fileType: o,
  14891. onUploadProgress: i
  14892. }).then(function (e) {
  14893. 201 === e.statusCode ? t(null, {
  14894. fileID: h,
  14895. requestId: d
  14896. }) : t(new se({
  14897. code: "STORAGE_REQUEST_FAIL",
  14898. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  14899. }));
  14900. }).catch(function (e) {
  14901. t(e);
  14902. });
  14903. }).catch(function (e) {
  14904. t(e);
  14905. }), t.promise;
  14906. },
  14907. at = function at(e, t) {
  14908. t = t || ve();
  14909. var n = Ye(this.config.env),
  14910. s = e.cloudPath;
  14911. return n.send("storage.getUploadMetadata", {
  14912. path: s
  14913. }).then(function (e) {
  14914. t(null, e);
  14915. }).catch(function (e) {
  14916. t(e);
  14917. }), t.promise;
  14918. },
  14919. ct = function ct(_ref7, t) {
  14920. var e = _ref7.fileList;
  14921. if (t = t || ve(), !e || !Array.isArray(e)) return {
  14922. code: "INVALID_PARAM",
  14923. message: "fileList必须是非空的数组"
  14924. };
  14925. var _iterator3 = _createForOfIteratorHelper(e),
  14926. _step3;
  14927. try {
  14928. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  14929. var _t8 = _step3.value;
  14930. if (!_t8 || "string" != typeof _t8) return {
  14931. code: "INVALID_PARAM",
  14932. message: "fileList的元素必须是非空的字符串"
  14933. };
  14934. }
  14935. } catch (err) {
  14936. _iterator3.e(err);
  14937. } finally {
  14938. _iterator3.f();
  14939. }
  14940. var n = {
  14941. fileid_list: e
  14942. };
  14943. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  14944. e.code ? t(null, e) : t(null, {
  14945. fileList: e.data.delete_list,
  14946. requestId: e.requestId
  14947. });
  14948. }).catch(function (e) {
  14949. t(e);
  14950. }), t.promise;
  14951. },
  14952. ut = function ut(_ref8, t) {
  14953. var e = _ref8.fileList;
  14954. t = t || ve(), e && Array.isArray(e) || t(null, {
  14955. code: "INVALID_PARAM",
  14956. message: "fileList必须是非空的数组"
  14957. });
  14958. var n = [];
  14959. var _iterator4 = _createForOfIteratorHelper(e),
  14960. _step4;
  14961. try {
  14962. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  14963. var _s9 = _step4.value;
  14964. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  14965. code: "INVALID_PARAM",
  14966. message: "fileList的元素必须是包含fileID和maxAge的对象"
  14967. }), n.push({
  14968. fileid: _s9.fileID,
  14969. max_age: _s9.maxAge
  14970. })) : "string" == typeof _s9 ? n.push({
  14971. fileid: _s9
  14972. }) : t(null, {
  14973. code: "INVALID_PARAM",
  14974. message: "fileList的元素必须是字符串"
  14975. });
  14976. }
  14977. } catch (err) {
  14978. _iterator4.e(err);
  14979. } finally {
  14980. _iterator4.f();
  14981. }
  14982. var s = {
  14983. file_list: n
  14984. };
  14985. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  14986. e.code ? t(null, e) : t(null, {
  14987. fileList: e.data.download_list,
  14988. requestId: e.requestId
  14989. });
  14990. }).catch(function (e) {
  14991. t(e);
  14992. }), t.promise;
  14993. },
  14994. ht = /*#__PURE__*/function () {
  14995. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  14996. var e, n, s, r;
  14997. return _regenerator.default.wrap(function _callee32$(_context32) {
  14998. while (1) {
  14999. switch (_context32.prev = _context32.next) {
  15000. case 0:
  15001. e = _ref9.fileID;
  15002. _context32.next = 3;
  15003. return ut.call(this, {
  15004. fileList: [{
  15005. fileID: e,
  15006. maxAge: 600
  15007. }]
  15008. });
  15009. case 3:
  15010. n = _context32.sent.fileList[0];
  15011. if (!("SUCCESS" !== n.code)) {
  15012. _context32.next = 6;
  15013. break;
  15014. }
  15015. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  15016. e(n);
  15017. }));
  15018. case 6:
  15019. s = Ye(this.config.env);
  15020. r = n.download_url;
  15021. if (!(r = encodeURI(r), !t)) {
  15022. _context32.next = 10;
  15023. break;
  15024. }
  15025. return _context32.abrupt("return", s.download({
  15026. url: r
  15027. }));
  15028. case 10:
  15029. _context32.t0 = t;
  15030. _context32.next = 13;
  15031. return s.download({
  15032. url: r
  15033. });
  15034. case 13:
  15035. _context32.t1 = _context32.sent;
  15036. (0, _context32.t0)(_context32.t1);
  15037. case 15:
  15038. case "end":
  15039. return _context32.stop();
  15040. }
  15041. }
  15042. }, _callee32, this);
  15043. }));
  15044. return function ht(_x27, _x28) {
  15045. return _ref10.apply(this, arguments);
  15046. };
  15047. }(),
  15048. lt = function lt(_ref11, i) {
  15049. var e = _ref11.name,
  15050. t = _ref11.data,
  15051. n = _ref11.query,
  15052. s = _ref11.parse,
  15053. r = _ref11.search;
  15054. var o = i || ve();
  15055. var a;
  15056. try {
  15057. a = t ? JSON.stringify(t) : "";
  15058. } catch (e) {
  15059. return Promise.reject(e);
  15060. }
  15061. if (!e) return Promise.reject(new se({
  15062. code: "PARAM_ERROR",
  15063. message: "函数名不能为空"
  15064. }));
  15065. var c = {
  15066. inQuery: n,
  15067. parse: s,
  15068. search: r,
  15069. function_name: e,
  15070. request_data: a
  15071. };
  15072. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  15073. if (e.code) o(null, e);else {
  15074. var _t9 = e.data.response_data;
  15075. if (s) o(null, {
  15076. result: _t9,
  15077. requestId: e.requestId
  15078. });else try {
  15079. _t9 = JSON.parse(e.data.response_data), o(null, {
  15080. result: _t9,
  15081. requestId: e.requestId
  15082. });
  15083. } catch (e) {
  15084. o(new se({
  15085. message: "response data must be json"
  15086. }));
  15087. }
  15088. }
  15089. return o.promise;
  15090. }).catch(function (e) {
  15091. o(e);
  15092. }), o.promise;
  15093. },
  15094. dt = {
  15095. timeout: 15e3,
  15096. persistence: "session"
  15097. },
  15098. pt = {};
  15099. var ft = /*#__PURE__*/function () {
  15100. function ft(e) {
  15101. (0, _classCallCheck2.default)(this, ft);
  15102. this.config = e || this.config, this.authObj = void 0;
  15103. }
  15104. (0, _createClass2.default)(ft, [{
  15105. key: "init",
  15106. value: function init(e) {
  15107. switch (Te.adapter || (this.requestClient = new Te.adapter.reqClass({
  15108. timeout: e.timeout || 5e3,
  15109. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  15110. })), this.config = _objectSpread(_objectSpread({}, dt), e), !0) {
  15111. case this.config.timeout > 6e5:
  15112. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  15113. break;
  15114. case this.config.timeout < 100:
  15115. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  15116. }
  15117. return new ft(this.config);
  15118. }
  15119. }, {
  15120. key: "auth",
  15121. value: function auth() {
  15122. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15123. e = _ref12.persistence;
  15124. if (this.authObj) return this.authObj;
  15125. var t = e || Te.adapter.primaryStorage || dt.persistence;
  15126. var n;
  15127. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  15128. var t = e.env;
  15129. Oe[t] = new Ee(e), xe[t] = new Ee(_objectSpread(_objectSpread({}, e), {}, {
  15130. persistence: "local"
  15131. }));
  15132. }(this.config), n = this.config, Qe[n.env] = new Ve(n), this.authObj = new it(this.config), this.authObj;
  15133. }
  15134. }, {
  15135. key: "on",
  15136. value: function on(e, t) {
  15137. return De.apply(this, [e, t]);
  15138. }
  15139. }, {
  15140. key: "off",
  15141. value: function off(e, t) {
  15142. return qe.apply(this, [e, t]);
  15143. }
  15144. }, {
  15145. key: "callFunction",
  15146. value: function callFunction(e, t) {
  15147. return lt.apply(this, [e, t]);
  15148. }
  15149. }, {
  15150. key: "deleteFile",
  15151. value: function deleteFile(e, t) {
  15152. return ct.apply(this, [e, t]);
  15153. }
  15154. }, {
  15155. key: "getTempFileURL",
  15156. value: function getTempFileURL(e, t) {
  15157. return ut.apply(this, [e, t]);
  15158. }
  15159. }, {
  15160. key: "downloadFile",
  15161. value: function downloadFile(e, t) {
  15162. return ht.apply(this, [e, t]);
  15163. }
  15164. }, {
  15165. key: "uploadFile",
  15166. value: function uploadFile(e, t) {
  15167. return ot.apply(this, [e, t]);
  15168. }
  15169. }, {
  15170. key: "getUploadMetadata",
  15171. value: function getUploadMetadata(e, t) {
  15172. return at.apply(this, [e, t]);
  15173. }
  15174. }, {
  15175. key: "registerExtension",
  15176. value: function registerExtension(e) {
  15177. pt[e.name] = e;
  15178. }
  15179. }, {
  15180. key: "invokeExtension",
  15181. value: function () {
  15182. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  15183. var n;
  15184. return _regenerator.default.wrap(function _callee33$(_context33) {
  15185. while (1) {
  15186. switch (_context33.prev = _context33.next) {
  15187. case 0:
  15188. n = pt[e];
  15189. if (n) {
  15190. _context33.next = 3;
  15191. break;
  15192. }
  15193. throw new se({
  15194. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  15195. });
  15196. case 3:
  15197. _context33.next = 5;
  15198. return n.invoke(t, this);
  15199. case 5:
  15200. return _context33.abrupt("return", _context33.sent);
  15201. case 6:
  15202. case "end":
  15203. return _context33.stop();
  15204. }
  15205. }
  15206. }, _callee33, this);
  15207. }));
  15208. function invokeExtension(_x29, _x30) {
  15209. return _invokeExtension.apply(this, arguments);
  15210. }
  15211. return invokeExtension;
  15212. }()
  15213. }, {
  15214. key: "useAdapters",
  15215. value: function useAdapters(e) {
  15216. var _ref13 = ke(e) || {},
  15217. t = _ref13.adapter,
  15218. n = _ref13.runtime;
  15219. t && (Te.adapter = t), n && (Te.runtime = n);
  15220. }
  15221. }]);
  15222. return ft;
  15223. }();
  15224. var gt = new ft();
  15225. function mt(e, t, n) {
  15226. void 0 === n && (n = {});
  15227. var s = /\?/.test(t),
  15228. r = "";
  15229. for (var i in n) {
  15230. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  15231. }
  15232. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  15233. }
  15234. var yt = /*#__PURE__*/function () {
  15235. function yt() {
  15236. (0, _classCallCheck2.default)(this, yt);
  15237. }
  15238. (0, _createClass2.default)(yt, [{
  15239. key: "post",
  15240. value: function post(e) {
  15241. var t = e.url,
  15242. n = e.data,
  15243. s = e.headers;
  15244. return new Promise(function (e, r) {
  15245. re.request({
  15246. url: mt("https:", t),
  15247. data: n,
  15248. method: "POST",
  15249. header: s,
  15250. success: function success(t) {
  15251. e(t);
  15252. },
  15253. fail: function fail(e) {
  15254. r(e);
  15255. }
  15256. });
  15257. });
  15258. }
  15259. }, {
  15260. key: "upload",
  15261. value: function upload(e) {
  15262. return new Promise(function (t, n) {
  15263. var s = e.url,
  15264. r = e.file,
  15265. i = e.data,
  15266. o = e.headers,
  15267. a = e.fileType,
  15268. c = re.uploadFile({
  15269. url: mt("https:", s),
  15270. name: "file",
  15271. formData: Object.assign({}, i),
  15272. filePath: r,
  15273. fileType: a,
  15274. header: o,
  15275. success: function success(e) {
  15276. var n = {
  15277. statusCode: e.statusCode,
  15278. data: e.data || {}
  15279. };
  15280. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  15281. },
  15282. fail: function fail(e) {
  15283. n(new Error(e.errMsg || "uploadFile:fail"));
  15284. }
  15285. });
  15286. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  15287. e.onUploadProgress({
  15288. loaded: t.totalBytesSent,
  15289. total: t.totalBytesExpectedToSend
  15290. });
  15291. });
  15292. });
  15293. }
  15294. }]);
  15295. return yt;
  15296. }();
  15297. var _t = {
  15298. setItem: function setItem(e, t) {
  15299. re.setStorageSync(e, t);
  15300. },
  15301. getItem: function getItem(e) {
  15302. return re.getStorageSync(e);
  15303. },
  15304. removeItem: function removeItem(e) {
  15305. re.removeStorageSync(e);
  15306. },
  15307. clear: function clear() {
  15308. re.clearStorageSync();
  15309. }
  15310. };
  15311. var wt = {
  15312. genAdapter: function genAdapter() {
  15313. return {
  15314. root: {},
  15315. reqClass: yt,
  15316. localStorage: _t,
  15317. primaryStorage: "local"
  15318. };
  15319. },
  15320. isMatch: function isMatch() {
  15321. return !0;
  15322. },
  15323. runtime: "uni_app"
  15324. };
  15325. gt.useAdapters(wt);
  15326. var vt = gt,
  15327. St = vt.init;
  15328. vt.init = function (e) {
  15329. e.env = e.spaceId;
  15330. var t = St.call(this, e);
  15331. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  15332. var n = t.auth;
  15333. return t.auth = function (e) {
  15334. var t = n.call(this, e);
  15335. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  15336. var n;
  15337. t[e] = (n = t[e], function (e) {
  15338. e = e || {};
  15339. var _ne = ne(e),
  15340. t = _ne.success,
  15341. s = _ne.fail,
  15342. r = _ne.complete;
  15343. if (!(t || s || r)) return n.call(this, e);
  15344. n.call(this, e).then(function (e) {
  15345. t && t(e), r && r(e);
  15346. }, function (e) {
  15347. s && s(e), r && r(e);
  15348. });
  15349. }).bind(t);
  15350. }), t;
  15351. }, t.customAuth = t.auth, t;
  15352. };
  15353. var It = vt;
  15354. var bt = /*#__PURE__*/function (_ge) {
  15355. (0, _inherits2.default)(bt, _ge);
  15356. var _super8 = _createSuper(bt);
  15357. function bt() {
  15358. (0, _classCallCheck2.default)(this, bt);
  15359. return _super8.apply(this, arguments);
  15360. }
  15361. (0, _createClass2.default)(bt, [{
  15362. key: "getAccessToken",
  15363. value: function getAccessToken() {
  15364. var _this11 = this;
  15365. return new Promise(function (e, t) {
  15366. var n = "Anonymous_Access_token";
  15367. _this11.setAccessToken(n), e(n);
  15368. });
  15369. }
  15370. }, {
  15371. key: "setupRequest",
  15372. value: function setupRequest(e, t) {
  15373. var n = Object.assign({}, e, {
  15374. spaceId: this.config.spaceId,
  15375. timestamp: Date.now()
  15376. }),
  15377. s = {
  15378. "Content-Type": "application/json"
  15379. };
  15380. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = de.sign(n, this.config.clientSecret);
  15381. var r = le();
  15382. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  15383. var _ie = ie(),
  15384. i = _ie.token;
  15385. return s["x-client-token"] = i, {
  15386. url: this.config.requestUrl,
  15387. method: "POST",
  15388. data: n,
  15389. dataType: "json",
  15390. header: JSON.parse(JSON.stringify(s))
  15391. };
  15392. }
  15393. }, {
  15394. key: "uploadFileToOSS",
  15395. value: function uploadFileToOSS(_ref14) {
  15396. var _this12 = this;
  15397. var e = _ref14.url,
  15398. t = _ref14.formData,
  15399. n = _ref14.name,
  15400. s = _ref14.filePath,
  15401. r = _ref14.fileType,
  15402. i = _ref14.onUploadProgress;
  15403. return new Promise(function (o, a) {
  15404. var c = _this12.adapter.uploadFile({
  15405. url: e,
  15406. formData: t,
  15407. name: n,
  15408. filePath: s,
  15409. fileType: r,
  15410. success: function success(e) {
  15411. e && e.statusCode < 400 ? o(e) : a(new se({
  15412. code: "UPLOAD_FAILED",
  15413. message: "文件上传失败"
  15414. }));
  15415. },
  15416. fail: function fail(e) {
  15417. a(new se({
  15418. code: e.code || "UPLOAD_FAILED",
  15419. message: e.message || e.errMsg || "文件上传失败"
  15420. }));
  15421. }
  15422. });
  15423. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  15424. i({
  15425. loaded: e.totalBytesSent,
  15426. total: e.totalBytesExpectedToSend
  15427. });
  15428. });
  15429. });
  15430. }
  15431. }, {
  15432. key: "uploadFile",
  15433. value: function uploadFile(_ref15) {
  15434. var _this13 = this;
  15435. var e = _ref15.filePath,
  15436. t = _ref15.cloudPath,
  15437. _ref15$fileType = _ref15.fileType,
  15438. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  15439. s = _ref15.onUploadProgress;
  15440. if (!t) throw new se({
  15441. code: "CLOUDPATH_REQUIRED",
  15442. message: "cloudPath不可为空"
  15443. });
  15444. var r;
  15445. return this.getOSSUploadOptionsFromPath({
  15446. cloudPath: t
  15447. }).then(function (t) {
  15448. var _t$result = t.result,
  15449. i = _t$result.url,
  15450. o = _t$result.formData,
  15451. a = _t$result.name;
  15452. r = t.result.fileUrl;
  15453. var c = {
  15454. url: i,
  15455. formData: o,
  15456. name: a,
  15457. filePath: e,
  15458. fileType: n
  15459. };
  15460. return _this13.uploadFileToOSS(Object.assign({}, c, {
  15461. onUploadProgress: s
  15462. }));
  15463. }).then(function () {
  15464. return _this13.reportOSSUpload({
  15465. cloudPath: t
  15466. });
  15467. }).then(function (t) {
  15468. return new Promise(function (n, s) {
  15469. t.success ? n({
  15470. success: !0,
  15471. filePath: e,
  15472. fileID: r
  15473. }) : s(new se({
  15474. code: "UPLOAD_FAILED",
  15475. message: "文件上传失败"
  15476. }));
  15477. });
  15478. });
  15479. }
  15480. }, {
  15481. key: "deleteFile",
  15482. value: function deleteFile(_ref16) {
  15483. var e = _ref16.fileList;
  15484. var t = {
  15485. method: "serverless.file.resource.delete",
  15486. params: JSON.stringify({
  15487. fileList: e
  15488. })
  15489. };
  15490. return this.request(this.setupRequest(t)).then(function (e) {
  15491. if (e.success) return e.result;
  15492. throw new se({
  15493. code: "DELETE_FILE_FAILED",
  15494. message: "删除文件失败"
  15495. });
  15496. });
  15497. }
  15498. }, {
  15499. key: "getTempFileURL",
  15500. value: function getTempFileURL() {
  15501. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15502. e = _ref17.fileList;
  15503. if (!Array.isArray(e) || 0 === e.length) throw new se({
  15504. code: "INVALID_PARAM",
  15505. message: "fileList的元素必须是非空的字符串"
  15506. });
  15507. var t = {
  15508. method: "serverless.file.resource.getTempFileURL",
  15509. params: JSON.stringify({
  15510. fileList: e
  15511. })
  15512. };
  15513. return this.request(this.setupRequest(t)).then(function (e) {
  15514. if (e.success) return {
  15515. fileList: e.result.fileList.map(function (e) {
  15516. return {
  15517. fileID: e.fileID,
  15518. tempFileURL: e.tempFileURL
  15519. };
  15520. })
  15521. };
  15522. throw new se({
  15523. code: "GET_TEMP_FILE_URL_FAILED",
  15524. message: "获取临时文件链接失败"
  15525. });
  15526. });
  15527. }
  15528. }]);
  15529. return bt;
  15530. }(ge);
  15531. var kt = {
  15532. init: function init(e) {
  15533. var t = new bt(e),
  15534. n = {
  15535. signInAnonymously: function signInAnonymously() {
  15536. return t.authorize();
  15537. },
  15538. getLoginState: function getLoginState() {
  15539. return Promise.resolve(!1);
  15540. }
  15541. };
  15542. return t.auth = function () {
  15543. return n;
  15544. }, t.customAuth = t.auth, t;
  15545. }
  15546. };
  15547. function Tt(_ref18) {
  15548. var e = _ref18.data;
  15549. var t;
  15550. t = le();
  15551. var n = JSON.parse(JSON.stringify(e || {}));
  15552. if (Object.assign(n, {
  15553. clientInfo: t
  15554. }), !n.uniIdToken) {
  15555. var _ie2 = ie(),
  15556. _e18 = _ie2.token;
  15557. _e18 && (n.uniIdToken = _e18);
  15558. }
  15559. return n;
  15560. }
  15561. function Ct() {
  15562. return _Ct.apply(this, arguments);
  15563. }
  15564. function _Ct() {
  15565. _Ct = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  15566. var _this26 = this;
  15567. var _ref60,
  15568. e,
  15569. t,
  15570. _this$__dev__,
  15571. n,
  15572. s,
  15573. r,
  15574. i,
  15575. o,
  15576. a,
  15577. _args6 = arguments;
  15578. return _regenerator.default.wrap(function _callee54$(_context54) {
  15579. while (1) {
  15580. switch (_context54.prev = _context54.next) {
  15581. case 0:
  15582. _ref60 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref60.name, t = _ref60.data;
  15583. _context54.next = 3;
  15584. return this.__dev__.initLocalNetwork();
  15585. case 3:
  15586. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  15587. aliyun: "aliyun",
  15588. tencent: "tcb"
  15589. }[this.config.provider], i = this.config.spaceId, o = "http://".concat(n, ":").concat(s, "/system/check-function"), a = "http://".concat(n, ":").concat(s, "/cloudfunctions/").concat(e);
  15590. return _context54.abrupt("return", new Promise(function (t, n) {
  15591. re.request({
  15592. method: "POST",
  15593. url: o,
  15594. data: {
  15595. name: e,
  15596. platform: A,
  15597. provider: r,
  15598. spaceId: i
  15599. },
  15600. timeout: 3e3,
  15601. success: function success(e) {
  15602. t(e);
  15603. },
  15604. fail: function fail() {
  15605. t({
  15606. data: {
  15607. code: "NETWORK_ERROR",
  15608. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  15609. }
  15610. });
  15611. }
  15612. });
  15613. }).then(function () {
  15614. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15615. e = _ref61.data;
  15616. var _ref62 = e || {},
  15617. t = _ref62.code,
  15618. n = _ref62.message;
  15619. return {
  15620. code: 0 === t ? 0 : t || "SYS_ERR",
  15621. message: n || "SYS_ERR"
  15622. };
  15623. }).then(function (_ref63) {
  15624. var n = _ref63.code,
  15625. s = _ref63.message;
  15626. if (0 !== n) {
  15627. switch (n) {
  15628. case "MODULE_ENCRYPTED":
  15629. console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e, "\uFF09\u4F9D\u8D56\u52A0\u5BC6\u516C\u5171\u6A21\u5757\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570"));
  15630. break;
  15631. case "FUNCTION_ENCRYPTED":
  15632. console.error("\u6B64\u4E91\u51FD\u6570\uFF08".concat(e, "\uFF09\u5DF2\u52A0\u5BC6\u4E0D\u53EF\u672C\u5730\u8C03\u8BD5\uFF0C\u81EA\u52A8\u5207\u6362\u4E3A\u4E91\u7AEF\u5DF2\u90E8\u7F72\u7684\u4E91\u51FD\u6570"));
  15633. break;
  15634. case "ACTION_ENCRYPTED":
  15635. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  15636. break;
  15637. case "NETWORK_ERROR":
  15638. {
  15639. var _e30 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  15640. throw console.error(_e30), new Error(_e30);
  15641. }
  15642. case "SWITCH_TO_CLOUD":
  15643. break;
  15644. default:
  15645. {
  15646. var _e31 = "\u68C0\u6D4B\u672C\u5730\u8C03\u8BD5\u670D\u52A1\u51FA\u73B0\u9519\u8BEF\uFF1A".concat(s, "\uFF0C\u8BF7\u68C0\u67E5\u7F51\u7EDC\u73AF\u5883\u6216\u91CD\u542F\u5BA2\u6237\u7AEF\u518D\u8BD5");
  15647. throw console.error(_e31), new Error(_e31);
  15648. }
  15649. }
  15650. return _this26._callCloudFunction({
  15651. name: e,
  15652. data: t
  15653. });
  15654. }
  15655. return new Promise(function (e, n) {
  15656. var s = Tt.call(_this26, {
  15657. data: t
  15658. });
  15659. re.request({
  15660. method: "POST",
  15661. url: a,
  15662. data: {
  15663. provider: r,
  15664. platform: A,
  15665. param: s
  15666. },
  15667. success: function success() {
  15668. var _ref64 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15669. t = _ref64.statusCode,
  15670. s = _ref64.data;
  15671. return !t || t >= 400 ? n(new se({
  15672. code: s.code || "SYS_ERR",
  15673. message: s.message || "request:fail"
  15674. })) : e({
  15675. result: s
  15676. });
  15677. },
  15678. fail: function fail(e) {
  15679. n(new se({
  15680. code: e.code || e.errCode || "SYS_ERR",
  15681. message: e.message || e.errMsg || "request:fail"
  15682. }));
  15683. }
  15684. });
  15685. });
  15686. }));
  15687. case 5:
  15688. case "end":
  15689. return _context54.stop();
  15690. }
  15691. }
  15692. }, _callee54, this);
  15693. }));
  15694. return _Ct.apply(this, arguments);
  15695. }
  15696. var Pt = [{
  15697. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  15698. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  15699. mode: "append"
  15700. }];
  15701. var At = /[\\^$.*+?()[\]{}|]/g,
  15702. Et = RegExp(At.source);
  15703. function Ot(e, t, n) {
  15704. return e.replace(new RegExp((s = t) && Et.test(s) ? s.replace(At, "\\$&") : s, "g"), n);
  15705. var s;
  15706. }
  15707. var xt = "none",
  15708. Rt = "request",
  15709. Ut = "response",
  15710. Lt = "both";
  15711. var Nt = /*#__PURE__*/function () {
  15712. function Nt() {
  15713. var _ref19 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15714. e = _ref19.secretType,
  15715. t = _ref19.uniCloudIns;
  15716. (0, _classCallCheck2.default)(this, Nt);
  15717. this.clientType = "", this.secretType = e || xt, this.uniCloudIns = t;
  15718. var _this$uniCloudIns$con = this.uniCloudIns.config,
  15719. n = _this$uniCloudIns$con.provider,
  15720. s = _this$uniCloudIns$con.spaceId;
  15721. var r;
  15722. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  15723. }
  15724. (0, _createClass2.default)(Nt, [{
  15725. key: "getSystemInfo",
  15726. value: function getSystemInfo() {
  15727. return this._systemInfo || (this._systemInfo = ue()), this._systemInfo;
  15728. }
  15729. }, {
  15730. key: "appId",
  15731. get: function get() {
  15732. return this.getSystemInfo().appId;
  15733. }
  15734. }, {
  15735. key: "deviceId",
  15736. get: function get() {
  15737. return this.getSystemInfo().deviceId;
  15738. }
  15739. }, {
  15740. key: "encryptData",
  15741. value: function () {
  15742. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(e) {
  15743. return _regenerator.default.wrap(function _callee34$(_context34) {
  15744. while (1) {
  15745. switch (_context34.prev = _context34.next) {
  15746. case 0:
  15747. return _context34.abrupt("return", this.secretType === xt ? e : this.platformEncryptData(e));
  15748. case 1:
  15749. case "end":
  15750. return _context34.stop();
  15751. }
  15752. }
  15753. }, _callee34, this);
  15754. }));
  15755. function encryptData(_x31) {
  15756. return _encryptData.apply(this, arguments);
  15757. }
  15758. return encryptData;
  15759. }()
  15760. }, {
  15761. key: "decryptResult",
  15762. value: function () {
  15763. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(e) {
  15764. var _ref20, t, n;
  15765. return _regenerator.default.wrap(function _callee35$(_context35) {
  15766. while (1) {
  15767. switch (_context35.prev = _context35.next) {
  15768. case 0:
  15769. if (!(this.secretType === xt)) {
  15770. _context35.next = 2;
  15771. break;
  15772. }
  15773. return _context35.abrupt("return", e);
  15774. case 2:
  15775. _ref20 = e || {}, t = _ref20.errCode, n = _ref20.content;
  15776. return _context35.abrupt("return", t || !n ? e : this.secretType === Rt ? n : this.platformDecryptResult(e));
  15777. case 4:
  15778. case "end":
  15779. return _context35.stop();
  15780. }
  15781. }
  15782. }, _callee35, this);
  15783. }));
  15784. function decryptResult(_x32) {
  15785. return _decryptResult.apply(this, arguments);
  15786. }
  15787. return decryptResult;
  15788. }()
  15789. }, {
  15790. key: "wrapVerifyClientCallFunction",
  15791. value: function wrapVerifyClientCallFunction(e) {
  15792. var t = this;
  15793. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36() {
  15794. var _ref22,
  15795. n,
  15796. _ref22$data,
  15797. s,
  15798. r,
  15799. _args36 = arguments;
  15800. return _regenerator.default.wrap(function _callee36$(_context36) {
  15801. while (1) {
  15802. switch (_context36.prev = _context36.next) {
  15803. case 0:
  15804. _ref22 = _args36.length > 0 && _args36[0] !== undefined ? _args36[0] : {}, n = _ref22.name, _ref22$data = _ref22.data, s = _ref22$data === void 0 ? {} : _ref22$data;
  15805. _context36.next = 3;
  15806. return t.prepare();
  15807. case 3:
  15808. _context36.next = 5;
  15809. return t.platformGetSignOption();
  15810. case 5:
  15811. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context36.sent;
  15812. _context36.next = 8;
  15813. return e({
  15814. name: n,
  15815. data: s
  15816. });
  15817. case 8:
  15818. r = _context36.sent;
  15819. _context36.t0 = t.isClientKeyNotFound(r);
  15820. if (!_context36.t0) {
  15821. _context36.next = 19;
  15822. break;
  15823. }
  15824. _context36.next = 13;
  15825. return t.prepare({
  15826. forceUpdate: !0
  15827. });
  15828. case 13:
  15829. _context36.next = 15;
  15830. return t.platformGetSignOption();
  15831. case 15:
  15832. s._uniCloudOptions = _context36.sent;
  15833. _context36.next = 18;
  15834. return e({
  15835. name: n,
  15836. data: s
  15837. });
  15838. case 18:
  15839. r = _context36.sent;
  15840. case 19:
  15841. return _context36.abrupt("return", r);
  15842. case 20:
  15843. case "end":
  15844. return _context36.stop();
  15845. }
  15846. }
  15847. }, _callee36);
  15848. }));
  15849. }
  15850. }, {
  15851. key: "wrapEncryptDataCallFunction",
  15852. value: function wrapEncryptDataCallFunction(e) {
  15853. var t = this;
  15854. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37() {
  15855. var _ref24,
  15856. n,
  15857. _ref24$data,
  15858. s,
  15859. r,
  15860. i,
  15861. _r3,
  15862. _args37 = arguments;
  15863. return _regenerator.default.wrap(function _callee37$(_context37) {
  15864. while (1) {
  15865. switch (_context37.prev = _context37.next) {
  15866. case 0:
  15867. _ref24 = _args37.length > 0 && _args37[0] !== undefined ? _args37[0] : {}, n = _ref24.name, _ref24$data = _ref24.data, s = _ref24$data === void 0 ? {} : _ref24$data;
  15868. _context37.next = 3;
  15869. return t.prepare();
  15870. case 3:
  15871. _context37.next = 5;
  15872. return t.encryptData(s);
  15873. case 5:
  15874. r = _context37.sent;
  15875. _context37.next = 8;
  15876. return e({
  15877. name: n,
  15878. data: r
  15879. });
  15880. case 8:
  15881. i = _context37.sent;
  15882. if (!t.isClientKeyNotFound(i)) {
  15883. _context37.next = 21;
  15884. break;
  15885. }
  15886. _context37.next = 12;
  15887. return t.prepare({
  15888. forceUpdate: !0
  15889. });
  15890. case 12:
  15891. _context37.next = 14;
  15892. return t.encryptData(s);
  15893. case 14:
  15894. _r3 = _context37.sent;
  15895. _context37.next = 17;
  15896. return t.platformGetSignOption();
  15897. case 17:
  15898. s._uniCloudOptions = _context37.sent;
  15899. _context37.next = 20;
  15900. return e({
  15901. name: n,
  15902. data: _r3
  15903. });
  15904. case 20:
  15905. i = _context37.sent;
  15906. case 21:
  15907. _context37.next = 23;
  15908. return t.decryptResult(i.result);
  15909. case 23:
  15910. i.result = _context37.sent;
  15911. return _context37.abrupt("return", i);
  15912. case 25:
  15913. case "end":
  15914. return _context37.stop();
  15915. }
  15916. }
  15917. }, _callee37);
  15918. }));
  15919. }
  15920. }]);
  15921. return Nt;
  15922. }();
  15923. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  15924. function Dt(e) {
  15925. return parseInt(e) === e;
  15926. }
  15927. function Ft(e) {
  15928. if (!Dt(e.length)) return !1;
  15929. for (var t = 0; t < e.length; t++) {
  15930. if (!Dt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  15931. }
  15932. return !0;
  15933. }
  15934. function qt(e, t) {
  15935. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  15936. if (Array.isArray(e)) {
  15937. if (!Ft(e)) throw new Error("Array contains invalid value: " + e);
  15938. return new Uint8Array(e);
  15939. }
  15940. if (Dt(e.length) && Ft(e)) return new Uint8Array(e);
  15941. throw new Error("unsupported array-like object");
  15942. }
  15943. function Mt(e) {
  15944. return new Uint8Array(e);
  15945. }
  15946. function Kt(e, t, n, s, r) {
  15947. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  15948. }
  15949. var jt,
  15950. Bt = {
  15951. toBytes: function toBytes(e) {
  15952. var t = [],
  15953. n = 0;
  15954. for (e = encodeURI(e); n < e.length;) {
  15955. var s = e.charCodeAt(n++);
  15956. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  15957. }
  15958. return qt(t);
  15959. },
  15960. fromBytes: function fromBytes(e) {
  15961. for (var t = [], n = 0; n < e.length;) {
  15962. var s = e[n];
  15963. s < 128 ? (t.push(String.fromCharCode(s)), n++) : s > 191 && s < 224 ? (t.push(String.fromCharCode((31 & s) << 6 | 63 & e[n + 1])), n += 2) : (t.push(String.fromCharCode((15 & s) << 12 | (63 & e[n + 1]) << 6 | 63 & e[n + 2])), n += 3);
  15964. }
  15965. return t.join("");
  15966. }
  15967. },
  15968. $t = (jt = "0123456789abcdef", {
  15969. toBytes: function toBytes(e) {
  15970. for (var t = [], n = 0; n < e.length; n += 2) {
  15971. t.push(parseInt(e.substr(n, 2), 16));
  15972. }
  15973. return t;
  15974. },
  15975. fromBytes: function fromBytes(e) {
  15976. for (var t = [], n = 0; n < e.length; n++) {
  15977. var s = e[n];
  15978. t.push(jt[(240 & s) >> 4] + jt[15 & s]);
  15979. }
  15980. return t.join("");
  15981. }
  15982. }),
  15983. Wt = {
  15984. 16: 10,
  15985. 24: 12,
  15986. 32: 14
  15987. },
  15988. zt = [1, 2, 4, 8, 16, 32, 64, 128, 27, 54, 108, 216, 171, 77, 154, 47, 94, 188, 99, 198, 151, 53, 106, 212, 179, 125, 250, 239, 197, 145],
  15989. Jt = [99, 124, 119, 123, 242, 107, 111, 197, 48, 1, 103, 43, 254, 215, 171, 118, 202, 130, 201, 125, 250, 89, 71, 240, 173, 212, 162, 175, 156, 164, 114, 192, 183, 253, 147, 38, 54, 63, 247, 204, 52, 165, 229, 241, 113, 216, 49, 21, 4, 199, 35, 195, 24, 150, 5, 154, 7, 18, 128, 226, 235, 39, 178, 117, 9, 131, 44, 26, 27, 110, 90, 160, 82, 59, 214, 179, 41, 227, 47, 132, 83, 209, 0, 237, 32, 252, 177, 91, 106, 203, 190, 57, 74, 76, 88, 207, 208, 239, 170, 251, 67, 77, 51, 133, 69, 249, 2, 127, 80, 60, 159, 168, 81, 163, 64, 143, 146, 157, 56, 245, 188, 182, 218, 33, 16, 255, 243, 210, 205, 12, 19, 236, 95, 151, 68, 23, 196, 167, 126, 61, 100, 93, 25, 115, 96, 129, 79, 220, 34, 42, 144, 136, 70, 238, 184, 20, 222, 94, 11, 219, 224, 50, 58, 10, 73, 6, 36, 92, 194, 211, 172, 98, 145, 149, 228, 121, 231, 200, 55, 109, 141, 213, 78, 169, 108, 86, 244, 234, 101, 122, 174, 8, 186, 120, 37, 46, 28, 166, 180, 198, 232, 221, 116, 31, 75, 189, 139, 138, 112, 62, 181, 102, 72, 3, 246, 14, 97, 53, 87, 185, 134, 193, 29, 158, 225, 248, 152, 17, 105, 217, 142, 148, 155, 30, 135, 233, 206, 85, 40, 223, 140, 161, 137, 13, 191, 230, 66, 104, 65, 153, 45, 15, 176, 84, 187, 22],
  15990. Ht = [82, 9, 106, 213, 48, 54, 165, 56, 191, 64, 163, 158, 129, 243, 215, 251, 124, 227, 57, 130, 155, 47, 255, 135, 52, 142, 67, 68, 196, 222, 233, 203, 84, 123, 148, 50, 166, 194, 35, 61, 238, 76, 149, 11, 66, 250, 195, 78, 8, 46, 161, 102, 40, 217, 36, 178, 118, 91, 162, 73, 109, 139, 209, 37, 114, 248, 246, 100, 134, 104, 152, 22, 212, 164, 92, 204, 93, 101, 182, 146, 108, 112, 72, 80, 253, 237, 185, 218, 94, 21, 70, 87, 167, 141, 157, 132, 144, 216, 171, 0, 140, 188, 211, 10, 247, 228, 88, 5, 184, 179, 69, 6, 208, 44, 30, 143, 202, 63, 15, 2, 193, 175, 189, 3, 1, 19, 138, 107, 58, 145, 17, 65, 79, 103, 220, 234, 151, 242, 207, 206, 240, 180, 230, 115, 150, 172, 116, 34, 231, 173, 53, 133, 226, 249, 55, 232, 28, 117, 223, 110, 71, 241, 26, 113, 29, 41, 197, 137, 111, 183, 98, 14, 170, 24, 190, 27, 252, 86, 62, 75, 198, 210, 121, 32, 154, 219, 192, 254, 120, 205, 90, 244, 31, 221, 168, 51, 136, 7, 199, 49, 177, 18, 16, 89, 39, 128, 236, 95, 96, 81, 127, 169, 25, 181, 74, 13, 45, 229, 122, 159, 147, 201, 156, 239, 160, 224, 59, 77, 174, 42, 245, 176, 200, 235, 187, 60, 131, 83, 153, 97, 23, 43, 4, 126, 186, 119, 214, 38, 225, 105, 20, 99, 85, 33, 12, 125],
  15991. Gt = [3328402341, 4168907908, 4000806809, 4135287693, 4294111757, 3597364157, 3731845041, 2445657428, 1613770832, 33620227, 3462883241, 1445669757, 3892248089, 3050821474, 1303096294, 3967186586, 2412431941, 528646813, 2311702848, 4202528135, 4026202645, 2992200171, 2387036105, 4226871307, 1101901292, 3017069671, 1604494077, 1169141738, 597466303, 1403299063, 3832705686, 2613100635, 1974974402, 3791519004, 1033081774, 1277568618, 1815492186, 2118074177, 4126668546, 2211236943, 1748251740, 1369810420, 3521504564, 4193382664, 3799085459, 2883115123, 1647391059, 706024767, 134480908, 2512897874, 1176707941, 2646852446, 806885416, 932615841, 168101135, 798661301, 235341577, 605164086, 461406363, 3756188221, 3454790438, 1311188841, 2142417613, 3933566367, 302582043, 495158174, 1479289972, 874125870, 907746093, 3698224818, 3025820398, 1537253627, 2756858614, 1983593293, 3084310113, 2108928974, 1378429307, 3722699582, 1580150641, 327451799, 2790478837, 3117535592, 0, 3253595436, 1075847264, 3825007647, 2041688520, 3059440621, 3563743934, 2378943302, 1740553945, 1916352843, 2487896798, 2555137236, 2958579944, 2244988746, 3151024235, 3320835882, 1336584933, 3992714006, 2252555205, 2588757463, 1714631509, 293963156, 2319795663, 3925473552, 67240454, 4269768577, 2689618160, 2017213508, 631218106, 1269344483, 2723238387, 1571005438, 2151694528, 93294474, 1066570413, 563977660, 1882732616, 4059428100, 1673313503, 2008463041, 2950355573, 1109467491, 537923632, 3858759450, 4260623118, 3218264685, 2177748300, 403442708, 638784309, 3287084079, 3193921505, 899127202, 2286175436, 773265209, 2479146071, 1437050866, 4236148354, 2050833735, 3362022572, 3126681063, 840505643, 3866325909, 3227541664, 427917720, 2655997905, 2749160575, 1143087718, 1412049534, 999329963, 193497219, 2353415882, 3354324521, 1807268051, 672404540, 2816401017, 3160301282, 369822493, 2916866934, 3688947771, 1681011286, 1949973070, 336202270, 2454276571, 201721354, 1210328172, 3093060836, 2680341085, 3184776046, 1135389935, 3294782118, 965841320, 831886756, 3554993207, 4068047243, 3588745010, 2345191491, 1849112409, 3664604599, 26054028, 2983581028, 2622377682, 1235855840, 3630984372, 2891339514, 4092916743, 3488279077, 3395642799, 4101667470, 1202630377, 268961816, 1874508501, 4034427016, 1243948399, 1546530418, 941366308, 1470539505, 1941222599, 2546386513, 3421038627, 2715671932, 3899946140, 1042226977, 2521517021, 1639824860, 227249030, 260737669, 3765465232, 2084453954, 1907733956, 3429263018, 2420656344, 100860677, 4160157185, 470683154, 3261161891, 1781871967, 2924959737, 1773779408, 394692241, 2579611992, 974986535, 664706745, 3655459128, 3958962195, 731420851, 571543859, 3530123707, 2849626480, 126783113, 865375399, 765172662, 1008606754, 361203602, 3387549984, 2278477385, 2857719295, 1344809080, 2782912378, 59542671, 1503764984, 160008576, 437062935, 1707065306, 3622233649, 2218934982, 3496503480, 2185314755, 697932208, 1512910199, 504303377, 2075177163, 2824099068, 1841019862, 739644986],
  15992. Vt = [2781242211, 2230877308, 2582542199, 2381740923, 234877682, 3184946027, 2984144751, 1418839493, 1348481072, 50462977, 2848876391, 2102799147, 434634494, 1656084439, 3863849899, 2599188086, 1167051466, 2636087938, 1082771913, 2281340285, 368048890, 3954334041, 3381544775, 201060592, 3963727277, 1739838676, 4250903202, 3930435503, 3206782108, 4149453988, 2531553906, 1536934080, 3262494647, 484572669, 2923271059, 1783375398, 1517041206, 1098792767, 49674231, 1334037708, 1550332980, 4098991525, 886171109, 150598129, 2481090929, 1940642008, 1398944049, 1059722517, 201851908, 1385547719, 1699095331, 1587397571, 674240536, 2704774806, 252314885, 3039795866, 151914247, 908333586, 2602270848, 1038082786, 651029483, 1766729511, 3447698098, 2682942837, 454166793, 2652734339, 1951935532, 775166490, 758520603, 3000790638, 4004797018, 4217086112, 4137964114, 1299594043, 1639438038, 3464344499, 2068982057, 1054729187, 1901997871, 2534638724, 4121318227, 1757008337, 0, 750906861, 1614815264, 535035132, 3363418545, 3988151131, 3201591914, 1183697867, 3647454910, 1265776953, 3734260298, 3566750796, 3903871064, 1250283471, 1807470800, 717615087, 3847203498, 384695291, 3313910595, 3617213773, 1432761139, 2484176261, 3481945413, 283769337, 100925954, 2180939647, 4037038160, 1148730428, 3123027871, 3813386408, 4087501137, 4267549603, 3229630528, 2315620239, 2906624658, 3156319645, 1215313976, 82966005, 3747855548, 3245848246, 1974459098, 1665278241, 807407632, 451280895, 251524083, 1841287890, 1283575245, 337120268, 891687699, 801369324, 3787349855, 2721421207, 3431482436, 959321879, 1469301956, 4065699751, 2197585534, 1199193405, 2898814052, 3887750493, 724703513, 2514908019, 2696962144, 2551808385, 3516813135, 2141445340, 1715741218, 2119445034, 2872807568, 2198571144, 3398190662, 700968686, 3547052216, 1009259540, 2041044702, 3803995742, 487983883, 1991105499, 1004265696, 1449407026, 1316239930, 504629770, 3683797321, 168560134, 1816667172, 3837287516, 1570751170, 1857934291, 4014189740, 2797888098, 2822345105, 2754712981, 936633572, 2347923833, 852879335, 1133234376, 1500395319, 3084545389, 2348912013, 1689376213, 3533459022, 3762923945, 3034082412, 4205598294, 133428468, 634383082, 2949277029, 2398386810, 3913789102, 403703816, 3580869306, 2297460856, 1867130149, 1918643758, 607656988, 4049053350, 3346248884, 1368901318, 600565992, 2090982877, 2632479860, 557719327, 3717614411, 3697393085, 2249034635, 2232388234, 2430627952, 1115438654, 3295786421, 2865522278, 3633334344, 84280067, 33027830, 303828494, 2747425121, 1600795957, 4188952407, 3496589753, 2434238086, 1486471617, 658119965, 3106381470, 953803233, 334231800, 3005978776, 857870609, 3151128937, 1890179545, 2298973838, 2805175444, 3056442267, 574365214, 2450884487, 550103529, 1233637070, 4289353045, 2018519080, 2057691103, 2399374476, 4166623649, 2148108681, 387583245, 3664101311, 836232934, 3330556482, 3100665960, 3280093505, 2955516313, 2002398509, 287182607, 3413881008, 4238890068, 3597515707, 975967766],
  15993. Qt = [1671808611, 2089089148, 2006576759, 2072901243, 4061003762, 1807603307, 1873927791, 3310653893, 810573872, 16974337, 1739181671, 729634347, 4263110654, 3613570519, 2883997099, 1989864566, 3393556426, 2191335298, 3376449993, 2106063485, 4195741690, 1508618841, 1204391495, 4027317232, 2917941677, 3563566036, 2734514082, 2951366063, 2629772188, 2767672228, 1922491506, 3227229120, 3082974647, 4246528509, 2477669779, 644500518, 911895606, 1061256767, 4144166391, 3427763148, 878471220, 2784252325, 3845444069, 4043897329, 1905517169, 3631459288, 827548209, 356461077, 67897348, 3344078279, 593839651, 3277757891, 405286936, 2527147926, 84871685, 2595565466, 118033927, 305538066, 2157648768, 3795705826, 3945188843, 661212711, 2999812018, 1973414517, 152769033, 2208177539, 745822252, 439235610, 455947803, 1857215598, 1525593178, 2700827552, 1391895634, 994932283, 3596728278, 3016654259, 695947817, 3812548067, 795958831, 2224493444, 1408607827, 3513301457, 0, 3979133421, 543178784, 4229948412, 2982705585, 1542305371, 1790891114, 3410398667, 3201918910, 961245753, 1256100938, 1289001036, 1491644504, 3477767631, 3496721360, 4012557807, 2867154858, 4212583931, 1137018435, 1305975373, 861234739, 2241073541, 1171229253, 4178635257, 33948674, 2139225727, 1357946960, 1011120188, 2679776671, 2833468328, 1374921297, 2751356323, 1086357568, 2408187279, 2460827538, 2646352285, 944271416, 4110742005, 3168756668, 3066132406, 3665145818, 560153121, 271589392, 4279952895, 4077846003, 3530407890, 3444343245, 202643468, 322250259, 3962553324, 1608629855, 2543990167, 1154254916, 389623319, 3294073796, 2817676711, 2122513534, 1028094525, 1689045092, 1575467613, 422261273, 1939203699, 1621147744, 2174228865, 1339137615, 3699352540, 577127458, 712922154, 2427141008, 2290289544, 1187679302, 3995715566, 3100863416, 339486740, 3732514782, 1591917662, 186455563, 3681988059, 3762019296, 844522546, 978220090, 169743370, 1239126601, 101321734, 611076132, 1558493276, 3260915650, 3547250131, 2901361580, 1655096418, 2443721105, 2510565781, 3828863972, 2039214713, 3878868455, 3359869896, 928607799, 1840765549, 2374762893, 3580146133, 1322425422, 2850048425, 1823791212, 1459268694, 4094161908, 3928346602, 1706019429, 2056189050, 2934523822, 135794696, 3134549946, 2022240376, 628050469, 779246638, 472135708, 2800834470, 3032970164, 3327236038, 3894660072, 3715932637, 1956440180, 522272287, 1272813131, 3185336765, 2340818315, 2323976074, 1888542832, 1044544574, 3049550261, 1722469478, 1222152264, 50660867, 4127324150, 236067854, 1638122081, 895445557, 1475980887, 3117443513, 2257655686, 3243809217, 489110045, 2662934430, 3778599393, 4162055160, 2561878936, 288563729, 1773916777, 3648039385, 2391345038, 2493985684, 2612407707, 505560094, 2274497927, 3911240169, 3460925390, 1442818645, 678973480, 3749357023, 2358182796, 2717407649, 2306869641, 219617805, 3218761151, 3862026214, 1120306242, 1756942440, 1103331905, 2578459033, 762796589, 252780047, 2966125488, 1425844308, 3151392187, 372911126],
  15994. Yt = [1667474886, 2088535288, 2004326894, 2071694838, 4075949567, 1802223062, 1869591006, 3318043793, 808472672, 16843522, 1734846926, 724270422, 4278065639, 3621216949, 2880169549, 1987484396, 3402253711, 2189597983, 3385409673, 2105378810, 4210693615, 1499065266, 1195886990, 4042263547, 2913856577, 3570689971, 2728590687, 2947541573, 2627518243, 2762274643, 1920112356, 3233831835, 3082273397, 4261223649, 2475929149, 640051788, 909531756, 1061110142, 4160160501, 3435941763, 875846760, 2779116625, 3857003729, 4059105529, 1903268834, 3638064043, 825316194, 353713962, 67374088, 3351728789, 589522246, 3284360861, 404236336, 2526454071, 84217610, 2593830191, 117901582, 303183396, 2155911963, 3806477791, 3958056653, 656894286, 2998062463, 1970642922, 151591698, 2206440989, 741110872, 437923380, 454765878, 1852748508, 1515908788, 2694904667, 1381168804, 993742198, 3604373943, 3014905469, 690584402, 3823320797, 791638366, 2223281939, 1398011302, 3520161977, 0, 3991743681, 538992704, 4244381667, 2981218425, 1532751286, 1785380564, 3419096717, 3200178535, 960056178, 1246420628, 1280103576, 1482221744, 3486468741, 3503319995, 4025428677, 2863326543, 4227536621, 1128514950, 1296947098, 859002214, 2240123921, 1162203018, 4193849577, 33687044, 2139062782, 1347481760, 1010582648, 2678045221, 2829640523, 1364325282, 2745433693, 1077985408, 2408548869, 2459086143, 2644360225, 943212656, 4126475505, 3166494563, 3065430391, 3671750063, 555836226, 269496352, 4294908645, 4092792573, 3537006015, 3452783745, 202118168, 320025894, 3974901699, 1600119230, 2543297077, 1145359496, 387397934, 3301201811, 2812801621, 2122220284, 1027426170, 1684319432, 1566435258, 421079858, 1936954854, 1616945344, 2172753945, 1330631070, 3705438115, 572679748, 707427924, 2425400123, 2290647819, 1179044492, 4008585671, 3099120491, 336870440, 3739122087, 1583276732, 185277718, 3688593069, 3772791771, 842159716, 976899700, 168435220, 1229577106, 101059084, 606366792, 1549591736, 3267517855, 3553849021, 2897014595, 1650632388, 2442242105, 2509612081, 3840161747, 2038008818, 3890688725, 3368567691, 926374254, 1835907034, 2374863873, 3587531953, 1313788572, 2846482505, 1819063512, 1448540844, 4109633523, 3941213647, 1701162954, 2054852340, 2930698567, 134748176, 3132806511, 2021165296, 623210314, 774795868, 471606328, 2795958615, 3031746419, 3334885783, 3907527627, 3722280097, 1953799400, 522133822, 1263263126, 3183336545, 2341176845, 2324333839, 1886425312, 1044267644, 3048588401, 1718004428, 1212733584, 50529542, 4143317495, 235803164, 1633788866, 892690282, 1465383342, 3115962473, 2256965911, 3250673817, 488449850, 2661202215, 3789633753, 4177007595, 2560144171, 286339874, 1768537042, 3654906025, 2391705863, 2492770099, 2610673197, 505291324, 2273808917, 3924369609, 3469625735, 1431699370, 673740880, 3755965093, 2358021891, 2711746649, 2307489801, 218961690, 3217021541, 3873845719, 1111672452, 1751693520, 1094828930, 2576986153, 757954394, 252645662, 2964376443, 1414855848, 3149649517, 370555436],
  15995. Xt = [1374988112, 2118214995, 437757123, 975658646, 1001089995, 530400753, 2902087851, 1273168787, 540080725, 2910219766, 2295101073, 4110568485, 1340463100, 3307916247, 641025152, 3043140495, 3736164937, 632953703, 1172967064, 1576976609, 3274667266, 2169303058, 2370213795, 1809054150, 59727847, 361929877, 3211623147, 2505202138, 3569255213, 1484005843, 1239443753, 2395588676, 1975683434, 4102977912, 2572697195, 666464733, 3202437046, 4035489047, 3374361702, 2110667444, 1675577880, 3843699074, 2538681184, 1649639237, 2976151520, 3144396420, 4269907996, 4178062228, 1883793496, 2403728665, 2497604743, 1383856311, 2876494627, 1917518562, 3810496343, 1716890410, 3001755655, 800440835, 2261089178, 3543599269, 807962610, 599762354, 33778362, 3977675356, 2328828971, 2809771154, 4077384432, 1315562145, 1708848333, 101039829, 3509871135, 3299278474, 875451293, 2733856160, 92987698, 2767645557, 193195065, 1080094634, 1584504582, 3178106961, 1042385657, 2531067453, 3711829422, 1306967366, 2438237621, 1908694277, 67556463, 1615861247, 429456164, 3602770327, 2302690252, 1742315127, 2968011453, 126454664, 3877198648, 2043211483, 2709260871, 2084704233, 4169408201, 0, 159417987, 841739592, 504459436, 1817866830, 4245618683, 260388950, 1034867998, 908933415, 168810852, 1750902305, 2606453969, 607530554, 202008497, 2472011535, 3035535058, 463180190, 2160117071, 1641816226, 1517767529, 470948374, 3801332234, 3231722213, 1008918595, 303765277, 235474187, 4069246893, 766945465, 337553864, 1475418501, 2943682380, 4003061179, 2743034109, 4144047775, 1551037884, 1147550661, 1543208500, 2336434550, 3408119516, 3069049960, 3102011747, 3610369226, 1113818384, 328671808, 2227573024, 2236228733, 3535486456, 2935566865, 3341394285, 496906059, 3702665459, 226906860, 2009195472, 733156972, 2842737049, 294930682, 1206477858, 2835123396, 2700099354, 1451044056, 573804783, 2269728455, 3644379585, 2362090238, 2564033334, 2801107407, 2776292904, 3669462566, 1068351396, 742039012, 1350078989, 1784663195, 1417561698, 4136440770, 2430122216, 775550814, 2193862645, 2673705150, 1775276924, 1876241833, 3475313331, 3366754619, 270040487, 3902563182, 3678124923, 3441850377, 1851332852, 3969562369, 2203032232, 3868552805, 2868897406, 566021896, 4011190502, 3135740889, 1248802510, 3936291284, 699432150, 832877231, 708780849, 3332740144, 899835584, 1951317047, 4236429990, 3767586992, 866637845, 4043610186, 1106041591, 2144161806, 395441711, 1984812685, 1139781709, 3433712980, 3835036895, 2664543715, 1282050075, 3240894392, 1181045119, 2640243204, 25965917, 4203181171, 4211818798, 3009879386, 2463879762, 3910161971, 1842759443, 2597806476, 933301370, 1509430414, 3943906441, 3467192302, 3076639029, 3776767469, 2051518780, 2631065433, 1441952575, 404016761, 1942435775, 1408749034, 1610459739, 3745345300, 2017778566, 3400528769, 3110650942, 941896748, 3265478751, 371049330, 3168937228, 675039627, 4279080257, 967311729, 135050206, 3635733660, 1683407248, 2076935265, 3576870512, 1215061108, 3501741890],
  15996. Zt = [1347548327, 1400783205, 3273267108, 2520393566, 3409685355, 4045380933, 2880240216, 2471224067, 1428173050, 4138563181, 2441661558, 636813900, 4233094615, 3620022987, 2149987652, 2411029155, 1239331162, 1730525723, 2554718734, 3781033664, 46346101, 310463728, 2743944855, 3328955385, 3875770207, 2501218972, 3955191162, 3667219033, 768917123, 3545789473, 692707433, 1150208456, 1786102409, 2029293177, 1805211710, 3710368113, 3065962831, 401639597, 1724457132, 3028143674, 409198410, 2196052529, 1620529459, 1164071807, 3769721975, 2226875310, 486441376, 2499348523, 1483753576, 428819965, 2274680428, 3075636216, 598438867, 3799141122, 1474502543, 711349675, 129166120, 53458370, 2592523643, 2782082824, 4063242375, 2988687269, 3120694122, 1559041666, 730517276, 2460449204, 4042459122, 2706270690, 3446004468, 3573941694, 533804130, 2328143614, 2637442643, 2695033685, 839224033, 1973745387, 957055980, 2856345839, 106852767, 1371368976, 4181598602, 1033297158, 2933734917, 1179510461, 3046200461, 91341917, 1862534868, 4284502037, 605657339, 2547432937, 3431546947, 2003294622, 3182487618, 2282195339, 954669403, 3682191598, 1201765386, 3917234703, 3388507166, 0, 2198438022, 1211247597, 2887651696, 1315723890, 4227665663, 1443857720, 507358933, 657861945, 1678381017, 560487590, 3516619604, 975451694, 2970356327, 261314535, 3535072918, 2652609425, 1333838021, 2724322336, 1767536459, 370938394, 182621114, 3854606378, 1128014560, 487725847, 185469197, 2918353863, 3106780840, 3356761769, 2237133081, 1286567175, 3152976349, 4255350624, 2683765030, 3160175349, 3309594171, 878443390, 1988838185, 3704300486, 1756818940, 1673061617, 3403100636, 272786309, 1075025698, 545572369, 2105887268, 4174560061, 296679730, 1841768865, 1260232239, 4091327024, 3960309330, 3497509347, 1814803222, 2578018489, 4195456072, 575138148, 3299409036, 446754879, 3629546796, 4011996048, 3347532110, 3252238545, 4270639778, 915985419, 3483825537, 681933534, 651868046, 2755636671, 3828103837, 223377554, 2607439820, 1649704518, 3270937875, 3901806776, 1580087799, 4118987695, 3198115200, 2087309459, 2842678573, 3016697106, 1003007129, 2802849917, 1860738147, 2077965243, 164439672, 4100872472, 32283319, 2827177882, 1709610350, 2125135846, 136428751, 3874428392, 3652904859, 3460984630, 3572145929, 3593056380, 2939266226, 824852259, 818324884, 3224740454, 930369212, 2801566410, 2967507152, 355706840, 1257309336, 4148292826, 243256656, 790073846, 2373340630, 1296297904, 1422699085, 3756299780, 3818836405, 457992840, 3099667487, 2135319889, 77422314, 1560382517, 1945798516, 788204353, 1521706781, 1385356242, 870912086, 325965383, 2358957921, 2050466060, 2388260884, 2313884476, 4006521127, 901210569, 3990953189, 1014646705, 1503449823, 1062597235, 2031621326, 3212035895, 3931371469, 1533017514, 350174575, 2256028891, 2177544179, 1052338372, 741876788, 1606591296, 1914052035, 213705253, 2334669897, 1107234197, 1899603969, 3725069491, 2631447780, 2422494913, 1635502980, 1893020342, 1950903388, 1120974935],
  15997. en = [2807058932, 1699970625, 2764249623, 1586903591, 1808481195, 1173430173, 1487645946, 59984867, 4199882800, 1844882806, 1989249228, 1277555970, 3623636965, 3419915562, 1149249077, 2744104290, 1514790577, 459744698, 244860394, 3235995134, 1963115311, 4027744588, 2544078150, 4190530515, 1608975247, 2627016082, 2062270317, 1507497298, 2200818878, 567498868, 1764313568, 3359936201, 2305455554, 2037970062, 1047239e3, 1910319033, 1337376481, 2904027272, 2892417312, 984907214, 1243112415, 830661914, 861968209, 2135253587, 2011214180, 2927934315, 2686254721, 731183368, 1750626376, 4246310725, 1820824798, 4172763771, 3542330227, 48394827, 2404901663, 2871682645, 671593195, 3254988725, 2073724613, 145085239, 2280796200, 2779915199, 1790575107, 2187128086, 472615631, 3029510009, 4075877127, 3802222185, 4107101658, 3201631749, 1646252340, 4270507174, 1402811438, 1436590835, 3778151818, 3950355702, 3963161475, 4020912224, 2667994737, 273792366, 2331590177, 104699613, 95345982, 3175501286, 2377486676, 1560637892, 3564045318, 369057872, 4213447064, 3919042237, 1137477952, 2658625497, 1119727848, 2340947849, 1530455833, 4007360968, 172466556, 266959938, 516552836, 0, 2256734592, 3980931627, 1890328081, 1917742170, 4294704398, 945164165, 3575528878, 958871085, 3647212047, 2787207260, 1423022939, 775562294, 1739656202, 3876557655, 2530391278, 2443058075, 3310321856, 547512796, 1265195639, 437656594, 3121275539, 719700128, 3762502690, 387781147, 218828297, 3350065803, 2830708150, 2848461854, 428169201, 122466165, 3720081049, 1627235199, 648017665, 4122762354, 1002783846, 2117360635, 695634755, 3336358691, 4234721005, 4049844452, 3704280881, 2232435299, 574624663, 287343814, 612205898, 1039717051, 840019705, 2708326185, 793451934, 821288114, 1391201670, 3822090177, 376187827, 3113855344, 1224348052, 1679968233, 2361698556, 1058709744, 752375421, 2431590963, 1321699145, 3519142200, 2734591178, 188127444, 2177869557, 3727205754, 2384911031, 3215212461, 2648976442, 2450346104, 3432737375, 1180849278, 331544205, 3102249176, 4150144569, 2952102595, 2159976285, 2474404304, 766078933, 313773861, 2570832044, 2108100632, 1668212892, 3145456443, 2013908262, 418672217, 3070356634, 2594734927, 1852171925, 3867060991, 3473416636, 3907448597, 2614737639, 919489135, 164948639, 2094410160, 2997825956, 590424639, 2486224549, 1723872674, 3157750862, 3399941250, 3501252752, 3625268135, 2555048196, 3673637356, 1343127501, 4130281361, 3599595085, 2957853679, 1297403050, 81781910, 3051593425, 2283490410, 532201772, 1367295589, 3926170974, 895287692, 1953757831, 1093597963, 492483431, 3528626907, 1446242576, 1192455638, 1636604631, 209336225, 344873464, 1015671571, 669961897, 3375740769, 3857572124, 2973530695, 3747192018, 1933530610, 3464042516, 935293895, 3454686199, 2858115069, 1863638845, 3683022916, 4085369519, 3292445032, 875313188, 1080017571, 3279033885, 621591778, 1233856572, 2504130317, 24197544, 3017672716, 3835484340, 3247465558, 2220981195, 3060847922, 1551124588, 1463996600],
  15998. tn = [4104605777, 1097159550, 396673818, 660510266, 2875968315, 2638606623, 4200115116, 3808662347, 821712160, 1986918061, 3430322568, 38544885, 3856137295, 718002117, 893681702, 1654886325, 2975484382, 3122358053, 3926825029, 4274053469, 796197571, 1290801793, 1184342925, 3556361835, 2405426947, 2459735317, 1836772287, 1381620373, 3196267988, 1948373848, 3764988233, 3385345166, 3263785589, 2390325492, 1480485785, 3111247143, 3780097726, 2293045232, 548169417, 3459953789, 3746175075, 439452389, 1362321559, 1400849762, 1685577905, 1806599355, 2174754046, 137073913, 1214797936, 1174215055, 3731654548, 2079897426, 1943217067, 1258480242, 529487843, 1437280870, 3945269170, 3049390895, 3313212038, 923313619, 679998e3, 3215307299, 57326082, 377642221, 3474729866, 2041877159, 133361907, 1776460110, 3673476453, 96392454, 878845905, 2801699524, 777231668, 4082475170, 2330014213, 4142626212, 2213296395, 1626319424, 1906247262, 1846563261, 562755902, 3708173718, 1040559837, 3871163981, 1418573201, 3294430577, 114585348, 1343618912, 2566595609, 3186202582, 1078185097, 3651041127, 3896688048, 2307622919, 425408743, 3371096953, 2081048481, 1108339068, 2216610296, 0, 2156299017, 736970802, 292596766, 1517440620, 251657213, 2235061775, 2933202493, 758720310, 265905162, 1554391400, 1532285339, 908999204, 174567692, 1474760595, 4002861748, 2610011675, 3234156416, 3693126241, 2001430874, 303699484, 2478443234, 2687165888, 585122620, 454499602, 151849742, 2345119218, 3064510765, 514443284, 4044981591, 1963412655, 2581445614, 2137062819, 19308535, 1928707164, 1715193156, 4219352155, 1126790795, 600235211, 3992742070, 3841024952, 836553431, 1669664834, 2535604243, 3323011204, 1243905413, 3141400786, 4180808110, 698445255, 2653899549, 2989552604, 2253581325, 3252932727, 3004591147, 1891211689, 2487810577, 3915653703, 4237083816, 4030667424, 2100090966, 865136418, 1229899655, 953270745, 3399679628, 3557504664, 4118925222, 2061379749, 3079546586, 2915017791, 983426092, 2022837584, 1607244650, 2118541908, 2366882550, 3635996816, 972512814, 3283088770, 1568718495, 3499326569, 3576539503, 621982671, 2895723464, 410887952, 2623762152, 1002142683, 645401037, 1494807662, 2595684844, 1335535747, 2507040230, 4293295786, 3167684641, 367585007, 3885750714, 1865862730, 2668221674, 2960971305, 2763173681, 1059270954, 2777952454, 2724642869, 1320957812, 2194319100, 2429595872, 2815956275, 77089521, 3973773121, 3444575871, 2448830231, 1305906550, 4021308739, 2857194700, 2516901860, 3518358430, 1787304780, 740276417, 1699839814, 1592394909, 2352307457, 2272556026, 188821243, 1729977011, 3687994002, 274084841, 3594982253, 3613494426, 2701949495, 4162096729, 322734571, 2837966542, 1640576439, 484830689, 1202797690, 3537852828, 4067639125, 349075736, 3342319475, 4157467219, 4255800159, 1030690015, 1155237496, 2951971274, 1757691577, 607398968, 2738905026, 499347990, 3794078908, 1011452712, 227885567, 2818666809, 213114376, 3034881240, 1455525988, 3414450555, 850817237, 1817998408, 3092726480],
  15999. nn = [0, 235474187, 470948374, 303765277, 941896748, 908933415, 607530554, 708780849, 1883793496, 2118214995, 1817866830, 1649639237, 1215061108, 1181045119, 1417561698, 1517767529, 3767586992, 4003061179, 4236429990, 4069246893, 3635733660, 3602770327, 3299278474, 3400528769, 2430122216, 2664543715, 2362090238, 2193862645, 2835123396, 2801107407, 3035535058, 3135740889, 3678124923, 3576870512, 3341394285, 3374361702, 3810496343, 3977675356, 4279080257, 4043610186, 2876494627, 2776292904, 3076639029, 3110650942, 2472011535, 2640243204, 2403728665, 2169303058, 1001089995, 899835584, 666464733, 699432150, 59727847, 226906860, 530400753, 294930682, 1273168787, 1172967064, 1475418501, 1509430414, 1942435775, 2110667444, 1876241833, 1641816226, 2910219766, 2743034109, 2976151520, 3211623147, 2505202138, 2606453969, 2302690252, 2269728455, 3711829422, 3543599269, 3240894392, 3475313331, 3843699074, 3943906441, 4178062228, 4144047775, 1306967366, 1139781709, 1374988112, 1610459739, 1975683434, 2076935265, 1775276924, 1742315127, 1034867998, 866637845, 566021896, 800440835, 92987698, 193195065, 429456164, 395441711, 1984812685, 2017778566, 1784663195, 1683407248, 1315562145, 1080094634, 1383856311, 1551037884, 101039829, 135050206, 437757123, 337553864, 1042385657, 807962610, 573804783, 742039012, 2531067453, 2564033334, 2328828971, 2227573024, 2935566865, 2700099354, 3001755655, 3168937228, 3868552805, 3902563182, 4203181171, 4102977912, 3736164937, 3501741890, 3265478751, 3433712980, 1106041591, 1340463100, 1576976609, 1408749034, 2043211483, 2009195472, 1708848333, 1809054150, 832877231, 1068351396, 766945465, 599762354, 159417987, 126454664, 361929877, 463180190, 2709260871, 2943682380, 3178106961, 3009879386, 2572697195, 2538681184, 2236228733, 2336434550, 3509871135, 3745345300, 3441850377, 3274667266, 3910161971, 3877198648, 4110568485, 4211818798, 2597806476, 2497604743, 2261089178, 2295101073, 2733856160, 2902087851, 3202437046, 2968011453, 3936291284, 3835036895, 4136440770, 4169408201, 3535486456, 3702665459, 3467192302, 3231722213, 2051518780, 1951317047, 1716890410, 1750902305, 1113818384, 1282050075, 1584504582, 1350078989, 168810852, 67556463, 371049330, 404016761, 841739592, 1008918595, 775550814, 540080725, 3969562369, 3801332234, 4035489047, 4269907996, 3569255213, 3669462566, 3366754619, 3332740144, 2631065433, 2463879762, 2160117071, 2395588676, 2767645557, 2868897406, 3102011747, 3069049960, 202008497, 33778362, 270040487, 504459436, 875451293, 975658646, 675039627, 641025152, 2084704233, 1917518562, 1615861247, 1851332852, 1147550661, 1248802510, 1484005843, 1451044056, 933301370, 967311729, 733156972, 632953703, 260388950, 25965917, 328671808, 496906059, 1206477858, 1239443753, 1543208500, 1441952575, 2144161806, 1908694277, 1675577880, 1842759443, 3610369226, 3644379585, 3408119516, 3307916247, 4011190502, 3776767469, 4077384432, 4245618683, 2809771154, 2842737049, 3144396420, 3043140495, 2673705150, 2438237621, 2203032232, 2370213795],
  16000. sn = [0, 185469197, 370938394, 487725847, 741876788, 657861945, 975451694, 824852259, 1483753576, 1400783205, 1315723890, 1164071807, 1950903388, 2135319889, 1649704518, 1767536459, 2967507152, 3152976349, 2801566410, 2918353863, 2631447780, 2547432937, 2328143614, 2177544179, 3901806776, 3818836405, 4270639778, 4118987695, 3299409036, 3483825537, 3535072918, 3652904859, 2077965243, 1893020342, 1841768865, 1724457132, 1474502543, 1559041666, 1107234197, 1257309336, 598438867, 681933534, 901210569, 1052338372, 261314535, 77422314, 428819965, 310463728, 3409685355, 3224740454, 3710368113, 3593056380, 3875770207, 3960309330, 4045380933, 4195456072, 2471224067, 2554718734, 2237133081, 2388260884, 3212035895, 3028143674, 2842678573, 2724322336, 4138563181, 4255350624, 3769721975, 3955191162, 3667219033, 3516619604, 3431546947, 3347532110, 2933734917, 2782082824, 3099667487, 3016697106, 2196052529, 2313884476, 2499348523, 2683765030, 1179510461, 1296297904, 1347548327, 1533017514, 1786102409, 1635502980, 2087309459, 2003294622, 507358933, 355706840, 136428751, 53458370, 839224033, 957055980, 605657339, 790073846, 2373340630, 2256028891, 2607439820, 2422494913, 2706270690, 2856345839, 3075636216, 3160175349, 3573941694, 3725069491, 3273267108, 3356761769, 4181598602, 4063242375, 4011996048, 3828103837, 1033297158, 915985419, 730517276, 545572369, 296679730, 446754879, 129166120, 213705253, 1709610350, 1860738147, 1945798516, 2029293177, 1239331162, 1120974935, 1606591296, 1422699085, 4148292826, 4233094615, 3781033664, 3931371469, 3682191598, 3497509347, 3446004468, 3328955385, 2939266226, 2755636671, 3106780840, 2988687269, 2198438022, 2282195339, 2501218972, 2652609425, 1201765386, 1286567175, 1371368976, 1521706781, 1805211710, 1620529459, 2105887268, 1988838185, 533804130, 350174575, 164439672, 46346101, 870912086, 954669403, 636813900, 788204353, 2358957921, 2274680428, 2592523643, 2441661558, 2695033685, 2880240216, 3065962831, 3182487618, 3572145929, 3756299780, 3270937875, 3388507166, 4174560061, 4091327024, 4006521127, 3854606378, 1014646705, 930369212, 711349675, 560487590, 272786309, 457992840, 106852767, 223377554, 1678381017, 1862534868, 1914052035, 2031621326, 1211247597, 1128014560, 1580087799, 1428173050, 32283319, 182621114, 401639597, 486441376, 768917123, 651868046, 1003007129, 818324884, 1503449823, 1385356242, 1333838021, 1150208456, 1973745387, 2125135846, 1673061617, 1756818940, 2970356327, 3120694122, 2802849917, 2887651696, 2637442643, 2520393566, 2334669897, 2149987652, 3917234703, 3799141122, 4284502037, 4100872472, 3309594171, 3460984630, 3545789473, 3629546796, 2050466060, 1899603969, 1814803222, 1730525723, 1443857720, 1560382517, 1075025698, 1260232239, 575138148, 692707433, 878443390, 1062597235, 243256656, 91341917, 409198410, 325965383, 3403100636, 3252238545, 3704300486, 3620022987, 3874428392, 3990953189, 4042459122, 4227665663, 2460449204, 2578018489, 2226875310, 2411029155, 3198115200, 3046200461, 2827177882, 2743944855],
  16001. rn = [0, 218828297, 437656594, 387781147, 875313188, 958871085, 775562294, 590424639, 1750626376, 1699970625, 1917742170, 2135253587, 1551124588, 1367295589, 1180849278, 1265195639, 3501252752, 3720081049, 3399941250, 3350065803, 3835484340, 3919042237, 4270507174, 4085369519, 3102249176, 3051593425, 2734591178, 2952102595, 2361698556, 2177869557, 2530391278, 2614737639, 3145456443, 3060847922, 2708326185, 2892417312, 2404901663, 2187128086, 2504130317, 2555048196, 3542330227, 3727205754, 3375740769, 3292445032, 3876557655, 3926170974, 4246310725, 4027744588, 1808481195, 1723872674, 1910319033, 2094410160, 1608975247, 1391201670, 1173430173, 1224348052, 59984867, 244860394, 428169201, 344873464, 935293895, 984907214, 766078933, 547512796, 1844882806, 1627235199, 2011214180, 2062270317, 1507497298, 1423022939, 1137477952, 1321699145, 95345982, 145085239, 532201772, 313773861, 830661914, 1015671571, 731183368, 648017665, 3175501286, 2957853679, 2807058932, 2858115069, 2305455554, 2220981195, 2474404304, 2658625497, 3575528878, 3625268135, 3473416636, 3254988725, 3778151818, 3963161475, 4213447064, 4130281361, 3599595085, 3683022916, 3432737375, 3247465558, 3802222185, 4020912224, 4172763771, 4122762354, 3201631749, 3017672716, 2764249623, 2848461854, 2331590177, 2280796200, 2431590963, 2648976442, 104699613, 188127444, 472615631, 287343814, 840019705, 1058709744, 671593195, 621591778, 1852171925, 1668212892, 1953757831, 2037970062, 1514790577, 1463996600, 1080017571, 1297403050, 3673637356, 3623636965, 3235995134, 3454686199, 4007360968, 3822090177, 4107101658, 4190530515, 2997825956, 3215212461, 2830708150, 2779915199, 2256734592, 2340947849, 2627016082, 2443058075, 172466556, 122466165, 273792366, 492483431, 1047239e3, 861968209, 612205898, 695634755, 1646252340, 1863638845, 2013908262, 1963115311, 1446242576, 1530455833, 1277555970, 1093597963, 1636604631, 1820824798, 2073724613, 1989249228, 1436590835, 1487645946, 1337376481, 1119727848, 164948639, 81781910, 331544205, 516552836, 1039717051, 821288114, 669961897, 719700128, 2973530695, 3157750862, 2871682645, 2787207260, 2232435299, 2283490410, 2667994737, 2450346104, 3647212047, 3564045318, 3279033885, 3464042516, 3980931627, 3762502690, 4150144569, 4199882800, 3070356634, 3121275539, 2904027272, 2686254721, 2200818878, 2384911031, 2570832044, 2486224549, 3747192018, 3528626907, 3310321856, 3359936201, 3950355702, 3867060991, 4049844452, 4234721005, 1739656202, 1790575107, 2108100632, 1890328081, 1402811438, 1586903591, 1233856572, 1149249077, 266959938, 48394827, 369057872, 418672217, 1002783846, 919489135, 567498868, 752375421, 209336225, 24197544, 376187827, 459744698, 945164165, 895287692, 574624663, 793451934, 1679968233, 1764313568, 2117360635, 1933530610, 1343127501, 1560637892, 1243112415, 1192455638, 3704280881, 3519142200, 3336358691, 3419915562, 3907448597, 3857572124, 4075877127, 4294704398, 3029510009, 3113855344, 2927934315, 2744104290, 2159976285, 2377486676, 2594734927, 2544078150],
  16002. on = [0, 151849742, 303699484, 454499602, 607398968, 758720310, 908999204, 1059270954, 1214797936, 1097159550, 1517440620, 1400849762, 1817998408, 1699839814, 2118541908, 2001430874, 2429595872, 2581445614, 2194319100, 2345119218, 3034881240, 3186202582, 2801699524, 2951971274, 3635996816, 3518358430, 3399679628, 3283088770, 4237083816, 4118925222, 4002861748, 3885750714, 1002142683, 850817237, 698445255, 548169417, 529487843, 377642221, 227885567, 77089521, 1943217067, 2061379749, 1640576439, 1757691577, 1474760595, 1592394909, 1174215055, 1290801793, 2875968315, 2724642869, 3111247143, 2960971305, 2405426947, 2253581325, 2638606623, 2487810577, 3808662347, 3926825029, 4044981591, 4162096729, 3342319475, 3459953789, 3576539503, 3693126241, 1986918061, 2137062819, 1685577905, 1836772287, 1381620373, 1532285339, 1078185097, 1229899655, 1040559837, 923313619, 740276417, 621982671, 439452389, 322734571, 137073913, 19308535, 3871163981, 4021308739, 4104605777, 4255800159, 3263785589, 3414450555, 3499326569, 3651041127, 2933202493, 2815956275, 3167684641, 3049390895, 2330014213, 2213296395, 2566595609, 2448830231, 1305906550, 1155237496, 1607244650, 1455525988, 1776460110, 1626319424, 2079897426, 1928707164, 96392454, 213114376, 396673818, 514443284, 562755902, 679998e3, 865136418, 983426092, 3708173718, 3557504664, 3474729866, 3323011204, 4180808110, 4030667424, 3945269170, 3794078908, 2507040230, 2623762152, 2272556026, 2390325492, 2975484382, 3092726480, 2738905026, 2857194700, 3973773121, 3856137295, 4274053469, 4157467219, 3371096953, 3252932727, 3673476453, 3556361835, 2763173681, 2915017791, 3064510765, 3215307299, 2156299017, 2307622919, 2459735317, 2610011675, 2081048481, 1963412655, 1846563261, 1729977011, 1480485785, 1362321559, 1243905413, 1126790795, 878845905, 1030690015, 645401037, 796197571, 274084841, 425408743, 38544885, 188821243, 3613494426, 3731654548, 3313212038, 3430322568, 4082475170, 4200115116, 3780097726, 3896688048, 2668221674, 2516901860, 2366882550, 2216610296, 3141400786, 2989552604, 2837966542, 2687165888, 1202797690, 1320957812, 1437280870, 1554391400, 1669664834, 1787304780, 1906247262, 2022837584, 265905162, 114585348, 499347990, 349075736, 736970802, 585122620, 972512814, 821712160, 2595684844, 2478443234, 2293045232, 2174754046, 3196267988, 3079546586, 2895723464, 2777952454, 3537852828, 3687994002, 3234156416, 3385345166, 4142626212, 4293295786, 3841024952, 3992742070, 174567692, 57326082, 410887952, 292596766, 777231668, 660510266, 1011452712, 893681702, 1108339068, 1258480242, 1343618912, 1494807662, 1715193156, 1865862730, 1948373848, 2100090966, 2701949495, 2818666809, 3004591147, 3122358053, 2235061775, 2352307457, 2535604243, 2653899549, 3915653703, 3764988233, 4219352155, 4067639125, 3444575871, 3294430577, 3746175075, 3594982253, 836553431, 953270745, 600235211, 718002117, 367585007, 484830689, 133361907, 251657213, 2041877159, 1891211689, 1806599355, 1654886325, 1568718495, 1418573201, 1335535747, 1184342925];
  16003. function an(e) {
  16004. for (var t = [], n = 0; n < e.length; n += 4) {
  16005. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  16006. }
  16007. return t;
  16008. }
  16009. var cn = /*#__PURE__*/function () {
  16010. function cn(e) {
  16011. (0, _classCallCheck2.default)(this, cn);
  16012. if (!(this instanceof cn)) throw Error("AES must be instanitated with `new`");
  16013. Object.defineProperty(this, "key", {
  16014. value: qt(e, !0)
  16015. }), this._prepare();
  16016. }
  16017. (0, _createClass2.default)(cn, [{
  16018. key: "_prepare",
  16019. value: function _prepare() {
  16020. var e = Wt[this.key.length];
  16021. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  16022. this._Ke = [], this._Kd = [];
  16023. for (var t = 0; t <= e; t++) {
  16024. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  16025. }
  16026. var n,
  16027. s = 4 * (e + 1),
  16028. r = this.key.length / 4,
  16029. i = an(this.key);
  16030. for (t = 0; t < r; t++) {
  16031. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  16032. }
  16033. for (var o, a = 0, c = r; c < s;) {
  16034. if (o = i[r - 1], i[0] ^= Jt[o >> 16 & 255] << 24 ^ Jt[o >> 8 & 255] << 16 ^ Jt[255 & o] << 8 ^ Jt[o >> 24 & 255] ^ zt[a] << 24, a += 1, 8 != r) for (t = 1; t < r; t++) {
  16035. i[t] ^= i[t - 1];
  16036. } else {
  16037. for (t = 1; t < r / 2; t++) {
  16038. i[t] ^= i[t - 1];
  16039. }
  16040. o = i[r / 2 - 1], i[r / 2] ^= Jt[255 & o] ^ Jt[o >> 8 & 255] << 8 ^ Jt[o >> 16 & 255] << 16 ^ Jt[o >> 24 & 255] << 24;
  16041. for (t = r / 2 + 1; t < r; t++) {
  16042. i[t] ^= i[t - 1];
  16043. }
  16044. }
  16045. for (t = 0; t < r && c < s;) {
  16046. u = c >> 2, h = c % 4, this._Ke[u][h] = i[t], this._Kd[e - u][h] = i[t++], c++;
  16047. }
  16048. }
  16049. for (var u = 1; u < e; u++) {
  16050. for (var h = 0; h < 4; h++) {
  16051. o = this._Kd[u][h], this._Kd[u][h] = nn[o >> 24 & 255] ^ sn[o >> 16 & 255] ^ rn[o >> 8 & 255] ^ on[255 & o];
  16052. }
  16053. }
  16054. }
  16055. }, {
  16056. key: "encrypt",
  16057. value: function encrypt(e) {
  16058. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  16059. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = an(e), r = 0; r < 4; r++) {
  16060. s[r] ^= this._Ke[0][r];
  16061. }
  16062. for (var i = 1; i < t; i++) {
  16063. for (r = 0; r < 4; r++) {
  16064. n[r] = Gt[s[r] >> 24 & 255] ^ Vt[s[(r + 1) % 4] >> 16 & 255] ^ Qt[s[(r + 2) % 4] >> 8 & 255] ^ Yt[255 & s[(r + 3) % 4]] ^ this._Ke[i][r];
  16065. }
  16066. s = n.slice();
  16067. }
  16068. var o,
  16069. a = Mt(16);
  16070. for (r = 0; r < 4; r++) {
  16071. o = this._Ke[t][r], a[4 * r] = 255 & (Jt[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (Jt[s[(r + 1) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (Jt[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (Jt[255 & s[(r + 3) % 4]] ^ o);
  16072. }
  16073. return a;
  16074. }
  16075. }, {
  16076. key: "decrypt",
  16077. value: function decrypt(e) {
  16078. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  16079. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = an(e), r = 0; r < 4; r++) {
  16080. s[r] ^= this._Kd[0][r];
  16081. }
  16082. for (var i = 1; i < t; i++) {
  16083. for (r = 0; r < 4; r++) {
  16084. n[r] = Xt[s[r] >> 24 & 255] ^ Zt[s[(r + 3) % 4] >> 16 & 255] ^ en[s[(r + 2) % 4] >> 8 & 255] ^ tn[255 & s[(r + 1) % 4]] ^ this._Kd[i][r];
  16085. }
  16086. s = n.slice();
  16087. }
  16088. var o,
  16089. a = Mt(16);
  16090. for (r = 0; r < 4; r++) {
  16091. o = this._Kd[t][r], a[4 * r] = 255 & (Ht[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (Ht[s[(r + 3) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (Ht[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (Ht[255 & s[(r + 1) % 4]] ^ o);
  16092. }
  16093. return a;
  16094. }
  16095. }]);
  16096. return cn;
  16097. }();
  16098. var un = /*#__PURE__*/function () {
  16099. function un(e) {
  16100. (0, _classCallCheck2.default)(this, un);
  16101. if (!(this instanceof un)) throw Error("AES must be instanitated with `new`");
  16102. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new cn(e);
  16103. }
  16104. (0, _createClass2.default)(un, [{
  16105. key: "encrypt",
  16106. value: function encrypt(e) {
  16107. if ((e = qt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  16108. for (var t = Mt(e.length), n = Mt(16), s = 0; s < e.length; s += 16) {
  16109. Kt(e, n, 0, s, s + 16), Kt(n = this._aes.encrypt(n), t, s);
  16110. }
  16111. return t;
  16112. }
  16113. }, {
  16114. key: "decrypt",
  16115. value: function decrypt(e) {
  16116. if ((e = qt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  16117. for (var t = Mt(e.length), n = Mt(16), s = 0; s < e.length; s += 16) {
  16118. Kt(e, n, 0, s, s + 16), Kt(n = this._aes.decrypt(n), t, s);
  16119. }
  16120. return t;
  16121. }
  16122. }]);
  16123. return un;
  16124. }();
  16125. var hn = /*#__PURE__*/function () {
  16126. function hn(e, t) {
  16127. (0, _classCallCheck2.default)(this, hn);
  16128. if (!(this instanceof hn)) throw Error("AES must be instanitated with `new`");
  16129. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  16130. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  16131. } else t = Mt(16);
  16132. this._lastCipherblock = qt(t, !0), this._aes = new cn(e);
  16133. }
  16134. (0, _createClass2.default)(hn, [{
  16135. key: "encrypt",
  16136. value: function encrypt(e) {
  16137. if ((e = qt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  16138. for (var t = Mt(e.length), n = Mt(16), s = 0; s < e.length; s += 16) {
  16139. Kt(e, n, 0, s, s + 16);
  16140. for (var r = 0; r < 16; r++) {
  16141. n[r] ^= this._lastCipherblock[r];
  16142. }
  16143. this._lastCipherblock = this._aes.encrypt(n), Kt(this._lastCipherblock, t, s);
  16144. }
  16145. return t;
  16146. }
  16147. }, {
  16148. key: "decrypt",
  16149. value: function decrypt(e) {
  16150. if ((e = qt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  16151. for (var t = Mt(e.length), n = Mt(16), s = 0; s < e.length; s += 16) {
  16152. Kt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  16153. for (var r = 0; r < 16; r++) {
  16154. t[s + r] = n[r] ^ this._lastCipherblock[r];
  16155. }
  16156. Kt(e, this._lastCipherblock, 0, s, s + 16);
  16157. }
  16158. return t;
  16159. }
  16160. }]);
  16161. return hn;
  16162. }();
  16163. var ln = /*#__PURE__*/function () {
  16164. function ln(e, t, n) {
  16165. (0, _classCallCheck2.default)(this, ln);
  16166. if (!(this instanceof ln)) throw Error("AES must be instanitated with `new`");
  16167. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  16168. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  16169. } else t = Mt(16);
  16170. n || (n = 1), this.segmentSize = n, this._shiftRegister = qt(t, !0), this._aes = new cn(e);
  16171. }
  16172. (0, _createClass2.default)(ln, [{
  16173. key: "encrypt",
  16174. value: function encrypt(e) {
  16175. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  16176. for (var t, n = qt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  16177. t = this._aes.encrypt(this._shiftRegister);
  16178. for (var r = 0; r < this.segmentSize; r++) {
  16179. n[s + r] ^= t[r];
  16180. }
  16181. Kt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Kt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  16182. }
  16183. return n;
  16184. }
  16185. }, {
  16186. key: "decrypt",
  16187. value: function decrypt(e) {
  16188. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  16189. for (var t, n = qt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  16190. t = this._aes.encrypt(this._shiftRegister);
  16191. for (var r = 0; r < this.segmentSize; r++) {
  16192. n[s + r] ^= t[r];
  16193. }
  16194. Kt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), Kt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  16195. }
  16196. return n;
  16197. }
  16198. }]);
  16199. return ln;
  16200. }();
  16201. var dn = /*#__PURE__*/function () {
  16202. function dn(e, t) {
  16203. (0, _classCallCheck2.default)(this, dn);
  16204. if (!(this instanceof dn)) throw Error("AES must be instanitated with `new`");
  16205. if (this.description = "Output Feedback", this.name = "ofb", t) {
  16206. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  16207. } else t = Mt(16);
  16208. this._lastPrecipher = qt(t, !0), this._lastPrecipherIndex = 16, this._aes = new cn(e);
  16209. }
  16210. (0, _createClass2.default)(dn, [{
  16211. key: "encrypt",
  16212. value: function encrypt(e) {
  16213. for (var t = qt(e, !0), n = 0; n < t.length; n++) {
  16214. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  16215. }
  16216. return t;
  16217. }
  16218. }, {
  16219. key: "decrypt",
  16220. value: function decrypt(e) {
  16221. return this.encrypt(e);
  16222. }
  16223. }]);
  16224. return dn;
  16225. }();
  16226. var pn = /*#__PURE__*/function () {
  16227. function pn(e) {
  16228. (0, _classCallCheck2.default)(this, pn);
  16229. if (!(this instanceof pn)) throw Error("Counter must be instanitated with `new`");
  16230. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = Mt(16), this.setValue(e)) : this.setBytes(e);
  16231. }
  16232. (0, _createClass2.default)(pn, [{
  16233. key: "setValue",
  16234. value: function setValue(e) {
  16235. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  16236. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  16237. for (var t = 15; t >= 0; --t) {
  16238. this._counter[t] = e % 256, e = parseInt(e / 256);
  16239. }
  16240. }
  16241. }, {
  16242. key: "setBytes",
  16243. value: function setBytes(e) {
  16244. if (16 != (e = qt(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  16245. this._counter = e;
  16246. }
  16247. }, {
  16248. key: "increment",
  16249. value: function increment() {
  16250. for (var e = 15; e >= 0; e--) {
  16251. if (255 !== this._counter[e]) {
  16252. this._counter[e]++;
  16253. break;
  16254. }
  16255. this._counter[e] = 0;
  16256. }
  16257. }
  16258. }]);
  16259. return pn;
  16260. }();
  16261. var fn = /*#__PURE__*/function () {
  16262. function fn(e, t) {
  16263. (0, _classCallCheck2.default)(this, fn);
  16264. if (!(this instanceof fn)) throw Error("AES must be instanitated with `new`");
  16265. this.description = "Counter", this.name = "ctr", t instanceof pn || (t = new pn(t)), this._counter = t, this._remainingCounter = null, this._remainingCounterIndex = 16, this._aes = new cn(e);
  16266. }
  16267. (0, _createClass2.default)(fn, [{
  16268. key: "encrypt",
  16269. value: function encrypt(e) {
  16270. for (var t = qt(e, !0), n = 0; n < t.length; n++) {
  16271. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  16272. }
  16273. return t;
  16274. }
  16275. }, {
  16276. key: "decrypt",
  16277. value: function decrypt(e) {
  16278. return this.encrypt(e);
  16279. }
  16280. }]);
  16281. return fn;
  16282. }();
  16283. var gn = {
  16284. AES: cn,
  16285. Counter: pn,
  16286. ModeOfOperation: {
  16287. ecb: un,
  16288. cbc: hn,
  16289. cfb: ln,
  16290. ofb: dn,
  16291. ctr: fn
  16292. },
  16293. utils: {
  16294. hex: $t,
  16295. utf8: Bt
  16296. },
  16297. padding: {
  16298. pkcs7: {
  16299. pad: function pad(e) {
  16300. var t = 16 - (e = qt(e, !0)).length % 16,
  16301. n = Mt(e.length + t);
  16302. Kt(e, n);
  16303. for (var s = e.length; s < n.length; s++) {
  16304. n[s] = t;
  16305. }
  16306. return n;
  16307. },
  16308. strip: function strip(e) {
  16309. if ((e = qt(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  16310. var t = e[e.length - 1];
  16311. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  16312. for (var n = e.length - t, s = 0; s < t; s++) {
  16313. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  16314. }
  16315. var r = Mt(n);
  16316. return Kt(e, r, 0, 0, n), r;
  16317. }
  16318. }
  16319. },
  16320. _arrayTest: {
  16321. coerceArray: qt,
  16322. createArray: Mt,
  16323. copyArray: Kt
  16324. }
  16325. };
  16326. function mn(e, t, n) {
  16327. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  16328. r = gn.utils.utf8.toBytes(n),
  16329. i = gn.utils.utf8.toBytes(e),
  16330. o = new gn.ModeOfOperation.cbc(s, r),
  16331. a = gn.padding.pkcs7.pad(i),
  16332. c = o.encrypt(a);
  16333. return uni.arrayBufferToBase64(c);
  16334. }
  16335. var yn = {
  16336. code: 2e4,
  16337. message: "System error"
  16338. },
  16339. _n = {
  16340. code: 20101,
  16341. message: "Invalid client"
  16342. },
  16343. wn = {
  16344. code: 20102,
  16345. message: "Get encrypt key failed"
  16346. },
  16347. vn = {
  16348. 10001: "Secure network is not supported on current playground or unimpsdk",
  16349. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  16350. 10009: "Encrypt payload failed",
  16351. 10010: "Decrypt response failed"
  16352. };
  16353. function Sn(e) {
  16354. var _ref25 = e || {},
  16355. t = _ref25.errSubject,
  16356. n = _ref25.subject,
  16357. s = _ref25.errCode,
  16358. r = _ref25.errMsg,
  16359. i = _ref25.code,
  16360. o = _ref25.message,
  16361. a = _ref25.cause;
  16362. return new se({
  16363. subject: t || n || "uni-secure-network",
  16364. code: s || i || yn.code,
  16365. message: r || o,
  16366. cause: a
  16367. });
  16368. }
  16369. var In,
  16370. bn,
  16371. kn = null;
  16372. var Tn = /*#__PURE__*/function (_Nt) {
  16373. (0, _inherits2.default)(Tn, _Nt);
  16374. var _super9 = _createSuper(Tn);
  16375. function Tn(e) {
  16376. var _this14;
  16377. (0, _classCallCheck2.default)(this, Tn);
  16378. _this14 = _super9.call(this, e), _this14.clientType = "mp-weixin", _this14.userEncryptKey = null;
  16379. return _this14;
  16380. }
  16381. (0, _createClass2.default)(Tn, [{
  16382. key: "isLogin",
  16383. value: function isLogin() {
  16384. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  16385. }
  16386. }, {
  16387. key: "prepare",
  16388. value: function () {
  16389. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  16390. return _regenerator.default.wrap(function _callee38$(_context38) {
  16391. while (1) {
  16392. switch (_context38.prev = _context38.next) {
  16393. case 0:
  16394. if (this.isLogin()) {
  16395. _context38.next = 7;
  16396. break;
  16397. }
  16398. if (this.scopedGlobalCache.initPromise) {
  16399. _context38.next = 3;
  16400. break;
  16401. }
  16402. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  16403. case 3:
  16404. _context38.next = 5;
  16405. return this.scopedGlobalCache.initPromise;
  16406. case 5:
  16407. if (this.isLogin()) {
  16408. _context38.next = 7;
  16409. break;
  16410. }
  16411. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  16412. case 7:
  16413. case "end":
  16414. return _context38.stop();
  16415. }
  16416. }
  16417. }, _callee38, this);
  16418. }));
  16419. function prepare() {
  16420. return _prepare2.apply(this, arguments);
  16421. }
  16422. return prepare;
  16423. }()
  16424. }, {
  16425. key: "getUserEncryptKey",
  16426. value: function () {
  16427. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  16428. var _this15 = this;
  16429. var e;
  16430. return _regenerator.default.wrap(function _callee39$(_context39) {
  16431. while (1) {
  16432. switch (_context39.prev = _context39.next) {
  16433. case 0:
  16434. if (!this.userEncryptKey) {
  16435. _context39.next = 2;
  16436. break;
  16437. }
  16438. return _context39.abrupt("return", this.userEncryptKey);
  16439. case 2:
  16440. if (!(kn && kn.expireTime)) {
  16441. _context39.next = 6;
  16442. break;
  16443. }
  16444. e = Date.now();
  16445. if (!(kn.expireTime - e > 0)) {
  16446. _context39.next = 6;
  16447. break;
  16448. }
  16449. return _context39.abrupt("return", (this.userEncryptKey = kn, this.userEncryptKey));
  16450. case 6:
  16451. return _context39.abrupt("return", new Promise(function (e, t) {
  16452. uni.getUserCryptoManager().getLatestUserKey({
  16453. success: function success(t) {
  16454. kn = t, _this15.userEncryptKey = t, e(_this15.userEncryptKey);
  16455. },
  16456. fail: function fail(e) {
  16457. t(Sn(_objectSpread(_objectSpread({}, wn), {}, {
  16458. cause: e
  16459. })));
  16460. }
  16461. });
  16462. }));
  16463. case 7:
  16464. case "end":
  16465. return _context39.stop();
  16466. }
  16467. }
  16468. }, _callee39, this);
  16469. }));
  16470. function getUserEncryptKey() {
  16471. return _getUserEncryptKey.apply(this, arguments);
  16472. }
  16473. return getUserEncryptKey;
  16474. }()
  16475. }, {
  16476. key: "getWxAppId",
  16477. value: function getWxAppId() {
  16478. return wx.getAccountInfoSync().miniProgram.appId;
  16479. }
  16480. }, {
  16481. key: "platformGetSignOption",
  16482. value: function () {
  16483. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  16484. var _yield$this$getUserEn, e, t, n;
  16485. return _regenerator.default.wrap(function _callee40$(_context40) {
  16486. while (1) {
  16487. switch (_context40.prev = _context40.next) {
  16488. case 0:
  16489. _context40.next = 2;
  16490. return this.getUserEncryptKey();
  16491. case 2:
  16492. _yield$this$getUserEn = _context40.sent;
  16493. e = _yield$this$getUserEn.encryptKey;
  16494. t = _yield$this$getUserEn.iv;
  16495. n = _yield$this$getUserEn.version;
  16496. return _context40.abrupt("return", {
  16497. verifyClientSign: mn(JSON.stringify({
  16498. data: JSON.stringify({}),
  16499. appId: this.appId,
  16500. deviceId: this.deviceId,
  16501. wxAppId: this.getWxAppId(),
  16502. simulator: "devtools" === ue().platform,
  16503. timestamp: Date.now()
  16504. }), e, t),
  16505. encryptKeyId: n,
  16506. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  16507. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  16508. });
  16509. case 7:
  16510. case "end":
  16511. return _context40.stop();
  16512. }
  16513. }
  16514. }, _callee40, this);
  16515. }));
  16516. function platformGetSignOption() {
  16517. return _platformGetSignOption.apply(this, arguments);
  16518. }
  16519. return platformGetSignOption;
  16520. }()
  16521. }, {
  16522. key: "platformEncryptData",
  16523. value: function () {
  16524. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41(e) {
  16525. var _yield$this$getUserEn2, t, n, s, r;
  16526. return _regenerator.default.wrap(function _callee41$(_context41) {
  16527. while (1) {
  16528. switch (_context41.prev = _context41.next) {
  16529. case 0:
  16530. _context41.next = 2;
  16531. return this.getUserEncryptKey();
  16532. case 2:
  16533. _yield$this$getUserEn2 = _context41.sent;
  16534. t = _yield$this$getUserEn2.encryptKey;
  16535. n = _yield$this$getUserEn2.iv;
  16536. s = _yield$this$getUserEn2.version;
  16537. r = {
  16538. secretType: this.secretType,
  16539. encryptKeyId: s,
  16540. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  16541. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  16542. };
  16543. return _context41.abrupt("return", this.secretType === Ut ? {
  16544. content: e,
  16545. _uniCloudOptions: r
  16546. } : {
  16547. content: mn(JSON.stringify({
  16548. data: JSON.stringify(e),
  16549. appId: this.appId,
  16550. deviceId: this.deviceId,
  16551. wxAppId: this.getWxAppId(),
  16552. simulator: "devtools" === ue().platform,
  16553. timestamp: Date.now()
  16554. }), t, n),
  16555. _uniCloudOptions: r
  16556. });
  16557. case 8:
  16558. case "end":
  16559. return _context41.stop();
  16560. }
  16561. }
  16562. }, _callee41, this);
  16563. }));
  16564. function platformEncryptData(_x33) {
  16565. return _platformEncryptData.apply(this, arguments);
  16566. }
  16567. return platformEncryptData;
  16568. }()
  16569. }, {
  16570. key: "platformDecryptResult",
  16571. value: function () {
  16572. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42(e) {
  16573. var t, _yield$this$getUserEn3, n, s;
  16574. return _regenerator.default.wrap(function _callee42$(_context42) {
  16575. while (1) {
  16576. switch (_context42.prev = _context42.next) {
  16577. case 0:
  16578. t = e.content;
  16579. _context42.next = 3;
  16580. return this.getUserEncryptKey();
  16581. case 3:
  16582. _yield$this$getUserEn3 = _context42.sent;
  16583. n = _yield$this$getUserEn3.encryptKey;
  16584. s = _yield$this$getUserEn3.iv;
  16585. return _context42.abrupt("return", JSON.parse(function (e, t, n) {
  16586. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  16587. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  16588. i = gn.utils.utf8.toBytes(n),
  16589. o = new gn.ModeOfOperation.cbc(r, i),
  16590. a = gn.padding.pkcs7.strip(o.decrypt(s));
  16591. return gn.utils.utf8.fromBytes(a);
  16592. }(t, n, s)));
  16593. case 7:
  16594. case "end":
  16595. return _context42.stop();
  16596. }
  16597. }
  16598. }, _callee42, this);
  16599. }));
  16600. function platformDecryptResult(_x34) {
  16601. return _platformDecryptResult.apply(this, arguments);
  16602. }
  16603. return platformDecryptResult;
  16604. }()
  16605. }, {
  16606. key: "isClientKeyNotFound",
  16607. value: function isClientKeyNotFound() {
  16608. return !1;
  16609. }
  16610. }]);
  16611. return Tn;
  16612. }(Nt);
  16613. function Cn(e) {
  16614. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  16615. n = {};
  16616. var _loop = function _loop(_s10) {
  16617. var r = t[_s10];
  16618. n[r] = function () {
  16619. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  16620. t[_key] = arguments[_key];
  16621. }
  16622. return new Promise(function (n, s) {
  16623. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  16624. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16625. e = _ref26.type,
  16626. t = _ref26.data,
  16627. r = _ref26.errCode,
  16628. i = _ref26.errMsg,
  16629. o = _ref26.errSubject,
  16630. a = _ref26.message;
  16631. "success" === e ? n(t) : s(Sn({
  16632. errCode: r,
  16633. errMsg: vn[r] || i || a,
  16634. errSubject: o
  16635. }));
  16636. }])) : s(Sn({
  16637. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  16638. }));
  16639. });
  16640. };
  16641. };
  16642. for (var _s10 = 0; _s10 < t.length; _s10++) {
  16643. _loop(_s10);
  16644. }
  16645. return n;
  16646. }
  16647. var Pn = /*#__PURE__*/function (_Nt2) {
  16648. (0, _inherits2.default)(Pn, _Nt2);
  16649. var _super10 = _createSuper(Pn);
  16650. function Pn(e) {
  16651. var _this16;
  16652. (0, _classCallCheck2.default)(this, Pn);
  16653. _this16 = _super10.call(this, e), _this16.clientType = "app", _this16.appUtils = _objectSpread({}, Cn(uni.requireNativePlugin("plus"))), _this16.systemInfo = In || (In = ue());
  16654. return _this16;
  16655. }
  16656. (0, _createClass2.default)(Pn, [{
  16657. key: "hasClientKey",
  16658. value: function () {
  16659. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  16660. return _regenerator.default.wrap(function _callee43$(_context43) {
  16661. while (1) {
  16662. switch (_context43.prev = _context43.next) {
  16663. case 0:
  16664. _context43.next = 2;
  16665. return this.appUtils.hasClientKey({
  16666. provider: this.provider,
  16667. spaceId: this.spaceId
  16668. });
  16669. case 2:
  16670. this._hasClientKey = _context43.sent;
  16671. return _context43.abrupt("return", this._hasClientKey);
  16672. case 4:
  16673. case "end":
  16674. return _context43.stop();
  16675. }
  16676. }
  16677. }, _callee43, this);
  16678. }));
  16679. function hasClientKey() {
  16680. return _hasClientKey.apply(this, arguments);
  16681. }
  16682. return hasClientKey;
  16683. }()
  16684. }, {
  16685. key: "getAppClientKey",
  16686. value: function () {
  16687. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44() {
  16688. var _yield$this$appUtils$, e, t, n, s, r;
  16689. return _regenerator.default.wrap(function _callee44$(_context44) {
  16690. while (1) {
  16691. switch (_context44.prev = _context44.next) {
  16692. case 0:
  16693. _context44.next = 2;
  16694. return this.appUtils.encryptGetClientKeyPayload({
  16695. data: JSON.stringify({})
  16696. });
  16697. case 2:
  16698. _yield$this$appUtils$ = _context44.sent;
  16699. e = _yield$this$appUtils$.data;
  16700. t = _yield$this$appUtils$.key;
  16701. _context44.next = 7;
  16702. return this.uniCloudIns.callFunction({
  16703. name: "DCloud-clientDB",
  16704. data: {
  16705. redirectTo: "encryption",
  16706. action: "getAppClientKey",
  16707. data: e,
  16708. key: t
  16709. }
  16710. });
  16711. case 7:
  16712. _context44.t0 = _context44.sent.result;
  16713. if (_context44.t0) {
  16714. _context44.next = 10;
  16715. break;
  16716. }
  16717. _context44.t0 = {};
  16718. case 10:
  16719. n = _context44.t0;
  16720. if (!(0 !== n.errCode)) {
  16721. _context44.next = 13;
  16722. break;
  16723. }
  16724. throw function (e) {
  16725. return new se({
  16726. subject: e.errSubject || "uni-secure-network",
  16727. code: e.errCode || e.code || yn.code,
  16728. message: e.errMsg || e.message
  16729. });
  16730. }(n);
  16731. case 13:
  16732. s = n.clientKey, r = n.key;
  16733. _context44.next = 16;
  16734. return this.appUtils.setClientKey({
  16735. provider: this.provider,
  16736. spaceId: this.spaceId,
  16737. clientKey: s,
  16738. key: r
  16739. });
  16740. case 16:
  16741. case "end":
  16742. return _context44.stop();
  16743. }
  16744. }
  16745. }, _callee44, this);
  16746. }));
  16747. function getAppClientKey() {
  16748. return _getAppClientKey.apply(this, arguments);
  16749. }
  16750. return getAppClientKey;
  16751. }()
  16752. }, {
  16753. key: "ensureClientKey",
  16754. value: function () {
  16755. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  16756. var _this17 = this;
  16757. var _ref27,
  16758. _ref27$forceUpdate,
  16759. e,
  16760. _args45 = arguments;
  16761. return _regenerator.default.wrap(function _callee45$(_context45) {
  16762. while (1) {
  16763. switch (_context45.prev = _context45.next) {
  16764. case 0:
  16765. _ref27 = _args45.length > 0 && _args45[0] !== undefined ? _args45[0] : {}, _ref27$forceUpdate = _ref27.forceUpdate, e = _ref27$forceUpdate === void 0 ? !1 : _ref27$forceUpdate;
  16766. _context45.t1 = !0;
  16767. _context45.next = 4;
  16768. return this.hasClientKey();
  16769. case 4:
  16770. _context45.t2 = _context45.sent;
  16771. _context45.t0 = _context45.t1 !== _context45.t2;
  16772. if (_context45.t0) {
  16773. _context45.next = 8;
  16774. break;
  16775. }
  16776. _context45.t0 = e;
  16777. case 8:
  16778. if (!_context45.t0) {
  16779. _context45.next = 10;
  16780. break;
  16781. }
  16782. return _context45.abrupt("return", (e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus === d || !e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus !== f || (this.scopedGlobalCache.initPromise = this.getAppClientKey(), this.scopedGlobalCache.initPromise.then(function (e) {
  16783. _this17.scopedGlobalCache.initStatus = p;
  16784. }).catch(function (e) {
  16785. throw _this17.scopedGlobalCache.initStatus = f, e;
  16786. }), this.scopedGlobalCache.initStatus = d), this.scopedGlobalCache.initPromise));
  16787. case 10:
  16788. case "end":
  16789. return _context45.stop();
  16790. }
  16791. }
  16792. }, _callee45, this);
  16793. }));
  16794. function ensureClientKey() {
  16795. return _ensureClientKey.apply(this, arguments);
  16796. }
  16797. return ensureClientKey;
  16798. }()
  16799. }, {
  16800. key: "prepare",
  16801. value: function () {
  16802. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  16803. var _ref28,
  16804. _ref28$forceUpdate,
  16805. e,
  16806. _args46 = arguments;
  16807. return _regenerator.default.wrap(function _callee46$(_context46) {
  16808. while (1) {
  16809. switch (_context46.prev = _context46.next) {
  16810. case 0:
  16811. _ref28 = _args46.length > 0 && _args46[0] !== undefined ? _args46[0] : {}, _ref28$forceUpdate = _ref28.forceUpdate, e = _ref28$forceUpdate === void 0 ? !1 : _ref28$forceUpdate;
  16812. _context46.next = 3;
  16813. return this.ensureClientKey({
  16814. forceUpdate: e
  16815. });
  16816. case 3:
  16817. case "end":
  16818. return _context46.stop();
  16819. }
  16820. }
  16821. }, _callee46, this);
  16822. }));
  16823. function prepare() {
  16824. return _prepare3.apply(this, arguments);
  16825. }
  16826. return prepare;
  16827. }()
  16828. }, {
  16829. key: "platformGetSignOption",
  16830. value: function () {
  16831. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  16832. var _yield$this$appUtils$2, e, t;
  16833. return _regenerator.default.wrap(function _callee47$(_context47) {
  16834. while (1) {
  16835. switch (_context47.prev = _context47.next) {
  16836. case 0:
  16837. _context47.next = 2;
  16838. return this.appUtils.encrypt({
  16839. provider: this.provider,
  16840. spaceId: this.spaceId,
  16841. data: JSON.stringify({})
  16842. });
  16843. case 2:
  16844. _yield$this$appUtils$2 = _context47.sent;
  16845. e = _yield$this$appUtils$2.data;
  16846. t = _yield$this$appUtils$2.key;
  16847. return _context47.abrupt("return", {
  16848. verifyClientSign: e,
  16849. encryptKeyId: t
  16850. });
  16851. case 6:
  16852. case "end":
  16853. return _context47.stop();
  16854. }
  16855. }
  16856. }, _callee47, this);
  16857. }));
  16858. function platformGetSignOption() {
  16859. return _platformGetSignOption2.apply(this, arguments);
  16860. }
  16861. return platformGetSignOption;
  16862. }()
  16863. }, {
  16864. key: "platformEncryptData",
  16865. value: function () {
  16866. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48(e) {
  16867. var _yield$this$appUtils$3, t, n, s;
  16868. return _regenerator.default.wrap(function _callee48$(_context48) {
  16869. while (1) {
  16870. switch (_context48.prev = _context48.next) {
  16871. case 0:
  16872. _context48.next = 2;
  16873. return this.appUtils.encrypt({
  16874. provider: this.provider,
  16875. spaceId: this.spaceId,
  16876. data: JSON.stringify(e)
  16877. });
  16878. case 2:
  16879. _yield$this$appUtils$3 = _context48.sent;
  16880. t = _yield$this$appUtils$3.data;
  16881. n = _yield$this$appUtils$3.key;
  16882. s = {
  16883. secretType: this.secretType,
  16884. encryptKeyId: n
  16885. };
  16886. return _context48.abrupt("return", this.secretType === Ut ? {
  16887. content: e,
  16888. _uniCloudOptions: s
  16889. } : {
  16890. content: t,
  16891. _uniCloudOptions: s
  16892. });
  16893. case 7:
  16894. case "end":
  16895. return _context48.stop();
  16896. }
  16897. }
  16898. }, _callee48, this);
  16899. }));
  16900. function platformEncryptData(_x35) {
  16901. return _platformEncryptData2.apply(this, arguments);
  16902. }
  16903. return platformEncryptData;
  16904. }()
  16905. }, {
  16906. key: "platformDecryptResult",
  16907. value: function () {
  16908. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49(e) {
  16909. var t, _e$_uniCloudOptions, n, s, r;
  16910. return _regenerator.default.wrap(function _callee49$(_context49) {
  16911. while (1) {
  16912. switch (_context49.prev = _context49.next) {
  16913. case 0:
  16914. t = e.content;
  16915. _e$_uniCloudOptions = e._uniCloudOptions;
  16916. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  16917. s = n.encryptKeyId;
  16918. _context49.next = 6;
  16919. return this.appUtils.decrypt({
  16920. provider: this.provider,
  16921. spaceId: this.spaceId,
  16922. data: t,
  16923. key: s
  16924. });
  16925. case 6:
  16926. r = _context49.sent;
  16927. return _context49.abrupt("return", JSON.parse(r.data));
  16928. case 8:
  16929. case "end":
  16930. return _context49.stop();
  16931. }
  16932. }
  16933. }, _callee49, this);
  16934. }));
  16935. function platformDecryptResult(_x36) {
  16936. return _platformDecryptResult2.apply(this, arguments);
  16937. }
  16938. return platformDecryptResult;
  16939. }()
  16940. }, {
  16941. key: "isClientKeyNotFound",
  16942. value: function isClientKeyNotFound() {
  16943. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  16944. var t = e.result || {};
  16945. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  16946. }
  16947. }]);
  16948. return Pn;
  16949. }(Nt);
  16950. function An() {
  16951. var _ref29 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16952. e = _ref29.secretType;
  16953. return e === Rt || e === Ut || e === Lt;
  16954. }
  16955. function En() {
  16956. var _ref30 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16957. e = _ref30.name,
  16958. _ref30$data = _ref30.data,
  16959. t = _ref30$data === void 0 ? {} : _ref30$data;
  16960. return "app" === A && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  16961. }
  16962. function On() {
  16963. var _ref31 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16964. e = _ref31.provider,
  16965. t = _ref31.spaceId,
  16966. n = _ref31.functionName;
  16967. var _ue = ue(),
  16968. s = _ue.appId,
  16969. r = _ue.uniPlatform,
  16970. i = _ue.osName;
  16971. var o = r;
  16972. "app" === r && (o = i);
  16973. var a = function () {
  16974. var _ref32 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16975. e = _ref32.provider,
  16976. t = _ref32.spaceId;
  16977. var n = P;
  16978. if (!n) return {};
  16979. e = function (e) {
  16980. return "tencent" === e ? "tcb" : e;
  16981. }(e);
  16982. var s = n.find(function (n) {
  16983. return n.provider === e && n.spaceId === t;
  16984. });
  16985. return s && s.config;
  16986. }({
  16987. provider: e,
  16988. spaceId: t
  16989. });
  16990. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  16991. var c = a.accessControl.function || {},
  16992. u = Object.keys(c);
  16993. if (0 === u.length) return !0;
  16994. var h = function (e, t) {
  16995. var n, s, r;
  16996. for (var _i2 = 0; _i2 < e.length; _i2++) {
  16997. var _o2 = e[_i2];
  16998. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  16999. return e.trim();
  17000. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  17001. }
  17002. return n || s || r;
  17003. }(u, n);
  17004. if (!h) return !1;
  17005. if ((c[h] || []).find(function () {
  17006. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17007. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  17008. })) return !0;
  17009. throw console.error("\u6B64\u5E94\u7528[appId: ".concat(s, ", platform: ").concat(o, "]\u4E0D\u5728\u4E91\u7AEF\u914D\u7F6E\u7684\u5141\u8BB8\u8BBF\u95EE\u7684\u5E94\u7528\u5217\u8868\u5185\uFF0C\u53C2\u8003\uFF1Ahttps://uniapp.dcloud.net.cn/uniCloud/secure-network.html#verify-client")), Sn(_n);
  17010. }
  17011. function xn(_ref33) {
  17012. var e = _ref33.functionName,
  17013. t = _ref33.result,
  17014. n = _ref33.logPvd;
  17015. if (k && this.__dev__.debugLog && t && t.requestId) {
  17016. var _s11 = JSON.stringify({
  17017. spaceId: this.config.spaceId,
  17018. functionName: e,
  17019. requestId: t.requestId
  17020. });
  17021. console.log("[".concat(n, "-request]").concat(_s11, "[/").concat(n, "-request]"));
  17022. }
  17023. }
  17024. function Rn(e) {
  17025. var t = e.callFunction,
  17026. n = function n(_n7) {
  17027. var _this18 = this;
  17028. var s = _n7.name;
  17029. _n7.data = Tt.call(e, {
  17030. data: _n7.data
  17031. });
  17032. var r = {
  17033. aliyun: "aliyun",
  17034. tencent: "tcb",
  17035. tcb: "tcb"
  17036. }[this.config.provider],
  17037. i = An(_n7),
  17038. o = En(_n7),
  17039. a = i || o;
  17040. return t.call(this, _n7).then(function (e) {
  17041. return e.errCode = 0, !a && xn.call(_this18, {
  17042. functionName: s,
  17043. result: e,
  17044. logPvd: r
  17045. }), Promise.resolve(e);
  17046. }, function (e) {
  17047. return !a && xn.call(_this18, {
  17048. functionName: s,
  17049. result: e,
  17050. logPvd: r
  17051. }), e && e.message && (e.message = function () {
  17052. var _ref34 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17053. _ref34$message = _ref34.message,
  17054. e = _ref34$message === void 0 ? "" : _ref34$message,
  17055. _ref34$extraInfo = _ref34.extraInfo,
  17056. t = _ref34$extraInfo === void 0 ? {} : _ref34$extraInfo,
  17057. _ref34$formatter = _ref34.formatter,
  17058. n = _ref34$formatter === void 0 ? [] : _ref34$formatter;
  17059. for (var _s12 = 0; _s12 < n.length; _s12++) {
  17060. var _n$_s = n[_s12],
  17061. _r4 = _n$_s.rule,
  17062. _i3 = _n$_s.content,
  17063. _o3 = _n$_s.mode,
  17064. _a = e.match(_r4);
  17065. if (!_a) continue;
  17066. var _c = _i3;
  17067. for (var _e19 = 1; _e19 < _a.length; _e19++) {
  17068. _c = Ot(_c, "{$".concat(_e19, "}"), _a[_e19]);
  17069. }
  17070. for (var _e20 in t) {
  17071. _c = Ot(_c, "{".concat(_e20, "}"), t[_e20]);
  17072. }
  17073. return "replace" === _o3 ? _c : e + _c;
  17074. }
  17075. return e;
  17076. }({
  17077. message: "[".concat(_n7.name, "]: ").concat(e.message),
  17078. formatter: Pt,
  17079. extraInfo: {
  17080. functionName: s
  17081. }
  17082. })), Promise.reject(e);
  17083. });
  17084. };
  17085. e.callFunction = function (t) {
  17086. var _e$config = e.config,
  17087. s = _e$config.provider,
  17088. r = _e$config.spaceId,
  17089. i = t.name;
  17090. var o, a;
  17091. if (t.data = t.data || {}, k && e.__dev__.debugInfo && !e.__dev__.debugInfo.forceRemote && O ? (e._callCloudFunction || (e._callCloudFunction = n, e._callLocalFunction = Ct), o = Ct) : o = n, o = o.bind(e), En(t)) a = n.call(e, t);else if (function (_ref35) {
  17092. var e = _ref35.name,
  17093. _ref35$data = _ref35.data,
  17094. t = _ref35$data === void 0 ? {} : _ref35$data;
  17095. return "mp-weixin" === A && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  17096. }(t)) a = o.call(e, t);else if (An(t)) {
  17097. a = new bn({
  17098. secretType: t.secretType,
  17099. uniCloudIns: e
  17100. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  17101. } else if (On({
  17102. provider: s,
  17103. spaceId: r,
  17104. functionName: i
  17105. })) {
  17106. a = new bn({
  17107. secretType: t.secretType,
  17108. uniCloudIns: e
  17109. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  17110. } else a = o(t);
  17111. return Object.defineProperty(a, "result", {
  17112. get: function get() {
  17113. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  17114. }
  17115. }), a;
  17116. };
  17117. }
  17118. bn = "mp-weixin" !== A && "app" !== A ? /*#__PURE__*/function () {
  17119. function _class2() {
  17120. (0, _classCallCheck2.default)(this, _class2);
  17121. throw Sn({
  17122. message: "Platform ".concat(A, " is not supported by secure network")
  17123. });
  17124. }
  17125. return (0, _createClass2.default)(_class2);
  17126. }() : C ? "mp-weixin" === A ? Tn : Pn : /*#__PURE__*/function () {
  17127. function _class3() {
  17128. (0, _classCallCheck2.default)(this, _class3);
  17129. throw Sn({
  17130. message: "Platform ".concat(A, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  17131. });
  17132. }
  17133. return (0, _createClass2.default)(_class3);
  17134. }();
  17135. var Un = Symbol("CLIENT_DB_INTERNAL");
  17136. function Ln(e, t) {
  17137. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Un, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  17138. get: function get(e, n, s) {
  17139. if ("_uniClient" === n) return null;
  17140. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  17141. if (n in e || "string" != typeof n) {
  17142. var _t10 = e[n];
  17143. return "function" == typeof _t10 ? _t10.bind(e) : _t10;
  17144. }
  17145. return t.get(e, n, s);
  17146. }
  17147. });
  17148. }
  17149. function Nn(e) {
  17150. return {
  17151. on: function on(t, n) {
  17152. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  17153. },
  17154. off: function off(t, n) {
  17155. e[t] = e[t] || [];
  17156. var s = e[t].indexOf(n);
  17157. -1 !== s && e[t].splice(s, 1);
  17158. }
  17159. };
  17160. }
  17161. var Dn = ["db.Geo", "db.command", "command.aggregate"];
  17162. function Fn(e, t) {
  17163. return Dn.indexOf("".concat(e, ".").concat(t)) > -1;
  17164. }
  17165. function qn(e) {
  17166. switch (g(e)) {
  17167. case "array":
  17168. return e.map(function (e) {
  17169. return qn(e);
  17170. });
  17171. case "object":
  17172. return e._internalType === Un || Object.keys(e).forEach(function (t) {
  17173. e[t] = qn(e[t]);
  17174. }), e;
  17175. case "regexp":
  17176. return {
  17177. $regexp: {
  17178. source: e.source,
  17179. flags: e.flags
  17180. }
  17181. };
  17182. case "date":
  17183. return {
  17184. $date: e.toISOString()
  17185. };
  17186. default:
  17187. return e;
  17188. }
  17189. }
  17190. function Mn(e) {
  17191. return e && e.content && e.content.$method;
  17192. }
  17193. var Kn = /*#__PURE__*/function () {
  17194. function Kn(e, t, n) {
  17195. (0, _classCallCheck2.default)(this, Kn);
  17196. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  17197. }
  17198. (0, _createClass2.default)(Kn, [{
  17199. key: "toJSON",
  17200. value: function toJSON() {
  17201. var e = this;
  17202. var t = [e.content];
  17203. for (; e.prevStage;) {
  17204. e = e.prevStage, t.push(e.content);
  17205. }
  17206. return {
  17207. $db: t.reverse().map(function (e) {
  17208. return {
  17209. $method: e.$method,
  17210. $param: qn(e.$param)
  17211. };
  17212. })
  17213. };
  17214. }
  17215. }, {
  17216. key: "toString",
  17217. value: function toString() {
  17218. return JSON.stringify(this.toJSON());
  17219. }
  17220. }, {
  17221. key: "getAction",
  17222. value: function getAction() {
  17223. var e = this.toJSON().$db.find(function (e) {
  17224. return "action" === e.$method;
  17225. });
  17226. return e && e.$param && e.$param[0];
  17227. }
  17228. }, {
  17229. key: "getCommand",
  17230. value: function getCommand() {
  17231. return {
  17232. $db: this.toJSON().$db.filter(function (e) {
  17233. return "action" !== e.$method;
  17234. })
  17235. };
  17236. }
  17237. }, {
  17238. key: "isAggregate",
  17239. get: function get() {
  17240. var e = this;
  17241. for (; e;) {
  17242. var t = Mn(e),
  17243. _n8 = Mn(e.prevStage);
  17244. if ("aggregate" === t && "collection" === _n8 || "pipeline" === t) return !0;
  17245. e = e.prevStage;
  17246. }
  17247. return !1;
  17248. }
  17249. }, {
  17250. key: "isCommand",
  17251. get: function get() {
  17252. var e = this;
  17253. for (; e;) {
  17254. if ("command" === Mn(e)) return !0;
  17255. e = e.prevStage;
  17256. }
  17257. return !1;
  17258. }
  17259. }, {
  17260. key: "isAggregateCommand",
  17261. get: function get() {
  17262. var e = this;
  17263. for (; e;) {
  17264. var t = Mn(e),
  17265. _n9 = Mn(e.prevStage);
  17266. if ("aggregate" === t && "command" === _n9) return !0;
  17267. e = e.prevStage;
  17268. }
  17269. return !1;
  17270. }
  17271. }, {
  17272. key: "getNextStageFn",
  17273. value: function getNextStageFn(e) {
  17274. var t = this;
  17275. return function () {
  17276. return jn({
  17277. $method: e,
  17278. $param: qn(Array.from(arguments))
  17279. }, t, t._database);
  17280. };
  17281. }
  17282. }, {
  17283. key: "count",
  17284. get: function get() {
  17285. return this.isAggregate ? this.getNextStageFn("count") : function () {
  17286. return this._send("count", Array.from(arguments));
  17287. };
  17288. }
  17289. }, {
  17290. key: "remove",
  17291. get: function get() {
  17292. return this.isCommand ? this.getNextStageFn("remove") : function () {
  17293. return this._send("remove", Array.from(arguments));
  17294. };
  17295. }
  17296. }, {
  17297. key: "get",
  17298. value: function get() {
  17299. return this._send("get", Array.from(arguments));
  17300. }
  17301. }, {
  17302. key: "add",
  17303. get: function get() {
  17304. return this.isCommand ? this.getNextStageFn("add") : function () {
  17305. return this._send("add", Array.from(arguments));
  17306. };
  17307. }
  17308. }, {
  17309. key: "update",
  17310. value: function update() {
  17311. return this._send("update", Array.from(arguments));
  17312. }
  17313. }, {
  17314. key: "end",
  17315. value: function end() {
  17316. return this._send("end", Array.from(arguments));
  17317. }
  17318. }, {
  17319. key: "set",
  17320. get: function get() {
  17321. return this.isCommand ? this.getNextStageFn("set") : function () {
  17322. throw new Error("JQL禁止使用set方法");
  17323. };
  17324. }
  17325. }, {
  17326. key: "_send",
  17327. value: function _send(e, t) {
  17328. var n = this.getAction(),
  17329. s = this.getCommand();
  17330. if (s.$db.push({
  17331. $method: e,
  17332. $param: qn(t)
  17333. }), k) {
  17334. var _e21 = s.$db.find(function (e) {
  17335. return "collection" === e.$method;
  17336. }),
  17337. _t11 = _e21 && _e21.$param;
  17338. _t11 && 1 === _t11.length && "string" == typeof _e21.$param[0] && _e21.$param[0].indexOf(",") > -1 && console.warn("检测到使用JQL语法联表查询时,未使用getTemp先过滤主表数据,在主表数据量大的情况下可能会查询缓慢。\n- 如何优化请参考此文档:https://uniapp.dcloud.net.cn/uniCloud/jql?id=lookup-with-temp \n- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  17339. }
  17340. return this._database._callCloudFunction({
  17341. action: n,
  17342. command: s
  17343. });
  17344. }
  17345. }]);
  17346. return Kn;
  17347. }();
  17348. function jn(e, t, n) {
  17349. return Ln(new Kn(e, t, n), {
  17350. get: function get(e, t) {
  17351. var s = "db";
  17352. return e && e.content && (s = e.content.$method), Fn(s, t) ? jn({
  17353. $method: t
  17354. }, e, n) : function () {
  17355. return jn({
  17356. $method: t,
  17357. $param: qn(Array.from(arguments))
  17358. }, e, n);
  17359. };
  17360. }
  17361. });
  17362. }
  17363. function Bn(_ref36) {
  17364. var e = _ref36.path,
  17365. t = _ref36.method;
  17366. return /*#__PURE__*/function () {
  17367. function _class4() {
  17368. (0, _classCallCheck2.default)(this, _class4);
  17369. this.param = Array.from(arguments);
  17370. }
  17371. (0, _createClass2.default)(_class4, [{
  17372. key: "toJSON",
  17373. value: function toJSON() {
  17374. return {
  17375. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  17376. return {
  17377. $method: e
  17378. };
  17379. })), [{
  17380. $method: t,
  17381. $param: this.param
  17382. }])
  17383. };
  17384. }
  17385. }, {
  17386. key: "toString",
  17387. value: function toString() {
  17388. return JSON.stringify(this.toJSON());
  17389. }
  17390. }]);
  17391. return _class4;
  17392. }();
  17393. }
  17394. function $n(e) {
  17395. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17396. return Ln(new e(t), {
  17397. get: function get(e, t) {
  17398. return Fn("db", t) ? jn({
  17399. $method: t
  17400. }, null, e) : function () {
  17401. return jn({
  17402. $method: t,
  17403. $param: qn(Array.from(arguments))
  17404. }, null, e);
  17405. };
  17406. }
  17407. });
  17408. }
  17409. var Wn = /*#__PURE__*/function (_ref37) {
  17410. (0, _inherits2.default)(Wn, _ref37);
  17411. var _super11 = _createSuper(Wn);
  17412. function Wn() {
  17413. (0, _classCallCheck2.default)(this, Wn);
  17414. return _super11.apply(this, arguments);
  17415. }
  17416. (0, _createClass2.default)(Wn, [{
  17417. key: "_parseResult",
  17418. value: function _parseResult(e) {
  17419. return this._isJQL ? e.result : e;
  17420. }
  17421. }, {
  17422. key: "_callCloudFunction",
  17423. value: function _callCloudFunction(_ref38) {
  17424. var _this19 = this;
  17425. var e = _ref38.action,
  17426. t = _ref38.command,
  17427. n = _ref38.multiCommand,
  17428. s = _ref38.queryList;
  17429. function r(e, t) {
  17430. if (n && s) for (var _n10 = 0; _n10 < s.length; _n10++) {
  17431. var _r5 = s[_n10];
  17432. _r5.udb && "function" == typeof _r5.udb.setResult && (t ? _r5.udb.setResult(t) : _r5.udb.setResult(e.result.dataList[_n10]));
  17433. }
  17434. }
  17435. var i = this,
  17436. o = this._isJQL ? "databaseForJQL" : "database";
  17437. function a(e) {
  17438. return i._callback("error", [e]), M(K(o, "fail"), e).then(function () {
  17439. return M(K(o, "complete"), e);
  17440. }).then(function () {
  17441. return r(null, e), X($, {
  17442. type: J,
  17443. content: e
  17444. }), Promise.reject(e);
  17445. });
  17446. }
  17447. var c = M(K(o, "invoke")),
  17448. u = this._uniClient;
  17449. return c.then(function () {
  17450. return u.callFunction({
  17451. name: "DCloud-clientDB",
  17452. type: l,
  17453. data: {
  17454. action: e,
  17455. command: t,
  17456. multiCommand: n
  17457. }
  17458. });
  17459. }).then(function (e) {
  17460. var _e$result = e.result,
  17461. t = _e$result.code,
  17462. n = _e$result.message,
  17463. s = _e$result.token,
  17464. c = _e$result.tokenExpired,
  17465. _e$result$systemInfo = _e$result.systemInfo,
  17466. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  17467. if (u) for (var _e22 = 0; _e22 < u.length; _e22++) {
  17468. var _u$_e = u[_e22],
  17469. _t12 = _u$_e.level,
  17470. _n11 = _u$_e.message,
  17471. _s13 = _u$_e.detail,
  17472. _r6 = console["app" === A && "warn" === _t12 ? "error" : _t12] || console.log;
  17473. var _i4 = "[System Info]" + _n11;
  17474. _s13 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s13)), _r6(_i4);
  17475. }
  17476. if (t) {
  17477. return a(new se({
  17478. code: t,
  17479. message: n,
  17480. requestId: e.requestId
  17481. }));
  17482. }
  17483. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (oe({
  17484. token: s,
  17485. tokenExpired: c
  17486. }), _this19._callbackAuth("refreshToken", [{
  17487. token: s,
  17488. tokenExpired: c
  17489. }]), _this19._callback("refreshToken", [{
  17490. token: s,
  17491. tokenExpired: c
  17492. }]), X(z, {
  17493. token: s,
  17494. tokenExpired: c
  17495. }));
  17496. var h = [{
  17497. prop: "affectedDocs",
  17498. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  17499. }, {
  17500. prop: "code",
  17501. tips: "code不再推荐使用,请使用errCode替代"
  17502. }, {
  17503. prop: "message",
  17504. tips: "message不再推荐使用,请使用errMsg替代"
  17505. }];
  17506. var _loop2 = function _loop2(_t13) {
  17507. var _h$_t = h[_t13],
  17508. n = _h$_t.prop,
  17509. s = _h$_t.tips;
  17510. if (n in e.result) {
  17511. var _t14 = e.result[n];
  17512. Object.defineProperty(e.result, n, {
  17513. get: function get() {
  17514. return console.warn(s), _t14;
  17515. }
  17516. });
  17517. }
  17518. };
  17519. for (var _t13 = 0; _t13 < h.length; _t13++) {
  17520. _loop2(_t13);
  17521. }
  17522. return function (e) {
  17523. return M(K(o, "success"), e).then(function () {
  17524. return M(K(o, "complete"), e);
  17525. }).then(function () {
  17526. r(e, null);
  17527. var t = i._parseResult(e);
  17528. return X($, {
  17529. type: J,
  17530. content: t
  17531. }), Promise.resolve(t);
  17532. });
  17533. }(e);
  17534. }, function (e) {
  17535. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  17536. return a(new se({
  17537. code: e.code || "SYSTEM_ERROR",
  17538. message: e.message,
  17539. requestId: e.requestId
  17540. }));
  17541. });
  17542. }
  17543. }]);
  17544. return Wn;
  17545. }( /*#__PURE__*/function () {
  17546. function _class5() {
  17547. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17548. _ref39$uniClient = _ref39.uniClient,
  17549. e = _ref39$uniClient === void 0 ? {} : _ref39$uniClient,
  17550. _ref39$isJQL = _ref39.isJQL,
  17551. t = _ref39$isJQL === void 0 ? !1 : _ref39$isJQL;
  17552. (0, _classCallCheck2.default)(this, _class5);
  17553. this._uniClient = e, this._authCallBacks = {}, this._dbCallBacks = {}, e._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t || (this.auth = Nn(this._authCallBacks)), this._isJQL = t, Object.assign(this, Nn(this._dbCallBacks)), this.env = Ln({}, {
  17554. get: function get(e, t) {
  17555. return {
  17556. $env: t
  17557. };
  17558. }
  17559. }), this.Geo = Ln({}, {
  17560. get: function get(e, t) {
  17561. return Bn({
  17562. path: ["Geo"],
  17563. method: t
  17564. });
  17565. }
  17566. }), this.serverDate = Bn({
  17567. path: [],
  17568. method: "serverDate"
  17569. }), this.RegExp = Bn({
  17570. path: [],
  17571. method: "RegExp"
  17572. });
  17573. }
  17574. (0, _createClass2.default)(_class5, [{
  17575. key: "getCloudEnv",
  17576. value: function getCloudEnv(e) {
  17577. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  17578. return {
  17579. $env: e.replace("$cloudEnv_", "")
  17580. };
  17581. }
  17582. }, {
  17583. key: "_callback",
  17584. value: function _callback(e, t) {
  17585. var n = this._dbCallBacks;
  17586. n[e] && n[e].forEach(function (e) {
  17587. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  17588. });
  17589. }
  17590. }, {
  17591. key: "_callbackAuth",
  17592. value: function _callbackAuth(e, t) {
  17593. var n = this._authCallBacks;
  17594. n[e] && n[e].forEach(function (e) {
  17595. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  17596. });
  17597. }
  17598. }, {
  17599. key: "multiSend",
  17600. value: function multiSend() {
  17601. var e = Array.from(arguments),
  17602. t = e.map(function (e) {
  17603. var t = e.getAction(),
  17604. n = e.getCommand();
  17605. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  17606. return {
  17607. action: t,
  17608. command: n
  17609. };
  17610. });
  17611. return this._callCloudFunction({
  17612. multiCommand: t,
  17613. queryList: e
  17614. });
  17615. }
  17616. }]);
  17617. return _class5;
  17618. }());
  17619. var zn = "token无效,跳转登录页面",
  17620. Jn = "token过期,跳转登录页面",
  17621. Hn = {
  17622. TOKEN_INVALID_TOKEN_EXPIRED: Jn,
  17623. TOKEN_INVALID_INVALID_CLIENTID: zn,
  17624. TOKEN_INVALID: zn,
  17625. TOKEN_INVALID_WRONG_TOKEN: zn,
  17626. TOKEN_INVALID_ANONYMOUS_USER: zn
  17627. },
  17628. Gn = {
  17629. "uni-id-token-expired": Jn,
  17630. "uni-id-check-token-failed": zn,
  17631. "uni-id-token-not-exist": zn,
  17632. "uni-id-check-device-feature-failed": zn
  17633. };
  17634. function Vn(e, t) {
  17635. var n = "";
  17636. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  17637. }
  17638. function Qn() {
  17639. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  17640. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  17641. var n = [],
  17642. s = [];
  17643. return e.forEach(function (e) {
  17644. !0 === e.needLogin ? n.push(Vn(t, e.path)) : !1 === e.needLogin && s.push(Vn(t, e.path));
  17645. }), {
  17646. needLoginPage: n,
  17647. notNeedLoginPage: s
  17648. };
  17649. }
  17650. function Yn(e) {
  17651. return e.split("?")[0].replace(/^\//, "");
  17652. }
  17653. function Xn() {
  17654. return function (e) {
  17655. var t = e && e.$page && e.$page.fullPath || "";
  17656. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  17657. }(function () {
  17658. var e = getCurrentPages();
  17659. return e[e.length - 1];
  17660. }());
  17661. }
  17662. function Zn() {
  17663. return Yn(Xn());
  17664. }
  17665. function es() {
  17666. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  17667. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17668. if (!e) return !1;
  17669. if (!(t && t.list && t.list.length)) return !1;
  17670. var n = t.list,
  17671. s = Yn(e);
  17672. return n.some(function (e) {
  17673. return e.pagePath === s;
  17674. });
  17675. }
  17676. var ts = !!_pages.default.uniIdRouter;
  17677. var _ref40 = function () {
  17678. var _ref21 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  17679. _ref21$pages = _ref21.pages,
  17680. e = _ref21$pages === void 0 ? [] : _ref21$pages,
  17681. _ref21$subPackages = _ref21.subPackages,
  17682. n = _ref21$subPackages === void 0 ? [] : _ref21$subPackages,
  17683. _ref21$uniIdRouter = _ref21.uniIdRouter,
  17684. s = _ref21$uniIdRouter === void 0 ? {} : _ref21$uniIdRouter,
  17685. _ref21$tabBar = _ref21.tabBar,
  17686. r = _ref21$tabBar === void 0 ? {} : _ref21$tabBar;
  17687. var i = s.loginPage,
  17688. _s$needLogin = s.needLogin,
  17689. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  17690. _s$resToLogin = s.resToLogin,
  17691. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  17692. _Qn = Qn(e),
  17693. c = _Qn.needLoginPage,
  17694. u = _Qn.notNeedLoginPage,
  17695. _ref23 = function () {
  17696. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  17697. var t = [],
  17698. n = [];
  17699. return e.forEach(function (e) {
  17700. var s = e.root,
  17701. _e$pages = e.pages,
  17702. r = _e$pages === void 0 ? [] : _e$pages,
  17703. _Qn2 = Qn(r, s),
  17704. i = _Qn2.needLoginPage,
  17705. o = _Qn2.notNeedLoginPage;
  17706. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  17707. }), {
  17708. needLoginPage: t,
  17709. notNeedLoginPage: n
  17710. };
  17711. }(n),
  17712. h = _ref23.needLoginPage,
  17713. l = _ref23.notNeedLoginPage;
  17714. return {
  17715. loginPage: i,
  17716. routerNeedLogin: o,
  17717. resToLogin: a,
  17718. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(h)),
  17719. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(l)),
  17720. loginPageInTabBar: es(i, r)
  17721. };
  17722. }(),
  17723. ns = _ref40.loginPage,
  17724. ss = _ref40.routerNeedLogin,
  17725. rs = _ref40.resToLogin,
  17726. is = _ref40.needLoginPage,
  17727. os = _ref40.notNeedLoginPage,
  17728. as = _ref40.loginPageInTabBar;
  17729. if (is.indexOf(ns) > -1) throw new Error("Login page [".concat(ns, "] should not be \"needLogin\", please check your pages.json"));
  17730. function cs(e) {
  17731. var t = Zn();
  17732. if ("/" === e.charAt(0)) return e;
  17733. var _e$split = e.split("?"),
  17734. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  17735. n = _e$split2[0],
  17736. s = _e$split2[1],
  17737. r = n.replace(/^\//, "").split("/"),
  17738. i = t.split("/");
  17739. i.pop();
  17740. for (var _e23 = 0; _e23 < r.length; _e23++) {
  17741. var _t15 = r[_e23];
  17742. ".." === _t15 ? i.pop() : "." !== _t15 && i.push(_t15);
  17743. }
  17744. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  17745. }
  17746. function us(e) {
  17747. var t = Yn(cs(e));
  17748. return !(os.indexOf(t) > -1) && (is.indexOf(t) > -1 || ss.some(function (t) {
  17749. return function (e, t) {
  17750. return new RegExp(t).test(e);
  17751. }(e, t);
  17752. }));
  17753. }
  17754. function hs(_ref41) {
  17755. var e = _ref41.redirect;
  17756. var t = Yn(e),
  17757. n = Yn(ns);
  17758. return Zn() !== n && t !== n;
  17759. }
  17760. function ls() {
  17761. var _ref42 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17762. e = _ref42.api,
  17763. t = _ref42.redirect;
  17764. if (!t || !hs({
  17765. redirect: t
  17766. })) return;
  17767. var n = function (e, t) {
  17768. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  17769. }(ns, t);
  17770. as ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  17771. var s = {
  17772. navigateTo: uni.navigateTo,
  17773. redirectTo: uni.redirectTo,
  17774. switchTab: uni.switchTab,
  17775. reLaunch: uni.reLaunch
  17776. };
  17777. setTimeout(function () {
  17778. s[e]({
  17779. url: n
  17780. });
  17781. });
  17782. }
  17783. function ds() {
  17784. var _ref43 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17785. e = _ref43.url;
  17786. var t = {
  17787. abortLoginPageJump: !1,
  17788. autoToLoginPage: !1
  17789. },
  17790. n = function () {
  17791. var _ie3 = ie(),
  17792. e = _ie3.token,
  17793. t = _ie3.tokenExpired;
  17794. var n;
  17795. if (e) {
  17796. if (t < Date.now()) {
  17797. var _e24 = "uni-id-token-expired";
  17798. n = {
  17799. errCode: _e24,
  17800. errMsg: Gn[_e24]
  17801. };
  17802. }
  17803. } else {
  17804. var _e25 = "uni-id-check-token-failed";
  17805. n = {
  17806. errCode: _e25,
  17807. errMsg: Gn[_e25]
  17808. };
  17809. }
  17810. return n;
  17811. }();
  17812. if (us(e) && n) {
  17813. n.uniIdRedirectUrl = e;
  17814. if (V(W).length > 0) return setTimeout(function () {
  17815. X(W, n);
  17816. }, 0), t.abortLoginPageJump = !0, t;
  17817. t.autoToLoginPage = !0;
  17818. }
  17819. return t;
  17820. }
  17821. function ps() {
  17822. !function () {
  17823. var e = Xn(),
  17824. _ds = ds({
  17825. url: e
  17826. }),
  17827. t = _ds.abortLoginPageJump,
  17828. n = _ds.autoToLoginPage;
  17829. t || n && ls({
  17830. api: "redirectTo",
  17831. redirect: e
  17832. });
  17833. }();
  17834. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  17835. var _loop3 = function _loop3(_t16) {
  17836. var n = e[_t16];
  17837. uni.addInterceptor(n, {
  17838. invoke: function invoke(e) {
  17839. var _ds2 = ds({
  17840. url: e.url
  17841. }),
  17842. t = _ds2.abortLoginPageJump,
  17843. s = _ds2.autoToLoginPage;
  17844. return t ? e : s ? (ls({
  17845. api: n,
  17846. redirect: cs(e.url)
  17847. }), !1) : e;
  17848. }
  17849. });
  17850. };
  17851. for (var _t16 = 0; _t16 < e.length; _t16++) {
  17852. _loop3(_t16);
  17853. }
  17854. }
  17855. function fs() {
  17856. this.onResponse(function (e) {
  17857. var t = e.type,
  17858. n = e.content;
  17859. var s = !1;
  17860. switch (t) {
  17861. case "cloudobject":
  17862. s = function (e) {
  17863. if ("object" != (0, _typeof2.default)(e)) return !1;
  17864. var _ref44 = e || {},
  17865. t = _ref44.errCode;
  17866. return t in Gn;
  17867. }(n);
  17868. break;
  17869. case "clientdb":
  17870. s = function (e) {
  17871. if ("object" != (0, _typeof2.default)(e)) return !1;
  17872. var _ref45 = e || {},
  17873. t = _ref45.errCode;
  17874. return t in Hn;
  17875. }(n);
  17876. }
  17877. s && function () {
  17878. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17879. var t = V(W);
  17880. te().then(function () {
  17881. var n = Xn();
  17882. if (n && hs({
  17883. redirect: n
  17884. })) return t.length > 0 ? X(W, Object.assign({
  17885. uniIdRedirectUrl: n
  17886. }, e)) : void (ns && ls({
  17887. api: "navigateTo",
  17888. redirect: n
  17889. }));
  17890. });
  17891. }(n);
  17892. });
  17893. }
  17894. function gs(e) {
  17895. !function (e) {
  17896. e.onResponse = function (e) {
  17897. Q($, e);
  17898. }, e.offResponse = function (e) {
  17899. Y($, e);
  17900. };
  17901. }(e), function (e) {
  17902. e.onNeedLogin = function (e) {
  17903. Q(W, e);
  17904. }, e.offNeedLogin = function (e) {
  17905. Y(W, e);
  17906. }, ts && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = !0, te().then(function () {
  17907. ps.call(e);
  17908. }), rs && fs.call(e)));
  17909. }(e), function (e) {
  17910. e.onRefreshToken = function (e) {
  17911. Q(z, e);
  17912. }, e.offRefreshToken = function (e) {
  17913. Y(z, e);
  17914. };
  17915. }(e);
  17916. }
  17917. var ms;
  17918. var ys = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  17919. _s = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  17920. function ws() {
  17921. var e = ie().token || "",
  17922. t = e.split(".");
  17923. if (!e || 3 !== t.length) return {
  17924. uid: null,
  17925. role: [],
  17926. permission: [],
  17927. tokenExpired: 0
  17928. };
  17929. var n;
  17930. try {
  17931. n = JSON.parse((s = t[1], decodeURIComponent(ms(s).split("").map(function (e) {
  17932. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  17933. }).join(""))));
  17934. } catch (e) {
  17935. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  17936. }
  17937. var s;
  17938. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  17939. }
  17940. ms = "function" != typeof atob ? function (e) {
  17941. if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !_s.test(e)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  17942. var t;
  17943. e += "==".slice(2 - (3 & e.length));
  17944. for (var n, s, r = "", i = 0; i < e.length;) {
  17945. t = ys.indexOf(e.charAt(i++)) << 18 | ys.indexOf(e.charAt(i++)) << 12 | (n = ys.indexOf(e.charAt(i++))) << 6 | (s = ys.indexOf(e.charAt(i++))), r += 64 === n ? String.fromCharCode(t >> 16 & 255) : 64 === s ? String.fromCharCode(t >> 16 & 255, t >> 8 & 255) : String.fromCharCode(t >> 16 & 255, t >> 8 & 255, 255 & t);
  17946. }
  17947. return r;
  17948. } : atob;
  17949. var vs = s(function (e, t) {
  17950. Object.defineProperty(t, "__esModule", {
  17951. value: !0
  17952. });
  17953. var n = "chooseAndUploadFile:ok",
  17954. s = "chooseAndUploadFile:fail";
  17955. function r(e, t) {
  17956. return e.tempFiles.forEach(function (e, n) {
  17957. e.name || (e.name = e.path.substring(e.path.lastIndexOf("/") + 1)), t && (e.fileType = t), e.cloudPath = Date.now() + "_" + n + e.name.substring(e.name.lastIndexOf("."));
  17958. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  17959. return e.path;
  17960. })), e;
  17961. }
  17962. function i(e, t, _ref46) {
  17963. var s = _ref46.onChooseFile,
  17964. r = _ref46.onUploadProgress;
  17965. return t.then(function (e) {
  17966. if (s) {
  17967. var _t17 = s(e);
  17968. if (void 0 !== _t17) return Promise.resolve(_t17).then(function (t) {
  17969. return void 0 === t ? e : t;
  17970. });
  17971. }
  17972. return e;
  17973. }).then(function (t) {
  17974. return !1 === t ? {
  17975. errMsg: n,
  17976. tempFilePaths: [],
  17977. tempFiles: []
  17978. } : function (e, t) {
  17979. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  17980. var r = arguments.length > 3 ? arguments[3] : undefined;
  17981. (t = Object.assign({}, t)).errMsg = n;
  17982. var i = t.tempFiles,
  17983. o = i.length;
  17984. var a = 0;
  17985. return new Promise(function (n) {
  17986. for (; a < s;) {
  17987. c();
  17988. }
  17989. function c() {
  17990. var s = a++;
  17991. if (s >= o) return void (!i.find(function (e) {
  17992. return !e.url && !e.errMsg;
  17993. }) && n(t));
  17994. var u = i[s];
  17995. e.uploadFile({
  17996. filePath: u.path,
  17997. cloudPath: u.cloudPath,
  17998. fileType: u.fileType,
  17999. onUploadProgress: function onUploadProgress(e) {
  18000. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  18001. }
  18002. }).then(function (e) {
  18003. u.url = e.fileID, s < o && c();
  18004. }).catch(function (e) {
  18005. u.errMsg = e.errMsg || e.message, s < o && c();
  18006. });
  18007. }
  18008. });
  18009. }(e, t, 5, r);
  18010. });
  18011. }
  18012. t.initChooseAndUploadFile = function (e) {
  18013. return function () {
  18014. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  18015. type: "all"
  18016. };
  18017. return "image" === t.type ? i(e, function (e) {
  18018. var t = e.count,
  18019. n = e.sizeType,
  18020. _e$sourceType = e.sourceType,
  18021. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  18022. o = e.extension;
  18023. return new Promise(function (e, a) {
  18024. uni.chooseImage({
  18025. count: t,
  18026. sizeType: n,
  18027. sourceType: i,
  18028. extension: o,
  18029. success: function success(t) {
  18030. e(r(t, "image"));
  18031. },
  18032. fail: function fail(e) {
  18033. a({
  18034. errMsg: e.errMsg.replace("chooseImage:fail", s)
  18035. });
  18036. }
  18037. });
  18038. });
  18039. }(t), t) : "video" === t.type ? i(e, function (e) {
  18040. var t = e.camera,
  18041. n = e.compressed,
  18042. i = e.maxDuration,
  18043. _e$sourceType2 = e.sourceType,
  18044. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  18045. a = e.extension;
  18046. return new Promise(function (e, c) {
  18047. uni.chooseVideo({
  18048. camera: t,
  18049. compressed: n,
  18050. maxDuration: i,
  18051. sourceType: o,
  18052. extension: a,
  18053. success: function success(t) {
  18054. var n = t.tempFilePath,
  18055. s = t.duration,
  18056. i = t.size,
  18057. o = t.height,
  18058. a = t.width;
  18059. e(r({
  18060. errMsg: "chooseVideo:ok",
  18061. tempFilePaths: [n],
  18062. tempFiles: [{
  18063. name: t.tempFile && t.tempFile.name || "",
  18064. path: n,
  18065. size: i,
  18066. type: t.tempFile && t.tempFile.type || "",
  18067. width: a,
  18068. height: o,
  18069. duration: s,
  18070. fileType: "video",
  18071. cloudPath: ""
  18072. }]
  18073. }, "video"));
  18074. },
  18075. fail: function fail(e) {
  18076. c({
  18077. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  18078. });
  18079. }
  18080. });
  18081. });
  18082. }(t), t) : i(e, function (e) {
  18083. var t = e.count,
  18084. n = e.extension;
  18085. return new Promise(function (e, i) {
  18086. var o = uni.chooseFile;
  18087. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  18088. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  18089. });
  18090. o({
  18091. type: "all",
  18092. count: t,
  18093. extension: n,
  18094. success: function success(t) {
  18095. e(r(t));
  18096. },
  18097. fail: function fail(e) {
  18098. i({
  18099. errMsg: e.errMsg.replace("chooseFile:fail", s)
  18100. });
  18101. }
  18102. });
  18103. });
  18104. }(t), t);
  18105. };
  18106. };
  18107. }),
  18108. Ss = n(vs);
  18109. var Is = "manual";
  18110. function bs(e) {
  18111. return {
  18112. props: {
  18113. localdata: {
  18114. type: Array,
  18115. default: function _default() {
  18116. return [];
  18117. }
  18118. },
  18119. options: {
  18120. type: [Object, Array],
  18121. default: function _default() {
  18122. return {};
  18123. }
  18124. },
  18125. spaceInfo: {
  18126. type: Object,
  18127. default: function _default() {
  18128. return {};
  18129. }
  18130. },
  18131. collection: {
  18132. type: [String, Array],
  18133. default: ""
  18134. },
  18135. action: {
  18136. type: String,
  18137. default: ""
  18138. },
  18139. field: {
  18140. type: String,
  18141. default: ""
  18142. },
  18143. orderby: {
  18144. type: String,
  18145. default: ""
  18146. },
  18147. where: {
  18148. type: [String, Object],
  18149. default: ""
  18150. },
  18151. pageData: {
  18152. type: String,
  18153. default: "add"
  18154. },
  18155. pageCurrent: {
  18156. type: Number,
  18157. default: 1
  18158. },
  18159. pageSize: {
  18160. type: Number,
  18161. default: 20
  18162. },
  18163. getcount: {
  18164. type: [Boolean, String],
  18165. default: !1
  18166. },
  18167. gettree: {
  18168. type: [Boolean, String],
  18169. default: !1
  18170. },
  18171. gettreepath: {
  18172. type: [Boolean, String],
  18173. default: !1
  18174. },
  18175. startwith: {
  18176. type: String,
  18177. default: ""
  18178. },
  18179. limitlevel: {
  18180. type: Number,
  18181. default: 10
  18182. },
  18183. groupby: {
  18184. type: String,
  18185. default: ""
  18186. },
  18187. groupField: {
  18188. type: String,
  18189. default: ""
  18190. },
  18191. distinct: {
  18192. type: [Boolean, String],
  18193. default: !1
  18194. },
  18195. foreignKey: {
  18196. type: String,
  18197. default: ""
  18198. },
  18199. loadtime: {
  18200. type: String,
  18201. default: "auto"
  18202. },
  18203. manual: {
  18204. type: Boolean,
  18205. default: !1
  18206. }
  18207. },
  18208. data: function data() {
  18209. return {
  18210. mixinDatacomLoading: !1,
  18211. mixinDatacomHasMore: !1,
  18212. mixinDatacomResData: [],
  18213. mixinDatacomErrorMessage: "",
  18214. mixinDatacomPage: {}
  18215. };
  18216. },
  18217. created: function created() {
  18218. var _this20 = this;
  18219. this.mixinDatacomPage = {
  18220. current: this.pageCurrent,
  18221. size: this.pageSize,
  18222. count: 0
  18223. }, this.$watch(function () {
  18224. var e = [];
  18225. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  18226. e.push(_this20[t]);
  18227. }), e;
  18228. }, function (e, t) {
  18229. if (_this20.loadtime === Is) return;
  18230. var n = !1;
  18231. var s = [];
  18232. for (var _r7 = 2; _r7 < e.length; _r7++) {
  18233. e[_r7] !== t[_r7] && (s.push(e[_r7]), n = !0);
  18234. }
  18235. e[0] !== t[0] && (_this20.mixinDatacomPage.current = _this20.pageCurrent), _this20.mixinDatacomPage.size = _this20.pageSize, _this20.onMixinDatacomPropsChange(n, s);
  18236. });
  18237. },
  18238. methods: {
  18239. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  18240. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  18241. var _this21 = this;
  18242. var _ref47 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18243. _ref47$getone = _ref47.getone,
  18244. e = _ref47$getone === void 0 ? !1 : _ref47$getone,
  18245. t = _ref47.success,
  18246. n = _ref47.fail;
  18247. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {
  18248. _this21.mixinDatacomLoading = !1;
  18249. var _n$result = n.result,
  18250. s = _n$result.data,
  18251. r = _n$result.count;
  18252. _this21.getcount && (_this21.mixinDatacomPage.count = r), _this21.mixinDatacomHasMore = s.length < _this21.pageSize;
  18253. var i = e ? s.length ? s[0] : void 0 : s;
  18254. _this21.mixinDatacomResData = i, t && t(i);
  18255. }).catch(function (e) {
  18256. _this21.mixinDatacomLoading = !1, _this21.mixinDatacomErrorMessage = e, n && n(e);
  18257. }));
  18258. },
  18259. mixinDatacomGet: function mixinDatacomGet() {
  18260. var _n12;
  18261. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  18262. var n = e.database(this.spaceInfo);
  18263. var s = t.action || this.action;
  18264. s && (n = n.action(s));
  18265. var r = t.collection || this.collection;
  18266. n = Array.isArray(r) ? (_n12 = n).collection.apply(_n12, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  18267. var i = t.where || this.where;
  18268. i && Object.keys(i).length && (n = n.where(i));
  18269. var o = t.field || this.field;
  18270. o && (n = n.field(o));
  18271. var a = t.foreignKey || this.foreignKey;
  18272. a && (n = n.foreignKey(a));
  18273. var c = t.groupby || this.groupby;
  18274. c && (n = n.groupBy(c));
  18275. var u = t.groupField || this.groupField;
  18276. u && (n = n.groupField(u));
  18277. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  18278. var h = t.orderby || this.orderby;
  18279. h && (n = n.orderBy(h));
  18280. var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  18281. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  18282. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  18283. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  18284. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  18285. m = {
  18286. getCount: p
  18287. },
  18288. y = {
  18289. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  18290. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  18291. };
  18292. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;
  18293. }
  18294. }
  18295. };
  18296. }
  18297. function ks(e) {
  18298. return function (t) {
  18299. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  18300. n = function (e) {
  18301. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  18302. return e.customUI = t.customUI || e.customUI, e.parseSystemError = t.parseSystemError || e.parseSystemError, Object.assign(e.loadingOptions, t.loadingOptions), Object.assign(e.errorOptions, t.errorOptions), "object" == (0, _typeof2.default)(t.secretMethods) && (e.secretMethods = t.secretMethods), e;
  18303. }({
  18304. customUI: !1,
  18305. loadingOptions: {
  18306. title: "加载中...",
  18307. mask: !0
  18308. },
  18309. errorOptions: {
  18310. type: "modal",
  18311. retry: !1
  18312. }
  18313. }, n);
  18314. var _n13 = n,
  18315. s = _n13.customUI,
  18316. r = _n13.loadingOptions,
  18317. i = _n13.errorOptions,
  18318. o = _n13.parseSystemError,
  18319. a = !s;
  18320. return new Proxy({}, {
  18321. get: function get(s, c) {
  18322. return function () {
  18323. var _ref48 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18324. e = _ref48.fn,
  18325. t = _ref48.interceptorName,
  18326. n = _ref48.getCallbackArgs;
  18327. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  18328. var _len2,
  18329. s,
  18330. _key2,
  18331. r,
  18332. i,
  18333. o,
  18334. _args = arguments;
  18335. return _regenerator.default.wrap(function _callee50$(_context50) {
  18336. while (1) {
  18337. switch (_context50.prev = _context50.next) {
  18338. case 0:
  18339. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  18340. s[_key2] = _args[_key2];
  18341. }
  18342. r = n ? n({
  18343. params: s
  18344. }) : {};
  18345. _context50.prev = 2;
  18346. _context50.next = 5;
  18347. return M(K(t, "invoke"), _objectSpread({}, r));
  18348. case 5:
  18349. _context50.next = 7;
  18350. return e.apply(void 0, s);
  18351. case 7:
  18352. i = _context50.sent;
  18353. _context50.next = 10;
  18354. return M(K(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  18355. result: i
  18356. }));
  18357. case 10:
  18358. return _context50.abrupt("return", i);
  18359. case 13:
  18360. _context50.prev = 13;
  18361. _context50.t0 = _context50["catch"](2);
  18362. o = _context50.t0;
  18363. _context50.next = 18;
  18364. return M(K(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  18365. error: o
  18366. }));
  18367. case 18:
  18368. throw o;
  18369. case 19:
  18370. _context50.prev = 19;
  18371. _context50.next = 22;
  18372. return M(K(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  18373. error: o
  18374. }) : _objectSpread(_objectSpread({}, r), {}, {
  18375. result: i
  18376. }));
  18377. case 22:
  18378. return _context50.finish(19);
  18379. case 23:
  18380. case "end":
  18381. return _context50.stop();
  18382. }
  18383. }
  18384. }, _callee50, null, [[2, 13, 19, 23]]);
  18385. }));
  18386. }({
  18387. fn: function () {
  18388. var _s14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  18389. var l,
  18390. _len3,
  18391. u,
  18392. _key3,
  18393. d,
  18394. p,
  18395. _ref50,
  18396. f,
  18397. g,
  18398. m,
  18399. y,
  18400. _e26,
  18401. _yield,
  18402. _t18,
  18403. _n14,
  18404. _args4 = arguments;
  18405. return _regenerator.default.wrap(function _callee52$(_context52) {
  18406. while (1) {
  18407. switch (_context52.prev = _context52.next) {
  18408. case 0:
  18409. a && uni.showLoading({
  18410. title: r.title,
  18411. mask: r.mask
  18412. });
  18413. for (_len3 = _args4.length, u = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  18414. u[_key3] = _args4[_key3];
  18415. }
  18416. d = {
  18417. name: t,
  18418. type: h,
  18419. data: {
  18420. method: c,
  18421. params: u
  18422. }
  18423. };
  18424. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  18425. var n = t.data.method,
  18426. s = e.secretMethods || {},
  18427. r = s[n] || s["*"];
  18428. r && (t.secretType = r);
  18429. }(n, d);
  18430. p = !1;
  18431. _context52.prev = 5;
  18432. _context52.next = 8;
  18433. return e.callFunction(d);
  18434. case 8:
  18435. l = _context52.sent;
  18436. _context52.next = 14;
  18437. break;
  18438. case 11:
  18439. _context52.prev = 11;
  18440. _context52.t0 = _context52["catch"](5);
  18441. p = !0, l = {
  18442. result: new se(_context52.t0)
  18443. };
  18444. case 14:
  18445. _ref50 = l.result || {}, f = _ref50.errSubject, g = _ref50.errCode, m = _ref50.errMsg, y = _ref50.newToken;
  18446. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (oe(y), X(z, _objectSpread({}, y))), g)) {
  18447. _context52.next = 39;
  18448. break;
  18449. }
  18450. _e26 = m;
  18451. if (!(p && o)) {
  18452. _context52.next = 24;
  18453. break;
  18454. }
  18455. _context52.next = 20;
  18456. return o({
  18457. objectName: t,
  18458. methodName: c,
  18459. params: u,
  18460. errSubject: f,
  18461. errCode: g,
  18462. errMsg: m
  18463. });
  18464. case 20:
  18465. _context52.t1 = _context52.sent.errMsg;
  18466. if (_context52.t1) {
  18467. _context52.next = 23;
  18468. break;
  18469. }
  18470. _context52.t1 = m;
  18471. case 23:
  18472. _e26 = _context52.t1;
  18473. case 24:
  18474. if (!a) {
  18475. _context52.next = 37;
  18476. break;
  18477. }
  18478. if (!("toast" === i.type)) {
  18479. _context52.next = 29;
  18480. break;
  18481. }
  18482. uni.showToast({
  18483. title: _e26,
  18484. icon: "none"
  18485. });
  18486. _context52.next = 37;
  18487. break;
  18488. case 29:
  18489. if (!("modal" !== i.type)) {
  18490. _context52.next = 31;
  18491. break;
  18492. }
  18493. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  18494. case 31:
  18495. _context52.next = 33;
  18496. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51() {
  18497. var _ref52,
  18498. e,
  18499. t,
  18500. n,
  18501. s,
  18502. r,
  18503. _args2 = arguments;
  18504. return _regenerator.default.wrap(function _callee51$(_context51) {
  18505. while (1) {
  18506. switch (_context51.prev = _context51.next) {
  18507. case 0:
  18508. _ref52 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref52.title, t = _ref52.content, n = _ref52.showCancel, s = _ref52.cancelText, r = _ref52.confirmText;
  18509. return _context51.abrupt("return", new Promise(function (i, o) {
  18510. uni.showModal({
  18511. title: e,
  18512. content: t,
  18513. showCancel: n,
  18514. cancelText: s,
  18515. confirmText: r,
  18516. success: function success(e) {
  18517. i(e);
  18518. },
  18519. fail: function fail() {
  18520. i({
  18521. confirm: !1,
  18522. cancel: !0
  18523. });
  18524. }
  18525. });
  18526. }));
  18527. case 2:
  18528. case "end":
  18529. return _context51.stop();
  18530. }
  18531. }
  18532. }, _callee51);
  18533. }))({
  18534. title: "提示",
  18535. content: _e26,
  18536. showCancel: i.retry,
  18537. cancelText: "取消",
  18538. confirmText: i.retry ? "重试" : "确定"
  18539. });
  18540. case 33:
  18541. _yield = _context52.sent;
  18542. _t18 = _yield.confirm;
  18543. if (!(i.retry && _t18)) {
  18544. _context52.next = 37;
  18545. break;
  18546. }
  18547. return _context52.abrupt("return", s.apply(void 0, u));
  18548. case 37:
  18549. _n14 = new se({
  18550. subject: f,
  18551. code: g,
  18552. message: m,
  18553. requestId: l.requestId
  18554. });
  18555. throw _n14.detail = l.result, X($, {
  18556. type: G,
  18557. content: _n14
  18558. }), _n14;
  18559. case 39:
  18560. return _context52.abrupt("return", (X($, {
  18561. type: G,
  18562. content: l.result
  18563. }), l.result));
  18564. case 40:
  18565. case "end":
  18566. return _context52.stop();
  18567. }
  18568. }
  18569. }, _callee52, null, [[5, 11]]);
  18570. }));
  18571. function s() {
  18572. return _s14.apply(this, arguments);
  18573. }
  18574. return s;
  18575. }(),
  18576. interceptorName: "callObject",
  18577. getCallbackArgs: function getCallbackArgs() {
  18578. var _ref53 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18579. e = _ref53.params;
  18580. return {
  18581. objectName: t,
  18582. methodName: c,
  18583. params: e
  18584. };
  18585. }
  18586. });
  18587. }
  18588. });
  18589. };
  18590. }
  18591. function Ts(e) {
  18592. return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  18593. }
  18594. function Cs() {
  18595. return _Cs.apply(this, arguments);
  18596. }
  18597. function _Cs() {
  18598. _Cs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  18599. var _ref65,
  18600. e,
  18601. _ref65$callLoginByWei,
  18602. t,
  18603. n,
  18604. s,
  18605. r,
  18606. _args7 = arguments;
  18607. return _regenerator.default.wrap(function _callee55$(_context55) {
  18608. while (1) {
  18609. switch (_context55.prev = _context55.next) {
  18610. case 0:
  18611. _ref65 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref65.openid, _ref65$callLoginByWei = _ref65.callLoginByWeixin, t = _ref65$callLoginByWei === void 0 ? !1 : _ref65$callLoginByWei;
  18612. n = Ts(this);
  18613. if (!("mp-weixin" !== A)) {
  18614. _context55.next = 4;
  18615. break;
  18616. }
  18617. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(A, "`"));
  18618. case 4:
  18619. if (!(e && t)) {
  18620. _context55.next = 6;
  18621. break;
  18622. }
  18623. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  18624. case 6:
  18625. if (!e) {
  18626. _context55.next = 8;
  18627. break;
  18628. }
  18629. return _context55.abrupt("return", (n.mpWeixinOpenid = e, {}));
  18630. case 8:
  18631. _context55.next = 10;
  18632. return new Promise(function (e, t) {
  18633. uni.login({
  18634. success: function success(t) {
  18635. e(t.code);
  18636. },
  18637. fail: function fail(e) {
  18638. t(new Error(e.errMsg));
  18639. }
  18640. });
  18641. });
  18642. case 10:
  18643. s = _context55.sent;
  18644. r = this.importObject("uni-id-co", {
  18645. customUI: !0
  18646. });
  18647. _context55.next = 14;
  18648. return r.secureNetworkHandshakeByWeixin({
  18649. code: s,
  18650. callLoginByWeixin: t
  18651. });
  18652. case 14:
  18653. n.mpWeixinCode = s;
  18654. return _context55.abrupt("return", {
  18655. code: s
  18656. });
  18657. case 16:
  18658. case "end":
  18659. return _context55.stop();
  18660. }
  18661. }
  18662. }, _callee55, this);
  18663. }));
  18664. return _Cs.apply(this, arguments);
  18665. }
  18666. function Ps(_x37) {
  18667. return _Ps.apply(this, arguments);
  18668. }
  18669. function _Ps() {
  18670. _Ps = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56(e) {
  18671. var t;
  18672. return _regenerator.default.wrap(function _callee56$(_context56) {
  18673. while (1) {
  18674. switch (_context56.prev = _context56.next) {
  18675. case 0:
  18676. t = Ts(this);
  18677. return _context56.abrupt("return", (t.initPromise || (t.initPromise = Cs.call(this, e)), t.initPromise));
  18678. case 2:
  18679. case "end":
  18680. return _context56.stop();
  18681. }
  18682. }
  18683. }, _callee56, this);
  18684. }));
  18685. return _Ps.apply(this, arguments);
  18686. }
  18687. function As(e) {
  18688. return function () {
  18689. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18690. t = _ref54.openid,
  18691. _ref54$callLoginByWei = _ref54.callLoginByWeixin,
  18692. n = _ref54$callLoginByWei === void 0 ? !1 : _ref54$callLoginByWei;
  18693. return Ps.call(e, {
  18694. openid: t,
  18695. callLoginByWeixin: n
  18696. });
  18697. };
  18698. }
  18699. var Es = /*#__PURE__*/function (_ref55) {
  18700. (0, _inherits2.default)(Es, _ref55);
  18701. var _super12 = _createSuper(Es);
  18702. function Es() {
  18703. var _this22;
  18704. (0, _classCallCheck2.default)(this, Es);
  18705. _this22 = _super12.call(this), _this22._uniPushMessageCallback = _this22._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this22)), _this22._currentMessageId = -1, _this22._payloadQueue = [];
  18706. return _this22;
  18707. }
  18708. (0, _createClass2.default)(Es, [{
  18709. key: "init",
  18710. value: function init() {
  18711. var _this23 = this;
  18712. return Promise.all([I("getSystemInfo")(), I("getPushClientId")()]).then(function () {
  18713. var _ref56 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  18714. _ref57 = (0, _slicedToArray2.default)(_ref56, 2),
  18715. _ref57$ = _ref57[0];
  18716. _ref57$ = _ref57$ === void 0 ? {} : _ref57$;
  18717. var e = _ref57$.appId,
  18718. _ref57$2 = _ref57[1];
  18719. _ref57$2 = _ref57$2 === void 0 ? {} : _ref57$2;
  18720. var t = _ref57$2.cid;
  18721. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  18722. if (!t) throw new Error("Invalid push client id");
  18723. _this23._appId = e, _this23._pushClientId = t, _this23._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this23.emit("open"), _this23._initMessageListener();
  18724. }, function (e) {
  18725. throw _this23.emit("error", e), _this23.close(), e;
  18726. });
  18727. }
  18728. }, {
  18729. key: "open",
  18730. value: function () {
  18731. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  18732. return _regenerator.default.wrap(function _callee53$(_context53) {
  18733. while (1) {
  18734. switch (_context53.prev = _context53.next) {
  18735. case 0:
  18736. return _context53.abrupt("return", this.init());
  18737. case 1:
  18738. case "end":
  18739. return _context53.stop();
  18740. }
  18741. }
  18742. }, _callee53, this);
  18743. }));
  18744. function open() {
  18745. return _open.apply(this, arguments);
  18746. }
  18747. return open;
  18748. }()
  18749. }, {
  18750. key: "_isUniCloudSSE",
  18751. value: function _isUniCloudSSE(e) {
  18752. if ("receive" !== e.type) return !1;
  18753. var t = e && e.data && e.data.payload;
  18754. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  18755. }
  18756. }, {
  18757. key: "_receivePushMessage",
  18758. value: function _receivePushMessage(e) {
  18759. if (!this._isUniCloudSSE(e)) return;
  18760. var t = e && e.data && e.data.payload,
  18761. n = t.action,
  18762. s = t.messageId,
  18763. r = t.message;
  18764. this._payloadQueue.push({
  18765. action: n,
  18766. messageId: s,
  18767. message: r
  18768. }), this._consumMessage();
  18769. }
  18770. }, {
  18771. key: "_consumMessage",
  18772. value: function _consumMessage() {
  18773. var _this24 = this;
  18774. for (;;) {
  18775. var _e27 = this._payloadQueue.find(function (e) {
  18776. return e.messageId === _this24._currentMessageId + 1;
  18777. });
  18778. if (!_e27) break;
  18779. this._currentMessageId++, this._parseMessagePayload(_e27);
  18780. }
  18781. }
  18782. }, {
  18783. key: "_parseMessagePayload",
  18784. value: function _parseMessagePayload(e) {
  18785. var t = e.action,
  18786. n = e.messageId,
  18787. s = e.message;
  18788. "end" === t ? this._end({
  18789. messageId: n,
  18790. message: s
  18791. }) : "message" === t && this._appendMessage({
  18792. messageId: n,
  18793. message: s
  18794. });
  18795. }
  18796. }, {
  18797. key: "_appendMessage",
  18798. value: function _appendMessage() {
  18799. var _ref58 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18800. e = _ref58.messageId,
  18801. t = _ref58.message;
  18802. this.emit("message", t);
  18803. }
  18804. }, {
  18805. key: "_end",
  18806. value: function _end() {
  18807. var _ref59 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18808. e = _ref59.messageId,
  18809. t = _ref59.message;
  18810. this.emit("end", t), this.close();
  18811. }
  18812. }, {
  18813. key: "_initMessageListener",
  18814. value: function _initMessageListener() {
  18815. uni.onPushMessage(this._uniPushMessageCallback);
  18816. }
  18817. }, {
  18818. key: "_destroy",
  18819. value: function _destroy() {
  18820. uni.offPushMessage(this._uniPushMessageCallback);
  18821. }
  18822. }, {
  18823. key: "toJSON",
  18824. value: function toJSON() {
  18825. return {
  18826. appId: this._appId,
  18827. pushClientId: this._pushClientId,
  18828. seqId: this._seqId
  18829. };
  18830. }
  18831. }, {
  18832. key: "close",
  18833. value: function close() {
  18834. this._destroy(), this.emit("close");
  18835. }
  18836. }]);
  18837. return Es;
  18838. }( /*#__PURE__*/function () {
  18839. function _class6() {
  18840. (0, _classCallCheck2.default)(this, _class6);
  18841. this._callback = {};
  18842. }
  18843. (0, _createClass2.default)(_class6, [{
  18844. key: "addListener",
  18845. value: function addListener(e, t) {
  18846. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  18847. }
  18848. }, {
  18849. key: "on",
  18850. value: function on(e, t) {
  18851. return this.addListener(e, t);
  18852. }
  18853. }, {
  18854. key: "removeListener",
  18855. value: function removeListener(e, t) {
  18856. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  18857. var n = this._callback[e];
  18858. if (!n) return;
  18859. var s = function (e, t) {
  18860. for (var _n15 = e.length - 1; _n15 >= 0; _n15--) {
  18861. if (e[_n15] === t) return _n15;
  18862. }
  18863. return -1;
  18864. }(n, t);
  18865. n.splice(s, 1);
  18866. }
  18867. }, {
  18868. key: "off",
  18869. value: function off(e, t) {
  18870. return this.removeListener(e, t);
  18871. }
  18872. }, {
  18873. key: "removeAllListener",
  18874. value: function removeAllListener(e) {
  18875. delete this._callback[e];
  18876. }
  18877. }, {
  18878. key: "emit",
  18879. value: function emit(e) {
  18880. var n = this._callback[e];
  18881. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  18882. t[_key4 - 1] = arguments[_key4];
  18883. }
  18884. if (n) for (var _e28 = 0; _e28 < n.length; _e28++) {
  18885. n[_e28].apply(n, t);
  18886. }
  18887. }
  18888. }]);
  18889. return _class6;
  18890. }());
  18891. function Os(_x38, _x39) {
  18892. return _Os.apply(this, arguments);
  18893. }
  18894. function _Os() {
  18895. _Os = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57(e, t) {
  18896. var n, _e32, s;
  18897. return _regenerator.default.wrap(function _callee57$(_context57) {
  18898. while (1) {
  18899. switch (_context57.prev = _context57.next) {
  18900. case 0:
  18901. n = "http://".concat(e, ":").concat(t, "/system/ping");
  18902. _context57.prev = 1;
  18903. _context57.next = 4;
  18904. return s = {
  18905. url: n,
  18906. timeout: 500
  18907. }, new Promise(function (e, t) {
  18908. re.request(_objectSpread(_objectSpread({}, s), {}, {
  18909. success: function success(t) {
  18910. e(t);
  18911. },
  18912. fail: function fail(e) {
  18913. t(e);
  18914. }
  18915. }));
  18916. });
  18917. case 4:
  18918. _e32 = _context57.sent;
  18919. return _context57.abrupt("return", !(!_e32.data || 0 !== _e32.data.code));
  18920. case 8:
  18921. _context57.prev = 8;
  18922. _context57.t0 = _context57["catch"](1);
  18923. return _context57.abrupt("return", !1);
  18924. case 11:
  18925. case "end":
  18926. return _context57.stop();
  18927. }
  18928. }
  18929. }, _callee57, null, [[1, 8]]);
  18930. }));
  18931. return _Os.apply(this, arguments);
  18932. }
  18933. function xs(_x40) {
  18934. return _xs.apply(this, arguments);
  18935. }
  18936. function _xs() {
  18937. _xs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e) {
  18938. var _ue2, _e33, _t20, t, _t$debugInfo, n, s, _yield2, r, i, o;
  18939. return _regenerator.default.wrap(function _callee59$(_context59) {
  18940. while (1) {
  18941. switch (_context59.prev = _context59.next) {
  18942. case 0:
  18943. if (k) {
  18944. _context59.next = 2;
  18945. break;
  18946. }
  18947. return _context59.abrupt("return", Promise.resolve());
  18948. case 2:
  18949. if ("app" === A) {
  18950. _ue2 = ue(), _e33 = _ue2.osName, _t20 = _ue2.osVersion;
  18951. "ios" === _e33 && function (e) {
  18952. if (!e || "string" != typeof e) return 0;
  18953. var t = e.match(/^(\d+)./);
  18954. return t && t[1] ? parseInt(t[1]) : 0;
  18955. }(_t20) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");
  18956. }
  18957. t = e.__dev__;
  18958. if (t.debugInfo) {
  18959. _context59.next = 6;
  18960. break;
  18961. }
  18962. return _context59.abrupt("return");
  18963. case 6:
  18964. _t$debugInfo = t.debugInfo;
  18965. n = _t$debugInfo.address;
  18966. s = _t$debugInfo.servePort;
  18967. _context59.next = 11;
  18968. return function () {
  18969. var _ref66 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58(e, t) {
  18970. var n, _s15, _r8;
  18971. return _regenerator.default.wrap(function _callee58$(_context58) {
  18972. while (1) {
  18973. switch (_context58.prev = _context58.next) {
  18974. case 0:
  18975. _s15 = 0;
  18976. case 1:
  18977. if (!(_s15 < e.length)) {
  18978. _context58.next = 11;
  18979. break;
  18980. }
  18981. _r8 = e[_s15];
  18982. _context58.next = 5;
  18983. return Os(_r8, t);
  18984. case 5:
  18985. if (!_context58.sent) {
  18986. _context58.next = 8;
  18987. break;
  18988. }
  18989. n = _r8;
  18990. return _context58.abrupt("break", 11);
  18991. case 8:
  18992. _s15++;
  18993. _context58.next = 1;
  18994. break;
  18995. case 11:
  18996. return _context58.abrupt("return", {
  18997. address: n,
  18998. port: t
  18999. });
  19000. case 12:
  19001. case "end":
  19002. return _context58.stop();
  19003. }
  19004. }
  19005. }, _callee58);
  19006. }));
  19007. return function (_x41, _x42) {
  19008. return _ref66.apply(this, arguments);
  19009. };
  19010. }()(n, s);
  19011. case 11:
  19012. _yield2 = _context59.sent;
  19013. r = _yield2.address;
  19014. if (!r) {
  19015. _context59.next = 15;
  19016. break;
  19017. }
  19018. return _context59.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  19019. case 15:
  19020. i = console["app" === A ? "error" : "warn"];
  19021. o = "";
  19022. if (!("remote" === t.debugInfo.initialLaunchType ? (t.debugInfo.forceRemote = !0, o = "当前客户端和HBuilderX不在同一局域网下(或其他网络原因无法连接HBuilderX),uniCloud本地调试服务不对当前客户端生效。\n- 如果不使用uniCloud本地调试服务,请直接忽略此信息。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。") : o = "无法连接uniCloud本地调试服务,请检查当前客户端是否与主机在同一局域网下。\n- 如需使用uniCloud本地调试服务,请将客户端与主机连接到同一局域网下并重新运行到客户端。", o += "\n- 如果在HBuilderX开启的状态下切换过网络环境,请重启HBuilderX后再试\n- 检查系统防火墙是否拦截了HBuilderX自带的nodejs\n- 检查是否错误的使用拦截器修改uni.request方法的参数", "web" === A && (o += "\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"), 0 === A.indexOf("mp-") && (o += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t.debugInfo.forceRemote)) {
  19023. _context59.next = 19;
  19024. break;
  19025. }
  19026. throw new Error(o);
  19027. case 19:
  19028. i(o);
  19029. case 20:
  19030. case "end":
  19031. return _context59.stop();
  19032. }
  19033. }
  19034. }, _callee59);
  19035. }));
  19036. return _xs.apply(this, arguments);
  19037. }
  19038. function Rs(e) {
  19039. e._initPromiseHub || (e._initPromiseHub = new S({
  19040. createPromise: function createPromise() {
  19041. var t = Promise.resolve();
  19042. var n;
  19043. n = 1, t = new Promise(function (e) {
  19044. setTimeout(function () {
  19045. e();
  19046. }, n);
  19047. });
  19048. var s = e.auth();
  19049. return t.then(function () {
  19050. return s.getLoginState();
  19051. }).then(function (e) {
  19052. return e ? Promise.resolve() : s.signInAnonymously();
  19053. });
  19054. }
  19055. }));
  19056. }
  19057. var Us = {
  19058. tcb: It,
  19059. tencent: It,
  19060. aliyun: me,
  19061. private: kt
  19062. };
  19063. var Ls = new ( /*#__PURE__*/function () {
  19064. function _class7() {
  19065. (0, _classCallCheck2.default)(this, _class7);
  19066. }
  19067. (0, _createClass2.default)(_class7, [{
  19068. key: "init",
  19069. value: function init(e) {
  19070. var t = {};
  19071. var n = Us[e.provider];
  19072. if (!n) throw new Error("未提供正确的provider参数");
  19073. t = n.init(e), k && function (e) {
  19074. if (!k) return;
  19075. var t = {};
  19076. e.__dev__ = t, t.debugLog = k && ("web" === A && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === A);
  19077. var n = E;
  19078. n && !n.code && (t.debugInfo = n);
  19079. var s = new S({
  19080. createPromise: function createPromise() {
  19081. return xs(e);
  19082. }
  19083. });
  19084. t.initLocalNetwork = function () {
  19085. return s.exec();
  19086. };
  19087. }(t), Rs(t), Rn(t), function (e) {
  19088. var t = e.uploadFile;
  19089. e.uploadFile = function (e) {
  19090. return t.call(this, e);
  19091. };
  19092. }(t), function (e) {
  19093. e.database = function (t) {
  19094. if (t && Object.keys(t).length > 0) return e.init(t).database();
  19095. if (this._database) return this._database;
  19096. var n = $n(Wn, {
  19097. uniClient: e
  19098. });
  19099. return this._database = n, n;
  19100. }, e.databaseForJQL = function (t) {
  19101. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  19102. if (this._databaseForJQL) return this._databaseForJQL;
  19103. var n = $n(Wn, {
  19104. uniClient: e,
  19105. isJQL: !0
  19106. });
  19107. return this._databaseForJQL = n, n;
  19108. };
  19109. }(t), function (e) {
  19110. e.getCurrentUserInfo = ws, e.chooseAndUploadFile = Ss.initChooseAndUploadFile(e), Object.assign(e, {
  19111. get mixinDatacom() {
  19112. return bs(e);
  19113. }
  19114. }), e.SSEChannel = Es, e.initSecureNetworkByWeixin = As(e), e.importObject = ks(e);
  19115. }(t);
  19116. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  19117. if (!t[e]) return;
  19118. var n = t[e];
  19119. t[e] = function () {
  19120. return n.apply(t, Array.from(arguments));
  19121. }, t[e] = function (e, t) {
  19122. return function (n) {
  19123. var _this25 = this;
  19124. var s = !1;
  19125. if ("callFunction" === t) {
  19126. var _e29 = n && n.type || u;
  19127. s = _e29 !== u;
  19128. }
  19129. var r = "callFunction" === t && !s,
  19130. i = this._initPromiseHub.exec();
  19131. n = n || {};
  19132. var _ne2 = ne(n),
  19133. o = _ne2.success,
  19134. a = _ne2.fail,
  19135. c = _ne2.complete,
  19136. h = i.then(function () {
  19137. return s ? Promise.resolve() : M(K(t, "invoke"), n);
  19138. }).then(function () {
  19139. return e.call(_this25, n);
  19140. }).then(function (e) {
  19141. return s ? Promise.resolve(e) : M(K(t, "success"), e).then(function () {
  19142. return M(K(t, "complete"), e);
  19143. }).then(function () {
  19144. return r && X($, {
  19145. type: H,
  19146. content: e
  19147. }), Promise.resolve(e);
  19148. });
  19149. }, function (e) {
  19150. return s ? Promise.reject(e) : M(K(t, "fail"), e).then(function () {
  19151. return M(K(t, "complete"), e);
  19152. }).then(function () {
  19153. return X($, {
  19154. type: H,
  19155. content: e
  19156. }), Promise.reject(e);
  19157. });
  19158. });
  19159. if (!(o || a || c)) return h;
  19160. h.then(function (e) {
  19161. o && o(e), c && c(e), r && X($, {
  19162. type: H,
  19163. content: e
  19164. });
  19165. }, function (e) {
  19166. a && a(e), c && c(e), r && X($, {
  19167. type: H,
  19168. content: e
  19169. });
  19170. });
  19171. };
  19172. }(t[e], e).bind(t);
  19173. }), t.init = this.init, t;
  19174. }
  19175. }]);
  19176. return _class7;
  19177. }())();
  19178. (function () {
  19179. var e = O;
  19180. var t = {};
  19181. if (e && 1 === e.length) t = e[0], Ls = Ls.init(t), Ls._isDefault = !0;else {
  19182. var _t19 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  19183. var _n16;
  19184. _n16 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : x ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t19.forEach(function (e) {
  19185. Ls[e] = function () {
  19186. return console.error(_n16), Promise.reject(new se({
  19187. code: "SYS_ERR",
  19188. message: _n16
  19189. }));
  19190. };
  19191. });
  19192. }
  19193. Object.assign(Ls, {
  19194. get mixinDatacom() {
  19195. return bs(Ls);
  19196. }
  19197. }), gs(Ls), Ls.addInterceptor = F, Ls.removeInterceptor = q, Ls.interceptObject = j, k && "web" === A && (window.uniCloud = Ls);
  19198. })();
  19199. var Ns = Ls;
  19200. exports.default = Ns;
  19201. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3), __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  19202. /***/ }),
  19203. /***/ 395:
  19204. /*!****************************************************************!*\
  19205. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  19206. \****************************************************************/
  19207. /*! no static exports found */
  19208. /***/ (function(module, exports, __webpack_require__) {
  19209. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 378);
  19210. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  19211. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 396);
  19212. var construct = __webpack_require__(/*! ./construct.js */ 15);
  19213. function _wrapNativeSuper(Class) {
  19214. var _cache = typeof Map === "function" ? new Map() : undefined;
  19215. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  19216. if (Class === null || !isNativeFunction(Class)) return Class;
  19217. if (typeof Class !== "function") {
  19218. throw new TypeError("Super expression must either be null or a function");
  19219. }
  19220. if (typeof _cache !== "undefined") {
  19221. if (_cache.has(Class)) return _cache.get(Class);
  19222. _cache.set(Class, Wrapper);
  19223. }
  19224. function Wrapper() {
  19225. return construct(Class, arguments, getPrototypeOf(this).constructor);
  19226. }
  19227. Wrapper.prototype = Object.create(Class.prototype, {
  19228. constructor: {
  19229. value: Wrapper,
  19230. enumerable: false,
  19231. writable: true,
  19232. configurable: true
  19233. }
  19234. });
  19235. return setPrototypeOf(Wrapper, Class);
  19236. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19237. return _wrapNativeSuper(Class);
  19238. }
  19239. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19240. /***/ }),
  19241. /***/ 396:
  19242. /*!*****************************************************************!*\
  19243. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  19244. \*****************************************************************/
  19245. /*! no static exports found */
  19246. /***/ (function(module, exports) {
  19247. function _isNativeFunction(fn) {
  19248. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  19249. }
  19250. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19251. /***/ }),
  19252. /***/ 397:
  19253. /*!*******************************************************************!*\
  19254. !*** E:/项目资料/智慧社区/Applet/pages.json?{"type":"origin-pages-json"} ***!
  19255. \*******************************************************************/
  19256. /*! no static exports found */
  19257. /***/ (function(module, exports, __webpack_require__) {
  19258. "use strict";
  19259. Object.defineProperty(exports, "__esModule", {
  19260. value: true
  19261. });
  19262. exports.default = void 0;
  19263. var _default = {
  19264. "pages": [{
  19265. "path": "pages/index/index",
  19266. "style": {
  19267. "navigationBarTitleText": "首页"
  19268. }
  19269. }, {
  19270. "path": "pages/my/index",
  19271. "style": {
  19272. "navigationBarTitleText": "个人中心"
  19273. }
  19274. }, {
  19275. "path": "pages/service/index",
  19276. "style": {
  19277. "navigationBarTitleText": "政务服务"
  19278. }
  19279. }, {
  19280. "path": "pages/policy/index",
  19281. "style": {
  19282. "navigationBarTitleText": "风采展示",
  19283. "enablePullDownRefresh": true
  19284. }
  19285. }, {
  19286. "path": "pages/illness/index",
  19287. "style": {
  19288. "navigationBarTitleText": "关爱行动"
  19289. }
  19290. }, {
  19291. "path": "pages/illness/vaccines",
  19292. "style": {
  19293. "navigationBarTitleText": "疫苗接种点"
  19294. }
  19295. }, {
  19296. "path": "pages/illness/receive",
  19297. "style": {
  19298. "navigationBarTitleText": "家庭成员"
  19299. }
  19300. }, {
  19301. "path": "pages/illness/testingRoom",
  19302. "style": {
  19303. "navigationBarTitleText": "检测点查询"
  19304. }
  19305. }, {
  19306. "path": "pages/illness/testingRoomList",
  19307. "style": {
  19308. "navigationBarTitleText": "检测点列表"
  19309. }
  19310. }, {
  19311. "path": "pages/details/index",
  19312. "style": {
  19313. "navigationBarTitleText": "文章详情"
  19314. }
  19315. }, {
  19316. "path": "pages/details/cmsinfo",
  19317. "style": {
  19318. "navigationBarTitleText": "详情",
  19319. "navigationStyle": "custom"
  19320. }
  19321. }, {
  19322. "path": "pages/notice/index",
  19323. "style": {
  19324. "navigationBarTitleText": "通知公告"
  19325. }
  19326. }, {
  19327. "path": "pages/user/index",
  19328. "style": {
  19329. "navigationBarTitleText": "个人资料"
  19330. }
  19331. }, {
  19332. "path": "pages/user/familyInfo",
  19333. "style": {
  19334. "navigationBarTitleText": "成员资料"
  19335. }
  19336. }, {
  19337. "path": "pages/register/index",
  19338. "style": {
  19339. "navigationBarTitleText": "注册用户"
  19340. }
  19341. }, {
  19342. "path": "pages/questionnaire/index",
  19343. "style": {
  19344. "navigationBarTitleText": "问卷调查"
  19345. }
  19346. }, {
  19347. "path": "pages/questionnaire/details",
  19348. "style": {
  19349. "navigationBarTitleText": "问卷调查详情"
  19350. }
  19351. }, {
  19352. "path": "pages/questionnaire/web",
  19353. "style": {
  19354. "navigationBarTitleText": "问卷调查"
  19355. }
  19356. }, {
  19357. "path": "pages/integral/index",
  19358. "style": {
  19359. "navigationBarTitleText": "我的积分"
  19360. }
  19361. }, {
  19362. "path": "pages/activity/index",
  19363. "style": {
  19364. "navigationBarTitleText": "活动列表"
  19365. }
  19366. }, {
  19367. "path": "pages/activity/details",
  19368. "style": {
  19369. "navigationBarTitleText": "活动详情"
  19370. }
  19371. }, {
  19372. "path": "pages/activity/uploadFiel",
  19373. "style": {
  19374. "navigationBarTitleText": "获取积分"
  19375. }
  19376. }, {
  19377. "path": "pages/property/index",
  19378. "style": {
  19379. "navigationBarTitleText": "红色物业"
  19380. }
  19381. }, {
  19382. "path": "pages/property/butlerType",
  19383. "style": {
  19384. "navigationBarTitleText": "红管家风采展示"
  19385. }
  19386. }, {
  19387. "path": "pages/property/butler",
  19388. "style": {
  19389. "navigationBarTitleText": "红管家风采展示"
  19390. }
  19391. }, {
  19392. "path": "pages/report/index",
  19393. "style": {
  19394. "navigationBarTitleText": "下沉干部报到"
  19395. }
  19396. }, {
  19397. "path": "pages/report/double",
  19398. "style": {
  19399. "navigationBarTitleText": "党员“双报到”"
  19400. }
  19401. }, {
  19402. "path": "pages/report/service",
  19403. "style": {
  19404. "navigationBarTitleText": "服务签到"
  19405. }
  19406. }, {
  19407. "path": "pages/recruit/index",
  19408. "style": {
  19409. "navigationBarTitleText": "应急招募"
  19410. }
  19411. }, {
  19412. "path": "pages/recruit/details",
  19413. "style": {
  19414. "navigationBarTitleText": "招募详情"
  19415. }
  19416. }, {
  19417. "path": "pages/goods/index",
  19418. "style": {
  19419. "navigationBarTitleText": "积分商城"
  19420. }
  19421. }, {
  19422. "path": "pages/goods/details",
  19423. "style": {
  19424. "navigationBarTitleText": "优惠券详情"
  19425. }
  19426. }, {
  19427. "path": "pages/goods/my",
  19428. "style": {
  19429. "navigationBarTitleText": "我的优惠券"
  19430. }
  19431. }],
  19432. "globalStyle": {
  19433. "navigationBarTextStyle": "#fff",
  19434. "navigationBarTitleText": "uni-app",
  19435. "navigationBarBackgroundColor": "#c60814",
  19436. "backgroundColor": "#fff",
  19437. "app-plus": {
  19438. "background": "#efeff4"
  19439. }
  19440. },
  19441. "tabBar": {
  19442. "color": "#7A7E83",
  19443. "selectedColor": "#3cc51f",
  19444. "borderStyle": "black",
  19445. "backgroundColor": "#ffffff",
  19446. "list": [{
  19447. "pagePath": "pages/index/index",
  19448. "iconPath": "static/home1.png",
  19449. "selectedIconPath": "static/home2.png",
  19450. "text": "首页"
  19451. }, {
  19452. "pagePath": "pages/service/index",
  19453. "iconPath": "static/service1.png",
  19454. "selectedIconPath": "static/service2.png",
  19455. "text": "政务服务"
  19456. }, {
  19457. "pagePath": "pages/policy/index",
  19458. "iconPath": "static/policy1.png",
  19459. "selectedIconPath": "static/policy2.png",
  19460. "text": "风采展示"
  19461. }, {
  19462. "pagePath": "pages/my/index",
  19463. "iconPath": "static/user1.png",
  19464. "selectedIconPath": "static/user2.png",
  19465. "text": "我的"
  19466. }]
  19467. }
  19468. };
  19469. exports.default = _default;
  19470. /***/ }),
  19471. /***/ 398:
  19472. /*!******************************************************!*\
  19473. !*** E:/项目资料/智慧社区/Applet/pages.json?{"type":"stat"} ***!
  19474. \******************************************************/
  19475. /*! no static exports found */
  19476. /***/ (function(module, exports, __webpack_require__) {
  19477. "use strict";
  19478. Object.defineProperty(exports, "__esModule", {
  19479. value: true
  19480. });
  19481. exports.default = void 0;
  19482. var _default = {
  19483. "appid": "__UNI__5B783AC"
  19484. };
  19485. exports.default = _default;
  19486. /***/ }),
  19487. /***/ 4:
  19488. /*!**********************************************************************!*\
  19489. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  19490. \**********************************************************************/
  19491. /*! no static exports found */
  19492. /***/ (function(module, exports) {
  19493. function _interopRequireDefault(obj) {
  19494. return obj && obj.__esModule ? obj : {
  19495. "default": obj
  19496. };
  19497. }
  19498. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19499. /***/ }),
  19500. /***/ 40:
  19501. /*!************************************************************************************************!*\
  19502. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  19503. \************************************************************************************************/
  19504. /*! no static exports found */
  19505. /***/ (function(module, exports, __webpack_require__) {
  19506. // TODO(Babel 8): Remove this file.
  19507. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 41)();
  19508. module.exports = runtime;
  19509. /***/ }),
  19510. /***/ 406:
  19511. /*!********************************************************************************************************!*\
  19512. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/index.js ***!
  19513. \********************************************************************************************************/
  19514. /*! no static exports found */
  19515. /***/ (function(module, exports, __webpack_require__) {
  19516. "use strict";
  19517. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  19518. Object.defineProperty(exports, "__esModule", {
  19519. value: true
  19520. });
  19521. exports.default = void 0;
  19522. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 407));
  19523. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 408));
  19524. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 409));
  19525. var _default = {
  19526. en: _en.default,
  19527. 'zh-Hans': _zhHans.default,
  19528. 'zh-Hant': _zhHant.default
  19529. };
  19530. exports.default = _default;
  19531. /***/ }),
  19532. /***/ 407:
  19533. /*!*******************************************************************************************************!*\
  19534. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json ***!
  19535. \*******************************************************************************************************/
  19536. /*! exports provided: uni-datetime-picker.selectDate, uni-datetime-picker.selectTime, uni-datetime-picker.selectDateTime, uni-datetime-picker.startDate, uni-datetime-picker.endDate, uni-datetime-picker.startTime, uni-datetime-picker.endTime, uni-datetime-picker.ok, uni-datetime-picker.clear, uni-datetime-picker.cancel, uni-datetime-picker.year, uni-datetime-picker.month, uni-calender.MON, uni-calender.TUE, uni-calender.WED, uni-calender.THU, uni-calender.FRI, uni-calender.SAT, uni-calender.SUN, uni-calender.confirm, default */
  19537. /***/ (function(module) {
  19538. module.exports = JSON.parse("{\"uni-datetime-picker.selectDate\":\"select date\",\"uni-datetime-picker.selectTime\":\"select time\",\"uni-datetime-picker.selectDateTime\":\"select datetime\",\"uni-datetime-picker.startDate\":\"start date\",\"uni-datetime-picker.endDate\":\"end date\",\"uni-datetime-picker.startTime\":\"start time\",\"uni-datetime-picker.endTime\":\"end time\",\"uni-datetime-picker.ok\":\"ok\",\"uni-datetime-picker.clear\":\"clear\",\"uni-datetime-picker.cancel\":\"cancel\",\"uni-datetime-picker.year\":\"-\",\"uni-datetime-picker.month\":\"\",\"uni-calender.MON\":\"MON\",\"uni-calender.TUE\":\"TUE\",\"uni-calender.WED\":\"WED\",\"uni-calender.THU\":\"THU\",\"uni-calender.FRI\":\"FRI\",\"uni-calender.SAT\":\"SAT\",\"uni-calender.SUN\":\"SUN\",\"uni-calender.confirm\":\"confirm\"}");
  19539. /***/ }),
  19540. /***/ 408:
  19541. /*!************************************************************************************************************!*\
  19542. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hans.json ***!
  19543. \************************************************************************************************************/
  19544. /*! exports provided: uni-datetime-picker.selectDate, uni-datetime-picker.selectTime, uni-datetime-picker.selectDateTime, uni-datetime-picker.startDate, uni-datetime-picker.endDate, uni-datetime-picker.startTime, uni-datetime-picker.endTime, uni-datetime-picker.ok, uni-datetime-picker.clear, uni-datetime-picker.cancel, uni-datetime-picker.year, uni-datetime-picker.month, uni-calender.SUN, uni-calender.MON, uni-calender.TUE, uni-calender.WED, uni-calender.THU, uni-calender.FRI, uni-calender.SAT, uni-calender.confirm, default */
  19545. /***/ (function(module) {
  19546. module.exports = JSON.parse("{\"uni-datetime-picker.selectDate\":\"选择日期\",\"uni-datetime-picker.selectTime\":\"选择时间\",\"uni-datetime-picker.selectDateTime\":\"选择日期时间\",\"uni-datetime-picker.startDate\":\"开始日期\",\"uni-datetime-picker.endDate\":\"结束日期\",\"uni-datetime-picker.startTime\":\"开始时间\",\"uni-datetime-picker.endTime\":\"结束时间\",\"uni-datetime-picker.ok\":\"确定\",\"uni-datetime-picker.clear\":\"清除\",\"uni-datetime-picker.cancel\":\"取消\",\"uni-datetime-picker.year\":\"年\",\"uni-datetime-picker.month\":\"月\",\"uni-calender.SUN\":\"日\",\"uni-calender.MON\":\"一\",\"uni-calender.TUE\":\"二\",\"uni-calender.WED\":\"三\",\"uni-calender.THU\":\"四\",\"uni-calender.FRI\":\"五\",\"uni-calender.SAT\":\"六\",\"uni-calender.confirm\":\"确认\"}");
  19547. /***/ }),
  19548. /***/ 409:
  19549. /*!************************************************************************************************************!*\
  19550. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/zh-Hant.json ***!
  19551. \************************************************************************************************************/
  19552. /*! exports provided: uni-datetime-picker.selectDate, uni-datetime-picker.selectTime, uni-datetime-picker.selectDateTime, uni-datetime-picker.startDate, uni-datetime-picker.endDate, uni-datetime-picker.startTime, uni-datetime-picker.endTime, uni-datetime-picker.ok, uni-datetime-picker.clear, uni-datetime-picker.cancel, uni-datetime-picker.year, uni-datetime-picker.month, uni-calender.SUN, uni-calender.MON, uni-calender.TUE, uni-calender.WED, uni-calender.THU, uni-calender.FRI, uni-calender.SAT, uni-calender.confirm, default */
  19553. /***/ (function(module) {
  19554. module.exports = JSON.parse("{\"uni-datetime-picker.selectDate\":\"選擇日期\",\"uni-datetime-picker.selectTime\":\"選擇時間\",\"uni-datetime-picker.selectDateTime\":\"選擇日期時間\",\"uni-datetime-picker.startDate\":\"開始日期\",\"uni-datetime-picker.endDate\":\"結束日期\",\"uni-datetime-picker.startTime\":\"開始时间\",\"uni-datetime-picker.endTime\":\"結束时间\",\"uni-datetime-picker.ok\":\"確定\",\"uni-datetime-picker.clear\":\"清除\",\"uni-datetime-picker.cancel\":\"取消\",\"uni-datetime-picker.year\":\"年\",\"uni-datetime-picker.month\":\"月\",\"uni-calender.SUN\":\"日\",\"uni-calender.MON\":\"一\",\"uni-calender.TUE\":\"二\",\"uni-calender.WED\":\"三\",\"uni-calender.THU\":\"四\",\"uni-calender.FRI\":\"五\",\"uni-calender.SAT\":\"六\",\"uni-calender.confirm\":\"確認\"}");
  19555. /***/ }),
  19556. /***/ 41:
  19557. /*!*******************************************************************!*\
  19558. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  19559. \*******************************************************************/
  19560. /*! no static exports found */
  19561. /***/ (function(module, exports, __webpack_require__) {
  19562. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  19563. function _regeneratorRuntime() {
  19564. "use strict";
  19565. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  19566. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  19567. return exports;
  19568. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19569. var exports = {},
  19570. Op = Object.prototype,
  19571. hasOwn = Op.hasOwnProperty,
  19572. defineProperty = Object.defineProperty || function (obj, key, desc) {
  19573. obj[key] = desc.value;
  19574. },
  19575. $Symbol = "function" == typeof Symbol ? Symbol : {},
  19576. iteratorSymbol = $Symbol.iterator || "@@iterator",
  19577. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  19578. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  19579. function define(obj, key, value) {
  19580. return Object.defineProperty(obj, key, {
  19581. value: value,
  19582. enumerable: !0,
  19583. configurable: !0,
  19584. writable: !0
  19585. }), obj[key];
  19586. }
  19587. try {
  19588. define({}, "");
  19589. } catch (err) {
  19590. define = function define(obj, key, value) {
  19591. return obj[key] = value;
  19592. };
  19593. }
  19594. function wrap(innerFn, outerFn, self, tryLocsList) {
  19595. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  19596. generator = Object.create(protoGenerator.prototype),
  19597. context = new Context(tryLocsList || []);
  19598. return defineProperty(generator, "_invoke", {
  19599. value: makeInvokeMethod(innerFn, self, context)
  19600. }), generator;
  19601. }
  19602. function tryCatch(fn, obj, arg) {
  19603. try {
  19604. return {
  19605. type: "normal",
  19606. arg: fn.call(obj, arg)
  19607. };
  19608. } catch (err) {
  19609. return {
  19610. type: "throw",
  19611. arg: err
  19612. };
  19613. }
  19614. }
  19615. exports.wrap = wrap;
  19616. var ContinueSentinel = {};
  19617. function Generator() {}
  19618. function GeneratorFunction() {}
  19619. function GeneratorFunctionPrototype() {}
  19620. var IteratorPrototype = {};
  19621. define(IteratorPrototype, iteratorSymbol, function () {
  19622. return this;
  19623. });
  19624. var getProto = Object.getPrototypeOf,
  19625. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  19626. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  19627. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  19628. function defineIteratorMethods(prototype) {
  19629. ["next", "throw", "return"].forEach(function (method) {
  19630. define(prototype, method, function (arg) {
  19631. return this._invoke(method, arg);
  19632. });
  19633. });
  19634. }
  19635. function AsyncIterator(generator, PromiseImpl) {
  19636. function invoke(method, arg, resolve, reject) {
  19637. var record = tryCatch(generator[method], generator, arg);
  19638. if ("throw" !== record.type) {
  19639. var result = record.arg,
  19640. value = result.value;
  19641. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  19642. invoke("next", value, resolve, reject);
  19643. }, function (err) {
  19644. invoke("throw", err, resolve, reject);
  19645. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  19646. result.value = unwrapped, resolve(result);
  19647. }, function (error) {
  19648. return invoke("throw", error, resolve, reject);
  19649. });
  19650. }
  19651. reject(record.arg);
  19652. }
  19653. var previousPromise;
  19654. defineProperty(this, "_invoke", {
  19655. value: function value(method, arg) {
  19656. function callInvokeWithMethodAndArg() {
  19657. return new PromiseImpl(function (resolve, reject) {
  19658. invoke(method, arg, resolve, reject);
  19659. });
  19660. }
  19661. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  19662. }
  19663. });
  19664. }
  19665. function makeInvokeMethod(innerFn, self, context) {
  19666. var state = "suspendedStart";
  19667. return function (method, arg) {
  19668. if ("executing" === state) throw new Error("Generator is already running");
  19669. if ("completed" === state) {
  19670. if ("throw" === method) throw arg;
  19671. return doneResult();
  19672. }
  19673. for (context.method = method, context.arg = arg;;) {
  19674. var delegate = context.delegate;
  19675. if (delegate) {
  19676. var delegateResult = maybeInvokeDelegate(delegate, context);
  19677. if (delegateResult) {
  19678. if (delegateResult === ContinueSentinel) continue;
  19679. return delegateResult;
  19680. }
  19681. }
  19682. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  19683. if ("suspendedStart" === state) throw state = "completed", context.arg;
  19684. context.dispatchException(context.arg);
  19685. } else "return" === context.method && context.abrupt("return", context.arg);
  19686. state = "executing";
  19687. var record = tryCatch(innerFn, self, context);
  19688. if ("normal" === record.type) {
  19689. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  19690. return {
  19691. value: record.arg,
  19692. done: context.done
  19693. };
  19694. }
  19695. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  19696. }
  19697. };
  19698. }
  19699. function maybeInvokeDelegate(delegate, context) {
  19700. var methodName = context.method,
  19701. method = delegate.iterator[methodName];
  19702. if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
  19703. var record = tryCatch(method, delegate.iterator, context.arg);
  19704. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  19705. var info = record.arg;
  19706. return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
  19707. }
  19708. function pushTryEntry(locs) {
  19709. var entry = {
  19710. tryLoc: locs[0]
  19711. };
  19712. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  19713. }
  19714. function resetTryEntry(entry) {
  19715. var record = entry.completion || {};
  19716. record.type = "normal", delete record.arg, entry.completion = record;
  19717. }
  19718. function Context(tryLocsList) {
  19719. this.tryEntries = [{
  19720. tryLoc: "root"
  19721. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  19722. }
  19723. function values(iterable) {
  19724. if (iterable) {
  19725. var iteratorMethod = iterable[iteratorSymbol];
  19726. if (iteratorMethod) return iteratorMethod.call(iterable);
  19727. if ("function" == typeof iterable.next) return iterable;
  19728. if (!isNaN(iterable.length)) {
  19729. var i = -1,
  19730. next = function next() {
  19731. for (; ++i < iterable.length;) {
  19732. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  19733. }
  19734. return next.value = undefined, next.done = !0, next;
  19735. };
  19736. return next.next = next;
  19737. }
  19738. }
  19739. return {
  19740. next: doneResult
  19741. };
  19742. }
  19743. function doneResult() {
  19744. return {
  19745. value: undefined,
  19746. done: !0
  19747. };
  19748. }
  19749. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  19750. value: GeneratorFunctionPrototype,
  19751. configurable: !0
  19752. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  19753. value: GeneratorFunction,
  19754. configurable: !0
  19755. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  19756. var ctor = "function" == typeof genFun && genFun.constructor;
  19757. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  19758. }, exports.mark = function (genFun) {
  19759. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  19760. }, exports.awrap = function (arg) {
  19761. return {
  19762. __await: arg
  19763. };
  19764. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  19765. return this;
  19766. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  19767. void 0 === PromiseImpl && (PromiseImpl = Promise);
  19768. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  19769. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  19770. return result.done ? result.value : iter.next();
  19771. });
  19772. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  19773. return this;
  19774. }), define(Gp, "toString", function () {
  19775. return "[object Generator]";
  19776. }), exports.keys = function (val) {
  19777. var object = Object(val),
  19778. keys = [];
  19779. for (var key in object) {
  19780. keys.push(key);
  19781. }
  19782. return keys.reverse(), function next() {
  19783. for (; keys.length;) {
  19784. var key = keys.pop();
  19785. if (key in object) return next.value = key, next.done = !1, next;
  19786. }
  19787. return next.done = !0, next;
  19788. };
  19789. }, exports.values = values, Context.prototype = {
  19790. constructor: Context,
  19791. reset: function reset(skipTempReset) {
  19792. if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
  19793. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  19794. }
  19795. },
  19796. stop: function stop() {
  19797. this.done = !0;
  19798. var rootRecord = this.tryEntries[0].completion;
  19799. if ("throw" === rootRecord.type) throw rootRecord.arg;
  19800. return this.rval;
  19801. },
  19802. dispatchException: function dispatchException(exception) {
  19803. if (this.done) throw exception;
  19804. var context = this;
  19805. function handle(loc, caught) {
  19806. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  19807. }
  19808. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  19809. var entry = this.tryEntries[i],
  19810. record = entry.completion;
  19811. if ("root" === entry.tryLoc) return handle("end");
  19812. if (entry.tryLoc <= this.prev) {
  19813. var hasCatch = hasOwn.call(entry, "catchLoc"),
  19814. hasFinally = hasOwn.call(entry, "finallyLoc");
  19815. if (hasCatch && hasFinally) {
  19816. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  19817. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  19818. } else if (hasCatch) {
  19819. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  19820. } else {
  19821. if (!hasFinally) throw new Error("try statement without catch or finally");
  19822. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  19823. }
  19824. }
  19825. }
  19826. },
  19827. abrupt: function abrupt(type, arg) {
  19828. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  19829. var entry = this.tryEntries[i];
  19830. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  19831. var finallyEntry = entry;
  19832. break;
  19833. }
  19834. }
  19835. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  19836. var record = finallyEntry ? finallyEntry.completion : {};
  19837. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  19838. },
  19839. complete: function complete(record, afterLoc) {
  19840. if ("throw" === record.type) throw record.arg;
  19841. return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
  19842. },
  19843. finish: function finish(finallyLoc) {
  19844. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  19845. var entry = this.tryEntries[i];
  19846. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  19847. }
  19848. },
  19849. "catch": function _catch(tryLoc) {
  19850. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  19851. var entry = this.tryEntries[i];
  19852. if (entry.tryLoc === tryLoc) {
  19853. var record = entry.completion;
  19854. if ("throw" === record.type) {
  19855. var thrown = record.arg;
  19856. resetTryEntry(entry);
  19857. }
  19858. return thrown;
  19859. }
  19860. }
  19861. throw new Error("illegal catch attempt");
  19862. },
  19863. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  19864. return this.delegate = {
  19865. iterator: values(iterable),
  19866. resultName: resultName,
  19867. nextLoc: nextLoc
  19868. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  19869. }
  19870. }, exports;
  19871. }
  19872. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19873. /***/ }),
  19874. /***/ 417:
  19875. /*!*********************************************************************************************************!*\
  19876. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-picker.js ***!
  19877. \*********************************************************************************************************/
  19878. /*! no static exports found */
  19879. /***/ (function(module, exports, __webpack_require__) {
  19880. "use strict";
  19881. /* WEBPACK VAR INJECTION */(function(uniCloud) {
  19882. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  19883. Object.defineProperty(exports, "__esModule", {
  19884. value: true
  19885. });
  19886. exports.default = void 0;
  19887. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  19888. var _default2 = {
  19889. props: {
  19890. localdata: {
  19891. type: [Array, Object],
  19892. default: function _default() {
  19893. return [];
  19894. }
  19895. },
  19896. spaceInfo: {
  19897. type: Object,
  19898. default: function _default() {
  19899. return {};
  19900. }
  19901. },
  19902. collection: {
  19903. type: String,
  19904. default: ''
  19905. },
  19906. action: {
  19907. type: String,
  19908. default: ''
  19909. },
  19910. field: {
  19911. type: String,
  19912. default: ''
  19913. },
  19914. orderby: {
  19915. type: String,
  19916. default: ''
  19917. },
  19918. where: {
  19919. type: [String, Object],
  19920. default: ''
  19921. },
  19922. pageData: {
  19923. type: String,
  19924. default: 'add'
  19925. },
  19926. pageCurrent: {
  19927. type: Number,
  19928. default: 1
  19929. },
  19930. pageSize: {
  19931. type: Number,
  19932. default: 20
  19933. },
  19934. getcount: {
  19935. type: [Boolean, String],
  19936. default: false
  19937. },
  19938. getone: {
  19939. type: [Boolean, String],
  19940. default: false
  19941. },
  19942. gettree: {
  19943. type: [Boolean, String],
  19944. default: false
  19945. },
  19946. manual: {
  19947. type: Boolean,
  19948. default: false
  19949. },
  19950. value: {
  19951. type: [Array, String, Number],
  19952. default: function _default() {
  19953. return [];
  19954. }
  19955. },
  19956. modelValue: {
  19957. type: [Array, String, Number],
  19958. default: function _default() {
  19959. return [];
  19960. }
  19961. },
  19962. preload: {
  19963. type: Boolean,
  19964. default: false
  19965. },
  19966. stepSearh: {
  19967. type: Boolean,
  19968. default: true
  19969. },
  19970. selfField: {
  19971. type: String,
  19972. default: ''
  19973. },
  19974. parentField: {
  19975. type: String,
  19976. default: ''
  19977. },
  19978. multiple: {
  19979. type: Boolean,
  19980. default: false
  19981. },
  19982. map: {
  19983. type: Object,
  19984. default: function _default() {
  19985. return {
  19986. text: "text",
  19987. value: "value"
  19988. };
  19989. }
  19990. }
  19991. },
  19992. data: function data() {
  19993. return {
  19994. loading: false,
  19995. errorMessage: '',
  19996. loadMore: {
  19997. contentdown: '',
  19998. contentrefresh: '',
  19999. contentnomore: ''
  20000. },
  20001. dataList: [],
  20002. selected: [],
  20003. selectedIndex: 0,
  20004. page: {
  20005. current: this.pageCurrent,
  20006. size: this.pageSize,
  20007. count: 0
  20008. }
  20009. };
  20010. },
  20011. computed: {
  20012. isLocaldata: function isLocaldata() {
  20013. return !this.collection.length;
  20014. },
  20015. postField: function postField() {
  20016. var fields = [this.field];
  20017. if (this.parentField) {
  20018. fields.push("".concat(this.parentField, " as parent_value"));
  20019. }
  20020. return fields.join(',');
  20021. },
  20022. dataValue: function dataValue() {
  20023. var isModelValue = Array.isArray(this.modelValue) ? this.modelValue.length > 0 : this.modelValue !== null || this.modelValue !== undefined;
  20024. return isModelValue ? this.modelValue : this.value;
  20025. },
  20026. hasValue: function hasValue() {
  20027. if (typeof this.dataValue === 'number') {
  20028. return true;
  20029. }
  20030. return this.dataValue != null && this.dataValue.length > 0;
  20031. }
  20032. },
  20033. created: function created() {
  20034. var _this = this;
  20035. this.$watch(function () {
  20036. var al = [];
  20037. ['pageCurrent', 'pageSize', 'spaceInfo', 'value', 'modelValue', 'localdata', 'collection', 'action', 'field', 'orderby', 'where', 'getont', 'getcount', 'gettree'].forEach(function (key) {
  20038. al.push(_this[key]);
  20039. });
  20040. return al;
  20041. }, function (newValue, oldValue) {
  20042. var needReset = false;
  20043. for (var i = 2; i < newValue.length; i++) {
  20044. if (newValue[i] != oldValue[i]) {
  20045. needReset = true;
  20046. break;
  20047. }
  20048. }
  20049. if (newValue[0] != oldValue[0]) {
  20050. _this.page.current = _this.pageCurrent;
  20051. }
  20052. _this.page.size = _this.pageSize;
  20053. _this.onPropsChange();
  20054. });
  20055. this._treeData = [];
  20056. },
  20057. methods: {
  20058. onPropsChange: function onPropsChange() {
  20059. this._treeData = [];
  20060. },
  20061. getCommand: function getCommand() {
  20062. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  20063. /* eslint-disable no-undef */
  20064. var db = uniCloud.database(this.spaceInfo);
  20065. var action = options.action || this.action;
  20066. if (action) {
  20067. db = db.action(action);
  20068. }
  20069. var collection = options.collection || this.collection;
  20070. db = db.collection(collection);
  20071. var where = options.where || this.where;
  20072. if (!(!where || !Object.keys(where).length)) {
  20073. db = db.where(where);
  20074. }
  20075. var field = options.field || this.field;
  20076. if (field) {
  20077. db = db.field(field);
  20078. }
  20079. var orderby = options.orderby || this.orderby;
  20080. if (orderby) {
  20081. db = db.orderBy(orderby);
  20082. }
  20083. var current = options.pageCurrent !== undefined ? options.pageCurrent : this.page.current;
  20084. var size = options.pageSize !== undefined ? options.pageSize : this.page.size;
  20085. var getCount = options.getcount !== undefined ? options.getcount : this.getcount;
  20086. var getTree = options.gettree !== undefined ? options.gettree : this.gettree;
  20087. var getOptions = {
  20088. getCount: getCount,
  20089. getTree: getTree
  20090. };
  20091. if (options.getTreePath) {
  20092. getOptions.getTreePath = options.getTreePath;
  20093. }
  20094. db = db.skip(size * (current - 1)).limit(size).get(getOptions);
  20095. return db;
  20096. },
  20097. getNodeData: function getNodeData(callback) {
  20098. var _this2 = this;
  20099. if (this.loading) {
  20100. return;
  20101. }
  20102. this.loading = true;
  20103. this.getCommand({
  20104. field: this.postField,
  20105. where: this._pathWhere()
  20106. }).then(function (res) {
  20107. _this2.loading = false;
  20108. _this2.selected = res.result.data;
  20109. callback && callback();
  20110. }).catch(function (err) {
  20111. _this2.loading = false;
  20112. _this2.errorMessage = err;
  20113. });
  20114. },
  20115. getTreePath: function getTreePath(callback) {
  20116. var _this3 = this;
  20117. if (this.loading) {
  20118. return;
  20119. }
  20120. this.loading = true;
  20121. this.getCommand({
  20122. field: this.postField,
  20123. getTreePath: {
  20124. startWith: "".concat(this.selfField, "=='").concat(this.dataValue, "'")
  20125. }
  20126. }).then(function (res) {
  20127. _this3.loading = false;
  20128. var treePath = [];
  20129. _this3._extractTreePath(res.result.data, treePath);
  20130. _this3.selected = treePath;
  20131. callback && callback();
  20132. }).catch(function (err) {
  20133. _this3.loading = false;
  20134. _this3.errorMessage = err;
  20135. });
  20136. },
  20137. loadData: function loadData() {
  20138. var _this4 = this;
  20139. if (this.isLocaldata) {
  20140. this._processLocalData();
  20141. return;
  20142. }
  20143. if (this.dataValue != null) {
  20144. this._loadNodeData(function (data) {
  20145. _this4._treeData = data;
  20146. _this4._updateBindData();
  20147. _this4._updateSelected();
  20148. });
  20149. return;
  20150. }
  20151. if (this.stepSearh) {
  20152. this._loadNodeData(function (data) {
  20153. _this4._treeData = data;
  20154. _this4._updateBindData();
  20155. });
  20156. } else {
  20157. this._loadAllData(function (data) {
  20158. _this4._treeData = [];
  20159. _this4._extractTree(data, _this4._treeData, null);
  20160. _this4._updateBindData();
  20161. });
  20162. }
  20163. },
  20164. _loadAllData: function _loadAllData(callback) {
  20165. var _this5 = this;
  20166. if (this.loading) {
  20167. return;
  20168. }
  20169. this.loading = true;
  20170. this.getCommand({
  20171. field: this.postField,
  20172. gettree: true,
  20173. startwith: "".concat(this.selfField, "=='").concat(this.dataValue, "'")
  20174. }).then(function (res) {
  20175. _this5.loading = false;
  20176. callback(res.result.data);
  20177. _this5.onDataChange();
  20178. }).catch(function (err) {
  20179. _this5.loading = false;
  20180. _this5.errorMessage = err;
  20181. });
  20182. },
  20183. _loadNodeData: function _loadNodeData(callback, pw) {
  20184. var _this6 = this;
  20185. if (this.loading) {
  20186. return;
  20187. }
  20188. this.loading = true;
  20189. this.getCommand({
  20190. field: this.postField,
  20191. where: pw || this._postWhere(),
  20192. pageSize: 500
  20193. }).then(function (res) {
  20194. _this6.loading = false;
  20195. callback(res.result.data);
  20196. _this6.onDataChange();
  20197. }).catch(function (err) {
  20198. _this6.loading = false;
  20199. _this6.errorMessage = err;
  20200. });
  20201. },
  20202. _pathWhere: function _pathWhere() {
  20203. var result = [];
  20204. var where_field = this._getParentNameByField();
  20205. if (where_field) {
  20206. result.push("".concat(where_field, " == '").concat(this.dataValue, "'"));
  20207. }
  20208. if (this.where) {
  20209. return "(".concat(this.where, ") && (").concat(result.join(' || '), ")");
  20210. }
  20211. return result.join(' || ');
  20212. },
  20213. _postWhere: function _postWhere() {
  20214. var result = [];
  20215. var selected = this.selected;
  20216. var parentField = this.parentField;
  20217. if (parentField) {
  20218. result.push("".concat(parentField, " == null || ").concat(parentField, " == \"\""));
  20219. }
  20220. if (selected.length) {
  20221. for (var i = 0; i < selected.length - 1; i++) {
  20222. result.push("".concat(parentField, " == '").concat(selected[i].value, "'"));
  20223. }
  20224. }
  20225. var where = [];
  20226. if (this.where) {
  20227. where.push("(".concat(this.where, ")"));
  20228. }
  20229. if (result.length) {
  20230. where.push("(".concat(result.join(' || '), ")"));
  20231. }
  20232. return where.join(' && ');
  20233. },
  20234. _nodeWhere: function _nodeWhere() {
  20235. var result = [];
  20236. var selected = this.selected;
  20237. if (selected.length) {
  20238. result.push("".concat(this.parentField, " == '").concat(selected[selected.length - 1].value, "'"));
  20239. }
  20240. if (this.where) {
  20241. return "(".concat(this.where, ") && (").concat(result.join(' || '), ")");
  20242. }
  20243. return result.join(' || ');
  20244. },
  20245. _getParentNameByField: function _getParentNameByField() {
  20246. var fields = this.field.split(',');
  20247. var where_field = null;
  20248. for (var i = 0; i < fields.length; i++) {
  20249. var items = fields[i].split('as');
  20250. if (items.length < 2) {
  20251. continue;
  20252. }
  20253. if (items[1].trim() === 'value') {
  20254. where_field = items[0].trim();
  20255. break;
  20256. }
  20257. }
  20258. return where_field;
  20259. },
  20260. _isTreeView: function _isTreeView() {
  20261. return this.parentField && this.selfField;
  20262. },
  20263. _updateSelected: function _updateSelected() {
  20264. var dl = this.dataList;
  20265. var sl = this.selected;
  20266. var textField = this.map.text;
  20267. var valueField = this.map.value;
  20268. for (var i = 0; i < sl.length; i++) {
  20269. var value = sl[i].value;
  20270. var dl2 = dl[i];
  20271. for (var j = 0; j < dl2.length; j++) {
  20272. var item2 = dl2[j];
  20273. if (item2[valueField] === value) {
  20274. sl[i].text = item2[textField];
  20275. break;
  20276. }
  20277. }
  20278. }
  20279. },
  20280. _updateBindData: function _updateBindData(node) {
  20281. var _this$_filterData = this._filterData(this._treeData, this.selected),
  20282. dataList = _this$_filterData.dataList,
  20283. hasNodes = _this$_filterData.hasNodes;
  20284. var isleaf = this._stepSearh === false && !hasNodes;
  20285. if (node) {
  20286. node.isleaf = isleaf;
  20287. }
  20288. this.dataList = dataList;
  20289. this.selectedIndex = dataList.length - 1;
  20290. if (!isleaf && this.selected.length < dataList.length) {
  20291. this.selected.push({
  20292. value: null,
  20293. text: "请选择"
  20294. });
  20295. }
  20296. return {
  20297. isleaf: isleaf,
  20298. hasNodes: hasNodes
  20299. };
  20300. },
  20301. _filterData: function _filterData(data, paths) {
  20302. var dataList = [];
  20303. var hasNodes = true;
  20304. dataList.push(data.filter(function (item) {
  20305. return item.parent_value === null || item.parent_value === undefined || item.parent_value === '';
  20306. }));
  20307. for (var i = 0; i < paths.length; i++) {
  20308. var value = paths[i].value;
  20309. var nodes = data.filter(function (item) {
  20310. return item.parent_value === value;
  20311. });
  20312. if (nodes.length) {
  20313. dataList.push(nodes);
  20314. } else {
  20315. hasNodes = false;
  20316. }
  20317. }
  20318. return {
  20319. dataList: dataList,
  20320. hasNodes: hasNodes
  20321. };
  20322. },
  20323. _extractTree: function _extractTree(nodes, result, parent_value) {
  20324. var list = result || [];
  20325. var valueField = this.map.value;
  20326. for (var i = 0; i < nodes.length; i++) {
  20327. var node = nodes[i];
  20328. var child = {};
  20329. for (var key in node) {
  20330. if (key !== 'children') {
  20331. child[key] = node[key];
  20332. }
  20333. }
  20334. if (parent_value !== null && parent_value !== undefined && parent_value !== '') {
  20335. child.parent_value = parent_value;
  20336. }
  20337. result.push(child);
  20338. var children = node.children;
  20339. if (children) {
  20340. this._extractTree(children, result, node[valueField]);
  20341. }
  20342. }
  20343. },
  20344. _extractTreePath: function _extractTreePath(nodes, result) {
  20345. var list = result || [];
  20346. for (var i = 0; i < nodes.length; i++) {
  20347. var node = nodes[i];
  20348. var child = {};
  20349. for (var key in node) {
  20350. if (key !== 'children') {
  20351. child[key] = node[key];
  20352. }
  20353. }
  20354. result.push(child);
  20355. var children = node.children;
  20356. if (children) {
  20357. this._extractTreePath(children, result);
  20358. }
  20359. }
  20360. },
  20361. _findNodePath: function _findNodePath(key, nodes) {
  20362. var path = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  20363. var textField = this.map.text;
  20364. var valueField = this.map.value;
  20365. for (var i = 0; i < nodes.length; i++) {
  20366. var node = nodes[i];
  20367. var children = node.children;
  20368. var text = node[textField];
  20369. var value = node[valueField];
  20370. path.push({
  20371. value: value,
  20372. text: text
  20373. });
  20374. if (value === key) {
  20375. return path;
  20376. }
  20377. if (children) {
  20378. var p = this._findNodePath(key, children, path);
  20379. if (p.length) {
  20380. return p;
  20381. }
  20382. }
  20383. path.pop();
  20384. }
  20385. return [];
  20386. },
  20387. _processLocalData: function _processLocalData() {
  20388. this._treeData = [];
  20389. this._extractTree(this.localdata, this._treeData);
  20390. var inputValue = this.dataValue;
  20391. if (inputValue === undefined) {
  20392. return;
  20393. }
  20394. if (Array.isArray(inputValue)) {
  20395. inputValue = inputValue[inputValue.length - 1];
  20396. if ((0, _typeof2.default)(inputValue) === 'object' && inputValue[this.map.value]) {
  20397. inputValue = inputValue[this.map.value];
  20398. }
  20399. }
  20400. this.selected = this._findNodePath(inputValue, this.localdata);
  20401. }
  20402. }
  20403. };
  20404. exports.default = _default2;
  20405. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js */ 394)["default"]))
  20406. /***/ }),
  20407. /***/ 42:
  20408. /*!*****************************************************************!*\
  20409. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  20410. \*****************************************************************/
  20411. /*! no static exports found */
  20412. /***/ (function(module, exports) {
  20413. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  20414. try {
  20415. var info = gen[key](arg);
  20416. var value = info.value;
  20417. } catch (error) {
  20418. reject(error);
  20419. return;
  20420. }
  20421. if (info.done) {
  20422. resolve(value);
  20423. } else {
  20424. Promise.resolve(value).then(_next, _throw);
  20425. }
  20426. }
  20427. function _asyncToGenerator(fn) {
  20428. return function () {
  20429. var self = this,
  20430. args = arguments;
  20431. return new Promise(function (resolve, reject) {
  20432. var gen = fn.apply(self, args);
  20433. function _next(value) {
  20434. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  20435. }
  20436. function _throw(err) {
  20437. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  20438. }
  20439. _next(undefined);
  20440. });
  20441. };
  20442. }
  20443. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20444. /***/ }),
  20445. /***/ 425:
  20446. /*!*********************************************************************!*\
  20447. !*** E:/项目资料/智慧社区/Applet/components/gaoyia-parse/libs/html2json.js ***!
  20448. \*********************************************************************/
  20449. /*! no static exports found */
  20450. /***/ (function(module, exports, __webpack_require__) {
  20451. "use strict";
  20452. /* WEBPACK VAR INJECTION */(function(wx) {
  20453. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20454. Object.defineProperty(exports, "__esModule", {
  20455. value: true
  20456. });
  20457. exports.default = void 0;
  20458. var _wxDiscode = _interopRequireDefault(__webpack_require__(/*! ./wxDiscode */ 426));
  20459. var _htmlparser = _interopRequireDefault(__webpack_require__(/*! ./htmlparser */ 427));
  20460. /**
  20461. * html2Json 改造来自: https://github.com/Jxck/html2json
  20462. *
  20463. *
  20464. * author: Di (微信小程序开发工程师)
  20465. * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
  20466. * 垂直微信小程序开发交流社区
  20467. *
  20468. * github地址: https://github.com/icindy/wxParse
  20469. *
  20470. * for: 微信小程序富文本解析
  20471. * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
  20472. */
  20473. function makeMap(str) {
  20474. var obj = {};
  20475. var items = str.split(',');
  20476. for (var i = 0; i < items.length; i += 1) {
  20477. obj[items[i]] = true;
  20478. }
  20479. return obj;
  20480. }
  20481. // Block Elements - HTML 5
  20482. var block = makeMap('br,code,address,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video');
  20483. // Inline Elements - HTML 5
  20484. var inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var');
  20485. // Elements that you can, intentionally, leave open
  20486. // (and which close themselves)
  20487. var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr');
  20488. function removeDOCTYPE(html) {
  20489. var isDocument = /<body.*>([^]*)<\/body>/.test(html);
  20490. return isDocument ? RegExp.$1 : html;
  20491. }
  20492. function trimHtml(html) {
  20493. return html.replace(/<!--.*?-->/gi, '').replace(/\/\*.*?\*\//gi, '').replace(/[ ]+</gi, '<').replace(/<script[^]*<\/script>/gi, '').replace(/<style[^]*<\/style>/gi, '');
  20494. }
  20495. function getScreenInfo() {
  20496. var screen = {};
  20497. wx.getSystemInfo({
  20498. success: function success(res) {
  20499. screen.width = res.windowWidth;
  20500. screen.height = res.windowHeight;
  20501. }
  20502. });
  20503. return screen;
  20504. }
  20505. function html2json(html, customHandler, imageProp, host) {
  20506. // 处理字符串
  20507. html = removeDOCTYPE(html);
  20508. html = trimHtml(html);
  20509. html = _wxDiscode.default.strDiscode(html);
  20510. // 生成node节点
  20511. var bufArray = [];
  20512. var results = {
  20513. nodes: [],
  20514. imageUrls: []
  20515. };
  20516. var screen = getScreenInfo();
  20517. function Node(tag) {
  20518. this.node = 'element';
  20519. this.tag = tag;
  20520. this.$screen = screen;
  20521. }
  20522. (0, _htmlparser.default)(html, {
  20523. start: function start(tag, attrs, unary) {
  20524. // node for this element
  20525. var node = new Node(tag);
  20526. if (bufArray.length !== 0) {
  20527. var parent = bufArray[0];
  20528. if (parent.nodes === undefined) {
  20529. parent.nodes = [];
  20530. }
  20531. }
  20532. if (block[tag]) {
  20533. node.tagType = 'block';
  20534. } else if (inline[tag]) {
  20535. node.tagType = 'inline';
  20536. } else if (closeSelf[tag]) {
  20537. node.tagType = 'closeSelf';
  20538. }
  20539. node.attr = attrs.reduce(function (pre, attr) {
  20540. var name = attr.name;
  20541. var value = attr.value;
  20542. if (name === 'class') {
  20543. node.classStr = value;
  20544. }
  20545. // has multi attibutes
  20546. // make it array of attribute
  20547. if (name === 'style') {
  20548. node.styleStr = value;
  20549. }
  20550. if (value.match(/ /)) {
  20551. value = value.split(' ');
  20552. }
  20553. // if attr already exists
  20554. // merge it
  20555. if (pre[name]) {
  20556. if (Array.isArray(pre[name])) {
  20557. // already array, push to last
  20558. pre[name].push(value);
  20559. } else {
  20560. // single value, make it array
  20561. pre[name] = [pre[name], value];
  20562. }
  20563. } else {
  20564. // not exist, put it
  20565. pre[name] = value;
  20566. }
  20567. return pre;
  20568. }, {});
  20569. // 优化样式相关属性
  20570. if (node.classStr) {
  20571. node.classStr += " ".concat(node.tag);
  20572. } else {
  20573. node.classStr = node.tag;
  20574. }
  20575. if (node.tagType === 'inline') {
  20576. node.classStr += ' inline';
  20577. }
  20578. // 对img添加额外数据
  20579. if (node.tag === 'img') {
  20580. var imgUrl = node.attr.src;
  20581. imgUrl = _wxDiscode.default.urlToHttpUrl(imgUrl, imageProp.domain);
  20582. Object.assign(node.attr, imageProp, {
  20583. src: imgUrl || ''
  20584. });
  20585. if (imgUrl) {
  20586. results.imageUrls.push(imgUrl);
  20587. }
  20588. }
  20589. // 处理a标签属性
  20590. if (node.tag === 'a') {
  20591. node.attr.href = node.attr.href || '';
  20592. }
  20593. // 处理font标签样式属性
  20594. if (node.tag === 'font') {
  20595. var fontSize = ['x-small', 'small', 'medium', 'large', 'x-large', 'xx-large', '-webkit-xxx-large'];
  20596. var styleAttrs = {
  20597. color: 'color',
  20598. face: 'font-family',
  20599. size: 'font-size'
  20600. };
  20601. if (!node.styleStr) node.styleStr = '';
  20602. Object.keys(styleAttrs).forEach(function (key) {
  20603. if (node.attr[key]) {
  20604. var value = key === 'size' ? fontSize[node.attr[key] - 1] : node.attr[key];
  20605. node.styleStr += "".concat(styleAttrs[key], ": ").concat(value, ";");
  20606. }
  20607. });
  20608. }
  20609. // 临时记录source资源
  20610. if (node.tag === 'source') {
  20611. results.source = node.attr.src;
  20612. }
  20613. if (customHandler.start) {
  20614. customHandler.start(node, results);
  20615. }
  20616. if (unary) {
  20617. // if this tag doesn't have end tag
  20618. // like <img src="hoge.png"/>
  20619. // add to parents
  20620. var _parent = bufArray[0] || results;
  20621. if (_parent.nodes === undefined) {
  20622. _parent.nodes = [];
  20623. }
  20624. _parent.nodes.push(node);
  20625. } else {
  20626. bufArray.unshift(node);
  20627. }
  20628. },
  20629. end: function end(tag) {
  20630. // merge into parent tag
  20631. var node = bufArray.shift();
  20632. if (node.tag !== tag) {
  20633. console.error('invalid state: mismatch end tag');
  20634. }
  20635. // 当有缓存source资源时于于video补上src资源
  20636. if (node.tag === 'video' && results.source) {
  20637. node.attr.src = results.source;
  20638. delete results.source;
  20639. }
  20640. if (customHandler.end) {
  20641. customHandler.end(node, results);
  20642. }
  20643. if (bufArray.length === 0) {
  20644. results.nodes.push(node);
  20645. } else {
  20646. var parent = bufArray[0];
  20647. if (!parent.nodes) {
  20648. parent.nodes = [];
  20649. }
  20650. parent.nodes.push(node);
  20651. }
  20652. },
  20653. chars: function chars(text) {
  20654. if (!text.trim()) return;
  20655. var node = {
  20656. node: 'text',
  20657. text: text
  20658. };
  20659. if (customHandler.chars) {
  20660. customHandler.chars(node, results);
  20661. }
  20662. if (bufArray.length === 0) {
  20663. results.nodes.push(node);
  20664. } else {
  20665. var parent = bufArray[0];
  20666. if (parent.nodes === undefined) {
  20667. parent.nodes = [];
  20668. }
  20669. parent.nodes.push(node);
  20670. }
  20671. }
  20672. });
  20673. return results;
  20674. }
  20675. var _default = html2json;
  20676. exports.default = _default;
  20677. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  20678. /***/ }),
  20679. /***/ 426:
  20680. /*!*********************************************************************!*\
  20681. !*** E:/项目资料/智慧社区/Applet/components/gaoyia-parse/libs/wxDiscode.js ***!
  20682. \*********************************************************************/
  20683. /*! no static exports found */
  20684. /***/ (function(module, exports, __webpack_require__) {
  20685. "use strict";
  20686. Object.defineProperty(exports, "__esModule", {
  20687. value: true
  20688. });
  20689. exports.default = void 0;
  20690. // HTML 支持的数学符号
  20691. function strNumDiscode(str) {
  20692. str = str.replace(/&forall;|&#8704;|&#x2200;/g, '∀');
  20693. str = str.replace(/&part;|&#8706;|&#x2202;/g, '∂');
  20694. str = str.replace(/&exist;|&#8707;|&#x2203;/g, '∃');
  20695. str = str.replace(/&empty;|&#8709;|&#x2205;/g, '∅');
  20696. str = str.replace(/&nabla;|&#8711;|&#x2207;/g, '∇');
  20697. str = str.replace(/&isin;|&#8712;|&#x2208;/g, '∈');
  20698. str = str.replace(/&notin;|&#8713;|&#x2209;/g, '∉');
  20699. str = str.replace(/&ni;|&#8715;|&#x220b;/g, '∋');
  20700. str = str.replace(/&prod;|&#8719;|&#x220f;/g, '∏');
  20701. str = str.replace(/&sum;|&#8721;|&#x2211;/g, '∑');
  20702. str = str.replace(/&minus;|&#8722;|&#x2212;/g, '−');
  20703. str = str.replace(/&lowast;|&#8727;|&#x2217;/g, '∗');
  20704. str = str.replace(/&radic;|&#8730;|&#x221a;/g, '√');
  20705. str = str.replace(/&prop;|&#8733;|&#x221d;/g, '∝');
  20706. str = str.replace(/&infin;|&#8734;|&#x221e;/g, '∞');
  20707. str = str.replace(/&ang;|&#8736;|&#x2220;/g, '∠');
  20708. str = str.replace(/&and;|&#8743;|&#x2227;/g, '∧');
  20709. str = str.replace(/&or;|&#8744;|&#x2228;/g, '∨');
  20710. str = str.replace(/&cap;|&#8745;|&#x2229;/g, '∩');
  20711. str = str.replace(/&cup;|&#8746;|&#x222a;/g, '∪');
  20712. str = str.replace(/&int;|&#8747;|&#x222b;/g, '∫');
  20713. str = str.replace(/&there4;|&#8756;|&#x2234;/g, '∴');
  20714. str = str.replace(/&sim;|&#8764;|&#x223c;/g, '∼');
  20715. str = str.replace(/&cong;|&#8773;|&#x2245;/g, '≅');
  20716. str = str.replace(/&asymp;|&#8776;|&#x2248;/g, '≈');
  20717. str = str.replace(/&ne;|&#8800;|&#x2260;/g, '≠');
  20718. str = str.replace(/&le;|&#8804;|&#x2264;/g, '≤');
  20719. str = str.replace(/&ge;|&#8805;|&#x2265;/g, '≥');
  20720. str = str.replace(/&sub;|&#8834;|&#x2282;/g, '⊂');
  20721. str = str.replace(/&sup;|&#8835;|&#x2283;/g, '⊃');
  20722. str = str.replace(/&nsub;|&#8836;|&#x2284;/g, '⊄');
  20723. str = str.replace(/&sube;|&#8838;|&#x2286;/g, '⊆');
  20724. str = str.replace(/&supe;|&#8839;|&#x2287;/g, '⊇');
  20725. str = str.replace(/&oplus;|&#8853;|&#x2295;/g, '⊕');
  20726. str = str.replace(/&otimes;|&#8855;|&#x2297;/g, '⊗');
  20727. str = str.replace(/&perp;|&#8869;|&#x22a5;/g, '⊥');
  20728. str = str.replace(/&sdot;|&#8901;|&#x22c5;/g, '⋅');
  20729. return str;
  20730. }
  20731. // HTML 支持的希腊字母
  20732. function strGreeceDiscode(str) {
  20733. str = str.replace(/&Alpha;|&#913;|&#x391;/g, 'Α');
  20734. str = str.replace(/&Beta;|&#914;|&#x392;/g, 'Β');
  20735. str = str.replace(/&Gamma;|&#915;|&#x393;/g, 'Γ');
  20736. str = str.replace(/&Delta;|&#916;|&#x394;/g, 'Δ');
  20737. str = str.replace(/&Epsilon;|&#917;|&#x395;/g, 'Ε');
  20738. str = str.replace(/&Zeta;|&#918;|&#x396;/g, 'Ζ');
  20739. str = str.replace(/&Eta;|&#919;|&#x397;/g, 'Η');
  20740. str = str.replace(/&Theta;|&#920;|&#x398;/g, 'Θ');
  20741. str = str.replace(/&Iota;|&#921;|&#x399;/g, 'Ι');
  20742. str = str.replace(/&Kappa;|&#922;|&#x39a;/g, 'Κ');
  20743. str = str.replace(/&Lambda;|&#923;|&#x39b;/g, 'Λ');
  20744. str = str.replace(/&Mu;|&#924;|&#x39c;/g, 'Μ');
  20745. str = str.replace(/&Nu;|&#925;|&#x39d;/g, 'Ν');
  20746. str = str.replace(/&Xi;|&#925;|&#x39d;/g, 'Ν');
  20747. str = str.replace(/&Omicron;|&#927;|&#x39f;/g, 'Ο');
  20748. str = str.replace(/&Pi;|&#928;|&#x3a0;/g, 'Π');
  20749. str = str.replace(/&Rho;|&#929;|&#x3a1;/g, 'Ρ');
  20750. str = str.replace(/&Sigma;|&#931;|&#x3a3;/g, 'Σ');
  20751. str = str.replace(/&Tau;|&#932;|&#x3a4;/g, 'Τ');
  20752. str = str.replace(/&Upsilon;|&#933;|&#x3a5;/g, 'Υ');
  20753. str = str.replace(/&Phi;|&#934;|&#x3a6;/g, 'Φ');
  20754. str = str.replace(/&Chi;|&#935;|&#x3a7;/g, 'Χ');
  20755. str = str.replace(/&Psi;|&#936;|&#x3a8;/g, 'Ψ');
  20756. str = str.replace(/&Omega;|&#937;|&#x3a9;/g, 'Ω');
  20757. str = str.replace(/&alpha;|&#945;|&#x3b1;/g, 'α');
  20758. str = str.replace(/&beta;|&#946;|&#x3b2;/g, 'β');
  20759. str = str.replace(/&gamma;|&#947;|&#x3b3;/g, 'γ');
  20760. str = str.replace(/&delta;|&#948;|&#x3b4;/g, 'δ');
  20761. str = str.replace(/&epsilon;|&#949;|&#x3b5;/g, 'ε');
  20762. str = str.replace(/&zeta;|&#950;|&#x3b6;/g, 'ζ');
  20763. str = str.replace(/&eta;|&#951;|&#x3b7;/g, 'η');
  20764. str = str.replace(/&theta;|&#952;|&#x3b8;/g, 'θ');
  20765. str = str.replace(/&iota;|&#953;|&#x3b9;/g, 'ι');
  20766. str = str.replace(/&kappa;|&#954;|&#x3ba;/g, 'κ');
  20767. str = str.replace(/&lambda;|&#955;|&#x3bb;/g, 'λ');
  20768. str = str.replace(/&mu;|&#956;|&#x3bc;/g, 'μ');
  20769. str = str.replace(/&nu;|&#957;|&#x3bd;/g, 'ν');
  20770. str = str.replace(/&xi;|&#958;|&#x3be;/g, 'ξ');
  20771. str = str.replace(/&omicron;|&#959;|&#x3bf;/g, 'ο');
  20772. str = str.replace(/&pi;|&#960;|&#x3c0;/g, 'π');
  20773. str = str.replace(/&rho;|&#961;|&#x3c1;/g, 'ρ');
  20774. str = str.replace(/&sigmaf;|&#962;|&#x3c2;/g, 'ς');
  20775. str = str.replace(/&sigma;|&#963;|&#x3c3;/g, 'σ');
  20776. str = str.replace(/&tau;|&#964;|&#x3c4;/g, 'τ');
  20777. str = str.replace(/&upsilon;|&#965;|&#x3c5;/g, 'υ');
  20778. str = str.replace(/&phi;|&#966;|&#x3c6;/g, 'φ');
  20779. str = str.replace(/&chi;|&#967;|&#x3c7;/g, 'χ');
  20780. str = str.replace(/&psi;|&#968;|&#x3c8;/g, 'ψ');
  20781. str = str.replace(/&omega;|&#969;|&#x3c9;/g, 'ω');
  20782. str = str.replace(/&thetasym;|&#977;|&#x3d1;/g, 'ϑ');
  20783. str = str.replace(/&upsih;|&#978;|&#x3d2;/g, 'ϒ');
  20784. str = str.replace(/&piv;|&#982;|&#x3d6;/g, 'ϖ');
  20785. str = str.replace(/&middot;|&#183;|&#xb7;/g, '·');
  20786. return str;
  20787. }
  20788. function strcharacterDiscode(str) {
  20789. // 加入常用解析
  20790. // str = str.replace(/&nbsp;|&#32;|&#x20;/g, "&nbsp;");
  20791. // str = str.replace(/&ensp;|&#8194;|&#x2002;/g, '&ensp;');
  20792. // str = str.replace(/&#12288;|&#x3000;/g, '<span class=\'spaceshow\'> </span>');
  20793. // str = str.replace(/&emsp;|&#8195;|&#x2003;/g, '&emsp;');
  20794. // str = str.replace(/&quot;|&#34;|&#x22;/g, "\"");
  20795. // str = str.replace(/&apos;|&#39;|&#x27;/g, "&apos;");
  20796. // str = str.replace(/&acute;|&#180;|&#xB4;/g, "´");
  20797. // str = str.replace(/&times;|&#215;|&#xD7;/g, "×");
  20798. // str = str.replace(/&divide;|&#247;|&#xF7;/g, "÷");
  20799. // str = str.replace(/&amp;|&#38;|&#x26;/g, '&amp;');
  20800. // str = str.replace(/&lt;|&#60;|&#x3c;/g, '&lt;');
  20801. // str = str.replace(/&gt;|&#62;|&#x3e;/g, '&gt;');
  20802. str = str.replace(/&nbsp;|&#32;|&#x20;/g, "<span class='spaceshow'> </span>");
  20803. str = str.replace(/&ensp;|&#8194;|&#x2002;/g, '<span class=\'spaceshow\'> </span>');
  20804. str = str.replace(/&#12288;|&#x3000;/g, '<span class=\'spaceshow\'> </span>');
  20805. str = str.replace(/&emsp;|&#8195;|&#x2003;/g, '<span class=\'spaceshow\'> </span>');
  20806. str = str.replace(/&quot;|&#34;|&#x22;/g, "\"");
  20807. str = str.replace(/&quot;|&#39;|&#x27;/g, "'");
  20808. str = str.replace(/&acute;|&#180;|&#xB4;/g, "´");
  20809. str = str.replace(/&times;|&#215;|&#xD7;/g, "×");
  20810. str = str.replace(/&divide;|&#247;|&#xF7;/g, "÷");
  20811. str = str.replace(/&amp;|&#38;|&#x26;/g, '&');
  20812. str = str.replace(/&lt;|&#60;|&#x3c;/g, '<');
  20813. str = str.replace(/&gt;|&#62;|&#x3e;/g, '>');
  20814. return str;
  20815. }
  20816. // HTML 支持的其他实体
  20817. function strOtherDiscode(str) {
  20818. str = str.replace(/&OElig;|&#338;|&#x152;/g, 'Œ');
  20819. str = str.replace(/&oelig;|&#339;|&#x153;/g, 'œ');
  20820. str = str.replace(/&Scaron;|&#352;|&#x160;/g, 'Š');
  20821. str = str.replace(/&scaron;|&#353;|&#x161;/g, 'š');
  20822. str = str.replace(/&Yuml;|&#376;|&#x178;/g, 'Ÿ');
  20823. str = str.replace(/&fnof;|&#402;|&#x192;/g, 'ƒ');
  20824. str = str.replace(/&circ;|&#710;|&#x2c6;/g, 'ˆ');
  20825. str = str.replace(/&tilde;|&#732;|&#x2dc;/g, '˜');
  20826. str = str.replace(/&thinsp;|$#8201;|&#x2009;/g, '<span class=\'spaceshow\'> </span>');
  20827. str = str.replace(/&zwnj;|&#8204;|&#x200C;/g, '<span class=\'spaceshow\'>‌</span>');
  20828. str = str.replace(/&zwj;|$#8205;|&#x200D;/g, '<span class=\'spaceshow\'>‍</span>');
  20829. str = str.replace(/&lrm;|$#8206;|&#x200E;/g, '<span class=\'spaceshow\'>‎</span>');
  20830. str = str.replace(/&rlm;|&#8207;|&#x200F;/g, '<span class=\'spaceshow\'>‏</span>');
  20831. str = str.replace(/&ndash;|&#8211;|&#x2013;/g, '–');
  20832. str = str.replace(/&mdash;|&#8212;|&#x2014;/g, '—');
  20833. str = str.replace(/&lsquo;|&#8216;|&#x2018;/g, '‘');
  20834. str = str.replace(/&rsquo;|&#8217;|&#x2019;/g, '’');
  20835. str = str.replace(/&sbquo;|&#8218;|&#x201a;/g, '‚');
  20836. str = str.replace(/&ldquo;|&#8220;|&#x201c;/g, '“');
  20837. str = str.replace(/&rdquo;|&#8221;|&#x201d;/g, '”');
  20838. str = str.replace(/&bdquo;|&#8222;|&#x201e;/g, '„');
  20839. str = str.replace(/&dagger;|&#8224;|&#x2020;/g, '†');
  20840. str = str.replace(/&Dagger;|&#8225;|&#x2021;/g, '‡');
  20841. str = str.replace(/&bull;|&#8226;|&#x2022;/g, '•');
  20842. str = str.replace(/&hellip;|&#8230;|&#x2026;/g, '…');
  20843. str = str.replace(/&permil;|&#8240;|&#x2030;/g, '‰');
  20844. str = str.replace(/&prime;|&#8242;|&#x2032;/g, '′');
  20845. str = str.replace(/&Prime;|&#8243;|&#x2033;/g, '″');
  20846. str = str.replace(/&lsaquo;|&#8249;|&#x2039;/g, '‹');
  20847. str = str.replace(/&rsaquo;|&#8250;|&#x203a;/g, '›');
  20848. str = str.replace(/&oline;|&#8254;|&#x203e;/g, '‾');
  20849. str = str.replace(/&euro;|&#8364;|&#x20ac;/g, '€');
  20850. str = str.replace(/&trade;|&#8482;|&#x2122;/g, '™');
  20851. str = str.replace(/&larr;|&#8592;|&#x2190;/g, '←');
  20852. str = str.replace(/&uarr;|&#8593;|&#x2191;/g, '↑');
  20853. str = str.replace(/&rarr;|&#8594;|&#x2192;/g, '→');
  20854. str = str.replace(/&darr;|&#8595;|&#x2193;/g, '↓');
  20855. str = str.replace(/&harr;|&#8596;|&#x2194;/g, '↔');
  20856. str = str.replace(/&crarr;|&#8629;|&#x21b5;/g, '↵');
  20857. str = str.replace(/&lceil;|&#8968;|&#x2308;/g, '⌈');
  20858. str = str.replace(/&rceil;|&#8969;|&#x2309;/g, '⌉');
  20859. str = str.replace(/&lfloor;|&#8970;|&#x230a;/g, '⌊');
  20860. str = str.replace(/&rfloor;|&#8971;|&#x230b;/g, '⌋');
  20861. str = str.replace(/&loz;|&#9674;|&#x25ca;/g, '◊');
  20862. str = str.replace(/&spades;|&#9824;|&#x2660;/g, '♠');
  20863. str = str.replace(/&clubs;|&#9827;|&#x2663;/g, '♣');
  20864. str = str.replace(/&hearts;|&#9829;|&#x2665;/g, '♥');
  20865. str = str.replace(/&diams;|&#9830;|&#x2666;/g, '♦');
  20866. return str;
  20867. }
  20868. function strDiscode(str) {
  20869. str = strNumDiscode(str);
  20870. str = strGreeceDiscode(str);
  20871. str = strcharacterDiscode(str);
  20872. str = strOtherDiscode(str);
  20873. return str;
  20874. }
  20875. function urlToHttpUrl(url, domain) {
  20876. if (/^\/\//.test(url)) {
  20877. return "https:".concat(url);
  20878. } else if (/^\//.test(url)) {
  20879. return "https://".concat(domain).concat(url);
  20880. }
  20881. return url;
  20882. }
  20883. var _default = {
  20884. strDiscode: strDiscode,
  20885. urlToHttpUrl: urlToHttpUrl
  20886. };
  20887. exports.default = _default;
  20888. /***/ }),
  20889. /***/ 427:
  20890. /*!**********************************************************************!*\
  20891. !*** E:/项目资料/智慧社区/Applet/components/gaoyia-parse/libs/htmlparser.js ***!
  20892. \**********************************************************************/
  20893. /*! no static exports found */
  20894. /***/ (function(module, exports, __webpack_require__) {
  20895. "use strict";
  20896. Object.defineProperty(exports, "__esModule", {
  20897. value: true
  20898. });
  20899. exports.default = void 0;
  20900. /**
  20901. *
  20902. * htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser
  20903. *
  20904. * author: Di (微信小程序开发工程师)
  20905. * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
  20906. * 垂直微信小程序开发交流社区
  20907. *
  20908. * github地址: https://github.com/icindy/wxParse
  20909. *
  20910. * for: 微信小程序富文本解析
  20911. * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
  20912. */
  20913. // Regular Expressions for parsing tags and attributes
  20914. var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z0-9_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
  20915. var endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/;
  20916. var attr = /([a-zA-Z0-9_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
  20917. function makeMap(str) {
  20918. var obj = {};
  20919. var items = str.split(',');
  20920. for (var i = 0; i < items.length; i += 1) {
  20921. obj[items[i]] = true;
  20922. }
  20923. return obj;
  20924. }
  20925. // Empty Elements - HTML 5
  20926. var empty = makeMap('area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr');
  20927. // Block Elements - HTML 5
  20928. var block = makeMap('address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video');
  20929. // Inline Elements - HTML 5
  20930. var inline = makeMap('a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var');
  20931. // Elements that you can, intentionally, leave open
  20932. // (and which close themselves)
  20933. var closeSelf = makeMap('colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr');
  20934. // Attributes that have their values filled in disabled="disabled"
  20935. var fillAttrs = makeMap('checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected');
  20936. function HTMLParser(html, handler) {
  20937. var index;
  20938. var chars;
  20939. var match;
  20940. var last = html;
  20941. var stack = [];
  20942. stack.last = function () {
  20943. return stack[stack.length - 1];
  20944. };
  20945. function parseEndTag(tag, tagName) {
  20946. // If no tag name is provided, clean shop
  20947. var pos;
  20948. if (!tagName) {
  20949. pos = 0;
  20950. } else {
  20951. // Find the closest opened tag of the same type
  20952. tagName = tagName.toLowerCase();
  20953. for (pos = stack.length - 1; pos >= 0; pos -= 1) {
  20954. if (stack[pos] === tagName) break;
  20955. }
  20956. }
  20957. if (pos >= 0) {
  20958. // Close all the open elements, up the stack
  20959. for (var i = stack.length - 1; i >= pos; i -= 1) {
  20960. if (handler.end) handler.end(stack[i]);
  20961. }
  20962. // Remove the open elements from the stack
  20963. stack.length = pos;
  20964. }
  20965. }
  20966. function parseStartTag(tag, tagName, rest, unary) {
  20967. tagName = tagName.toLowerCase();
  20968. if (block[tagName]) {
  20969. while (stack.last() && inline[stack.last()]) {
  20970. parseEndTag('', stack.last());
  20971. }
  20972. }
  20973. if (closeSelf[tagName] && stack.last() === tagName) {
  20974. parseEndTag('', tagName);
  20975. }
  20976. unary = empty[tagName] || !!unary;
  20977. if (!unary) stack.push(tagName);
  20978. if (handler.start) {
  20979. var attrs = [];
  20980. rest.replace(attr, function genAttr(matches, name) {
  20981. var value = arguments[2] || arguments[3] || arguments[4] || (fillAttrs[name] ? name : '');
  20982. attrs.push({
  20983. name: name,
  20984. value: value,
  20985. escaped: value.replace(/(^|[^\\])"/g, '$1\\"') // "
  20986. });
  20987. });
  20988. if (handler.start) {
  20989. handler.start(tagName, attrs, unary);
  20990. }
  20991. }
  20992. }
  20993. while (html) {
  20994. chars = true;
  20995. if (html.indexOf('</') === 0) {
  20996. match = html.match(endTag);
  20997. if (match) {
  20998. html = html.substring(match[0].length);
  20999. match[0].replace(endTag, parseEndTag);
  21000. chars = false;
  21001. }
  21002. // start tag
  21003. } else if (html.indexOf('<') === 0) {
  21004. match = html.match(startTag);
  21005. if (match) {
  21006. html = html.substring(match[0].length);
  21007. match[0].replace(startTag, parseStartTag);
  21008. chars = false;
  21009. }
  21010. }
  21011. if (chars) {
  21012. index = html.indexOf('<');
  21013. var text = '';
  21014. while (index === 0) {
  21015. text += '<';
  21016. html = html.substring(1);
  21017. index = html.indexOf('<');
  21018. }
  21019. text += index < 0 ? html : html.substring(0, index);
  21020. html = index < 0 ? '' : html.substring(index);
  21021. if (handler.chars) handler.chars(text);
  21022. }
  21023. if (html === last) throw new Error("Parse Error: ".concat(html));
  21024. last = html;
  21025. }
  21026. // Clean up any remaining tags
  21027. parseEndTag();
  21028. }
  21029. var _default = HTMLParser;
  21030. exports.default = _default;
  21031. /***/ }),
  21032. /***/ 43:
  21033. /*!*****************************************!*\
  21034. !*** E:/项目资料/智慧社区/Applet/api/system.js ***!
  21035. \*****************************************/
  21036. /*! no static exports found */
  21037. /***/ (function(module, exports, __webpack_require__) {
  21038. "use strict";
  21039. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21040. Object.defineProperty(exports, "__esModule", {
  21041. value: true
  21042. });
  21043. exports.default = void 0;
  21044. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  21045. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  21046. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  21047. var getSystemNoticeList = /*#__PURE__*/function () {
  21048. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  21049. var res;
  21050. return _regenerator.default.wrap(function _callee$(_context) {
  21051. while (1) {
  21052. switch (_context.prev = _context.next) {
  21053. case 0:
  21054. _context.next = 2;
  21055. return _request.default.get({
  21056. url: "/system/notice/list",
  21057. data: data
  21058. });
  21059. case 2:
  21060. res = _context.sent;
  21061. return _context.abrupt("return", res.data);
  21062. case 4:
  21063. case "end":
  21064. return _context.stop();
  21065. }
  21066. }
  21067. }, _callee);
  21068. }));
  21069. return function getSystemNoticeList(_x) {
  21070. return _ref.apply(this, arguments);
  21071. };
  21072. }();
  21073. var getSystemNoticeNew = /*#__PURE__*/function () {
  21074. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  21075. var res;
  21076. return _regenerator.default.wrap(function _callee2$(_context2) {
  21077. while (1) {
  21078. switch (_context2.prev = _context2.next) {
  21079. case 0:
  21080. _context2.next = 2;
  21081. return _request.default.get({
  21082. url: '/system/notice/newest'
  21083. });
  21084. case 2:
  21085. res = _context2.sent;
  21086. return _context2.abrupt("return", res.data);
  21087. case 4:
  21088. case "end":
  21089. return _context2.stop();
  21090. }
  21091. }
  21092. }, _callee2);
  21093. }));
  21094. return function getSystemNoticeNew(_x2) {
  21095. return _ref2.apply(this, arguments);
  21096. };
  21097. }();
  21098. var getSystemNoticeDetails = /*#__PURE__*/function () {
  21099. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref3) {
  21100. var id, res;
  21101. return _regenerator.default.wrap(function _callee3$(_context3) {
  21102. while (1) {
  21103. switch (_context3.prev = _context3.next) {
  21104. case 0:
  21105. id = _ref3.id;
  21106. _context3.next = 3;
  21107. return _request.default.get({
  21108. url: "/system/notice/".concat(id)
  21109. });
  21110. case 3:
  21111. res = _context3.sent;
  21112. return _context3.abrupt("return", res.data);
  21113. case 5:
  21114. case "end":
  21115. return _context3.stop();
  21116. }
  21117. }
  21118. }, _callee3);
  21119. }));
  21120. return function getSystemNoticeDetails(_x3) {
  21121. return _ref4.apply(this, arguments);
  21122. };
  21123. }();
  21124. var _default = {
  21125. getSystemNoticeList: getSystemNoticeList,
  21126. getSystemNoticeNew: getSystemNoticeNew,
  21127. getSystemNoticeDetails: getSystemNoticeDetails
  21128. };
  21129. exports.default = _default;
  21130. /***/ }),
  21131. /***/ 433:
  21132. /*!********************************************************************************************!*\
  21133. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/index.js ***!
  21134. \********************************************************************************************/
  21135. /*! no static exports found */
  21136. /***/ (function(module, exports, __webpack_require__) {
  21137. "use strict";
  21138. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21139. Object.defineProperty(exports, "__esModule", {
  21140. value: true
  21141. });
  21142. exports.default = void 0;
  21143. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 434));
  21144. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 435));
  21145. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 436));
  21146. var _default = {
  21147. en: _en.default,
  21148. 'zh-Hans': _zhHans.default,
  21149. 'zh-Hant': _zhHant.default
  21150. };
  21151. exports.default = _default;
  21152. /***/ }),
  21153. /***/ 434:
  21154. /*!*******************************************************************************************!*\
  21155. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/en.json ***!
  21156. \*******************************************************************************************/
  21157. /*! exports provided: uni-goods-nav.options.shop, uni-goods-nav.options.cart, uni-goods-nav.buttonGroup.addToCart, uni-goods-nav.buttonGroup.buyNow, default */
  21158. /***/ (function(module) {
  21159. module.exports = JSON.parse("{\"uni-goods-nav.options.shop\":\"shop\",\"uni-goods-nav.options.cart\":\"cart\",\"uni-goods-nav.buttonGroup.addToCart\":\"add to cart\",\"uni-goods-nav.buttonGroup.buyNow\":\"buy now\"}");
  21160. /***/ }),
  21161. /***/ 435:
  21162. /*!************************************************************************************************!*\
  21163. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/zh-Hans.json ***!
  21164. \************************************************************************************************/
  21165. /*! exports provided: uni-goods-nav.options.shop, uni-goods-nav.options.cart, uni-goods-nav.buttonGroup.addToCart, uni-goods-nav.buttonGroup.buyNow, default */
  21166. /***/ (function(module) {
  21167. module.exports = JSON.parse("{\"uni-goods-nav.options.shop\":\"店铺\",\"uni-goods-nav.options.cart\":\"购物车\",\"uni-goods-nav.buttonGroup.addToCart\":\"加入购物车\",\"uni-goods-nav.buttonGroup.buyNow\":\"立即购买\"}");
  21168. /***/ }),
  21169. /***/ 436:
  21170. /*!************************************************************************************************!*\
  21171. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-goods-nav/components/uni-goods-nav/i18n/zh-Hant.json ***!
  21172. \************************************************************************************************/
  21173. /*! exports provided: uni-goods-nav.options.shop, uni-goods-nav.options.cart, uni-goods-nav.buttonGroup.addToCart, uni-goods-nav.buttonGroup.buyNow, default */
  21174. /***/ (function(module) {
  21175. module.exports = JSON.parse("{\"uni-goods-nav.options.shop\":\"店鋪\",\"uni-goods-nav.options.cart\":\"購物車\",\"uni-goods-nav.buttonGroup.addToCart\":\"加入購物車\",\"uni-goods-nav.buttonGroup.buyNow\":\"立即購買\"}");
  21176. /***/ }),
  21177. /***/ 44:
  21178. /*!******************************************!*\
  21179. !*** E:/项目资料/智慧社区/Applet/api/request.js ***!
  21180. \******************************************/
  21181. /*! no static exports found */
  21182. /***/ (function(module, exports, __webpack_require__) {
  21183. "use strict";
  21184. /* WEBPACK VAR INJECTION */(function(uni, wx) {
  21185. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21186. Object.defineProperty(exports, "__esModule", {
  21187. value: true
  21188. });
  21189. exports.default = void 0;
  21190. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  21191. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  21192. var _env = __webpack_require__(/*! ../env.js */ 45);
  21193. var request = function request(_ref) {
  21194. var url = _ref.url,
  21195. method = _ref.method,
  21196. data = _ref.data,
  21197. header = _ref.header;
  21198. return new Promise(function (resolve, reject) {
  21199. var token = uni.getStorageSync('token');
  21200. uni.request({
  21201. url: url.includes('http') ? url : _env.BASE_URL.url + url,
  21202. method: method,
  21203. data: data,
  21204. header: {
  21205. 'Authorization': url == '/login' ? '' : "Bearer ".concat(token)
  21206. },
  21207. dataType: 'json',
  21208. success: function success(res) {
  21209. if (res.data.errcode && res.data.errcode != 0) {
  21210. wx.showToast({
  21211. title: res.data.details || '获取失败',
  21212. icon: 'error'
  21213. });
  21214. }
  21215. if (res.data.code && res.data.code !== 200) {
  21216. wx.showToast({
  21217. title: res.data.msg
  21218. });
  21219. }
  21220. if (res.data.code && res.data.code == 401) {
  21221. uni.redirectTo({
  21222. url: '/pages/login/index'
  21223. });
  21224. }
  21225. resolve(res);
  21226. },
  21227. fail: function fail(err) {
  21228. uni.showToast({
  21229. title: "请求接口失败!"
  21230. });
  21231. reject(err);
  21232. }
  21233. });
  21234. });
  21235. };
  21236. var get = /*#__PURE__*/function () {
  21237. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref2) {
  21238. var url, data, header;
  21239. return _regenerator.default.wrap(function _callee$(_context) {
  21240. while (1) {
  21241. switch (_context.prev = _context.next) {
  21242. case 0:
  21243. url = _ref2.url, data = _ref2.data, header = _ref2.header;
  21244. _context.next = 3;
  21245. return request({
  21246. url: url,
  21247. method: 'get',
  21248. data: data,
  21249. header: header
  21250. });
  21251. case 3:
  21252. return _context.abrupt("return", _context.sent);
  21253. case 4:
  21254. case "end":
  21255. return _context.stop();
  21256. }
  21257. }
  21258. }, _callee);
  21259. }));
  21260. return function get(_x) {
  21261. return _ref3.apply(this, arguments);
  21262. };
  21263. }();
  21264. var post = /*#__PURE__*/function () {
  21265. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  21266. var url, data, header;
  21267. return _regenerator.default.wrap(function _callee2$(_context2) {
  21268. while (1) {
  21269. switch (_context2.prev = _context2.next) {
  21270. case 0:
  21271. url = _ref4.url, data = _ref4.data, header = _ref4.header;
  21272. _context2.next = 3;
  21273. return request({
  21274. url: url,
  21275. method: 'post',
  21276. data: data,
  21277. header: header
  21278. });
  21279. case 3:
  21280. return _context2.abrupt("return", _context2.sent);
  21281. case 4:
  21282. case "end":
  21283. return _context2.stop();
  21284. }
  21285. }
  21286. }, _callee2);
  21287. }));
  21288. return function post(_x2) {
  21289. return _ref5.apply(this, arguments);
  21290. };
  21291. }();
  21292. var put = /*#__PURE__*/function () {
  21293. var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref6) {
  21294. var url, data, header;
  21295. return _regenerator.default.wrap(function _callee3$(_context3) {
  21296. while (1) {
  21297. switch (_context3.prev = _context3.next) {
  21298. case 0:
  21299. url = _ref6.url, data = _ref6.data, header = _ref6.header;
  21300. _context3.next = 3;
  21301. return request({
  21302. url: url,
  21303. method: 'put',
  21304. data: data,
  21305. header: header
  21306. });
  21307. case 3:
  21308. return _context3.abrupt("return", _context3.sent);
  21309. case 4:
  21310. case "end":
  21311. return _context3.stop();
  21312. }
  21313. }
  21314. }, _callee3);
  21315. }));
  21316. return function put(_x3) {
  21317. return _ref7.apply(this, arguments);
  21318. };
  21319. }();
  21320. var del = /*#__PURE__*/function () {
  21321. var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref8) {
  21322. var url, data, header;
  21323. return _regenerator.default.wrap(function _callee4$(_context4) {
  21324. while (1) {
  21325. switch (_context4.prev = _context4.next) {
  21326. case 0:
  21327. url = _ref8.url, data = _ref8.data, header = _ref8.header;
  21328. _context4.next = 3;
  21329. return request({
  21330. url: url,
  21331. method: 'delete',
  21332. data: data,
  21333. header: header
  21334. });
  21335. case 3:
  21336. return _context4.abrupt("return", _context4.sent);
  21337. case 4:
  21338. case "end":
  21339. return _context4.stop();
  21340. }
  21341. }
  21342. }, _callee4);
  21343. }));
  21344. return function del(_x4) {
  21345. return _ref9.apply(this, arguments);
  21346. };
  21347. }();
  21348. var _default = {
  21349. get: get,
  21350. post: post,
  21351. put: put,
  21352. del: del
  21353. };
  21354. exports.default = _default;
  21355. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  21356. /***/ }),
  21357. /***/ 45:
  21358. /*!**********************************!*\
  21359. !*** E:/项目资料/智慧社区/Applet/env.js ***!
  21360. \**********************************/
  21361. /*! no static exports found */
  21362. /***/ (function(module, exports, __webpack_require__) {
  21363. "use strict";
  21364. Object.defineProperty(exports, "__esModule", {
  21365. value: true
  21366. });
  21367. exports.BASE_URL = void 0;
  21368. var ENV_API_URL = {
  21369. development: {
  21370. url: 'http://192.168.0.18:7070/api',
  21371. imgUrl: 'http://192.168.0.19/static/wxa',
  21372. fileUrl: 'http://192.168.0.18:80'
  21373. },
  21374. // development: {
  21375. // url: 'https://fuyu.cc-lotus.info/wx-api/api',
  21376. // imgUrl: 'https://fuyu.cc-lotus.info/static/wxa',
  21377. // fileUrl: 'https://fuyu.cc-lotus.info'
  21378. // },
  21379. production: {
  21380. url: 'https://fuyu.scapp.cn/wx-api/api',
  21381. imgUrl: 'https://fuyu.scapp.cn/static/wxa/',
  21382. fileUrl: 'https://fuyu.scapp.cn'
  21383. }
  21384. };
  21385. var BASE_URL = ENV_API_URL["development" || false];
  21386. exports.BASE_URL = BASE_URL;
  21387. /***/ }),
  21388. /***/ 46:
  21389. /*!****************************************!*\
  21390. !*** E:/项目资料/智慧社区/Applet/api/login.js ***!
  21391. \****************************************/
  21392. /*! no static exports found */
  21393. /***/ (function(module, exports, __webpack_require__) {
  21394. "use strict";
  21395. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21396. Object.defineProperty(exports, "__esModule", {
  21397. value: true
  21398. });
  21399. exports.default = void 0;
  21400. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  21401. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  21402. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  21403. var _env = __webpack_require__(/*! ../env.js */ 45);
  21404. var login = /*#__PURE__*/function () {
  21405. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  21406. var res;
  21407. return _regenerator.default.wrap(function _callee$(_context) {
  21408. while (1) {
  21409. switch (_context.prev = _context.next) {
  21410. case 0:
  21411. _context.next = 2;
  21412. return _request.default.post({
  21413. url: "/user/login",
  21414. data: data
  21415. });
  21416. case 2:
  21417. res = _context.sent;
  21418. return _context.abrupt("return", res.data);
  21419. case 4:
  21420. case "end":
  21421. return _context.stop();
  21422. }
  21423. }
  21424. }, _callee);
  21425. }));
  21426. return function login(_x) {
  21427. return _ref.apply(this, arguments);
  21428. };
  21429. }();
  21430. var getPhone = /*#__PURE__*/function () {
  21431. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  21432. var res;
  21433. return _regenerator.default.wrap(function _callee2$(_context2) {
  21434. while (1) {
  21435. switch (_context2.prev = _context2.next) {
  21436. case 0:
  21437. _context2.next = 2;
  21438. return _request.default.post({
  21439. url: "/wxa/business/getuserphonenumber?appid=".concat(data.appid),
  21440. data: {
  21441. code: data.code
  21442. }
  21443. });
  21444. case 2:
  21445. res = _context2.sent;
  21446. return _context2.abrupt("return", res.data);
  21447. case 4:
  21448. case "end":
  21449. return _context2.stop();
  21450. }
  21451. }
  21452. }, _callee2);
  21453. }));
  21454. return function getPhone(_x2) {
  21455. return _ref2.apply(this, arguments);
  21456. };
  21457. }();
  21458. var getJson = /*#__PURE__*/function () {
  21459. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  21460. var res;
  21461. return _regenerator.default.wrap(function _callee3$(_context3) {
  21462. while (1) {
  21463. switch (_context3.prev = _context3.next) {
  21464. case 0:
  21465. _context3.next = 2;
  21466. return _request.default.get({
  21467. url: "".concat(_env.BASE_URL.imgUrl, "/config.json")
  21468. });
  21469. case 2:
  21470. res = _context3.sent;
  21471. return _context3.abrupt("return", res);
  21472. case 4:
  21473. case "end":
  21474. return _context3.stop();
  21475. }
  21476. }
  21477. }, _callee3);
  21478. }));
  21479. return function getJson() {
  21480. return _ref3.apply(this, arguments);
  21481. };
  21482. }();
  21483. var _default = {
  21484. login: login,
  21485. getPhone: getPhone,
  21486. getJson: getJson
  21487. };
  21488. exports.default = _default;
  21489. /***/ }),
  21490. /***/ 463:
  21491. /*!**************************************************************************************************!*\
  21492. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js ***!
  21493. \**************************************************************************************************/
  21494. /*! no static exports found */
  21495. /***/ (function(module, exports, __webpack_require__) {
  21496. "use strict";
  21497. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21498. Object.defineProperty(exports, "__esModule", {
  21499. value: true
  21500. });
  21501. exports.default = void 0;
  21502. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  21503. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  21504. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  21505. var Calendar = /*#__PURE__*/function () {
  21506. function Calendar() {
  21507. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  21508. date = _ref.date,
  21509. selected = _ref.selected,
  21510. startDate = _ref.startDate,
  21511. endDate = _ref.endDate,
  21512. range = _ref.range;
  21513. (0, _classCallCheck2.default)(this, Calendar);
  21514. // 当前日期
  21515. this.date = this.getDate(new Date()); // 当前初入日期
  21516. // 打点信息
  21517. this.selected = selected || [];
  21518. // 范围开始
  21519. this.startDate = startDate;
  21520. // 范围结束
  21521. this.endDate = endDate;
  21522. this.range = range;
  21523. // 多选状态
  21524. this.cleanMultipleStatus();
  21525. // 每周日期
  21526. this.weeks = {};
  21527. // this._getWeek(this.date.fullDate)
  21528. // this.multipleStatus = multipleStatus
  21529. this.lastHover = false;
  21530. }
  21531. /**
  21532. * 设置日期
  21533. * @param {Object} date
  21534. */
  21535. (0, _createClass2.default)(Calendar, [{
  21536. key: "setDate",
  21537. value: function setDate(date) {
  21538. this.selectDate = this.getDate(date);
  21539. this._getWeek(this.selectDate.fullDate);
  21540. }
  21541. /**
  21542. * 清理多选状态
  21543. */
  21544. }, {
  21545. key: "cleanMultipleStatus",
  21546. value: function cleanMultipleStatus() {
  21547. this.multipleStatus = {
  21548. before: '',
  21549. after: '',
  21550. data: []
  21551. };
  21552. }
  21553. /**
  21554. * 重置开始日期
  21555. */
  21556. }, {
  21557. key: "resetSatrtDate",
  21558. value: function resetSatrtDate(startDate) {
  21559. // 范围开始
  21560. this.startDate = startDate;
  21561. }
  21562. /**
  21563. * 重置结束日期
  21564. */
  21565. }, {
  21566. key: "resetEndDate",
  21567. value: function resetEndDate(endDate) {
  21568. // 范围结束
  21569. this.endDate = endDate;
  21570. }
  21571. /**
  21572. * 获取任意时间
  21573. */
  21574. }, {
  21575. key: "getDate",
  21576. value: function getDate(date) {
  21577. var AddDayCount = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  21578. var str = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'day';
  21579. if (!date) {
  21580. date = new Date();
  21581. }
  21582. if ((0, _typeof2.default)(date) !== 'object') {
  21583. date = date.replace(/-/g, '/');
  21584. }
  21585. var dd = new Date(date);
  21586. switch (str) {
  21587. case 'day':
  21588. dd.setDate(dd.getDate() + AddDayCount); // 获取AddDayCount天后的日期
  21589. break;
  21590. case 'month':
  21591. if (dd.getDate() === 31) {
  21592. dd.setDate(dd.getDate() + AddDayCount);
  21593. } else {
  21594. dd.setMonth(dd.getMonth() + AddDayCount); // 获取AddDayCount天后的日期
  21595. }
  21596. break;
  21597. case 'year':
  21598. dd.setFullYear(dd.getFullYear() + AddDayCount); // 获取AddDayCount天后的日期
  21599. break;
  21600. }
  21601. var y = dd.getFullYear();
  21602. var m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1; // 获取当前月份的日期,不足10补0
  21603. var d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate(); // 获取当前几号,不足10补0
  21604. return {
  21605. fullDate: y + '-' + m + '-' + d,
  21606. year: y,
  21607. month: m,
  21608. date: d,
  21609. day: dd.getDay()
  21610. };
  21611. }
  21612. /**
  21613. * 获取上月剩余天数
  21614. */
  21615. }, {
  21616. key: "_getLastMonthDays",
  21617. value: function _getLastMonthDays(firstDay, full) {
  21618. var dateArr = [];
  21619. for (var i = firstDay; i > 0; i--) {
  21620. var beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate();
  21621. dateArr.push({
  21622. date: beforeDate,
  21623. month: full.month - 1,
  21624. disable: true
  21625. });
  21626. }
  21627. return dateArr;
  21628. }
  21629. /**
  21630. * 获取本月天数
  21631. */
  21632. }, {
  21633. key: "_currentMonthDys",
  21634. value: function _currentMonthDys(dateData, full) {
  21635. var _this = this;
  21636. var dateArr = [];
  21637. var fullDate = this.date.fullDate;
  21638. var _loop = function _loop(i) {
  21639. var isinfo = false;
  21640. var nowDate = full.year + '-' + (full.month < 10 ? full.month : full.month) + '-' + (i < 10 ? '0' + i : i);
  21641. // 是否今天
  21642. var isDay = fullDate === nowDate;
  21643. // 获取打点信息
  21644. var info = _this.selected && _this.selected.find(function (item) {
  21645. if (_this.dateEqual(nowDate, item.date)) {
  21646. return item;
  21647. }
  21648. });
  21649. // 日期禁用
  21650. var disableBefore = true;
  21651. var disableAfter = true;
  21652. if (_this.startDate) {
  21653. // let dateCompBefore = this.dateCompare(this.startDate, fullDate)
  21654. // disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate)
  21655. disableBefore = _this.dateCompare(_this.startDate, nowDate);
  21656. }
  21657. if (_this.endDate) {
  21658. // let dateCompAfter = this.dateCompare(fullDate, this.endDate)
  21659. // disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate)
  21660. disableAfter = _this.dateCompare(nowDate, _this.endDate);
  21661. }
  21662. var multiples = _this.multipleStatus.data;
  21663. var checked = false;
  21664. var multiplesStatus = -1;
  21665. if (_this.range) {
  21666. if (multiples) {
  21667. multiplesStatus = multiples.findIndex(function (item) {
  21668. return _this.dateEqual(item, nowDate);
  21669. });
  21670. }
  21671. if (multiplesStatus !== -1) {
  21672. checked = true;
  21673. }
  21674. }
  21675. var data = {
  21676. fullDate: nowDate,
  21677. year: full.year,
  21678. date: i,
  21679. multiple: _this.range ? checked : false,
  21680. beforeMultiple: _this.isLogicBefore(nowDate, _this.multipleStatus.before, _this.multipleStatus.after),
  21681. afterMultiple: _this.isLogicAfter(nowDate, _this.multipleStatus.before, _this.multipleStatus.after),
  21682. month: full.month,
  21683. disable: !(disableBefore && disableAfter),
  21684. isDay: isDay,
  21685. userChecked: false
  21686. };
  21687. if (info) {
  21688. data.extraInfo = info;
  21689. }
  21690. dateArr.push(data);
  21691. };
  21692. for (var i = 1; i <= dateData; i++) {
  21693. _loop(i);
  21694. }
  21695. return dateArr;
  21696. }
  21697. /**
  21698. * 获取下月天数
  21699. */
  21700. }, {
  21701. key: "_getNextMonthDays",
  21702. value: function _getNextMonthDays(surplus, full) {
  21703. var dateArr = [];
  21704. for (var i = 1; i < surplus + 1; i++) {
  21705. dateArr.push({
  21706. date: i,
  21707. month: Number(full.month) + 1,
  21708. disable: true
  21709. });
  21710. }
  21711. return dateArr;
  21712. }
  21713. /**
  21714. * 获取当前日期详情
  21715. * @param {Object} date
  21716. */
  21717. }, {
  21718. key: "getInfo",
  21719. value: function getInfo(date) {
  21720. var _this2 = this;
  21721. if (!date) {
  21722. date = new Date();
  21723. }
  21724. var dateInfo = this.canlender.find(function (item) {
  21725. return item.fullDate === _this2.getDate(date).fullDate;
  21726. });
  21727. return dateInfo;
  21728. }
  21729. /**
  21730. * 比较时间大小
  21731. */
  21732. }, {
  21733. key: "dateCompare",
  21734. value: function dateCompare(startDate, endDate) {
  21735. // 计算截止时间
  21736. startDate = new Date(startDate.replace('-', '/').replace('-', '/'));
  21737. // 计算详细项的截止时间
  21738. endDate = new Date(endDate.replace('-', '/').replace('-', '/'));
  21739. if (startDate <= endDate) {
  21740. return true;
  21741. } else {
  21742. return false;
  21743. }
  21744. }
  21745. /**
  21746. * 比较时间是否相等
  21747. */
  21748. }, {
  21749. key: "dateEqual",
  21750. value: function dateEqual(before, after) {
  21751. // 计算截止时间
  21752. before = new Date(before.replace('-', '/').replace('-', '/'));
  21753. // 计算详细项的截止时间
  21754. after = new Date(after.replace('-', '/').replace('-', '/'));
  21755. if (before.getTime() - after.getTime() === 0) {
  21756. return true;
  21757. } else {
  21758. return false;
  21759. }
  21760. }
  21761. /**
  21762. * 比较真实起始日期
  21763. */
  21764. }, {
  21765. key: "isLogicBefore",
  21766. value: function isLogicBefore(currentDay, before, after) {
  21767. var logicBefore = before;
  21768. if (before && after) {
  21769. logicBefore = this.dateCompare(before, after) ? before : after;
  21770. }
  21771. return this.dateEqual(logicBefore, currentDay);
  21772. }
  21773. }, {
  21774. key: "isLogicAfter",
  21775. value: function isLogicAfter(currentDay, before, after) {
  21776. var logicAfter = after;
  21777. if (before && after) {
  21778. logicAfter = this.dateCompare(before, after) ? after : before;
  21779. }
  21780. return this.dateEqual(logicAfter, currentDay);
  21781. }
  21782. /**
  21783. * 获取日期范围内所有日期
  21784. * @param {Object} begin
  21785. * @param {Object} end
  21786. */
  21787. }, {
  21788. key: "geDateAll",
  21789. value: function geDateAll(begin, end) {
  21790. var arr = [];
  21791. var ab = begin.split('-');
  21792. var ae = end.split('-');
  21793. var db = new Date();
  21794. db.setFullYear(ab[0], ab[1] - 1, ab[2]);
  21795. var de = new Date();
  21796. de.setFullYear(ae[0], ae[1] - 1, ae[2]);
  21797. var unixDb = db.getTime() - 24 * 60 * 60 * 1000;
  21798. var unixDe = de.getTime() - 24 * 60 * 60 * 1000;
  21799. for (var k = unixDb; k <= unixDe;) {
  21800. k = k + 24 * 60 * 60 * 1000;
  21801. arr.push(this.getDate(new Date(parseInt(k))).fullDate);
  21802. }
  21803. return arr;
  21804. }
  21805. /**
  21806. * 获取多选状态
  21807. */
  21808. }, {
  21809. key: "setMultiple",
  21810. value: function setMultiple(fullDate) {
  21811. var _this$multipleStatus = this.multipleStatus,
  21812. before = _this$multipleStatus.before,
  21813. after = _this$multipleStatus.after;
  21814. if (!this.range) return;
  21815. if (before && after) {
  21816. if (!this.lastHover) {
  21817. this.lastHover = true;
  21818. return;
  21819. }
  21820. this.multipleStatus.before = fullDate;
  21821. this.multipleStatus.after = '';
  21822. this.multipleStatus.data = [];
  21823. this.multipleStatus.fulldate = '';
  21824. this.lastHover = false;
  21825. } else {
  21826. if (!before) {
  21827. this.multipleStatus.before = fullDate;
  21828. this.lastHover = false;
  21829. } else {
  21830. this.multipleStatus.after = fullDate;
  21831. if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  21832. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  21833. } else {
  21834. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  21835. }
  21836. this.lastHover = true;
  21837. }
  21838. }
  21839. this._getWeek(fullDate);
  21840. }
  21841. /**
  21842. * 鼠标 hover 更新多选状态
  21843. */
  21844. }, {
  21845. key: "setHoverMultiple",
  21846. value: function setHoverMultiple(fullDate) {
  21847. var _this$multipleStatus2 = this.multipleStatus,
  21848. before = _this$multipleStatus2.before,
  21849. after = _this$multipleStatus2.after;
  21850. if (!this.range) return;
  21851. if (this.lastHover) return;
  21852. if (!before) {
  21853. this.multipleStatus.before = fullDate;
  21854. } else {
  21855. this.multipleStatus.after = fullDate;
  21856. if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
  21857. this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
  21858. } else {
  21859. this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
  21860. }
  21861. }
  21862. this._getWeek(fullDate);
  21863. }
  21864. /**
  21865. * 更新默认值多选状态
  21866. */
  21867. }, {
  21868. key: "setDefaultMultiple",
  21869. value: function setDefaultMultiple(before, after) {
  21870. this.multipleStatus.before = before;
  21871. this.multipleStatus.after = after;
  21872. if (before && after) {
  21873. if (this.dateCompare(before, after)) {
  21874. this.multipleStatus.data = this.geDateAll(before, after);
  21875. this._getWeek(after);
  21876. } else {
  21877. this.multipleStatus.data = this.geDateAll(after, before);
  21878. this._getWeek(before);
  21879. }
  21880. }
  21881. }
  21882. /**
  21883. * 获取每周数据
  21884. * @param {Object} dateData
  21885. */
  21886. }, {
  21887. key: "_getWeek",
  21888. value: function _getWeek(dateData) {
  21889. var _this$getDate = this.getDate(dateData),
  21890. fullDate = _this$getDate.fullDate,
  21891. year = _this$getDate.year,
  21892. month = _this$getDate.month,
  21893. date = _this$getDate.date,
  21894. day = _this$getDate.day;
  21895. var firstDay = new Date(year, month - 1, 1).getDay();
  21896. var currentDay = new Date(year, month, 0).getDate();
  21897. var dates = {
  21898. lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)),
  21899. // 上个月末尾几天
  21900. currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)),
  21901. // 本月天数
  21902. nextMonthDays: [],
  21903. // 下个月开始几天
  21904. weeks: []
  21905. };
  21906. var canlender = [];
  21907. var surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length);
  21908. dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData));
  21909. canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays);
  21910. var weeks = {};
  21911. // 拼接数组 上个月开始几天 + 本月天数+ 下个月开始几天
  21912. for (var i = 0; i < canlender.length; i++) {
  21913. if (i % 7 === 0) {
  21914. weeks[parseInt(i / 7)] = new Array(7);
  21915. }
  21916. weeks[parseInt(i / 7)][i % 7] = canlender[i];
  21917. }
  21918. this.canlender = canlender;
  21919. this.weeks = weeks;
  21920. }
  21921. //静态方法
  21922. // static init(date) {
  21923. // if (!this.instance) {
  21924. // this.instance = new Calendar(date);
  21925. // }
  21926. // return this.instance;
  21927. // }
  21928. }]);
  21929. return Calendar;
  21930. }();
  21931. var _default = Calendar;
  21932. exports.default = _default;
  21933. /***/ }),
  21934. /***/ 497:
  21935. /*!*******************************************************************************!*\
  21936. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-popup/components/uni-popup/popup.js ***!
  21937. \*******************************************************************************/
  21938. /*! no static exports found */
  21939. /***/ (function(module, exports, __webpack_require__) {
  21940. "use strict";
  21941. Object.defineProperty(exports, "__esModule", {
  21942. value: true
  21943. });
  21944. exports.default = void 0;
  21945. var _default = {
  21946. data: function data() {
  21947. return {};
  21948. },
  21949. created: function created() {
  21950. this.popup = this.getParent();
  21951. },
  21952. methods: {
  21953. /**
  21954. * 获取父元素实例
  21955. */
  21956. getParent: function getParent() {
  21957. var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'uniPopup';
  21958. var parent = this.$parent;
  21959. var parentName = parent.$options.name;
  21960. while (parentName !== name) {
  21961. parent = parent.$parent;
  21962. if (!parent) return false;
  21963. parentName = parent.$options.name;
  21964. }
  21965. return parent;
  21966. }
  21967. }
  21968. };
  21969. exports.default = _default;
  21970. /***/ }),
  21971. /***/ 498:
  21972. /*!************************************************************************************!*\
  21973. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-popup/components/uni-popup/i18n/index.js ***!
  21974. \************************************************************************************/
  21975. /*! no static exports found */
  21976. /***/ (function(module, exports, __webpack_require__) {
  21977. "use strict";
  21978. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21979. Object.defineProperty(exports, "__esModule", {
  21980. value: true
  21981. });
  21982. exports.default = void 0;
  21983. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 499));
  21984. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 500));
  21985. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 501));
  21986. var _default = {
  21987. en: _en.default,
  21988. 'zh-Hans': _zhHans.default,
  21989. 'zh-Hant': _zhHant.default
  21990. };
  21991. exports.default = _default;
  21992. /***/ }),
  21993. /***/ 499:
  21994. /*!***********************************************************************************!*\
  21995. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-popup/components/uni-popup/i18n/en.json ***!
  21996. \***********************************************************************************/
  21997. /*! exports provided: uni-popup.cancel, uni-popup.ok, uni-popup.placeholder, uni-popup.title, uni-popup.shareTitle, default */
  21998. /***/ (function(module) {
  21999. module.exports = JSON.parse("{\"uni-popup.cancel\":\"cancel\",\"uni-popup.ok\":\"ok\",\"uni-popup.placeholder\":\"pleace enter\",\"uni-popup.title\":\"Hint\",\"uni-popup.shareTitle\":\"Share to\"}");
  22000. /***/ }),
  22001. /***/ 5:
  22002. /*!**************************************************************!*\
  22003. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  22004. \**************************************************************/
  22005. /*! no static exports found */
  22006. /***/ (function(module, exports, __webpack_require__) {
  22007. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  22008. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  22009. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  22010. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  22011. function _slicedToArray(arr, i) {
  22012. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  22013. }
  22014. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22015. /***/ }),
  22016. /***/ 500:
  22017. /*!****************************************************************************************!*\
  22018. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json ***!
  22019. \****************************************************************************************/
  22020. /*! exports provided: uni-popup.cancel, uni-popup.ok, uni-popup.placeholder, uni-popup.title, uni-popup.shareTitle, default */
  22021. /***/ (function(module) {
  22022. module.exports = JSON.parse("{\"uni-popup.cancel\":\"取消\",\"uni-popup.ok\":\"确定\",\"uni-popup.placeholder\":\"请输入\",\"uni-popup.title\":\"提示\",\"uni-popup.shareTitle\":\"分享到\"}");
  22023. /***/ }),
  22024. /***/ 501:
  22025. /*!****************************************************************************************!*\
  22026. !*** E:/项目资料/智慧社区/Applet/uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json ***!
  22027. \****************************************************************************************/
  22028. /*! exports provided: uni-popup.cancel, uni-popup.ok, uni-popup.placeholder, uni-popup.title, uni-popup.shareTitle, default */
  22029. /***/ (function(module) {
  22030. module.exports = JSON.parse("{\"uni-popup.cancel\":\"取消\",\"uni-popup.ok\":\"確定\",\"uni-popup.placeholder\":\"請輸入\",\"uni-popup.title\":\"提示\",\"uni-popup.shareTitle\":\"分享到\"}");
  22031. /***/ }),
  22032. /***/ 55:
  22033. /*!***************************************!*\
  22034. !*** E:/项目资料/智慧社区/Applet/api/user.js ***!
  22035. \***************************************/
  22036. /*! no static exports found */
  22037. /***/ (function(module, exports, __webpack_require__) {
  22038. "use strict";
  22039. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22040. Object.defineProperty(exports, "__esModule", {
  22041. value: true
  22042. });
  22043. exports.default = void 0;
  22044. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  22045. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  22046. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  22047. // 查询地址下拉树结构 -- 到小区
  22048. var addrTreeSelect = /*#__PURE__*/function () {
  22049. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  22050. var res;
  22051. return _regenerator.default.wrap(function _callee$(_context) {
  22052. while (1) {
  22053. switch (_context.prev = _context.next) {
  22054. case 0:
  22055. _context.next = 2;
  22056. return _request.default.get({
  22057. url: "/wx/addr/tree",
  22058. data: data
  22059. });
  22060. case 2:
  22061. res = _context.sent;
  22062. return _context.abrupt("return", res.data);
  22063. case 4:
  22064. case "end":
  22065. return _context.stop();
  22066. }
  22067. }
  22068. }, _callee);
  22069. }));
  22070. return function addrTreeSelect(_x) {
  22071. return _ref.apply(this, arguments);
  22072. };
  22073. }();
  22074. // 楼栋查询
  22075. var buildingList = /*#__PURE__*/function () {
  22076. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  22077. var res;
  22078. return _regenerator.default.wrap(function _callee2$(_context2) {
  22079. while (1) {
  22080. switch (_context2.prev = _context2.next) {
  22081. case 0:
  22082. _context2.next = 2;
  22083. return _request.default.get({
  22084. url: "/wx/addr/buildings",
  22085. data: data
  22086. });
  22087. case 2:
  22088. res = _context2.sent;
  22089. return _context2.abrupt("return", res.data);
  22090. case 4:
  22091. case "end":
  22092. return _context2.stop();
  22093. }
  22094. }
  22095. }, _callee2);
  22096. }));
  22097. return function buildingList(_x2) {
  22098. return _ref2.apply(this, arguments);
  22099. };
  22100. }();
  22101. // 住宅查询
  22102. var houseList = /*#__PURE__*/function () {
  22103. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(data) {
  22104. var res;
  22105. return _regenerator.default.wrap(function _callee3$(_context3) {
  22106. while (1) {
  22107. switch (_context3.prev = _context3.next) {
  22108. case 0:
  22109. _context3.next = 2;
  22110. return _request.default.get({
  22111. url: "/wx/addr/houses",
  22112. data: data
  22113. });
  22114. case 2:
  22115. res = _context3.sent;
  22116. return _context3.abrupt("return", res.data);
  22117. case 4:
  22118. case "end":
  22119. return _context3.stop();
  22120. }
  22121. }
  22122. }, _callee3);
  22123. }));
  22124. return function houseList(_x3) {
  22125. return _ref3.apply(this, arguments);
  22126. };
  22127. }();
  22128. // 添加用户信息
  22129. var addUser = /*#__PURE__*/function () {
  22130. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
  22131. var res;
  22132. return _regenerator.default.wrap(function _callee4$(_context4) {
  22133. while (1) {
  22134. switch (_context4.prev = _context4.next) {
  22135. case 0:
  22136. _context4.next = 2;
  22137. return _request.default.post({
  22138. url: "/user/register",
  22139. data: data
  22140. });
  22141. case 2:
  22142. res = _context4.sent;
  22143. return _context4.abrupt("return", res.data);
  22144. case 4:
  22145. case "end":
  22146. return _context4.stop();
  22147. }
  22148. }
  22149. }, _callee4);
  22150. }));
  22151. return function addUser(_x4) {
  22152. return _ref4.apply(this, arguments);
  22153. };
  22154. }();
  22155. // 添加用户信息
  22156. var updateUser = /*#__PURE__*/function () {
  22157. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data) {
  22158. var res;
  22159. return _regenerator.default.wrap(function _callee5$(_context5) {
  22160. while (1) {
  22161. switch (_context5.prev = _context5.next) {
  22162. case 0:
  22163. _context5.next = 2;
  22164. return _request.default.post({
  22165. url: "/user/edit",
  22166. data: data
  22167. });
  22168. case 2:
  22169. res = _context5.sent;
  22170. return _context5.abrupt("return", res.data);
  22171. case 4:
  22172. case "end":
  22173. return _context5.stop();
  22174. }
  22175. }
  22176. }, _callee5);
  22177. }));
  22178. return function updateUser(_x5) {
  22179. return _ref5.apply(this, arguments);
  22180. };
  22181. }();
  22182. // 获取用户信息
  22183. var getUser = /*#__PURE__*/function () {
  22184. var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6() {
  22185. var res;
  22186. return _regenerator.default.wrap(function _callee6$(_context6) {
  22187. while (1) {
  22188. switch (_context6.prev = _context6.next) {
  22189. case 0:
  22190. _context6.next = 2;
  22191. return _request.default.get({
  22192. url: "/user/info"
  22193. });
  22194. case 2:
  22195. res = _context6.sent;
  22196. return _context6.abrupt("return", res.data);
  22197. case 4:
  22198. case "end":
  22199. return _context6.stop();
  22200. }
  22201. }
  22202. }, _callee6);
  22203. }));
  22204. return function getUser() {
  22205. return _ref6.apply(this, arguments);
  22206. };
  22207. }();
  22208. var _default = {
  22209. addrTreeSelect: addrTreeSelect,
  22210. buildingList: buildingList,
  22211. houseList: houseList,
  22212. addUser: addUser,
  22213. getUser: getUser,
  22214. updateUser: updateUser
  22215. };
  22216. exports.default = _default;
  22217. /***/ }),
  22218. /***/ 6:
  22219. /*!***************************************************************!*\
  22220. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  22221. \***************************************************************/
  22222. /*! no static exports found */
  22223. /***/ (function(module, exports) {
  22224. function _arrayWithHoles(arr) {
  22225. if (Array.isArray(arr)) return arr;
  22226. }
  22227. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22228. /***/ }),
  22229. /***/ 614:
  22230. /*!******************************************!*\
  22231. !*** E:/项目资料/智慧社区/Applet/api/voucher.js ***!
  22232. \******************************************/
  22233. /*! no static exports found */
  22234. /***/ (function(module, exports, __webpack_require__) {
  22235. "use strict";
  22236. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22237. Object.defineProperty(exports, "__esModule", {
  22238. value: true
  22239. });
  22240. exports.default = void 0;
  22241. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  22242. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  22243. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  22244. var getList = /*#__PURE__*/function () {
  22245. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  22246. var res;
  22247. return _regenerator.default.wrap(function _callee$(_context) {
  22248. while (1) {
  22249. switch (_context.prev = _context.next) {
  22250. case 0:
  22251. _context.next = 2;
  22252. return _request.default.get({
  22253. url: "/discount/info/list",
  22254. data: data
  22255. });
  22256. case 2:
  22257. res = _context.sent;
  22258. return _context.abrupt("return", res.data);
  22259. case 4:
  22260. case "end":
  22261. return _context.stop();
  22262. }
  22263. }
  22264. }, _callee);
  22265. }));
  22266. return function getList(_x) {
  22267. return _ref.apply(this, arguments);
  22268. };
  22269. }();
  22270. var getInfo = /*#__PURE__*/function () {
  22271. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(id) {
  22272. var res;
  22273. return _regenerator.default.wrap(function _callee2$(_context2) {
  22274. while (1) {
  22275. switch (_context2.prev = _context2.next) {
  22276. case 0:
  22277. _context2.next = 2;
  22278. return _request.default.get({
  22279. url: "/discount/info/".concat(id)
  22280. });
  22281. case 2:
  22282. res = _context2.sent;
  22283. return _context2.abrupt("return", res.data);
  22284. case 4:
  22285. case "end":
  22286. return _context2.stop();
  22287. }
  22288. }
  22289. }, _callee2);
  22290. }));
  22291. return function getInfo(_x2) {
  22292. return _ref2.apply(this, arguments);
  22293. };
  22294. }();
  22295. var receivevoucher = /*#__PURE__*/function () {
  22296. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(discountId) {
  22297. var res;
  22298. return _regenerator.default.wrap(function _callee3$(_context3) {
  22299. while (1) {
  22300. switch (_context3.prev = _context3.next) {
  22301. case 0:
  22302. _context3.next = 2;
  22303. return _request.default.post({
  22304. url: "/discount/receive/".concat(discountId)
  22305. });
  22306. case 2:
  22307. res = _context3.sent;
  22308. return _context3.abrupt("return", res.data);
  22309. case 4:
  22310. case "end":
  22311. return _context3.stop();
  22312. }
  22313. }
  22314. }, _callee3);
  22315. }));
  22316. return function receivevoucher(_x3) {
  22317. return _ref3.apply(this, arguments);
  22318. };
  22319. }();
  22320. var getMyList = /*#__PURE__*/function () {
  22321. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
  22322. var res;
  22323. return _regenerator.default.wrap(function _callee4$(_context4) {
  22324. while (1) {
  22325. switch (_context4.prev = _context4.next) {
  22326. case 0:
  22327. _context4.next = 2;
  22328. return _request.default.get({
  22329. url: "/discount/record/list"
  22330. });
  22331. case 2:
  22332. res = _context4.sent;
  22333. return _context4.abrupt("return", res.data);
  22334. case 4:
  22335. case "end":
  22336. return _context4.stop();
  22337. }
  22338. }
  22339. }, _callee4);
  22340. }));
  22341. return function getMyList(_x4) {
  22342. return _ref4.apply(this, arguments);
  22343. };
  22344. }();
  22345. var _default = {
  22346. getList: getList,
  22347. getInfo: getInfo,
  22348. receivevoucher: receivevoucher,
  22349. getMyList: getMyList
  22350. };
  22351. exports.default = _default;
  22352. /***/ }),
  22353. /***/ 7:
  22354. /*!*********************************************************************!*\
  22355. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  22356. \*********************************************************************/
  22357. /*! no static exports found */
  22358. /***/ (function(module, exports) {
  22359. function _iterableToArrayLimit(arr, i) {
  22360. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  22361. if (null != _i) {
  22362. var _s,
  22363. _e,
  22364. _x,
  22365. _r,
  22366. _arr = [],
  22367. _n = !0,
  22368. _d = !1;
  22369. try {
  22370. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  22371. if (Object(_i) !== _i) return;
  22372. _n = !1;
  22373. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  22374. ;
  22375. }
  22376. } catch (err) {
  22377. _d = !0, _e = err;
  22378. } finally {
  22379. try {
  22380. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  22381. } finally {
  22382. if (_d) throw _e;
  22383. }
  22384. }
  22385. return _arr;
  22386. }
  22387. }
  22388. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22389. /***/ }),
  22390. /***/ 72:
  22391. /*!**************************************!*\
  22392. !*** E:/项目资料/智慧社区/Applet/api/cms.js ***!
  22393. \**************************************/
  22394. /*! no static exports found */
  22395. /***/ (function(module, exports, __webpack_require__) {
  22396. "use strict";
  22397. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22398. Object.defineProperty(exports, "__esModule", {
  22399. value: true
  22400. });
  22401. exports.default = void 0;
  22402. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  22403. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  22404. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  22405. var getTypeList = /*#__PURE__*/function () {
  22406. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) {
  22407. var alias, res;
  22408. return _regenerator.default.wrap(function _callee$(_context) {
  22409. while (1) {
  22410. switch (_context.prev = _context.next) {
  22411. case 0:
  22412. alias = _ref.alias;
  22413. _context.next = 3;
  22414. return _request.default.get({
  22415. url: "/cms/type/sublist/".concat(alias)
  22416. });
  22417. case 3:
  22418. res = _context.sent;
  22419. return _context.abrupt("return", res.data);
  22420. case 5:
  22421. case "end":
  22422. return _context.stop();
  22423. }
  22424. }
  22425. }, _callee);
  22426. }));
  22427. return function getTypeList(_x) {
  22428. return _ref2.apply(this, arguments);
  22429. };
  22430. }();
  22431. var getArticleList = /*#__PURE__*/function () {
  22432. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  22433. var res;
  22434. return _regenerator.default.wrap(function _callee2$(_context2) {
  22435. while (1) {
  22436. switch (_context2.prev = _context2.next) {
  22437. case 0:
  22438. _context2.next = 2;
  22439. return _request.default.get({
  22440. url: "/cms/blog/wx/articleList",
  22441. data: data
  22442. });
  22443. case 2:
  22444. res = _context2.sent;
  22445. return _context2.abrupt("return", res.data);
  22446. case 4:
  22447. case "end":
  22448. return _context2.stop();
  22449. }
  22450. }
  22451. }, _callee2);
  22452. }));
  22453. return function getArticleList(_x2) {
  22454. return _ref3.apply(this, arguments);
  22455. };
  22456. }();
  22457. var getArticleDetail = /*#__PURE__*/function () {
  22458. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(_ref4) {
  22459. var id, res;
  22460. return _regenerator.default.wrap(function _callee3$(_context3) {
  22461. while (1) {
  22462. switch (_context3.prev = _context3.next) {
  22463. case 0:
  22464. id = _ref4.id;
  22465. _context3.next = 3;
  22466. return _request.default.get({
  22467. url: "/cms/blog/cms/detail/".concat(id)
  22468. });
  22469. case 3:
  22470. res = _context3.sent;
  22471. return _context3.abrupt("return", res.data);
  22472. case 5:
  22473. case "end":
  22474. return _context3.stop();
  22475. }
  22476. }
  22477. }, _callee3);
  22478. }));
  22479. return function getArticleDetail(_x3) {
  22480. return _ref5.apply(this, arguments);
  22481. };
  22482. }();
  22483. var addBlogViews = /*#__PURE__*/function () {
  22484. var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(_ref6) {
  22485. var id, res;
  22486. return _regenerator.default.wrap(function _callee4$(_context4) {
  22487. while (1) {
  22488. switch (_context4.prev = _context4.next) {
  22489. case 0:
  22490. id = _ref6.id;
  22491. _context4.next = 3;
  22492. return _request.default.get({
  22493. url: "/cms/blog/cms/addBlogViews/".concat(id)
  22494. });
  22495. case 3:
  22496. res = _context4.sent;
  22497. return _context4.abrupt("return", res.data);
  22498. case 5:
  22499. case "end":
  22500. return _context4.stop();
  22501. }
  22502. }
  22503. }, _callee4);
  22504. }));
  22505. return function addBlogViews(_x4) {
  22506. return _ref7.apply(this, arguments);
  22507. };
  22508. }();
  22509. var getsublist = /*#__PURE__*/function () {
  22510. var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(_ref8) {
  22511. var alias, res;
  22512. return _regenerator.default.wrap(function _callee5$(_context5) {
  22513. while (1) {
  22514. switch (_context5.prev = _context5.next) {
  22515. case 0:
  22516. alias = _ref8.alias;
  22517. _context5.next = 3;
  22518. return _request.default.get({
  22519. url: "/cms/type/sublist/".concat(alias)
  22520. });
  22521. case 3:
  22522. res = _context5.sent;
  22523. return _context5.abrupt("return", res.data);
  22524. case 5:
  22525. case "end":
  22526. return _context5.stop();
  22527. }
  22528. }
  22529. }, _callee5);
  22530. }));
  22531. return function getsublist(_x5) {
  22532. return _ref9.apply(this, arguments);
  22533. };
  22534. }();
  22535. var _default = {
  22536. getTypeList: getTypeList,
  22537. getArticleList: getArticleList,
  22538. getArticleDetail: getArticleDetail,
  22539. addBlogViews: addBlogViews,
  22540. getsublist: getsublist
  22541. };
  22542. exports.default = _default;
  22543. /***/ }),
  22544. /***/ 8:
  22545. /*!***************************************************************************!*\
  22546. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  22547. \***************************************************************************/
  22548. /*! no static exports found */
  22549. /***/ (function(module, exports, __webpack_require__) {
  22550. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  22551. function _unsupportedIterableToArray(o, minLen) {
  22552. if (!o) return;
  22553. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  22554. var n = Object.prototype.toString.call(o).slice(8, -1);
  22555. if (n === "Object" && o.constructor) n = o.constructor.name;
  22556. if (n === "Map" || n === "Set") return Array.from(o);
  22557. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  22558. }
  22559. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22560. /***/ }),
  22561. /***/ 81:
  22562. /*!*****************************************!*\
  22563. !*** E:/项目资料/智慧社区/Applet/api/family.js ***!
  22564. \*****************************************/
  22565. /*! no static exports found */
  22566. /***/ (function(module, exports, __webpack_require__) {
  22567. "use strict";
  22568. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22569. Object.defineProperty(exports, "__esModule", {
  22570. value: true
  22571. });
  22572. exports.default = void 0;
  22573. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 40));
  22574. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 42));
  22575. var _request = _interopRequireDefault(__webpack_require__(/*! ./request.js */ 44));
  22576. // 修改家人信息
  22577. var familyInfo = /*#__PURE__*/function () {
  22578. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(data) {
  22579. var res;
  22580. return _regenerator.default.wrap(function _callee$(_context) {
  22581. while (1) {
  22582. switch (_context.prev = _context.next) {
  22583. case 0:
  22584. _context.next = 2;
  22585. return _request.default.post({
  22586. url: "/user/commit-application",
  22587. data: data
  22588. });
  22589. case 2:
  22590. res = _context.sent;
  22591. return _context.abrupt("return", res.data);
  22592. case 4:
  22593. case "end":
  22594. return _context.stop();
  22595. }
  22596. }
  22597. }, _callee);
  22598. }));
  22599. return function familyInfo(_x) {
  22600. return _ref.apply(this, arguments);
  22601. };
  22602. }();
  22603. // 获取家人信息
  22604. var getFamilyInfo = /*#__PURE__*/function () {
  22605. var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(data) {
  22606. var res;
  22607. return _regenerator.default.wrap(function _callee2$(_context2) {
  22608. while (1) {
  22609. switch (_context2.prev = _context2.next) {
  22610. case 0:
  22611. _context2.next = 2;
  22612. return _request.default.get({
  22613. url: "/wx/resident/members",
  22614. data: data
  22615. });
  22616. case 2:
  22617. res = _context2.sent;
  22618. return _context2.abrupt("return", res.data);
  22619. case 4:
  22620. case "end":
  22621. return _context2.stop();
  22622. }
  22623. }
  22624. }, _callee2);
  22625. }));
  22626. return function getFamilyInfo(_x2) {
  22627. return _ref2.apply(this, arguments);
  22628. };
  22629. }();
  22630. // 获取家人信息详情
  22631. var getFamilyInfoDetails = /*#__PURE__*/function () {
  22632. var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(data) {
  22633. var res;
  22634. return _regenerator.default.wrap(function _callee3$(_context3) {
  22635. while (1) {
  22636. switch (_context3.prev = _context3.next) {
  22637. case 0:
  22638. _context3.next = 2;
  22639. return _request.default.get({
  22640. url: "/wx/resident/info",
  22641. data: data
  22642. });
  22643. case 2:
  22644. res = _context3.sent;
  22645. return _context3.abrupt("return", res.data);
  22646. case 4:
  22647. case "end":
  22648. return _context3.stop();
  22649. }
  22650. }
  22651. }, _callee3);
  22652. }));
  22653. return function getFamilyInfoDetails(_x3) {
  22654. return _ref3.apply(this, arguments);
  22655. };
  22656. }();
  22657. // 报备状态
  22658. var membersStatus = /*#__PURE__*/function () {
  22659. var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data) {
  22660. var res;
  22661. return _regenerator.default.wrap(function _callee4$(_context4) {
  22662. while (1) {
  22663. switch (_context4.prev = _context4.next) {
  22664. case 0:
  22665. _context4.next = 2;
  22666. return _request.default.post({
  22667. url: "/nat/members-status",
  22668. data: data
  22669. });
  22670. case 2:
  22671. res = _context4.sent;
  22672. return _context4.abrupt("return", res.data);
  22673. case 4:
  22674. case "end":
  22675. return _context4.stop();
  22676. }
  22677. }
  22678. }, _callee4);
  22679. }));
  22680. return function membersStatus(_x4) {
  22681. return _ref4.apply(this, arguments);
  22682. };
  22683. }();
  22684. // 当前任务
  22685. var runningTask = /*#__PURE__*/function () {
  22686. var _ref5 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data) {
  22687. var res;
  22688. return _regenerator.default.wrap(function _callee5$(_context5) {
  22689. while (1) {
  22690. switch (_context5.prev = _context5.next) {
  22691. case 0:
  22692. _context5.next = 2;
  22693. return _request.default.get({
  22694. url: "/nat/running-task",
  22695. data: data
  22696. });
  22697. case 2:
  22698. res = _context5.sent;
  22699. return _context5.abrupt("return", res.data);
  22700. case 4:
  22701. case "end":
  22702. return _context5.stop();
  22703. }
  22704. }
  22705. }, _callee5);
  22706. }));
  22707. return function runningTask(_x5) {
  22708. return _ref5.apply(this, arguments);
  22709. };
  22710. }();
  22711. // 报备
  22712. var filing = /*#__PURE__*/function () {
  22713. var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(data) {
  22714. var res;
  22715. return _regenerator.default.wrap(function _callee6$(_context6) {
  22716. while (1) {
  22717. switch (_context6.prev = _context6.next) {
  22718. case 0:
  22719. _context6.next = 2;
  22720. return _request.default.post({
  22721. url: "/nat/add-record",
  22722. data: data
  22723. });
  22724. case 2:
  22725. res = _context6.sent;
  22726. return _context6.abrupt("return", res.data);
  22727. case 4:
  22728. case "end":
  22729. return _context6.stop();
  22730. }
  22731. }
  22732. }, _callee6);
  22733. }));
  22734. return function filing(_x6) {
  22735. return _ref6.apply(this, arguments);
  22736. };
  22737. }();
  22738. // 获取家庭成员列表 待审核,含本人
  22739. var getApplyUser = /*#__PURE__*/function () {
  22740. var _ref7 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(data) {
  22741. var res;
  22742. return _regenerator.default.wrap(function _callee7$(_context7) {
  22743. while (1) {
  22744. switch (_context7.prev = _context7.next) {
  22745. case 0:
  22746. _context7.next = 2;
  22747. return _request.default.get({
  22748. url: "/resident/req/list",
  22749. data: data
  22750. });
  22751. case 2:
  22752. res = _context7.sent;
  22753. return _context7.abrupt("return", res.data);
  22754. case 4:
  22755. case "end":
  22756. return _context7.stop();
  22757. }
  22758. }
  22759. }, _callee7);
  22760. }));
  22761. return function getApplyUser(_x7) {
  22762. return _ref7.apply(this, arguments);
  22763. };
  22764. }();
  22765. // 获取待审核信息详情
  22766. var getReqInfoDetails = /*#__PURE__*/function () {
  22767. var _ref8 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8(data) {
  22768. var res;
  22769. return _regenerator.default.wrap(function _callee8$(_context8) {
  22770. while (1) {
  22771. switch (_context8.prev = _context8.next) {
  22772. case 0:
  22773. _context8.next = 2;
  22774. return _request.default.get({
  22775. url: "/resident/req/".concat(data.residentReqId)
  22776. });
  22777. case 2:
  22778. res = _context8.sent;
  22779. return _context8.abrupt("return", res.data);
  22780. case 4:
  22781. case "end":
  22782. return _context8.stop();
  22783. }
  22784. }
  22785. }, _callee8);
  22786. }));
  22787. return function getReqInfoDetails(_x8) {
  22788. return _ref8.apply(this, arguments);
  22789. };
  22790. }();
  22791. // 所有待报备
  22792. var getUserAll = /*#__PURE__*/function () {
  22793. var _ref9 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9(data) {
  22794. var res;
  22795. return _regenerator.default.wrap(function _callee9$(_context9) {
  22796. while (1) {
  22797. switch (_context9.prev = _context9.next) {
  22798. case 0:
  22799. _context9.next = 2;
  22800. return _request.default.get({
  22801. url: "/wx/resident/members-for-reporting"
  22802. });
  22803. case 2:
  22804. res = _context9.sent;
  22805. return _context9.abrupt("return", res.data);
  22806. case 4:
  22807. case "end":
  22808. return _context9.stop();
  22809. }
  22810. }
  22811. }, _callee9);
  22812. }));
  22813. return function getUserAll(_x9) {
  22814. return _ref9.apply(this, arguments);
  22815. };
  22816. }();
  22817. // 取消审核申请
  22818. var removeApply = /*#__PURE__*/function () {
  22819. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(data) {
  22820. var res;
  22821. return _regenerator.default.wrap(function _callee10$(_context10) {
  22822. while (1) {
  22823. switch (_context10.prev = _context10.next) {
  22824. case 0:
  22825. _context10.next = 2;
  22826. return _request.default.post({
  22827. url: "/resident/req/cancel/".concat(data.residentReqId),
  22828. data: data
  22829. });
  22830. case 2:
  22831. res = _context10.sent;
  22832. return _context10.abrupt("return", res.data);
  22833. case 4:
  22834. case "end":
  22835. return _context10.stop();
  22836. }
  22837. }
  22838. }, _callee10);
  22839. }));
  22840. return function removeApply(_x10) {
  22841. return _ref10.apply(this, arguments);
  22842. };
  22843. }();
  22844. var _default = {
  22845. familyInfo: familyInfo,
  22846. getFamilyInfo: getFamilyInfo,
  22847. filing: filing,
  22848. membersStatus: membersStatus,
  22849. runningTask: runningTask,
  22850. getFamilyInfoDetails: getFamilyInfoDetails,
  22851. getApplyUser: getApplyUser,
  22852. getReqInfoDetails: getReqInfoDetails,
  22853. getUserAll: getUserAll,
  22854. removeApply: removeApply
  22855. };
  22856. exports.default = _default;
  22857. /***/ }),
  22858. /***/ 9:
  22859. /*!*****************************************************************!*\
  22860. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  22861. \*****************************************************************/
  22862. /*! no static exports found */
  22863. /***/ (function(module, exports) {
  22864. function _arrayLikeToArray(arr, len) {
  22865. if (len == null || len > arr.length) len = arr.length;
  22866. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  22867. arr2[i] = arr[i];
  22868. }
  22869. return arr2;
  22870. }
  22871. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22872. /***/ })
  22873. }]);
  22874. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map