vendor.js 775 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598
  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', '__webpack_require_UNI_MP_PLUGIN__'];
  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. /***/ 122:
  90. /*!***************************************************************!*\
  91. !*** E:/work/Project_newGit/UniappShell/api/system/msgApi.js ***!
  92. \***************************************************************/
  93. /*! no static exports found */
  94. /***/ (function(module, exports, __webpack_require__) {
  95. "use strict";
  96. Object.defineProperty(exports, "__esModule", {
  97. value: true
  98. });
  99. exports.deleteMsgById = deleteMsgById;
  100. exports.getMsgById = getMsgById;
  101. exports.getMsgReceivedByPage = getMsgReceivedByPage;
  102. exports.getMsgSentByPage = getMsgSentByPage;
  103. exports.getUnReadCounter = getUnReadCounter;
  104. exports.putAllReadStatus = putAllReadStatus;
  105. exports.putReadStatus = putReadStatus;
  106. exports.sendMsg = sendMsg;
  107. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  108. /**
  109. * 分页查询发送消息
  110. * @param data
  111. * @returns
  112. */
  113. function getMsgSentByPage(data) {
  114. return (0, _request.request)({
  115. url: '/msg/sent/page',
  116. method: 'GET',
  117. data: data
  118. });
  119. }
  120. /**
  121. * 分页查询接收消息
  122. * @param data
  123. * @returns
  124. */
  125. function getMsgReceivedByPage(data) {
  126. return (0, _request.request)({
  127. url: '/msg/received/page',
  128. method: 'GET',
  129. data: data
  130. });
  131. }
  132. /**
  133. * 基于ID获取消息详情
  134. * @param msgId
  135. * @returns
  136. */
  137. function getMsgById(msgId) {
  138. return (0, _request.request)({
  139. url: "/msg/".concat(msgId),
  140. method: 'GET'
  141. });
  142. }
  143. /**
  144. * 基于ID置已读状态
  145. * @param msgId
  146. * @returns
  147. */
  148. function putReadStatus(msgId) {
  149. return (0, _request.request)({
  150. url: "/msg/read/".concat(msgId),
  151. method: 'PUT'
  152. });
  153. }
  154. /**
  155. * 获取未读消息数目
  156. * @returns
  157. */
  158. function getUnReadCounter() {
  159. return (0, _request.request)({
  160. url: "/msg/unread/count",
  161. method: 'GET'
  162. });
  163. }
  164. /**
  165. * 发送消息
  166. * @param data
  167. * @returns
  168. */
  169. function sendMsg(data) {
  170. return (0, _request.request)({
  171. url: "/msg/send",
  172. method: 'POST',
  173. data: data
  174. });
  175. }
  176. /**
  177. * 删除消息
  178. * @param msgId
  179. * @returns
  180. */
  181. function deleteMsgById(msgId) {
  182. return (0, _request.request)({
  183. url: "/msg/".concat(msgId),
  184. method: 'DELETE'
  185. });
  186. }
  187. /**
  188. * 全部已读
  189. * @param msgId
  190. * @returns
  191. */
  192. function putAllReadStatus() {
  193. return (0, _request.request)({
  194. url: "/msg/all/read",
  195. method: 'PUT'
  196. });
  197. }
  198. /***/ }),
  199. /***/ 13:
  200. /*!*******************************************************!*\
  201. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  202. \*******************************************************/
  203. /*! no static exports found */
  204. /***/ (function(module, exports) {
  205. function _typeof(obj) {
  206. "@babel/helpers - typeof";
  207. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  208. return typeof obj;
  209. } : function (obj) {
  210. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  211. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  212. }
  213. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  214. /***/ }),
  215. /***/ 139:
  216. /*!**************************************************************!*\
  217. !*** E:/work/Project_newGit/UniappShell/api/system/wfApi.js ***!
  218. \**************************************************************/
  219. /*! no static exports found */
  220. /***/ (function(module, exports, __webpack_require__) {
  221. "use strict";
  222. Object.defineProperty(exports, "__esModule", {
  223. value: true
  224. });
  225. exports.cancelWorkflow = cancelWorkflow;
  226. exports.getWorkflowById = getWorkflowById;
  227. exports.getWorkflowById2 = getWorkflowById2;
  228. exports.getWorkflowById3 = getWorkflowById3;
  229. exports.getWorkflowDetailsById = getWorkflowDetailsById;
  230. exports.getWorkflowRecordById = getWorkflowRecordById;
  231. exports.handleWorkflow = handleWorkflow;
  232. exports.startWorkflow = startWorkflow;
  233. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  234. /**
  235. * 启动Workflow
  236. * @param wfDefId
  237. * @returns
  238. */
  239. function startWorkflow(wfDefId) {
  240. return (0, _request.request)({
  241. url: "/wf/start/".concat(wfDefId),
  242. method: 'GET'
  243. });
  244. }
  245. function getWorkflowById(wfInsId) {
  246. return (0, _request.request)({
  247. url: "/wf/getIns/".concat(wfInsId),
  248. method: 'GET'
  249. });
  250. }
  251. function getWorkflowById2(wfInsId, activityInsId) {
  252. return (0, _request.request)({
  253. url: "/wf/getIns/".concat(wfInsId, "/").concat(activityInsId),
  254. method: 'GET'
  255. });
  256. }
  257. function getWorkflowById3(wfInsId, activityInsId, actionInsId) {
  258. return (0, _request.request)({
  259. url: "/wf/getIns/".concat(wfInsId, "/").concat(activityInsId, "/").concat(actionInsId),
  260. method: 'GET'
  261. });
  262. }
  263. function getWorkflowDetailsById(wfInsId) {
  264. return (0, _request.request)({
  265. url: "/wf/details/".concat(wfInsId),
  266. method: 'GET'
  267. });
  268. }
  269. function getWorkflowRecordById(wfInsId) {
  270. return (0, _request.request)({
  271. url: "/wf/record/".concat(wfInsId),
  272. method: 'GET'
  273. });
  274. }
  275. /**
  276. * 处理
  277. * @param data
  278. * @returns
  279. */
  280. function handleWorkflow(data) {
  281. return (0, _request.request)({
  282. url: "/wf/handle",
  283. method: 'POST',
  284. data: data
  285. });
  286. }
  287. /**
  288. * 撤消
  289. * @param wfInsId
  290. * @returns
  291. */
  292. function cancelWorkflow(wfInsId) {
  293. return (0, _request.request)({
  294. url: "/wf/cancel/".concat(wfInsId),
  295. method: 'GET'
  296. });
  297. }
  298. /***/ }),
  299. /***/ 14:
  300. /*!************************************************************!*\
  301. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  302. \************************************************************/
  303. /*! no static exports found */
  304. /***/ (function(module, exports, __webpack_require__) {
  305. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  306. function _toPrimitive(input, hint) {
  307. if (_typeof(input) !== "object" || input === null) return input;
  308. var prim = input[Symbol.toPrimitive];
  309. if (prim !== undefined) {
  310. var res = prim.call(input, hint || "default");
  311. if (_typeof(res) !== "object") return res;
  312. throw new TypeError("@@toPrimitive must return a primitive value.");
  313. }
  314. return (hint === "string" ? String : Number)(input);
  315. }
  316. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  317. /***/ }),
  318. /***/ 140:
  319. /*!******************************************************************!*\
  320. !*** E:/work/Project_newGit/UniappShell/api/system/dangerApi.js ***!
  321. \******************************************************************/
  322. /*! no static exports found */
  323. /***/ (function(module, exports, __webpack_require__) {
  324. "use strict";
  325. Object.defineProperty(exports, "__esModule", {
  326. value: true
  327. });
  328. exports.deleteDangerById = deleteDangerById;
  329. exports.getDangerById = getDangerById;
  330. exports.getDangerByList = getDangerByList;
  331. exports.getDangerByPage = getDangerByPage;
  332. exports.handleDanger = handleDanger;
  333. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  334. /**
  335. * 获取Danger列表
  336. * @param data
  337. * @returns
  338. */
  339. function getDangerByList(data) {
  340. return (0, _request.request)({
  341. url: '/danger',
  342. method: 'GET',
  343. params: data
  344. });
  345. }
  346. /**
  347. * 获取Danger分页
  348. * @param data
  349. * @returns
  350. */
  351. function getDangerByPage(data) {
  352. return (0, _request.request)({
  353. url: '/danger/page',
  354. method: 'GET',
  355. params: data
  356. });
  357. }
  358. /**
  359. * 根据Id获取Danger
  360. * @param dangerId
  361. * @returns
  362. */
  363. function getDangerById(dangerId) {
  364. return (0, _request.request)({
  365. url: "/danger/".concat(dangerId),
  366. method: 'GET'
  367. });
  368. }
  369. /**
  370. * 删除Danger
  371. * @param dangerId
  372. * @returns
  373. */
  374. function deleteDangerById(dangerId) {
  375. return (0, _request.request)({
  376. url: "/danger/".concat(dangerId),
  377. method: 'DELETE'
  378. });
  379. }
  380. /**
  381. * 处理Danger
  382. * @param data
  383. * @returns
  384. */
  385. function handleDanger(data) {
  386. return (0, _request.request)({
  387. url: "/danger/handle",
  388. method: 'POST',
  389. data: data
  390. });
  391. }
  392. /***/ }),
  393. /***/ 149:
  394. /*!*********************************************************************!*\
  395. !*** E:/work/Project_newGit/UniappShell/api/aqpt/checklistPoint.js ***!
  396. \*********************************************************************/
  397. /*! no static exports found */
  398. /***/ (function(module, exports, __webpack_require__) {
  399. "use strict";
  400. Object.defineProperty(exports, "__esModule", {
  401. value: true
  402. });
  403. exports.checklistBatchUpdate = checklistBatchUpdate;
  404. exports.checklistCancel = checklistCancel;
  405. exports.checklistComplete = checklistComplete;
  406. exports.checklistInit = checklistInit;
  407. exports.getDoingPoint = getDoingPoint;
  408. exports.getPoint = getPoint;
  409. exports.getchecklistByPage = getchecklistByPage;
  410. exports.getchecklistRecord = getchecklistRecord;
  411. exports.updateChecklistPoint = updateChecklistPoint;
  412. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  413. /**
  414. * 清单初始化
  415. * ocId
  416. * targetId ,targetType,targetTitle,targetGroupId,,targetGroupName
  417. * checklistId
  418. */
  419. function checklistInit(data) {
  420. return (0, _request.request)({
  421. url: "/checklist/point/record/init",
  422. method: 'POST',
  423. data: data
  424. });
  425. }
  426. function updateChecklistPoint(data) {
  427. return (0, _request.request)({
  428. url: "/checklist/point/record/doing/update",
  429. method: 'PUT',
  430. data: data
  431. });
  432. }
  433. function getchecklistRecord(checklistId, recordId) {
  434. return (0, _request.request)({
  435. url: "/checklist/point/record/view/".concat(recordId, "/").concat(checklistId),
  436. method: 'GET'
  437. });
  438. }
  439. function getchecklistByPage(data) {
  440. return (0, _request.request)({
  441. url: "/checklist/record/page",
  442. method: 'GET',
  443. data: data
  444. });
  445. }
  446. // 巡检完成
  447. function checklistComplete(recordId) {
  448. return (0, _request.request)({
  449. url: "/checklist/point/record/complete/".concat(recordId),
  450. method: 'PUT'
  451. });
  452. }
  453. // 巡检放弃
  454. function checklistCancel(recordId) {
  455. return (0, _request.request)({
  456. url: "/checklist/point/record/cancel/".concat(recordId),
  457. method: 'PUT'
  458. });
  459. }
  460. // 批量操作
  461. function checklistBatchUpdate(recordId, checkResult) {
  462. return (0, _request.request)({
  463. url: "/checklist/point/record/doing/batchUpdate/".concat(recordId, "/").concat(checkResult),
  464. method: 'PUT'
  465. });
  466. }
  467. // 批量操作
  468. function getDoingPoint(checklistId, itemId, recordId, pointId) {
  469. return (0, _request.request)({
  470. url: "/checklist/point/record/doing/".concat(recordId, "/").concat(checklistId, "/").concat(itemId, "/").concat(pointId)
  471. });
  472. }
  473. function getPoint(checklistId, itemId, recordId, pointId) {
  474. return (0, _request.request)({
  475. url: "/checklist/point/record/".concat(recordId, "/").concat(checklistId, "/").concat(itemId, "/").concat(pointId)
  476. });
  477. }
  478. /***/ }),
  479. /***/ 15:
  480. /*!**********************************************************!*\
  481. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  482. \**********************************************************/
  483. /*! no static exports found */
  484. /***/ (function(module, exports, __webpack_require__) {
  485. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  486. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  487. function _construct(Parent, args, Class) {
  488. if (isNativeReflectConstruct()) {
  489. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  490. } else {
  491. module.exports = _construct = function _construct(Parent, args, Class) {
  492. var a = [null];
  493. a.push.apply(a, args);
  494. var Constructor = Function.bind.apply(Parent, a);
  495. var instance = new Constructor();
  496. if (Class) setPrototypeOf(instance, Class.prototype);
  497. return instance;
  498. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  499. }
  500. return _construct.apply(null, arguments);
  501. }
  502. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  503. /***/ }),
  504. /***/ 16:
  505. /*!***************************************************************!*\
  506. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  507. \***************************************************************/
  508. /*! no static exports found */
  509. /***/ (function(module, exports) {
  510. function _setPrototypeOf(o, p) {
  511. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  512. o.__proto__ = p;
  513. return o;
  514. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  515. return _setPrototypeOf(o, p);
  516. }
  517. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  518. /***/ }),
  519. /***/ 17:
  520. /*!*************************************************************************!*\
  521. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  522. \*************************************************************************/
  523. /*! no static exports found */
  524. /***/ (function(module, exports) {
  525. function _isNativeReflectConstruct() {
  526. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  527. if (Reflect.construct.sham) return false;
  528. if (typeof Proxy === "function") return true;
  529. try {
  530. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  531. return true;
  532. } catch (e) {
  533. return false;
  534. }
  535. }
  536. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  537. /***/ }),
  538. /***/ 172:
  539. /*!*****************************************************************!*\
  540. !*** E:/work/Project_newGit/UniappShell/api/aqpt/warningApi.js ***!
  541. \*****************************************************************/
  542. /*! no static exports found */
  543. /***/ (function(module, exports, __webpack_require__) {
  544. "use strict";
  545. Object.defineProperty(exports, "__esModule", {
  546. value: true
  547. });
  548. exports.cancelWarning = cancelWarning;
  549. exports.completeWarning = completeWarning;
  550. exports.deleteWarningById = deleteWarningById;
  551. exports.getMyWarningWaitingTop = getMyWarningWaitingTop;
  552. exports.getWarningById = getWarningById;
  553. exports.getWarningByList = getWarningByList;
  554. exports.getWarningByPage = getWarningByPage;
  555. exports.getWarningWaitingByList = getWarningWaitingByList;
  556. exports.transferWarning = transferWarning;
  557. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  558. /**
  559. * 分页查询告警
  560. */
  561. function getWarningByPage(data) {
  562. return (0, _request.request)({
  563. url: '/warning/page',
  564. method: 'GET',
  565. params: data
  566. });
  567. }
  568. /**
  569. * 列表查询告警
  570. */
  571. function getWarningByList(data) {
  572. return (0, _request.request)({
  573. url: '/warning',
  574. method: 'GET',
  575. params: data
  576. });
  577. }
  578. /**
  579. * 列表查询待处理告警
  580. */
  581. function getWarningWaitingByList(data) {
  582. return (0, _request.request)({
  583. url: '/warning/waiting',
  584. method: 'GET',
  585. params: data
  586. });
  587. }
  588. /**
  589. * 我的待处理告警TOP
  590. */
  591. function getMyWarningWaitingTop(limit) {
  592. return (0, _request.request)({
  593. url: "/warning/myWaiting/top/".concat(limit),
  594. method: 'GET'
  595. });
  596. }
  597. /**
  598. * 基于ID查询告警
  599. */
  600. function getWarningById(warnId) {
  601. return (0, _request.request)({
  602. url: "/warning/".concat(warnId),
  603. method: 'GET'
  604. });
  605. }
  606. /**
  607. * 完成处理
  608. * @param data
  609. * @returns
  610. */
  611. function completeWarning(data) {
  612. return (0, _request.request)({
  613. url: "/warning/complete",
  614. method: 'POST',
  615. data: data
  616. });
  617. }
  618. /**
  619. * 转交他人
  620. * @param warnId
  621. * @param data
  622. * @returns
  623. */
  624. function transferWarning(warnId, data) {
  625. return (0, _request.request)({
  626. url: "/warning/transfer/".concat(warnId),
  627. method: 'POST',
  628. data: data
  629. });
  630. }
  631. /**
  632. * 撤消
  633. * @param warnId
  634. * @returns
  635. */
  636. function cancelWarning(warnId) {
  637. return (0, _request.request)({
  638. url: "/warning/cancel/".concat(warnId),
  639. method: 'GET'
  640. });
  641. }
  642. /**
  643. * 删除
  644. */
  645. function deleteWarningById(warnId) {
  646. return (0, _request.request)({
  647. url: "/warning/".concat(warnId),
  648. method: 'DELETE'
  649. });
  650. }
  651. /***/ }),
  652. /***/ 18:
  653. /*!******************************************************************!*\
  654. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  655. \******************************************************************/
  656. /*! no static exports found */
  657. /***/ (function(module, exports, __webpack_require__) {
  658. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  659. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  660. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  661. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  662. function _toConsumableArray(arr) {
  663. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  664. }
  665. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  666. /***/ }),
  667. /***/ 19:
  668. /*!******************************************************************!*\
  669. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  670. \******************************************************************/
  671. /*! no static exports found */
  672. /***/ (function(module, exports, __webpack_require__) {
  673. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  674. function _arrayWithoutHoles(arr) {
  675. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  676. }
  677. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  678. /***/ }),
  679. /***/ 194:
  680. /*!**********************************************************************************************!*\
  681. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-icons/components/uni-icons/icons.js ***!
  682. \**********************************************************************************************/
  683. /*! no static exports found */
  684. /***/ (function(module, exports, __webpack_require__) {
  685. "use strict";
  686. Object.defineProperty(exports, "__esModule", {
  687. value: true
  688. });
  689. exports.default = void 0;
  690. var _default = {
  691. "id": "2852637",
  692. "name": "uniui图标库",
  693. "font_family": "uniicons",
  694. "css_prefix_text": "uniui-",
  695. "description": "",
  696. "glyphs": [{
  697. "icon_id": "25027049",
  698. "name": "yanse",
  699. "font_class": "color",
  700. "unicode": "e6cf",
  701. "unicode_decimal": 59087
  702. }, {
  703. "icon_id": "25027048",
  704. "name": "wallet",
  705. "font_class": "wallet",
  706. "unicode": "e6b1",
  707. "unicode_decimal": 59057
  708. }, {
  709. "icon_id": "25015720",
  710. "name": "settings-filled",
  711. "font_class": "settings-filled",
  712. "unicode": "e6ce",
  713. "unicode_decimal": 59086
  714. }, {
  715. "icon_id": "25015434",
  716. "name": "shimingrenzheng-filled",
  717. "font_class": "auth-filled",
  718. "unicode": "e6cc",
  719. "unicode_decimal": 59084
  720. }, {
  721. "icon_id": "24934246",
  722. "name": "shop-filled",
  723. "font_class": "shop-filled",
  724. "unicode": "e6cd",
  725. "unicode_decimal": 59085
  726. }, {
  727. "icon_id": "24934159",
  728. "name": "staff-filled-01",
  729. "font_class": "staff-filled",
  730. "unicode": "e6cb",
  731. "unicode_decimal": 59083
  732. }, {
  733. "icon_id": "24932461",
  734. "name": "VIP-filled",
  735. "font_class": "vip-filled",
  736. "unicode": "e6c6",
  737. "unicode_decimal": 59078
  738. }, {
  739. "icon_id": "24932462",
  740. "name": "plus_circle_fill",
  741. "font_class": "plus-filled",
  742. "unicode": "e6c7",
  743. "unicode_decimal": 59079
  744. }, {
  745. "icon_id": "24932463",
  746. "name": "folder_add-filled",
  747. "font_class": "folder-add-filled",
  748. "unicode": "e6c8",
  749. "unicode_decimal": 59080
  750. }, {
  751. "icon_id": "24932464",
  752. "name": "yanse-filled",
  753. "font_class": "color-filled",
  754. "unicode": "e6c9",
  755. "unicode_decimal": 59081
  756. }, {
  757. "icon_id": "24932465",
  758. "name": "tune-filled",
  759. "font_class": "tune-filled",
  760. "unicode": "e6ca",
  761. "unicode_decimal": 59082
  762. }, {
  763. "icon_id": "24932455",
  764. "name": "a-rilidaka-filled",
  765. "font_class": "calendar-filled",
  766. "unicode": "e6c0",
  767. "unicode_decimal": 59072
  768. }, {
  769. "icon_id": "24932456",
  770. "name": "notification-filled",
  771. "font_class": "notification-filled",
  772. "unicode": "e6c1",
  773. "unicode_decimal": 59073
  774. }, {
  775. "icon_id": "24932457",
  776. "name": "wallet-filled",
  777. "font_class": "wallet-filled",
  778. "unicode": "e6c2",
  779. "unicode_decimal": 59074
  780. }, {
  781. "icon_id": "24932458",
  782. "name": "paihangbang-filled",
  783. "font_class": "medal-filled",
  784. "unicode": "e6c3",
  785. "unicode_decimal": 59075
  786. }, {
  787. "icon_id": "24932459",
  788. "name": "gift-filled",
  789. "font_class": "gift-filled",
  790. "unicode": "e6c4",
  791. "unicode_decimal": 59076
  792. }, {
  793. "icon_id": "24932460",
  794. "name": "fire-filled",
  795. "font_class": "fire-filled",
  796. "unicode": "e6c5",
  797. "unicode_decimal": 59077
  798. }, {
  799. "icon_id": "24928001",
  800. "name": "refreshempty",
  801. "font_class": "refreshempty",
  802. "unicode": "e6bf",
  803. "unicode_decimal": 59071
  804. }, {
  805. "icon_id": "24926853",
  806. "name": "location-ellipse",
  807. "font_class": "location-filled",
  808. "unicode": "e6af",
  809. "unicode_decimal": 59055
  810. }, {
  811. "icon_id": "24926735",
  812. "name": "person-filled",
  813. "font_class": "person-filled",
  814. "unicode": "e69d",
  815. "unicode_decimal": 59037
  816. }, {
  817. "icon_id": "24926703",
  818. "name": "personadd-filled",
  819. "font_class": "personadd-filled",
  820. "unicode": "e698",
  821. "unicode_decimal": 59032
  822. }, {
  823. "icon_id": "24923351",
  824. "name": "back",
  825. "font_class": "back",
  826. "unicode": "e6b9",
  827. "unicode_decimal": 59065
  828. }, {
  829. "icon_id": "24923352",
  830. "name": "forward",
  831. "font_class": "forward",
  832. "unicode": "e6ba",
  833. "unicode_decimal": 59066
  834. }, {
  835. "icon_id": "24923353",
  836. "name": "arrowthinright",
  837. "font_class": "arrow-right",
  838. "unicode": "e6bb",
  839. "unicode_decimal": 59067
  840. }, {
  841. "icon_id": "24923353",
  842. "name": "arrowthinright",
  843. "font_class": "arrowthinright",
  844. "unicode": "e6bb",
  845. "unicode_decimal": 59067
  846. }, {
  847. "icon_id": "24923354",
  848. "name": "arrowthinleft",
  849. "font_class": "arrow-left",
  850. "unicode": "e6bc",
  851. "unicode_decimal": 59068
  852. }, {
  853. "icon_id": "24923354",
  854. "name": "arrowthinleft",
  855. "font_class": "arrowthinleft",
  856. "unicode": "e6bc",
  857. "unicode_decimal": 59068
  858. }, {
  859. "icon_id": "24923355",
  860. "name": "arrowthinup",
  861. "font_class": "arrow-up",
  862. "unicode": "e6bd",
  863. "unicode_decimal": 59069
  864. }, {
  865. "icon_id": "24923355",
  866. "name": "arrowthinup",
  867. "font_class": "arrowthinup",
  868. "unicode": "e6bd",
  869. "unicode_decimal": 59069
  870. }, {
  871. "icon_id": "24923356",
  872. "name": "arrowthindown",
  873. "font_class": "arrow-down",
  874. "unicode": "e6be",
  875. "unicode_decimal": 59070
  876. }, {
  877. "icon_id": "24923356",
  878. "name": "arrowthindown",
  879. "font_class": "arrowthindown",
  880. "unicode": "e6be",
  881. "unicode_decimal": 59070
  882. }, {
  883. "icon_id": "24923349",
  884. "name": "arrowdown",
  885. "font_class": "bottom",
  886. "unicode": "e6b8",
  887. "unicode_decimal": 59064
  888. }, {
  889. "icon_id": "24923349",
  890. "name": "arrowdown",
  891. "font_class": "arrowdown",
  892. "unicode": "e6b8",
  893. "unicode_decimal": 59064
  894. }, {
  895. "icon_id": "24923346",
  896. "name": "arrowright",
  897. "font_class": "right",
  898. "unicode": "e6b5",
  899. "unicode_decimal": 59061
  900. }, {
  901. "icon_id": "24923346",
  902. "name": "arrowright",
  903. "font_class": "arrowright",
  904. "unicode": "e6b5",
  905. "unicode_decimal": 59061
  906. }, {
  907. "icon_id": "24923347",
  908. "name": "arrowup",
  909. "font_class": "top",
  910. "unicode": "e6b6",
  911. "unicode_decimal": 59062
  912. }, {
  913. "icon_id": "24923347",
  914. "name": "arrowup",
  915. "font_class": "arrowup",
  916. "unicode": "e6b6",
  917. "unicode_decimal": 59062
  918. }, {
  919. "icon_id": "24923348",
  920. "name": "arrowleft",
  921. "font_class": "left",
  922. "unicode": "e6b7",
  923. "unicode_decimal": 59063
  924. }, {
  925. "icon_id": "24923348",
  926. "name": "arrowleft",
  927. "font_class": "arrowleft",
  928. "unicode": "e6b7",
  929. "unicode_decimal": 59063
  930. }, {
  931. "icon_id": "24923334",
  932. "name": "eye",
  933. "font_class": "eye",
  934. "unicode": "e651",
  935. "unicode_decimal": 58961
  936. }, {
  937. "icon_id": "24923335",
  938. "name": "eye-filled",
  939. "font_class": "eye-filled",
  940. "unicode": "e66a",
  941. "unicode_decimal": 58986
  942. }, {
  943. "icon_id": "24923336",
  944. "name": "eye-slash",
  945. "font_class": "eye-slash",
  946. "unicode": "e6b3",
  947. "unicode_decimal": 59059
  948. }, {
  949. "icon_id": "24923337",
  950. "name": "eye-slash-filled",
  951. "font_class": "eye-slash-filled",
  952. "unicode": "e6b4",
  953. "unicode_decimal": 59060
  954. }, {
  955. "icon_id": "24923305",
  956. "name": "info-filled",
  957. "font_class": "info-filled",
  958. "unicode": "e649",
  959. "unicode_decimal": 58953
  960. }, {
  961. "icon_id": "24923299",
  962. "name": "reload-01",
  963. "font_class": "reload",
  964. "unicode": "e6b2",
  965. "unicode_decimal": 59058
  966. }, {
  967. "icon_id": "24923195",
  968. "name": "mic_slash_fill",
  969. "font_class": "micoff-filled",
  970. "unicode": "e6b0",
  971. "unicode_decimal": 59056
  972. }, {
  973. "icon_id": "24923165",
  974. "name": "map-pin-ellipse",
  975. "font_class": "map-pin-ellipse",
  976. "unicode": "e6ac",
  977. "unicode_decimal": 59052
  978. }, {
  979. "icon_id": "24923166",
  980. "name": "map-pin",
  981. "font_class": "map-pin",
  982. "unicode": "e6ad",
  983. "unicode_decimal": 59053
  984. }, {
  985. "icon_id": "24923167",
  986. "name": "location",
  987. "font_class": "location",
  988. "unicode": "e6ae",
  989. "unicode_decimal": 59054
  990. }, {
  991. "icon_id": "24923064",
  992. "name": "starhalf",
  993. "font_class": "starhalf",
  994. "unicode": "e683",
  995. "unicode_decimal": 59011
  996. }, {
  997. "icon_id": "24923065",
  998. "name": "star",
  999. "font_class": "star",
  1000. "unicode": "e688",
  1001. "unicode_decimal": 59016
  1002. }, {
  1003. "icon_id": "24923066",
  1004. "name": "star-filled",
  1005. "font_class": "star-filled",
  1006. "unicode": "e68f",
  1007. "unicode_decimal": 59023
  1008. }, {
  1009. "icon_id": "24899646",
  1010. "name": "a-rilidaka",
  1011. "font_class": "calendar",
  1012. "unicode": "e6a0",
  1013. "unicode_decimal": 59040
  1014. }, {
  1015. "icon_id": "24899647",
  1016. "name": "fire",
  1017. "font_class": "fire",
  1018. "unicode": "e6a1",
  1019. "unicode_decimal": 59041
  1020. }, {
  1021. "icon_id": "24899648",
  1022. "name": "paihangbang",
  1023. "font_class": "medal",
  1024. "unicode": "e6a2",
  1025. "unicode_decimal": 59042
  1026. }, {
  1027. "icon_id": "24899649",
  1028. "name": "font",
  1029. "font_class": "font",
  1030. "unicode": "e6a3",
  1031. "unicode_decimal": 59043
  1032. }, {
  1033. "icon_id": "24899650",
  1034. "name": "gift",
  1035. "font_class": "gift",
  1036. "unicode": "e6a4",
  1037. "unicode_decimal": 59044
  1038. }, {
  1039. "icon_id": "24899651",
  1040. "name": "link",
  1041. "font_class": "link",
  1042. "unicode": "e6a5",
  1043. "unicode_decimal": 59045
  1044. }, {
  1045. "icon_id": "24899652",
  1046. "name": "notification",
  1047. "font_class": "notification",
  1048. "unicode": "e6a6",
  1049. "unicode_decimal": 59046
  1050. }, {
  1051. "icon_id": "24899653",
  1052. "name": "staff",
  1053. "font_class": "staff",
  1054. "unicode": "e6a7",
  1055. "unicode_decimal": 59047
  1056. }, {
  1057. "icon_id": "24899654",
  1058. "name": "VIP",
  1059. "font_class": "vip",
  1060. "unicode": "e6a8",
  1061. "unicode_decimal": 59048
  1062. }, {
  1063. "icon_id": "24899655",
  1064. "name": "folder_add",
  1065. "font_class": "folder-add",
  1066. "unicode": "e6a9",
  1067. "unicode_decimal": 59049
  1068. }, {
  1069. "icon_id": "24899656",
  1070. "name": "tune",
  1071. "font_class": "tune",
  1072. "unicode": "e6aa",
  1073. "unicode_decimal": 59050
  1074. }, {
  1075. "icon_id": "24899657",
  1076. "name": "shimingrenzheng",
  1077. "font_class": "auth",
  1078. "unicode": "e6ab",
  1079. "unicode_decimal": 59051
  1080. }, {
  1081. "icon_id": "24899565",
  1082. "name": "person",
  1083. "font_class": "person",
  1084. "unicode": "e699",
  1085. "unicode_decimal": 59033
  1086. }, {
  1087. "icon_id": "24899566",
  1088. "name": "email-filled",
  1089. "font_class": "email-filled",
  1090. "unicode": "e69a",
  1091. "unicode_decimal": 59034
  1092. }, {
  1093. "icon_id": "24899567",
  1094. "name": "phone-filled",
  1095. "font_class": "phone-filled",
  1096. "unicode": "e69b",
  1097. "unicode_decimal": 59035
  1098. }, {
  1099. "icon_id": "24899568",
  1100. "name": "phone",
  1101. "font_class": "phone",
  1102. "unicode": "e69c",
  1103. "unicode_decimal": 59036
  1104. }, {
  1105. "icon_id": "24899570",
  1106. "name": "email",
  1107. "font_class": "email",
  1108. "unicode": "e69e",
  1109. "unicode_decimal": 59038
  1110. }, {
  1111. "icon_id": "24899571",
  1112. "name": "personadd",
  1113. "font_class": "personadd",
  1114. "unicode": "e69f",
  1115. "unicode_decimal": 59039
  1116. }, {
  1117. "icon_id": "24899558",
  1118. "name": "chatboxes-filled",
  1119. "font_class": "chatboxes-filled",
  1120. "unicode": "e692",
  1121. "unicode_decimal": 59026
  1122. }, {
  1123. "icon_id": "24899559",
  1124. "name": "contact",
  1125. "font_class": "contact",
  1126. "unicode": "e693",
  1127. "unicode_decimal": 59027
  1128. }, {
  1129. "icon_id": "24899560",
  1130. "name": "chatbubble-filled",
  1131. "font_class": "chatbubble-filled",
  1132. "unicode": "e694",
  1133. "unicode_decimal": 59028
  1134. }, {
  1135. "icon_id": "24899561",
  1136. "name": "contact-filled",
  1137. "font_class": "contact-filled",
  1138. "unicode": "e695",
  1139. "unicode_decimal": 59029
  1140. }, {
  1141. "icon_id": "24899562",
  1142. "name": "chatboxes",
  1143. "font_class": "chatboxes",
  1144. "unicode": "e696",
  1145. "unicode_decimal": 59030
  1146. }, {
  1147. "icon_id": "24899563",
  1148. "name": "chatbubble",
  1149. "font_class": "chatbubble",
  1150. "unicode": "e697",
  1151. "unicode_decimal": 59031
  1152. }, {
  1153. "icon_id": "24881290",
  1154. "name": "upload-filled",
  1155. "font_class": "upload-filled",
  1156. "unicode": "e68e",
  1157. "unicode_decimal": 59022
  1158. }, {
  1159. "icon_id": "24881292",
  1160. "name": "upload",
  1161. "font_class": "upload",
  1162. "unicode": "e690",
  1163. "unicode_decimal": 59024
  1164. }, {
  1165. "icon_id": "24881293",
  1166. "name": "weixin",
  1167. "font_class": "weixin",
  1168. "unicode": "e691",
  1169. "unicode_decimal": 59025
  1170. }, {
  1171. "icon_id": "24881274",
  1172. "name": "compose",
  1173. "font_class": "compose",
  1174. "unicode": "e67f",
  1175. "unicode_decimal": 59007
  1176. }, {
  1177. "icon_id": "24881275",
  1178. "name": "qq",
  1179. "font_class": "qq",
  1180. "unicode": "e680",
  1181. "unicode_decimal": 59008
  1182. }, {
  1183. "icon_id": "24881276",
  1184. "name": "download-filled",
  1185. "font_class": "download-filled",
  1186. "unicode": "e681",
  1187. "unicode_decimal": 59009
  1188. }, {
  1189. "icon_id": "24881277",
  1190. "name": "pengyouquan",
  1191. "font_class": "pyq",
  1192. "unicode": "e682",
  1193. "unicode_decimal": 59010
  1194. }, {
  1195. "icon_id": "24881279",
  1196. "name": "sound",
  1197. "font_class": "sound",
  1198. "unicode": "e684",
  1199. "unicode_decimal": 59012
  1200. }, {
  1201. "icon_id": "24881280",
  1202. "name": "trash-filled",
  1203. "font_class": "trash-filled",
  1204. "unicode": "e685",
  1205. "unicode_decimal": 59013
  1206. }, {
  1207. "icon_id": "24881281",
  1208. "name": "sound-filled",
  1209. "font_class": "sound-filled",
  1210. "unicode": "e686",
  1211. "unicode_decimal": 59014
  1212. }, {
  1213. "icon_id": "24881282",
  1214. "name": "trash",
  1215. "font_class": "trash",
  1216. "unicode": "e687",
  1217. "unicode_decimal": 59015
  1218. }, {
  1219. "icon_id": "24881284",
  1220. "name": "videocam-filled",
  1221. "font_class": "videocam-filled",
  1222. "unicode": "e689",
  1223. "unicode_decimal": 59017
  1224. }, {
  1225. "icon_id": "24881285",
  1226. "name": "spinner-cycle",
  1227. "font_class": "spinner-cycle",
  1228. "unicode": "e68a",
  1229. "unicode_decimal": 59018
  1230. }, {
  1231. "icon_id": "24881286",
  1232. "name": "weibo",
  1233. "font_class": "weibo",
  1234. "unicode": "e68b",
  1235. "unicode_decimal": 59019
  1236. }, {
  1237. "icon_id": "24881288",
  1238. "name": "videocam",
  1239. "font_class": "videocam",
  1240. "unicode": "e68c",
  1241. "unicode_decimal": 59020
  1242. }, {
  1243. "icon_id": "24881289",
  1244. "name": "download",
  1245. "font_class": "download",
  1246. "unicode": "e68d",
  1247. "unicode_decimal": 59021
  1248. }, {
  1249. "icon_id": "24879601",
  1250. "name": "help",
  1251. "font_class": "help",
  1252. "unicode": "e679",
  1253. "unicode_decimal": 59001
  1254. }, {
  1255. "icon_id": "24879602",
  1256. "name": "navigate-filled",
  1257. "font_class": "navigate-filled",
  1258. "unicode": "e67a",
  1259. "unicode_decimal": 59002
  1260. }, {
  1261. "icon_id": "24879603",
  1262. "name": "plusempty",
  1263. "font_class": "plusempty",
  1264. "unicode": "e67b",
  1265. "unicode_decimal": 59003
  1266. }, {
  1267. "icon_id": "24879604",
  1268. "name": "smallcircle",
  1269. "font_class": "smallcircle",
  1270. "unicode": "e67c",
  1271. "unicode_decimal": 59004
  1272. }, {
  1273. "icon_id": "24879605",
  1274. "name": "minus-filled",
  1275. "font_class": "minus-filled",
  1276. "unicode": "e67d",
  1277. "unicode_decimal": 59005
  1278. }, {
  1279. "icon_id": "24879606",
  1280. "name": "micoff",
  1281. "font_class": "micoff",
  1282. "unicode": "e67e",
  1283. "unicode_decimal": 59006
  1284. }, {
  1285. "icon_id": "24879588",
  1286. "name": "closeempty",
  1287. "font_class": "closeempty",
  1288. "unicode": "e66c",
  1289. "unicode_decimal": 58988
  1290. }, {
  1291. "icon_id": "24879589",
  1292. "name": "clear",
  1293. "font_class": "clear",
  1294. "unicode": "e66d",
  1295. "unicode_decimal": 58989
  1296. }, {
  1297. "icon_id": "24879590",
  1298. "name": "navigate",
  1299. "font_class": "navigate",
  1300. "unicode": "e66e",
  1301. "unicode_decimal": 58990
  1302. }, {
  1303. "icon_id": "24879591",
  1304. "name": "minus",
  1305. "font_class": "minus",
  1306. "unicode": "e66f",
  1307. "unicode_decimal": 58991
  1308. }, {
  1309. "icon_id": "24879592",
  1310. "name": "image",
  1311. "font_class": "image",
  1312. "unicode": "e670",
  1313. "unicode_decimal": 58992
  1314. }, {
  1315. "icon_id": "24879593",
  1316. "name": "mic",
  1317. "font_class": "mic",
  1318. "unicode": "e671",
  1319. "unicode_decimal": 58993
  1320. }, {
  1321. "icon_id": "24879594",
  1322. "name": "paperplane",
  1323. "font_class": "paperplane",
  1324. "unicode": "e672",
  1325. "unicode_decimal": 58994
  1326. }, {
  1327. "icon_id": "24879595",
  1328. "name": "close",
  1329. "font_class": "close",
  1330. "unicode": "e673",
  1331. "unicode_decimal": 58995
  1332. }, {
  1333. "icon_id": "24879596",
  1334. "name": "help-filled",
  1335. "font_class": "help-filled",
  1336. "unicode": "e674",
  1337. "unicode_decimal": 58996
  1338. }, {
  1339. "icon_id": "24879597",
  1340. "name": "plus-filled",
  1341. "font_class": "paperplane-filled",
  1342. "unicode": "e675",
  1343. "unicode_decimal": 58997
  1344. }, {
  1345. "icon_id": "24879598",
  1346. "name": "plus",
  1347. "font_class": "plus",
  1348. "unicode": "e676",
  1349. "unicode_decimal": 58998
  1350. }, {
  1351. "icon_id": "24879599",
  1352. "name": "mic-filled",
  1353. "font_class": "mic-filled",
  1354. "unicode": "e677",
  1355. "unicode_decimal": 58999
  1356. }, {
  1357. "icon_id": "24879600",
  1358. "name": "image-filled",
  1359. "font_class": "image-filled",
  1360. "unicode": "e678",
  1361. "unicode_decimal": 59000
  1362. }, {
  1363. "icon_id": "24855900",
  1364. "name": "locked-filled",
  1365. "font_class": "locked-filled",
  1366. "unicode": "e668",
  1367. "unicode_decimal": 58984
  1368. }, {
  1369. "icon_id": "24855901",
  1370. "name": "info",
  1371. "font_class": "info",
  1372. "unicode": "e669",
  1373. "unicode_decimal": 58985
  1374. }, {
  1375. "icon_id": "24855903",
  1376. "name": "locked",
  1377. "font_class": "locked",
  1378. "unicode": "e66b",
  1379. "unicode_decimal": 58987
  1380. }, {
  1381. "icon_id": "24855884",
  1382. "name": "camera-filled",
  1383. "font_class": "camera-filled",
  1384. "unicode": "e658",
  1385. "unicode_decimal": 58968
  1386. }, {
  1387. "icon_id": "24855885",
  1388. "name": "chat-filled",
  1389. "font_class": "chat-filled",
  1390. "unicode": "e659",
  1391. "unicode_decimal": 58969
  1392. }, {
  1393. "icon_id": "24855886",
  1394. "name": "camera",
  1395. "font_class": "camera",
  1396. "unicode": "e65a",
  1397. "unicode_decimal": 58970
  1398. }, {
  1399. "icon_id": "24855887",
  1400. "name": "circle",
  1401. "font_class": "circle",
  1402. "unicode": "e65b",
  1403. "unicode_decimal": 58971
  1404. }, {
  1405. "icon_id": "24855888",
  1406. "name": "checkmarkempty",
  1407. "font_class": "checkmarkempty",
  1408. "unicode": "e65c",
  1409. "unicode_decimal": 58972
  1410. }, {
  1411. "icon_id": "24855889",
  1412. "name": "chat",
  1413. "font_class": "chat",
  1414. "unicode": "e65d",
  1415. "unicode_decimal": 58973
  1416. }, {
  1417. "icon_id": "24855890",
  1418. "name": "circle-filled",
  1419. "font_class": "circle-filled",
  1420. "unicode": "e65e",
  1421. "unicode_decimal": 58974
  1422. }, {
  1423. "icon_id": "24855891",
  1424. "name": "flag",
  1425. "font_class": "flag",
  1426. "unicode": "e65f",
  1427. "unicode_decimal": 58975
  1428. }, {
  1429. "icon_id": "24855892",
  1430. "name": "flag-filled",
  1431. "font_class": "flag-filled",
  1432. "unicode": "e660",
  1433. "unicode_decimal": 58976
  1434. }, {
  1435. "icon_id": "24855893",
  1436. "name": "gear-filled",
  1437. "font_class": "gear-filled",
  1438. "unicode": "e661",
  1439. "unicode_decimal": 58977
  1440. }, {
  1441. "icon_id": "24855894",
  1442. "name": "home",
  1443. "font_class": "home",
  1444. "unicode": "e662",
  1445. "unicode_decimal": 58978
  1446. }, {
  1447. "icon_id": "24855895",
  1448. "name": "home-filled",
  1449. "font_class": "home-filled",
  1450. "unicode": "e663",
  1451. "unicode_decimal": 58979
  1452. }, {
  1453. "icon_id": "24855896",
  1454. "name": "gear",
  1455. "font_class": "gear",
  1456. "unicode": "e664",
  1457. "unicode_decimal": 58980
  1458. }, {
  1459. "icon_id": "24855897",
  1460. "name": "smallcircle-filled",
  1461. "font_class": "smallcircle-filled",
  1462. "unicode": "e665",
  1463. "unicode_decimal": 58981
  1464. }, {
  1465. "icon_id": "24855898",
  1466. "name": "map-filled",
  1467. "font_class": "map-filled",
  1468. "unicode": "e666",
  1469. "unicode_decimal": 58982
  1470. }, {
  1471. "icon_id": "24855899",
  1472. "name": "map",
  1473. "font_class": "map",
  1474. "unicode": "e667",
  1475. "unicode_decimal": 58983
  1476. }, {
  1477. "icon_id": "24855825",
  1478. "name": "refresh-filled",
  1479. "font_class": "refresh-filled",
  1480. "unicode": "e656",
  1481. "unicode_decimal": 58966
  1482. }, {
  1483. "icon_id": "24855826",
  1484. "name": "refresh",
  1485. "font_class": "refresh",
  1486. "unicode": "e657",
  1487. "unicode_decimal": 58967
  1488. }, {
  1489. "icon_id": "24855808",
  1490. "name": "cloud-upload",
  1491. "font_class": "cloud-upload",
  1492. "unicode": "e645",
  1493. "unicode_decimal": 58949
  1494. }, {
  1495. "icon_id": "24855809",
  1496. "name": "cloud-download-filled",
  1497. "font_class": "cloud-download-filled",
  1498. "unicode": "e646",
  1499. "unicode_decimal": 58950
  1500. }, {
  1501. "icon_id": "24855810",
  1502. "name": "cloud-download",
  1503. "font_class": "cloud-download",
  1504. "unicode": "e647",
  1505. "unicode_decimal": 58951
  1506. }, {
  1507. "icon_id": "24855811",
  1508. "name": "cloud-upload-filled",
  1509. "font_class": "cloud-upload-filled",
  1510. "unicode": "e648",
  1511. "unicode_decimal": 58952
  1512. }, {
  1513. "icon_id": "24855813",
  1514. "name": "redo",
  1515. "font_class": "redo",
  1516. "unicode": "e64a",
  1517. "unicode_decimal": 58954
  1518. }, {
  1519. "icon_id": "24855814",
  1520. "name": "images-filled",
  1521. "font_class": "images-filled",
  1522. "unicode": "e64b",
  1523. "unicode_decimal": 58955
  1524. }, {
  1525. "icon_id": "24855815",
  1526. "name": "undo-filled",
  1527. "font_class": "undo-filled",
  1528. "unicode": "e64c",
  1529. "unicode_decimal": 58956
  1530. }, {
  1531. "icon_id": "24855816",
  1532. "name": "more",
  1533. "font_class": "more",
  1534. "unicode": "e64d",
  1535. "unicode_decimal": 58957
  1536. }, {
  1537. "icon_id": "24855817",
  1538. "name": "more-filled",
  1539. "font_class": "more-filled",
  1540. "unicode": "e64e",
  1541. "unicode_decimal": 58958
  1542. }, {
  1543. "icon_id": "24855818",
  1544. "name": "undo",
  1545. "font_class": "undo",
  1546. "unicode": "e64f",
  1547. "unicode_decimal": 58959
  1548. }, {
  1549. "icon_id": "24855819",
  1550. "name": "images",
  1551. "font_class": "images",
  1552. "unicode": "e650",
  1553. "unicode_decimal": 58960
  1554. }, {
  1555. "icon_id": "24855821",
  1556. "name": "paperclip",
  1557. "font_class": "paperclip",
  1558. "unicode": "e652",
  1559. "unicode_decimal": 58962
  1560. }, {
  1561. "icon_id": "24855822",
  1562. "name": "settings",
  1563. "font_class": "settings",
  1564. "unicode": "e653",
  1565. "unicode_decimal": 58963
  1566. }, {
  1567. "icon_id": "24855823",
  1568. "name": "search",
  1569. "font_class": "search",
  1570. "unicode": "e654",
  1571. "unicode_decimal": 58964
  1572. }, {
  1573. "icon_id": "24855824",
  1574. "name": "redo-filled",
  1575. "font_class": "redo-filled",
  1576. "unicode": "e655",
  1577. "unicode_decimal": 58965
  1578. }, {
  1579. "icon_id": "24841702",
  1580. "name": "list",
  1581. "font_class": "list",
  1582. "unicode": "e644",
  1583. "unicode_decimal": 58948
  1584. }, {
  1585. "icon_id": "24841489",
  1586. "name": "mail-open-filled",
  1587. "font_class": "mail-open-filled",
  1588. "unicode": "e63a",
  1589. "unicode_decimal": 58938
  1590. }, {
  1591. "icon_id": "24841491",
  1592. "name": "hand-thumbsdown-filled",
  1593. "font_class": "hand-down-filled",
  1594. "unicode": "e63c",
  1595. "unicode_decimal": 58940
  1596. }, {
  1597. "icon_id": "24841492",
  1598. "name": "hand-thumbsdown",
  1599. "font_class": "hand-down",
  1600. "unicode": "e63d",
  1601. "unicode_decimal": 58941
  1602. }, {
  1603. "icon_id": "24841493",
  1604. "name": "hand-thumbsup-filled",
  1605. "font_class": "hand-up-filled",
  1606. "unicode": "e63e",
  1607. "unicode_decimal": 58942
  1608. }, {
  1609. "icon_id": "24841494",
  1610. "name": "hand-thumbsup",
  1611. "font_class": "hand-up",
  1612. "unicode": "e63f",
  1613. "unicode_decimal": 58943
  1614. }, {
  1615. "icon_id": "24841496",
  1616. "name": "heart-filled",
  1617. "font_class": "heart-filled",
  1618. "unicode": "e641",
  1619. "unicode_decimal": 58945
  1620. }, {
  1621. "icon_id": "24841498",
  1622. "name": "mail-open",
  1623. "font_class": "mail-open",
  1624. "unicode": "e643",
  1625. "unicode_decimal": 58947
  1626. }, {
  1627. "icon_id": "24841488",
  1628. "name": "heart",
  1629. "font_class": "heart",
  1630. "unicode": "e639",
  1631. "unicode_decimal": 58937
  1632. }, {
  1633. "icon_id": "24839963",
  1634. "name": "loop",
  1635. "font_class": "loop",
  1636. "unicode": "e633",
  1637. "unicode_decimal": 58931
  1638. }, {
  1639. "icon_id": "24839866",
  1640. "name": "pulldown",
  1641. "font_class": "pulldown",
  1642. "unicode": "e632",
  1643. "unicode_decimal": 58930
  1644. }, {
  1645. "icon_id": "24813798",
  1646. "name": "scan",
  1647. "font_class": "scan",
  1648. "unicode": "e62a",
  1649. "unicode_decimal": 58922
  1650. }, {
  1651. "icon_id": "24813786",
  1652. "name": "bars",
  1653. "font_class": "bars",
  1654. "unicode": "e627",
  1655. "unicode_decimal": 58919
  1656. }, {
  1657. "icon_id": "24813788",
  1658. "name": "cart-filled",
  1659. "font_class": "cart-filled",
  1660. "unicode": "e629",
  1661. "unicode_decimal": 58921
  1662. }, {
  1663. "icon_id": "24813790",
  1664. "name": "checkbox",
  1665. "font_class": "checkbox",
  1666. "unicode": "e62b",
  1667. "unicode_decimal": 58923
  1668. }, {
  1669. "icon_id": "24813791",
  1670. "name": "checkbox-filled",
  1671. "font_class": "checkbox-filled",
  1672. "unicode": "e62c",
  1673. "unicode_decimal": 58924
  1674. }, {
  1675. "icon_id": "24813794",
  1676. "name": "shop",
  1677. "font_class": "shop",
  1678. "unicode": "e62f",
  1679. "unicode_decimal": 58927
  1680. }, {
  1681. "icon_id": "24813795",
  1682. "name": "headphones",
  1683. "font_class": "headphones",
  1684. "unicode": "e630",
  1685. "unicode_decimal": 58928
  1686. }, {
  1687. "icon_id": "24813796",
  1688. "name": "cart",
  1689. "font_class": "cart",
  1690. "unicode": "e631",
  1691. "unicode_decimal": 58929
  1692. }]
  1693. };
  1694. exports.default = _default;
  1695. /***/ }),
  1696. /***/ 2:
  1697. /*!************************************************************!*\
  1698. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  1699. \************************************************************/
  1700. /*! no static exports found */
  1701. /***/ (function(module, exports, __webpack_require__) {
  1702. "use strict";
  1703. /* WEBPACK VAR INJECTION */(function(wx, global) {
  1704. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  1705. Object.defineProperty(exports, "__esModule", {
  1706. value: true
  1707. });
  1708. exports.createApp = createApp;
  1709. exports.createComponent = createComponent;
  1710. exports.createPage = createPage;
  1711. exports.createPlugin = createPlugin;
  1712. exports.createSubpackageApp = createSubpackageApp;
  1713. exports.default = void 0;
  1714. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  1715. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  1716. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  1717. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  1718. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  1719. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  1720. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  1721. 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; }
  1722. 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; }
  1723. var realAtob;
  1724. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  1725. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  1726. if (typeof atob !== 'function') {
  1727. realAtob = function realAtob(str) {
  1728. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  1729. if (!b64re.test(str)) {
  1730. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  1731. }
  1732. // Adding the padding if missing, for semplicity
  1733. str += '=='.slice(2 - (str.length & 3));
  1734. var bitmap;
  1735. var result = '';
  1736. var r1;
  1737. var r2;
  1738. var i = 0;
  1739. for (; i < str.length;) {
  1740. 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++)));
  1741. 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);
  1742. }
  1743. return result;
  1744. };
  1745. } else {
  1746. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  1747. realAtob = atob;
  1748. }
  1749. function b64DecodeUnicode(str) {
  1750. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  1751. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  1752. }).join(''));
  1753. }
  1754. function getCurrentUserInfo() {
  1755. var token = wx.getStorageSync('uni_id_token') || '';
  1756. var tokenArr = token.split('.');
  1757. if (!token || tokenArr.length !== 3) {
  1758. return {
  1759. uid: null,
  1760. role: [],
  1761. permission: [],
  1762. tokenExpired: 0
  1763. };
  1764. }
  1765. var userInfo;
  1766. try {
  1767. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  1768. } catch (error) {
  1769. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  1770. }
  1771. userInfo.tokenExpired = userInfo.exp * 1000;
  1772. delete userInfo.exp;
  1773. delete userInfo.iat;
  1774. return userInfo;
  1775. }
  1776. function uniIdMixin(Vue) {
  1777. Vue.prototype.uniIDHasRole = function (roleId) {
  1778. var _getCurrentUserInfo = getCurrentUserInfo(),
  1779. role = _getCurrentUserInfo.role;
  1780. return role.indexOf(roleId) > -1;
  1781. };
  1782. Vue.prototype.uniIDHasPermission = function (permissionId) {
  1783. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  1784. permission = _getCurrentUserInfo2.permission;
  1785. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  1786. };
  1787. Vue.prototype.uniIDTokenValid = function () {
  1788. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  1789. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  1790. return tokenExpired > Date.now();
  1791. };
  1792. }
  1793. var _toString = Object.prototype.toString;
  1794. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1795. function isFn(fn) {
  1796. return typeof fn === 'function';
  1797. }
  1798. function isStr(str) {
  1799. return typeof str === 'string';
  1800. }
  1801. function isObject(obj) {
  1802. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  1803. }
  1804. function isPlainObject(obj) {
  1805. return _toString.call(obj) === '[object Object]';
  1806. }
  1807. function hasOwn(obj, key) {
  1808. return hasOwnProperty.call(obj, key);
  1809. }
  1810. function noop() {}
  1811. /**
  1812. * Create a cached version of a pure function.
  1813. */
  1814. function cached(fn) {
  1815. var cache = Object.create(null);
  1816. return function cachedFn(str) {
  1817. var hit = cache[str];
  1818. return hit || (cache[str] = fn(str));
  1819. };
  1820. }
  1821. /**
  1822. * Camelize a hyphen-delimited string.
  1823. */
  1824. var camelizeRE = /-(\w)/g;
  1825. var camelize = cached(function (str) {
  1826. return str.replace(camelizeRE, function (_, c) {
  1827. return c ? c.toUpperCase() : '';
  1828. });
  1829. });
  1830. function sortObject(obj) {
  1831. var sortObj = {};
  1832. if (isPlainObject(obj)) {
  1833. Object.keys(obj).sort().forEach(function (key) {
  1834. sortObj[key] = obj[key];
  1835. });
  1836. }
  1837. return !Object.keys(sortObj) ? obj : sortObj;
  1838. }
  1839. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  1840. var globalInterceptors = {};
  1841. var scopedInterceptors = {};
  1842. function mergeHook(parentVal, childVal) {
  1843. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  1844. return res ? dedupeHooks(res) : res;
  1845. }
  1846. function dedupeHooks(hooks) {
  1847. var res = [];
  1848. for (var i = 0; i < hooks.length; i++) {
  1849. if (res.indexOf(hooks[i]) === -1) {
  1850. res.push(hooks[i]);
  1851. }
  1852. }
  1853. return res;
  1854. }
  1855. function removeHook(hooks, hook) {
  1856. var index = hooks.indexOf(hook);
  1857. if (index !== -1) {
  1858. hooks.splice(index, 1);
  1859. }
  1860. }
  1861. function mergeInterceptorHook(interceptor, option) {
  1862. Object.keys(option).forEach(function (hook) {
  1863. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  1864. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  1865. }
  1866. });
  1867. }
  1868. function removeInterceptorHook(interceptor, option) {
  1869. if (!interceptor || !option) {
  1870. return;
  1871. }
  1872. Object.keys(option).forEach(function (hook) {
  1873. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  1874. removeHook(interceptor[hook], option[hook]);
  1875. }
  1876. });
  1877. }
  1878. function addInterceptor(method, option) {
  1879. if (typeof method === 'string' && isPlainObject(option)) {
  1880. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  1881. } else if (isPlainObject(method)) {
  1882. mergeInterceptorHook(globalInterceptors, method);
  1883. }
  1884. }
  1885. function removeInterceptor(method, option) {
  1886. if (typeof method === 'string') {
  1887. if (isPlainObject(option)) {
  1888. removeInterceptorHook(scopedInterceptors[method], option);
  1889. } else {
  1890. delete scopedInterceptors[method];
  1891. }
  1892. } else if (isPlainObject(method)) {
  1893. removeInterceptorHook(globalInterceptors, method);
  1894. }
  1895. }
  1896. function wrapperHook(hook, params) {
  1897. return function (data) {
  1898. return hook(data, params) || data;
  1899. };
  1900. }
  1901. function isPromise(obj) {
  1902. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  1903. }
  1904. function queue(hooks, data, params) {
  1905. var promise = false;
  1906. for (var i = 0; i < hooks.length; i++) {
  1907. var hook = hooks[i];
  1908. if (promise) {
  1909. promise = Promise.resolve(wrapperHook(hook, params));
  1910. } else {
  1911. var res = hook(data, params);
  1912. if (isPromise(res)) {
  1913. promise = Promise.resolve(res);
  1914. }
  1915. if (res === false) {
  1916. return {
  1917. then: function then() {}
  1918. };
  1919. }
  1920. }
  1921. }
  1922. return promise || {
  1923. then: function then(callback) {
  1924. return callback(data);
  1925. }
  1926. };
  1927. }
  1928. function wrapperOptions(interceptor) {
  1929. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1930. ['success', 'fail', 'complete'].forEach(function (name) {
  1931. if (Array.isArray(interceptor[name])) {
  1932. var oldCallback = options[name];
  1933. options[name] = function callbackInterceptor(res) {
  1934. queue(interceptor[name], res, options).then(function (res) {
  1935. /* eslint-disable no-mixed-operators */
  1936. return isFn(oldCallback) && oldCallback(res) || res;
  1937. });
  1938. };
  1939. }
  1940. });
  1941. return options;
  1942. }
  1943. function wrapperReturnValue(method, returnValue) {
  1944. var returnValueHooks = [];
  1945. if (Array.isArray(globalInterceptors.returnValue)) {
  1946. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  1947. }
  1948. var interceptor = scopedInterceptors[method];
  1949. if (interceptor && Array.isArray(interceptor.returnValue)) {
  1950. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  1951. }
  1952. returnValueHooks.forEach(function (hook) {
  1953. returnValue = hook(returnValue) || returnValue;
  1954. });
  1955. return returnValue;
  1956. }
  1957. function getApiInterceptorHooks(method) {
  1958. var interceptor = Object.create(null);
  1959. Object.keys(globalInterceptors).forEach(function (hook) {
  1960. if (hook !== 'returnValue') {
  1961. interceptor[hook] = globalInterceptors[hook].slice();
  1962. }
  1963. });
  1964. var scopedInterceptor = scopedInterceptors[method];
  1965. if (scopedInterceptor) {
  1966. Object.keys(scopedInterceptor).forEach(function (hook) {
  1967. if (hook !== 'returnValue') {
  1968. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  1969. }
  1970. });
  1971. }
  1972. return interceptor;
  1973. }
  1974. function invokeApi(method, api, options) {
  1975. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  1976. params[_key - 3] = arguments[_key];
  1977. }
  1978. var interceptor = getApiInterceptorHooks(method);
  1979. if (interceptor && Object.keys(interceptor).length) {
  1980. if (Array.isArray(interceptor.invoke)) {
  1981. var res = queue(interceptor.invoke, options);
  1982. return res.then(function (options) {
  1983. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  1984. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  1985. });
  1986. } else {
  1987. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  1988. }
  1989. }
  1990. return api.apply(void 0, [options].concat(params));
  1991. }
  1992. var promiseInterceptor = {
  1993. returnValue: function returnValue(res) {
  1994. if (!isPromise(res)) {
  1995. return res;
  1996. }
  1997. return new Promise(function (resolve, reject) {
  1998. res.then(function (res) {
  1999. if (res[0]) {
  2000. reject(res[0]);
  2001. } else {
  2002. resolve(res[1]);
  2003. }
  2004. });
  2005. });
  2006. }
  2007. };
  2008. 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/;
  2009. var CONTEXT_API_RE = /^create|Manager$/;
  2010. // Context例外情况
  2011. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  2012. // 同步例外情况
  2013. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  2014. var CALLBACK_API_RE = /^on|^off/;
  2015. function isContextApi(name) {
  2016. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  2017. }
  2018. function isSyncApi(name) {
  2019. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  2020. }
  2021. function isCallbackApi(name) {
  2022. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  2023. }
  2024. function handlePromise(promise) {
  2025. return promise.then(function (data) {
  2026. return [null, data];
  2027. }).catch(function (err) {
  2028. return [err];
  2029. });
  2030. }
  2031. function shouldPromise(name) {
  2032. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  2033. return false;
  2034. }
  2035. return true;
  2036. }
  2037. /* eslint-disable no-extend-native */
  2038. if (!Promise.prototype.finally) {
  2039. Promise.prototype.finally = function (callback) {
  2040. var promise = this.constructor;
  2041. return this.then(function (value) {
  2042. return promise.resolve(callback()).then(function () {
  2043. return value;
  2044. });
  2045. }, function (reason) {
  2046. return promise.resolve(callback()).then(function () {
  2047. throw reason;
  2048. });
  2049. });
  2050. };
  2051. }
  2052. function promisify(name, api) {
  2053. if (!shouldPromise(name) || !isFn(api)) {
  2054. return api;
  2055. }
  2056. return function promiseApi() {
  2057. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  2058. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  2059. params[_key2 - 1] = arguments[_key2];
  2060. }
  2061. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  2062. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  2063. }
  2064. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  2065. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  2066. success: resolve,
  2067. fail: reject
  2068. })].concat(params));
  2069. })));
  2070. };
  2071. }
  2072. var EPS = 1e-4;
  2073. var BASE_DEVICE_WIDTH = 750;
  2074. var isIOS = false;
  2075. var deviceWidth = 0;
  2076. var deviceDPR = 0;
  2077. function checkDeviceWidth() {
  2078. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  2079. platform = _wx$getSystemInfoSync.platform,
  2080. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  2081. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  2082. deviceWidth = windowWidth;
  2083. deviceDPR = pixelRatio;
  2084. isIOS = platform === 'ios';
  2085. }
  2086. function upx2px(number, newDeviceWidth) {
  2087. if (deviceWidth === 0) {
  2088. checkDeviceWidth();
  2089. }
  2090. number = Number(number);
  2091. if (number === 0) {
  2092. return 0;
  2093. }
  2094. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  2095. if (result < 0) {
  2096. result = -result;
  2097. }
  2098. result = Math.floor(result + EPS);
  2099. if (result === 0) {
  2100. if (deviceDPR === 1 || !isIOS) {
  2101. result = 1;
  2102. } else {
  2103. result = 0.5;
  2104. }
  2105. }
  2106. return number < 0 ? -result : result;
  2107. }
  2108. var LOCALE_ZH_HANS = 'zh-Hans';
  2109. var LOCALE_ZH_HANT = 'zh-Hant';
  2110. var LOCALE_EN = 'en';
  2111. var LOCALE_FR = 'fr';
  2112. var LOCALE_ES = 'es';
  2113. var messages = {};
  2114. var locale;
  2115. {
  2116. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  2117. }
  2118. function initI18nMessages() {
  2119. if (!isEnableLocale()) {
  2120. return;
  2121. }
  2122. var localeKeys = Object.keys(__uniConfig.locales);
  2123. if (localeKeys.length) {
  2124. localeKeys.forEach(function (locale) {
  2125. var curMessages = messages[locale];
  2126. var userMessages = __uniConfig.locales[locale];
  2127. if (curMessages) {
  2128. Object.assign(curMessages, userMessages);
  2129. } else {
  2130. messages[locale] = userMessages;
  2131. }
  2132. });
  2133. }
  2134. }
  2135. initI18nMessages();
  2136. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  2137. var t = i18n.t;
  2138. var i18nMixin = i18n.mixin = {
  2139. beforeCreate: function beforeCreate() {
  2140. var _this = this;
  2141. var unwatch = i18n.i18n.watchLocale(function () {
  2142. _this.$forceUpdate();
  2143. });
  2144. this.$once('hook:beforeDestroy', function () {
  2145. unwatch();
  2146. });
  2147. },
  2148. methods: {
  2149. $$t: function $$t(key, values) {
  2150. return t(key, values);
  2151. }
  2152. }
  2153. };
  2154. var setLocale = i18n.setLocale;
  2155. var getLocale = i18n.getLocale;
  2156. function initAppLocale(Vue, appVm, locale) {
  2157. var state = Vue.observable({
  2158. locale: locale || i18n.getLocale()
  2159. });
  2160. var localeWatchers = [];
  2161. appVm.$watchLocale = function (fn) {
  2162. localeWatchers.push(fn);
  2163. };
  2164. Object.defineProperty(appVm, '$locale', {
  2165. get: function get() {
  2166. return state.locale;
  2167. },
  2168. set: function set(v) {
  2169. state.locale = v;
  2170. localeWatchers.forEach(function (watch) {
  2171. return watch(v);
  2172. });
  2173. }
  2174. });
  2175. }
  2176. function isEnableLocale() {
  2177. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  2178. }
  2179. function include(str, parts) {
  2180. return !!parts.find(function (part) {
  2181. return str.indexOf(part) !== -1;
  2182. });
  2183. }
  2184. function startsWith(str, parts) {
  2185. return parts.find(function (part) {
  2186. return str.indexOf(part) === 0;
  2187. });
  2188. }
  2189. function normalizeLocale(locale, messages) {
  2190. if (!locale) {
  2191. return;
  2192. }
  2193. locale = locale.trim().replace(/_/g, '-');
  2194. if (messages && messages[locale]) {
  2195. return locale;
  2196. }
  2197. locale = locale.toLowerCase();
  2198. if (locale === 'chinese') {
  2199. // 支付宝
  2200. return LOCALE_ZH_HANS;
  2201. }
  2202. if (locale.indexOf('zh') === 0) {
  2203. if (locale.indexOf('-hans') > -1) {
  2204. return LOCALE_ZH_HANS;
  2205. }
  2206. if (locale.indexOf('-hant') > -1) {
  2207. return LOCALE_ZH_HANT;
  2208. }
  2209. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2210. return LOCALE_ZH_HANT;
  2211. }
  2212. return LOCALE_ZH_HANS;
  2213. }
  2214. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  2215. if (lang) {
  2216. return lang;
  2217. }
  2218. }
  2219. // export function initI18n() {
  2220. // const localeKeys = Object.keys(__uniConfig.locales || {})
  2221. // if (localeKeys.length) {
  2222. // localeKeys.forEach((locale) =>
  2223. // i18n.add(locale, __uniConfig.locales[locale])
  2224. // )
  2225. // }
  2226. // }
  2227. function getLocale$1() {
  2228. // 优先使用 $locale
  2229. if (isFn(getApp)) {
  2230. var app = getApp({
  2231. allowDefault: true
  2232. });
  2233. if (app && app.$vm) {
  2234. return app.$vm.$locale;
  2235. }
  2236. }
  2237. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  2238. }
  2239. function setLocale$1(locale) {
  2240. var app = isFn(getApp) ? getApp() : false;
  2241. if (!app) {
  2242. return false;
  2243. }
  2244. var oldLocale = app.$vm.$locale;
  2245. if (oldLocale !== locale) {
  2246. app.$vm.$locale = locale;
  2247. onLocaleChangeCallbacks.forEach(function (fn) {
  2248. return fn({
  2249. locale: locale
  2250. });
  2251. });
  2252. return true;
  2253. }
  2254. return false;
  2255. }
  2256. var onLocaleChangeCallbacks = [];
  2257. function onLocaleChange(fn) {
  2258. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  2259. onLocaleChangeCallbacks.push(fn);
  2260. }
  2261. }
  2262. if (typeof global !== 'undefined') {
  2263. global.getLocale = getLocale$1;
  2264. }
  2265. var interceptors = {
  2266. promiseInterceptor: promiseInterceptor
  2267. };
  2268. var baseApi = /*#__PURE__*/Object.freeze({
  2269. __proto__: null,
  2270. upx2px: upx2px,
  2271. getLocale: getLocale$1,
  2272. setLocale: setLocale$1,
  2273. onLocaleChange: onLocaleChange,
  2274. addInterceptor: addInterceptor,
  2275. removeInterceptor: removeInterceptor,
  2276. interceptors: interceptors
  2277. });
  2278. function findExistsPageIndex(url) {
  2279. var pages = getCurrentPages();
  2280. var len = pages.length;
  2281. while (len--) {
  2282. var page = pages[len];
  2283. if (page.$page && page.$page.fullPath === url) {
  2284. return len;
  2285. }
  2286. }
  2287. return -1;
  2288. }
  2289. var redirectTo = {
  2290. name: function name(fromArgs) {
  2291. if (fromArgs.exists === 'back' && fromArgs.delta) {
  2292. return 'navigateBack';
  2293. }
  2294. return 'redirectTo';
  2295. },
  2296. args: function args(fromArgs) {
  2297. if (fromArgs.exists === 'back' && fromArgs.url) {
  2298. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  2299. if (existsPageIndex !== -1) {
  2300. var delta = getCurrentPages().length - 1 - existsPageIndex;
  2301. if (delta > 0) {
  2302. fromArgs.delta = delta;
  2303. }
  2304. }
  2305. }
  2306. }
  2307. };
  2308. var previewImage = {
  2309. args: function args(fromArgs) {
  2310. var currentIndex = parseInt(fromArgs.current);
  2311. if (isNaN(currentIndex)) {
  2312. return;
  2313. }
  2314. var urls = fromArgs.urls;
  2315. if (!Array.isArray(urls)) {
  2316. return;
  2317. }
  2318. var len = urls.length;
  2319. if (!len) {
  2320. return;
  2321. }
  2322. if (currentIndex < 0) {
  2323. currentIndex = 0;
  2324. } else if (currentIndex >= len) {
  2325. currentIndex = len - 1;
  2326. }
  2327. if (currentIndex > 0) {
  2328. fromArgs.current = urls[currentIndex];
  2329. fromArgs.urls = urls.filter(function (item, index) {
  2330. return index < currentIndex ? item !== urls[currentIndex] : true;
  2331. });
  2332. } else {
  2333. fromArgs.current = urls[0];
  2334. }
  2335. return {
  2336. indicator: false,
  2337. loop: false
  2338. };
  2339. }
  2340. };
  2341. var UUID_KEY = '__DC_STAT_UUID';
  2342. var deviceId;
  2343. function useDeviceId(result) {
  2344. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  2345. if (!deviceId) {
  2346. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  2347. wx.setStorage({
  2348. key: UUID_KEY,
  2349. data: deviceId
  2350. });
  2351. }
  2352. result.deviceId = deviceId;
  2353. }
  2354. function addSafeAreaInsets(result) {
  2355. if (result.safeArea) {
  2356. var safeArea = result.safeArea;
  2357. result.safeAreaInsets = {
  2358. top: safeArea.top,
  2359. left: safeArea.left,
  2360. right: result.windowWidth - safeArea.right,
  2361. bottom: result.screenHeight - safeArea.bottom
  2362. };
  2363. }
  2364. }
  2365. function populateParameters(result) {
  2366. var _result$brand = result.brand,
  2367. brand = _result$brand === void 0 ? '' : _result$brand,
  2368. _result$model = result.model,
  2369. model = _result$model === void 0 ? '' : _result$model,
  2370. _result$system = result.system,
  2371. system = _result$system === void 0 ? '' : _result$system,
  2372. _result$language = result.language,
  2373. language = _result$language === void 0 ? '' : _result$language,
  2374. theme = result.theme,
  2375. version = result.version,
  2376. platform = result.platform,
  2377. fontSizeSetting = result.fontSizeSetting,
  2378. SDKVersion = result.SDKVersion,
  2379. pixelRatio = result.pixelRatio,
  2380. deviceOrientation = result.deviceOrientation;
  2381. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  2382. var extraParam = {};
  2383. // osName osVersion
  2384. var osName = '';
  2385. var osVersion = '';
  2386. {
  2387. osName = system.split(' ')[0] || '';
  2388. osVersion = system.split(' ')[1] || '';
  2389. }
  2390. var hostVersion = version;
  2391. // deviceType
  2392. var deviceType = getGetDeviceType(result, model);
  2393. // deviceModel
  2394. var deviceBrand = getDeviceBrand(brand);
  2395. // hostName
  2396. var _hostName = getHostName(result);
  2397. // deviceOrientation
  2398. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  2399. // devicePixelRatio
  2400. var _devicePixelRatio = pixelRatio;
  2401. // SDKVersion
  2402. var _SDKVersion = SDKVersion;
  2403. // hostLanguage
  2404. var hostLanguage = language.replace(/_/g, '-');
  2405. // wx.getAccountInfoSync
  2406. var parameters = {
  2407. appId: "__UNI__73F6024",
  2408. appName: "六院联创",
  2409. appVersion: "1.0.0",
  2410. appVersionCode: "100",
  2411. appLanguage: getAppLanguage(hostLanguage),
  2412. uniCompileVersion: "3.96",
  2413. uniRuntimeVersion: "3.96",
  2414. uniPlatform: undefined || "mp-weixin",
  2415. deviceBrand: deviceBrand,
  2416. deviceModel: model,
  2417. deviceType: deviceType,
  2418. devicePixelRatio: _devicePixelRatio,
  2419. deviceOrientation: _deviceOrientation,
  2420. osName: osName.toLocaleLowerCase(),
  2421. osVersion: osVersion,
  2422. hostTheme: theme,
  2423. hostVersion: hostVersion,
  2424. hostLanguage: hostLanguage,
  2425. hostName: _hostName,
  2426. hostSDKVersion: _SDKVersion,
  2427. hostFontSizeSetting: fontSizeSetting,
  2428. windowTop: 0,
  2429. windowBottom: 0,
  2430. // TODO
  2431. osLanguage: undefined,
  2432. osTheme: undefined,
  2433. ua: undefined,
  2434. hostPackageName: undefined,
  2435. browserName: undefined,
  2436. browserVersion: undefined
  2437. };
  2438. Object.assign(result, parameters, extraParam);
  2439. }
  2440. function getGetDeviceType(result, model) {
  2441. var deviceType = result.deviceType || 'phone';
  2442. {
  2443. var deviceTypeMaps = {
  2444. ipad: 'pad',
  2445. windows: 'pc',
  2446. mac: 'pc'
  2447. };
  2448. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  2449. var _model = model.toLocaleLowerCase();
  2450. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  2451. var _m = deviceTypeMapsKeys[index];
  2452. if (_model.indexOf(_m) !== -1) {
  2453. deviceType = deviceTypeMaps[_m];
  2454. break;
  2455. }
  2456. }
  2457. }
  2458. return deviceType;
  2459. }
  2460. function getDeviceBrand(brand) {
  2461. var deviceBrand = brand;
  2462. if (deviceBrand) {
  2463. deviceBrand = brand.toLocaleLowerCase();
  2464. }
  2465. return deviceBrand;
  2466. }
  2467. function getAppLanguage(defaultLanguage) {
  2468. return getLocale$1 ? getLocale$1() : defaultLanguage;
  2469. }
  2470. function getHostName(result) {
  2471. var _platform = 'WeChat';
  2472. var _hostName = result.hostName || _platform; // mp-jd
  2473. {
  2474. if (result.environment) {
  2475. _hostName = result.environment;
  2476. } else if (result.host && result.host.env) {
  2477. _hostName = result.host.env;
  2478. }
  2479. }
  2480. return _hostName;
  2481. }
  2482. var getSystemInfo = {
  2483. returnValue: function returnValue(result) {
  2484. useDeviceId(result);
  2485. addSafeAreaInsets(result);
  2486. populateParameters(result);
  2487. }
  2488. };
  2489. var showActionSheet = {
  2490. args: function args(fromArgs) {
  2491. if ((0, _typeof2.default)(fromArgs) === 'object') {
  2492. fromArgs.alertText = fromArgs.title;
  2493. }
  2494. }
  2495. };
  2496. var getAppBaseInfo = {
  2497. returnValue: function returnValue(result) {
  2498. var _result = result,
  2499. version = _result.version,
  2500. language = _result.language,
  2501. SDKVersion = _result.SDKVersion,
  2502. theme = _result.theme;
  2503. var _hostName = getHostName(result);
  2504. var hostLanguage = language.replace('_', '-');
  2505. result = sortObject(Object.assign(result, {
  2506. appId: "__UNI__73F6024",
  2507. appName: "六院联创",
  2508. appVersion: "1.0.0",
  2509. appVersionCode: "100",
  2510. appLanguage: getAppLanguage(hostLanguage),
  2511. hostVersion: version,
  2512. hostLanguage: hostLanguage,
  2513. hostName: _hostName,
  2514. hostSDKVersion: SDKVersion,
  2515. hostTheme: theme
  2516. }));
  2517. }
  2518. };
  2519. var getDeviceInfo = {
  2520. returnValue: function returnValue(result) {
  2521. var _result2 = result,
  2522. brand = _result2.brand,
  2523. model = _result2.model;
  2524. var deviceType = getGetDeviceType(result, model);
  2525. var deviceBrand = getDeviceBrand(brand);
  2526. useDeviceId(result);
  2527. result = sortObject(Object.assign(result, {
  2528. deviceType: deviceType,
  2529. deviceBrand: deviceBrand,
  2530. deviceModel: model
  2531. }));
  2532. }
  2533. };
  2534. var getWindowInfo = {
  2535. returnValue: function returnValue(result) {
  2536. addSafeAreaInsets(result);
  2537. result = sortObject(Object.assign(result, {
  2538. windowTop: 0,
  2539. windowBottom: 0
  2540. }));
  2541. }
  2542. };
  2543. var getAppAuthorizeSetting = {
  2544. returnValue: function returnValue(result) {
  2545. var locationReducedAccuracy = result.locationReducedAccuracy;
  2546. result.locationAccuracy = 'unsupported';
  2547. if (locationReducedAccuracy === true) {
  2548. result.locationAccuracy = 'reduced';
  2549. } else if (locationReducedAccuracy === false) {
  2550. result.locationAccuracy = 'full';
  2551. }
  2552. }
  2553. };
  2554. // import navigateTo from 'uni-helpers/navigate-to'
  2555. var compressImage = {
  2556. args: function args(fromArgs) {
  2557. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  2558. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  2559. fromArgs.compressHeight = fromArgs.compressedHeight;
  2560. }
  2561. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  2562. fromArgs.compressWidth = fromArgs.compressedWidth;
  2563. }
  2564. }
  2565. };
  2566. var protocols = {
  2567. redirectTo: redirectTo,
  2568. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  2569. previewImage: previewImage,
  2570. getSystemInfo: getSystemInfo,
  2571. getSystemInfoSync: getSystemInfo,
  2572. showActionSheet: showActionSheet,
  2573. getAppBaseInfo: getAppBaseInfo,
  2574. getDeviceInfo: getDeviceInfo,
  2575. getWindowInfo: getWindowInfo,
  2576. getAppAuthorizeSetting: getAppAuthorizeSetting,
  2577. compressImage: compressImage
  2578. };
  2579. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  2580. var canIUses = [];
  2581. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  2582. function processCallback(methodName, method, returnValue) {
  2583. return function (res) {
  2584. return method(processReturnValue(methodName, res, returnValue));
  2585. };
  2586. }
  2587. function processArgs(methodName, fromArgs) {
  2588. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  2589. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  2590. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  2591. if (isPlainObject(fromArgs)) {
  2592. // 一般 api 的参数解析
  2593. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  2594. if (isFn(argsOption)) {
  2595. argsOption = argsOption(fromArgs, toArgs) || {};
  2596. }
  2597. for (var key in fromArgs) {
  2598. if (hasOwn(argsOption, key)) {
  2599. var keyOption = argsOption[key];
  2600. if (isFn(keyOption)) {
  2601. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  2602. }
  2603. if (!keyOption) {
  2604. // 不支持的参数
  2605. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  2606. } else if (isStr(keyOption)) {
  2607. // 重写参数 key
  2608. toArgs[keyOption] = fromArgs[key];
  2609. } else if (isPlainObject(keyOption)) {
  2610. // {name:newName,value:value}可重新指定参数 key:value
  2611. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  2612. }
  2613. } else if (CALLBACKS.indexOf(key) !== -1) {
  2614. if (isFn(fromArgs[key])) {
  2615. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  2616. }
  2617. } else {
  2618. if (!keepFromArgs) {
  2619. toArgs[key] = fromArgs[key];
  2620. }
  2621. }
  2622. }
  2623. return toArgs;
  2624. } else if (isFn(fromArgs)) {
  2625. fromArgs = processCallback(methodName, fromArgs, returnValue);
  2626. }
  2627. return fromArgs;
  2628. }
  2629. function processReturnValue(methodName, res, returnValue) {
  2630. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  2631. if (isFn(protocols.returnValue)) {
  2632. // 处理通用 returnValue
  2633. res = protocols.returnValue(methodName, res);
  2634. }
  2635. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  2636. }
  2637. function wrapper(methodName, method) {
  2638. if (hasOwn(protocols, methodName)) {
  2639. var protocol = protocols[methodName];
  2640. if (!protocol) {
  2641. // 暂不支持的 api
  2642. return function () {
  2643. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  2644. };
  2645. }
  2646. return function (arg1, arg2) {
  2647. // 目前 api 最多两个参数
  2648. var options = protocol;
  2649. if (isFn(protocol)) {
  2650. options = protocol(arg1);
  2651. }
  2652. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  2653. var args = [arg1];
  2654. if (typeof arg2 !== 'undefined') {
  2655. args.push(arg2);
  2656. }
  2657. if (isFn(options.name)) {
  2658. methodName = options.name(arg1);
  2659. } else if (isStr(options.name)) {
  2660. methodName = options.name;
  2661. }
  2662. var returnValue = wx[methodName].apply(wx, args);
  2663. if (isSyncApi(methodName)) {
  2664. // 同步 api
  2665. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  2666. }
  2667. return returnValue;
  2668. };
  2669. }
  2670. return method;
  2671. }
  2672. var todoApis = Object.create(null);
  2673. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  2674. function createTodoApi(name) {
  2675. return function todoApi(_ref) {
  2676. var fail = _ref.fail,
  2677. complete = _ref.complete;
  2678. var res = {
  2679. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  2680. };
  2681. isFn(fail) && fail(res);
  2682. isFn(complete) && complete(res);
  2683. };
  2684. }
  2685. TODOS.forEach(function (name) {
  2686. todoApis[name] = createTodoApi(name);
  2687. });
  2688. var providers = {
  2689. oauth: ['weixin'],
  2690. share: ['weixin'],
  2691. payment: ['wxpay'],
  2692. push: ['weixin']
  2693. };
  2694. function getProvider(_ref2) {
  2695. var service = _ref2.service,
  2696. success = _ref2.success,
  2697. fail = _ref2.fail,
  2698. complete = _ref2.complete;
  2699. var res = false;
  2700. if (providers[service]) {
  2701. res = {
  2702. errMsg: 'getProvider:ok',
  2703. service: service,
  2704. provider: providers[service]
  2705. };
  2706. isFn(success) && success(res);
  2707. } else {
  2708. res = {
  2709. errMsg: 'getProvider:fail service not found'
  2710. };
  2711. isFn(fail) && fail(res);
  2712. }
  2713. isFn(complete) && complete(res);
  2714. }
  2715. var extraApi = /*#__PURE__*/Object.freeze({
  2716. __proto__: null,
  2717. getProvider: getProvider
  2718. });
  2719. var getEmitter = function () {
  2720. var Emitter;
  2721. return function getUniEmitter() {
  2722. if (!Emitter) {
  2723. Emitter = new _vue.default();
  2724. }
  2725. return Emitter;
  2726. };
  2727. }();
  2728. function apply(ctx, method, args) {
  2729. return ctx[method].apply(ctx, args);
  2730. }
  2731. function $on() {
  2732. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  2733. }
  2734. function $off() {
  2735. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  2736. }
  2737. function $once() {
  2738. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  2739. }
  2740. function $emit() {
  2741. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  2742. }
  2743. var eventApi = /*#__PURE__*/Object.freeze({
  2744. __proto__: null,
  2745. $on: $on,
  2746. $off: $off,
  2747. $once: $once,
  2748. $emit: $emit
  2749. });
  2750. /**
  2751. * 框架内 try-catch
  2752. */
  2753. /**
  2754. * 开发者 try-catch
  2755. */
  2756. function tryCatch(fn) {
  2757. return function () {
  2758. try {
  2759. return fn.apply(fn, arguments);
  2760. } catch (e) {
  2761. // TODO
  2762. console.error(e);
  2763. }
  2764. };
  2765. }
  2766. function getApiCallbacks(params) {
  2767. var apiCallbacks = {};
  2768. for (var name in params) {
  2769. var param = params[name];
  2770. if (isFn(param)) {
  2771. apiCallbacks[name] = tryCatch(param);
  2772. delete params[name];
  2773. }
  2774. }
  2775. return apiCallbacks;
  2776. }
  2777. var cid;
  2778. var cidErrMsg;
  2779. var enabled;
  2780. function normalizePushMessage(message) {
  2781. try {
  2782. return JSON.parse(message);
  2783. } catch (e) {}
  2784. return message;
  2785. }
  2786. function invokePushCallback(args) {
  2787. if (args.type === 'enabled') {
  2788. enabled = true;
  2789. } else if (args.type === 'clientId') {
  2790. cid = args.cid;
  2791. cidErrMsg = args.errMsg;
  2792. invokeGetPushCidCallbacks(cid, args.errMsg);
  2793. } else if (args.type === 'pushMsg') {
  2794. var message = {
  2795. type: 'receive',
  2796. data: normalizePushMessage(args.message)
  2797. };
  2798. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  2799. var callback = onPushMessageCallbacks[i];
  2800. callback(message);
  2801. // 该消息已被阻止
  2802. if (message.stopped) {
  2803. break;
  2804. }
  2805. }
  2806. } else if (args.type === 'click') {
  2807. onPushMessageCallbacks.forEach(function (callback) {
  2808. callback({
  2809. type: 'click',
  2810. data: normalizePushMessage(args.message)
  2811. });
  2812. });
  2813. }
  2814. }
  2815. var getPushCidCallbacks = [];
  2816. function invokeGetPushCidCallbacks(cid, errMsg) {
  2817. getPushCidCallbacks.forEach(function (callback) {
  2818. callback(cid, errMsg);
  2819. });
  2820. getPushCidCallbacks.length = 0;
  2821. }
  2822. function getPushClientId(args) {
  2823. if (!isPlainObject(args)) {
  2824. args = {};
  2825. }
  2826. var _getApiCallbacks = getApiCallbacks(args),
  2827. success = _getApiCallbacks.success,
  2828. fail = _getApiCallbacks.fail,
  2829. complete = _getApiCallbacks.complete;
  2830. var hasSuccess = isFn(success);
  2831. var hasFail = isFn(fail);
  2832. var hasComplete = isFn(complete);
  2833. Promise.resolve().then(function () {
  2834. if (typeof enabled === 'undefined') {
  2835. enabled = false;
  2836. cid = '';
  2837. cidErrMsg = 'uniPush is not enabled';
  2838. }
  2839. getPushCidCallbacks.push(function (cid, errMsg) {
  2840. var res;
  2841. if (cid) {
  2842. res = {
  2843. errMsg: 'getPushClientId:ok',
  2844. cid: cid
  2845. };
  2846. hasSuccess && success(res);
  2847. } else {
  2848. res = {
  2849. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  2850. };
  2851. hasFail && fail(res);
  2852. }
  2853. hasComplete && complete(res);
  2854. });
  2855. if (typeof cid !== 'undefined') {
  2856. invokeGetPushCidCallbacks(cid, cidErrMsg);
  2857. }
  2858. });
  2859. }
  2860. var onPushMessageCallbacks = [];
  2861. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  2862. var onPushMessage = function onPushMessage(fn) {
  2863. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  2864. onPushMessageCallbacks.push(fn);
  2865. }
  2866. };
  2867. var offPushMessage = function offPushMessage(fn) {
  2868. if (!fn) {
  2869. onPushMessageCallbacks.length = 0;
  2870. } else {
  2871. var index = onPushMessageCallbacks.indexOf(fn);
  2872. if (index > -1) {
  2873. onPushMessageCallbacks.splice(index, 1);
  2874. }
  2875. }
  2876. };
  2877. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  2878. if (!baseInfo) {
  2879. baseInfo = wx.getSystemInfoSync();
  2880. }
  2881. var host = baseInfo ? baseInfo.host : null;
  2882. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  2883. var api = /*#__PURE__*/Object.freeze({
  2884. __proto__: null,
  2885. shareVideoMessage: shareVideoMessage,
  2886. getPushClientId: getPushClientId,
  2887. onPushMessage: onPushMessage,
  2888. offPushMessage: offPushMessage,
  2889. invokePushCallback: invokePushCallback
  2890. });
  2891. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  2892. function findVmByVueId(vm, vuePid) {
  2893. var $children = vm.$children;
  2894. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  2895. for (var i = $children.length - 1; i >= 0; i--) {
  2896. var childVm = $children[i];
  2897. if (childVm.$scope._$vueId === vuePid) {
  2898. return childVm;
  2899. }
  2900. }
  2901. // 反向递归查找
  2902. var parentVm;
  2903. for (var _i = $children.length - 1; _i >= 0; _i--) {
  2904. parentVm = findVmByVueId($children[_i], vuePid);
  2905. if (parentVm) {
  2906. return parentVm;
  2907. }
  2908. }
  2909. }
  2910. function initBehavior(options) {
  2911. return Behavior(options);
  2912. }
  2913. function isPage() {
  2914. return !!this.route;
  2915. }
  2916. function initRelation(detail) {
  2917. this.triggerEvent('__l', detail);
  2918. }
  2919. function selectAllComponents(mpInstance, selector, $refs) {
  2920. var components = mpInstance.selectAllComponents(selector) || [];
  2921. components.forEach(function (component) {
  2922. var ref = component.dataset.ref;
  2923. $refs[ref] = component.$vm || toSkip(component);
  2924. {
  2925. if (component.dataset.vueGeneric === 'scoped') {
  2926. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  2927. selectAllComponents(scopedComponent, selector, $refs);
  2928. });
  2929. }
  2930. }
  2931. });
  2932. }
  2933. function syncRefs(refs, newRefs) {
  2934. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  2935. var newKeys = Object.keys(newRefs);
  2936. newKeys.forEach(function (key) {
  2937. var oldValue = refs[key];
  2938. var newValue = newRefs[key];
  2939. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  2940. return oldValue.includes(value);
  2941. })) {
  2942. return;
  2943. }
  2944. refs[key] = newValue;
  2945. oldKeys.delete(key);
  2946. });
  2947. oldKeys.forEach(function (key) {
  2948. delete refs[key];
  2949. });
  2950. return refs;
  2951. }
  2952. function initRefs(vm) {
  2953. var mpInstance = vm.$scope;
  2954. var refs = {};
  2955. Object.defineProperty(vm, '$refs', {
  2956. get: function get() {
  2957. var $refs = {};
  2958. selectAllComponents(mpInstance, '.vue-ref', $refs);
  2959. // TODO 暂不考虑 for 中的 scoped
  2960. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  2961. forComponents.forEach(function (component) {
  2962. var ref = component.dataset.ref;
  2963. if (!$refs[ref]) {
  2964. $refs[ref] = [];
  2965. }
  2966. $refs[ref].push(component.$vm || toSkip(component));
  2967. });
  2968. return syncRefs(refs, $refs);
  2969. }
  2970. });
  2971. }
  2972. function handleLink(event) {
  2973. var _ref3 = event.detail || event.value,
  2974. vuePid = _ref3.vuePid,
  2975. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  2976. var parentVm;
  2977. if (vuePid) {
  2978. parentVm = findVmByVueId(this.$vm, vuePid);
  2979. }
  2980. if (!parentVm) {
  2981. parentVm = this.$vm;
  2982. }
  2983. vueOptions.parent = parentVm;
  2984. }
  2985. function markMPComponent(component) {
  2986. // 在 Vue 中标记为小程序组件
  2987. var IS_MP = '__v_isMPComponent';
  2988. Object.defineProperty(component, IS_MP, {
  2989. configurable: true,
  2990. enumerable: false,
  2991. value: true
  2992. });
  2993. return component;
  2994. }
  2995. function toSkip(obj) {
  2996. var OB = '__ob__';
  2997. var SKIP = '__v_skip';
  2998. if (isObject(obj) && Object.isExtensible(obj)) {
  2999. // 避免被 @vue/composition-api 观测
  3000. Object.defineProperty(obj, OB, {
  3001. configurable: true,
  3002. enumerable: false,
  3003. value: (0, _defineProperty2.default)({}, SKIP, true)
  3004. });
  3005. }
  3006. return obj;
  3007. }
  3008. var WORKLET_RE = /_(.*)_worklet_factory_/;
  3009. function initWorkletMethods(mpMethods, vueMethods) {
  3010. if (vueMethods) {
  3011. Object.keys(vueMethods).forEach(function (name) {
  3012. var matches = name.match(WORKLET_RE);
  3013. if (matches) {
  3014. var workletName = matches[1];
  3015. mpMethods[name] = vueMethods[name];
  3016. mpMethods[workletName] = vueMethods[workletName];
  3017. }
  3018. });
  3019. }
  3020. }
  3021. var MPPage = Page;
  3022. var MPComponent = Component;
  3023. var customizeRE = /:/g;
  3024. var customize = cached(function (str) {
  3025. return camelize(str.replace(customizeRE, '-'));
  3026. });
  3027. function initTriggerEvent(mpInstance) {
  3028. var oldTriggerEvent = mpInstance.triggerEvent;
  3029. var newTriggerEvent = function newTriggerEvent(event) {
  3030. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  3031. args[_key3 - 1] = arguments[_key3];
  3032. }
  3033. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  3034. if (this.$vm || this.dataset && this.dataset.comType) {
  3035. event = customize(event);
  3036. } else {
  3037. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  3038. var newEvent = customize(event);
  3039. if (newEvent !== event) {
  3040. oldTriggerEvent.apply(this, [newEvent].concat(args));
  3041. }
  3042. }
  3043. return oldTriggerEvent.apply(this, [event].concat(args));
  3044. };
  3045. try {
  3046. // 京东小程序 triggerEvent 为只读
  3047. mpInstance.triggerEvent = newTriggerEvent;
  3048. } catch (error) {
  3049. mpInstance._triggerEvent = newTriggerEvent;
  3050. }
  3051. }
  3052. function initHook(name, options, isComponent) {
  3053. var oldHook = options[name];
  3054. options[name] = function () {
  3055. markMPComponent(this);
  3056. initTriggerEvent(this);
  3057. if (oldHook) {
  3058. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  3059. args[_key4] = arguments[_key4];
  3060. }
  3061. return oldHook.apply(this, args);
  3062. }
  3063. };
  3064. }
  3065. if (!MPPage.__$wrappered) {
  3066. MPPage.__$wrappered = true;
  3067. Page = function Page() {
  3068. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  3069. initHook('onLoad', options);
  3070. return MPPage(options);
  3071. };
  3072. Page.after = MPPage.after;
  3073. Component = function Component() {
  3074. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  3075. initHook('created', options);
  3076. return MPComponent(options);
  3077. };
  3078. }
  3079. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  3080. function initMocks(vm, mocks) {
  3081. var mpInstance = vm.$mp[vm.mpType];
  3082. mocks.forEach(function (mock) {
  3083. if (hasOwn(mpInstance, mock)) {
  3084. vm[mock] = mpInstance[mock];
  3085. }
  3086. });
  3087. }
  3088. function hasHook(hook, vueOptions) {
  3089. if (!vueOptions) {
  3090. return true;
  3091. }
  3092. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  3093. return true;
  3094. }
  3095. vueOptions = vueOptions.default || vueOptions;
  3096. if (isFn(vueOptions)) {
  3097. if (isFn(vueOptions.extendOptions[hook])) {
  3098. return true;
  3099. }
  3100. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  3101. return true;
  3102. }
  3103. return false;
  3104. }
  3105. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  3106. return true;
  3107. }
  3108. var mixins = vueOptions.mixins;
  3109. if (Array.isArray(mixins)) {
  3110. return !!mixins.find(function (mixin) {
  3111. return hasHook(hook, mixin);
  3112. });
  3113. }
  3114. }
  3115. function initHooks(mpOptions, hooks, vueOptions) {
  3116. hooks.forEach(function (hook) {
  3117. if (hasHook(hook, vueOptions)) {
  3118. mpOptions[hook] = function (args) {
  3119. return this.$vm && this.$vm.__call_hook(hook, args);
  3120. };
  3121. }
  3122. });
  3123. }
  3124. function initUnknownHooks(mpOptions, vueOptions) {
  3125. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  3126. findHooks(vueOptions).forEach(function (hook) {
  3127. return initHook$1(mpOptions, hook, excludes);
  3128. });
  3129. }
  3130. function findHooks(vueOptions) {
  3131. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  3132. if (vueOptions) {
  3133. Object.keys(vueOptions).forEach(function (name) {
  3134. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  3135. hooks.push(name);
  3136. }
  3137. });
  3138. }
  3139. return hooks;
  3140. }
  3141. function initHook$1(mpOptions, hook, excludes) {
  3142. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  3143. mpOptions[hook] = function (args) {
  3144. return this.$vm && this.$vm.__call_hook(hook, args);
  3145. };
  3146. }
  3147. }
  3148. function initVueComponent(Vue, vueOptions) {
  3149. vueOptions = vueOptions.default || vueOptions;
  3150. var VueComponent;
  3151. if (isFn(vueOptions)) {
  3152. VueComponent = vueOptions;
  3153. } else {
  3154. VueComponent = Vue.extend(vueOptions);
  3155. }
  3156. vueOptions = VueComponent.options;
  3157. return [VueComponent, vueOptions];
  3158. }
  3159. function initSlots(vm, vueSlots) {
  3160. if (Array.isArray(vueSlots) && vueSlots.length) {
  3161. var $slots = Object.create(null);
  3162. vueSlots.forEach(function (slotName) {
  3163. $slots[slotName] = true;
  3164. });
  3165. vm.$scopedSlots = vm.$slots = $slots;
  3166. }
  3167. }
  3168. function initVueIds(vueIds, mpInstance) {
  3169. vueIds = (vueIds || '').split(',');
  3170. var len = vueIds.length;
  3171. if (len === 1) {
  3172. mpInstance._$vueId = vueIds[0];
  3173. } else if (len === 2) {
  3174. mpInstance._$vueId = vueIds[0];
  3175. mpInstance._$vuePid = vueIds[1];
  3176. }
  3177. }
  3178. function initData(vueOptions, context) {
  3179. var data = vueOptions.data || {};
  3180. var methods = vueOptions.methods || {};
  3181. if (typeof data === 'function') {
  3182. try {
  3183. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  3184. } catch (e) {
  3185. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"六院联创","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  3186. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  3187. }
  3188. }
  3189. } else {
  3190. try {
  3191. // 对 data 格式化
  3192. data = JSON.parse(JSON.stringify(data));
  3193. } catch (e) {}
  3194. }
  3195. if (!isPlainObject(data)) {
  3196. data = {};
  3197. }
  3198. Object.keys(methods).forEach(function (methodName) {
  3199. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  3200. data[methodName] = methods[methodName];
  3201. }
  3202. });
  3203. return data;
  3204. }
  3205. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  3206. function createObserver(name) {
  3207. return function observer(newVal, oldVal) {
  3208. if (this.$vm) {
  3209. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  3210. }
  3211. };
  3212. }
  3213. function initBehaviors(vueOptions, initBehavior) {
  3214. var vueBehaviors = vueOptions.behaviors;
  3215. var vueExtends = vueOptions.extends;
  3216. var vueMixins = vueOptions.mixins;
  3217. var vueProps = vueOptions.props;
  3218. if (!vueProps) {
  3219. vueOptions.props = vueProps = [];
  3220. }
  3221. var behaviors = [];
  3222. if (Array.isArray(vueBehaviors)) {
  3223. vueBehaviors.forEach(function (behavior) {
  3224. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  3225. if (behavior === 'uni://form-field') {
  3226. if (Array.isArray(vueProps)) {
  3227. vueProps.push('name');
  3228. vueProps.push('value');
  3229. } else {
  3230. vueProps.name = {
  3231. type: String,
  3232. default: ''
  3233. };
  3234. vueProps.value = {
  3235. type: [String, Number, Boolean, Array, Object, Date],
  3236. default: ''
  3237. };
  3238. }
  3239. }
  3240. });
  3241. }
  3242. if (isPlainObject(vueExtends) && vueExtends.props) {
  3243. behaviors.push(initBehavior({
  3244. properties: initProperties(vueExtends.props, true)
  3245. }));
  3246. }
  3247. if (Array.isArray(vueMixins)) {
  3248. vueMixins.forEach(function (vueMixin) {
  3249. if (isPlainObject(vueMixin) && vueMixin.props) {
  3250. behaviors.push(initBehavior({
  3251. properties: initProperties(vueMixin.props, true)
  3252. }));
  3253. }
  3254. });
  3255. }
  3256. return behaviors;
  3257. }
  3258. function parsePropType(key, type, defaultValue, file) {
  3259. // [String]=>String
  3260. if (Array.isArray(type) && type.length === 1) {
  3261. return type[0];
  3262. }
  3263. return type;
  3264. }
  3265. function initProperties(props) {
  3266. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  3267. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  3268. var options = arguments.length > 3 ? arguments[3] : undefined;
  3269. var properties = {};
  3270. if (!isBehavior) {
  3271. properties.vueId = {
  3272. type: String,
  3273. value: ''
  3274. };
  3275. {
  3276. if (options.virtualHost) {
  3277. properties.virtualHostStyle = {
  3278. type: null,
  3279. value: ''
  3280. };
  3281. properties.virtualHostClass = {
  3282. type: null,
  3283. value: ''
  3284. };
  3285. }
  3286. }
  3287. // scopedSlotsCompiler auto
  3288. properties.scopedSlotsCompiler = {
  3289. type: String,
  3290. value: ''
  3291. };
  3292. properties.vueSlots = {
  3293. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  3294. type: null,
  3295. value: [],
  3296. observer: function observer(newVal, oldVal) {
  3297. var $slots = Object.create(null);
  3298. newVal.forEach(function (slotName) {
  3299. $slots[slotName] = true;
  3300. });
  3301. this.setData({
  3302. $slots: $slots
  3303. });
  3304. }
  3305. };
  3306. }
  3307. if (Array.isArray(props)) {
  3308. // ['title']
  3309. props.forEach(function (key) {
  3310. properties[key] = {
  3311. type: null,
  3312. observer: createObserver(key)
  3313. };
  3314. });
  3315. } else if (isPlainObject(props)) {
  3316. // {title:{type:String,default:''},content:String}
  3317. Object.keys(props).forEach(function (key) {
  3318. var opts = props[key];
  3319. if (isPlainObject(opts)) {
  3320. // title:{type:String,default:''}
  3321. var value = opts.default;
  3322. if (isFn(value)) {
  3323. value = value();
  3324. }
  3325. opts.type = parsePropType(key, opts.type);
  3326. properties[key] = {
  3327. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  3328. value: value,
  3329. observer: createObserver(key)
  3330. };
  3331. } else {
  3332. // content:String
  3333. var type = parsePropType(key, opts);
  3334. properties[key] = {
  3335. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  3336. observer: createObserver(key)
  3337. };
  3338. }
  3339. });
  3340. }
  3341. return properties;
  3342. }
  3343. function wrapper$1(event) {
  3344. // TODO 又得兼容 mpvue 的 mp 对象
  3345. try {
  3346. event.mp = JSON.parse(JSON.stringify(event));
  3347. } catch (e) {}
  3348. event.stopPropagation = noop;
  3349. event.preventDefault = noop;
  3350. event.target = event.target || {};
  3351. if (!hasOwn(event, 'detail')) {
  3352. event.detail = {};
  3353. }
  3354. if (hasOwn(event, 'markerId')) {
  3355. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  3356. event.detail.markerId = event.markerId;
  3357. }
  3358. if (isPlainObject(event.detail)) {
  3359. event.target = Object.assign({}, event.target, event.detail);
  3360. }
  3361. return event;
  3362. }
  3363. function getExtraValue(vm, dataPathsArray) {
  3364. var context = vm;
  3365. dataPathsArray.forEach(function (dataPathArray) {
  3366. var dataPath = dataPathArray[0];
  3367. var value = dataPathArray[2];
  3368. if (dataPath || typeof value !== 'undefined') {
  3369. // ['','',index,'disable']
  3370. var propPath = dataPathArray[1];
  3371. var valuePath = dataPathArray[3];
  3372. var vFor;
  3373. if (Number.isInteger(dataPath)) {
  3374. vFor = dataPath;
  3375. } else if (!dataPath) {
  3376. vFor = context;
  3377. } else if (typeof dataPath === 'string' && dataPath) {
  3378. if (dataPath.indexOf('#s#') === 0) {
  3379. vFor = dataPath.substr(3);
  3380. } else {
  3381. vFor = vm.__get_value(dataPath, context);
  3382. }
  3383. }
  3384. if (Number.isInteger(vFor)) {
  3385. context = value;
  3386. } else if (!propPath) {
  3387. context = vFor[value];
  3388. } else {
  3389. if (Array.isArray(vFor)) {
  3390. context = vFor.find(function (vForItem) {
  3391. return vm.__get_value(propPath, vForItem) === value;
  3392. });
  3393. } else if (isPlainObject(vFor)) {
  3394. context = Object.keys(vFor).find(function (vForKey) {
  3395. return vm.__get_value(propPath, vFor[vForKey]) === value;
  3396. });
  3397. } else {
  3398. console.error('v-for 暂不支持循环数据:', vFor);
  3399. }
  3400. }
  3401. if (valuePath) {
  3402. context = vm.__get_value(valuePath, context);
  3403. }
  3404. }
  3405. });
  3406. return context;
  3407. }
  3408. function processEventExtra(vm, extra, event, __args__) {
  3409. var extraObj = {};
  3410. if (Array.isArray(extra) && extra.length) {
  3411. /**
  3412. *[
  3413. * ['data.items', 'data.id', item.data.id],
  3414. * ['metas', 'id', meta.id]
  3415. *],
  3416. *[
  3417. * ['data.items', 'data.id', item.data.id],
  3418. * ['metas', 'id', meta.id]
  3419. *],
  3420. *'test'
  3421. */
  3422. extra.forEach(function (dataPath, index) {
  3423. if (typeof dataPath === 'string') {
  3424. if (!dataPath) {
  3425. // model,prop.sync
  3426. extraObj['$' + index] = vm;
  3427. } else {
  3428. if (dataPath === '$event') {
  3429. // $event
  3430. extraObj['$' + index] = event;
  3431. } else if (dataPath === 'arguments') {
  3432. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  3433. } else if (dataPath.indexOf('$event.') === 0) {
  3434. // $event.target.value
  3435. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  3436. } else {
  3437. extraObj['$' + index] = vm.__get_value(dataPath);
  3438. }
  3439. }
  3440. } else {
  3441. extraObj['$' + index] = getExtraValue(vm, dataPath);
  3442. }
  3443. });
  3444. }
  3445. return extraObj;
  3446. }
  3447. function getObjByArray(arr) {
  3448. var obj = {};
  3449. for (var i = 1; i < arr.length; i++) {
  3450. var element = arr[i];
  3451. obj[element[0]] = element[1];
  3452. }
  3453. return obj;
  3454. }
  3455. function processEventArgs(vm, event) {
  3456. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  3457. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  3458. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  3459. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  3460. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  3461. // fixed 用户直接触发 mpInstance.triggerEvent
  3462. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  3463. if (isCustom) {
  3464. // 自定义事件
  3465. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  3466. if (!args.length) {
  3467. // 无参数,直接传入 event 或 detail 数组
  3468. if (isCustomMPEvent) {
  3469. return [event];
  3470. }
  3471. return __args__;
  3472. }
  3473. }
  3474. var extraObj = processEventExtra(vm, extra, event, __args__);
  3475. var ret = [];
  3476. args.forEach(function (arg) {
  3477. if (arg === '$event') {
  3478. if (methodName === '__set_model' && !isCustom) {
  3479. // input v-model value
  3480. ret.push(event.target.value);
  3481. } else {
  3482. if (isCustom && !isCustomMPEvent) {
  3483. ret.push(__args__[0]);
  3484. } else {
  3485. // wxcomponent 组件或内置组件
  3486. ret.push(event);
  3487. }
  3488. }
  3489. } else {
  3490. if (Array.isArray(arg) && arg[0] === 'o') {
  3491. ret.push(getObjByArray(arg));
  3492. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  3493. ret.push(extraObj[arg]);
  3494. } else {
  3495. ret.push(arg);
  3496. }
  3497. }
  3498. });
  3499. return ret;
  3500. }
  3501. var ONCE = '~';
  3502. var CUSTOM = '^';
  3503. function isMatchEventType(eventType, optType) {
  3504. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  3505. }
  3506. function getContextVm(vm) {
  3507. var $parent = vm.$parent;
  3508. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  3509. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  3510. $parent = $parent.$parent;
  3511. }
  3512. return $parent && $parent.$parent;
  3513. }
  3514. function handleEvent(event) {
  3515. var _this2 = this;
  3516. event = wrapper$1(event);
  3517. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  3518. var dataset = (event.currentTarget || event.target).dataset;
  3519. if (!dataset) {
  3520. return console.warn('事件信息不存在');
  3521. }
  3522. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  3523. if (!eventOpts) {
  3524. return console.warn('事件信息不存在');
  3525. }
  3526. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  3527. var eventType = event.type;
  3528. var ret = [];
  3529. eventOpts.forEach(function (eventOpt) {
  3530. var type = eventOpt[0];
  3531. var eventsArray = eventOpt[1];
  3532. var isCustom = type.charAt(0) === CUSTOM;
  3533. type = isCustom ? type.slice(1) : type;
  3534. var isOnce = type.charAt(0) === ONCE;
  3535. type = isOnce ? type.slice(1) : type;
  3536. if (eventsArray && isMatchEventType(eventType, type)) {
  3537. eventsArray.forEach(function (eventArray) {
  3538. var methodName = eventArray[0];
  3539. if (methodName) {
  3540. var handlerCtx = _this2.$vm;
  3541. if (handlerCtx.$options.generic) {
  3542. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  3543. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  3544. }
  3545. if (methodName === '$emit') {
  3546. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  3547. return;
  3548. }
  3549. var handler = handlerCtx[methodName];
  3550. if (!isFn(handler)) {
  3551. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  3552. var path = _this2.route || _this2.is;
  3553. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  3554. }
  3555. if (isOnce) {
  3556. if (handler.once) {
  3557. return;
  3558. }
  3559. handler.once = true;
  3560. }
  3561. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  3562. params = Array.isArray(params) ? params : [];
  3563. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  3564. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  3565. // eslint-disable-next-line no-sparse-arrays
  3566. params = params.concat([,,,,,,,,,, event]);
  3567. }
  3568. ret.push(handler.apply(handlerCtx, params));
  3569. }
  3570. });
  3571. }
  3572. });
  3573. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  3574. return ret[0];
  3575. }
  3576. }
  3577. var eventChannels = {};
  3578. function getEventChannel(id) {
  3579. var eventChannel = eventChannels[id];
  3580. delete eventChannels[id];
  3581. return eventChannel;
  3582. }
  3583. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  3584. function initEventChannel() {
  3585. _vue.default.prototype.getOpenerEventChannel = function () {
  3586. // 微信小程序使用自身getOpenerEventChannel
  3587. {
  3588. return this.$scope.getOpenerEventChannel();
  3589. }
  3590. };
  3591. var callHook = _vue.default.prototype.__call_hook;
  3592. _vue.default.prototype.__call_hook = function (hook, args) {
  3593. if (hook === 'onLoad' && args && args.__id__) {
  3594. this.__eventChannel__ = getEventChannel(args.__id__);
  3595. delete args.__id__;
  3596. }
  3597. return callHook.call(this, hook, args);
  3598. };
  3599. }
  3600. function initScopedSlotsParams() {
  3601. var center = {};
  3602. var parents = {};
  3603. function currentId(fn) {
  3604. var vueIds = this.$options.propsData.vueId;
  3605. if (vueIds) {
  3606. var vueId = vueIds.split(',')[0];
  3607. fn(vueId);
  3608. }
  3609. }
  3610. _vue.default.prototype.$hasSSP = function (vueId) {
  3611. var slot = center[vueId];
  3612. if (!slot) {
  3613. parents[vueId] = this;
  3614. this.$on('hook:destroyed', function () {
  3615. delete parents[vueId];
  3616. });
  3617. }
  3618. return slot;
  3619. };
  3620. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  3621. var slot = center[vueId];
  3622. if (slot) {
  3623. var params = slot[name] || [];
  3624. if (needAll) {
  3625. return params;
  3626. }
  3627. return params[0];
  3628. }
  3629. };
  3630. _vue.default.prototype.$setSSP = function (name, value) {
  3631. var index = 0;
  3632. currentId.call(this, function (vueId) {
  3633. var slot = center[vueId];
  3634. var params = slot[name] = slot[name] || [];
  3635. params.push(value);
  3636. index = params.length - 1;
  3637. });
  3638. return index;
  3639. };
  3640. _vue.default.prototype.$initSSP = function () {
  3641. currentId.call(this, function (vueId) {
  3642. center[vueId] = {};
  3643. });
  3644. };
  3645. _vue.default.prototype.$callSSP = function () {
  3646. currentId.call(this, function (vueId) {
  3647. if (parents[vueId]) {
  3648. parents[vueId].$forceUpdate();
  3649. }
  3650. });
  3651. };
  3652. _vue.default.mixin({
  3653. destroyed: function destroyed() {
  3654. var propsData = this.$options.propsData;
  3655. var vueId = propsData && propsData.vueId;
  3656. if (vueId) {
  3657. delete center[vueId];
  3658. delete parents[vueId];
  3659. }
  3660. }
  3661. });
  3662. }
  3663. function parseBaseApp(vm, _ref4) {
  3664. var mocks = _ref4.mocks,
  3665. initRefs = _ref4.initRefs;
  3666. initEventChannel();
  3667. {
  3668. initScopedSlotsParams();
  3669. }
  3670. if (vm.$options.store) {
  3671. _vue.default.prototype.$store = vm.$options.store;
  3672. }
  3673. uniIdMixin(_vue.default);
  3674. _vue.default.prototype.mpHost = "mp-weixin";
  3675. _vue.default.mixin({
  3676. beforeCreate: function beforeCreate() {
  3677. if (!this.$options.mpType) {
  3678. return;
  3679. }
  3680. this.mpType = this.$options.mpType;
  3681. this.$mp = (0, _defineProperty2.default)({
  3682. data: {}
  3683. }, this.mpType, this.$options.mpInstance);
  3684. this.$scope = this.$options.mpInstance;
  3685. delete this.$options.mpType;
  3686. delete this.$options.mpInstance;
  3687. if (this.mpType === 'page' && typeof getApp === 'function') {
  3688. // hack vue-i18n
  3689. var app = getApp();
  3690. if (app.$vm && app.$vm.$i18n) {
  3691. this._i18n = app.$vm.$i18n;
  3692. }
  3693. }
  3694. if (this.mpType !== 'app') {
  3695. initRefs(this);
  3696. initMocks(this, mocks);
  3697. }
  3698. }
  3699. });
  3700. var appOptions = {
  3701. onLaunch: function onLaunch(args) {
  3702. if (this.$vm) {
  3703. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  3704. return;
  3705. }
  3706. {
  3707. if (wx.canIUse && !wx.canIUse('nextTick')) {
  3708. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  3709. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  3710. }
  3711. }
  3712. this.$vm = vm;
  3713. this.$vm.$mp = {
  3714. app: this
  3715. };
  3716. this.$vm.$scope = this;
  3717. // vm 上也挂载 globalData
  3718. this.$vm.globalData = this.globalData;
  3719. this.$vm._isMounted = true;
  3720. this.$vm.__call_hook('mounted', args);
  3721. this.$vm.__call_hook('onLaunch', args);
  3722. }
  3723. };
  3724. // 兼容旧版本 globalData
  3725. appOptions.globalData = vm.$options.globalData || {};
  3726. // 将 methods 中的方法挂在 getApp() 中
  3727. var methods = vm.$options.methods;
  3728. if (methods) {
  3729. Object.keys(methods).forEach(function (name) {
  3730. appOptions[name] = methods[name];
  3731. });
  3732. }
  3733. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  3734. initHooks(appOptions, hooks);
  3735. initUnknownHooks(appOptions, vm.$options);
  3736. return appOptions;
  3737. }
  3738. function parseApp(vm) {
  3739. return parseBaseApp(vm, {
  3740. mocks: mocks,
  3741. initRefs: initRefs
  3742. });
  3743. }
  3744. function createApp(vm) {
  3745. App(parseApp(vm));
  3746. return vm;
  3747. }
  3748. var encodeReserveRE = /[!'()*]/g;
  3749. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  3750. return '%' + c.charCodeAt(0).toString(16);
  3751. };
  3752. var commaRE = /%2C/g;
  3753. // fixed encodeURIComponent which is more conformant to RFC3986:
  3754. // - escapes [!'()*]
  3755. // - preserve commas
  3756. var encode = function encode(str) {
  3757. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  3758. };
  3759. function stringifyQuery(obj) {
  3760. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  3761. var res = obj ? Object.keys(obj).map(function (key) {
  3762. var val = obj[key];
  3763. if (val === undefined) {
  3764. return '';
  3765. }
  3766. if (val === null) {
  3767. return encodeStr(key);
  3768. }
  3769. if (Array.isArray(val)) {
  3770. var result = [];
  3771. val.forEach(function (val2) {
  3772. if (val2 === undefined) {
  3773. return;
  3774. }
  3775. if (val2 === null) {
  3776. result.push(encodeStr(key));
  3777. } else {
  3778. result.push(encodeStr(key) + '=' + encodeStr(val2));
  3779. }
  3780. });
  3781. return result.join('&');
  3782. }
  3783. return encodeStr(key) + '=' + encodeStr(val);
  3784. }).filter(function (x) {
  3785. return x.length > 0;
  3786. }).join('&') : null;
  3787. return res ? "?".concat(res) : '';
  3788. }
  3789. function parseBaseComponent(vueComponentOptions) {
  3790. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  3791. isPage = _ref5.isPage,
  3792. initRelation = _ref5.initRelation;
  3793. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  3794. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  3795. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  3796. VueComponent = _initVueComponent2[0],
  3797. vueOptions = _initVueComponent2[1];
  3798. var options = _objectSpread({
  3799. multipleSlots: true,
  3800. // styleIsolation: 'apply-shared',
  3801. addGlobalClass: true
  3802. }, vueOptions.options || {});
  3803. {
  3804. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  3805. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  3806. Object.assign(options, vueOptions['mp-weixin'].options);
  3807. }
  3808. }
  3809. var componentOptions = {
  3810. options: options,
  3811. data: initData(vueOptions, _vue.default.prototype),
  3812. behaviors: initBehaviors(vueOptions, initBehavior),
  3813. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  3814. lifetimes: {
  3815. attached: function attached() {
  3816. var properties = this.properties;
  3817. var options = {
  3818. mpType: isPage.call(this) ? 'page' : 'component',
  3819. mpInstance: this,
  3820. propsData: properties
  3821. };
  3822. initVueIds(properties.vueId, this);
  3823. // 处理父子关系
  3824. initRelation.call(this, {
  3825. vuePid: this._$vuePid,
  3826. vueOptions: options
  3827. });
  3828. // 初始化 vue 实例
  3829. this.$vm = new VueComponent(options);
  3830. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  3831. initSlots(this.$vm, properties.vueSlots);
  3832. // 触发首次 setData
  3833. this.$vm.$mount();
  3834. },
  3835. ready: function ready() {
  3836. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  3837. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  3838. if (this.$vm) {
  3839. this.$vm._isMounted = true;
  3840. this.$vm.__call_hook('mounted');
  3841. this.$vm.__call_hook('onReady');
  3842. }
  3843. },
  3844. detached: function detached() {
  3845. this.$vm && this.$vm.$destroy();
  3846. }
  3847. },
  3848. pageLifetimes: {
  3849. show: function show(args) {
  3850. this.$vm && this.$vm.__call_hook('onPageShow', args);
  3851. },
  3852. hide: function hide() {
  3853. this.$vm && this.$vm.__call_hook('onPageHide');
  3854. },
  3855. resize: function resize(size) {
  3856. this.$vm && this.$vm.__call_hook('onPageResize', size);
  3857. }
  3858. },
  3859. methods: {
  3860. __l: handleLink,
  3861. __e: handleEvent
  3862. }
  3863. };
  3864. // externalClasses
  3865. if (vueOptions.externalClasses) {
  3866. componentOptions.externalClasses = vueOptions.externalClasses;
  3867. }
  3868. if (Array.isArray(vueOptions.wxsCallMethods)) {
  3869. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  3870. componentOptions.methods[callMethod] = function (args) {
  3871. return this.$vm[callMethod](args);
  3872. };
  3873. });
  3874. }
  3875. if (needVueOptions) {
  3876. return [componentOptions, vueOptions, VueComponent];
  3877. }
  3878. if (isPage) {
  3879. return componentOptions;
  3880. }
  3881. return [componentOptions, VueComponent];
  3882. }
  3883. function parseComponent(vueComponentOptions, needVueOptions) {
  3884. return parseBaseComponent(vueComponentOptions, {
  3885. isPage: isPage,
  3886. initRelation: initRelation
  3887. }, needVueOptions);
  3888. }
  3889. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  3890. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  3891. function parseBasePage(vuePageOptions) {
  3892. var _parseComponent = parseComponent(vuePageOptions, true),
  3893. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  3894. pageOptions = _parseComponent2[0],
  3895. vueOptions = _parseComponent2[1];
  3896. initHooks(pageOptions.methods, hooks$1, vueOptions);
  3897. pageOptions.methods.onLoad = function (query) {
  3898. this.options = query;
  3899. var copyQuery = Object.assign({}, query);
  3900. delete copyQuery.__id__;
  3901. this.$page = {
  3902. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  3903. };
  3904. this.$vm.$mp.query = query; // 兼容 mpvue
  3905. this.$vm.__call_hook('onLoad', query);
  3906. };
  3907. {
  3908. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  3909. }
  3910. {
  3911. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  3912. }
  3913. return pageOptions;
  3914. }
  3915. function parsePage(vuePageOptions) {
  3916. return parseBasePage(vuePageOptions);
  3917. }
  3918. function createPage(vuePageOptions) {
  3919. {
  3920. return Component(parsePage(vuePageOptions));
  3921. }
  3922. }
  3923. function createComponent(vueOptions) {
  3924. {
  3925. return Component(parseComponent(vueOptions));
  3926. }
  3927. }
  3928. function createSubpackageApp(vm) {
  3929. var appOptions = parseApp(vm);
  3930. var app = getApp({
  3931. allowDefault: true
  3932. });
  3933. vm.$scope = app;
  3934. var globalData = app.globalData;
  3935. if (globalData) {
  3936. Object.keys(appOptions.globalData).forEach(function (name) {
  3937. if (!hasOwn(globalData, name)) {
  3938. globalData[name] = appOptions.globalData[name];
  3939. }
  3940. });
  3941. }
  3942. Object.keys(appOptions).forEach(function (name) {
  3943. if (!hasOwn(app, name)) {
  3944. app[name] = appOptions[name];
  3945. }
  3946. });
  3947. if (isFn(appOptions.onShow) && wx.onAppShow) {
  3948. wx.onAppShow(function () {
  3949. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  3950. args[_key5] = arguments[_key5];
  3951. }
  3952. vm.__call_hook('onShow', args);
  3953. });
  3954. }
  3955. if (isFn(appOptions.onHide) && wx.onAppHide) {
  3956. wx.onAppHide(function () {
  3957. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  3958. args[_key6] = arguments[_key6];
  3959. }
  3960. vm.__call_hook('onHide', args);
  3961. });
  3962. }
  3963. if (isFn(appOptions.onLaunch)) {
  3964. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  3965. vm.__call_hook('onLaunch', args);
  3966. }
  3967. return vm;
  3968. }
  3969. function createPlugin(vm) {
  3970. var appOptions = parseApp(vm);
  3971. if (isFn(appOptions.onShow) && wx.onAppShow) {
  3972. wx.onAppShow(function () {
  3973. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  3974. args[_key7] = arguments[_key7];
  3975. }
  3976. vm.__call_hook('onShow', args);
  3977. });
  3978. }
  3979. if (isFn(appOptions.onHide) && wx.onAppHide) {
  3980. wx.onAppHide(function () {
  3981. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  3982. args[_key8] = arguments[_key8];
  3983. }
  3984. vm.__call_hook('onHide', args);
  3985. });
  3986. }
  3987. if (isFn(appOptions.onLaunch)) {
  3988. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  3989. vm.__call_hook('onLaunch', args);
  3990. }
  3991. return vm;
  3992. }
  3993. todos.forEach(function (todoApi) {
  3994. protocols[todoApi] = false;
  3995. });
  3996. canIUses.forEach(function (canIUseApi) {
  3997. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  3998. if (!wx.canIUse(apiName)) {
  3999. protocols[canIUseApi] = false;
  4000. }
  4001. });
  4002. var uni = {};
  4003. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  4004. uni = new Proxy({}, {
  4005. get: function get(target, name) {
  4006. if (hasOwn(target, name)) {
  4007. return target[name];
  4008. }
  4009. if (baseApi[name]) {
  4010. return baseApi[name];
  4011. }
  4012. if (api[name]) {
  4013. return promisify(name, api[name]);
  4014. }
  4015. {
  4016. if (extraApi[name]) {
  4017. return promisify(name, extraApi[name]);
  4018. }
  4019. if (todoApis[name]) {
  4020. return promisify(name, todoApis[name]);
  4021. }
  4022. }
  4023. if (eventApi[name]) {
  4024. return eventApi[name];
  4025. }
  4026. return promisify(name, wrapper(name, wx[name]));
  4027. },
  4028. set: function set(target, name, value) {
  4029. target[name] = value;
  4030. return true;
  4031. }
  4032. });
  4033. } else {
  4034. Object.keys(baseApi).forEach(function (name) {
  4035. uni[name] = baseApi[name];
  4036. });
  4037. {
  4038. Object.keys(todoApis).forEach(function (name) {
  4039. uni[name] = promisify(name, todoApis[name]);
  4040. });
  4041. Object.keys(extraApi).forEach(function (name) {
  4042. uni[name] = promisify(name, extraApi[name]);
  4043. });
  4044. }
  4045. Object.keys(eventApi).forEach(function (name) {
  4046. uni[name] = eventApi[name];
  4047. });
  4048. Object.keys(api).forEach(function (name) {
  4049. uni[name] = promisify(name, api[name]);
  4050. });
  4051. Object.keys(wx).forEach(function (name) {
  4052. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  4053. uni[name] = promisify(name, wrapper(name, wx[name]));
  4054. }
  4055. });
  4056. }
  4057. wx.createApp = createApp;
  4058. wx.createPage = createPage;
  4059. wx.createComponent = createComponent;
  4060. wx.createSubpackageApp = createSubpackageApp;
  4061. wx.createPlugin = createPlugin;
  4062. var uni$1 = uni;
  4063. var _default = uni$1;
  4064. exports.default = _default;
  4065. /* 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)))
  4066. /***/ }),
  4067. /***/ 20:
  4068. /*!****************************************************************!*\
  4069. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  4070. \****************************************************************/
  4071. /*! no static exports found */
  4072. /***/ (function(module, exports) {
  4073. function _iterableToArray(iter) {
  4074. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  4075. }
  4076. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4077. /***/ }),
  4078. /***/ 21:
  4079. /*!******************************************************************!*\
  4080. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  4081. \******************************************************************/
  4082. /*! no static exports found */
  4083. /***/ (function(module, exports) {
  4084. function _nonIterableSpread() {
  4085. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  4086. }
  4087. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4088. /***/ }),
  4089. /***/ 22:
  4090. /*!*************************************************************!*\
  4091. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  4092. \*************************************************************/
  4093. /*! no static exports found */
  4094. /***/ (function(module, exports, __webpack_require__) {
  4095. "use strict";
  4096. /* WEBPACK VAR INJECTION */(function(uni, global) {
  4097. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  4098. Object.defineProperty(exports, "__esModule", {
  4099. value: true
  4100. });
  4101. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  4102. exports.compileI18nJsonStr = compileI18nJsonStr;
  4103. exports.hasI18nJson = hasI18nJson;
  4104. exports.initVueI18n = initVueI18n;
  4105. exports.isI18nStr = isI18nStr;
  4106. exports.isString = void 0;
  4107. exports.normalizeLocale = normalizeLocale;
  4108. exports.parseI18nJson = parseI18nJson;
  4109. exports.resolveLocale = resolveLocale;
  4110. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  4111. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  4112. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  4113. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  4114. var isObject = function isObject(val) {
  4115. return val !== null && (0, _typeof2.default)(val) === 'object';
  4116. };
  4117. var defaultDelimiters = ['{', '}'];
  4118. var BaseFormatter = /*#__PURE__*/function () {
  4119. function BaseFormatter() {
  4120. (0, _classCallCheck2.default)(this, BaseFormatter);
  4121. this._caches = Object.create(null);
  4122. }
  4123. (0, _createClass2.default)(BaseFormatter, [{
  4124. key: "interpolate",
  4125. value: function interpolate(message, values) {
  4126. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  4127. if (!values) {
  4128. return [message];
  4129. }
  4130. var tokens = this._caches[message];
  4131. if (!tokens) {
  4132. tokens = parse(message, delimiters);
  4133. this._caches[message] = tokens;
  4134. }
  4135. return compile(tokens, values);
  4136. }
  4137. }]);
  4138. return BaseFormatter;
  4139. }();
  4140. exports.Formatter = BaseFormatter;
  4141. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  4142. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  4143. function parse(format, _ref) {
  4144. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  4145. startDelimiter = _ref2[0],
  4146. endDelimiter = _ref2[1];
  4147. var tokens = [];
  4148. var position = 0;
  4149. var text = '';
  4150. while (position < format.length) {
  4151. var char = format[position++];
  4152. if (char === startDelimiter) {
  4153. if (text) {
  4154. tokens.push({
  4155. type: 'text',
  4156. value: text
  4157. });
  4158. }
  4159. text = '';
  4160. var sub = '';
  4161. char = format[position++];
  4162. while (char !== undefined && char !== endDelimiter) {
  4163. sub += char;
  4164. char = format[position++];
  4165. }
  4166. var isClosed = char === endDelimiter;
  4167. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  4168. tokens.push({
  4169. value: sub,
  4170. type: type
  4171. });
  4172. }
  4173. // else if (char === '%') {
  4174. // // when found rails i18n syntax, skip text capture
  4175. // if (format[position] !== '{') {
  4176. // text += char
  4177. // }
  4178. // }
  4179. else {
  4180. text += char;
  4181. }
  4182. }
  4183. text && tokens.push({
  4184. type: 'text',
  4185. value: text
  4186. });
  4187. return tokens;
  4188. }
  4189. function compile(tokens, values) {
  4190. var compiled = [];
  4191. var index = 0;
  4192. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  4193. if (mode === 'unknown') {
  4194. return compiled;
  4195. }
  4196. while (index < tokens.length) {
  4197. var token = tokens[index];
  4198. switch (token.type) {
  4199. case 'text':
  4200. compiled.push(token.value);
  4201. break;
  4202. case 'list':
  4203. compiled.push(values[parseInt(token.value, 10)]);
  4204. break;
  4205. case 'named':
  4206. if (mode === 'named') {
  4207. compiled.push(values[token.value]);
  4208. } else {
  4209. if (true) {
  4210. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  4211. }
  4212. }
  4213. break;
  4214. case 'unknown':
  4215. if (true) {
  4216. console.warn("Detect 'unknown' type of token!");
  4217. }
  4218. break;
  4219. }
  4220. index++;
  4221. }
  4222. return compiled;
  4223. }
  4224. var LOCALE_ZH_HANS = 'zh-Hans';
  4225. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  4226. var LOCALE_ZH_HANT = 'zh-Hant';
  4227. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  4228. var LOCALE_EN = 'en';
  4229. exports.LOCALE_EN = LOCALE_EN;
  4230. var LOCALE_FR = 'fr';
  4231. exports.LOCALE_FR = LOCALE_FR;
  4232. var LOCALE_ES = 'es';
  4233. exports.LOCALE_ES = LOCALE_ES;
  4234. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4235. var hasOwn = function hasOwn(val, key) {
  4236. return hasOwnProperty.call(val, key);
  4237. };
  4238. var defaultFormatter = new BaseFormatter();
  4239. function include(str, parts) {
  4240. return !!parts.find(function (part) {
  4241. return str.indexOf(part) !== -1;
  4242. });
  4243. }
  4244. function startsWith(str, parts) {
  4245. return parts.find(function (part) {
  4246. return str.indexOf(part) === 0;
  4247. });
  4248. }
  4249. function normalizeLocale(locale, messages) {
  4250. if (!locale) {
  4251. return;
  4252. }
  4253. locale = locale.trim().replace(/_/g, '-');
  4254. if (messages && messages[locale]) {
  4255. return locale;
  4256. }
  4257. locale = locale.toLowerCase();
  4258. if (locale === 'chinese') {
  4259. // 支付宝
  4260. return LOCALE_ZH_HANS;
  4261. }
  4262. if (locale.indexOf('zh') === 0) {
  4263. if (locale.indexOf('-hans') > -1) {
  4264. return LOCALE_ZH_HANS;
  4265. }
  4266. if (locale.indexOf('-hant') > -1) {
  4267. return LOCALE_ZH_HANT;
  4268. }
  4269. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  4270. return LOCALE_ZH_HANT;
  4271. }
  4272. return LOCALE_ZH_HANS;
  4273. }
  4274. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  4275. if (messages && Object.keys(messages).length > 0) {
  4276. locales = Object.keys(messages);
  4277. }
  4278. var lang = startsWith(locale, locales);
  4279. if (lang) {
  4280. return lang;
  4281. }
  4282. }
  4283. var I18n = /*#__PURE__*/function () {
  4284. function I18n(_ref3) {
  4285. var locale = _ref3.locale,
  4286. fallbackLocale = _ref3.fallbackLocale,
  4287. messages = _ref3.messages,
  4288. watcher = _ref3.watcher,
  4289. formater = _ref3.formater;
  4290. (0, _classCallCheck2.default)(this, I18n);
  4291. this.locale = LOCALE_EN;
  4292. this.fallbackLocale = LOCALE_EN;
  4293. this.message = {};
  4294. this.messages = {};
  4295. this.watchers = [];
  4296. if (fallbackLocale) {
  4297. this.fallbackLocale = fallbackLocale;
  4298. }
  4299. this.formater = formater || defaultFormatter;
  4300. this.messages = messages || {};
  4301. this.setLocale(locale || LOCALE_EN);
  4302. if (watcher) {
  4303. this.watchLocale(watcher);
  4304. }
  4305. }
  4306. (0, _createClass2.default)(I18n, [{
  4307. key: "setLocale",
  4308. value: function setLocale(locale) {
  4309. var _this = this;
  4310. var oldLocale = this.locale;
  4311. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  4312. if (!this.messages[this.locale]) {
  4313. // 可能初始化时不存在
  4314. this.messages[this.locale] = {};
  4315. }
  4316. this.message = this.messages[this.locale];
  4317. // 仅发生变化时,通知
  4318. if (oldLocale !== this.locale) {
  4319. this.watchers.forEach(function (watcher) {
  4320. watcher(_this.locale, oldLocale);
  4321. });
  4322. }
  4323. }
  4324. }, {
  4325. key: "getLocale",
  4326. value: function getLocale() {
  4327. return this.locale;
  4328. }
  4329. }, {
  4330. key: "watchLocale",
  4331. value: function watchLocale(fn) {
  4332. var _this2 = this;
  4333. var index = this.watchers.push(fn) - 1;
  4334. return function () {
  4335. _this2.watchers.splice(index, 1);
  4336. };
  4337. }
  4338. }, {
  4339. key: "add",
  4340. value: function add(locale, message) {
  4341. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4342. var curMessages = this.messages[locale];
  4343. if (curMessages) {
  4344. if (override) {
  4345. Object.assign(curMessages, message);
  4346. } else {
  4347. Object.keys(message).forEach(function (key) {
  4348. if (!hasOwn(curMessages, key)) {
  4349. curMessages[key] = message[key];
  4350. }
  4351. });
  4352. }
  4353. } else {
  4354. this.messages[locale] = message;
  4355. }
  4356. }
  4357. }, {
  4358. key: "f",
  4359. value: function f(message, values, delimiters) {
  4360. return this.formater.interpolate(message, values, delimiters).join('');
  4361. }
  4362. }, {
  4363. key: "t",
  4364. value: function t(key, locale, values) {
  4365. var message = this.message;
  4366. if (typeof locale === 'string') {
  4367. locale = normalizeLocale(locale, this.messages);
  4368. locale && (message = this.messages[locale]);
  4369. } else {
  4370. values = locale;
  4371. }
  4372. if (!hasOwn(message, key)) {
  4373. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  4374. return key;
  4375. }
  4376. return this.formater.interpolate(message[key], values).join('');
  4377. }
  4378. }]);
  4379. return I18n;
  4380. }();
  4381. exports.I18n = I18n;
  4382. function watchAppLocale(appVm, i18n) {
  4383. // 需要保证 watch 的触发在组件渲染之前
  4384. if (appVm.$watchLocale) {
  4385. // vue2
  4386. appVm.$watchLocale(function (newLocale) {
  4387. i18n.setLocale(newLocale);
  4388. });
  4389. } else {
  4390. appVm.$watch(function () {
  4391. return appVm.$locale;
  4392. }, function (newLocale) {
  4393. i18n.setLocale(newLocale);
  4394. });
  4395. }
  4396. }
  4397. function getDefaultLocale() {
  4398. if (typeof uni !== 'undefined' && uni.getLocale) {
  4399. return uni.getLocale();
  4400. }
  4401. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  4402. if (typeof global !== 'undefined' && global.getLocale) {
  4403. return global.getLocale();
  4404. }
  4405. return LOCALE_EN;
  4406. }
  4407. function initVueI18n(locale) {
  4408. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  4409. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  4410. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  4411. // 兼容旧版本入参
  4412. if (typeof locale !== 'string') {
  4413. var _ref4 = [messages, locale];
  4414. locale = _ref4[0];
  4415. messages = _ref4[1];
  4416. }
  4417. if (typeof locale !== 'string') {
  4418. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  4419. locale = getDefaultLocale();
  4420. }
  4421. if (typeof fallbackLocale !== 'string') {
  4422. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  4423. }
  4424. var i18n = new I18n({
  4425. locale: locale,
  4426. fallbackLocale: fallbackLocale,
  4427. messages: messages,
  4428. watcher: watcher
  4429. });
  4430. var _t = function t(key, values) {
  4431. if (typeof getApp !== 'function') {
  4432. // app view
  4433. /* eslint-disable no-func-assign */
  4434. _t = function t(key, values) {
  4435. return i18n.t(key, values);
  4436. };
  4437. } else {
  4438. var isWatchedAppLocale = false;
  4439. _t = function t(key, values) {
  4440. var appVm = getApp().$vm;
  4441. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  4442. // options: {
  4443. // type: Array,
  4444. // default () {
  4445. // return [{
  4446. // icon: 'shop',
  4447. // text: t("uni-goods-nav.options.shop"),
  4448. // }, {
  4449. // icon: 'cart',
  4450. // text: t("uni-goods-nav.options.cart")
  4451. // }]
  4452. // }
  4453. // },
  4454. if (appVm) {
  4455. // 触发响应式
  4456. appVm.$locale;
  4457. if (!isWatchedAppLocale) {
  4458. isWatchedAppLocale = true;
  4459. watchAppLocale(appVm, i18n);
  4460. }
  4461. }
  4462. return i18n.t(key, values);
  4463. };
  4464. }
  4465. return _t(key, values);
  4466. };
  4467. return {
  4468. i18n: i18n,
  4469. f: function f(message, values, delimiters) {
  4470. return i18n.f(message, values, delimiters);
  4471. },
  4472. t: function t(key, values) {
  4473. return _t(key, values);
  4474. },
  4475. add: function add(locale, message) {
  4476. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  4477. return i18n.add(locale, message, override);
  4478. },
  4479. watch: function watch(fn) {
  4480. return i18n.watchLocale(fn);
  4481. },
  4482. getLocale: function getLocale() {
  4483. return i18n.getLocale();
  4484. },
  4485. setLocale: function setLocale(newLocale) {
  4486. return i18n.setLocale(newLocale);
  4487. }
  4488. };
  4489. }
  4490. var isString = function isString(val) {
  4491. return typeof val === 'string';
  4492. };
  4493. exports.isString = isString;
  4494. var formater;
  4495. function hasI18nJson(jsonObj, delimiters) {
  4496. if (!formater) {
  4497. formater = new BaseFormatter();
  4498. }
  4499. return walkJsonObj(jsonObj, function (jsonObj, key) {
  4500. var value = jsonObj[key];
  4501. if (isString(value)) {
  4502. if (isI18nStr(value, delimiters)) {
  4503. return true;
  4504. }
  4505. } else {
  4506. return hasI18nJson(value, delimiters);
  4507. }
  4508. });
  4509. }
  4510. function parseI18nJson(jsonObj, values, delimiters) {
  4511. if (!formater) {
  4512. formater = new BaseFormatter();
  4513. }
  4514. walkJsonObj(jsonObj, function (jsonObj, key) {
  4515. var value = jsonObj[key];
  4516. if (isString(value)) {
  4517. if (isI18nStr(value, delimiters)) {
  4518. jsonObj[key] = compileStr(value, values, delimiters);
  4519. }
  4520. } else {
  4521. parseI18nJson(value, values, delimiters);
  4522. }
  4523. });
  4524. return jsonObj;
  4525. }
  4526. function compileI18nJsonStr(jsonStr, _ref5) {
  4527. var locale = _ref5.locale,
  4528. locales = _ref5.locales,
  4529. delimiters = _ref5.delimiters;
  4530. if (!isI18nStr(jsonStr, delimiters)) {
  4531. return jsonStr;
  4532. }
  4533. if (!formater) {
  4534. formater = new BaseFormatter();
  4535. }
  4536. var localeValues = [];
  4537. Object.keys(locales).forEach(function (name) {
  4538. if (name !== locale) {
  4539. localeValues.push({
  4540. locale: name,
  4541. values: locales[name]
  4542. });
  4543. }
  4544. });
  4545. localeValues.unshift({
  4546. locale: locale,
  4547. values: locales[locale]
  4548. });
  4549. try {
  4550. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  4551. } catch (e) {}
  4552. return jsonStr;
  4553. }
  4554. function isI18nStr(value, delimiters) {
  4555. return value.indexOf(delimiters[0]) > -1;
  4556. }
  4557. function compileStr(value, values, delimiters) {
  4558. return formater.interpolate(value, values, delimiters).join('');
  4559. }
  4560. function compileValue(jsonObj, key, localeValues, delimiters) {
  4561. var value = jsonObj[key];
  4562. if (isString(value)) {
  4563. // 存在国际化
  4564. if (isI18nStr(value, delimiters)) {
  4565. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  4566. if (localeValues.length > 1) {
  4567. // 格式化国际化语言
  4568. var valueLocales = jsonObj[key + 'Locales'] = {};
  4569. localeValues.forEach(function (localValue) {
  4570. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  4571. });
  4572. }
  4573. }
  4574. } else {
  4575. compileJsonObj(value, localeValues, delimiters);
  4576. }
  4577. }
  4578. function compileJsonObj(jsonObj, localeValues, delimiters) {
  4579. walkJsonObj(jsonObj, function (jsonObj, key) {
  4580. compileValue(jsonObj, key, localeValues, delimiters);
  4581. });
  4582. return jsonObj;
  4583. }
  4584. function walkJsonObj(jsonObj, walk) {
  4585. if (Array.isArray(jsonObj)) {
  4586. for (var i = 0; i < jsonObj.length; i++) {
  4587. if (walk(jsonObj, i)) {
  4588. return true;
  4589. }
  4590. }
  4591. } else if (isObject(jsonObj)) {
  4592. for (var key in jsonObj) {
  4593. if (walk(jsonObj, key)) {
  4594. return true;
  4595. }
  4596. }
  4597. }
  4598. return false;
  4599. }
  4600. function resolveLocale(locales) {
  4601. return function (locale) {
  4602. if (!locale) {
  4603. return locale;
  4604. }
  4605. locale = normalizeLocale(locale) || locale;
  4606. return resolveLocaleChain(locale).find(function (locale) {
  4607. return locales.indexOf(locale) > -1;
  4608. });
  4609. };
  4610. }
  4611. function resolveLocaleChain(locale) {
  4612. var chain = [];
  4613. var tokens = locale.split('-');
  4614. while (tokens.length) {
  4615. chain.push(tokens.join('-'));
  4616. tokens.pop();
  4617. }
  4618. return chain;
  4619. }
  4620. /* 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)))
  4621. /***/ }),
  4622. /***/ 228:
  4623. /*!*****************************************************************************************************************!*\
  4624. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpwxs.js ***!
  4625. \*****************************************************************************************************************/
  4626. /*! no static exports found */
  4627. /***/ (function(module, exports, __webpack_require__) {
  4628. "use strict";
  4629. Object.defineProperty(exports, "__esModule", {
  4630. value: true
  4631. });
  4632. exports.default = void 0;
  4633. var mpMixins = {};
  4634. var is_pc = null;
  4635. mpMixins = {
  4636. data: function data() {
  4637. return {
  4638. is_show: 'none'
  4639. };
  4640. },
  4641. watch: {
  4642. show: function show(newVal) {
  4643. this.is_show = this.show;
  4644. }
  4645. },
  4646. created: function created() {
  4647. this.swipeaction = this.getSwipeAction();
  4648. if (this.swipeaction.children !== undefined) {
  4649. this.swipeaction.children.push(this);
  4650. }
  4651. },
  4652. mounted: function mounted() {
  4653. this.is_show = this.show;
  4654. },
  4655. methods: {
  4656. // wxs 中调用
  4657. closeSwipe: function closeSwipe(e) {
  4658. if (!this.autoClose) return;
  4659. this.swipeaction.closeOther(this);
  4660. },
  4661. change: function change(e) {
  4662. this.$emit('change', e.open);
  4663. if (this.is_show !== e.open) {
  4664. this.is_show = e.open;
  4665. }
  4666. },
  4667. appTouchStart: function appTouchStart(e) {
  4668. if (is_pc) return;
  4669. var clientX = e.changedTouches[0].clientX;
  4670. this.clientX = clientX;
  4671. this.timestamp = new Date().getTime();
  4672. },
  4673. appTouchEnd: function appTouchEnd(e, index, item, position) {
  4674. if (is_pc) return;
  4675. var clientX = e.changedTouches[0].clientX;
  4676. // fixed by xxxx 模拟点击事件,解决 ios 13 点击区域错位的问题
  4677. var diff = Math.abs(this.clientX - clientX);
  4678. var time = new Date().getTime() - this.timestamp;
  4679. if (diff < 40 && time < 300) {
  4680. this.$emit('click', {
  4681. content: item,
  4682. index: index,
  4683. position: position
  4684. });
  4685. }
  4686. },
  4687. onClickForPC: function onClickForPC(index, item, position) {
  4688. if (!is_pc) return;
  4689. }
  4690. }
  4691. };
  4692. var _default = mpMixins;
  4693. exports.default = _default;
  4694. /***/ }),
  4695. /***/ 229:
  4696. /*!********************************************************************************************************************!*\
  4697. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-swipe-action/components/uni-swipe-action-item/bindingx.js ***!
  4698. \********************************************************************************************************************/
  4699. /*! no static exports found */
  4700. /***/ (function(module, exports, __webpack_require__) {
  4701. "use strict";
  4702. Object.defineProperty(exports, "__esModule", {
  4703. value: true
  4704. });
  4705. exports.default = void 0;
  4706. var bindIngXMixins = {};
  4707. var _default = bindIngXMixins;
  4708. exports.default = _default;
  4709. /***/ }),
  4710. /***/ 23:
  4711. /*!***************************************************************!*\
  4712. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  4713. \***************************************************************/
  4714. /*! no static exports found */
  4715. /***/ (function(module, exports) {
  4716. function _classCallCheck(instance, Constructor) {
  4717. if (!(instance instanceof Constructor)) {
  4718. throw new TypeError("Cannot call a class as a function");
  4719. }
  4720. }
  4721. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4722. /***/ }),
  4723. /***/ 230:
  4724. /*!*******************************************************************************************************************!*\
  4725. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpother.js ***!
  4726. \*******************************************************************************************************************/
  4727. /*! no static exports found */
  4728. /***/ (function(module, exports, __webpack_require__) {
  4729. "use strict";
  4730. Object.defineProperty(exports, "__esModule", {
  4731. value: true
  4732. });
  4733. exports.default = void 0;
  4734. var otherMixins = {};
  4735. var _default = otherMixins;
  4736. exports.default = _default;
  4737. /***/ }),
  4738. /***/ 24:
  4739. /*!************************************************************!*\
  4740. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  4741. \************************************************************/
  4742. /*! no static exports found */
  4743. /***/ (function(module, exports, __webpack_require__) {
  4744. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  4745. function _defineProperties(target, props) {
  4746. for (var i = 0; i < props.length; i++) {
  4747. var descriptor = props[i];
  4748. descriptor.enumerable = descriptor.enumerable || false;
  4749. descriptor.configurable = true;
  4750. if ("value" in descriptor) descriptor.writable = true;
  4751. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  4752. }
  4753. }
  4754. function _createClass(Constructor, protoProps, staticProps) {
  4755. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  4756. if (staticProps) _defineProperties(Constructor, staticProps);
  4757. Object.defineProperty(Constructor, "prototype", {
  4758. writable: false
  4759. });
  4760. return Constructor;
  4761. }
  4762. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  4763. /***/ }),
  4764. /***/ 25:
  4765. /*!******************************************************************************************!*\
  4766. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  4767. \******************************************************************************************/
  4768. /*! exports provided: default */
  4769. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  4770. "use strict";
  4771. __webpack_require__.r(__webpack_exports__);
  4772. /* WEBPACK VAR INJECTION */(function(global) {/*!
  4773. * Vue.js v2.6.11
  4774. * (c) 2014-2023 Evan You
  4775. * Released under the MIT License.
  4776. */
  4777. /* */
  4778. var emptyObject = Object.freeze({});
  4779. // These helpers produce better VM code in JS engines due to their
  4780. // explicitness and function inlining.
  4781. function isUndef (v) {
  4782. return v === undefined || v === null
  4783. }
  4784. function isDef (v) {
  4785. return v !== undefined && v !== null
  4786. }
  4787. function isTrue (v) {
  4788. return v === true
  4789. }
  4790. function isFalse (v) {
  4791. return v === false
  4792. }
  4793. /**
  4794. * Check if value is primitive.
  4795. */
  4796. function isPrimitive (value) {
  4797. return (
  4798. typeof value === 'string' ||
  4799. typeof value === 'number' ||
  4800. // $flow-disable-line
  4801. typeof value === 'symbol' ||
  4802. typeof value === 'boolean'
  4803. )
  4804. }
  4805. /**
  4806. * Quick object check - this is primarily used to tell
  4807. * Objects from primitive values when we know the value
  4808. * is a JSON-compliant type.
  4809. */
  4810. function isObject (obj) {
  4811. return obj !== null && typeof obj === 'object'
  4812. }
  4813. /**
  4814. * Get the raw type string of a value, e.g., [object Object].
  4815. */
  4816. var _toString = Object.prototype.toString;
  4817. function toRawType (value) {
  4818. return _toString.call(value).slice(8, -1)
  4819. }
  4820. /**
  4821. * Strict object type check. Only returns true
  4822. * for plain JavaScript objects.
  4823. */
  4824. function isPlainObject (obj) {
  4825. return _toString.call(obj) === '[object Object]'
  4826. }
  4827. function isRegExp (v) {
  4828. return _toString.call(v) === '[object RegExp]'
  4829. }
  4830. /**
  4831. * Check if val is a valid array index.
  4832. */
  4833. function isValidArrayIndex (val) {
  4834. var n = parseFloat(String(val));
  4835. return n >= 0 && Math.floor(n) === n && isFinite(val)
  4836. }
  4837. function isPromise (val) {
  4838. return (
  4839. isDef(val) &&
  4840. typeof val.then === 'function' &&
  4841. typeof val.catch === 'function'
  4842. )
  4843. }
  4844. /**
  4845. * Convert a value to a string that is actually rendered.
  4846. */
  4847. function toString (val) {
  4848. return val == null
  4849. ? ''
  4850. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  4851. ? JSON.stringify(val, null, 2)
  4852. : String(val)
  4853. }
  4854. /**
  4855. * Convert an input value to a number for persistence.
  4856. * If the conversion fails, return original string.
  4857. */
  4858. function toNumber (val) {
  4859. var n = parseFloat(val);
  4860. return isNaN(n) ? val : n
  4861. }
  4862. /**
  4863. * Make a map and return a function for checking if a key
  4864. * is in that map.
  4865. */
  4866. function makeMap (
  4867. str,
  4868. expectsLowerCase
  4869. ) {
  4870. var map = Object.create(null);
  4871. var list = str.split(',');
  4872. for (var i = 0; i < list.length; i++) {
  4873. map[list[i]] = true;
  4874. }
  4875. return expectsLowerCase
  4876. ? function (val) { return map[val.toLowerCase()]; }
  4877. : function (val) { return map[val]; }
  4878. }
  4879. /**
  4880. * Check if a tag is a built-in tag.
  4881. */
  4882. var isBuiltInTag = makeMap('slot,component', true);
  4883. /**
  4884. * Check if an attribute is a reserved attribute.
  4885. */
  4886. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  4887. /**
  4888. * Remove an item from an array.
  4889. */
  4890. function remove (arr, item) {
  4891. if (arr.length) {
  4892. var index = arr.indexOf(item);
  4893. if (index > -1) {
  4894. return arr.splice(index, 1)
  4895. }
  4896. }
  4897. }
  4898. /**
  4899. * Check whether an object has the property.
  4900. */
  4901. var hasOwnProperty = Object.prototype.hasOwnProperty;
  4902. function hasOwn (obj, key) {
  4903. return hasOwnProperty.call(obj, key)
  4904. }
  4905. /**
  4906. * Create a cached version of a pure function.
  4907. */
  4908. function cached (fn) {
  4909. var cache = Object.create(null);
  4910. return (function cachedFn (str) {
  4911. var hit = cache[str];
  4912. return hit || (cache[str] = fn(str))
  4913. })
  4914. }
  4915. /**
  4916. * Camelize a hyphen-delimited string.
  4917. */
  4918. var camelizeRE = /-(\w)/g;
  4919. var camelize = cached(function (str) {
  4920. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  4921. });
  4922. /**
  4923. * Capitalize a string.
  4924. */
  4925. var capitalize = cached(function (str) {
  4926. return str.charAt(0).toUpperCase() + str.slice(1)
  4927. });
  4928. /**
  4929. * Hyphenate a camelCase string.
  4930. */
  4931. var hyphenateRE = /\B([A-Z])/g;
  4932. var hyphenate = cached(function (str) {
  4933. return str.replace(hyphenateRE, '-$1').toLowerCase()
  4934. });
  4935. /**
  4936. * Simple bind polyfill for environments that do not support it,
  4937. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  4938. * since native bind is now performant enough in most browsers.
  4939. * But removing it would mean breaking code that was able to run in
  4940. * PhantomJS 1.x, so this must be kept for backward compatibility.
  4941. */
  4942. /* istanbul ignore next */
  4943. function polyfillBind (fn, ctx) {
  4944. function boundFn (a) {
  4945. var l = arguments.length;
  4946. return l
  4947. ? l > 1
  4948. ? fn.apply(ctx, arguments)
  4949. : fn.call(ctx, a)
  4950. : fn.call(ctx)
  4951. }
  4952. boundFn._length = fn.length;
  4953. return boundFn
  4954. }
  4955. function nativeBind (fn, ctx) {
  4956. return fn.bind(ctx)
  4957. }
  4958. var bind = Function.prototype.bind
  4959. ? nativeBind
  4960. : polyfillBind;
  4961. /**
  4962. * Convert an Array-like object to a real Array.
  4963. */
  4964. function toArray (list, start) {
  4965. start = start || 0;
  4966. var i = list.length - start;
  4967. var ret = new Array(i);
  4968. while (i--) {
  4969. ret[i] = list[i + start];
  4970. }
  4971. return ret
  4972. }
  4973. /**
  4974. * Mix properties into target object.
  4975. */
  4976. function extend (to, _from) {
  4977. for (var key in _from) {
  4978. to[key] = _from[key];
  4979. }
  4980. return to
  4981. }
  4982. /**
  4983. * Merge an Array of Objects into a single Object.
  4984. */
  4985. function toObject (arr) {
  4986. var res = {};
  4987. for (var i = 0; i < arr.length; i++) {
  4988. if (arr[i]) {
  4989. extend(res, arr[i]);
  4990. }
  4991. }
  4992. return res
  4993. }
  4994. /* eslint-disable no-unused-vars */
  4995. /**
  4996. * Perform no operation.
  4997. * Stubbing args to make Flow happy without leaving useless transpiled code
  4998. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  4999. */
  5000. function noop (a, b, c) {}
  5001. /**
  5002. * Always return false.
  5003. */
  5004. var no = function (a, b, c) { return false; };
  5005. /* eslint-enable no-unused-vars */
  5006. /**
  5007. * Return the same value.
  5008. */
  5009. var identity = function (_) { return _; };
  5010. /**
  5011. * Check if two values are loosely equal - that is,
  5012. * if they are plain objects, do they have the same shape?
  5013. */
  5014. function looseEqual (a, b) {
  5015. if (a === b) { return true }
  5016. var isObjectA = isObject(a);
  5017. var isObjectB = isObject(b);
  5018. if (isObjectA && isObjectB) {
  5019. try {
  5020. var isArrayA = Array.isArray(a);
  5021. var isArrayB = Array.isArray(b);
  5022. if (isArrayA && isArrayB) {
  5023. return a.length === b.length && a.every(function (e, i) {
  5024. return looseEqual(e, b[i])
  5025. })
  5026. } else if (a instanceof Date && b instanceof Date) {
  5027. return a.getTime() === b.getTime()
  5028. } else if (!isArrayA && !isArrayB) {
  5029. var keysA = Object.keys(a);
  5030. var keysB = Object.keys(b);
  5031. return keysA.length === keysB.length && keysA.every(function (key) {
  5032. return looseEqual(a[key], b[key])
  5033. })
  5034. } else {
  5035. /* istanbul ignore next */
  5036. return false
  5037. }
  5038. } catch (e) {
  5039. /* istanbul ignore next */
  5040. return false
  5041. }
  5042. } else if (!isObjectA && !isObjectB) {
  5043. return String(a) === String(b)
  5044. } else {
  5045. return false
  5046. }
  5047. }
  5048. /**
  5049. * Return the first index at which a loosely equal value can be
  5050. * found in the array (if value is a plain object, the array must
  5051. * contain an object of the same shape), or -1 if it is not present.
  5052. */
  5053. function looseIndexOf (arr, val) {
  5054. for (var i = 0; i < arr.length; i++) {
  5055. if (looseEqual(arr[i], val)) { return i }
  5056. }
  5057. return -1
  5058. }
  5059. /**
  5060. * Ensure a function is called only once.
  5061. */
  5062. function once (fn) {
  5063. var called = false;
  5064. return function () {
  5065. if (!called) {
  5066. called = true;
  5067. fn.apply(this, arguments);
  5068. }
  5069. }
  5070. }
  5071. var ASSET_TYPES = [
  5072. 'component',
  5073. 'directive',
  5074. 'filter'
  5075. ];
  5076. var LIFECYCLE_HOOKS = [
  5077. 'beforeCreate',
  5078. 'created',
  5079. 'beforeMount',
  5080. 'mounted',
  5081. 'beforeUpdate',
  5082. 'updated',
  5083. 'beforeDestroy',
  5084. 'destroyed',
  5085. 'activated',
  5086. 'deactivated',
  5087. 'errorCaptured',
  5088. 'serverPrefetch'
  5089. ];
  5090. /* */
  5091. var config = ({
  5092. /**
  5093. * Option merge strategies (used in core/util/options)
  5094. */
  5095. // $flow-disable-line
  5096. optionMergeStrategies: Object.create(null),
  5097. /**
  5098. * Whether to suppress warnings.
  5099. */
  5100. silent: false,
  5101. /**
  5102. * Show production mode tip message on boot?
  5103. */
  5104. productionTip: "development" !== 'production',
  5105. /**
  5106. * Whether to enable devtools
  5107. */
  5108. devtools: "development" !== 'production',
  5109. /**
  5110. * Whether to record perf
  5111. */
  5112. performance: false,
  5113. /**
  5114. * Error handler for watcher errors
  5115. */
  5116. errorHandler: null,
  5117. /**
  5118. * Warn handler for watcher warns
  5119. */
  5120. warnHandler: null,
  5121. /**
  5122. * Ignore certain custom elements
  5123. */
  5124. ignoredElements: [],
  5125. /**
  5126. * Custom user key aliases for v-on
  5127. */
  5128. // $flow-disable-line
  5129. keyCodes: Object.create(null),
  5130. /**
  5131. * Check if a tag is reserved so that it cannot be registered as a
  5132. * component. This is platform-dependent and may be overwritten.
  5133. */
  5134. isReservedTag: no,
  5135. /**
  5136. * Check if an attribute is reserved so that it cannot be used as a component
  5137. * prop. This is platform-dependent and may be overwritten.
  5138. */
  5139. isReservedAttr: no,
  5140. /**
  5141. * Check if a tag is an unknown element.
  5142. * Platform-dependent.
  5143. */
  5144. isUnknownElement: no,
  5145. /**
  5146. * Get the namespace of an element
  5147. */
  5148. getTagNamespace: noop,
  5149. /**
  5150. * Parse the real tag name for the specific platform.
  5151. */
  5152. parsePlatformTagName: identity,
  5153. /**
  5154. * Check if an attribute must be bound using property, e.g. value
  5155. * Platform-dependent.
  5156. */
  5157. mustUseProp: no,
  5158. /**
  5159. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  5160. * This will significantly reduce performance if set to false.
  5161. */
  5162. async: true,
  5163. /**
  5164. * Exposed for legacy reasons
  5165. */
  5166. _lifecycleHooks: LIFECYCLE_HOOKS
  5167. });
  5168. /* */
  5169. /**
  5170. * unicode letters used for parsing html tags, component names and property paths.
  5171. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  5172. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  5173. */
  5174. 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/;
  5175. /**
  5176. * Check if a string starts with $ or _
  5177. */
  5178. function isReserved (str) {
  5179. var c = (str + '').charCodeAt(0);
  5180. return c === 0x24 || c === 0x5F
  5181. }
  5182. /**
  5183. * Define a property.
  5184. */
  5185. function def (obj, key, val, enumerable) {
  5186. Object.defineProperty(obj, key, {
  5187. value: val,
  5188. enumerable: !!enumerable,
  5189. writable: true,
  5190. configurable: true
  5191. });
  5192. }
  5193. /**
  5194. * Parse simple path.
  5195. */
  5196. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  5197. function parsePath (path) {
  5198. if (bailRE.test(path)) {
  5199. return
  5200. }
  5201. var segments = path.split('.');
  5202. return function (obj) {
  5203. for (var i = 0; i < segments.length; i++) {
  5204. if (!obj) { return }
  5205. obj = obj[segments[i]];
  5206. }
  5207. return obj
  5208. }
  5209. }
  5210. /* */
  5211. // can we use __proto__?
  5212. var hasProto = '__proto__' in {};
  5213. // Browser environment sniffing
  5214. var inBrowser = typeof window !== 'undefined';
  5215. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  5216. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  5217. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  5218. var isIE = UA && /msie|trident/.test(UA);
  5219. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  5220. var isEdge = UA && UA.indexOf('edge/') > 0;
  5221. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  5222. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  5223. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  5224. var isPhantomJS = UA && /phantomjs/.test(UA);
  5225. var isFF = UA && UA.match(/firefox\/(\d+)/);
  5226. // Firefox has a "watch" function on Object.prototype...
  5227. var nativeWatch = ({}).watch;
  5228. if (inBrowser) {
  5229. try {
  5230. var opts = {};
  5231. Object.defineProperty(opts, 'passive', ({
  5232. get: function get () {
  5233. }
  5234. })); // https://github.com/facebook/flow/issues/285
  5235. window.addEventListener('test-passive', null, opts);
  5236. } catch (e) {}
  5237. }
  5238. // this needs to be lazy-evaled because vue may be required before
  5239. // vue-server-renderer can set VUE_ENV
  5240. var _isServer;
  5241. var isServerRendering = function () {
  5242. if (_isServer === undefined) {
  5243. /* istanbul ignore if */
  5244. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  5245. // detect presence of vue-server-renderer and avoid
  5246. // Webpack shimming the process
  5247. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  5248. } else {
  5249. _isServer = false;
  5250. }
  5251. }
  5252. return _isServer
  5253. };
  5254. // detect devtools
  5255. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  5256. /* istanbul ignore next */
  5257. function isNative (Ctor) {
  5258. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  5259. }
  5260. var hasSymbol =
  5261. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  5262. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  5263. var _Set;
  5264. /* istanbul ignore if */ // $flow-disable-line
  5265. if (typeof Set !== 'undefined' && isNative(Set)) {
  5266. // use native Set when available.
  5267. _Set = Set;
  5268. } else {
  5269. // a non-standard Set polyfill that only works with primitive keys.
  5270. _Set = /*@__PURE__*/(function () {
  5271. function Set () {
  5272. this.set = Object.create(null);
  5273. }
  5274. Set.prototype.has = function has (key) {
  5275. return this.set[key] === true
  5276. };
  5277. Set.prototype.add = function add (key) {
  5278. this.set[key] = true;
  5279. };
  5280. Set.prototype.clear = function clear () {
  5281. this.set = Object.create(null);
  5282. };
  5283. return Set;
  5284. }());
  5285. }
  5286. /* */
  5287. var warn = noop;
  5288. var tip = noop;
  5289. var generateComponentTrace = (noop); // work around flow check
  5290. var formatComponentName = (noop);
  5291. if (true) {
  5292. var hasConsole = typeof console !== 'undefined';
  5293. var classifyRE = /(?:^|[-_])(\w)/g;
  5294. var classify = function (str) { return str
  5295. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  5296. .replace(/[-_]/g, ''); };
  5297. warn = function (msg, vm) {
  5298. var trace = vm ? generateComponentTrace(vm) : '';
  5299. if (config.warnHandler) {
  5300. config.warnHandler.call(null, msg, vm, trace);
  5301. } else if (hasConsole && (!config.silent)) {
  5302. console.error(("[Vue warn]: " + msg + trace));
  5303. }
  5304. };
  5305. tip = function (msg, vm) {
  5306. if (hasConsole && (!config.silent)) {
  5307. console.warn("[Vue tip]: " + msg + (
  5308. vm ? generateComponentTrace(vm) : ''
  5309. ));
  5310. }
  5311. };
  5312. formatComponentName = function (vm, includeFile) {
  5313. if (vm.$root === vm) {
  5314. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  5315. return ('') + vm.$options.__file
  5316. }
  5317. return '<Root>'
  5318. }
  5319. var options = typeof vm === 'function' && vm.cid != null
  5320. ? vm.options
  5321. : vm._isVue
  5322. ? vm.$options || vm.constructor.options
  5323. : vm;
  5324. var name = options.name || options._componentTag;
  5325. var file = options.__file;
  5326. if (!name && file) {
  5327. var match = file.match(/([^/\\]+)\.vue$/);
  5328. name = match && match[1];
  5329. }
  5330. return (
  5331. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  5332. (file && includeFile !== false ? (" at " + file) : '')
  5333. )
  5334. };
  5335. var repeat = function (str, n) {
  5336. var res = '';
  5337. while (n) {
  5338. if (n % 2 === 1) { res += str; }
  5339. if (n > 1) { str += str; }
  5340. n >>= 1;
  5341. }
  5342. return res
  5343. };
  5344. generateComponentTrace = function (vm) {
  5345. if (vm._isVue && vm.$parent) {
  5346. var tree = [];
  5347. var currentRecursiveSequence = 0;
  5348. while (vm && vm.$options.name !== 'PageBody') {
  5349. if (tree.length > 0) {
  5350. var last = tree[tree.length - 1];
  5351. if (last.constructor === vm.constructor) {
  5352. currentRecursiveSequence++;
  5353. vm = vm.$parent;
  5354. continue
  5355. } else if (currentRecursiveSequence > 0) {
  5356. tree[tree.length - 1] = [last, currentRecursiveSequence];
  5357. currentRecursiveSequence = 0;
  5358. }
  5359. }
  5360. !vm.$options.isReserved && tree.push(vm);
  5361. vm = vm.$parent;
  5362. }
  5363. return '\n\nfound in\n\n' + tree
  5364. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  5365. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  5366. : formatComponentName(vm))); })
  5367. .join('\n')
  5368. } else {
  5369. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  5370. }
  5371. };
  5372. }
  5373. /* */
  5374. var uid = 0;
  5375. /**
  5376. * A dep is an observable that can have multiple
  5377. * directives subscribing to it.
  5378. */
  5379. var Dep = function Dep () {
  5380. this.id = uid++;
  5381. this.subs = [];
  5382. };
  5383. Dep.prototype.addSub = function addSub (sub) {
  5384. this.subs.push(sub);
  5385. };
  5386. Dep.prototype.removeSub = function removeSub (sub) {
  5387. remove(this.subs, sub);
  5388. };
  5389. Dep.prototype.depend = function depend () {
  5390. if (Dep.SharedObject.target) {
  5391. Dep.SharedObject.target.addDep(this);
  5392. }
  5393. };
  5394. Dep.prototype.notify = function notify () {
  5395. // stabilize the subscriber list first
  5396. var subs = this.subs.slice();
  5397. if ( true && !config.async) {
  5398. // subs aren't sorted in scheduler if not running async
  5399. // we need to sort them now to make sure they fire in correct
  5400. // order
  5401. subs.sort(function (a, b) { return a.id - b.id; });
  5402. }
  5403. for (var i = 0, l = subs.length; i < l; i++) {
  5404. subs[i].update();
  5405. }
  5406. };
  5407. // The current target watcher being evaluated.
  5408. // This is globally unique because only one watcher
  5409. // can be evaluated at a time.
  5410. // fixed by xxxxxx (nvue shared vuex)
  5411. /* eslint-disable no-undef */
  5412. Dep.SharedObject = {};
  5413. Dep.SharedObject.target = null;
  5414. Dep.SharedObject.targetStack = [];
  5415. function pushTarget (target) {
  5416. Dep.SharedObject.targetStack.push(target);
  5417. Dep.SharedObject.target = target;
  5418. Dep.target = target;
  5419. }
  5420. function popTarget () {
  5421. Dep.SharedObject.targetStack.pop();
  5422. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  5423. Dep.target = Dep.SharedObject.target;
  5424. }
  5425. /* */
  5426. var VNode = function VNode (
  5427. tag,
  5428. data,
  5429. children,
  5430. text,
  5431. elm,
  5432. context,
  5433. componentOptions,
  5434. asyncFactory
  5435. ) {
  5436. this.tag = tag;
  5437. this.data = data;
  5438. this.children = children;
  5439. this.text = text;
  5440. this.elm = elm;
  5441. this.ns = undefined;
  5442. this.context = context;
  5443. this.fnContext = undefined;
  5444. this.fnOptions = undefined;
  5445. this.fnScopeId = undefined;
  5446. this.key = data && data.key;
  5447. this.componentOptions = componentOptions;
  5448. this.componentInstance = undefined;
  5449. this.parent = undefined;
  5450. this.raw = false;
  5451. this.isStatic = false;
  5452. this.isRootInsert = true;
  5453. this.isComment = false;
  5454. this.isCloned = false;
  5455. this.isOnce = false;
  5456. this.asyncFactory = asyncFactory;
  5457. this.asyncMeta = undefined;
  5458. this.isAsyncPlaceholder = false;
  5459. };
  5460. var prototypeAccessors = { child: { configurable: true } };
  5461. // DEPRECATED: alias for componentInstance for backwards compat.
  5462. /* istanbul ignore next */
  5463. prototypeAccessors.child.get = function () {
  5464. return this.componentInstance
  5465. };
  5466. Object.defineProperties( VNode.prototype, prototypeAccessors );
  5467. var createEmptyVNode = function (text) {
  5468. if ( text === void 0 ) text = '';
  5469. var node = new VNode();
  5470. node.text = text;
  5471. node.isComment = true;
  5472. return node
  5473. };
  5474. function createTextVNode (val) {
  5475. return new VNode(undefined, undefined, undefined, String(val))
  5476. }
  5477. // optimized shallow clone
  5478. // used for static nodes and slot nodes because they may be reused across
  5479. // multiple renders, cloning them avoids errors when DOM manipulations rely
  5480. // on their elm reference.
  5481. function cloneVNode (vnode) {
  5482. var cloned = new VNode(
  5483. vnode.tag,
  5484. vnode.data,
  5485. // #7975
  5486. // clone children array to avoid mutating original in case of cloning
  5487. // a child.
  5488. vnode.children && vnode.children.slice(),
  5489. vnode.text,
  5490. vnode.elm,
  5491. vnode.context,
  5492. vnode.componentOptions,
  5493. vnode.asyncFactory
  5494. );
  5495. cloned.ns = vnode.ns;
  5496. cloned.isStatic = vnode.isStatic;
  5497. cloned.key = vnode.key;
  5498. cloned.isComment = vnode.isComment;
  5499. cloned.fnContext = vnode.fnContext;
  5500. cloned.fnOptions = vnode.fnOptions;
  5501. cloned.fnScopeId = vnode.fnScopeId;
  5502. cloned.asyncMeta = vnode.asyncMeta;
  5503. cloned.isCloned = true;
  5504. return cloned
  5505. }
  5506. /*
  5507. * not type checking this file because flow doesn't play well with
  5508. * dynamically accessing methods on Array prototype
  5509. */
  5510. var arrayProto = Array.prototype;
  5511. var arrayMethods = Object.create(arrayProto);
  5512. var methodsToPatch = [
  5513. 'push',
  5514. 'pop',
  5515. 'shift',
  5516. 'unshift',
  5517. 'splice',
  5518. 'sort',
  5519. 'reverse'
  5520. ];
  5521. /**
  5522. * Intercept mutating methods and emit events
  5523. */
  5524. methodsToPatch.forEach(function (method) {
  5525. // cache original method
  5526. var original = arrayProto[method];
  5527. def(arrayMethods, method, function mutator () {
  5528. var args = [], len = arguments.length;
  5529. while ( len-- ) args[ len ] = arguments[ len ];
  5530. var result = original.apply(this, args);
  5531. var ob = this.__ob__;
  5532. var inserted;
  5533. switch (method) {
  5534. case 'push':
  5535. case 'unshift':
  5536. inserted = args;
  5537. break
  5538. case 'splice':
  5539. inserted = args.slice(2);
  5540. break
  5541. }
  5542. if (inserted) { ob.observeArray(inserted); }
  5543. // notify change
  5544. ob.dep.notify();
  5545. return result
  5546. });
  5547. });
  5548. /* */
  5549. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  5550. /**
  5551. * In some cases we may want to disable observation inside a component's
  5552. * update computation.
  5553. */
  5554. var shouldObserve = true;
  5555. function toggleObserving (value) {
  5556. shouldObserve = value;
  5557. }
  5558. /**
  5559. * Observer class that is attached to each observed
  5560. * object. Once attached, the observer converts the target
  5561. * object's property keys into getter/setters that
  5562. * collect dependencies and dispatch updates.
  5563. */
  5564. var Observer = function Observer (value) {
  5565. this.value = value;
  5566. this.dep = new Dep();
  5567. this.vmCount = 0;
  5568. def(value, '__ob__', this);
  5569. if (Array.isArray(value)) {
  5570. if (hasProto) {
  5571. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  5572. if(value.push !== value.__proto__.push){
  5573. copyAugment(value, arrayMethods, arrayKeys);
  5574. } else {
  5575. protoAugment(value, arrayMethods);
  5576. }
  5577. }
  5578. } else {
  5579. copyAugment(value, arrayMethods, arrayKeys);
  5580. }
  5581. this.observeArray(value);
  5582. } else {
  5583. this.walk(value);
  5584. }
  5585. };
  5586. /**
  5587. * Walk through all properties and convert them into
  5588. * getter/setters. This method should only be called when
  5589. * value type is Object.
  5590. */
  5591. Observer.prototype.walk = function walk (obj) {
  5592. var keys = Object.keys(obj);
  5593. for (var i = 0; i < keys.length; i++) {
  5594. defineReactive$$1(obj, keys[i]);
  5595. }
  5596. };
  5597. /**
  5598. * Observe a list of Array items.
  5599. */
  5600. Observer.prototype.observeArray = function observeArray (items) {
  5601. for (var i = 0, l = items.length; i < l; i++) {
  5602. observe(items[i]);
  5603. }
  5604. };
  5605. // helpers
  5606. /**
  5607. * Augment a target Object or Array by intercepting
  5608. * the prototype chain using __proto__
  5609. */
  5610. function protoAugment (target, src) {
  5611. /* eslint-disable no-proto */
  5612. target.__proto__ = src;
  5613. /* eslint-enable no-proto */
  5614. }
  5615. /**
  5616. * Augment a target Object or Array by defining
  5617. * hidden properties.
  5618. */
  5619. /* istanbul ignore next */
  5620. function copyAugment (target, src, keys) {
  5621. for (var i = 0, l = keys.length; i < l; i++) {
  5622. var key = keys[i];
  5623. def(target, key, src[key]);
  5624. }
  5625. }
  5626. /**
  5627. * Attempt to create an observer instance for a value,
  5628. * returns the new observer if successfully observed,
  5629. * or the existing observer if the value already has one.
  5630. */
  5631. function observe (value, asRootData) {
  5632. if (!isObject(value) || value instanceof VNode) {
  5633. return
  5634. }
  5635. var ob;
  5636. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  5637. ob = value.__ob__;
  5638. } else if (
  5639. shouldObserve &&
  5640. !isServerRendering() &&
  5641. (Array.isArray(value) || isPlainObject(value)) &&
  5642. Object.isExtensible(value) &&
  5643. !value._isVue &&
  5644. !value.__v_isMPComponent
  5645. ) {
  5646. ob = new Observer(value);
  5647. }
  5648. if (asRootData && ob) {
  5649. ob.vmCount++;
  5650. }
  5651. return ob
  5652. }
  5653. /**
  5654. * Define a reactive property on an Object.
  5655. */
  5656. function defineReactive$$1 (
  5657. obj,
  5658. key,
  5659. val,
  5660. customSetter,
  5661. shallow
  5662. ) {
  5663. var dep = new Dep();
  5664. var property = Object.getOwnPropertyDescriptor(obj, key);
  5665. if (property && property.configurable === false) {
  5666. return
  5667. }
  5668. // cater for pre-defined getter/setters
  5669. var getter = property && property.get;
  5670. var setter = property && property.set;
  5671. if ((!getter || setter) && arguments.length === 2) {
  5672. val = obj[key];
  5673. }
  5674. var childOb = !shallow && observe(val);
  5675. Object.defineProperty(obj, key, {
  5676. enumerable: true,
  5677. configurable: true,
  5678. get: function reactiveGetter () {
  5679. var value = getter ? getter.call(obj) : val;
  5680. if (Dep.SharedObject.target) { // fixed by xxxxxx
  5681. dep.depend();
  5682. if (childOb) {
  5683. childOb.dep.depend();
  5684. if (Array.isArray(value)) {
  5685. dependArray(value);
  5686. }
  5687. }
  5688. }
  5689. return value
  5690. },
  5691. set: function reactiveSetter (newVal) {
  5692. var value = getter ? getter.call(obj) : val;
  5693. /* eslint-disable no-self-compare */
  5694. if (newVal === value || (newVal !== newVal && value !== value)) {
  5695. return
  5696. }
  5697. /* eslint-enable no-self-compare */
  5698. if ( true && customSetter) {
  5699. customSetter();
  5700. }
  5701. // #7981: for accessor properties without setter
  5702. if (getter && !setter) { return }
  5703. if (setter) {
  5704. setter.call(obj, newVal);
  5705. } else {
  5706. val = newVal;
  5707. }
  5708. childOb = !shallow && observe(newVal);
  5709. dep.notify();
  5710. }
  5711. });
  5712. }
  5713. /**
  5714. * Set a property on an object. Adds the new property and
  5715. * triggers change notification if the property doesn't
  5716. * already exist.
  5717. */
  5718. function set (target, key, val) {
  5719. if ( true &&
  5720. (isUndef(target) || isPrimitive(target))
  5721. ) {
  5722. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  5723. }
  5724. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5725. target.length = Math.max(target.length, key);
  5726. target.splice(key, 1, val);
  5727. return val
  5728. }
  5729. if (key in target && !(key in Object.prototype)) {
  5730. target[key] = val;
  5731. return val
  5732. }
  5733. var ob = (target).__ob__;
  5734. if (target._isVue || (ob && ob.vmCount)) {
  5735. true && warn(
  5736. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  5737. 'at runtime - declare it upfront in the data option.'
  5738. );
  5739. return val
  5740. }
  5741. if (!ob) {
  5742. target[key] = val;
  5743. return val
  5744. }
  5745. defineReactive$$1(ob.value, key, val);
  5746. ob.dep.notify();
  5747. return val
  5748. }
  5749. /**
  5750. * Delete a property and trigger change if necessary.
  5751. */
  5752. function del (target, key) {
  5753. if ( true &&
  5754. (isUndef(target) || isPrimitive(target))
  5755. ) {
  5756. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  5757. }
  5758. if (Array.isArray(target) && isValidArrayIndex(key)) {
  5759. target.splice(key, 1);
  5760. return
  5761. }
  5762. var ob = (target).__ob__;
  5763. if (target._isVue || (ob && ob.vmCount)) {
  5764. true && warn(
  5765. 'Avoid deleting properties on a Vue instance or its root $data ' +
  5766. '- just set it to null.'
  5767. );
  5768. return
  5769. }
  5770. if (!hasOwn(target, key)) {
  5771. return
  5772. }
  5773. delete target[key];
  5774. if (!ob) {
  5775. return
  5776. }
  5777. ob.dep.notify();
  5778. }
  5779. /**
  5780. * Collect dependencies on array elements when the array is touched, since
  5781. * we cannot intercept array element access like property getters.
  5782. */
  5783. function dependArray (value) {
  5784. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  5785. e = value[i];
  5786. e && e.__ob__ && e.__ob__.dep.depend();
  5787. if (Array.isArray(e)) {
  5788. dependArray(e);
  5789. }
  5790. }
  5791. }
  5792. /* */
  5793. /**
  5794. * Option overwriting strategies are functions that handle
  5795. * how to merge a parent option value and a child option
  5796. * value into the final value.
  5797. */
  5798. var strats = config.optionMergeStrategies;
  5799. /**
  5800. * Options with restrictions
  5801. */
  5802. if (true) {
  5803. strats.el = strats.propsData = function (parent, child, vm, key) {
  5804. if (!vm) {
  5805. warn(
  5806. "option \"" + key + "\" can only be used during instance " +
  5807. 'creation with the `new` keyword.'
  5808. );
  5809. }
  5810. return defaultStrat(parent, child)
  5811. };
  5812. }
  5813. /**
  5814. * Helper that recursively merges two data objects together.
  5815. */
  5816. function mergeData (to, from) {
  5817. if (!from) { return to }
  5818. var key, toVal, fromVal;
  5819. var keys = hasSymbol
  5820. ? Reflect.ownKeys(from)
  5821. : Object.keys(from);
  5822. for (var i = 0; i < keys.length; i++) {
  5823. key = keys[i];
  5824. // in case the object is already observed...
  5825. if (key === '__ob__') { continue }
  5826. toVal = to[key];
  5827. fromVal = from[key];
  5828. if (!hasOwn(to, key)) {
  5829. set(to, key, fromVal);
  5830. } else if (
  5831. toVal !== fromVal &&
  5832. isPlainObject(toVal) &&
  5833. isPlainObject(fromVal)
  5834. ) {
  5835. mergeData(toVal, fromVal);
  5836. }
  5837. }
  5838. return to
  5839. }
  5840. /**
  5841. * Data
  5842. */
  5843. function mergeDataOrFn (
  5844. parentVal,
  5845. childVal,
  5846. vm
  5847. ) {
  5848. if (!vm) {
  5849. // in a Vue.extend merge, both should be functions
  5850. if (!childVal) {
  5851. return parentVal
  5852. }
  5853. if (!parentVal) {
  5854. return childVal
  5855. }
  5856. // when parentVal & childVal are both present,
  5857. // we need to return a function that returns the
  5858. // merged result of both functions... no need to
  5859. // check if parentVal is a function here because
  5860. // it has to be a function to pass previous merges.
  5861. return function mergedDataFn () {
  5862. return mergeData(
  5863. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  5864. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  5865. )
  5866. }
  5867. } else {
  5868. return function mergedInstanceDataFn () {
  5869. // instance merge
  5870. var instanceData = typeof childVal === 'function'
  5871. ? childVal.call(vm, vm)
  5872. : childVal;
  5873. var defaultData = typeof parentVal === 'function'
  5874. ? parentVal.call(vm, vm)
  5875. : parentVal;
  5876. if (instanceData) {
  5877. return mergeData(instanceData, defaultData)
  5878. } else {
  5879. return defaultData
  5880. }
  5881. }
  5882. }
  5883. }
  5884. strats.data = function (
  5885. parentVal,
  5886. childVal,
  5887. vm
  5888. ) {
  5889. if (!vm) {
  5890. if (childVal && typeof childVal !== 'function') {
  5891. true && warn(
  5892. 'The "data" option should be a function ' +
  5893. 'that returns a per-instance value in component ' +
  5894. 'definitions.',
  5895. vm
  5896. );
  5897. return parentVal
  5898. }
  5899. return mergeDataOrFn(parentVal, childVal)
  5900. }
  5901. return mergeDataOrFn(parentVal, childVal, vm)
  5902. };
  5903. /**
  5904. * Hooks and props are merged as arrays.
  5905. */
  5906. function mergeHook (
  5907. parentVal,
  5908. childVal
  5909. ) {
  5910. var res = childVal
  5911. ? parentVal
  5912. ? parentVal.concat(childVal)
  5913. : Array.isArray(childVal)
  5914. ? childVal
  5915. : [childVal]
  5916. : parentVal;
  5917. return res
  5918. ? dedupeHooks(res)
  5919. : res
  5920. }
  5921. function dedupeHooks (hooks) {
  5922. var res = [];
  5923. for (var i = 0; i < hooks.length; i++) {
  5924. if (res.indexOf(hooks[i]) === -1) {
  5925. res.push(hooks[i]);
  5926. }
  5927. }
  5928. return res
  5929. }
  5930. LIFECYCLE_HOOKS.forEach(function (hook) {
  5931. strats[hook] = mergeHook;
  5932. });
  5933. /**
  5934. * Assets
  5935. *
  5936. * When a vm is present (instance creation), we need to do
  5937. * a three-way merge between constructor options, instance
  5938. * options and parent options.
  5939. */
  5940. function mergeAssets (
  5941. parentVal,
  5942. childVal,
  5943. vm,
  5944. key
  5945. ) {
  5946. var res = Object.create(parentVal || null);
  5947. if (childVal) {
  5948. true && assertObjectType(key, childVal, vm);
  5949. return extend(res, childVal)
  5950. } else {
  5951. return res
  5952. }
  5953. }
  5954. ASSET_TYPES.forEach(function (type) {
  5955. strats[type + 's'] = mergeAssets;
  5956. });
  5957. /**
  5958. * Watchers.
  5959. *
  5960. * Watchers hashes should not overwrite one
  5961. * another, so we merge them as arrays.
  5962. */
  5963. strats.watch = function (
  5964. parentVal,
  5965. childVal,
  5966. vm,
  5967. key
  5968. ) {
  5969. // work around Firefox's Object.prototype.watch...
  5970. if (parentVal === nativeWatch) { parentVal = undefined; }
  5971. if (childVal === nativeWatch) { childVal = undefined; }
  5972. /* istanbul ignore if */
  5973. if (!childVal) { return Object.create(parentVal || null) }
  5974. if (true) {
  5975. assertObjectType(key, childVal, vm);
  5976. }
  5977. if (!parentVal) { return childVal }
  5978. var ret = {};
  5979. extend(ret, parentVal);
  5980. for (var key$1 in childVal) {
  5981. var parent = ret[key$1];
  5982. var child = childVal[key$1];
  5983. if (parent && !Array.isArray(parent)) {
  5984. parent = [parent];
  5985. }
  5986. ret[key$1] = parent
  5987. ? parent.concat(child)
  5988. : Array.isArray(child) ? child : [child];
  5989. }
  5990. return ret
  5991. };
  5992. /**
  5993. * Other object hashes.
  5994. */
  5995. strats.props =
  5996. strats.methods =
  5997. strats.inject =
  5998. strats.computed = function (
  5999. parentVal,
  6000. childVal,
  6001. vm,
  6002. key
  6003. ) {
  6004. if (childVal && "development" !== 'production') {
  6005. assertObjectType(key, childVal, vm);
  6006. }
  6007. if (!parentVal) { return childVal }
  6008. var ret = Object.create(null);
  6009. extend(ret, parentVal);
  6010. if (childVal) { extend(ret, childVal); }
  6011. return ret
  6012. };
  6013. strats.provide = mergeDataOrFn;
  6014. /**
  6015. * Default strategy.
  6016. */
  6017. var defaultStrat = function (parentVal, childVal) {
  6018. return childVal === undefined
  6019. ? parentVal
  6020. : childVal
  6021. };
  6022. /**
  6023. * Validate component names
  6024. */
  6025. function checkComponents (options) {
  6026. for (var key in options.components) {
  6027. validateComponentName(key);
  6028. }
  6029. }
  6030. function validateComponentName (name) {
  6031. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  6032. warn(
  6033. 'Invalid component name: "' + name + '". Component names ' +
  6034. 'should conform to valid custom element name in html5 specification.'
  6035. );
  6036. }
  6037. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  6038. warn(
  6039. 'Do not use built-in or reserved HTML elements as component ' +
  6040. 'id: ' + name
  6041. );
  6042. }
  6043. }
  6044. /**
  6045. * Ensure all props option syntax are normalized into the
  6046. * Object-based format.
  6047. */
  6048. function normalizeProps (options, vm) {
  6049. var props = options.props;
  6050. if (!props) { return }
  6051. var res = {};
  6052. var i, val, name;
  6053. if (Array.isArray(props)) {
  6054. i = props.length;
  6055. while (i--) {
  6056. val = props[i];
  6057. if (typeof val === 'string') {
  6058. name = camelize(val);
  6059. res[name] = { type: null };
  6060. } else if (true) {
  6061. warn('props must be strings when using array syntax.');
  6062. }
  6063. }
  6064. } else if (isPlainObject(props)) {
  6065. for (var key in props) {
  6066. val = props[key];
  6067. name = camelize(key);
  6068. res[name] = isPlainObject(val)
  6069. ? val
  6070. : { type: val };
  6071. }
  6072. } else if (true) {
  6073. warn(
  6074. "Invalid value for option \"props\": expected an Array or an Object, " +
  6075. "but got " + (toRawType(props)) + ".",
  6076. vm
  6077. );
  6078. }
  6079. options.props = res;
  6080. }
  6081. /**
  6082. * Normalize all injections into Object-based format
  6083. */
  6084. function normalizeInject (options, vm) {
  6085. var inject = options.inject;
  6086. if (!inject) { return }
  6087. var normalized = options.inject = {};
  6088. if (Array.isArray(inject)) {
  6089. for (var i = 0; i < inject.length; i++) {
  6090. normalized[inject[i]] = { from: inject[i] };
  6091. }
  6092. } else if (isPlainObject(inject)) {
  6093. for (var key in inject) {
  6094. var val = inject[key];
  6095. normalized[key] = isPlainObject(val)
  6096. ? extend({ from: key }, val)
  6097. : { from: val };
  6098. }
  6099. } else if (true) {
  6100. warn(
  6101. "Invalid value for option \"inject\": expected an Array or an Object, " +
  6102. "but got " + (toRawType(inject)) + ".",
  6103. vm
  6104. );
  6105. }
  6106. }
  6107. /**
  6108. * Normalize raw function directives into object format.
  6109. */
  6110. function normalizeDirectives (options) {
  6111. var dirs = options.directives;
  6112. if (dirs) {
  6113. for (var key in dirs) {
  6114. var def$$1 = dirs[key];
  6115. if (typeof def$$1 === 'function') {
  6116. dirs[key] = { bind: def$$1, update: def$$1 };
  6117. }
  6118. }
  6119. }
  6120. }
  6121. function assertObjectType (name, value, vm) {
  6122. if (!isPlainObject(value)) {
  6123. warn(
  6124. "Invalid value for option \"" + name + "\": expected an Object, " +
  6125. "but got " + (toRawType(value)) + ".",
  6126. vm
  6127. );
  6128. }
  6129. }
  6130. /**
  6131. * Merge two option objects into a new one.
  6132. * Core utility used in both instantiation and inheritance.
  6133. */
  6134. function mergeOptions (
  6135. parent,
  6136. child,
  6137. vm
  6138. ) {
  6139. if (true) {
  6140. checkComponents(child);
  6141. }
  6142. if (typeof child === 'function') {
  6143. child = child.options;
  6144. }
  6145. normalizeProps(child, vm);
  6146. normalizeInject(child, vm);
  6147. normalizeDirectives(child);
  6148. // Apply extends and mixins on the child options,
  6149. // but only if it is a raw options object that isn't
  6150. // the result of another mergeOptions call.
  6151. // Only merged options has the _base property.
  6152. if (!child._base) {
  6153. if (child.extends) {
  6154. parent = mergeOptions(parent, child.extends, vm);
  6155. }
  6156. if (child.mixins) {
  6157. for (var i = 0, l = child.mixins.length; i < l; i++) {
  6158. parent = mergeOptions(parent, child.mixins[i], vm);
  6159. }
  6160. }
  6161. }
  6162. var options = {};
  6163. var key;
  6164. for (key in parent) {
  6165. mergeField(key);
  6166. }
  6167. for (key in child) {
  6168. if (!hasOwn(parent, key)) {
  6169. mergeField(key);
  6170. }
  6171. }
  6172. function mergeField (key) {
  6173. var strat = strats[key] || defaultStrat;
  6174. options[key] = strat(parent[key], child[key], vm, key);
  6175. }
  6176. return options
  6177. }
  6178. /**
  6179. * Resolve an asset.
  6180. * This function is used because child instances need access
  6181. * to assets defined in its ancestor chain.
  6182. */
  6183. function resolveAsset (
  6184. options,
  6185. type,
  6186. id,
  6187. warnMissing
  6188. ) {
  6189. /* istanbul ignore if */
  6190. if (typeof id !== 'string') {
  6191. return
  6192. }
  6193. var assets = options[type];
  6194. // check local registration variations first
  6195. if (hasOwn(assets, id)) { return assets[id] }
  6196. var camelizedId = camelize(id);
  6197. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  6198. var PascalCaseId = capitalize(camelizedId);
  6199. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  6200. // fallback to prototype chain
  6201. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  6202. if ( true && warnMissing && !res) {
  6203. warn(
  6204. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  6205. options
  6206. );
  6207. }
  6208. return res
  6209. }
  6210. /* */
  6211. function validateProp (
  6212. key,
  6213. propOptions,
  6214. propsData,
  6215. vm
  6216. ) {
  6217. var prop = propOptions[key];
  6218. var absent = !hasOwn(propsData, key);
  6219. var value = propsData[key];
  6220. // boolean casting
  6221. var booleanIndex = getTypeIndex(Boolean, prop.type);
  6222. if (booleanIndex > -1) {
  6223. if (absent && !hasOwn(prop, 'default')) {
  6224. value = false;
  6225. } else if (value === '' || value === hyphenate(key)) {
  6226. // only cast empty string / same name to boolean if
  6227. // boolean has higher priority
  6228. var stringIndex = getTypeIndex(String, prop.type);
  6229. if (stringIndex < 0 || booleanIndex < stringIndex) {
  6230. value = true;
  6231. }
  6232. }
  6233. }
  6234. // check default value
  6235. if (value === undefined) {
  6236. value = getPropDefaultValue(vm, prop, key);
  6237. // since the default value is a fresh copy,
  6238. // make sure to observe it.
  6239. var prevShouldObserve = shouldObserve;
  6240. toggleObserving(true);
  6241. observe(value);
  6242. toggleObserving(prevShouldObserve);
  6243. }
  6244. if (
  6245. true
  6246. ) {
  6247. assertProp(prop, key, value, vm, absent);
  6248. }
  6249. return value
  6250. }
  6251. /**
  6252. * Get the default value of a prop.
  6253. */
  6254. function getPropDefaultValue (vm, prop, key) {
  6255. // no default, return undefined
  6256. if (!hasOwn(prop, 'default')) {
  6257. return undefined
  6258. }
  6259. var def = prop.default;
  6260. // warn against non-factory defaults for Object & Array
  6261. if ( true && isObject(def)) {
  6262. warn(
  6263. 'Invalid default value for prop "' + key + '": ' +
  6264. 'Props with type Object/Array must use a factory function ' +
  6265. 'to return the default value.',
  6266. vm
  6267. );
  6268. }
  6269. // the raw prop value was also undefined from previous render,
  6270. // return previous default value to avoid unnecessary watcher trigger
  6271. if (vm && vm.$options.propsData &&
  6272. vm.$options.propsData[key] === undefined &&
  6273. vm._props[key] !== undefined
  6274. ) {
  6275. return vm._props[key]
  6276. }
  6277. // call factory function for non-Function types
  6278. // a value is Function if its prototype is function even across different execution context
  6279. return typeof def === 'function' && getType(prop.type) !== 'Function'
  6280. ? def.call(vm)
  6281. : def
  6282. }
  6283. /**
  6284. * Assert whether a prop is valid.
  6285. */
  6286. function assertProp (
  6287. prop,
  6288. name,
  6289. value,
  6290. vm,
  6291. absent
  6292. ) {
  6293. if (prop.required && absent) {
  6294. warn(
  6295. 'Missing required prop: "' + name + '"',
  6296. vm
  6297. );
  6298. return
  6299. }
  6300. if (value == null && !prop.required) {
  6301. return
  6302. }
  6303. var type = prop.type;
  6304. var valid = !type || type === true;
  6305. var expectedTypes = [];
  6306. if (type) {
  6307. if (!Array.isArray(type)) {
  6308. type = [type];
  6309. }
  6310. for (var i = 0; i < type.length && !valid; i++) {
  6311. var assertedType = assertType(value, type[i]);
  6312. expectedTypes.push(assertedType.expectedType || '');
  6313. valid = assertedType.valid;
  6314. }
  6315. }
  6316. if (!valid) {
  6317. warn(
  6318. getInvalidTypeMessage(name, value, expectedTypes),
  6319. vm
  6320. );
  6321. return
  6322. }
  6323. var validator = prop.validator;
  6324. if (validator) {
  6325. if (!validator(value)) {
  6326. warn(
  6327. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  6328. vm
  6329. );
  6330. }
  6331. }
  6332. }
  6333. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  6334. function assertType (value, type) {
  6335. var valid;
  6336. var expectedType = getType(type);
  6337. if (simpleCheckRE.test(expectedType)) {
  6338. var t = typeof value;
  6339. valid = t === expectedType.toLowerCase();
  6340. // for primitive wrapper objects
  6341. if (!valid && t === 'object') {
  6342. valid = value instanceof type;
  6343. }
  6344. } else if (expectedType === 'Object') {
  6345. valid = isPlainObject(value);
  6346. } else if (expectedType === 'Array') {
  6347. valid = Array.isArray(value);
  6348. } else {
  6349. valid = value instanceof type;
  6350. }
  6351. return {
  6352. valid: valid,
  6353. expectedType: expectedType
  6354. }
  6355. }
  6356. /**
  6357. * Use function string name to check built-in types,
  6358. * because a simple equality check will fail when running
  6359. * across different vms / iframes.
  6360. */
  6361. function getType (fn) {
  6362. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  6363. return match ? match[1] : ''
  6364. }
  6365. function isSameType (a, b) {
  6366. return getType(a) === getType(b)
  6367. }
  6368. function getTypeIndex (type, expectedTypes) {
  6369. if (!Array.isArray(expectedTypes)) {
  6370. return isSameType(expectedTypes, type) ? 0 : -1
  6371. }
  6372. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  6373. if (isSameType(expectedTypes[i], type)) {
  6374. return i
  6375. }
  6376. }
  6377. return -1
  6378. }
  6379. function getInvalidTypeMessage (name, value, expectedTypes) {
  6380. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  6381. " Expected " + (expectedTypes.map(capitalize).join(', '));
  6382. var expectedType = expectedTypes[0];
  6383. var receivedType = toRawType(value);
  6384. var expectedValue = styleValue(value, expectedType);
  6385. var receivedValue = styleValue(value, receivedType);
  6386. // check if we need to specify expected value
  6387. if (expectedTypes.length === 1 &&
  6388. isExplicable(expectedType) &&
  6389. !isBoolean(expectedType, receivedType)) {
  6390. message += " with value " + expectedValue;
  6391. }
  6392. message += ", got " + receivedType + " ";
  6393. // check if we need to specify received value
  6394. if (isExplicable(receivedType)) {
  6395. message += "with value " + receivedValue + ".";
  6396. }
  6397. return message
  6398. }
  6399. function styleValue (value, type) {
  6400. if (type === 'String') {
  6401. return ("\"" + value + "\"")
  6402. } else if (type === 'Number') {
  6403. return ("" + (Number(value)))
  6404. } else {
  6405. return ("" + value)
  6406. }
  6407. }
  6408. function isExplicable (value) {
  6409. var explicitTypes = ['string', 'number', 'boolean'];
  6410. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  6411. }
  6412. function isBoolean () {
  6413. var args = [], len = arguments.length;
  6414. while ( len-- ) args[ len ] = arguments[ len ];
  6415. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  6416. }
  6417. /* */
  6418. function handleError (err, vm, info) {
  6419. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  6420. // See: https://github.com/vuejs/vuex/issues/1505
  6421. pushTarget();
  6422. try {
  6423. if (vm) {
  6424. var cur = vm;
  6425. while ((cur = cur.$parent)) {
  6426. var hooks = cur.$options.errorCaptured;
  6427. if (hooks) {
  6428. for (var i = 0; i < hooks.length; i++) {
  6429. try {
  6430. var capture = hooks[i].call(cur, err, vm, info) === false;
  6431. if (capture) { return }
  6432. } catch (e) {
  6433. globalHandleError(e, cur, 'errorCaptured hook');
  6434. }
  6435. }
  6436. }
  6437. }
  6438. }
  6439. globalHandleError(err, vm, info);
  6440. } finally {
  6441. popTarget();
  6442. }
  6443. }
  6444. function invokeWithErrorHandling (
  6445. handler,
  6446. context,
  6447. args,
  6448. vm,
  6449. info
  6450. ) {
  6451. var res;
  6452. try {
  6453. res = args ? handler.apply(context, args) : handler.call(context);
  6454. if (res && !res._isVue && isPromise(res) && !res._handled) {
  6455. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  6456. // issue #9511
  6457. // avoid catch triggering multiple times when nested calls
  6458. res._handled = true;
  6459. }
  6460. } catch (e) {
  6461. handleError(e, vm, info);
  6462. }
  6463. return res
  6464. }
  6465. function globalHandleError (err, vm, info) {
  6466. if (config.errorHandler) {
  6467. try {
  6468. return config.errorHandler.call(null, err, vm, info)
  6469. } catch (e) {
  6470. // if the user intentionally throws the original error in the handler,
  6471. // do not log it twice
  6472. if (e !== err) {
  6473. logError(e, null, 'config.errorHandler');
  6474. }
  6475. }
  6476. }
  6477. logError(err, vm, info);
  6478. }
  6479. function logError (err, vm, info) {
  6480. if (true) {
  6481. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  6482. }
  6483. /* istanbul ignore else */
  6484. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  6485. console.error(err);
  6486. } else {
  6487. throw err
  6488. }
  6489. }
  6490. /* */
  6491. var callbacks = [];
  6492. var pending = false;
  6493. function flushCallbacks () {
  6494. pending = false;
  6495. var copies = callbacks.slice(0);
  6496. callbacks.length = 0;
  6497. for (var i = 0; i < copies.length; i++) {
  6498. copies[i]();
  6499. }
  6500. }
  6501. // Here we have async deferring wrappers using microtasks.
  6502. // In 2.5 we used (macro) tasks (in combination with microtasks).
  6503. // However, it has subtle problems when state is changed right before repaint
  6504. // (e.g. #6813, out-in transitions).
  6505. // Also, using (macro) tasks in event handler would cause some weird behaviors
  6506. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  6507. // So we now use microtasks everywhere, again.
  6508. // A major drawback of this tradeoff is that there are some scenarios
  6509. // where microtasks have too high a priority and fire in between supposedly
  6510. // sequential events (e.g. #4521, #6690, which have workarounds)
  6511. // or even between bubbling of the same event (#6566).
  6512. var timerFunc;
  6513. // The nextTick behavior leverages the microtask queue, which can be accessed
  6514. // via either native Promise.then or MutationObserver.
  6515. // MutationObserver has wider support, however it is seriously bugged in
  6516. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  6517. // completely stops working after triggering a few times... so, if native
  6518. // Promise is available, we will use it:
  6519. /* istanbul ignore next, $flow-disable-line */
  6520. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  6521. var p = Promise.resolve();
  6522. timerFunc = function () {
  6523. p.then(flushCallbacks);
  6524. // In problematic UIWebViews, Promise.then doesn't completely break, but
  6525. // it can get stuck in a weird state where callbacks are pushed into the
  6526. // microtask queue but the queue isn't being flushed, until the browser
  6527. // needs to do some other work, e.g. handle a timer. Therefore we can
  6528. // "force" the microtask queue to be flushed by adding an empty timer.
  6529. if (isIOS) { setTimeout(noop); }
  6530. };
  6531. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  6532. isNative(MutationObserver) ||
  6533. // PhantomJS and iOS 7.x
  6534. MutationObserver.toString() === '[object MutationObserverConstructor]'
  6535. )) {
  6536. // Use MutationObserver where native Promise is not available,
  6537. // e.g. PhantomJS, iOS7, Android 4.4
  6538. // (#6466 MutationObserver is unreliable in IE11)
  6539. var counter = 1;
  6540. var observer = new MutationObserver(flushCallbacks);
  6541. var textNode = document.createTextNode(String(counter));
  6542. observer.observe(textNode, {
  6543. characterData: true
  6544. });
  6545. timerFunc = function () {
  6546. counter = (counter + 1) % 2;
  6547. textNode.data = String(counter);
  6548. };
  6549. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  6550. // Fallback to setImmediate.
  6551. // Technically it leverages the (macro) task queue,
  6552. // but it is still a better choice than setTimeout.
  6553. timerFunc = function () {
  6554. setImmediate(flushCallbacks);
  6555. };
  6556. } else {
  6557. // Fallback to setTimeout.
  6558. timerFunc = function () {
  6559. setTimeout(flushCallbacks, 0);
  6560. };
  6561. }
  6562. function nextTick (cb, ctx) {
  6563. var _resolve;
  6564. callbacks.push(function () {
  6565. if (cb) {
  6566. try {
  6567. cb.call(ctx);
  6568. } catch (e) {
  6569. handleError(e, ctx, 'nextTick');
  6570. }
  6571. } else if (_resolve) {
  6572. _resolve(ctx);
  6573. }
  6574. });
  6575. if (!pending) {
  6576. pending = true;
  6577. timerFunc();
  6578. }
  6579. // $flow-disable-line
  6580. if (!cb && typeof Promise !== 'undefined') {
  6581. return new Promise(function (resolve) {
  6582. _resolve = resolve;
  6583. })
  6584. }
  6585. }
  6586. /* */
  6587. /* not type checking this file because flow doesn't play well with Proxy */
  6588. var initProxy;
  6589. if (true) {
  6590. var allowedGlobals = makeMap(
  6591. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  6592. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  6593. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  6594. 'require' // for Webpack/Browserify
  6595. );
  6596. var warnNonPresent = function (target, key) {
  6597. warn(
  6598. "Property or method \"" + key + "\" is not defined on the instance but " +
  6599. 'referenced during render. Make sure that this property is reactive, ' +
  6600. 'either in the data option, or for class-based components, by ' +
  6601. 'initializing the property. ' +
  6602. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  6603. target
  6604. );
  6605. };
  6606. var warnReservedPrefix = function (target, key) {
  6607. warn(
  6608. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  6609. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  6610. 'prevent conflicts with Vue internals. ' +
  6611. 'See: https://vuejs.org/v2/api/#data',
  6612. target
  6613. );
  6614. };
  6615. var hasProxy =
  6616. typeof Proxy !== 'undefined' && isNative(Proxy);
  6617. if (hasProxy) {
  6618. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  6619. config.keyCodes = new Proxy(config.keyCodes, {
  6620. set: function set (target, key, value) {
  6621. if (isBuiltInModifier(key)) {
  6622. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  6623. return false
  6624. } else {
  6625. target[key] = value;
  6626. return true
  6627. }
  6628. }
  6629. });
  6630. }
  6631. var hasHandler = {
  6632. has: function has (target, key) {
  6633. var has = key in target;
  6634. var isAllowed = allowedGlobals(key) ||
  6635. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  6636. if (!has && !isAllowed) {
  6637. if (key in target.$data) { warnReservedPrefix(target, key); }
  6638. else { warnNonPresent(target, key); }
  6639. }
  6640. return has || !isAllowed
  6641. }
  6642. };
  6643. var getHandler = {
  6644. get: function get (target, key) {
  6645. if (typeof key === 'string' && !(key in target)) {
  6646. if (key in target.$data) { warnReservedPrefix(target, key); }
  6647. else { warnNonPresent(target, key); }
  6648. }
  6649. return target[key]
  6650. }
  6651. };
  6652. initProxy = function initProxy (vm) {
  6653. if (hasProxy) {
  6654. // determine which proxy handler to use
  6655. var options = vm.$options;
  6656. var handlers = options.render && options.render._withStripped
  6657. ? getHandler
  6658. : hasHandler;
  6659. vm._renderProxy = new Proxy(vm, handlers);
  6660. } else {
  6661. vm._renderProxy = vm;
  6662. }
  6663. };
  6664. }
  6665. /* */
  6666. var seenObjects = new _Set();
  6667. /**
  6668. * Recursively traverse an object to evoke all converted
  6669. * getters, so that every nested property inside the object
  6670. * is collected as a "deep" dependency.
  6671. */
  6672. function traverse (val) {
  6673. _traverse(val, seenObjects);
  6674. seenObjects.clear();
  6675. }
  6676. function _traverse (val, seen) {
  6677. var i, keys;
  6678. var isA = Array.isArray(val);
  6679. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  6680. return
  6681. }
  6682. if (val.__ob__) {
  6683. var depId = val.__ob__.dep.id;
  6684. if (seen.has(depId)) {
  6685. return
  6686. }
  6687. seen.add(depId);
  6688. }
  6689. if (isA) {
  6690. i = val.length;
  6691. while (i--) { _traverse(val[i], seen); }
  6692. } else {
  6693. keys = Object.keys(val);
  6694. i = keys.length;
  6695. while (i--) { _traverse(val[keys[i]], seen); }
  6696. }
  6697. }
  6698. var mark;
  6699. var measure;
  6700. if (true) {
  6701. var perf = inBrowser && window.performance;
  6702. /* istanbul ignore if */
  6703. if (
  6704. perf &&
  6705. perf.mark &&
  6706. perf.measure &&
  6707. perf.clearMarks &&
  6708. perf.clearMeasures
  6709. ) {
  6710. mark = function (tag) { return perf.mark(tag); };
  6711. measure = function (name, startTag, endTag) {
  6712. perf.measure(name, startTag, endTag);
  6713. perf.clearMarks(startTag);
  6714. perf.clearMarks(endTag);
  6715. // perf.clearMeasures(name)
  6716. };
  6717. }
  6718. }
  6719. /* */
  6720. var normalizeEvent = cached(function (name) {
  6721. var passive = name.charAt(0) === '&';
  6722. name = passive ? name.slice(1) : name;
  6723. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  6724. name = once$$1 ? name.slice(1) : name;
  6725. var capture = name.charAt(0) === '!';
  6726. name = capture ? name.slice(1) : name;
  6727. return {
  6728. name: name,
  6729. once: once$$1,
  6730. capture: capture,
  6731. passive: passive
  6732. }
  6733. });
  6734. function createFnInvoker (fns, vm) {
  6735. function invoker () {
  6736. var arguments$1 = arguments;
  6737. var fns = invoker.fns;
  6738. if (Array.isArray(fns)) {
  6739. var cloned = fns.slice();
  6740. for (var i = 0; i < cloned.length; i++) {
  6741. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  6742. }
  6743. } else {
  6744. // return handler return value for single handlers
  6745. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  6746. }
  6747. }
  6748. invoker.fns = fns;
  6749. return invoker
  6750. }
  6751. function updateListeners (
  6752. on,
  6753. oldOn,
  6754. add,
  6755. remove$$1,
  6756. createOnceHandler,
  6757. vm
  6758. ) {
  6759. var name, def$$1, cur, old, event;
  6760. for (name in on) {
  6761. def$$1 = cur = on[name];
  6762. old = oldOn[name];
  6763. event = normalizeEvent(name);
  6764. if (isUndef(cur)) {
  6765. true && warn(
  6766. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  6767. vm
  6768. );
  6769. } else if (isUndef(old)) {
  6770. if (isUndef(cur.fns)) {
  6771. cur = on[name] = createFnInvoker(cur, vm);
  6772. }
  6773. if (isTrue(event.once)) {
  6774. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  6775. }
  6776. add(event.name, cur, event.capture, event.passive, event.params);
  6777. } else if (cur !== old) {
  6778. old.fns = cur;
  6779. on[name] = old;
  6780. }
  6781. }
  6782. for (name in oldOn) {
  6783. if (isUndef(on[name])) {
  6784. event = normalizeEvent(name);
  6785. remove$$1(event.name, oldOn[name], event.capture);
  6786. }
  6787. }
  6788. }
  6789. /* */
  6790. /* */
  6791. // fixed by xxxxxx (mp properties)
  6792. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  6793. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  6794. if (isUndef(propOptions)) {
  6795. return res
  6796. }
  6797. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  6798. var attrs = data.attrs;
  6799. var props = data.props;
  6800. if (isDef(attrs) || isDef(props)) {
  6801. for (var key in propOptions) {
  6802. var altKey = hyphenate(key);
  6803. var result = checkProp(res, props, key, altKey, true) ||
  6804. checkProp(res, attrs, key, altKey, false);
  6805. // externalClass
  6806. if (
  6807. result &&
  6808. res[key] &&
  6809. externalClasses.indexOf(altKey) !== -1 &&
  6810. context[camelize(res[key])]
  6811. ) {
  6812. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  6813. res[key] = context[camelize(res[key])];
  6814. }
  6815. }
  6816. }
  6817. return res
  6818. }
  6819. function extractPropsFromVNodeData (
  6820. data,
  6821. Ctor,
  6822. tag,
  6823. context// fixed by xxxxxx
  6824. ) {
  6825. // we are only extracting raw values here.
  6826. // validation and default values are handled in the child
  6827. // component itself.
  6828. var propOptions = Ctor.options.props;
  6829. if (isUndef(propOptions)) {
  6830. // fixed by xxxxxx
  6831. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  6832. }
  6833. var res = {};
  6834. var attrs = data.attrs;
  6835. var props = data.props;
  6836. if (isDef(attrs) || isDef(props)) {
  6837. for (var key in propOptions) {
  6838. var altKey = hyphenate(key);
  6839. if (true) {
  6840. var keyInLowerCase = key.toLowerCase();
  6841. if (
  6842. key !== keyInLowerCase &&
  6843. attrs && hasOwn(attrs, keyInLowerCase)
  6844. ) {
  6845. tip(
  6846. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  6847. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  6848. " \"" + key + "\". " +
  6849. "Note that HTML attributes are case-insensitive and camelCased " +
  6850. "props need to use their kebab-case equivalents when using in-DOM " +
  6851. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  6852. );
  6853. }
  6854. }
  6855. checkProp(res, props, key, altKey, true) ||
  6856. checkProp(res, attrs, key, altKey, false);
  6857. }
  6858. }
  6859. // fixed by xxxxxx
  6860. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  6861. }
  6862. function checkProp (
  6863. res,
  6864. hash,
  6865. key,
  6866. altKey,
  6867. preserve
  6868. ) {
  6869. if (isDef(hash)) {
  6870. if (hasOwn(hash, key)) {
  6871. res[key] = hash[key];
  6872. if (!preserve) {
  6873. delete hash[key];
  6874. }
  6875. return true
  6876. } else if (hasOwn(hash, altKey)) {
  6877. res[key] = hash[altKey];
  6878. if (!preserve) {
  6879. delete hash[altKey];
  6880. }
  6881. return true
  6882. }
  6883. }
  6884. return false
  6885. }
  6886. /* */
  6887. // The template compiler attempts to minimize the need for normalization by
  6888. // statically analyzing the template at compile time.
  6889. //
  6890. // For plain HTML markup, normalization can be completely skipped because the
  6891. // generated render function is guaranteed to return Array<VNode>. There are
  6892. // two cases where extra normalization is needed:
  6893. // 1. When the children contains components - because a functional component
  6894. // may return an Array instead of a single root. In this case, just a simple
  6895. // normalization is needed - if any child is an Array, we flatten the whole
  6896. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  6897. // because functional components already normalize their own children.
  6898. function simpleNormalizeChildren (children) {
  6899. for (var i = 0; i < children.length; i++) {
  6900. if (Array.isArray(children[i])) {
  6901. return Array.prototype.concat.apply([], children)
  6902. }
  6903. }
  6904. return children
  6905. }
  6906. // 2. When the children contains constructs that always generated nested Arrays,
  6907. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  6908. // with hand-written render functions / JSX. In such cases a full normalization
  6909. // is needed to cater to all possible types of children values.
  6910. function normalizeChildren (children) {
  6911. return isPrimitive(children)
  6912. ? [createTextVNode(children)]
  6913. : Array.isArray(children)
  6914. ? normalizeArrayChildren(children)
  6915. : undefined
  6916. }
  6917. function isTextNode (node) {
  6918. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  6919. }
  6920. function normalizeArrayChildren (children, nestedIndex) {
  6921. var res = [];
  6922. var i, c, lastIndex, last;
  6923. for (i = 0; i < children.length; i++) {
  6924. c = children[i];
  6925. if (isUndef(c) || typeof c === 'boolean') { continue }
  6926. lastIndex = res.length - 1;
  6927. last = res[lastIndex];
  6928. // nested
  6929. if (Array.isArray(c)) {
  6930. if (c.length > 0) {
  6931. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  6932. // merge adjacent text nodes
  6933. if (isTextNode(c[0]) && isTextNode(last)) {
  6934. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  6935. c.shift();
  6936. }
  6937. res.push.apply(res, c);
  6938. }
  6939. } else if (isPrimitive(c)) {
  6940. if (isTextNode(last)) {
  6941. // merge adjacent text nodes
  6942. // this is necessary for SSR hydration because text nodes are
  6943. // essentially merged when rendered to HTML strings
  6944. res[lastIndex] = createTextVNode(last.text + c);
  6945. } else if (c !== '') {
  6946. // convert primitive to vnode
  6947. res.push(createTextVNode(c));
  6948. }
  6949. } else {
  6950. if (isTextNode(c) && isTextNode(last)) {
  6951. // merge adjacent text nodes
  6952. res[lastIndex] = createTextVNode(last.text + c.text);
  6953. } else {
  6954. // default key for nested array children (likely generated by v-for)
  6955. if (isTrue(children._isVList) &&
  6956. isDef(c.tag) &&
  6957. isUndef(c.key) &&
  6958. isDef(nestedIndex)) {
  6959. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  6960. }
  6961. res.push(c);
  6962. }
  6963. }
  6964. }
  6965. return res
  6966. }
  6967. /* */
  6968. function initProvide (vm) {
  6969. var provide = vm.$options.provide;
  6970. if (provide) {
  6971. vm._provided = typeof provide === 'function'
  6972. ? provide.call(vm)
  6973. : provide;
  6974. }
  6975. }
  6976. function initInjections (vm) {
  6977. var result = resolveInject(vm.$options.inject, vm);
  6978. if (result) {
  6979. toggleObserving(false);
  6980. Object.keys(result).forEach(function (key) {
  6981. /* istanbul ignore else */
  6982. if (true) {
  6983. defineReactive$$1(vm, key, result[key], function () {
  6984. warn(
  6985. "Avoid mutating an injected value directly since the changes will be " +
  6986. "overwritten whenever the provided component re-renders. " +
  6987. "injection being mutated: \"" + key + "\"",
  6988. vm
  6989. );
  6990. });
  6991. } else {}
  6992. });
  6993. toggleObserving(true);
  6994. }
  6995. }
  6996. function resolveInject (inject, vm) {
  6997. if (inject) {
  6998. // inject is :any because flow is not smart enough to figure out cached
  6999. var result = Object.create(null);
  7000. var keys = hasSymbol
  7001. ? Reflect.ownKeys(inject)
  7002. : Object.keys(inject);
  7003. for (var i = 0; i < keys.length; i++) {
  7004. var key = keys[i];
  7005. // #6574 in case the inject object is observed...
  7006. if (key === '__ob__') { continue }
  7007. var provideKey = inject[key].from;
  7008. var source = vm;
  7009. while (source) {
  7010. if (source._provided && hasOwn(source._provided, provideKey)) {
  7011. result[key] = source._provided[provideKey];
  7012. break
  7013. }
  7014. source = source.$parent;
  7015. }
  7016. if (!source) {
  7017. if ('default' in inject[key]) {
  7018. var provideDefault = inject[key].default;
  7019. result[key] = typeof provideDefault === 'function'
  7020. ? provideDefault.call(vm)
  7021. : provideDefault;
  7022. } else if (true) {
  7023. warn(("Injection \"" + key + "\" not found"), vm);
  7024. }
  7025. }
  7026. }
  7027. return result
  7028. }
  7029. }
  7030. /* */
  7031. /**
  7032. * Runtime helper for resolving raw children VNodes into a slot object.
  7033. */
  7034. function resolveSlots (
  7035. children,
  7036. context
  7037. ) {
  7038. if (!children || !children.length) {
  7039. return {}
  7040. }
  7041. var slots = {};
  7042. for (var i = 0, l = children.length; i < l; i++) {
  7043. var child = children[i];
  7044. var data = child.data;
  7045. // remove slot attribute if the node is resolved as a Vue slot node
  7046. if (data && data.attrs && data.attrs.slot) {
  7047. delete data.attrs.slot;
  7048. }
  7049. // named slots should only be respected if the vnode was rendered in the
  7050. // same context.
  7051. if ((child.context === context || child.fnContext === context) &&
  7052. data && data.slot != null
  7053. ) {
  7054. var name = data.slot;
  7055. var slot = (slots[name] || (slots[name] = []));
  7056. if (child.tag === 'template') {
  7057. slot.push.apply(slot, child.children || []);
  7058. } else {
  7059. slot.push(child);
  7060. }
  7061. } else {
  7062. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  7063. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  7064. (slots['page'] || (slots['page'] = [])).push(child);
  7065. }else{
  7066. (slots.default || (slots.default = [])).push(child);
  7067. }
  7068. }
  7069. }
  7070. // ignore slots that contains only whitespace
  7071. for (var name$1 in slots) {
  7072. if (slots[name$1].every(isWhitespace)) {
  7073. delete slots[name$1];
  7074. }
  7075. }
  7076. return slots
  7077. }
  7078. function isWhitespace (node) {
  7079. return (node.isComment && !node.asyncFactory) || node.text === ' '
  7080. }
  7081. /* */
  7082. function normalizeScopedSlots (
  7083. slots,
  7084. normalSlots,
  7085. prevSlots
  7086. ) {
  7087. var res;
  7088. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  7089. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  7090. var key = slots && slots.$key;
  7091. if (!slots) {
  7092. res = {};
  7093. } else if (slots._normalized) {
  7094. // fast path 1: child component re-render only, parent did not change
  7095. return slots._normalized
  7096. } else if (
  7097. isStable &&
  7098. prevSlots &&
  7099. prevSlots !== emptyObject &&
  7100. key === prevSlots.$key &&
  7101. !hasNormalSlots &&
  7102. !prevSlots.$hasNormal
  7103. ) {
  7104. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  7105. // only need to normalize once
  7106. return prevSlots
  7107. } else {
  7108. res = {};
  7109. for (var key$1 in slots) {
  7110. if (slots[key$1] && key$1[0] !== '$') {
  7111. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  7112. }
  7113. }
  7114. }
  7115. // expose normal slots on scopedSlots
  7116. for (var key$2 in normalSlots) {
  7117. if (!(key$2 in res)) {
  7118. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  7119. }
  7120. }
  7121. // avoriaz seems to mock a non-extensible $scopedSlots object
  7122. // and when that is passed down this would cause an error
  7123. if (slots && Object.isExtensible(slots)) {
  7124. (slots)._normalized = res;
  7125. }
  7126. def(res, '$stable', isStable);
  7127. def(res, '$key', key);
  7128. def(res, '$hasNormal', hasNormalSlots);
  7129. return res
  7130. }
  7131. function normalizeScopedSlot(normalSlots, key, fn) {
  7132. var normalized = function () {
  7133. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  7134. res = res && typeof res === 'object' && !Array.isArray(res)
  7135. ? [res] // single vnode
  7136. : normalizeChildren(res);
  7137. return res && (
  7138. res.length === 0 ||
  7139. (res.length === 1 && res[0].isComment) // #9658
  7140. ) ? undefined
  7141. : res
  7142. };
  7143. // this is a slot using the new v-slot syntax without scope. although it is
  7144. // compiled as a scoped slot, render fn users would expect it to be present
  7145. // on this.$slots because the usage is semantically a normal slot.
  7146. if (fn.proxy) {
  7147. Object.defineProperty(normalSlots, key, {
  7148. get: normalized,
  7149. enumerable: true,
  7150. configurable: true
  7151. });
  7152. }
  7153. return normalized
  7154. }
  7155. function proxyNormalSlot(slots, key) {
  7156. return function () { return slots[key]; }
  7157. }
  7158. /* */
  7159. /**
  7160. * Runtime helper for rendering v-for lists.
  7161. */
  7162. function renderList (
  7163. val,
  7164. render
  7165. ) {
  7166. var ret, i, l, keys, key;
  7167. if (Array.isArray(val) || typeof val === 'string') {
  7168. ret = new Array(val.length);
  7169. for (i = 0, l = val.length; i < l; i++) {
  7170. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  7171. }
  7172. } else if (typeof val === 'number') {
  7173. ret = new Array(val);
  7174. for (i = 0; i < val; i++) {
  7175. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  7176. }
  7177. } else if (isObject(val)) {
  7178. if (hasSymbol && val[Symbol.iterator]) {
  7179. ret = [];
  7180. var iterator = val[Symbol.iterator]();
  7181. var result = iterator.next();
  7182. while (!result.done) {
  7183. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  7184. result = iterator.next();
  7185. }
  7186. } else {
  7187. keys = Object.keys(val);
  7188. ret = new Array(keys.length);
  7189. for (i = 0, l = keys.length; i < l; i++) {
  7190. key = keys[i];
  7191. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  7192. }
  7193. }
  7194. }
  7195. if (!isDef(ret)) {
  7196. ret = [];
  7197. }
  7198. (ret)._isVList = true;
  7199. return ret
  7200. }
  7201. /* */
  7202. /**
  7203. * Runtime helper for rendering <slot>
  7204. */
  7205. function renderSlot (
  7206. name,
  7207. fallback,
  7208. props,
  7209. bindObject
  7210. ) {
  7211. var scopedSlotFn = this.$scopedSlots[name];
  7212. var nodes;
  7213. if (scopedSlotFn) { // scoped slot
  7214. props = props || {};
  7215. if (bindObject) {
  7216. if ( true && !isObject(bindObject)) {
  7217. warn(
  7218. 'slot v-bind without argument expects an Object',
  7219. this
  7220. );
  7221. }
  7222. props = extend(extend({}, bindObject), props);
  7223. }
  7224. // fixed by xxxxxx app-plus scopedSlot
  7225. nodes = scopedSlotFn(props, this, props._i) || fallback;
  7226. } else {
  7227. nodes = this.$slots[name] || fallback;
  7228. }
  7229. var target = props && props.slot;
  7230. if (target) {
  7231. return this.$createElement('template', { slot: target }, nodes)
  7232. } else {
  7233. return nodes
  7234. }
  7235. }
  7236. /* */
  7237. /**
  7238. * Runtime helper for resolving filters
  7239. */
  7240. function resolveFilter (id) {
  7241. return resolveAsset(this.$options, 'filters', id, true) || identity
  7242. }
  7243. /* */
  7244. function isKeyNotMatch (expect, actual) {
  7245. if (Array.isArray(expect)) {
  7246. return expect.indexOf(actual) === -1
  7247. } else {
  7248. return expect !== actual
  7249. }
  7250. }
  7251. /**
  7252. * Runtime helper for checking keyCodes from config.
  7253. * exposed as Vue.prototype._k
  7254. * passing in eventKeyName as last argument separately for backwards compat
  7255. */
  7256. function checkKeyCodes (
  7257. eventKeyCode,
  7258. key,
  7259. builtInKeyCode,
  7260. eventKeyName,
  7261. builtInKeyName
  7262. ) {
  7263. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  7264. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  7265. return isKeyNotMatch(builtInKeyName, eventKeyName)
  7266. } else if (mappedKeyCode) {
  7267. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  7268. } else if (eventKeyName) {
  7269. return hyphenate(eventKeyName) !== key
  7270. }
  7271. }
  7272. /* */
  7273. /**
  7274. * Runtime helper for merging v-bind="object" into a VNode's data.
  7275. */
  7276. function bindObjectProps (
  7277. data,
  7278. tag,
  7279. value,
  7280. asProp,
  7281. isSync
  7282. ) {
  7283. if (value) {
  7284. if (!isObject(value)) {
  7285. true && warn(
  7286. 'v-bind without argument expects an Object or Array value',
  7287. this
  7288. );
  7289. } else {
  7290. if (Array.isArray(value)) {
  7291. value = toObject(value);
  7292. }
  7293. var hash;
  7294. var loop = function ( key ) {
  7295. if (
  7296. key === 'class' ||
  7297. key === 'style' ||
  7298. isReservedAttribute(key)
  7299. ) {
  7300. hash = data;
  7301. } else {
  7302. var type = data.attrs && data.attrs.type;
  7303. hash = asProp || config.mustUseProp(tag, type, key)
  7304. ? data.domProps || (data.domProps = {})
  7305. : data.attrs || (data.attrs = {});
  7306. }
  7307. var camelizedKey = camelize(key);
  7308. var hyphenatedKey = hyphenate(key);
  7309. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  7310. hash[key] = value[key];
  7311. if (isSync) {
  7312. var on = data.on || (data.on = {});
  7313. on[("update:" + key)] = function ($event) {
  7314. value[key] = $event;
  7315. };
  7316. }
  7317. }
  7318. };
  7319. for (var key in value) loop( key );
  7320. }
  7321. }
  7322. return data
  7323. }
  7324. /* */
  7325. /**
  7326. * Runtime helper for rendering static trees.
  7327. */
  7328. function renderStatic (
  7329. index,
  7330. isInFor
  7331. ) {
  7332. var cached = this._staticTrees || (this._staticTrees = []);
  7333. var tree = cached[index];
  7334. // if has already-rendered static tree and not inside v-for,
  7335. // we can reuse the same tree.
  7336. if (tree && !isInFor) {
  7337. return tree
  7338. }
  7339. // otherwise, render a fresh tree.
  7340. tree = cached[index] = this.$options.staticRenderFns[index].call(
  7341. this._renderProxy,
  7342. null,
  7343. this // for render fns generated for functional component templates
  7344. );
  7345. markStatic(tree, ("__static__" + index), false);
  7346. return tree
  7347. }
  7348. /**
  7349. * Runtime helper for v-once.
  7350. * Effectively it means marking the node as static with a unique key.
  7351. */
  7352. function markOnce (
  7353. tree,
  7354. index,
  7355. key
  7356. ) {
  7357. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  7358. return tree
  7359. }
  7360. function markStatic (
  7361. tree,
  7362. key,
  7363. isOnce
  7364. ) {
  7365. if (Array.isArray(tree)) {
  7366. for (var i = 0; i < tree.length; i++) {
  7367. if (tree[i] && typeof tree[i] !== 'string') {
  7368. markStaticNode(tree[i], (key + "_" + i), isOnce);
  7369. }
  7370. }
  7371. } else {
  7372. markStaticNode(tree, key, isOnce);
  7373. }
  7374. }
  7375. function markStaticNode (node, key, isOnce) {
  7376. node.isStatic = true;
  7377. node.key = key;
  7378. node.isOnce = isOnce;
  7379. }
  7380. /* */
  7381. function bindObjectListeners (data, value) {
  7382. if (value) {
  7383. if (!isPlainObject(value)) {
  7384. true && warn(
  7385. 'v-on without argument expects an Object value',
  7386. this
  7387. );
  7388. } else {
  7389. var on = data.on = data.on ? extend({}, data.on) : {};
  7390. for (var key in value) {
  7391. var existing = on[key];
  7392. var ours = value[key];
  7393. on[key] = existing ? [].concat(existing, ours) : ours;
  7394. }
  7395. }
  7396. }
  7397. return data
  7398. }
  7399. /* */
  7400. function resolveScopedSlots (
  7401. fns, // see flow/vnode
  7402. res,
  7403. // the following are added in 2.6
  7404. hasDynamicKeys,
  7405. contentHashKey
  7406. ) {
  7407. res = res || { $stable: !hasDynamicKeys };
  7408. for (var i = 0; i < fns.length; i++) {
  7409. var slot = fns[i];
  7410. if (Array.isArray(slot)) {
  7411. resolveScopedSlots(slot, res, hasDynamicKeys);
  7412. } else if (slot) {
  7413. // marker for reverse proxying v-slot without scope on this.$slots
  7414. if (slot.proxy) {
  7415. slot.fn.proxy = true;
  7416. }
  7417. res[slot.key] = slot.fn;
  7418. }
  7419. }
  7420. if (contentHashKey) {
  7421. (res).$key = contentHashKey;
  7422. }
  7423. return res
  7424. }
  7425. /* */
  7426. function bindDynamicKeys (baseObj, values) {
  7427. for (var i = 0; i < values.length; i += 2) {
  7428. var key = values[i];
  7429. if (typeof key === 'string' && key) {
  7430. baseObj[values[i]] = values[i + 1];
  7431. } else if ( true && key !== '' && key !== null) {
  7432. // null is a special value for explicitly removing a binding
  7433. warn(
  7434. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  7435. this
  7436. );
  7437. }
  7438. }
  7439. return baseObj
  7440. }
  7441. // helper to dynamically append modifier runtime markers to event names.
  7442. // ensure only append when value is already string, otherwise it will be cast
  7443. // to string and cause the type check to miss.
  7444. function prependModifier (value, symbol) {
  7445. return typeof value === 'string' ? symbol + value : value
  7446. }
  7447. /* */
  7448. function installRenderHelpers (target) {
  7449. target._o = markOnce;
  7450. target._n = toNumber;
  7451. target._s = toString;
  7452. target._l = renderList;
  7453. target._t = renderSlot;
  7454. target._q = looseEqual;
  7455. target._i = looseIndexOf;
  7456. target._m = renderStatic;
  7457. target._f = resolveFilter;
  7458. target._k = checkKeyCodes;
  7459. target._b = bindObjectProps;
  7460. target._v = createTextVNode;
  7461. target._e = createEmptyVNode;
  7462. target._u = resolveScopedSlots;
  7463. target._g = bindObjectListeners;
  7464. target._d = bindDynamicKeys;
  7465. target._p = prependModifier;
  7466. }
  7467. /* */
  7468. function FunctionalRenderContext (
  7469. data,
  7470. props,
  7471. children,
  7472. parent,
  7473. Ctor
  7474. ) {
  7475. var this$1 = this;
  7476. var options = Ctor.options;
  7477. // ensure the createElement function in functional components
  7478. // gets a unique context - this is necessary for correct named slot check
  7479. var contextVm;
  7480. if (hasOwn(parent, '_uid')) {
  7481. contextVm = Object.create(parent);
  7482. // $flow-disable-line
  7483. contextVm._original = parent;
  7484. } else {
  7485. // the context vm passed in is a functional context as well.
  7486. // in this case we want to make sure we are able to get a hold to the
  7487. // real context instance.
  7488. contextVm = parent;
  7489. // $flow-disable-line
  7490. parent = parent._original;
  7491. }
  7492. var isCompiled = isTrue(options._compiled);
  7493. var needNormalization = !isCompiled;
  7494. this.data = data;
  7495. this.props = props;
  7496. this.children = children;
  7497. this.parent = parent;
  7498. this.listeners = data.on || emptyObject;
  7499. this.injections = resolveInject(options.inject, parent);
  7500. this.slots = function () {
  7501. if (!this$1.$slots) {
  7502. normalizeScopedSlots(
  7503. data.scopedSlots,
  7504. this$1.$slots = resolveSlots(children, parent)
  7505. );
  7506. }
  7507. return this$1.$slots
  7508. };
  7509. Object.defineProperty(this, 'scopedSlots', ({
  7510. enumerable: true,
  7511. get: function get () {
  7512. return normalizeScopedSlots(data.scopedSlots, this.slots())
  7513. }
  7514. }));
  7515. // support for compiled functional template
  7516. if (isCompiled) {
  7517. // exposing $options for renderStatic()
  7518. this.$options = options;
  7519. // pre-resolve slots for renderSlot()
  7520. this.$slots = this.slots();
  7521. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  7522. }
  7523. if (options._scopeId) {
  7524. this._c = function (a, b, c, d) {
  7525. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  7526. if (vnode && !Array.isArray(vnode)) {
  7527. vnode.fnScopeId = options._scopeId;
  7528. vnode.fnContext = parent;
  7529. }
  7530. return vnode
  7531. };
  7532. } else {
  7533. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  7534. }
  7535. }
  7536. installRenderHelpers(FunctionalRenderContext.prototype);
  7537. function createFunctionalComponent (
  7538. Ctor,
  7539. propsData,
  7540. data,
  7541. contextVm,
  7542. children
  7543. ) {
  7544. var options = Ctor.options;
  7545. var props = {};
  7546. var propOptions = options.props;
  7547. if (isDef(propOptions)) {
  7548. for (var key in propOptions) {
  7549. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  7550. }
  7551. } else {
  7552. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  7553. if (isDef(data.props)) { mergeProps(props, data.props); }
  7554. }
  7555. var renderContext = new FunctionalRenderContext(
  7556. data,
  7557. props,
  7558. children,
  7559. contextVm,
  7560. Ctor
  7561. );
  7562. var vnode = options.render.call(null, renderContext._c, renderContext);
  7563. if (vnode instanceof VNode) {
  7564. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  7565. } else if (Array.isArray(vnode)) {
  7566. var vnodes = normalizeChildren(vnode) || [];
  7567. var res = new Array(vnodes.length);
  7568. for (var i = 0; i < vnodes.length; i++) {
  7569. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  7570. }
  7571. return res
  7572. }
  7573. }
  7574. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  7575. // #7817 clone node before setting fnContext, otherwise if the node is reused
  7576. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  7577. // that should not be matched to match.
  7578. var clone = cloneVNode(vnode);
  7579. clone.fnContext = contextVm;
  7580. clone.fnOptions = options;
  7581. if (true) {
  7582. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  7583. }
  7584. if (data.slot) {
  7585. (clone.data || (clone.data = {})).slot = data.slot;
  7586. }
  7587. return clone
  7588. }
  7589. function mergeProps (to, from) {
  7590. for (var key in from) {
  7591. to[camelize(key)] = from[key];
  7592. }
  7593. }
  7594. /* */
  7595. /* */
  7596. /* */
  7597. /* */
  7598. // inline hooks to be invoked on component VNodes during patch
  7599. var componentVNodeHooks = {
  7600. init: function init (vnode, hydrating) {
  7601. if (
  7602. vnode.componentInstance &&
  7603. !vnode.componentInstance._isDestroyed &&
  7604. vnode.data.keepAlive
  7605. ) {
  7606. // kept-alive components, treat as a patch
  7607. var mountedNode = vnode; // work around flow
  7608. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  7609. } else {
  7610. var child = vnode.componentInstance = createComponentInstanceForVnode(
  7611. vnode,
  7612. activeInstance
  7613. );
  7614. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  7615. }
  7616. },
  7617. prepatch: function prepatch (oldVnode, vnode) {
  7618. var options = vnode.componentOptions;
  7619. var child = vnode.componentInstance = oldVnode.componentInstance;
  7620. updateChildComponent(
  7621. child,
  7622. options.propsData, // updated props
  7623. options.listeners, // updated listeners
  7624. vnode, // new parent vnode
  7625. options.children // new children
  7626. );
  7627. },
  7628. insert: function insert (vnode) {
  7629. var context = vnode.context;
  7630. var componentInstance = vnode.componentInstance;
  7631. if (!componentInstance._isMounted) {
  7632. callHook(componentInstance, 'onServiceCreated');
  7633. callHook(componentInstance, 'onServiceAttached');
  7634. componentInstance._isMounted = true;
  7635. callHook(componentInstance, 'mounted');
  7636. }
  7637. if (vnode.data.keepAlive) {
  7638. if (context._isMounted) {
  7639. // vue-router#1212
  7640. // During updates, a kept-alive component's child components may
  7641. // change, so directly walking the tree here may call activated hooks
  7642. // on incorrect children. Instead we push them into a queue which will
  7643. // be processed after the whole patch process ended.
  7644. queueActivatedComponent(componentInstance);
  7645. } else {
  7646. activateChildComponent(componentInstance, true /* direct */);
  7647. }
  7648. }
  7649. },
  7650. destroy: function destroy (vnode) {
  7651. var componentInstance = vnode.componentInstance;
  7652. if (!componentInstance._isDestroyed) {
  7653. if (!vnode.data.keepAlive) {
  7654. componentInstance.$destroy();
  7655. } else {
  7656. deactivateChildComponent(componentInstance, true /* direct */);
  7657. }
  7658. }
  7659. }
  7660. };
  7661. var hooksToMerge = Object.keys(componentVNodeHooks);
  7662. function createComponent (
  7663. Ctor,
  7664. data,
  7665. context,
  7666. children,
  7667. tag
  7668. ) {
  7669. if (isUndef(Ctor)) {
  7670. return
  7671. }
  7672. var baseCtor = context.$options._base;
  7673. // plain options object: turn it into a constructor
  7674. if (isObject(Ctor)) {
  7675. Ctor = baseCtor.extend(Ctor);
  7676. }
  7677. // if at this stage it's not a constructor or an async component factory,
  7678. // reject.
  7679. if (typeof Ctor !== 'function') {
  7680. if (true) {
  7681. warn(("Invalid Component definition: " + (String(Ctor))), context);
  7682. }
  7683. return
  7684. }
  7685. // async component
  7686. var asyncFactory;
  7687. if (isUndef(Ctor.cid)) {
  7688. asyncFactory = Ctor;
  7689. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  7690. if (Ctor === undefined) {
  7691. // return a placeholder node for async component, which is rendered
  7692. // as a comment node but preserves all the raw information for the node.
  7693. // the information will be used for async server-rendering and hydration.
  7694. return createAsyncPlaceholder(
  7695. asyncFactory,
  7696. data,
  7697. context,
  7698. children,
  7699. tag
  7700. )
  7701. }
  7702. }
  7703. data = data || {};
  7704. // resolve constructor options in case global mixins are applied after
  7705. // component constructor creation
  7706. resolveConstructorOptions(Ctor);
  7707. // transform component v-model data into props & events
  7708. if (isDef(data.model)) {
  7709. transformModel(Ctor.options, data);
  7710. }
  7711. // extract props
  7712. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  7713. // functional component
  7714. if (isTrue(Ctor.options.functional)) {
  7715. return createFunctionalComponent(Ctor, propsData, data, context, children)
  7716. }
  7717. // extract listeners, since these needs to be treated as
  7718. // child component listeners instead of DOM listeners
  7719. var listeners = data.on;
  7720. // replace with listeners with .native modifier
  7721. // so it gets processed during parent component patch.
  7722. data.on = data.nativeOn;
  7723. if (isTrue(Ctor.options.abstract)) {
  7724. // abstract components do not keep anything
  7725. // other than props & listeners & slot
  7726. // work around flow
  7727. var slot = data.slot;
  7728. data = {};
  7729. if (slot) {
  7730. data.slot = slot;
  7731. }
  7732. }
  7733. // install component management hooks onto the placeholder node
  7734. installComponentHooks(data);
  7735. // return a placeholder vnode
  7736. var name = Ctor.options.name || tag;
  7737. var vnode = new VNode(
  7738. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  7739. data, undefined, undefined, undefined, context,
  7740. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  7741. asyncFactory
  7742. );
  7743. return vnode
  7744. }
  7745. function createComponentInstanceForVnode (
  7746. vnode, // we know it's MountedComponentVNode but flow doesn't
  7747. parent // activeInstance in lifecycle state
  7748. ) {
  7749. var options = {
  7750. _isComponent: true,
  7751. _parentVnode: vnode,
  7752. parent: parent
  7753. };
  7754. // check inline-template render functions
  7755. var inlineTemplate = vnode.data.inlineTemplate;
  7756. if (isDef(inlineTemplate)) {
  7757. options.render = inlineTemplate.render;
  7758. options.staticRenderFns = inlineTemplate.staticRenderFns;
  7759. }
  7760. return new vnode.componentOptions.Ctor(options)
  7761. }
  7762. function installComponentHooks (data) {
  7763. var hooks = data.hook || (data.hook = {});
  7764. for (var i = 0; i < hooksToMerge.length; i++) {
  7765. var key = hooksToMerge[i];
  7766. var existing = hooks[key];
  7767. var toMerge = componentVNodeHooks[key];
  7768. if (existing !== toMerge && !(existing && existing._merged)) {
  7769. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  7770. }
  7771. }
  7772. }
  7773. function mergeHook$1 (f1, f2) {
  7774. var merged = function (a, b) {
  7775. // flow complains about extra args which is why we use any
  7776. f1(a, b);
  7777. f2(a, b);
  7778. };
  7779. merged._merged = true;
  7780. return merged
  7781. }
  7782. // transform component v-model info (value and callback) into
  7783. // prop and event handler respectively.
  7784. function transformModel (options, data) {
  7785. var prop = (options.model && options.model.prop) || 'value';
  7786. var event = (options.model && options.model.event) || 'input'
  7787. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  7788. var on = data.on || (data.on = {});
  7789. var existing = on[event];
  7790. var callback = data.model.callback;
  7791. if (isDef(existing)) {
  7792. if (
  7793. Array.isArray(existing)
  7794. ? existing.indexOf(callback) === -1
  7795. : existing !== callback
  7796. ) {
  7797. on[event] = [callback].concat(existing);
  7798. }
  7799. } else {
  7800. on[event] = callback;
  7801. }
  7802. }
  7803. /* */
  7804. var SIMPLE_NORMALIZE = 1;
  7805. var ALWAYS_NORMALIZE = 2;
  7806. // wrapper function for providing a more flexible interface
  7807. // without getting yelled at by flow
  7808. function createElement (
  7809. context,
  7810. tag,
  7811. data,
  7812. children,
  7813. normalizationType,
  7814. alwaysNormalize
  7815. ) {
  7816. if (Array.isArray(data) || isPrimitive(data)) {
  7817. normalizationType = children;
  7818. children = data;
  7819. data = undefined;
  7820. }
  7821. if (isTrue(alwaysNormalize)) {
  7822. normalizationType = ALWAYS_NORMALIZE;
  7823. }
  7824. return _createElement(context, tag, data, children, normalizationType)
  7825. }
  7826. function _createElement (
  7827. context,
  7828. tag,
  7829. data,
  7830. children,
  7831. normalizationType
  7832. ) {
  7833. if (isDef(data) && isDef((data).__ob__)) {
  7834. true && warn(
  7835. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  7836. 'Always create fresh vnode data objects in each render!',
  7837. context
  7838. );
  7839. return createEmptyVNode()
  7840. }
  7841. // object syntax in v-bind
  7842. if (isDef(data) && isDef(data.is)) {
  7843. tag = data.is;
  7844. }
  7845. if (!tag) {
  7846. // in case of component :is set to falsy value
  7847. return createEmptyVNode()
  7848. }
  7849. // warn against non-primitive key
  7850. if ( true &&
  7851. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  7852. ) {
  7853. {
  7854. warn(
  7855. 'Avoid using non-primitive value as key, ' +
  7856. 'use string/number value instead.',
  7857. context
  7858. );
  7859. }
  7860. }
  7861. // support single function children as default scoped slot
  7862. if (Array.isArray(children) &&
  7863. typeof children[0] === 'function'
  7864. ) {
  7865. data = data || {};
  7866. data.scopedSlots = { default: children[0] };
  7867. children.length = 0;
  7868. }
  7869. if (normalizationType === ALWAYS_NORMALIZE) {
  7870. children = normalizeChildren(children);
  7871. } else if (normalizationType === SIMPLE_NORMALIZE) {
  7872. children = simpleNormalizeChildren(children);
  7873. }
  7874. var vnode, ns;
  7875. if (typeof tag === 'string') {
  7876. var Ctor;
  7877. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  7878. if (config.isReservedTag(tag)) {
  7879. // platform built-in elements
  7880. if ( true && isDef(data) && isDef(data.nativeOn)) {
  7881. warn(
  7882. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  7883. context
  7884. );
  7885. }
  7886. vnode = new VNode(
  7887. config.parsePlatformTagName(tag), data, children,
  7888. undefined, undefined, context
  7889. );
  7890. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  7891. // component
  7892. vnode = createComponent(Ctor, data, context, children, tag);
  7893. } else {
  7894. // unknown or unlisted namespaced elements
  7895. // check at runtime because it may get assigned a namespace when its
  7896. // parent normalizes children
  7897. vnode = new VNode(
  7898. tag, data, children,
  7899. undefined, undefined, context
  7900. );
  7901. }
  7902. } else {
  7903. // direct component options / constructor
  7904. vnode = createComponent(tag, data, context, children);
  7905. }
  7906. if (Array.isArray(vnode)) {
  7907. return vnode
  7908. } else if (isDef(vnode)) {
  7909. if (isDef(ns)) { applyNS(vnode, ns); }
  7910. if (isDef(data)) { registerDeepBindings(data); }
  7911. return vnode
  7912. } else {
  7913. return createEmptyVNode()
  7914. }
  7915. }
  7916. function applyNS (vnode, ns, force) {
  7917. vnode.ns = ns;
  7918. if (vnode.tag === 'foreignObject') {
  7919. // use default namespace inside foreignObject
  7920. ns = undefined;
  7921. force = true;
  7922. }
  7923. if (isDef(vnode.children)) {
  7924. for (var i = 0, l = vnode.children.length; i < l; i++) {
  7925. var child = vnode.children[i];
  7926. if (isDef(child.tag) && (
  7927. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  7928. applyNS(child, ns, force);
  7929. }
  7930. }
  7931. }
  7932. }
  7933. // ref #5318
  7934. // necessary to ensure parent re-render when deep bindings like :style and
  7935. // :class are used on slot nodes
  7936. function registerDeepBindings (data) {
  7937. if (isObject(data.style)) {
  7938. traverse(data.style);
  7939. }
  7940. if (isObject(data.class)) {
  7941. traverse(data.class);
  7942. }
  7943. }
  7944. /* */
  7945. function initRender (vm) {
  7946. vm._vnode = null; // the root of the child tree
  7947. vm._staticTrees = null; // v-once cached trees
  7948. var options = vm.$options;
  7949. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  7950. var renderContext = parentVnode && parentVnode.context;
  7951. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  7952. vm.$scopedSlots = emptyObject;
  7953. // bind the createElement fn to this instance
  7954. // so that we get proper render context inside it.
  7955. // args order: tag, data, children, normalizationType, alwaysNormalize
  7956. // internal version is used by render functions compiled from templates
  7957. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  7958. // normalization is always applied for the public version, used in
  7959. // user-written render functions.
  7960. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  7961. // $attrs & $listeners are exposed for easier HOC creation.
  7962. // they need to be reactive so that HOCs using them are always updated
  7963. var parentData = parentVnode && parentVnode.data;
  7964. /* istanbul ignore else */
  7965. if (true) {
  7966. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  7967. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  7968. }, true);
  7969. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  7970. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  7971. }, true);
  7972. } else {}
  7973. }
  7974. var currentRenderingInstance = null;
  7975. function renderMixin (Vue) {
  7976. // install runtime convenience helpers
  7977. installRenderHelpers(Vue.prototype);
  7978. Vue.prototype.$nextTick = function (fn) {
  7979. return nextTick(fn, this)
  7980. };
  7981. Vue.prototype._render = function () {
  7982. var vm = this;
  7983. var ref = vm.$options;
  7984. var render = ref.render;
  7985. var _parentVnode = ref._parentVnode;
  7986. if (_parentVnode) {
  7987. vm.$scopedSlots = normalizeScopedSlots(
  7988. _parentVnode.data.scopedSlots,
  7989. vm.$slots,
  7990. vm.$scopedSlots
  7991. );
  7992. }
  7993. // set parent vnode. this allows render functions to have access
  7994. // to the data on the placeholder node.
  7995. vm.$vnode = _parentVnode;
  7996. // render self
  7997. var vnode;
  7998. try {
  7999. // There's no need to maintain a stack because all render fns are called
  8000. // separately from one another. Nested component's render fns are called
  8001. // when parent component is patched.
  8002. currentRenderingInstance = vm;
  8003. vnode = render.call(vm._renderProxy, vm.$createElement);
  8004. } catch (e) {
  8005. handleError(e, vm, "render");
  8006. // return error render result,
  8007. // or previous vnode to prevent render error causing blank component
  8008. /* istanbul ignore else */
  8009. if ( true && vm.$options.renderError) {
  8010. try {
  8011. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  8012. } catch (e) {
  8013. handleError(e, vm, "renderError");
  8014. vnode = vm._vnode;
  8015. }
  8016. } else {
  8017. vnode = vm._vnode;
  8018. }
  8019. } finally {
  8020. currentRenderingInstance = null;
  8021. }
  8022. // if the returned array contains only a single node, allow it
  8023. if (Array.isArray(vnode) && vnode.length === 1) {
  8024. vnode = vnode[0];
  8025. }
  8026. // return empty vnode in case the render function errored out
  8027. if (!(vnode instanceof VNode)) {
  8028. if ( true && Array.isArray(vnode)) {
  8029. warn(
  8030. 'Multiple root nodes returned from render function. Render function ' +
  8031. 'should return a single root node.',
  8032. vm
  8033. );
  8034. }
  8035. vnode = createEmptyVNode();
  8036. }
  8037. // set parent
  8038. vnode.parent = _parentVnode;
  8039. return vnode
  8040. };
  8041. }
  8042. /* */
  8043. function ensureCtor (comp, base) {
  8044. if (
  8045. comp.__esModule ||
  8046. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  8047. ) {
  8048. comp = comp.default;
  8049. }
  8050. return isObject(comp)
  8051. ? base.extend(comp)
  8052. : comp
  8053. }
  8054. function createAsyncPlaceholder (
  8055. factory,
  8056. data,
  8057. context,
  8058. children,
  8059. tag
  8060. ) {
  8061. var node = createEmptyVNode();
  8062. node.asyncFactory = factory;
  8063. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  8064. return node
  8065. }
  8066. function resolveAsyncComponent (
  8067. factory,
  8068. baseCtor
  8069. ) {
  8070. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  8071. return factory.errorComp
  8072. }
  8073. if (isDef(factory.resolved)) {
  8074. return factory.resolved
  8075. }
  8076. var owner = currentRenderingInstance;
  8077. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  8078. // already pending
  8079. factory.owners.push(owner);
  8080. }
  8081. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  8082. return factory.loadingComp
  8083. }
  8084. if (owner && !isDef(factory.owners)) {
  8085. var owners = factory.owners = [owner];
  8086. var sync = true;
  8087. var timerLoading = null;
  8088. var timerTimeout = null
  8089. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  8090. var forceRender = function (renderCompleted) {
  8091. for (var i = 0, l = owners.length; i < l; i++) {
  8092. (owners[i]).$forceUpdate();
  8093. }
  8094. if (renderCompleted) {
  8095. owners.length = 0;
  8096. if (timerLoading !== null) {
  8097. clearTimeout(timerLoading);
  8098. timerLoading = null;
  8099. }
  8100. if (timerTimeout !== null) {
  8101. clearTimeout(timerTimeout);
  8102. timerTimeout = null;
  8103. }
  8104. }
  8105. };
  8106. var resolve = once(function (res) {
  8107. // cache resolved
  8108. factory.resolved = ensureCtor(res, baseCtor);
  8109. // invoke callbacks only if this is not a synchronous resolve
  8110. // (async resolves are shimmed as synchronous during SSR)
  8111. if (!sync) {
  8112. forceRender(true);
  8113. } else {
  8114. owners.length = 0;
  8115. }
  8116. });
  8117. var reject = once(function (reason) {
  8118. true && warn(
  8119. "Failed to resolve async component: " + (String(factory)) +
  8120. (reason ? ("\nReason: " + reason) : '')
  8121. );
  8122. if (isDef(factory.errorComp)) {
  8123. factory.error = true;
  8124. forceRender(true);
  8125. }
  8126. });
  8127. var res = factory(resolve, reject);
  8128. if (isObject(res)) {
  8129. if (isPromise(res)) {
  8130. // () => Promise
  8131. if (isUndef(factory.resolved)) {
  8132. res.then(resolve, reject);
  8133. }
  8134. } else if (isPromise(res.component)) {
  8135. res.component.then(resolve, reject);
  8136. if (isDef(res.error)) {
  8137. factory.errorComp = ensureCtor(res.error, baseCtor);
  8138. }
  8139. if (isDef(res.loading)) {
  8140. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  8141. if (res.delay === 0) {
  8142. factory.loading = true;
  8143. } else {
  8144. timerLoading = setTimeout(function () {
  8145. timerLoading = null;
  8146. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  8147. factory.loading = true;
  8148. forceRender(false);
  8149. }
  8150. }, res.delay || 200);
  8151. }
  8152. }
  8153. if (isDef(res.timeout)) {
  8154. timerTimeout = setTimeout(function () {
  8155. timerTimeout = null;
  8156. if (isUndef(factory.resolved)) {
  8157. reject(
  8158. true
  8159. ? ("timeout (" + (res.timeout) + "ms)")
  8160. : undefined
  8161. );
  8162. }
  8163. }, res.timeout);
  8164. }
  8165. }
  8166. }
  8167. sync = false;
  8168. // return in case resolved synchronously
  8169. return factory.loading
  8170. ? factory.loadingComp
  8171. : factory.resolved
  8172. }
  8173. }
  8174. /* */
  8175. function isAsyncPlaceholder (node) {
  8176. return node.isComment && node.asyncFactory
  8177. }
  8178. /* */
  8179. function getFirstComponentChild (children) {
  8180. if (Array.isArray(children)) {
  8181. for (var i = 0; i < children.length; i++) {
  8182. var c = children[i];
  8183. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  8184. return c
  8185. }
  8186. }
  8187. }
  8188. }
  8189. /* */
  8190. /* */
  8191. function initEvents (vm) {
  8192. vm._events = Object.create(null);
  8193. vm._hasHookEvent = false;
  8194. // init parent attached events
  8195. var listeners = vm.$options._parentListeners;
  8196. if (listeners) {
  8197. updateComponentListeners(vm, listeners);
  8198. }
  8199. }
  8200. var target;
  8201. function add (event, fn) {
  8202. target.$on(event, fn);
  8203. }
  8204. function remove$1 (event, fn) {
  8205. target.$off(event, fn);
  8206. }
  8207. function createOnceHandler (event, fn) {
  8208. var _target = target;
  8209. return function onceHandler () {
  8210. var res = fn.apply(null, arguments);
  8211. if (res !== null) {
  8212. _target.$off(event, onceHandler);
  8213. }
  8214. }
  8215. }
  8216. function updateComponentListeners (
  8217. vm,
  8218. listeners,
  8219. oldListeners
  8220. ) {
  8221. target = vm;
  8222. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  8223. target = undefined;
  8224. }
  8225. function eventsMixin (Vue) {
  8226. var hookRE = /^hook:/;
  8227. Vue.prototype.$on = function (event, fn) {
  8228. var vm = this;
  8229. if (Array.isArray(event)) {
  8230. for (var i = 0, l = event.length; i < l; i++) {
  8231. vm.$on(event[i], fn);
  8232. }
  8233. } else {
  8234. (vm._events[event] || (vm._events[event] = [])).push(fn);
  8235. // optimize hook:event cost by using a boolean flag marked at registration
  8236. // instead of a hash lookup
  8237. if (hookRE.test(event)) {
  8238. vm._hasHookEvent = true;
  8239. }
  8240. }
  8241. return vm
  8242. };
  8243. Vue.prototype.$once = function (event, fn) {
  8244. var vm = this;
  8245. function on () {
  8246. vm.$off(event, on);
  8247. fn.apply(vm, arguments);
  8248. }
  8249. on.fn = fn;
  8250. vm.$on(event, on);
  8251. return vm
  8252. };
  8253. Vue.prototype.$off = function (event, fn) {
  8254. var vm = this;
  8255. // all
  8256. if (!arguments.length) {
  8257. vm._events = Object.create(null);
  8258. return vm
  8259. }
  8260. // array of events
  8261. if (Array.isArray(event)) {
  8262. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  8263. vm.$off(event[i$1], fn);
  8264. }
  8265. return vm
  8266. }
  8267. // specific event
  8268. var cbs = vm._events[event];
  8269. if (!cbs) {
  8270. return vm
  8271. }
  8272. if (!fn) {
  8273. vm._events[event] = null;
  8274. return vm
  8275. }
  8276. // specific handler
  8277. var cb;
  8278. var i = cbs.length;
  8279. while (i--) {
  8280. cb = cbs[i];
  8281. if (cb === fn || cb.fn === fn) {
  8282. cbs.splice(i, 1);
  8283. break
  8284. }
  8285. }
  8286. return vm
  8287. };
  8288. Vue.prototype.$emit = function (event) {
  8289. var vm = this;
  8290. if (true) {
  8291. var lowerCaseEvent = event.toLowerCase();
  8292. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  8293. tip(
  8294. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  8295. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  8296. "Note that HTML attributes are case-insensitive and you cannot use " +
  8297. "v-on to listen to camelCase events when using in-DOM templates. " +
  8298. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  8299. );
  8300. }
  8301. }
  8302. var cbs = vm._events[event];
  8303. if (cbs) {
  8304. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  8305. var args = toArray(arguments, 1);
  8306. var info = "event handler for \"" + event + "\"";
  8307. for (var i = 0, l = cbs.length; i < l; i++) {
  8308. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  8309. }
  8310. }
  8311. return vm
  8312. };
  8313. }
  8314. /* */
  8315. var activeInstance = null;
  8316. var isUpdatingChildComponent = false;
  8317. function setActiveInstance(vm) {
  8318. var prevActiveInstance = activeInstance;
  8319. activeInstance = vm;
  8320. return function () {
  8321. activeInstance = prevActiveInstance;
  8322. }
  8323. }
  8324. function initLifecycle (vm) {
  8325. var options = vm.$options;
  8326. // locate first non-abstract parent
  8327. var parent = options.parent;
  8328. if (parent && !options.abstract) {
  8329. while (parent.$options.abstract && parent.$parent) {
  8330. parent = parent.$parent;
  8331. }
  8332. parent.$children.push(vm);
  8333. }
  8334. vm.$parent = parent;
  8335. vm.$root = parent ? parent.$root : vm;
  8336. vm.$children = [];
  8337. vm.$refs = {};
  8338. vm._watcher = null;
  8339. vm._inactive = null;
  8340. vm._directInactive = false;
  8341. vm._isMounted = false;
  8342. vm._isDestroyed = false;
  8343. vm._isBeingDestroyed = false;
  8344. }
  8345. function lifecycleMixin (Vue) {
  8346. Vue.prototype._update = function (vnode, hydrating) {
  8347. var vm = this;
  8348. var prevEl = vm.$el;
  8349. var prevVnode = vm._vnode;
  8350. var restoreActiveInstance = setActiveInstance(vm);
  8351. vm._vnode = vnode;
  8352. // Vue.prototype.__patch__ is injected in entry points
  8353. // based on the rendering backend used.
  8354. if (!prevVnode) {
  8355. // initial render
  8356. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  8357. } else {
  8358. // updates
  8359. vm.$el = vm.__patch__(prevVnode, vnode);
  8360. }
  8361. restoreActiveInstance();
  8362. // update __vue__ reference
  8363. if (prevEl) {
  8364. prevEl.__vue__ = null;
  8365. }
  8366. if (vm.$el) {
  8367. vm.$el.__vue__ = vm;
  8368. }
  8369. // if parent is an HOC, update its $el as well
  8370. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  8371. vm.$parent.$el = vm.$el;
  8372. }
  8373. // updated hook is called by the scheduler to ensure that children are
  8374. // updated in a parent's updated hook.
  8375. };
  8376. Vue.prototype.$forceUpdate = function () {
  8377. var vm = this;
  8378. if (vm._watcher) {
  8379. vm._watcher.update();
  8380. }
  8381. };
  8382. Vue.prototype.$destroy = function () {
  8383. var vm = this;
  8384. if (vm._isBeingDestroyed) {
  8385. return
  8386. }
  8387. callHook(vm, 'beforeDestroy');
  8388. vm._isBeingDestroyed = true;
  8389. // remove self from parent
  8390. var parent = vm.$parent;
  8391. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  8392. remove(parent.$children, vm);
  8393. }
  8394. // teardown watchers
  8395. if (vm._watcher) {
  8396. vm._watcher.teardown();
  8397. }
  8398. var i = vm._watchers.length;
  8399. while (i--) {
  8400. vm._watchers[i].teardown();
  8401. }
  8402. // remove reference from data ob
  8403. // frozen object may not have observer.
  8404. if (vm._data.__ob__) {
  8405. vm._data.__ob__.vmCount--;
  8406. }
  8407. // call the last hook...
  8408. vm._isDestroyed = true;
  8409. // invoke destroy hooks on current rendered tree
  8410. vm.__patch__(vm._vnode, null);
  8411. // fire destroyed hook
  8412. callHook(vm, 'destroyed');
  8413. // turn off all instance listeners.
  8414. vm.$off();
  8415. // remove __vue__ reference
  8416. if (vm.$el) {
  8417. vm.$el.__vue__ = null;
  8418. }
  8419. // release circular reference (#6759)
  8420. if (vm.$vnode) {
  8421. vm.$vnode.parent = null;
  8422. }
  8423. };
  8424. }
  8425. function updateChildComponent (
  8426. vm,
  8427. propsData,
  8428. listeners,
  8429. parentVnode,
  8430. renderChildren
  8431. ) {
  8432. if (true) {
  8433. isUpdatingChildComponent = true;
  8434. }
  8435. // determine whether component has slot children
  8436. // we need to do this before overwriting $options._renderChildren.
  8437. // check if there are dynamic scopedSlots (hand-written or compiled but with
  8438. // dynamic slot names). Static scoped slots compiled from template has the
  8439. // "$stable" marker.
  8440. var newScopedSlots = parentVnode.data.scopedSlots;
  8441. var oldScopedSlots = vm.$scopedSlots;
  8442. var hasDynamicScopedSlot = !!(
  8443. (newScopedSlots && !newScopedSlots.$stable) ||
  8444. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  8445. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  8446. );
  8447. // Any static slot children from the parent may have changed during parent's
  8448. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  8449. // update is necessary to ensure correctness.
  8450. var needsForceUpdate = !!(
  8451. renderChildren || // has new static slots
  8452. vm.$options._renderChildren || // has old static slots
  8453. hasDynamicScopedSlot
  8454. );
  8455. vm.$options._parentVnode = parentVnode;
  8456. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  8457. if (vm._vnode) { // update child tree's parent
  8458. vm._vnode.parent = parentVnode;
  8459. }
  8460. vm.$options._renderChildren = renderChildren;
  8461. // update $attrs and $listeners hash
  8462. // these are also reactive so they may trigger child update if the child
  8463. // used them during render
  8464. vm.$attrs = parentVnode.data.attrs || emptyObject;
  8465. vm.$listeners = listeners || emptyObject;
  8466. // update props
  8467. if (propsData && vm.$options.props) {
  8468. toggleObserving(false);
  8469. var props = vm._props;
  8470. var propKeys = vm.$options._propKeys || [];
  8471. for (var i = 0; i < propKeys.length; i++) {
  8472. var key = propKeys[i];
  8473. var propOptions = vm.$options.props; // wtf flow?
  8474. props[key] = validateProp(key, propOptions, propsData, vm);
  8475. }
  8476. toggleObserving(true);
  8477. // keep a copy of raw propsData
  8478. vm.$options.propsData = propsData;
  8479. }
  8480. // fixed by xxxxxx update properties(mp runtime)
  8481. vm._$updateProperties && vm._$updateProperties(vm);
  8482. // update listeners
  8483. listeners = listeners || emptyObject;
  8484. var oldListeners = vm.$options._parentListeners;
  8485. vm.$options._parentListeners = listeners;
  8486. updateComponentListeners(vm, listeners, oldListeners);
  8487. // resolve slots + force update if has children
  8488. if (needsForceUpdate) {
  8489. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  8490. vm.$forceUpdate();
  8491. }
  8492. if (true) {
  8493. isUpdatingChildComponent = false;
  8494. }
  8495. }
  8496. function isInInactiveTree (vm) {
  8497. while (vm && (vm = vm.$parent)) {
  8498. if (vm._inactive) { return true }
  8499. }
  8500. return false
  8501. }
  8502. function activateChildComponent (vm, direct) {
  8503. if (direct) {
  8504. vm._directInactive = false;
  8505. if (isInInactiveTree(vm)) {
  8506. return
  8507. }
  8508. } else if (vm._directInactive) {
  8509. return
  8510. }
  8511. if (vm._inactive || vm._inactive === null) {
  8512. vm._inactive = false;
  8513. for (var i = 0; i < vm.$children.length; i++) {
  8514. activateChildComponent(vm.$children[i]);
  8515. }
  8516. callHook(vm, 'activated');
  8517. }
  8518. }
  8519. function deactivateChildComponent (vm, direct) {
  8520. if (direct) {
  8521. vm._directInactive = true;
  8522. if (isInInactiveTree(vm)) {
  8523. return
  8524. }
  8525. }
  8526. if (!vm._inactive) {
  8527. vm._inactive = true;
  8528. for (var i = 0; i < vm.$children.length; i++) {
  8529. deactivateChildComponent(vm.$children[i]);
  8530. }
  8531. callHook(vm, 'deactivated');
  8532. }
  8533. }
  8534. function callHook (vm, hook) {
  8535. // #7573 disable dep collection when invoking lifecycle hooks
  8536. pushTarget();
  8537. var handlers = vm.$options[hook];
  8538. var info = hook + " hook";
  8539. if (handlers) {
  8540. for (var i = 0, j = handlers.length; i < j; i++) {
  8541. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  8542. }
  8543. }
  8544. if (vm._hasHookEvent) {
  8545. vm.$emit('hook:' + hook);
  8546. }
  8547. popTarget();
  8548. }
  8549. /* */
  8550. var MAX_UPDATE_COUNT = 100;
  8551. var queue = [];
  8552. var activatedChildren = [];
  8553. var has = {};
  8554. var circular = {};
  8555. var waiting = false;
  8556. var flushing = false;
  8557. var index = 0;
  8558. /**
  8559. * Reset the scheduler's state.
  8560. */
  8561. function resetSchedulerState () {
  8562. index = queue.length = activatedChildren.length = 0;
  8563. has = {};
  8564. if (true) {
  8565. circular = {};
  8566. }
  8567. waiting = flushing = false;
  8568. }
  8569. // Async edge case #6566 requires saving the timestamp when event listeners are
  8570. // attached. However, calling performance.now() has a perf overhead especially
  8571. // if the page has thousands of event listeners. Instead, we take a timestamp
  8572. // every time the scheduler flushes and use that for all event listeners
  8573. // attached during that flush.
  8574. var currentFlushTimestamp = 0;
  8575. // Async edge case fix requires storing an event listener's attach timestamp.
  8576. var getNow = Date.now;
  8577. // Determine what event timestamp the browser is using. Annoyingly, the
  8578. // timestamp can either be hi-res (relative to page load) or low-res
  8579. // (relative to UNIX epoch), so in order to compare time we have to use the
  8580. // same timestamp type when saving the flush timestamp.
  8581. // All IE versions use low-res event timestamps, and have problematic clock
  8582. // implementations (#9632)
  8583. if (inBrowser && !isIE) {
  8584. var performance = window.performance;
  8585. if (
  8586. performance &&
  8587. typeof performance.now === 'function' &&
  8588. getNow() > document.createEvent('Event').timeStamp
  8589. ) {
  8590. // if the event timestamp, although evaluated AFTER the Date.now(), is
  8591. // smaller than it, it means the event is using a hi-res timestamp,
  8592. // and we need to use the hi-res version for event listener timestamps as
  8593. // well.
  8594. getNow = function () { return performance.now(); };
  8595. }
  8596. }
  8597. /**
  8598. * Flush both queues and run the watchers.
  8599. */
  8600. function flushSchedulerQueue () {
  8601. currentFlushTimestamp = getNow();
  8602. flushing = true;
  8603. var watcher, id;
  8604. // Sort queue before flush.
  8605. // This ensures that:
  8606. // 1. Components are updated from parent to child. (because parent is always
  8607. // created before the child)
  8608. // 2. A component's user watchers are run before its render watcher (because
  8609. // user watchers are created before the render watcher)
  8610. // 3. If a component is destroyed during a parent component's watcher run,
  8611. // its watchers can be skipped.
  8612. queue.sort(function (a, b) { return a.id - b.id; });
  8613. // do not cache length because more watchers might be pushed
  8614. // as we run existing watchers
  8615. for (index = 0; index < queue.length; index++) {
  8616. watcher = queue[index];
  8617. if (watcher.before) {
  8618. watcher.before();
  8619. }
  8620. id = watcher.id;
  8621. has[id] = null;
  8622. watcher.run();
  8623. // in dev build, check and stop circular updates.
  8624. if ( true && has[id] != null) {
  8625. circular[id] = (circular[id] || 0) + 1;
  8626. if (circular[id] > MAX_UPDATE_COUNT) {
  8627. warn(
  8628. 'You may have an infinite update loop ' + (
  8629. watcher.user
  8630. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  8631. : "in a component render function."
  8632. ),
  8633. watcher.vm
  8634. );
  8635. break
  8636. }
  8637. }
  8638. }
  8639. // keep copies of post queues before resetting state
  8640. var activatedQueue = activatedChildren.slice();
  8641. var updatedQueue = queue.slice();
  8642. resetSchedulerState();
  8643. // call component updated and activated hooks
  8644. callActivatedHooks(activatedQueue);
  8645. callUpdatedHooks(updatedQueue);
  8646. // devtool hook
  8647. /* istanbul ignore if */
  8648. if (devtools && config.devtools) {
  8649. devtools.emit('flush');
  8650. }
  8651. }
  8652. function callUpdatedHooks (queue) {
  8653. var i = queue.length;
  8654. while (i--) {
  8655. var watcher = queue[i];
  8656. var vm = watcher.vm;
  8657. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  8658. callHook(vm, 'updated');
  8659. }
  8660. }
  8661. }
  8662. /**
  8663. * Queue a kept-alive component that was activated during patch.
  8664. * The queue will be processed after the entire tree has been patched.
  8665. */
  8666. function queueActivatedComponent (vm) {
  8667. // setting _inactive to false here so that a render function can
  8668. // rely on checking whether it's in an inactive tree (e.g. router-view)
  8669. vm._inactive = false;
  8670. activatedChildren.push(vm);
  8671. }
  8672. function callActivatedHooks (queue) {
  8673. for (var i = 0; i < queue.length; i++) {
  8674. queue[i]._inactive = true;
  8675. activateChildComponent(queue[i], true /* true */);
  8676. }
  8677. }
  8678. /**
  8679. * Push a watcher into the watcher queue.
  8680. * Jobs with duplicate IDs will be skipped unless it's
  8681. * pushed when the queue is being flushed.
  8682. */
  8683. function queueWatcher (watcher) {
  8684. var id = watcher.id;
  8685. if (has[id] == null) {
  8686. has[id] = true;
  8687. if (!flushing) {
  8688. queue.push(watcher);
  8689. } else {
  8690. // if already flushing, splice the watcher based on its id
  8691. // if already past its id, it will be run next immediately.
  8692. var i = queue.length - 1;
  8693. while (i > index && queue[i].id > watcher.id) {
  8694. i--;
  8695. }
  8696. queue.splice(i + 1, 0, watcher);
  8697. }
  8698. // queue the flush
  8699. if (!waiting) {
  8700. waiting = true;
  8701. if ( true && !config.async) {
  8702. flushSchedulerQueue();
  8703. return
  8704. }
  8705. nextTick(flushSchedulerQueue);
  8706. }
  8707. }
  8708. }
  8709. /* */
  8710. var uid$2 = 0;
  8711. /**
  8712. * A watcher parses an expression, collects dependencies,
  8713. * and fires callback when the expression value changes.
  8714. * This is used for both the $watch() api and directives.
  8715. */
  8716. var Watcher = function Watcher (
  8717. vm,
  8718. expOrFn,
  8719. cb,
  8720. options,
  8721. isRenderWatcher
  8722. ) {
  8723. this.vm = vm;
  8724. if (isRenderWatcher) {
  8725. vm._watcher = this;
  8726. }
  8727. vm._watchers.push(this);
  8728. // options
  8729. if (options) {
  8730. this.deep = !!options.deep;
  8731. this.user = !!options.user;
  8732. this.lazy = !!options.lazy;
  8733. this.sync = !!options.sync;
  8734. this.before = options.before;
  8735. } else {
  8736. this.deep = this.user = this.lazy = this.sync = false;
  8737. }
  8738. this.cb = cb;
  8739. this.id = ++uid$2; // uid for batching
  8740. this.active = true;
  8741. this.dirty = this.lazy; // for lazy watchers
  8742. this.deps = [];
  8743. this.newDeps = [];
  8744. this.depIds = new _Set();
  8745. this.newDepIds = new _Set();
  8746. this.expression = true
  8747. ? expOrFn.toString()
  8748. : undefined;
  8749. // parse expression for getter
  8750. if (typeof expOrFn === 'function') {
  8751. this.getter = expOrFn;
  8752. } else {
  8753. this.getter = parsePath(expOrFn);
  8754. if (!this.getter) {
  8755. this.getter = noop;
  8756. true && warn(
  8757. "Failed watching path: \"" + expOrFn + "\" " +
  8758. 'Watcher only accepts simple dot-delimited paths. ' +
  8759. 'For full control, use a function instead.',
  8760. vm
  8761. );
  8762. }
  8763. }
  8764. this.value = this.lazy
  8765. ? undefined
  8766. : this.get();
  8767. };
  8768. /**
  8769. * Evaluate the getter, and re-collect dependencies.
  8770. */
  8771. Watcher.prototype.get = function get () {
  8772. pushTarget(this);
  8773. var value;
  8774. var vm = this.vm;
  8775. try {
  8776. value = this.getter.call(vm, vm);
  8777. } catch (e) {
  8778. if (this.user) {
  8779. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  8780. } else {
  8781. throw e
  8782. }
  8783. } finally {
  8784. // "touch" every property so they are all tracked as
  8785. // dependencies for deep watching
  8786. if (this.deep) {
  8787. traverse(value);
  8788. }
  8789. popTarget();
  8790. this.cleanupDeps();
  8791. }
  8792. return value
  8793. };
  8794. /**
  8795. * Add a dependency to this directive.
  8796. */
  8797. Watcher.prototype.addDep = function addDep (dep) {
  8798. var id = dep.id;
  8799. if (!this.newDepIds.has(id)) {
  8800. this.newDepIds.add(id);
  8801. this.newDeps.push(dep);
  8802. if (!this.depIds.has(id)) {
  8803. dep.addSub(this);
  8804. }
  8805. }
  8806. };
  8807. /**
  8808. * Clean up for dependency collection.
  8809. */
  8810. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  8811. var i = this.deps.length;
  8812. while (i--) {
  8813. var dep = this.deps[i];
  8814. if (!this.newDepIds.has(dep.id)) {
  8815. dep.removeSub(this);
  8816. }
  8817. }
  8818. var tmp = this.depIds;
  8819. this.depIds = this.newDepIds;
  8820. this.newDepIds = tmp;
  8821. this.newDepIds.clear();
  8822. tmp = this.deps;
  8823. this.deps = this.newDeps;
  8824. this.newDeps = tmp;
  8825. this.newDeps.length = 0;
  8826. };
  8827. /**
  8828. * Subscriber interface.
  8829. * Will be called when a dependency changes.
  8830. */
  8831. Watcher.prototype.update = function update () {
  8832. /* istanbul ignore else */
  8833. if (this.lazy) {
  8834. this.dirty = true;
  8835. } else if (this.sync) {
  8836. this.run();
  8837. } else {
  8838. queueWatcher(this);
  8839. }
  8840. };
  8841. /**
  8842. * Scheduler job interface.
  8843. * Will be called by the scheduler.
  8844. */
  8845. Watcher.prototype.run = function run () {
  8846. if (this.active) {
  8847. var value = this.get();
  8848. if (
  8849. value !== this.value ||
  8850. // Deep watchers and watchers on Object/Arrays should fire even
  8851. // when the value is the same, because the value may
  8852. // have mutated.
  8853. isObject(value) ||
  8854. this.deep
  8855. ) {
  8856. // set new value
  8857. var oldValue = this.value;
  8858. this.value = value;
  8859. if (this.user) {
  8860. try {
  8861. this.cb.call(this.vm, value, oldValue);
  8862. } catch (e) {
  8863. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  8864. }
  8865. } else {
  8866. this.cb.call(this.vm, value, oldValue);
  8867. }
  8868. }
  8869. }
  8870. };
  8871. /**
  8872. * Evaluate the value of the watcher.
  8873. * This only gets called for lazy watchers.
  8874. */
  8875. Watcher.prototype.evaluate = function evaluate () {
  8876. this.value = this.get();
  8877. this.dirty = false;
  8878. };
  8879. /**
  8880. * Depend on all deps collected by this watcher.
  8881. */
  8882. Watcher.prototype.depend = function depend () {
  8883. var i = this.deps.length;
  8884. while (i--) {
  8885. this.deps[i].depend();
  8886. }
  8887. };
  8888. /**
  8889. * Remove self from all dependencies' subscriber list.
  8890. */
  8891. Watcher.prototype.teardown = function teardown () {
  8892. if (this.active) {
  8893. // remove self from vm's watcher list
  8894. // this is a somewhat expensive operation so we skip it
  8895. // if the vm is being destroyed.
  8896. if (!this.vm._isBeingDestroyed) {
  8897. remove(this.vm._watchers, this);
  8898. }
  8899. var i = this.deps.length;
  8900. while (i--) {
  8901. this.deps[i].removeSub(this);
  8902. }
  8903. this.active = false;
  8904. }
  8905. };
  8906. /* */
  8907. var sharedPropertyDefinition = {
  8908. enumerable: true,
  8909. configurable: true,
  8910. get: noop,
  8911. set: noop
  8912. };
  8913. function proxy (target, sourceKey, key) {
  8914. sharedPropertyDefinition.get = function proxyGetter () {
  8915. return this[sourceKey][key]
  8916. };
  8917. sharedPropertyDefinition.set = function proxySetter (val) {
  8918. this[sourceKey][key] = val;
  8919. };
  8920. Object.defineProperty(target, key, sharedPropertyDefinition);
  8921. }
  8922. function initState (vm) {
  8923. vm._watchers = [];
  8924. var opts = vm.$options;
  8925. if (opts.props) { initProps(vm, opts.props); }
  8926. if (opts.methods) { initMethods(vm, opts.methods); }
  8927. if (opts.data) {
  8928. initData(vm);
  8929. } else {
  8930. observe(vm._data = {}, true /* asRootData */);
  8931. }
  8932. if (opts.computed) { initComputed(vm, opts.computed); }
  8933. if (opts.watch && opts.watch !== nativeWatch) {
  8934. initWatch(vm, opts.watch);
  8935. }
  8936. }
  8937. function initProps (vm, propsOptions) {
  8938. var propsData = vm.$options.propsData || {};
  8939. var props = vm._props = {};
  8940. // cache prop keys so that future props updates can iterate using Array
  8941. // instead of dynamic object key enumeration.
  8942. var keys = vm.$options._propKeys = [];
  8943. var isRoot = !vm.$parent;
  8944. // root instance props should be converted
  8945. if (!isRoot) {
  8946. toggleObserving(false);
  8947. }
  8948. var loop = function ( key ) {
  8949. keys.push(key);
  8950. var value = validateProp(key, propsOptions, propsData, vm);
  8951. /* istanbul ignore else */
  8952. if (true) {
  8953. var hyphenatedKey = hyphenate(key);
  8954. if (isReservedAttribute(hyphenatedKey) ||
  8955. config.isReservedAttr(hyphenatedKey)) {
  8956. warn(
  8957. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  8958. vm
  8959. );
  8960. }
  8961. defineReactive$$1(props, key, value, function () {
  8962. if (!isRoot && !isUpdatingChildComponent) {
  8963. {
  8964. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  8965. return
  8966. }
  8967. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  8968. if(
  8969. key === 'value' &&
  8970. Array.isArray(vm.$options.behaviors) &&
  8971. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8972. ){
  8973. return
  8974. }
  8975. if(vm._getFormData){
  8976. return
  8977. }
  8978. var $parent = vm.$parent;
  8979. while($parent){
  8980. if($parent.__next_tick_pending){
  8981. return
  8982. }
  8983. $parent = $parent.$parent;
  8984. }
  8985. }
  8986. warn(
  8987. "Avoid mutating a prop directly since the value will be " +
  8988. "overwritten whenever the parent component re-renders. " +
  8989. "Instead, use a data or computed property based on the prop's " +
  8990. "value. Prop being mutated: \"" + key + "\"",
  8991. vm
  8992. );
  8993. }
  8994. });
  8995. } else {}
  8996. // static props are already proxied on the component's prototype
  8997. // during Vue.extend(). We only need to proxy props defined at
  8998. // instantiation here.
  8999. if (!(key in vm)) {
  9000. proxy(vm, "_props", key);
  9001. }
  9002. };
  9003. for (var key in propsOptions) loop( key );
  9004. toggleObserving(true);
  9005. }
  9006. function initData (vm) {
  9007. var data = vm.$options.data;
  9008. data = vm._data = typeof data === 'function'
  9009. ? getData(data, vm)
  9010. : data || {};
  9011. if (!isPlainObject(data)) {
  9012. data = {};
  9013. true && warn(
  9014. 'data functions should return an object:\n' +
  9015. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  9016. vm
  9017. );
  9018. }
  9019. // proxy data on instance
  9020. var keys = Object.keys(data);
  9021. var props = vm.$options.props;
  9022. var methods = vm.$options.methods;
  9023. var i = keys.length;
  9024. while (i--) {
  9025. var key = keys[i];
  9026. if (true) {
  9027. if (methods && hasOwn(methods, key)) {
  9028. warn(
  9029. ("Method \"" + key + "\" has already been defined as a data property."),
  9030. vm
  9031. );
  9032. }
  9033. }
  9034. if (props && hasOwn(props, key)) {
  9035. true && warn(
  9036. "The data property \"" + key + "\" is already declared as a prop. " +
  9037. "Use prop default value instead.",
  9038. vm
  9039. );
  9040. } else if (!isReserved(key)) {
  9041. proxy(vm, "_data", key);
  9042. }
  9043. }
  9044. // observe data
  9045. observe(data, true /* asRootData */);
  9046. }
  9047. function getData (data, vm) {
  9048. // #7573 disable dep collection when invoking data getters
  9049. pushTarget();
  9050. try {
  9051. return data.call(vm, vm)
  9052. } catch (e) {
  9053. handleError(e, vm, "data()");
  9054. return {}
  9055. } finally {
  9056. popTarget();
  9057. }
  9058. }
  9059. var computedWatcherOptions = { lazy: true };
  9060. function initComputed (vm, computed) {
  9061. // $flow-disable-line
  9062. var watchers = vm._computedWatchers = Object.create(null);
  9063. // computed properties are just getters during SSR
  9064. var isSSR = isServerRendering();
  9065. for (var key in computed) {
  9066. var userDef = computed[key];
  9067. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  9068. if ( true && getter == null) {
  9069. warn(
  9070. ("Getter is missing for computed property \"" + key + "\"."),
  9071. vm
  9072. );
  9073. }
  9074. if (!isSSR) {
  9075. // create internal watcher for the computed property.
  9076. watchers[key] = new Watcher(
  9077. vm,
  9078. getter || noop,
  9079. noop,
  9080. computedWatcherOptions
  9081. );
  9082. }
  9083. // component-defined computed properties are already defined on the
  9084. // component prototype. We only need to define computed properties defined
  9085. // at instantiation here.
  9086. if (!(key in vm)) {
  9087. defineComputed(vm, key, userDef);
  9088. } else if (true) {
  9089. if (key in vm.$data) {
  9090. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  9091. } else if (vm.$options.props && key in vm.$options.props) {
  9092. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  9093. }
  9094. }
  9095. }
  9096. }
  9097. function defineComputed (
  9098. target,
  9099. key,
  9100. userDef
  9101. ) {
  9102. var shouldCache = !isServerRendering();
  9103. if (typeof userDef === 'function') {
  9104. sharedPropertyDefinition.get = shouldCache
  9105. ? createComputedGetter(key)
  9106. : createGetterInvoker(userDef);
  9107. sharedPropertyDefinition.set = noop;
  9108. } else {
  9109. sharedPropertyDefinition.get = userDef.get
  9110. ? shouldCache && userDef.cache !== false
  9111. ? createComputedGetter(key)
  9112. : createGetterInvoker(userDef.get)
  9113. : noop;
  9114. sharedPropertyDefinition.set = userDef.set || noop;
  9115. }
  9116. if ( true &&
  9117. sharedPropertyDefinition.set === noop) {
  9118. sharedPropertyDefinition.set = function () {
  9119. warn(
  9120. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  9121. this
  9122. );
  9123. };
  9124. }
  9125. Object.defineProperty(target, key, sharedPropertyDefinition);
  9126. }
  9127. function createComputedGetter (key) {
  9128. return function computedGetter () {
  9129. var watcher = this._computedWatchers && this._computedWatchers[key];
  9130. if (watcher) {
  9131. if (watcher.dirty) {
  9132. watcher.evaluate();
  9133. }
  9134. if (Dep.SharedObject.target) {// fixed by xxxxxx
  9135. watcher.depend();
  9136. }
  9137. return watcher.value
  9138. }
  9139. }
  9140. }
  9141. function createGetterInvoker(fn) {
  9142. return function computedGetter () {
  9143. return fn.call(this, this)
  9144. }
  9145. }
  9146. function initMethods (vm, methods) {
  9147. var props = vm.$options.props;
  9148. for (var key in methods) {
  9149. if (true) {
  9150. if (typeof methods[key] !== 'function') {
  9151. warn(
  9152. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  9153. "Did you reference the function correctly?",
  9154. vm
  9155. );
  9156. }
  9157. if (props && hasOwn(props, key)) {
  9158. warn(
  9159. ("Method \"" + key + "\" has already been defined as a prop."),
  9160. vm
  9161. );
  9162. }
  9163. if ((key in vm) && isReserved(key)) {
  9164. warn(
  9165. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  9166. "Avoid defining component methods that start with _ or $."
  9167. );
  9168. }
  9169. }
  9170. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  9171. }
  9172. }
  9173. function initWatch (vm, watch) {
  9174. for (var key in watch) {
  9175. var handler = watch[key];
  9176. if (Array.isArray(handler)) {
  9177. for (var i = 0; i < handler.length; i++) {
  9178. createWatcher(vm, key, handler[i]);
  9179. }
  9180. } else {
  9181. createWatcher(vm, key, handler);
  9182. }
  9183. }
  9184. }
  9185. function createWatcher (
  9186. vm,
  9187. expOrFn,
  9188. handler,
  9189. options
  9190. ) {
  9191. if (isPlainObject(handler)) {
  9192. options = handler;
  9193. handler = handler.handler;
  9194. }
  9195. if (typeof handler === 'string') {
  9196. handler = vm[handler];
  9197. }
  9198. return vm.$watch(expOrFn, handler, options)
  9199. }
  9200. function stateMixin (Vue) {
  9201. // flow somehow has problems with directly declared definition object
  9202. // when using Object.defineProperty, so we have to procedurally build up
  9203. // the object here.
  9204. var dataDef = {};
  9205. dataDef.get = function () { return this._data };
  9206. var propsDef = {};
  9207. propsDef.get = function () { return this._props };
  9208. if (true) {
  9209. dataDef.set = function () {
  9210. warn(
  9211. 'Avoid replacing instance root $data. ' +
  9212. 'Use nested data properties instead.',
  9213. this
  9214. );
  9215. };
  9216. propsDef.set = function () {
  9217. warn("$props is readonly.", this);
  9218. };
  9219. }
  9220. Object.defineProperty(Vue.prototype, '$data', dataDef);
  9221. Object.defineProperty(Vue.prototype, '$props', propsDef);
  9222. Vue.prototype.$set = set;
  9223. Vue.prototype.$delete = del;
  9224. Vue.prototype.$watch = function (
  9225. expOrFn,
  9226. cb,
  9227. options
  9228. ) {
  9229. var vm = this;
  9230. if (isPlainObject(cb)) {
  9231. return createWatcher(vm, expOrFn, cb, options)
  9232. }
  9233. options = options || {};
  9234. options.user = true;
  9235. var watcher = new Watcher(vm, expOrFn, cb, options);
  9236. if (options.immediate) {
  9237. try {
  9238. cb.call(vm, watcher.value);
  9239. } catch (error) {
  9240. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  9241. }
  9242. }
  9243. return function unwatchFn () {
  9244. watcher.teardown();
  9245. }
  9246. };
  9247. }
  9248. /* */
  9249. var uid$3 = 0;
  9250. function initMixin (Vue) {
  9251. Vue.prototype._init = function (options) {
  9252. var vm = this;
  9253. // a uid
  9254. vm._uid = uid$3++;
  9255. var startTag, endTag;
  9256. /* istanbul ignore if */
  9257. if ( true && config.performance && mark) {
  9258. startTag = "vue-perf-start:" + (vm._uid);
  9259. endTag = "vue-perf-end:" + (vm._uid);
  9260. mark(startTag);
  9261. }
  9262. // a flag to avoid this being observed
  9263. vm._isVue = true;
  9264. // merge options
  9265. if (options && options._isComponent) {
  9266. // optimize internal component instantiation
  9267. // since dynamic options merging is pretty slow, and none of the
  9268. // internal component options needs special treatment.
  9269. initInternalComponent(vm, options);
  9270. } else {
  9271. vm.$options = mergeOptions(
  9272. resolveConstructorOptions(vm.constructor),
  9273. options || {},
  9274. vm
  9275. );
  9276. }
  9277. /* istanbul ignore else */
  9278. if (true) {
  9279. initProxy(vm);
  9280. } else {}
  9281. // expose real self
  9282. vm._self = vm;
  9283. initLifecycle(vm);
  9284. initEvents(vm);
  9285. initRender(vm);
  9286. callHook(vm, 'beforeCreate');
  9287. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  9288. initState(vm);
  9289. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  9290. !vm._$fallback && callHook(vm, 'created');
  9291. /* istanbul ignore if */
  9292. if ( true && config.performance && mark) {
  9293. vm._name = formatComponentName(vm, false);
  9294. mark(endTag);
  9295. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  9296. }
  9297. if (vm.$options.el) {
  9298. vm.$mount(vm.$options.el);
  9299. }
  9300. };
  9301. }
  9302. function initInternalComponent (vm, options) {
  9303. var opts = vm.$options = Object.create(vm.constructor.options);
  9304. // doing this because it's faster than dynamic enumeration.
  9305. var parentVnode = options._parentVnode;
  9306. opts.parent = options.parent;
  9307. opts._parentVnode = parentVnode;
  9308. var vnodeComponentOptions = parentVnode.componentOptions;
  9309. opts.propsData = vnodeComponentOptions.propsData;
  9310. opts._parentListeners = vnodeComponentOptions.listeners;
  9311. opts._renderChildren = vnodeComponentOptions.children;
  9312. opts._componentTag = vnodeComponentOptions.tag;
  9313. if (options.render) {
  9314. opts.render = options.render;
  9315. opts.staticRenderFns = options.staticRenderFns;
  9316. }
  9317. }
  9318. function resolveConstructorOptions (Ctor) {
  9319. var options = Ctor.options;
  9320. if (Ctor.super) {
  9321. var superOptions = resolveConstructorOptions(Ctor.super);
  9322. var cachedSuperOptions = Ctor.superOptions;
  9323. if (superOptions !== cachedSuperOptions) {
  9324. // super option changed,
  9325. // need to resolve new options.
  9326. Ctor.superOptions = superOptions;
  9327. // check if there are any late-modified/attached options (#4976)
  9328. var modifiedOptions = resolveModifiedOptions(Ctor);
  9329. // update base extend options
  9330. if (modifiedOptions) {
  9331. extend(Ctor.extendOptions, modifiedOptions);
  9332. }
  9333. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  9334. if (options.name) {
  9335. options.components[options.name] = Ctor;
  9336. }
  9337. }
  9338. }
  9339. return options
  9340. }
  9341. function resolveModifiedOptions (Ctor) {
  9342. var modified;
  9343. var latest = Ctor.options;
  9344. var sealed = Ctor.sealedOptions;
  9345. for (var key in latest) {
  9346. if (latest[key] !== sealed[key]) {
  9347. if (!modified) { modified = {}; }
  9348. modified[key] = latest[key];
  9349. }
  9350. }
  9351. return modified
  9352. }
  9353. function Vue (options) {
  9354. if ( true &&
  9355. !(this instanceof Vue)
  9356. ) {
  9357. warn('Vue is a constructor and should be called with the `new` keyword');
  9358. }
  9359. this._init(options);
  9360. }
  9361. initMixin(Vue);
  9362. stateMixin(Vue);
  9363. eventsMixin(Vue);
  9364. lifecycleMixin(Vue);
  9365. renderMixin(Vue);
  9366. /* */
  9367. function initUse (Vue) {
  9368. Vue.use = function (plugin) {
  9369. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  9370. if (installedPlugins.indexOf(plugin) > -1) {
  9371. return this
  9372. }
  9373. // additional parameters
  9374. var args = toArray(arguments, 1);
  9375. args.unshift(this);
  9376. if (typeof plugin.install === 'function') {
  9377. plugin.install.apply(plugin, args);
  9378. } else if (typeof plugin === 'function') {
  9379. plugin.apply(null, args);
  9380. }
  9381. installedPlugins.push(plugin);
  9382. return this
  9383. };
  9384. }
  9385. /* */
  9386. function initMixin$1 (Vue) {
  9387. Vue.mixin = function (mixin) {
  9388. this.options = mergeOptions(this.options, mixin);
  9389. return this
  9390. };
  9391. }
  9392. /* */
  9393. function initExtend (Vue) {
  9394. /**
  9395. * Each instance constructor, including Vue, has a unique
  9396. * cid. This enables us to create wrapped "child
  9397. * constructors" for prototypal inheritance and cache them.
  9398. */
  9399. Vue.cid = 0;
  9400. var cid = 1;
  9401. /**
  9402. * Class inheritance
  9403. */
  9404. Vue.extend = function (extendOptions) {
  9405. extendOptions = extendOptions || {};
  9406. var Super = this;
  9407. var SuperId = Super.cid;
  9408. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  9409. if (cachedCtors[SuperId]) {
  9410. return cachedCtors[SuperId]
  9411. }
  9412. var name = extendOptions.name || Super.options.name;
  9413. if ( true && name) {
  9414. validateComponentName(name);
  9415. }
  9416. var Sub = function VueComponent (options) {
  9417. this._init(options);
  9418. };
  9419. Sub.prototype = Object.create(Super.prototype);
  9420. Sub.prototype.constructor = Sub;
  9421. Sub.cid = cid++;
  9422. Sub.options = mergeOptions(
  9423. Super.options,
  9424. extendOptions
  9425. );
  9426. Sub['super'] = Super;
  9427. // For props and computed properties, we define the proxy getters on
  9428. // the Vue instances at extension time, on the extended prototype. This
  9429. // avoids Object.defineProperty calls for each instance created.
  9430. if (Sub.options.props) {
  9431. initProps$1(Sub);
  9432. }
  9433. if (Sub.options.computed) {
  9434. initComputed$1(Sub);
  9435. }
  9436. // allow further extension/mixin/plugin usage
  9437. Sub.extend = Super.extend;
  9438. Sub.mixin = Super.mixin;
  9439. Sub.use = Super.use;
  9440. // create asset registers, so extended classes
  9441. // can have their private assets too.
  9442. ASSET_TYPES.forEach(function (type) {
  9443. Sub[type] = Super[type];
  9444. });
  9445. // enable recursive self-lookup
  9446. if (name) {
  9447. Sub.options.components[name] = Sub;
  9448. }
  9449. // keep a reference to the super options at extension time.
  9450. // later at instantiation we can check if Super's options have
  9451. // been updated.
  9452. Sub.superOptions = Super.options;
  9453. Sub.extendOptions = extendOptions;
  9454. Sub.sealedOptions = extend({}, Sub.options);
  9455. // cache constructor
  9456. cachedCtors[SuperId] = Sub;
  9457. return Sub
  9458. };
  9459. }
  9460. function initProps$1 (Comp) {
  9461. var props = Comp.options.props;
  9462. for (var key in props) {
  9463. proxy(Comp.prototype, "_props", key);
  9464. }
  9465. }
  9466. function initComputed$1 (Comp) {
  9467. var computed = Comp.options.computed;
  9468. for (var key in computed) {
  9469. defineComputed(Comp.prototype, key, computed[key]);
  9470. }
  9471. }
  9472. /* */
  9473. function initAssetRegisters (Vue) {
  9474. /**
  9475. * Create asset registration methods.
  9476. */
  9477. ASSET_TYPES.forEach(function (type) {
  9478. Vue[type] = function (
  9479. id,
  9480. definition
  9481. ) {
  9482. if (!definition) {
  9483. return this.options[type + 's'][id]
  9484. } else {
  9485. /* istanbul ignore if */
  9486. if ( true && type === 'component') {
  9487. validateComponentName(id);
  9488. }
  9489. if (type === 'component' && isPlainObject(definition)) {
  9490. definition.name = definition.name || id;
  9491. definition = this.options._base.extend(definition);
  9492. }
  9493. if (type === 'directive' && typeof definition === 'function') {
  9494. definition = { bind: definition, update: definition };
  9495. }
  9496. this.options[type + 's'][id] = definition;
  9497. return definition
  9498. }
  9499. };
  9500. });
  9501. }
  9502. /* */
  9503. function getComponentName (opts) {
  9504. return opts && (opts.Ctor.options.name || opts.tag)
  9505. }
  9506. function matches (pattern, name) {
  9507. if (Array.isArray(pattern)) {
  9508. return pattern.indexOf(name) > -1
  9509. } else if (typeof pattern === 'string') {
  9510. return pattern.split(',').indexOf(name) > -1
  9511. } else if (isRegExp(pattern)) {
  9512. return pattern.test(name)
  9513. }
  9514. /* istanbul ignore next */
  9515. return false
  9516. }
  9517. function pruneCache (keepAliveInstance, filter) {
  9518. var cache = keepAliveInstance.cache;
  9519. var keys = keepAliveInstance.keys;
  9520. var _vnode = keepAliveInstance._vnode;
  9521. for (var key in cache) {
  9522. var cachedNode = cache[key];
  9523. if (cachedNode) {
  9524. var name = getComponentName(cachedNode.componentOptions);
  9525. if (name && !filter(name)) {
  9526. pruneCacheEntry(cache, key, keys, _vnode);
  9527. }
  9528. }
  9529. }
  9530. }
  9531. function pruneCacheEntry (
  9532. cache,
  9533. key,
  9534. keys,
  9535. current
  9536. ) {
  9537. var cached$$1 = cache[key];
  9538. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  9539. cached$$1.componentInstance.$destroy();
  9540. }
  9541. cache[key] = null;
  9542. remove(keys, key);
  9543. }
  9544. var patternTypes = [String, RegExp, Array];
  9545. var KeepAlive = {
  9546. name: 'keep-alive',
  9547. abstract: true,
  9548. props: {
  9549. include: patternTypes,
  9550. exclude: patternTypes,
  9551. max: [String, Number]
  9552. },
  9553. created: function created () {
  9554. this.cache = Object.create(null);
  9555. this.keys = [];
  9556. },
  9557. destroyed: function destroyed () {
  9558. for (var key in this.cache) {
  9559. pruneCacheEntry(this.cache, key, this.keys);
  9560. }
  9561. },
  9562. mounted: function mounted () {
  9563. var this$1 = this;
  9564. this.$watch('include', function (val) {
  9565. pruneCache(this$1, function (name) { return matches(val, name); });
  9566. });
  9567. this.$watch('exclude', function (val) {
  9568. pruneCache(this$1, function (name) { return !matches(val, name); });
  9569. });
  9570. },
  9571. render: function render () {
  9572. var slot = this.$slots.default;
  9573. var vnode = getFirstComponentChild(slot);
  9574. var componentOptions = vnode && vnode.componentOptions;
  9575. if (componentOptions) {
  9576. // check pattern
  9577. var name = getComponentName(componentOptions);
  9578. var ref = this;
  9579. var include = ref.include;
  9580. var exclude = ref.exclude;
  9581. if (
  9582. // not included
  9583. (include && (!name || !matches(include, name))) ||
  9584. // excluded
  9585. (exclude && name && matches(exclude, name))
  9586. ) {
  9587. return vnode
  9588. }
  9589. var ref$1 = this;
  9590. var cache = ref$1.cache;
  9591. var keys = ref$1.keys;
  9592. var key = vnode.key == null
  9593. // same constructor may get registered as different local components
  9594. // so cid alone is not enough (#3269)
  9595. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  9596. : vnode.key;
  9597. if (cache[key]) {
  9598. vnode.componentInstance = cache[key].componentInstance;
  9599. // make current key freshest
  9600. remove(keys, key);
  9601. keys.push(key);
  9602. } else {
  9603. cache[key] = vnode;
  9604. keys.push(key);
  9605. // prune oldest entry
  9606. if (this.max && keys.length > parseInt(this.max)) {
  9607. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  9608. }
  9609. }
  9610. vnode.data.keepAlive = true;
  9611. }
  9612. return vnode || (slot && slot[0])
  9613. }
  9614. };
  9615. var builtInComponents = {
  9616. KeepAlive: KeepAlive
  9617. };
  9618. /* */
  9619. function initGlobalAPI (Vue) {
  9620. // config
  9621. var configDef = {};
  9622. configDef.get = function () { return config; };
  9623. if (true) {
  9624. configDef.set = function () {
  9625. warn(
  9626. 'Do not replace the Vue.config object, set individual fields instead.'
  9627. );
  9628. };
  9629. }
  9630. Object.defineProperty(Vue, 'config', configDef);
  9631. // exposed util methods.
  9632. // NOTE: these are not considered part of the public API - avoid relying on
  9633. // them unless you are aware of the risk.
  9634. Vue.util = {
  9635. warn: warn,
  9636. extend: extend,
  9637. mergeOptions: mergeOptions,
  9638. defineReactive: defineReactive$$1
  9639. };
  9640. Vue.set = set;
  9641. Vue.delete = del;
  9642. Vue.nextTick = nextTick;
  9643. // 2.6 explicit observable API
  9644. Vue.observable = function (obj) {
  9645. observe(obj);
  9646. return obj
  9647. };
  9648. Vue.options = Object.create(null);
  9649. ASSET_TYPES.forEach(function (type) {
  9650. Vue.options[type + 's'] = Object.create(null);
  9651. });
  9652. // this is used to identify the "base" constructor to extend all plain-object
  9653. // components with in Weex's multi-instance scenarios.
  9654. Vue.options._base = Vue;
  9655. extend(Vue.options.components, builtInComponents);
  9656. initUse(Vue);
  9657. initMixin$1(Vue);
  9658. initExtend(Vue);
  9659. initAssetRegisters(Vue);
  9660. }
  9661. initGlobalAPI(Vue);
  9662. Object.defineProperty(Vue.prototype, '$isServer', {
  9663. get: isServerRendering
  9664. });
  9665. Object.defineProperty(Vue.prototype, '$ssrContext', {
  9666. get: function get () {
  9667. /* istanbul ignore next */
  9668. return this.$vnode && this.$vnode.ssrContext
  9669. }
  9670. });
  9671. // expose FunctionalRenderContext for ssr runtime helper installation
  9672. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  9673. value: FunctionalRenderContext
  9674. });
  9675. Vue.version = '2.6.11';
  9676. /**
  9677. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  9678. */
  9679. var ARRAYTYPE = '[object Array]';
  9680. var OBJECTTYPE = '[object Object]';
  9681. var NULLTYPE = '[object Null]';
  9682. var UNDEFINEDTYPE = '[object Undefined]';
  9683. // const FUNCTIONTYPE = '[object Function]'
  9684. function diff(current, pre) {
  9685. var result = {};
  9686. syncKeys(current, pre);
  9687. _diff(current, pre, '', result);
  9688. return result
  9689. }
  9690. function syncKeys(current, pre) {
  9691. if (current === pre) { return }
  9692. var rootCurrentType = type(current);
  9693. var rootPreType = type(pre);
  9694. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  9695. if(Object.keys(current).length >= Object.keys(pre).length){
  9696. for (var key in pre) {
  9697. var currentValue = current[key];
  9698. if (currentValue === undefined) {
  9699. current[key] = null;
  9700. } else {
  9701. syncKeys(currentValue, pre[key]);
  9702. }
  9703. }
  9704. }
  9705. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  9706. if (current.length >= pre.length) {
  9707. pre.forEach(function (item, index) {
  9708. syncKeys(current[index], item);
  9709. });
  9710. }
  9711. }
  9712. }
  9713. function nullOrUndefined(currentType, preType) {
  9714. if(
  9715. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  9716. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  9717. ) {
  9718. return false
  9719. }
  9720. return true
  9721. }
  9722. function _diff(current, pre, path, result) {
  9723. if (current === pre) { return }
  9724. var rootCurrentType = type(current);
  9725. var rootPreType = type(pre);
  9726. if (rootCurrentType == OBJECTTYPE) {
  9727. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  9728. setResult(result, path, current);
  9729. } else {
  9730. var loop = function ( key ) {
  9731. var currentValue = current[key];
  9732. var preValue = pre[key];
  9733. var currentType = type(currentValue);
  9734. var preType = type(preValue);
  9735. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  9736. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  9737. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9738. }
  9739. } else if (currentType == ARRAYTYPE) {
  9740. if (preType != ARRAYTYPE) {
  9741. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9742. } else {
  9743. if (currentValue.length < preValue.length) {
  9744. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9745. } else {
  9746. currentValue.forEach(function (item, index) {
  9747. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  9748. });
  9749. }
  9750. }
  9751. } else if (currentType == OBJECTTYPE) {
  9752. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  9753. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  9754. } else {
  9755. for (var subKey in currentValue) {
  9756. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  9757. }
  9758. }
  9759. }
  9760. };
  9761. for (var key in current) loop( key );
  9762. }
  9763. } else if (rootCurrentType == ARRAYTYPE) {
  9764. if (rootPreType != ARRAYTYPE) {
  9765. setResult(result, path, current);
  9766. } else {
  9767. if (current.length < pre.length) {
  9768. setResult(result, path, current);
  9769. } else {
  9770. current.forEach(function (item, index) {
  9771. _diff(item, pre[index], path + '[' + index + ']', result);
  9772. });
  9773. }
  9774. }
  9775. } else {
  9776. setResult(result, path, current);
  9777. }
  9778. }
  9779. function setResult(result, k, v) {
  9780. // if (type(v) != FUNCTIONTYPE) {
  9781. result[k] = v;
  9782. // }
  9783. }
  9784. function type(obj) {
  9785. return Object.prototype.toString.call(obj)
  9786. }
  9787. /* */
  9788. function flushCallbacks$1(vm) {
  9789. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  9790. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"六院联创","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9791. var mpInstance = vm.$scope;
  9792. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9793. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  9794. }
  9795. var copies = vm.__next_tick_callbacks.slice(0);
  9796. vm.__next_tick_callbacks.length = 0;
  9797. for (var i = 0; i < copies.length; i++) {
  9798. copies[i]();
  9799. }
  9800. }
  9801. }
  9802. function hasRenderWatcher(vm) {
  9803. return queue.find(function (watcher) { return vm._watcher === watcher; })
  9804. }
  9805. function nextTick$1(vm, cb) {
  9806. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  9807. //2.nextTick 之前存在 render watcher
  9808. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  9809. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"六院联创","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  9810. var mpInstance = vm.$scope;
  9811. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  9812. ']:nextVueTick');
  9813. }
  9814. return nextTick(cb, vm)
  9815. }else{
  9816. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"六院联创","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  9817. var mpInstance$1 = vm.$scope;
  9818. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  9819. ']:nextMPTick');
  9820. }
  9821. }
  9822. var _resolve;
  9823. if (!vm.__next_tick_callbacks) {
  9824. vm.__next_tick_callbacks = [];
  9825. }
  9826. vm.__next_tick_callbacks.push(function () {
  9827. if (cb) {
  9828. try {
  9829. cb.call(vm);
  9830. } catch (e) {
  9831. handleError(e, vm, 'nextTick');
  9832. }
  9833. } else if (_resolve) {
  9834. _resolve(vm);
  9835. }
  9836. });
  9837. // $flow-disable-line
  9838. if (!cb && typeof Promise !== 'undefined') {
  9839. return new Promise(function (resolve) {
  9840. _resolve = resolve;
  9841. })
  9842. }
  9843. }
  9844. /* */
  9845. function clearInstance(key, value) {
  9846. // 简易去除 Vue 和小程序组件实例
  9847. if (value) {
  9848. if (value._isVue || value.__v_isMPComponent) {
  9849. return {}
  9850. }
  9851. }
  9852. return value
  9853. }
  9854. function cloneWithData(vm) {
  9855. // 确保当前 vm 所有数据被同步
  9856. var ret = Object.create(null);
  9857. var dataKeys = [].concat(
  9858. Object.keys(vm._data || {}),
  9859. Object.keys(vm._computedWatchers || {}));
  9860. dataKeys.reduce(function(ret, key) {
  9861. ret[key] = vm[key];
  9862. return ret
  9863. }, ret);
  9864. // vue-composition-api
  9865. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  9866. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  9867. if (rawBindings) {
  9868. Object.keys(rawBindings).forEach(function (key) {
  9869. ret[key] = vm[key];
  9870. });
  9871. }
  9872. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  9873. Object.assign(ret, vm.$mp.data || {});
  9874. if (
  9875. Array.isArray(vm.$options.behaviors) &&
  9876. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  9877. ) { //form-field
  9878. ret['name'] = vm.name;
  9879. ret['value'] = vm.value;
  9880. }
  9881. return JSON.parse(JSON.stringify(ret, clearInstance))
  9882. }
  9883. var patch = function(oldVnode, vnode) {
  9884. var this$1 = this;
  9885. if (vnode === null) { //destroy
  9886. return
  9887. }
  9888. if (this.mpType === 'page' || this.mpType === 'component') {
  9889. var mpInstance = this.$scope;
  9890. var data = Object.create(null);
  9891. try {
  9892. data = cloneWithData(this);
  9893. } catch (err) {
  9894. console.error(err);
  9895. }
  9896. data.__webviewId__ = mpInstance.data.__webviewId__;
  9897. var mpData = Object.create(null);
  9898. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  9899. mpData[key] = mpInstance.data[key];
  9900. });
  9901. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  9902. if (Object.keys(diffData).length) {
  9903. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"六院联创","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  9904. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  9905. ']差量更新',
  9906. JSON.stringify(diffData));
  9907. }
  9908. this.__next_tick_pending = true;
  9909. mpInstance.setData(diffData, function () {
  9910. this$1.__next_tick_pending = false;
  9911. flushCallbacks$1(this$1);
  9912. });
  9913. } else {
  9914. flushCallbacks$1(this);
  9915. }
  9916. }
  9917. };
  9918. /* */
  9919. function createEmptyRender() {
  9920. }
  9921. function mountComponent$1(
  9922. vm,
  9923. el,
  9924. hydrating
  9925. ) {
  9926. if (!vm.mpType) {//main.js 中的 new Vue
  9927. return vm
  9928. }
  9929. if (vm.mpType === 'app') {
  9930. vm.$options.render = createEmptyRender;
  9931. }
  9932. if (!vm.$options.render) {
  9933. vm.$options.render = createEmptyRender;
  9934. if (true) {
  9935. /* istanbul ignore if */
  9936. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  9937. vm.$options.el || el) {
  9938. warn(
  9939. 'You are using the runtime-only build of Vue where the template ' +
  9940. 'compiler is not available. Either pre-compile the templates into ' +
  9941. 'render functions, or use the compiler-included build.',
  9942. vm
  9943. );
  9944. } else {
  9945. warn(
  9946. 'Failed to mount component: template or render function not defined.',
  9947. vm
  9948. );
  9949. }
  9950. }
  9951. }
  9952. !vm._$fallback && callHook(vm, 'beforeMount');
  9953. var updateComponent = function () {
  9954. vm._update(vm._render(), hydrating);
  9955. };
  9956. // we set this to vm._watcher inside the watcher's constructor
  9957. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  9958. // component's mounted hook), which relies on vm._watcher being already defined
  9959. new Watcher(vm, updateComponent, noop, {
  9960. before: function before() {
  9961. if (vm._isMounted && !vm._isDestroyed) {
  9962. callHook(vm, 'beforeUpdate');
  9963. }
  9964. }
  9965. }, true /* isRenderWatcher */);
  9966. hydrating = false;
  9967. return vm
  9968. }
  9969. /* */
  9970. function renderClass (
  9971. staticClass,
  9972. dynamicClass
  9973. ) {
  9974. if (isDef(staticClass) || isDef(dynamicClass)) {
  9975. return concat(staticClass, stringifyClass(dynamicClass))
  9976. }
  9977. /* istanbul ignore next */
  9978. return ''
  9979. }
  9980. function concat (a, b) {
  9981. return a ? b ? (a + ' ' + b) : a : (b || '')
  9982. }
  9983. function stringifyClass (value) {
  9984. if (Array.isArray(value)) {
  9985. return stringifyArray(value)
  9986. }
  9987. if (isObject(value)) {
  9988. return stringifyObject(value)
  9989. }
  9990. if (typeof value === 'string') {
  9991. return value
  9992. }
  9993. /* istanbul ignore next */
  9994. return ''
  9995. }
  9996. function stringifyArray (value) {
  9997. var res = '';
  9998. var stringified;
  9999. for (var i = 0, l = value.length; i < l; i++) {
  10000. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  10001. if (res) { res += ' '; }
  10002. res += stringified;
  10003. }
  10004. }
  10005. return res
  10006. }
  10007. function stringifyObject (value) {
  10008. var res = '';
  10009. for (var key in value) {
  10010. if (value[key]) {
  10011. if (res) { res += ' '; }
  10012. res += key;
  10013. }
  10014. }
  10015. return res
  10016. }
  10017. /* */
  10018. var parseStyleText = cached(function (cssText) {
  10019. var res = {};
  10020. var listDelimiter = /;(?![^(]*\))/g;
  10021. var propertyDelimiter = /:(.+)/;
  10022. cssText.split(listDelimiter).forEach(function (item) {
  10023. if (item) {
  10024. var tmp = item.split(propertyDelimiter);
  10025. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  10026. }
  10027. });
  10028. return res
  10029. });
  10030. // normalize possible array / string values into Object
  10031. function normalizeStyleBinding (bindingStyle) {
  10032. if (Array.isArray(bindingStyle)) {
  10033. return toObject(bindingStyle)
  10034. }
  10035. if (typeof bindingStyle === 'string') {
  10036. return parseStyleText(bindingStyle)
  10037. }
  10038. return bindingStyle
  10039. }
  10040. /* */
  10041. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  10042. function getTarget(obj, path) {
  10043. var parts = path.split('.');
  10044. var key = parts[0];
  10045. if (key.indexOf('__$n') === 0) { //number index
  10046. key = parseInt(key.replace('__$n', ''));
  10047. }
  10048. if (parts.length === 1) {
  10049. return obj[key]
  10050. }
  10051. return getTarget(obj[key], parts.slice(1).join('.'))
  10052. }
  10053. function internalMixin(Vue) {
  10054. Vue.config.errorHandler = function(err, vm, info) {
  10055. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  10056. console.error(err);
  10057. /* eslint-disable no-undef */
  10058. var app = typeof getApp === 'function' && getApp();
  10059. if (app && app.onError) {
  10060. app.onError(err);
  10061. }
  10062. };
  10063. var oldEmit = Vue.prototype.$emit;
  10064. Vue.prototype.$emit = function(event) {
  10065. if (this.$scope && event) {
  10066. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  10067. if (triggerEvent) {
  10068. try {
  10069. triggerEvent.call(this.$scope, event, {
  10070. __args__: toArray(arguments, 1)
  10071. });
  10072. } catch (error) {
  10073. }
  10074. }
  10075. }
  10076. return oldEmit.apply(this, arguments)
  10077. };
  10078. Vue.prototype.$nextTick = function(fn) {
  10079. return nextTick$1(this, fn)
  10080. };
  10081. MP_METHODS.forEach(function (method) {
  10082. Vue.prototype[method] = function(args) {
  10083. if (this.$scope && this.$scope[method]) {
  10084. return this.$scope[method](args)
  10085. }
  10086. // mp-alipay
  10087. if (typeof my === 'undefined') {
  10088. return
  10089. }
  10090. if (method === 'createSelectorQuery') {
  10091. /* eslint-disable no-undef */
  10092. return my.createSelectorQuery(args)
  10093. } else if (method === 'createIntersectionObserver') {
  10094. /* eslint-disable no-undef */
  10095. return my.createIntersectionObserver(args)
  10096. }
  10097. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  10098. };
  10099. });
  10100. Vue.prototype.__init_provide = initProvide;
  10101. Vue.prototype.__init_injections = initInjections;
  10102. Vue.prototype.__call_hook = function(hook, args) {
  10103. var vm = this;
  10104. // #7573 disable dep collection when invoking lifecycle hooks
  10105. pushTarget();
  10106. var handlers = vm.$options[hook];
  10107. var info = hook + " hook";
  10108. var ret;
  10109. if (handlers) {
  10110. for (var i = 0, j = handlers.length; i < j; i++) {
  10111. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  10112. }
  10113. }
  10114. if (vm._hasHookEvent) {
  10115. vm.$emit('hook:' + hook, args);
  10116. }
  10117. popTarget();
  10118. return ret
  10119. };
  10120. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  10121. if (Array.isArray(modifiers)) {
  10122. if (modifiers.indexOf('trim') !== -1) {
  10123. value = value.trim();
  10124. }
  10125. if (modifiers.indexOf('number') !== -1) {
  10126. value = this._n(value);
  10127. }
  10128. }
  10129. if (!target) {
  10130. target = this;
  10131. }
  10132. // 解决动态属性添加
  10133. Vue.set(target, key, value);
  10134. };
  10135. Vue.prototype.__set_sync = function(target, key, value) {
  10136. if (!target) {
  10137. target = this;
  10138. }
  10139. // 解决动态属性添加
  10140. Vue.set(target, key, value);
  10141. };
  10142. Vue.prototype.__get_orig = function(item) {
  10143. if (isPlainObject(item)) {
  10144. return item['$orig'] || item
  10145. }
  10146. return item
  10147. };
  10148. Vue.prototype.__get_value = function(dataPath, target) {
  10149. return getTarget(target || this, dataPath)
  10150. };
  10151. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  10152. return renderClass(staticClass, dynamicClass)
  10153. };
  10154. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  10155. if (!dynamicStyle && !staticStyle) {
  10156. return ''
  10157. }
  10158. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  10159. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  10160. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  10161. };
  10162. Vue.prototype.__map = function(val, iteratee) {
  10163. //TODO 暂不考虑 string
  10164. var ret, i, l, keys, key;
  10165. if (Array.isArray(val)) {
  10166. ret = new Array(val.length);
  10167. for (i = 0, l = val.length; i < l; i++) {
  10168. ret[i] = iteratee(val[i], i);
  10169. }
  10170. return ret
  10171. } else if (isObject(val)) {
  10172. keys = Object.keys(val);
  10173. ret = Object.create(null);
  10174. for (i = 0, l = keys.length; i < l; i++) {
  10175. key = keys[i];
  10176. ret[key] = iteratee(val[key], key, i);
  10177. }
  10178. return ret
  10179. } else if (typeof val === 'number') {
  10180. ret = new Array(val);
  10181. for (i = 0, l = val; i < l; i++) {
  10182. // 第一个参数暂时仍和小程序一致
  10183. ret[i] = iteratee(i, i);
  10184. }
  10185. return ret
  10186. }
  10187. return []
  10188. };
  10189. }
  10190. /* */
  10191. var LIFECYCLE_HOOKS$1 = [
  10192. //App
  10193. 'onLaunch',
  10194. 'onShow',
  10195. 'onHide',
  10196. 'onUniNViewMessage',
  10197. 'onPageNotFound',
  10198. 'onThemeChange',
  10199. 'onError',
  10200. 'onUnhandledRejection',
  10201. //Page
  10202. 'onInit',
  10203. 'onLoad',
  10204. // 'onShow',
  10205. 'onReady',
  10206. // 'onHide',
  10207. 'onUnload',
  10208. 'onPullDownRefresh',
  10209. 'onReachBottom',
  10210. 'onTabItemTap',
  10211. 'onAddToFavorites',
  10212. 'onShareTimeline',
  10213. 'onShareAppMessage',
  10214. 'onResize',
  10215. 'onPageScroll',
  10216. 'onNavigationBarButtonTap',
  10217. 'onBackPress',
  10218. 'onNavigationBarSearchInputChanged',
  10219. 'onNavigationBarSearchInputConfirmed',
  10220. 'onNavigationBarSearchInputClicked',
  10221. 'onUploadDouyinVideo',
  10222. 'onNFCReadMessage',
  10223. //Component
  10224. // 'onReady', // 兼容旧版本,应该移除该事件
  10225. 'onPageShow',
  10226. 'onPageHide',
  10227. 'onPageResize'
  10228. ];
  10229. function lifecycleMixin$1(Vue) {
  10230. //fixed vue-class-component
  10231. var oldExtend = Vue.extend;
  10232. Vue.extend = function(extendOptions) {
  10233. extendOptions = extendOptions || {};
  10234. var methods = extendOptions.methods;
  10235. if (methods) {
  10236. Object.keys(methods).forEach(function (methodName) {
  10237. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  10238. extendOptions[methodName] = methods[methodName];
  10239. delete methods[methodName];
  10240. }
  10241. });
  10242. }
  10243. return oldExtend.call(this, extendOptions)
  10244. };
  10245. var strategies = Vue.config.optionMergeStrategies;
  10246. var mergeHook = strategies.created;
  10247. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  10248. strategies[hook] = mergeHook;
  10249. });
  10250. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  10251. }
  10252. /* */
  10253. // install platform patch function
  10254. Vue.prototype.__patch__ = patch;
  10255. // public mount method
  10256. Vue.prototype.$mount = function(
  10257. el ,
  10258. hydrating
  10259. ) {
  10260. return mountComponent$1(this, el, hydrating)
  10261. };
  10262. lifecycleMixin$1(Vue);
  10263. internalMixin(Vue);
  10264. /* */
  10265. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  10266. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  10267. /***/ }),
  10268. /***/ 26:
  10269. /*!*****************************************************!*\
  10270. !*** E:/work/Project_newGit/UniappShell/pages.json ***!
  10271. \*****************************************************/
  10272. /*! no static exports found */
  10273. /***/ (function(module, exports) {
  10274. /***/ }),
  10275. /***/ 268:
  10276. /*!*************************************************************************************************!*\
  10277. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-forms/components/uni-forms/validate.js ***!
  10278. \*************************************************************************************************/
  10279. /*! no static exports found */
  10280. /***/ (function(module, exports, __webpack_require__) {
  10281. "use strict";
  10282. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10283. Object.defineProperty(exports, "__esModule", {
  10284. value: true
  10285. });
  10286. exports.default = void 0;
  10287. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 44));
  10288. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 269));
  10289. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 270));
  10290. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 272));
  10291. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 46));
  10292. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  10293. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  10294. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  10295. 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); }; }
  10296. 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; } }
  10297. var pattern = {
  10298. email: /^\S+?@\S+?\.\S+?$/,
  10299. 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]$/,
  10300. 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')
  10301. };
  10302. var FORMAT_MAPPING = {
  10303. "int": 'integer',
  10304. "bool": 'boolean',
  10305. "double": 'number',
  10306. "long": 'number',
  10307. "password": 'string'
  10308. // "fileurls": 'array'
  10309. };
  10310. function formatMessage(args) {
  10311. var resources = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
  10312. var defaultMessage = ['label'];
  10313. defaultMessage.forEach(function (item) {
  10314. if (args[item] === undefined) {
  10315. args[item] = '';
  10316. }
  10317. });
  10318. var str = resources;
  10319. for (var key in args) {
  10320. var reg = new RegExp('{' + key + '}');
  10321. str = str.replace(reg, args[key]);
  10322. }
  10323. return str;
  10324. }
  10325. function isEmptyValue(value, type) {
  10326. if (value === undefined || value === null) {
  10327. return true;
  10328. }
  10329. if (typeof value === 'string' && !value) {
  10330. return true;
  10331. }
  10332. if (Array.isArray(value) && !value.length) {
  10333. return true;
  10334. }
  10335. if (type === 'object' && !Object.keys(value).length) {
  10336. return true;
  10337. }
  10338. return false;
  10339. }
  10340. var types = {
  10341. integer: function integer(value) {
  10342. return types.number(value) && parseInt(value, 10) === value;
  10343. },
  10344. string: function string(value) {
  10345. return typeof value === 'string';
  10346. },
  10347. number: function number(value) {
  10348. if (isNaN(value)) {
  10349. return false;
  10350. }
  10351. return typeof value === 'number';
  10352. },
  10353. "boolean": function boolean(value) {
  10354. return typeof value === 'boolean';
  10355. },
  10356. "float": function float(value) {
  10357. return types.number(value) && !types.integer(value);
  10358. },
  10359. array: function array(value) {
  10360. return Array.isArray(value);
  10361. },
  10362. object: function object(value) {
  10363. return (0, _typeof2.default)(value) === 'object' && !types.array(value);
  10364. },
  10365. date: function date(value) {
  10366. return value instanceof Date;
  10367. },
  10368. timestamp: function timestamp(value) {
  10369. if (!this.integer(value) || Math.abs(value).toString().length > 16) {
  10370. return false;
  10371. }
  10372. return true;
  10373. },
  10374. file: function file(value) {
  10375. return typeof value.url === 'string';
  10376. },
  10377. email: function email(value) {
  10378. return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
  10379. },
  10380. url: function url(value) {
  10381. return typeof value === 'string' && !!value.match(pattern.url);
  10382. },
  10383. pattern: function pattern(reg, value) {
  10384. try {
  10385. return new RegExp(reg).test(value);
  10386. } catch (e) {
  10387. return false;
  10388. }
  10389. },
  10390. method: function method(value) {
  10391. return typeof value === 'function';
  10392. },
  10393. idcard: function idcard(value) {
  10394. return typeof value === 'string' && !!value.match(pattern.idcard);
  10395. },
  10396. 'url-https': function urlHttps(value) {
  10397. return this.url(value) && value.startsWith('https://');
  10398. },
  10399. 'url-scheme': function urlScheme(value) {
  10400. return value.startsWith('://');
  10401. },
  10402. 'url-web': function urlWeb(value) {
  10403. return false;
  10404. }
  10405. };
  10406. var RuleValidator = /*#__PURE__*/function () {
  10407. function RuleValidator(message) {
  10408. (0, _classCallCheck2.default)(this, RuleValidator);
  10409. this._message = message;
  10410. }
  10411. (0, _createClass2.default)(RuleValidator, [{
  10412. key: "validateRule",
  10413. value: function () {
  10414. var _validateRule = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(fieldKey, fieldValue, value, data, allData) {
  10415. var result, rules, hasRequired, message, i, rule, vt, now, resultExpr;
  10416. return _regenerator.default.wrap(function _callee$(_context) {
  10417. while (1) {
  10418. switch (_context.prev = _context.next) {
  10419. case 0:
  10420. result = null;
  10421. rules = fieldValue.rules;
  10422. hasRequired = rules.findIndex(function (item) {
  10423. return item.required;
  10424. });
  10425. if (!(hasRequired < 0)) {
  10426. _context.next = 8;
  10427. break;
  10428. }
  10429. if (!(value === null || value === undefined)) {
  10430. _context.next = 6;
  10431. break;
  10432. }
  10433. return _context.abrupt("return", result);
  10434. case 6:
  10435. if (!(typeof value === 'string' && !value.length)) {
  10436. _context.next = 8;
  10437. break;
  10438. }
  10439. return _context.abrupt("return", result);
  10440. case 8:
  10441. message = this._message;
  10442. if (!(rules === undefined)) {
  10443. _context.next = 11;
  10444. break;
  10445. }
  10446. return _context.abrupt("return", message['default']);
  10447. case 11:
  10448. i = 0;
  10449. case 12:
  10450. if (!(i < rules.length)) {
  10451. _context.next = 35;
  10452. break;
  10453. }
  10454. rule = rules[i];
  10455. vt = this._getValidateType(rule);
  10456. Object.assign(rule, {
  10457. label: fieldValue.label || "[\"".concat(fieldKey, "\"]")
  10458. });
  10459. if (!RuleValidatorHelper[vt]) {
  10460. _context.next = 20;
  10461. break;
  10462. }
  10463. result = RuleValidatorHelper[vt](rule, value, message);
  10464. if (!(result != null)) {
  10465. _context.next = 20;
  10466. break;
  10467. }
  10468. return _context.abrupt("break", 35);
  10469. case 20:
  10470. if (!rule.validateExpr) {
  10471. _context.next = 26;
  10472. break;
  10473. }
  10474. now = Date.now();
  10475. resultExpr = rule.validateExpr(value, allData, now);
  10476. if (!(resultExpr === false)) {
  10477. _context.next = 26;
  10478. break;
  10479. }
  10480. result = this._getMessage(rule, rule.errorMessage || this._message['default']);
  10481. return _context.abrupt("break", 35);
  10482. case 26:
  10483. if (!rule.validateFunction) {
  10484. _context.next = 32;
  10485. break;
  10486. }
  10487. _context.next = 29;
  10488. return this.validateFunction(rule, value, data, allData, vt);
  10489. case 29:
  10490. result = _context.sent;
  10491. if (!(result !== null)) {
  10492. _context.next = 32;
  10493. break;
  10494. }
  10495. return _context.abrupt("break", 35);
  10496. case 32:
  10497. i++;
  10498. _context.next = 12;
  10499. break;
  10500. case 35:
  10501. if (result !== null) {
  10502. result = message.TAG + result;
  10503. }
  10504. return _context.abrupt("return", result);
  10505. case 37:
  10506. case "end":
  10507. return _context.stop();
  10508. }
  10509. }
  10510. }, _callee, this);
  10511. }));
  10512. function validateRule(_x, _x2, _x3, _x4, _x5) {
  10513. return _validateRule.apply(this, arguments);
  10514. }
  10515. return validateRule;
  10516. }()
  10517. }, {
  10518. key: "validateFunction",
  10519. value: function () {
  10520. var _validateFunction = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(rule, value, data, allData, vt) {
  10521. var result, callbackMessage, res;
  10522. return _regenerator.default.wrap(function _callee2$(_context2) {
  10523. while (1) {
  10524. switch (_context2.prev = _context2.next) {
  10525. case 0:
  10526. result = null;
  10527. _context2.prev = 1;
  10528. callbackMessage = null;
  10529. _context2.next = 5;
  10530. return rule.validateFunction(rule, value, allData || data, function (message) {
  10531. callbackMessage = message;
  10532. });
  10533. case 5:
  10534. res = _context2.sent;
  10535. if (callbackMessage || typeof res === 'string' && res || res === false) {
  10536. result = this._getMessage(rule, callbackMessage || res, vt);
  10537. }
  10538. _context2.next = 12;
  10539. break;
  10540. case 9:
  10541. _context2.prev = 9;
  10542. _context2.t0 = _context2["catch"](1);
  10543. result = this._getMessage(rule, _context2.t0.message, vt);
  10544. case 12:
  10545. return _context2.abrupt("return", result);
  10546. case 13:
  10547. case "end":
  10548. return _context2.stop();
  10549. }
  10550. }
  10551. }, _callee2, this, [[1, 9]]);
  10552. }));
  10553. function validateFunction(_x6, _x7, _x8, _x9, _x10) {
  10554. return _validateFunction.apply(this, arguments);
  10555. }
  10556. return validateFunction;
  10557. }()
  10558. }, {
  10559. key: "_getMessage",
  10560. value: function _getMessage(rule, message, vt) {
  10561. return formatMessage(rule, message || rule.errorMessage || this._message[vt] || message['default']);
  10562. }
  10563. }, {
  10564. key: "_getValidateType",
  10565. value: function _getValidateType(rule) {
  10566. var result = '';
  10567. if (rule.required) {
  10568. result = 'required';
  10569. } else if (rule.format) {
  10570. result = 'format';
  10571. } else if (rule.arrayType) {
  10572. result = 'arrayTypeFormat';
  10573. } else if (rule.range) {
  10574. result = 'range';
  10575. } else if (rule.maximum !== undefined || rule.minimum !== undefined) {
  10576. result = 'rangeNumber';
  10577. } else if (rule.maxLength !== undefined || rule.minLength !== undefined) {
  10578. result = 'rangeLength';
  10579. } else if (rule.pattern) {
  10580. result = 'pattern';
  10581. } else if (rule.validateFunction) {
  10582. result = 'validateFunction';
  10583. }
  10584. return result;
  10585. }
  10586. }]);
  10587. return RuleValidator;
  10588. }();
  10589. var RuleValidatorHelper = {
  10590. required: function required(rule, value, message) {
  10591. if (rule.required && isEmptyValue(value, rule.format || (0, _typeof2.default)(value))) {
  10592. return formatMessage(rule, rule.errorMessage || message.required);
  10593. }
  10594. return null;
  10595. },
  10596. range: function range(rule, value, message) {
  10597. var range = rule.range,
  10598. errorMessage = rule.errorMessage;
  10599. var list = new Array(range.length);
  10600. for (var i = 0; i < range.length; i++) {
  10601. var item = range[i];
  10602. if (types.object(item) && item.value !== undefined) {
  10603. list[i] = item.value;
  10604. } else {
  10605. list[i] = item;
  10606. }
  10607. }
  10608. var result = false;
  10609. if (Array.isArray(value)) {
  10610. result = new Set(value.concat(list)).size === list.length;
  10611. } else {
  10612. if (list.indexOf(value) > -1) {
  10613. result = true;
  10614. }
  10615. }
  10616. if (!result) {
  10617. return formatMessage(rule, errorMessage || message['enum']);
  10618. }
  10619. return null;
  10620. },
  10621. rangeNumber: function rangeNumber(rule, value, message) {
  10622. if (!types.number(value)) {
  10623. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  10624. }
  10625. var minimum = rule.minimum,
  10626. maximum = rule.maximum,
  10627. exclusiveMinimum = rule.exclusiveMinimum,
  10628. exclusiveMaximum = rule.exclusiveMaximum;
  10629. var min = exclusiveMinimum ? value <= minimum : value < minimum;
  10630. var max = exclusiveMaximum ? value >= maximum : value > maximum;
  10631. if (minimum !== undefined && min) {
  10632. return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMinimum ? 'exclusiveMinimum' : 'minimum']);
  10633. } else if (maximum !== undefined && max) {
  10634. return formatMessage(rule, rule.errorMessage || message['number'][exclusiveMaximum ? 'exclusiveMaximum' : 'maximum']);
  10635. } else if (minimum !== undefined && maximum !== undefined && (min || max)) {
  10636. return formatMessage(rule, rule.errorMessage || message['number'].range);
  10637. }
  10638. return null;
  10639. },
  10640. rangeLength: function rangeLength(rule, value, message) {
  10641. if (!types.string(value) && !types.array(value)) {
  10642. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  10643. }
  10644. var min = rule.minLength;
  10645. var max = rule.maxLength;
  10646. var val = value.length;
  10647. if (min !== undefined && val < min) {
  10648. return formatMessage(rule, rule.errorMessage || message['length'].minLength);
  10649. } else if (max !== undefined && val > max) {
  10650. return formatMessage(rule, rule.errorMessage || message['length'].maxLength);
  10651. } else if (min !== undefined && max !== undefined && (val < min || val > max)) {
  10652. return formatMessage(rule, rule.errorMessage || message['length'].range);
  10653. }
  10654. return null;
  10655. },
  10656. pattern: function pattern(rule, value, message) {
  10657. if (!types['pattern'](rule.pattern, value)) {
  10658. return formatMessage(rule, rule.errorMessage || message.pattern.mismatch);
  10659. }
  10660. return null;
  10661. },
  10662. format: function format(rule, value, message) {
  10663. var customTypes = Object.keys(types);
  10664. var format = FORMAT_MAPPING[rule.format] ? FORMAT_MAPPING[rule.format] : rule.format || rule.arrayType;
  10665. if (customTypes.indexOf(format) > -1) {
  10666. if (!types[format](value)) {
  10667. return formatMessage(rule, rule.errorMessage || message.typeError);
  10668. }
  10669. }
  10670. return null;
  10671. },
  10672. arrayTypeFormat: function arrayTypeFormat(rule, value, message) {
  10673. if (!Array.isArray(value)) {
  10674. return formatMessage(rule, rule.errorMessage || message.typeError);
  10675. }
  10676. for (var i = 0; i < value.length; i++) {
  10677. var element = value[i];
  10678. var formatResult = this.format(rule, element, message);
  10679. if (formatResult !== null) {
  10680. return formatResult;
  10681. }
  10682. }
  10683. return null;
  10684. }
  10685. };
  10686. var SchemaValidator = /*#__PURE__*/function (_RuleValidator) {
  10687. (0, _inherits2.default)(SchemaValidator, _RuleValidator);
  10688. var _super = _createSuper(SchemaValidator);
  10689. function SchemaValidator(schema, options) {
  10690. var _this;
  10691. (0, _classCallCheck2.default)(this, SchemaValidator);
  10692. _this = _super.call(this, SchemaValidator.message);
  10693. _this._schema = schema;
  10694. _this._options = options || null;
  10695. return _this;
  10696. }
  10697. (0, _createClass2.default)(SchemaValidator, [{
  10698. key: "updateSchema",
  10699. value: function updateSchema(schema) {
  10700. this._schema = schema;
  10701. }
  10702. }, {
  10703. key: "validate",
  10704. value: function () {
  10705. var _validate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(data, allData) {
  10706. var result;
  10707. return _regenerator.default.wrap(function _callee3$(_context3) {
  10708. while (1) {
  10709. switch (_context3.prev = _context3.next) {
  10710. case 0:
  10711. result = this._checkFieldInSchema(data);
  10712. if (result) {
  10713. _context3.next = 5;
  10714. break;
  10715. }
  10716. _context3.next = 4;
  10717. return this.invokeValidate(data, false, allData);
  10718. case 4:
  10719. result = _context3.sent;
  10720. case 5:
  10721. return _context3.abrupt("return", result.length ? result[0] : null);
  10722. case 6:
  10723. case "end":
  10724. return _context3.stop();
  10725. }
  10726. }
  10727. }, _callee3, this);
  10728. }));
  10729. function validate(_x11, _x12) {
  10730. return _validate.apply(this, arguments);
  10731. }
  10732. return validate;
  10733. }()
  10734. }, {
  10735. key: "validateAll",
  10736. value: function () {
  10737. var _validateAll = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(data, allData) {
  10738. var result;
  10739. return _regenerator.default.wrap(function _callee4$(_context4) {
  10740. while (1) {
  10741. switch (_context4.prev = _context4.next) {
  10742. case 0:
  10743. result = this._checkFieldInSchema(data);
  10744. if (result) {
  10745. _context4.next = 5;
  10746. break;
  10747. }
  10748. _context4.next = 4;
  10749. return this.invokeValidate(data, true, allData);
  10750. case 4:
  10751. result = _context4.sent;
  10752. case 5:
  10753. return _context4.abrupt("return", result);
  10754. case 6:
  10755. case "end":
  10756. return _context4.stop();
  10757. }
  10758. }
  10759. }, _callee4, this);
  10760. }));
  10761. function validateAll(_x13, _x14) {
  10762. return _validateAll.apply(this, arguments);
  10763. }
  10764. return validateAll;
  10765. }()
  10766. }, {
  10767. key: "validateUpdate",
  10768. value: function () {
  10769. var _validateUpdate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(data, allData) {
  10770. var result;
  10771. return _regenerator.default.wrap(function _callee5$(_context5) {
  10772. while (1) {
  10773. switch (_context5.prev = _context5.next) {
  10774. case 0:
  10775. result = this._checkFieldInSchema(data);
  10776. if (result) {
  10777. _context5.next = 5;
  10778. break;
  10779. }
  10780. _context5.next = 4;
  10781. return this.invokeValidateUpdate(data, false, allData);
  10782. case 4:
  10783. result = _context5.sent;
  10784. case 5:
  10785. return _context5.abrupt("return", result.length ? result[0] : null);
  10786. case 6:
  10787. case "end":
  10788. return _context5.stop();
  10789. }
  10790. }
  10791. }, _callee5, this);
  10792. }));
  10793. function validateUpdate(_x15, _x16) {
  10794. return _validateUpdate.apply(this, arguments);
  10795. }
  10796. return validateUpdate;
  10797. }()
  10798. }, {
  10799. key: "invokeValidate",
  10800. value: function () {
  10801. var _invokeValidate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(data, all, allData) {
  10802. var result, schema, key, value, errorMessage;
  10803. return _regenerator.default.wrap(function _callee6$(_context6) {
  10804. while (1) {
  10805. switch (_context6.prev = _context6.next) {
  10806. case 0:
  10807. result = [];
  10808. schema = this._schema;
  10809. _context6.t0 = _regenerator.default.keys(schema);
  10810. case 3:
  10811. if ((_context6.t1 = _context6.t0()).done) {
  10812. _context6.next = 15;
  10813. break;
  10814. }
  10815. key = _context6.t1.value;
  10816. value = schema[key];
  10817. _context6.next = 8;
  10818. return this.validateRule(key, value, data[key], data, allData);
  10819. case 8:
  10820. errorMessage = _context6.sent;
  10821. if (!(errorMessage != null)) {
  10822. _context6.next = 13;
  10823. break;
  10824. }
  10825. result.push({
  10826. key: key,
  10827. errorMessage: errorMessage
  10828. });
  10829. if (all) {
  10830. _context6.next = 13;
  10831. break;
  10832. }
  10833. return _context6.abrupt("break", 15);
  10834. case 13:
  10835. _context6.next = 3;
  10836. break;
  10837. case 15:
  10838. return _context6.abrupt("return", result);
  10839. case 16:
  10840. case "end":
  10841. return _context6.stop();
  10842. }
  10843. }
  10844. }, _callee6, this);
  10845. }));
  10846. function invokeValidate(_x17, _x18, _x19) {
  10847. return _invokeValidate.apply(this, arguments);
  10848. }
  10849. return invokeValidate;
  10850. }()
  10851. }, {
  10852. key: "invokeValidateUpdate",
  10853. value: function () {
  10854. var _invokeValidateUpdate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7(data, all, allData) {
  10855. var result, key, errorMessage;
  10856. return _regenerator.default.wrap(function _callee7$(_context7) {
  10857. while (1) {
  10858. switch (_context7.prev = _context7.next) {
  10859. case 0:
  10860. result = [];
  10861. _context7.t0 = _regenerator.default.keys(data);
  10862. case 2:
  10863. if ((_context7.t1 = _context7.t0()).done) {
  10864. _context7.next = 13;
  10865. break;
  10866. }
  10867. key = _context7.t1.value;
  10868. _context7.next = 6;
  10869. return this.validateRule(key, this._schema[key], data[key], data, allData);
  10870. case 6:
  10871. errorMessage = _context7.sent;
  10872. if (!(errorMessage != null)) {
  10873. _context7.next = 11;
  10874. break;
  10875. }
  10876. result.push({
  10877. key: key,
  10878. errorMessage: errorMessage
  10879. });
  10880. if (all) {
  10881. _context7.next = 11;
  10882. break;
  10883. }
  10884. return _context7.abrupt("break", 13);
  10885. case 11:
  10886. _context7.next = 2;
  10887. break;
  10888. case 13:
  10889. return _context7.abrupt("return", result);
  10890. case 14:
  10891. case "end":
  10892. return _context7.stop();
  10893. }
  10894. }
  10895. }, _callee7, this);
  10896. }));
  10897. function invokeValidateUpdate(_x20, _x21, _x22) {
  10898. return _invokeValidateUpdate.apply(this, arguments);
  10899. }
  10900. return invokeValidateUpdate;
  10901. }()
  10902. }, {
  10903. key: "_checkFieldInSchema",
  10904. value: function _checkFieldInSchema(data) {
  10905. var keys = Object.keys(data);
  10906. var keys2 = Object.keys(this._schema);
  10907. if (new Set(keys.concat(keys2)).size === keys2.length) {
  10908. return '';
  10909. }
  10910. var noExistFields = keys.filter(function (key) {
  10911. return keys2.indexOf(key) < 0;
  10912. });
  10913. var errorMessage = formatMessage({
  10914. field: JSON.stringify(noExistFields)
  10915. }, SchemaValidator.message.TAG + SchemaValidator.message['defaultInvalid']);
  10916. return [{
  10917. key: 'invalid',
  10918. errorMessage: errorMessage
  10919. }];
  10920. }
  10921. }]);
  10922. return SchemaValidator;
  10923. }(RuleValidator);
  10924. function Message() {
  10925. return {
  10926. TAG: "",
  10927. default: '验证错误',
  10928. defaultInvalid: '提交的字段{field}在数据库中并不存在',
  10929. validateFunction: '验证无效',
  10930. required: '{label}必填',
  10931. 'enum': '{label}超出范围',
  10932. timestamp: '{label}格式无效',
  10933. whitespace: '{label}不能为空',
  10934. typeError: '{label}类型无效',
  10935. date: {
  10936. format: '{label}日期{value}格式无效',
  10937. parse: '{label}日期无法解析,{value}无效',
  10938. invalid: '{label}日期{value}无效'
  10939. },
  10940. length: {
  10941. minLength: '{label}长度不能少于{minLength}',
  10942. maxLength: '{label}长度不能超过{maxLength}',
  10943. range: '{label}必须介于{minLength}和{maxLength}之间'
  10944. },
  10945. number: {
  10946. minimum: '{label}不能小于{minimum}',
  10947. maximum: '{label}不能大于{maximum}',
  10948. exclusiveMinimum: '{label}不能小于等于{minimum}',
  10949. exclusiveMaximum: '{label}不能大于等于{maximum}',
  10950. range: '{label}必须介于{minimum}and{maximum}之间'
  10951. },
  10952. pattern: {
  10953. mismatch: '{label}格式不匹配'
  10954. }
  10955. };
  10956. }
  10957. SchemaValidator.message = new Message();
  10958. var _default = SchemaValidator;
  10959. exports.default = _default;
  10960. /***/ }),
  10961. /***/ 269:
  10962. /*!*********************************************************!*\
  10963. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  10964. \*********************************************************/
  10965. /*! no static exports found */
  10966. /***/ (function(module, exports, __webpack_require__) {
  10967. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  10968. function _inherits(subClass, superClass) {
  10969. if (typeof superClass !== "function" && superClass !== null) {
  10970. throw new TypeError("Super expression must either be null or a function");
  10971. }
  10972. subClass.prototype = Object.create(superClass && superClass.prototype, {
  10973. constructor: {
  10974. value: subClass,
  10975. writable: true,
  10976. configurable: true
  10977. }
  10978. });
  10979. Object.defineProperty(subClass, "prototype", {
  10980. writable: false
  10981. });
  10982. if (superClass) setPrototypeOf(subClass, superClass);
  10983. }
  10984. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  10985. /***/ }),
  10986. /***/ 270:
  10987. /*!**************************************************************************!*\
  10988. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  10989. \**************************************************************************/
  10990. /*! no static exports found */
  10991. /***/ (function(module, exports, __webpack_require__) {
  10992. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  10993. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 271);
  10994. function _possibleConstructorReturn(self, call) {
  10995. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  10996. return call;
  10997. } else if (call !== void 0) {
  10998. throw new TypeError("Derived constructors may only return object or undefined");
  10999. }
  11000. return assertThisInitialized(self);
  11001. }
  11002. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11003. /***/ }),
  11004. /***/ 271:
  11005. /*!**********************************************************************!*\
  11006. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  11007. \**********************************************************************/
  11008. /*! no static exports found */
  11009. /***/ (function(module, exports) {
  11010. function _assertThisInitialized(self) {
  11011. if (self === void 0) {
  11012. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  11013. }
  11014. return self;
  11015. }
  11016. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11017. /***/ }),
  11018. /***/ 272:
  11019. /*!***************************************************************!*\
  11020. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  11021. \***************************************************************/
  11022. /*! no static exports found */
  11023. /***/ (function(module, exports) {
  11024. function _getPrototypeOf(o) {
  11025. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  11026. return o.__proto__ || Object.getPrototypeOf(o);
  11027. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11028. return _getPrototypeOf(o);
  11029. }
  11030. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  11031. /***/ }),
  11032. /***/ 273:
  11033. /*!**********************************************************************************************!*\
  11034. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-forms/components/uni-forms/utils.js ***!
  11035. \**********************************************************************************************/
  11036. /*! no static exports found */
  11037. /***/ (function(module, exports, __webpack_require__) {
  11038. "use strict";
  11039. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11040. Object.defineProperty(exports, "__esModule", {
  11041. value: true
  11042. });
  11043. 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;
  11044. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  11045. /**
  11046. * 简单处理对象拷贝
  11047. * @param {Obejct} 被拷贝对象
  11048. * @@return {Object} 拷贝对象
  11049. */
  11050. var deepCopy = function deepCopy(val) {
  11051. return JSON.parse(JSON.stringify(val));
  11052. };
  11053. /**
  11054. * 过滤数字类型
  11055. * @param {String} format 数字类型
  11056. * @@return {Boolean} 返回是否为数字类型
  11057. */
  11058. exports.deepCopy = deepCopy;
  11059. var typeFilter = function typeFilter(format) {
  11060. return format === 'int' || format === 'double' || format === 'number' || format === 'timestamp';
  11061. };
  11062. /**
  11063. * 把 value 转换成指定的类型,用于处理初始值,原因是初始值需要入库不能为 undefined
  11064. * @param {String} key 字段名
  11065. * @param {any} value 字段值
  11066. * @param {Object} rules 表单校验规则
  11067. */
  11068. exports.typeFilter = typeFilter;
  11069. var getValue = function getValue(key, value, rules) {
  11070. var isRuleNumType = rules.find(function (val) {
  11071. return val.format && typeFilter(val.format);
  11072. });
  11073. var isRuleBoolType = rules.find(function (val) {
  11074. return val.format && val.format === 'boolean' || val.format === 'bool';
  11075. });
  11076. // 输入类型为 number
  11077. if (!!isRuleNumType) {
  11078. if (!value && value !== 0) {
  11079. value = null;
  11080. } else {
  11081. value = isNumber(Number(value)) ? Number(value) : value;
  11082. }
  11083. }
  11084. // 输入类型为 boolean
  11085. if (!!isRuleBoolType) {
  11086. value = isBoolean(value) ? value : false;
  11087. }
  11088. return value;
  11089. };
  11090. /**
  11091. * 获取表单数据
  11092. * @param {String|Array} name 真实名称,需要使用 realName 获取
  11093. * @param {Object} data 原始数据
  11094. * @param {any} value 需要设置的值
  11095. */
  11096. exports.getValue = getValue;
  11097. var setDataValue = function setDataValue(field, formdata, value) {
  11098. formdata[field] = value;
  11099. return value || '';
  11100. };
  11101. /**
  11102. * 获取表单数据
  11103. * @param {String|Array} field 真实名称,需要使用 realName 获取
  11104. * @param {Object} data 原始数据
  11105. */
  11106. exports.setDataValue = setDataValue;
  11107. var getDataValue = function getDataValue(field, data) {
  11108. return objGet(data, field);
  11109. };
  11110. /**
  11111. * 获取表单类型
  11112. * @param {String|Array} field 真实名称,需要使用 realName 获取
  11113. */
  11114. exports.getDataValue = getDataValue;
  11115. var getDataValueType = function getDataValueType(field, data) {
  11116. var value = getDataValue(field, data);
  11117. return {
  11118. type: type(value),
  11119. value: value
  11120. };
  11121. };
  11122. /**
  11123. * 获取表单可用的真实name
  11124. * @param {String|Array} name 表单name
  11125. * @@return {String} 表单可用的真实name
  11126. */
  11127. exports.getDataValueType = getDataValueType;
  11128. var realName = function realName(name) {
  11129. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  11130. var base_name = _basePath(name);
  11131. if ((0, _typeof2.default)(base_name) === 'object' && Array.isArray(base_name) && base_name.length > 1) {
  11132. var realname = base_name.reduce(function (a, b) {
  11133. return a += "#".concat(b);
  11134. }, '_formdata_');
  11135. return realname;
  11136. }
  11137. return base_name[0] || name;
  11138. };
  11139. /**
  11140. * 判断是否表单可用的真实name
  11141. * @param {String|Array} name 表单name
  11142. * @@return {String} 表单可用的真实name
  11143. */
  11144. exports.realName = realName;
  11145. var isRealName = function isRealName(name) {
  11146. var reg = /^_formdata_#*/;
  11147. return reg.test(name);
  11148. };
  11149. /**
  11150. * 获取表单数据的原始格式
  11151. * @@return {Object|Array} object 需要解析的数据
  11152. */
  11153. exports.isRealName = isRealName;
  11154. var rawData = function rawData() {
  11155. var object = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11156. var name = arguments.length > 1 ? arguments[1] : undefined;
  11157. var newData = JSON.parse(JSON.stringify(object));
  11158. var formData = {};
  11159. for (var i in newData) {
  11160. var path = name2arr(i);
  11161. objSet(formData, path, newData[i]);
  11162. }
  11163. return formData;
  11164. };
  11165. /**
  11166. * 真实name还原为 array
  11167. * @param {*} name
  11168. */
  11169. exports.rawData = rawData;
  11170. var name2arr = function name2arr(name) {
  11171. var field = name.replace('_formdata_#', '');
  11172. field = field.split('#').map(function (v) {
  11173. return isNumber(v) ? Number(v) : v;
  11174. });
  11175. return field;
  11176. };
  11177. /**
  11178. * 对象中设置值
  11179. * @param {Object|Array} object 源数据
  11180. * @param {String| Array} path 'a.b.c' 或 ['a',0,'b','c']
  11181. * @param {String} value 需要设置的值
  11182. */
  11183. exports.name2arr = name2arr;
  11184. var objSet = function objSet(object, path, value) {
  11185. if ((0, _typeof2.default)(object) !== 'object') return object;
  11186. _basePath(path).reduce(function (o, k, i, _) {
  11187. if (i === _.length - 1) {
  11188. // 若遍历结束直接赋值
  11189. o[k] = value;
  11190. return null;
  11191. } else if (k in o) {
  11192. // 若存在对应路径,则返回找到的对象,进行下一次遍历
  11193. return o[k];
  11194. } else {
  11195. // 若不存在对应路径,则创建对应对象,若下一路径是数字,新对象赋值为空数组,否则赋值为空对象
  11196. o[k] = /^[0-9]{1,}$/.test(_[i + 1]) ? [] : {};
  11197. return o[k];
  11198. }
  11199. }, object);
  11200. // 返回object
  11201. return object;
  11202. };
  11203. // 处理 path, path有三种形式:'a[0].b.c'、'a.0.b.c' 和 ['a','0','b','c'],需要统一处理成数组,便于后续使用
  11204. exports.objSet = objSet;
  11205. function _basePath(path) {
  11206. // 若是数组,则直接返回
  11207. if (Array.isArray(path)) return path;
  11208. // 若有 '[',']',则替换成将 '[' 替换成 '.',去掉 ']'
  11209. return path.replace(/\[/g, '.').replace(/\]/g, '').split('.');
  11210. }
  11211. /**
  11212. * 从对象中获取值
  11213. * @param {Object|Array} object 源数据
  11214. * @param {String| Array} path 'a.b.c' 或 ['a',0,'b','c']
  11215. * @param {String} defaultVal 如果无法从调用链中获取值的默认值
  11216. */
  11217. var objGet = function objGet(object, path) {
  11218. var defaultVal = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'undefined';
  11219. // 先将path处理成统一格式
  11220. var newPath = _basePath(path);
  11221. // 递归处理,返回最后结果
  11222. var val = newPath.reduce(function (o, k) {
  11223. return (o || {})[k];
  11224. }, object);
  11225. return !val || val !== undefined ? val : defaultVal;
  11226. };
  11227. /**
  11228. * 是否为 number 类型
  11229. * @param {any} num 需要判断的值
  11230. * @return {Boolean} 是否为 number
  11231. */
  11232. exports.objGet = objGet;
  11233. var isNumber = function isNumber(num) {
  11234. return !isNaN(Number(num));
  11235. };
  11236. /**
  11237. * 是否为 boolean 类型
  11238. * @param {any} bool 需要判断的值
  11239. * @return {Boolean} 是否为 boolean
  11240. */
  11241. exports.isNumber = isNumber;
  11242. var isBoolean = function isBoolean(bool) {
  11243. return typeof bool === 'boolean';
  11244. };
  11245. /**
  11246. * 是否有必填字段
  11247. * @param {Object} rules 规则
  11248. * @return {Boolean} 是否有必填字段
  11249. */
  11250. exports.isBoolean = isBoolean;
  11251. var isRequiredField = function isRequiredField(rules) {
  11252. var isNoField = false;
  11253. for (var i = 0; i < rules.length; i++) {
  11254. var ruleData = rules[i];
  11255. if (ruleData.required) {
  11256. isNoField = true;
  11257. break;
  11258. }
  11259. }
  11260. return isNoField;
  11261. };
  11262. /**
  11263. * 获取数据类型
  11264. * @param {Any} obj 需要获取数据类型的值
  11265. */
  11266. exports.isRequiredField = isRequiredField;
  11267. var type = function type(obj) {
  11268. var class2type = {};
  11269. // 生成class2type映射
  11270. "Boolean Number String Function Array Date RegExp Object Error".split(" ").map(function (item, index) {
  11271. class2type["[object " + item + "]"] = item.toLowerCase();
  11272. });
  11273. if (obj == null) {
  11274. return obj + "";
  11275. }
  11276. return (0, _typeof2.default)(obj) === "object" || typeof obj === "function" ? class2type[Object.prototype.toString.call(obj)] || "object" : (0, _typeof2.default)(obj);
  11277. };
  11278. /**
  11279. * 判断两个值是否相等
  11280. * @param {any} a 值
  11281. * @param {any} b 值
  11282. * @return {Boolean} 是否相等
  11283. */
  11284. exports.type = type;
  11285. var isEqual = function isEqual(a, b) {
  11286. //如果a和b本来就全等
  11287. if (a === b) {
  11288. //判断是否为0和-0
  11289. return a !== 0 || 1 / a === 1 / b;
  11290. }
  11291. //判断是否为null和undefined
  11292. if (a == null || b == null) {
  11293. return a === b;
  11294. }
  11295. //接下来判断a和b的数据类型
  11296. var classNameA = toString.call(a),
  11297. classNameB = toString.call(b);
  11298. //如果数据类型不相等,则返回false
  11299. if (classNameA !== classNameB) {
  11300. return false;
  11301. }
  11302. //如果数据类型相等,再根据不同数据类型分别判断
  11303. switch (classNameA) {
  11304. case '[object RegExp]':
  11305. case '[object String]':
  11306. //进行字符串转换比较
  11307. return '' + a === '' + b;
  11308. case '[object Number]':
  11309. //进行数字转换比较,判断是否为NaN
  11310. if (+a !== +a) {
  11311. return +b !== +b;
  11312. }
  11313. //判断是否为0或-0
  11314. return +a === 0 ? 1 / +a === 1 / b : +a === +b;
  11315. case '[object Date]':
  11316. case '[object Boolean]':
  11317. return +a === +b;
  11318. }
  11319. //如果是对象类型
  11320. if (classNameA == '[object Object]') {
  11321. //获取a和b的属性长度
  11322. var propsA = Object.getOwnPropertyNames(a),
  11323. propsB = Object.getOwnPropertyNames(b);
  11324. if (propsA.length != propsB.length) {
  11325. return false;
  11326. }
  11327. for (var i = 0; i < propsA.length; i++) {
  11328. var propName = propsA[i];
  11329. //如果对应属性对应值不相等,则返回false
  11330. if (a[propName] !== b[propName]) {
  11331. return false;
  11332. }
  11333. }
  11334. return true;
  11335. }
  11336. //如果是数组类型
  11337. if (classNameA == '[object Array]') {
  11338. if (a.toString() == b.toString()) {
  11339. return true;
  11340. }
  11341. return false;
  11342. }
  11343. };
  11344. exports.isEqual = isEqual;
  11345. /***/ }),
  11346. /***/ 288:
  11347. /*!************************************************************************************!*\
  11348. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  11349. \************************************************************************************/
  11350. /*! no static exports found */
  11351. /***/ (function(module, exports, __webpack_require__) {
  11352. "use strict";
  11353. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  11354. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  11355. Object.defineProperty(exports, "__esModule", {
  11356. value: true
  11357. });
  11358. exports.default = void 0;
  11359. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 271));
  11360. var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ 289));
  11361. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 44));
  11362. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  11363. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  11364. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  11365. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 46));
  11366. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  11367. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 269));
  11368. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 270));
  11369. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 272));
  11370. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 291));
  11371. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  11372. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  11373. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 293));
  11374. var _excluded = ["spaceAppId", "accessKey"];
  11375. 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; } } }; }
  11376. 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); }
  11377. 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; }
  11378. 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; }
  11379. 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; }
  11380. 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); }; }
  11381. 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; } }
  11382. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  11383. function t(e) {
  11384. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  11385. }
  11386. function n(e, t, n) {
  11387. return e(n = {
  11388. path: t,
  11389. exports: {},
  11390. require: function require(e, t) {
  11391. return function () {
  11392. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  11393. }(null == t && n.path);
  11394. }
  11395. }, n.exports), n.exports;
  11396. }
  11397. var s = n(function (e, t) {
  11398. var n;
  11399. e.exports = (n = n || function (e, t) {
  11400. var n = Object.create || function () {
  11401. function e() {}
  11402. return function (t) {
  11403. var n;
  11404. return e.prototype = t, n = new e(), e.prototype = null, n;
  11405. };
  11406. }(),
  11407. s = {},
  11408. r = s.lib = {},
  11409. i = r.Base = {
  11410. extend: function extend(e) {
  11411. var t = n(this);
  11412. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  11413. t.$super.init.apply(this, arguments);
  11414. }), t.init.prototype = t, t.$super = this, t;
  11415. },
  11416. create: function create() {
  11417. var e = this.extend();
  11418. return e.init.apply(e, arguments), e;
  11419. },
  11420. init: function init() {},
  11421. mixIn: function mixIn(e) {
  11422. for (var t in e) {
  11423. e.hasOwnProperty(t) && (this[t] = e[t]);
  11424. }
  11425. e.hasOwnProperty("toString") && (this.toString = e.toString);
  11426. },
  11427. clone: function clone() {
  11428. return this.init.prototype.extend(this);
  11429. }
  11430. },
  11431. o = r.WordArray = i.extend({
  11432. init: function init(e, n) {
  11433. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  11434. },
  11435. toString: function toString(e) {
  11436. return (e || c).stringify(this);
  11437. },
  11438. concat: function concat(e) {
  11439. var t = this.words,
  11440. n = e.words,
  11441. s = this.sigBytes,
  11442. r = e.sigBytes;
  11443. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  11444. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  11445. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  11446. } else for (i = 0; i < r; i += 4) {
  11447. t[s + i >>> 2] = n[i >>> 2];
  11448. }
  11449. return this.sigBytes += r, this;
  11450. },
  11451. clamp: function clamp() {
  11452. var t = this.words,
  11453. n = this.sigBytes;
  11454. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  11455. },
  11456. clone: function clone() {
  11457. var e = i.clone.call(this);
  11458. return e.words = this.words.slice(0), e;
  11459. },
  11460. random: function random(t) {
  11461. for (var n, s = [], r = function r(t) {
  11462. t = t;
  11463. var n = 987654321,
  11464. s = 4294967295;
  11465. return function () {
  11466. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  11467. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  11468. };
  11469. }, i = 0; i < t; i += 4) {
  11470. var a = r(4294967296 * (n || e.random()));
  11471. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  11472. }
  11473. return new o.init(s, t);
  11474. }
  11475. }),
  11476. a = s.enc = {},
  11477. c = a.Hex = {
  11478. stringify: function stringify(e) {
  11479. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  11480. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  11481. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  11482. }
  11483. return s.join("");
  11484. },
  11485. parse: function parse(e) {
  11486. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  11487. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  11488. }
  11489. return new o.init(n, t / 2);
  11490. }
  11491. },
  11492. u = a.Latin1 = {
  11493. stringify: function stringify(e) {
  11494. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  11495. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  11496. s.push(String.fromCharCode(i));
  11497. }
  11498. return s.join("");
  11499. },
  11500. parse: function parse(e) {
  11501. for (var t = e.length, n = [], s = 0; s < t; s++) {
  11502. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  11503. }
  11504. return new o.init(n, t);
  11505. }
  11506. },
  11507. l = a.Utf8 = {
  11508. stringify: function stringify(e) {
  11509. try {
  11510. return decodeURIComponent(escape(u.stringify(e)));
  11511. } catch (e) {
  11512. throw new Error("Malformed UTF-8 data");
  11513. }
  11514. },
  11515. parse: function parse(e) {
  11516. return u.parse(unescape(encodeURIComponent(e)));
  11517. }
  11518. },
  11519. h = r.BufferedBlockAlgorithm = i.extend({
  11520. reset: function reset() {
  11521. this._data = new o.init(), this._nDataBytes = 0;
  11522. },
  11523. _append: function _append(e) {
  11524. "string" == typeof e && (e = l.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  11525. },
  11526. _process: function _process(t) {
  11527. var n = this._data,
  11528. s = n.words,
  11529. r = n.sigBytes,
  11530. i = this.blockSize,
  11531. a = r / (4 * i),
  11532. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  11533. u = e.min(4 * c, r);
  11534. if (c) {
  11535. for (var l = 0; l < c; l += i) {
  11536. this._doProcessBlock(s, l);
  11537. }
  11538. var h = s.splice(0, c);
  11539. n.sigBytes -= u;
  11540. }
  11541. return new o.init(h, u);
  11542. },
  11543. clone: function clone() {
  11544. var e = i.clone.call(this);
  11545. return e._data = this._data.clone(), e;
  11546. },
  11547. _minBufferSize: 0
  11548. });
  11549. r.Hasher = h.extend({
  11550. cfg: i.extend(),
  11551. init: function init(e) {
  11552. this.cfg = this.cfg.extend(e), this.reset();
  11553. },
  11554. reset: function reset() {
  11555. h.reset.call(this), this._doReset();
  11556. },
  11557. update: function update(e) {
  11558. return this._append(e), this._process(), this;
  11559. },
  11560. finalize: function finalize(e) {
  11561. return e && this._append(e), this._doFinalize();
  11562. },
  11563. blockSize: 16,
  11564. _createHelper: function _createHelper(e) {
  11565. return function (t, n) {
  11566. return new e.init(n).finalize(t);
  11567. };
  11568. },
  11569. _createHmacHelper: function _createHmacHelper(e) {
  11570. return function (t, n) {
  11571. return new d.HMAC.init(e, n).finalize(t);
  11572. };
  11573. }
  11574. });
  11575. var d = s.algo = {};
  11576. return s;
  11577. }(Math), n);
  11578. }),
  11579. r = s,
  11580. i = (n(function (e, t) {
  11581. var n;
  11582. e.exports = (n = r, function (e) {
  11583. var t = n,
  11584. s = t.lib,
  11585. r = s.WordArray,
  11586. i = s.Hasher,
  11587. o = t.algo,
  11588. a = [];
  11589. !function () {
  11590. for (var t = 0; t < 64; t++) {
  11591. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  11592. }
  11593. }();
  11594. var c = o.MD5 = i.extend({
  11595. _doReset: function _doReset() {
  11596. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  11597. },
  11598. _doProcessBlock: function _doProcessBlock(e, t) {
  11599. for (var n = 0; n < 16; n++) {
  11600. var s = t + n,
  11601. r = e[s];
  11602. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  11603. }
  11604. var i = this._hash.words,
  11605. o = e[t + 0],
  11606. c = e[t + 1],
  11607. p = e[t + 2],
  11608. f = e[t + 3],
  11609. g = e[t + 4],
  11610. m = e[t + 5],
  11611. y = e[t + 6],
  11612. _ = e[t + 7],
  11613. w = e[t + 8],
  11614. v = e[t + 9],
  11615. I = e[t + 10],
  11616. S = e[t + 11],
  11617. b = e[t + 12],
  11618. k = e[t + 13],
  11619. A = e[t + 14],
  11620. P = e[t + 15],
  11621. T = i[0],
  11622. C = i[1],
  11623. x = i[2],
  11624. O = i[3];
  11625. T = u(T, C, x, O, o, 7, a[0]), O = u(O, T, C, x, c, 12, a[1]), x = u(x, O, T, C, p, 17, a[2]), C = u(C, x, O, T, f, 22, a[3]), T = u(T, C, x, O, g, 7, a[4]), O = u(O, T, C, x, m, 12, a[5]), x = u(x, O, T, C, y, 17, a[6]), C = u(C, x, O, T, _, 22, a[7]), T = u(T, C, x, O, w, 7, a[8]), O = u(O, T, C, x, v, 12, a[9]), x = u(x, O, T, C, I, 17, a[10]), C = u(C, x, O, T, S, 22, a[11]), T = u(T, C, x, O, b, 7, a[12]), O = u(O, T, C, x, k, 12, a[13]), x = u(x, O, T, C, A, 17, a[14]), T = l(T, C = u(C, x, O, T, P, 22, a[15]), x, O, c, 5, a[16]), O = l(O, T, C, x, y, 9, a[17]), x = l(x, O, T, C, S, 14, a[18]), C = l(C, x, O, T, o, 20, a[19]), T = l(T, C, x, O, m, 5, a[20]), O = l(O, T, C, x, I, 9, a[21]), x = l(x, O, T, C, P, 14, a[22]), C = l(C, x, O, T, g, 20, a[23]), T = l(T, C, x, O, v, 5, a[24]), O = l(O, T, C, x, A, 9, a[25]), x = l(x, O, T, C, f, 14, a[26]), C = l(C, x, O, T, w, 20, a[27]), T = l(T, C, x, O, k, 5, a[28]), O = l(O, T, C, x, p, 9, a[29]), x = l(x, O, T, C, _, 14, a[30]), T = h(T, C = l(C, x, O, T, b, 20, a[31]), x, O, m, 4, a[32]), O = h(O, T, C, x, w, 11, a[33]), x = h(x, O, T, C, S, 16, a[34]), C = h(C, x, O, T, A, 23, a[35]), T = h(T, C, x, O, c, 4, a[36]), O = h(O, T, C, x, g, 11, a[37]), x = h(x, O, T, C, _, 16, a[38]), C = h(C, x, O, T, I, 23, a[39]), T = h(T, C, x, O, k, 4, a[40]), O = h(O, T, C, x, o, 11, a[41]), x = h(x, O, T, C, f, 16, a[42]), C = h(C, x, O, T, y, 23, a[43]), T = h(T, C, x, O, v, 4, a[44]), O = h(O, T, C, x, b, 11, a[45]), x = h(x, O, T, C, P, 16, a[46]), T = d(T, C = h(C, x, O, T, p, 23, a[47]), x, O, o, 6, a[48]), O = d(O, T, C, x, _, 10, a[49]), x = d(x, O, T, C, A, 15, a[50]), C = d(C, x, O, T, m, 21, a[51]), T = d(T, C, x, O, b, 6, a[52]), O = d(O, T, C, x, f, 10, a[53]), x = d(x, O, T, C, I, 15, a[54]), C = d(C, x, O, T, c, 21, a[55]), T = d(T, C, x, O, w, 6, a[56]), O = d(O, T, C, x, P, 10, a[57]), x = d(x, O, T, C, y, 15, a[58]), C = d(C, x, O, T, k, 21, a[59]), T = d(T, C, x, O, g, 6, a[60]), O = d(O, T, C, x, S, 10, a[61]), x = d(x, O, T, C, p, 15, a[62]), C = d(C, x, O, T, v, 21, a[63]), i[0] = i[0] + T | 0, i[1] = i[1] + C | 0, i[2] = i[2] + x | 0, i[3] = i[3] + O | 0;
  11626. },
  11627. _doFinalize: function _doFinalize() {
  11628. var t = this._data,
  11629. n = t.words,
  11630. s = 8 * this._nDataBytes,
  11631. r = 8 * t.sigBytes;
  11632. n[r >>> 5] |= 128 << 24 - r % 32;
  11633. var i = e.floor(s / 4294967296),
  11634. o = s;
  11635. 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();
  11636. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  11637. var l = c[u];
  11638. c[u] = 16711935 & (l << 8 | l >>> 24) | 4278255360 & (l << 24 | l >>> 8);
  11639. }
  11640. return a;
  11641. },
  11642. clone: function clone() {
  11643. var e = i.clone.call(this);
  11644. return e._hash = this._hash.clone(), e;
  11645. }
  11646. });
  11647. function u(e, t, n, s, r, i, o) {
  11648. var a = e + (t & n | ~t & s) + r + o;
  11649. return (a << i | a >>> 32 - i) + t;
  11650. }
  11651. function l(e, t, n, s, r, i, o) {
  11652. var a = e + (t & s | n & ~s) + r + o;
  11653. return (a << i | a >>> 32 - i) + t;
  11654. }
  11655. function h(e, t, n, s, r, i, o) {
  11656. var a = e + (t ^ n ^ s) + r + o;
  11657. return (a << i | a >>> 32 - i) + t;
  11658. }
  11659. function d(e, t, n, s, r, i, o) {
  11660. var a = e + (n ^ (t | ~s)) + r + o;
  11661. return (a << i | a >>> 32 - i) + t;
  11662. }
  11663. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  11664. }(Math), n.MD5);
  11665. }), n(function (e, t) {
  11666. var n;
  11667. e.exports = (n = r, void function () {
  11668. var e = n,
  11669. t = e.lib.Base,
  11670. s = e.enc.Utf8;
  11671. e.algo.HMAC = t.extend({
  11672. init: function init(e, t) {
  11673. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  11674. var n = e.blockSize,
  11675. r = 4 * n;
  11676. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  11677. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  11678. a[u] ^= 1549556828, c[u] ^= 909522486;
  11679. }
  11680. i.sigBytes = o.sigBytes = r, this.reset();
  11681. },
  11682. reset: function reset() {
  11683. var e = this._hasher;
  11684. e.reset(), e.update(this._iKey);
  11685. },
  11686. update: function update(e) {
  11687. return this._hasher.update(e), this;
  11688. },
  11689. finalize: function finalize(e) {
  11690. var t = this._hasher,
  11691. n = t.finalize(e);
  11692. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  11693. }
  11694. });
  11695. }());
  11696. }), n(function (e, t) {
  11697. e.exports = r.HmacMD5;
  11698. })),
  11699. o = n(function (e, t) {
  11700. e.exports = r.enc.Utf8;
  11701. }),
  11702. a = n(function (e, t) {
  11703. var n;
  11704. e.exports = (n = r, function () {
  11705. var e = n,
  11706. t = e.lib.WordArray;
  11707. function s(e, n, s) {
  11708. for (var r = [], i = 0, o = 0; o < n; o++) {
  11709. if (o % 4) {
  11710. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  11711. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  11712. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  11713. }
  11714. }
  11715. return t.create(r, i);
  11716. }
  11717. e.enc.Base64 = {
  11718. stringify: function stringify(e) {
  11719. var t = e.words,
  11720. n = e.sigBytes,
  11721. s = this._map;
  11722. e.clamp();
  11723. for (var r = [], i = 0; i < n; i += 3) {
  11724. 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++) {
  11725. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  11726. }
  11727. }
  11728. var c = s.charAt(64);
  11729. if (c) for (; r.length % 4;) {
  11730. r.push(c);
  11731. }
  11732. return r.join("");
  11733. },
  11734. parse: function parse(e) {
  11735. var t = e.length,
  11736. n = this._map,
  11737. r = this._reverseMap;
  11738. if (!r) {
  11739. r = this._reverseMap = [];
  11740. for (var i = 0; i < n.length; i++) {
  11741. r[n.charCodeAt(i)] = i;
  11742. }
  11743. }
  11744. var o = n.charAt(64);
  11745. if (o) {
  11746. var a = e.indexOf(o);
  11747. -1 !== a && (t = a);
  11748. }
  11749. return s(e, t, r);
  11750. },
  11751. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  11752. };
  11753. }(), n.enc.Base64);
  11754. });
  11755. var c = "FUNCTION",
  11756. u = "OBJECT",
  11757. l = "CLIENT_DB",
  11758. h = "pending",
  11759. d = "fulfilled",
  11760. p = "rejected";
  11761. function f(e) {
  11762. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  11763. }
  11764. function g(e) {
  11765. return "object" === f(e);
  11766. }
  11767. function m(e) {
  11768. return "function" == typeof e;
  11769. }
  11770. function y(e) {
  11771. return function () {
  11772. try {
  11773. return e.apply(e, arguments);
  11774. } catch (e) {
  11775. console.error(e);
  11776. }
  11777. };
  11778. }
  11779. var _ = "REJECTED",
  11780. w = "NOT_PENDING";
  11781. var v = /*#__PURE__*/function () {
  11782. function v() {
  11783. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11784. e = _ref.createPromise,
  11785. _ref$retryRule = _ref.retryRule,
  11786. t = _ref$retryRule === void 0 ? _ : _ref$retryRule;
  11787. (0, _classCallCheck2.default)(this, v);
  11788. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  11789. }
  11790. (0, _createClass2.default)(v, [{
  11791. key: "needRetry",
  11792. get: function get() {
  11793. if (!this.status) return !0;
  11794. switch (this.retryRule) {
  11795. case _:
  11796. return this.status === p;
  11797. case w:
  11798. return this.status !== h;
  11799. }
  11800. }
  11801. }, {
  11802. key: "exec",
  11803. value: function exec() {
  11804. var _this = this;
  11805. return this.needRetry ? (this.status = h, this.promise = this.createPromise().then(function (e) {
  11806. return _this.status = d, Promise.resolve(e);
  11807. }, function (e) {
  11808. return _this.status = p, Promise.reject(e);
  11809. }), this.promise) : this.promise;
  11810. }
  11811. }]);
  11812. return v;
  11813. }();
  11814. function I(e) {
  11815. return e && "string" == typeof e ? JSON.parse(e) : e;
  11816. }
  11817. var S = "development" === "development",
  11818. b = "mp-weixin",
  11819. k = "true" === undefined || !0 === undefined,
  11820. A = I([]),
  11821. P = "h5" === b ? "web" : "app-plus" === b ? "app" : b,
  11822. T = I(undefined),
  11823. C = I([]) || [],
  11824. x = true;
  11825. var O = "";
  11826. try {
  11827. O = (__webpack_require__(/*! uni-stat-config */ 294).default || __webpack_require__(/*! uni-stat-config */ 294)).appid;
  11828. } catch (e) {}
  11829. var E = {};
  11830. function L(e) {
  11831. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  11832. var n, s;
  11833. return n = E, s = e, Object.prototype.hasOwnProperty.call(n, s) || (E[e] = t), E[e];
  11834. }
  11835. "app" === P && (E = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  11836. var R = ["invoke", "success", "fail", "complete"],
  11837. U = L("_globalUniCloudInterceptor");
  11838. function N(e, t) {
  11839. U[e] || (U[e] = {}), g(t) && Object.keys(t).forEach(function (n) {
  11840. R.indexOf(n) > -1 && function (e, t, n) {
  11841. var s = U[e][t];
  11842. s || (s = U[e][t] = []), -1 === s.indexOf(n) && m(n) && s.push(n);
  11843. }(e, n, t[n]);
  11844. });
  11845. }
  11846. function D(e, t) {
  11847. U[e] || (U[e] = {}), g(t) ? Object.keys(t).forEach(function (n) {
  11848. R.indexOf(n) > -1 && function (e, t, n) {
  11849. var s = U[e][t];
  11850. if (!s) return;
  11851. var r = s.indexOf(n);
  11852. r > -1 && s.splice(r, 1);
  11853. }(e, n, t[n]);
  11854. }) : delete U[e];
  11855. }
  11856. function M(e, t) {
  11857. return e && 0 !== e.length ? e.reduce(function (e, n) {
  11858. return e.then(function () {
  11859. return n(t);
  11860. });
  11861. }, Promise.resolve()) : Promise.resolve();
  11862. }
  11863. function q(e, t) {
  11864. return U[e] && U[e][t] || [];
  11865. }
  11866. function F(e) {
  11867. N("callObject", e);
  11868. }
  11869. var K = L("_globalUniCloudListener"),
  11870. j = "response",
  11871. B = "needLogin",
  11872. $ = "refreshToken",
  11873. W = "clientdb",
  11874. H = "cloudfunction",
  11875. z = "cloudobject";
  11876. function J(e) {
  11877. return K[e] || (K[e] = []), K[e];
  11878. }
  11879. function V(e, t) {
  11880. var n = J(e);
  11881. n.includes(t) || n.push(t);
  11882. }
  11883. function G(e, t) {
  11884. var n = J(e),
  11885. s = n.indexOf(t);
  11886. -1 !== s && n.splice(s, 1);
  11887. }
  11888. function Y(e, t) {
  11889. var n = J(e);
  11890. for (var _e2 = 0; _e2 < n.length; _e2++) {
  11891. (0, n[_e2])(t);
  11892. }
  11893. }
  11894. var Q,
  11895. X = !1;
  11896. function Z() {
  11897. return Q || (Q = new Promise(function (e) {
  11898. X && e(), function t() {
  11899. if ("function" == typeof getCurrentPages) {
  11900. var _t2 = getCurrentPages();
  11901. _t2 && _t2[0] && (X = !0, e());
  11902. }
  11903. X || setTimeout(function () {
  11904. t();
  11905. }, 30);
  11906. }();
  11907. }), Q);
  11908. }
  11909. function ee(e) {
  11910. var t = {};
  11911. for (var _n2 in e) {
  11912. var _s2 = e[_n2];
  11913. m(_s2) && (t[_n2] = y(_s2));
  11914. }
  11915. return t;
  11916. }
  11917. var te = /*#__PURE__*/function (_Error) {
  11918. (0, _inherits2.default)(te, _Error);
  11919. var _super = _createSuper(te);
  11920. function te(e) {
  11921. var _this2;
  11922. (0, _classCallCheck2.default)(this, te);
  11923. _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;
  11924. return _this2;
  11925. }
  11926. (0, _createClass2.default)(te, [{
  11927. key: "toJson",
  11928. value: function toJson() {
  11929. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  11930. if (!(e >= 10)) return e++, {
  11931. errCode: this.errCode,
  11932. errMsg: this.errMsg,
  11933. errSubject: this.errSubject,
  11934. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  11935. };
  11936. }
  11937. }]);
  11938. return te;
  11939. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  11940. var ne = {
  11941. request: function request(e) {
  11942. return uni.request(e);
  11943. },
  11944. uploadFile: function uploadFile(e) {
  11945. return uni.uploadFile(e);
  11946. },
  11947. setStorageSync: function setStorageSync(e, t) {
  11948. return uni.setStorageSync(e, t);
  11949. },
  11950. getStorageSync: function getStorageSync(e) {
  11951. return uni.getStorageSync(e);
  11952. },
  11953. removeStorageSync: function removeStorageSync(e) {
  11954. return uni.removeStorageSync(e);
  11955. },
  11956. clearStorageSync: function clearStorageSync() {
  11957. return uni.clearStorageSync();
  11958. }
  11959. };
  11960. function se() {
  11961. return {
  11962. token: ne.getStorageSync("uni_id_token") || ne.getStorageSync("uniIdToken"),
  11963. tokenExpired: ne.getStorageSync("uni_id_token_expired")
  11964. };
  11965. }
  11966. function re() {
  11967. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11968. e = _ref2.token,
  11969. t = _ref2.tokenExpired;
  11970. e && ne.setStorageSync("uni_id_token", e), t && ne.setStorageSync("uni_id_token_expired", t);
  11971. }
  11972. var ie, oe;
  11973. function ae() {
  11974. return ie || (ie = uni.getSystemInfoSync()), ie;
  11975. }
  11976. function ce() {
  11977. var e, t;
  11978. try {
  11979. if (uni.getLaunchOptionsSync) {
  11980. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  11981. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  11982. _n3 = _uni$getLaunchOptions.scene,
  11983. _s3 = _uni$getLaunchOptions.channel;
  11984. e = _s3, t = _n3;
  11985. }
  11986. } catch (e) {}
  11987. return {
  11988. channel: e,
  11989. scene: t
  11990. };
  11991. }
  11992. function ue() {
  11993. var e = uni.getLocale && uni.getLocale() || "en";
  11994. if (oe) return _objectSpread(_objectSpread({}, oe), {}, {
  11995. locale: e,
  11996. LOCALE: e
  11997. });
  11998. var t = ae(),
  11999. n = t.deviceId,
  12000. s = t.osName,
  12001. r = t.uniPlatform,
  12002. i = t.appId,
  12003. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  12004. for (var _e3 = 0; _e3 < o.length; _e3++) {
  12005. delete t[o[_e3]];
  12006. }
  12007. return oe = _objectSpread(_objectSpread({
  12008. PLATFORM: r,
  12009. OS: s,
  12010. APPID: i,
  12011. DEVICEID: n
  12012. }, ce()), t), _objectSpread(_objectSpread({}, oe), {}, {
  12013. locale: e,
  12014. LOCALE: e
  12015. });
  12016. }
  12017. var le = {
  12018. sign: function sign(e, t) {
  12019. var n = "";
  12020. return Object.keys(e).sort().forEach(function (t) {
  12021. e[t] && (n = n + "&" + t + "=" + e[t]);
  12022. }), n = n.slice(1), i(n, t).toString();
  12023. },
  12024. wrappedRequest: function wrappedRequest(e, t) {
  12025. return new Promise(function (n, s) {
  12026. t(Object.assign(e, {
  12027. complete: function complete(e) {
  12028. e || (e = {}), S && "web" === P && e.errMsg && 0 === e.errMsg.indexOf("request:fail") && console.warn("发布H5,需要在uniCloud后台操作,绑定安全域名,否则会因为跨域问题而无法访问。教程参考:https://uniapp.dcloud.io/uniCloud/quickstart?id=useinh5");
  12029. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  12030. if (!e.statusCode || e.statusCode >= 400) return s(new te({
  12031. code: "SYS_ERR",
  12032. message: e.errMsg || "request:fail",
  12033. requestId: t
  12034. }));
  12035. var r = e.data;
  12036. if (r.error) return s(new te({
  12037. code: r.error.code,
  12038. message: r.error.message,
  12039. requestId: t
  12040. }));
  12041. r.result = r.data, r.requestId = t, delete r.data, n(r);
  12042. }
  12043. }));
  12044. });
  12045. },
  12046. toBase64: function toBase64(e) {
  12047. return a.stringify(o.parse(e));
  12048. }
  12049. };
  12050. var he = /*#__PURE__*/function () {
  12051. function he(e) {
  12052. var _this3 = this;
  12053. (0, _classCallCheck2.default)(this, he);
  12054. ["spaceId", "clientSecret"].forEach(function (t) {
  12055. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error("".concat(t, " required"));
  12056. }), this.config = Object.assign({}, {
  12057. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  12058. }, 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 = ne, this._getAccessTokenPromiseHub = new v({
  12059. createPromise: function createPromise() {
  12060. return _this3.requestAuth(_this3.setupRequest({
  12061. method: "serverless.auth.user.anonymousAuthorize",
  12062. params: "{}"
  12063. }, "auth")).then(function (e) {
  12064. if (!e.result || !e.result.accessToken) throw new te({
  12065. code: "AUTH_FAILED",
  12066. message: "获取accessToken失败"
  12067. });
  12068. _this3.setAccessToken(e.result.accessToken);
  12069. });
  12070. },
  12071. retryRule: w
  12072. });
  12073. }
  12074. (0, _createClass2.default)(he, [{
  12075. key: "hasAccessToken",
  12076. get: function get() {
  12077. return !!this.accessToken;
  12078. }
  12079. }, {
  12080. key: "setAccessToken",
  12081. value: function setAccessToken(e) {
  12082. this.accessToken = e;
  12083. }
  12084. }, {
  12085. key: "requestWrapped",
  12086. value: function requestWrapped(e) {
  12087. return le.wrappedRequest(e, this.adapter.request);
  12088. }
  12089. }, {
  12090. key: "requestAuth",
  12091. value: function requestAuth(e) {
  12092. return this.requestWrapped(e);
  12093. }
  12094. }, {
  12095. key: "request",
  12096. value: function request(e, t) {
  12097. var _this4 = this;
  12098. return Promise.resolve().then(function () {
  12099. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  12100. return new Promise(function (e, n) {
  12101. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  12102. }).then(function () {
  12103. return _this4.getAccessToken();
  12104. }).then(function () {
  12105. var t = _this4.rebuildRequest(e);
  12106. return _this4.request(t, !0);
  12107. });
  12108. }) : _this4.getAccessToken().then(function () {
  12109. var t = _this4.rebuildRequest(e);
  12110. return _this4.request(t, !0);
  12111. });
  12112. });
  12113. }
  12114. }, {
  12115. key: "rebuildRequest",
  12116. value: function rebuildRequest(e) {
  12117. var t = Object.assign({}, e);
  12118. return t.data.token = this.accessToken, t.header["x-basement-token"] = this.accessToken, t.header["x-serverless-sign"] = le.sign(t.data, this.config.clientSecret), t;
  12119. }
  12120. }, {
  12121. key: "setupRequest",
  12122. value: function setupRequest(e, t) {
  12123. var n = Object.assign({}, e, {
  12124. spaceId: this.config.spaceId,
  12125. timestamp: Date.now()
  12126. }),
  12127. s = {
  12128. "Content-Type": "application/json"
  12129. };
  12130. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret), {
  12131. url: this.config.requestUrl,
  12132. method: "POST",
  12133. data: n,
  12134. dataType: "json",
  12135. header: s
  12136. };
  12137. }
  12138. }, {
  12139. key: "getAccessToken",
  12140. value: function getAccessToken() {
  12141. return this._getAccessTokenPromiseHub.exec();
  12142. }
  12143. }, {
  12144. key: "authorize",
  12145. value: function () {
  12146. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  12147. return _regenerator.default.wrap(function _callee$(_context) {
  12148. while (1) {
  12149. switch (_context.prev = _context.next) {
  12150. case 0:
  12151. _context.next = 2;
  12152. return this.getAccessToken();
  12153. case 2:
  12154. case "end":
  12155. return _context.stop();
  12156. }
  12157. }
  12158. }, _callee, this);
  12159. }));
  12160. function authorize() {
  12161. return _authorize.apply(this, arguments);
  12162. }
  12163. return authorize;
  12164. }()
  12165. }, {
  12166. key: "callFunction",
  12167. value: function callFunction(e) {
  12168. var t = {
  12169. method: "serverless.function.runtime.invoke",
  12170. params: JSON.stringify({
  12171. functionTarget: e.name,
  12172. functionArgs: e.data || {}
  12173. })
  12174. };
  12175. return this.request(this.setupRequest(t));
  12176. }
  12177. }, {
  12178. key: "getOSSUploadOptionsFromPath",
  12179. value: function getOSSUploadOptionsFromPath(e) {
  12180. var t = {
  12181. method: "serverless.file.resource.generateProximalSign",
  12182. params: JSON.stringify(e)
  12183. };
  12184. return this.request(this.setupRequest(t));
  12185. }
  12186. }, {
  12187. key: "uploadFileToOSS",
  12188. value: function uploadFileToOSS(_ref3) {
  12189. var _this5 = this;
  12190. var e = _ref3.url,
  12191. t = _ref3.formData,
  12192. n = _ref3.name,
  12193. s = _ref3.filePath,
  12194. r = _ref3.fileType,
  12195. i = _ref3.onUploadProgress;
  12196. return new Promise(function (o, a) {
  12197. var c = _this5.adapter.uploadFile({
  12198. url: e,
  12199. formData: t,
  12200. name: n,
  12201. filePath: s,
  12202. fileType: r,
  12203. header: {
  12204. "X-OSS-server-side-encrpytion": "AES256"
  12205. },
  12206. success: function success(e) {
  12207. e && e.statusCode < 400 ? o(e) : a(new te({
  12208. code: "UPLOAD_FAILED",
  12209. message: "文件上传失败"
  12210. }));
  12211. },
  12212. fail: function fail(e) {
  12213. a(new te({
  12214. code: e.code || "UPLOAD_FAILED",
  12215. message: e.message || e.errMsg || "文件上传失败"
  12216. }));
  12217. }
  12218. });
  12219. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  12220. i({
  12221. loaded: e.totalBytesSent,
  12222. total: e.totalBytesExpectedToSend
  12223. });
  12224. });
  12225. });
  12226. }
  12227. }, {
  12228. key: "reportOSSUpload",
  12229. value: function reportOSSUpload(e) {
  12230. var t = {
  12231. method: "serverless.file.resource.report",
  12232. params: JSON.stringify(e)
  12233. };
  12234. return this.request(this.setupRequest(t));
  12235. }
  12236. }, {
  12237. key: "uploadFile",
  12238. value: function () {
  12239. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  12240. var e, t, _ref4$fileType, n, _ref4$cloudPathAsReal, s, r, i, o, a, c, u, l, h, d, p, g, m, y, _, _e4, w;
  12241. return _regenerator.default.wrap(function _callee2$(_context2) {
  12242. while (1) {
  12243. switch (_context2.prev = _context2.next) {
  12244. case 0:
  12245. e = _ref4.filePath, t = _ref4.cloudPath, _ref4$fileType = _ref4.fileType, n = _ref4$fileType === void 0 ? "image" : _ref4$fileType, _ref4$cloudPathAsReal = _ref4.cloudPathAsRealPath, s = _ref4$cloudPathAsReal === void 0 ? !1 : _ref4$cloudPathAsReal, r = _ref4.onUploadProgress, i = _ref4.config;
  12246. if (!("string" !== f(t))) {
  12247. _context2.next = 3;
  12248. break;
  12249. }
  12250. throw new te({
  12251. code: "INVALID_PARAM",
  12252. message: "cloudPath必须为字符串类型"
  12253. });
  12254. case 3:
  12255. if (t = t.trim()) {
  12256. _context2.next = 5;
  12257. break;
  12258. }
  12259. throw new te({
  12260. code: "INVALID_PARAM",
  12261. message: "cloudPath不可为空"
  12262. });
  12263. case 5:
  12264. if (!/:\/\//.test(t)) {
  12265. _context2.next = 7;
  12266. break;
  12267. }
  12268. throw new te({
  12269. code: "INVALID_PARAM",
  12270. message: "cloudPath不合法"
  12271. });
  12272. case 7:
  12273. o = i && i.envType || this.config.envType;
  12274. if (!(s && ("/" !== t[0] && (t = "/" + t), t.indexOf("\\") > -1))) {
  12275. _context2.next = 10;
  12276. break;
  12277. }
  12278. throw new te({
  12279. code: "INVALID_PARAM",
  12280. message: "使用cloudPath作为路径时,cloudPath不可包含“\\”"
  12281. });
  12282. case 10:
  12283. _context2.next = 12;
  12284. return this.getOSSUploadOptionsFromPath({
  12285. env: o,
  12286. filename: s ? t.split("/").pop() : t,
  12287. fileId: s ? t : void 0
  12288. });
  12289. case 12:
  12290. a = _context2.sent.result;
  12291. c = "https://" + a.cdnDomain + "/" + a.ossPath;
  12292. u = a.securityToken;
  12293. l = a.accessKeyId;
  12294. h = a.signature;
  12295. d = a.host;
  12296. p = a.ossPath;
  12297. g = a.id;
  12298. m = a.policy;
  12299. y = a.ossCallbackUrl;
  12300. _ = {
  12301. "Cache-Control": "max-age=2592000",
  12302. "Content-Disposition": "attachment",
  12303. OSSAccessKeyId: l,
  12304. Signature: h,
  12305. host: d,
  12306. id: g,
  12307. key: p,
  12308. policy: m,
  12309. success_action_status: 200
  12310. };
  12311. if (u && (_["x-oss-security-token"] = u), y) {
  12312. _e4 = JSON.stringify({
  12313. callbackUrl: y,
  12314. callbackBody: JSON.stringify({
  12315. fileId: g,
  12316. spaceId: this.config.spaceId
  12317. }),
  12318. callbackBodyType: "application/json"
  12319. });
  12320. _.callback = le.toBase64(_e4);
  12321. }
  12322. w = {
  12323. url: "https://" + a.host,
  12324. formData: _,
  12325. fileName: "file",
  12326. name: "file",
  12327. filePath: e,
  12328. fileType: n
  12329. };
  12330. _context2.next = 27;
  12331. return this.uploadFileToOSS(Object.assign({}, w, {
  12332. onUploadProgress: r
  12333. }));
  12334. case 27:
  12335. if (!y) {
  12336. _context2.next = 29;
  12337. break;
  12338. }
  12339. return _context2.abrupt("return", {
  12340. success: !0,
  12341. filePath: e,
  12342. fileID: c
  12343. });
  12344. case 29:
  12345. _context2.next = 31;
  12346. return this.reportOSSUpload({
  12347. id: g
  12348. });
  12349. case 31:
  12350. if (!_context2.sent.success) {
  12351. _context2.next = 33;
  12352. break;
  12353. }
  12354. return _context2.abrupt("return", {
  12355. success: !0,
  12356. filePath: e,
  12357. fileID: c
  12358. });
  12359. case 33:
  12360. throw new te({
  12361. code: "UPLOAD_FAILED",
  12362. message: "文件上传失败"
  12363. });
  12364. case 34:
  12365. case "end":
  12366. return _context2.stop();
  12367. }
  12368. }
  12369. }, _callee2, this);
  12370. }));
  12371. function uploadFile(_x) {
  12372. return _uploadFile.apply(this, arguments);
  12373. }
  12374. return uploadFile;
  12375. }()
  12376. }, {
  12377. key: "getTempFileURL",
  12378. value: function getTempFileURL() {
  12379. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  12380. e = _ref5.fileList;
  12381. return new Promise(function (t, n) {
  12382. Array.isArray(e) && 0 !== e.length || n(new te({
  12383. code: "INVALID_PARAM",
  12384. message: "fileList的元素必须是非空的字符串"
  12385. })), t({
  12386. fileList: e.map(function (e) {
  12387. return {
  12388. fileID: e,
  12389. tempFileURL: e
  12390. };
  12391. })
  12392. });
  12393. });
  12394. }
  12395. }, {
  12396. key: "getFileInfo",
  12397. value: function () {
  12398. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  12399. var _ref6,
  12400. e,
  12401. t,
  12402. _args3 = arguments;
  12403. return _regenerator.default.wrap(function _callee3$(_context3) {
  12404. while (1) {
  12405. switch (_context3.prev = _context3.next) {
  12406. case 0:
  12407. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  12408. if (!(!Array.isArray(e) || 0 === e.length)) {
  12409. _context3.next = 3;
  12410. break;
  12411. }
  12412. throw new te({
  12413. code: "INVALID_PARAM",
  12414. message: "fileList的元素必须是非空的字符串"
  12415. });
  12416. case 3:
  12417. t = {
  12418. method: "serverless.file.resource.info",
  12419. params: JSON.stringify({
  12420. id: e.map(function (e) {
  12421. return e.split("?")[0];
  12422. }).join(",")
  12423. })
  12424. };
  12425. _context3.next = 6;
  12426. return this.request(this.setupRequest(t));
  12427. case 6:
  12428. _context3.t0 = _context3.sent.result;
  12429. return _context3.abrupt("return", {
  12430. fileList: _context3.t0
  12431. });
  12432. case 8:
  12433. case "end":
  12434. return _context3.stop();
  12435. }
  12436. }
  12437. }, _callee3, this);
  12438. }));
  12439. function getFileInfo() {
  12440. return _getFileInfo.apply(this, arguments);
  12441. }
  12442. return getFileInfo;
  12443. }()
  12444. }]);
  12445. return he;
  12446. }();
  12447. var de = {
  12448. init: function init(e) {
  12449. var t = new he(e),
  12450. n = {
  12451. signInAnonymously: function signInAnonymously() {
  12452. return t.authorize();
  12453. },
  12454. getLoginState: function getLoginState() {
  12455. return Promise.resolve(!1);
  12456. }
  12457. };
  12458. return t.auth = function () {
  12459. return n;
  12460. }, t.customAuth = t.auth, t;
  12461. }
  12462. };
  12463. var pe = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  12464. var fe;
  12465. !function (e) {
  12466. e.local = "local", e.none = "none", e.session = "session";
  12467. }(fe || (fe = {}));
  12468. var ge = function ge() {},
  12469. me = n(function (e, t) {
  12470. var n;
  12471. e.exports = (n = r, function (e) {
  12472. var t = n,
  12473. s = t.lib,
  12474. r = s.WordArray,
  12475. i = s.Hasher,
  12476. o = t.algo,
  12477. a = [],
  12478. c = [];
  12479. !function () {
  12480. function t(t) {
  12481. for (var n = e.sqrt(t), s = 2; s <= n; s++) {
  12482. if (!(t % s)) return !1;
  12483. }
  12484. return !0;
  12485. }
  12486. function n(e) {
  12487. return 4294967296 * (e - (0 | e)) | 0;
  12488. }
  12489. for (var s = 2, r = 0; r < 64;) {
  12490. t(s) && (r < 8 && (a[r] = n(e.pow(s, .5))), c[r] = n(e.pow(s, 1 / 3)), r++), s++;
  12491. }
  12492. }();
  12493. var u = [],
  12494. l = o.SHA256 = i.extend({
  12495. _doReset: function _doReset() {
  12496. this._hash = new r.init(a.slice(0));
  12497. },
  12498. _doProcessBlock: function _doProcessBlock(e, t) {
  12499. for (var n = this._hash.words, s = n[0], r = n[1], i = n[2], o = n[3], a = n[4], l = n[5], h = n[6], d = n[7], p = 0; p < 64; p++) {
  12500. if (p < 16) u[p] = 0 | e[t + p];else {
  12501. var f = u[p - 15],
  12502. g = (f << 25 | f >>> 7) ^ (f << 14 | f >>> 18) ^ f >>> 3,
  12503. m = u[p - 2],
  12504. y = (m << 15 | m >>> 17) ^ (m << 13 | m >>> 19) ^ m >>> 10;
  12505. u[p] = g + u[p - 7] + y + u[p - 16];
  12506. }
  12507. var _ = s & r ^ s & i ^ r & i,
  12508. w = (s << 30 | s >>> 2) ^ (s << 19 | s >>> 13) ^ (s << 10 | s >>> 22),
  12509. v = d + ((a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25)) + (a & l ^ ~a & h) + c[p] + u[p];
  12510. d = h, h = l, l = a, a = o + v | 0, o = i, i = r, r = s, s = v + (w + _) | 0;
  12511. }
  12512. n[0] = n[0] + s | 0, n[1] = n[1] + r | 0, n[2] = n[2] + i | 0, n[3] = n[3] + o | 0, n[4] = n[4] + a | 0, n[5] = n[5] + l | 0, n[6] = n[6] + h | 0, n[7] = n[7] + d | 0;
  12513. },
  12514. _doFinalize: function _doFinalize() {
  12515. var t = this._data,
  12516. n = t.words,
  12517. s = 8 * this._nDataBytes,
  12518. r = 8 * t.sigBytes;
  12519. return n[r >>> 5] |= 128 << 24 - r % 32, n[14 + (r + 64 >>> 9 << 4)] = e.floor(s / 4294967296), n[15 + (r + 64 >>> 9 << 4)] = s, t.sigBytes = 4 * n.length, this._process(), this._hash;
  12520. },
  12521. clone: function clone() {
  12522. var e = i.clone.call(this);
  12523. return e._hash = this._hash.clone(), e;
  12524. }
  12525. });
  12526. t.SHA256 = i._createHelper(l), t.HmacSHA256 = i._createHmacHelper(l);
  12527. }(Math), n.SHA256);
  12528. }),
  12529. ye = me,
  12530. _e = n(function (e, t) {
  12531. e.exports = r.HmacSHA256;
  12532. });
  12533. var we = function we() {
  12534. var e;
  12535. if (!Promise) {
  12536. e = function e() {}, e.promise = {};
  12537. var _t3 = function _t3() {
  12538. throw new te({
  12539. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  12540. });
  12541. };
  12542. return Object.defineProperty(e.promise, "then", {
  12543. get: _t3
  12544. }), Object.defineProperty(e.promise, "catch", {
  12545. get: _t3
  12546. }), e;
  12547. }
  12548. var t = new Promise(function (t, n) {
  12549. e = function e(_e5, s) {
  12550. return _e5 ? n(_e5) : t(s);
  12551. };
  12552. });
  12553. return e.promise = t, e;
  12554. };
  12555. function ve(e) {
  12556. return void 0 === e;
  12557. }
  12558. function Ie(e) {
  12559. return "[object Null]" === Object.prototype.toString.call(e);
  12560. }
  12561. var Se;
  12562. function be(e) {
  12563. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  12564. var n;
  12565. var _iterator = _createForOfIteratorHelper(t),
  12566. _step;
  12567. try {
  12568. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  12569. var _e6 = _step.value;
  12570. var _t4 = _e6.isMatch,
  12571. _n4 = _e6.genAdapter,
  12572. _s4 = _e6.runtime;
  12573. if (_t4()) return {
  12574. adapter: _n4(),
  12575. runtime: _s4
  12576. };
  12577. }
  12578. } catch (err) {
  12579. _iterator.e(err);
  12580. } finally {
  12581. _iterator.f();
  12582. }
  12583. }
  12584. !function (e) {
  12585. e.WEB = "web", e.WX_MP = "wx_mp";
  12586. }(Se || (Se = {}));
  12587. var ke = {
  12588. adapter: null,
  12589. runtime: void 0
  12590. },
  12591. Ae = ["anonymousUuidKey"];
  12592. var Pe = /*#__PURE__*/function (_ge) {
  12593. (0, _inherits2.default)(Pe, _ge);
  12594. var _super2 = _createSuper(Pe);
  12595. function Pe() {
  12596. var _this6;
  12597. (0, _classCallCheck2.default)(this, Pe);
  12598. _this6 = _super2.call(this), ke.adapter.root.tcbObject || (ke.adapter.root.tcbObject = {});
  12599. return _this6;
  12600. }
  12601. (0, _createClass2.default)(Pe, [{
  12602. key: "setItem",
  12603. value: function setItem(e, t) {
  12604. ke.adapter.root.tcbObject[e] = t;
  12605. }
  12606. }, {
  12607. key: "getItem",
  12608. value: function getItem(e) {
  12609. return ke.adapter.root.tcbObject[e];
  12610. }
  12611. }, {
  12612. key: "removeItem",
  12613. value: function removeItem(e) {
  12614. delete ke.adapter.root.tcbObject[e];
  12615. }
  12616. }, {
  12617. key: "clear",
  12618. value: function clear() {
  12619. delete ke.adapter.root.tcbObject;
  12620. }
  12621. }]);
  12622. return Pe;
  12623. }(ge);
  12624. function Te(e, t) {
  12625. switch (e) {
  12626. case "local":
  12627. return t.localStorage || new Pe();
  12628. case "none":
  12629. return new Pe();
  12630. default:
  12631. return t.sessionStorage || new Pe();
  12632. }
  12633. }
  12634. var Ce = /*#__PURE__*/function () {
  12635. function Ce(e) {
  12636. (0, _classCallCheck2.default)(this, Ce);
  12637. if (!this._storage) {
  12638. this._persistence = ke.adapter.primaryStorage || e.persistence, this._storage = Te(this._persistence, ke.adapter);
  12639. var _t5 = "access_token_".concat(e.env),
  12640. _n5 = "access_token_expire_".concat(e.env),
  12641. _s5 = "refresh_token_".concat(e.env),
  12642. _r = "anonymous_uuid_".concat(e.env),
  12643. _i = "login_type_".concat(e.env),
  12644. _o = "user_info_".concat(e.env);
  12645. this.keys = {
  12646. accessTokenKey: _t5,
  12647. accessTokenExpireKey: _n5,
  12648. refreshTokenKey: _s5,
  12649. anonymousUuidKey: _r,
  12650. loginTypeKey: _i,
  12651. userInfoKey: _o
  12652. };
  12653. }
  12654. }
  12655. (0, _createClass2.default)(Ce, [{
  12656. key: "updatePersistence",
  12657. value: function updatePersistence(e) {
  12658. if (e === this._persistence) return;
  12659. var t = "local" === this._persistence;
  12660. this._persistence = e;
  12661. var n = Te(e, ke.adapter);
  12662. for (var _e7 in this.keys) {
  12663. var _s6 = this.keys[_e7];
  12664. if (t && Ae.includes(_e7)) continue;
  12665. var _r2 = this._storage.getItem(_s6);
  12666. ve(_r2) || Ie(_r2) || (n.setItem(_s6, _r2), this._storage.removeItem(_s6));
  12667. }
  12668. this._storage = n;
  12669. }
  12670. }, {
  12671. key: "setStore",
  12672. value: function setStore(e, t, n) {
  12673. if (!this._storage) return;
  12674. var s = {
  12675. version: n || "localCachev1",
  12676. content: t
  12677. },
  12678. r = JSON.stringify(s);
  12679. try {
  12680. this._storage.setItem(e, r);
  12681. } catch (e) {
  12682. throw e;
  12683. }
  12684. }
  12685. }, {
  12686. key: "getStore",
  12687. value: function getStore(e, t) {
  12688. try {
  12689. if (!this._storage) return;
  12690. } catch (e) {
  12691. return "";
  12692. }
  12693. t = t || "localCachev1";
  12694. var n = this._storage.getItem(e);
  12695. if (!n) return "";
  12696. if (n.indexOf(t) >= 0) {
  12697. return JSON.parse(n).content;
  12698. }
  12699. return "";
  12700. }
  12701. }, {
  12702. key: "removeStore",
  12703. value: function removeStore(e) {
  12704. this._storage.removeItem(e);
  12705. }
  12706. }]);
  12707. return Ce;
  12708. }();
  12709. var xe = {},
  12710. Oe = {};
  12711. function Ee(e) {
  12712. return xe[e];
  12713. }
  12714. var Le = /*#__PURE__*/(0, _createClass2.default)(function Le(e, t) {
  12715. (0, _classCallCheck2.default)(this, Le);
  12716. this.data = t || null, this.name = e;
  12717. });
  12718. var Re = /*#__PURE__*/function (_Le) {
  12719. (0, _inherits2.default)(Re, _Le);
  12720. var _super3 = _createSuper(Re);
  12721. function Re(e, t) {
  12722. var _this7;
  12723. (0, _classCallCheck2.default)(this, Re);
  12724. _this7 = _super3.call(this, "error", {
  12725. error: e,
  12726. data: t
  12727. }), _this7.error = e;
  12728. return _this7;
  12729. }
  12730. return (0, _createClass2.default)(Re);
  12731. }(Le);
  12732. var Ue = new ( /*#__PURE__*/function () {
  12733. function _class() {
  12734. (0, _classCallCheck2.default)(this, _class);
  12735. this._listeners = {};
  12736. }
  12737. (0, _createClass2.default)(_class, [{
  12738. key: "on",
  12739. value: function on(e, t) {
  12740. return function (e, t, n) {
  12741. n[e] = n[e] || [], n[e].push(t);
  12742. }(e, t, this._listeners), this;
  12743. }
  12744. }, {
  12745. key: "off",
  12746. value: function off(e, t) {
  12747. return function (e, t, n) {
  12748. if (n && n[e]) {
  12749. var _s7 = n[e].indexOf(t);
  12750. -1 !== _s7 && n[e].splice(_s7, 1);
  12751. }
  12752. }(e, t, this._listeners), this;
  12753. }
  12754. }, {
  12755. key: "fire",
  12756. value: function fire(e, t) {
  12757. if (e instanceof Re) return console.error(e.error), this;
  12758. var n = "string" == typeof e ? new Le(e, t || {}) : e;
  12759. var s = n.name;
  12760. if (this._listens(s)) {
  12761. n.target = this;
  12762. var _e8 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  12763. var _iterator2 = _createForOfIteratorHelper(_e8),
  12764. _step2;
  12765. try {
  12766. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  12767. var _t6 = _step2.value;
  12768. _t6.call(this, n);
  12769. }
  12770. } catch (err) {
  12771. _iterator2.e(err);
  12772. } finally {
  12773. _iterator2.f();
  12774. }
  12775. }
  12776. return this;
  12777. }
  12778. }, {
  12779. key: "_listens",
  12780. value: function _listens(e) {
  12781. return this._listeners[e] && this._listeners[e].length > 0;
  12782. }
  12783. }]);
  12784. return _class;
  12785. }())();
  12786. function Ne(e, t) {
  12787. Ue.on(e, t);
  12788. }
  12789. function De(e) {
  12790. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12791. Ue.fire(e, t);
  12792. }
  12793. function Me(e, t) {
  12794. Ue.off(e, t);
  12795. }
  12796. var qe = "loginStateChanged",
  12797. Fe = "loginStateExpire",
  12798. Ke = "loginTypeChanged",
  12799. je = "anonymousConverted",
  12800. Be = "refreshAccessToken";
  12801. var $e;
  12802. !function (e) {
  12803. 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";
  12804. }($e || ($e = {}));
  12805. var We = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  12806. He = {
  12807. "X-SDK-Version": "1.3.5"
  12808. };
  12809. function ze(e, t, n) {
  12810. var s = e[t];
  12811. e[t] = function (t) {
  12812. var r = {},
  12813. i = {};
  12814. n.forEach(function (n) {
  12815. var _n$call = n.call(e, t),
  12816. s = _n$call.data,
  12817. o = _n$call.headers;
  12818. Object.assign(r, s), Object.assign(i, o);
  12819. });
  12820. var o = t.data;
  12821. return o && function () {
  12822. var e;
  12823. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e9 in r) {
  12824. o.append(_e9, r[_e9]);
  12825. }
  12826. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  12827. };
  12828. }
  12829. function Je() {
  12830. var e = Math.random().toString(16).slice(2);
  12831. return {
  12832. data: {
  12833. seqId: e
  12834. },
  12835. headers: _objectSpread(_objectSpread({}, He), {}, {
  12836. "x-seqid": e
  12837. })
  12838. };
  12839. }
  12840. var Ve = /*#__PURE__*/function () {
  12841. function Ve() {
  12842. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  12843. (0, _classCallCheck2.default)(this, Ve);
  12844. var t;
  12845. this.config = e, this._reqClass = new ke.adapter.reqClass({
  12846. timeout: this.config.timeout,
  12847. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  12848. restrictedMethods: ["post"]
  12849. }), this._cache = Ee(this.config.env), this._localCache = (t = this.config.env, Oe[t]), ze(this._reqClass, "post", [Je]), ze(this._reqClass, "upload", [Je]), ze(this._reqClass, "download", [Je]);
  12850. }
  12851. (0, _createClass2.default)(Ve, [{
  12852. key: "post",
  12853. value: function () {
  12854. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  12855. return _regenerator.default.wrap(function _callee4$(_context4) {
  12856. while (1) {
  12857. switch (_context4.prev = _context4.next) {
  12858. case 0:
  12859. _context4.next = 2;
  12860. return this._reqClass.post(e);
  12861. case 2:
  12862. return _context4.abrupt("return", _context4.sent);
  12863. case 3:
  12864. case "end":
  12865. return _context4.stop();
  12866. }
  12867. }
  12868. }, _callee4, this);
  12869. }));
  12870. function post(_x2) {
  12871. return _post.apply(this, arguments);
  12872. }
  12873. return post;
  12874. }()
  12875. }, {
  12876. key: "upload",
  12877. value: function () {
  12878. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  12879. return _regenerator.default.wrap(function _callee5$(_context5) {
  12880. while (1) {
  12881. switch (_context5.prev = _context5.next) {
  12882. case 0:
  12883. _context5.next = 2;
  12884. return this._reqClass.upload(e);
  12885. case 2:
  12886. return _context5.abrupt("return", _context5.sent);
  12887. case 3:
  12888. case "end":
  12889. return _context5.stop();
  12890. }
  12891. }
  12892. }, _callee5, this);
  12893. }));
  12894. function upload(_x3) {
  12895. return _upload.apply(this, arguments);
  12896. }
  12897. return upload;
  12898. }()
  12899. }, {
  12900. key: "download",
  12901. value: function () {
  12902. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  12903. return _regenerator.default.wrap(function _callee6$(_context6) {
  12904. while (1) {
  12905. switch (_context6.prev = _context6.next) {
  12906. case 0:
  12907. _context6.next = 2;
  12908. return this._reqClass.download(e);
  12909. case 2:
  12910. return _context6.abrupt("return", _context6.sent);
  12911. case 3:
  12912. case "end":
  12913. return _context6.stop();
  12914. }
  12915. }
  12916. }, _callee6, this);
  12917. }));
  12918. function download(_x4) {
  12919. return _download.apply(this, arguments);
  12920. }
  12921. return download;
  12922. }()
  12923. }, {
  12924. key: "refreshAccessToken",
  12925. value: function () {
  12926. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  12927. var e, t;
  12928. return _regenerator.default.wrap(function _callee7$(_context7) {
  12929. while (1) {
  12930. switch (_context7.prev = _context7.next) {
  12931. case 0:
  12932. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  12933. _context7.prev = 1;
  12934. _context7.next = 4;
  12935. return this._refreshAccessTokenPromise;
  12936. case 4:
  12937. e = _context7.sent;
  12938. _context7.next = 10;
  12939. break;
  12940. case 7:
  12941. _context7.prev = 7;
  12942. _context7.t0 = _context7["catch"](1);
  12943. t = _context7.t0;
  12944. case 10:
  12945. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  12946. _context7.next = 12;
  12947. break;
  12948. }
  12949. throw t;
  12950. case 12:
  12951. return _context7.abrupt("return", e);
  12952. case 13:
  12953. case "end":
  12954. return _context7.stop();
  12955. }
  12956. }
  12957. }, _callee7, this, [[1, 7]]);
  12958. }));
  12959. function refreshAccessToken() {
  12960. return _refreshAccessToken2.apply(this, arguments);
  12961. }
  12962. return refreshAccessToken;
  12963. }()
  12964. }, {
  12965. key: "_refreshAccessToken",
  12966. value: function () {
  12967. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  12968. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e10, _e11, _t7, _s8;
  12969. return _regenerator.default.wrap(function _callee8$(_context8) {
  12970. while (1) {
  12971. switch (_context8.prev = _context8.next) {
  12972. case 0:
  12973. _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;
  12974. this._cache.removeStore(e), this._cache.removeStore(t);
  12975. i = this._cache.getStore(n);
  12976. if (i) {
  12977. _context8.next = 5;
  12978. break;
  12979. }
  12980. throw new te({
  12981. message: "未登录CloudBase"
  12982. });
  12983. case 5:
  12984. o = {
  12985. refresh_token: i
  12986. };
  12987. _context8.next = 8;
  12988. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  12989. case 8:
  12990. a = _context8.sent;
  12991. if (!a.data.code) {
  12992. _context8.next = 21;
  12993. break;
  12994. }
  12995. _e10 = a.data.code;
  12996. if (!("SIGN_PARAM_INVALID" === _e10 || "REFRESH_TOKEN_EXPIRED" === _e10 || "INVALID_REFRESH_TOKEN" === _e10)) {
  12997. _context8.next = 20;
  12998. break;
  12999. }
  13000. if (!(this._cache.getStore(s) === $e.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e10)) {
  13001. _context8.next = 19;
  13002. break;
  13003. }
  13004. _e11 = this._cache.getStore(r);
  13005. _t7 = this._cache.getStore(n);
  13006. _context8.next = 17;
  13007. return this.send("auth.signInAnonymously", {
  13008. anonymous_uuid: _e11,
  13009. refresh_token: _t7
  13010. });
  13011. case 17:
  13012. _s8 = _context8.sent;
  13013. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  13014. case 19:
  13015. De(Fe), this._cache.removeStore(n);
  13016. case 20:
  13017. throw new te({
  13018. code: a.data.code,
  13019. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  13020. });
  13021. case 21:
  13022. if (!a.data.access_token) {
  13023. _context8.next = 23;
  13024. break;
  13025. }
  13026. return _context8.abrupt("return", (De(Be), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), {
  13027. accessToken: a.data.access_token,
  13028. accessTokenExpire: a.data.access_token_expire
  13029. }));
  13030. case 23:
  13031. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  13032. case 24:
  13033. case "end":
  13034. return _context8.stop();
  13035. }
  13036. }
  13037. }, _callee8, this);
  13038. }));
  13039. function _refreshAccessToken() {
  13040. return _refreshAccessToken3.apply(this, arguments);
  13041. }
  13042. return _refreshAccessToken;
  13043. }()
  13044. }, {
  13045. key: "getAccessToken",
  13046. value: function () {
  13047. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  13048. var _this$_cache$keys2, e, t, n, s, r, i;
  13049. return _regenerator.default.wrap(function _callee9$(_context9) {
  13050. while (1) {
  13051. switch (_context9.prev = _context9.next) {
  13052. case 0:
  13053. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  13054. if (this._cache.getStore(n)) {
  13055. _context9.next = 3;
  13056. break;
  13057. }
  13058. throw new te({
  13059. message: "refresh token不存在,登录状态异常"
  13060. });
  13061. case 3:
  13062. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  13063. _context9.t0 = this._shouldRefreshAccessTokenHook;
  13064. if (!_context9.t0) {
  13065. _context9.next = 9;
  13066. break;
  13067. }
  13068. _context9.next = 8;
  13069. return this._shouldRefreshAccessTokenHook(s, r);
  13070. case 8:
  13071. _context9.t0 = !_context9.sent;
  13072. case 9:
  13073. _context9.t1 = _context9.t0;
  13074. if (!_context9.t1) {
  13075. _context9.next = 12;
  13076. break;
  13077. }
  13078. i = !1;
  13079. case 12:
  13080. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  13081. accessToken: s,
  13082. accessTokenExpire: r
  13083. });
  13084. case 13:
  13085. case "end":
  13086. return _context9.stop();
  13087. }
  13088. }
  13089. }, _callee9, this);
  13090. }));
  13091. function getAccessToken() {
  13092. return _getAccessToken.apply(this, arguments);
  13093. }
  13094. return getAccessToken;
  13095. }()
  13096. }, {
  13097. key: "request",
  13098. value: function () {
  13099. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  13100. var s, r, i, _e12, o, _e13, _e14, a, c, u, l, h, d, p, f, g;
  13101. return _regenerator.default.wrap(function _callee10$(_context10) {
  13102. while (1) {
  13103. switch (_context10.prev = _context10.next) {
  13104. case 0:
  13105. s = "x-tcb-trace_".concat(this.config.env);
  13106. r = "application/x-www-form-urlencoded";
  13107. i = _objectSpread({
  13108. action: e,
  13109. env: this.config.env,
  13110. dataVersion: "2019-08-16"
  13111. }, t);
  13112. if (!(-1 === We.indexOf(e))) {
  13113. _context10.next = 10;
  13114. break;
  13115. }
  13116. _e12 = this._cache.keys.refreshTokenKey;
  13117. _context10.t0 = this._cache.getStore(_e12);
  13118. if (!_context10.t0) {
  13119. _context10.next = 10;
  13120. break;
  13121. }
  13122. _context10.next = 9;
  13123. return this.getAccessToken();
  13124. case 9:
  13125. i.access_token = _context10.sent.accessToken;
  13126. case 10:
  13127. if ("storage.uploadFile" === e) {
  13128. o = new FormData();
  13129. for (_e13 in o) {
  13130. o.hasOwnProperty(_e13) && void 0 !== o[_e13] && o.append(_e13, i[_e13]);
  13131. }
  13132. r = "multipart/form-data";
  13133. } else {
  13134. r = "application/json", o = {};
  13135. for (_e14 in i) {
  13136. void 0 !== i[_e14] && (o[_e14] = i[_e14]);
  13137. }
  13138. }
  13139. a = {
  13140. headers: {
  13141. "content-type": r
  13142. }
  13143. };
  13144. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  13145. c = this._localCache.getStore(s);
  13146. c && (a.headers["X-TCB-Trace"] = c);
  13147. u = t.parse, l = t.inQuery, h = t.search;
  13148. d = {
  13149. env: this.config.env
  13150. };
  13151. u && (d.parse = !0), l && (d = _objectSpread(_objectSpread({}, l), d));
  13152. p = function (e, t) {
  13153. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  13154. var s = /\?/.test(t);
  13155. var r = "";
  13156. for (var _e15 in n) {
  13157. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e15, "=").concat(encodeURIComponent(n[_e15]));
  13158. }
  13159. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  13160. }(pe, "//tcb-api.tencentcloudapi.com/web", d);
  13161. h && (p += h);
  13162. _context10.next = 22;
  13163. return this.post(_objectSpread({
  13164. url: p,
  13165. data: o
  13166. }, a));
  13167. case 22:
  13168. f = _context10.sent;
  13169. g = f.header && f.header["x-tcb-trace"];
  13170. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  13171. _context10.next = 26;
  13172. break;
  13173. }
  13174. throw new te({
  13175. code: "NETWORK_ERROR",
  13176. message: "network request error"
  13177. });
  13178. case 26:
  13179. return _context10.abrupt("return", f);
  13180. case 27:
  13181. case "end":
  13182. return _context10.stop();
  13183. }
  13184. }
  13185. }, _callee10, this);
  13186. }));
  13187. function request(_x5, _x6, _x7) {
  13188. return _request.apply(this, arguments);
  13189. }
  13190. return request;
  13191. }()
  13192. }, {
  13193. key: "send",
  13194. value: function () {
  13195. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  13196. var t,
  13197. n,
  13198. _n6,
  13199. _args11 = arguments;
  13200. return _regenerator.default.wrap(function _callee11$(_context11) {
  13201. while (1) {
  13202. switch (_context11.prev = _context11.next) {
  13203. case 0:
  13204. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  13205. _context11.next = 3;
  13206. return this.request(e, t, {
  13207. onUploadProgress: t.onUploadProgress
  13208. });
  13209. case 3:
  13210. n = _context11.sent;
  13211. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === We.indexOf(e))) {
  13212. _context11.next = 13;
  13213. break;
  13214. }
  13215. _context11.next = 7;
  13216. return this.refreshAccessToken();
  13217. case 7:
  13218. _context11.next = 9;
  13219. return this.request(e, t, {
  13220. onUploadProgress: t.onUploadProgress
  13221. });
  13222. case 9:
  13223. _n6 = _context11.sent;
  13224. if (!_n6.data.code) {
  13225. _context11.next = 12;
  13226. break;
  13227. }
  13228. throw new te({
  13229. code: _n6.data.code,
  13230. message: _n6.data.message
  13231. });
  13232. case 12:
  13233. return _context11.abrupt("return", _n6.data);
  13234. case 13:
  13235. if (!n.data.code) {
  13236. _context11.next = 15;
  13237. break;
  13238. }
  13239. throw new te({
  13240. code: n.data.code,
  13241. message: n.data.message
  13242. });
  13243. case 15:
  13244. return _context11.abrupt("return", n.data);
  13245. case 16:
  13246. case "end":
  13247. return _context11.stop();
  13248. }
  13249. }
  13250. }, _callee11, this);
  13251. }));
  13252. function send(_x8) {
  13253. return _send.apply(this, arguments);
  13254. }
  13255. return send;
  13256. }()
  13257. }, {
  13258. key: "setRefreshToken",
  13259. value: function setRefreshToken(e) {
  13260. var _this$_cache$keys3 = this._cache.keys,
  13261. t = _this$_cache$keys3.accessTokenKey,
  13262. n = _this$_cache$keys3.accessTokenExpireKey,
  13263. s = _this$_cache$keys3.refreshTokenKey;
  13264. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  13265. }
  13266. }]);
  13267. return Ve;
  13268. }();
  13269. var Ge = {};
  13270. function Ye(e) {
  13271. return Ge[e];
  13272. }
  13273. var Qe = /*#__PURE__*/function () {
  13274. function Qe(e) {
  13275. (0, _classCallCheck2.default)(this, Qe);
  13276. this.config = e, this._cache = Ee(e.env), this._request = Ye(e.env);
  13277. }
  13278. (0, _createClass2.default)(Qe, [{
  13279. key: "setRefreshToken",
  13280. value: function setRefreshToken(e) {
  13281. var _this$_cache$keys4 = this._cache.keys,
  13282. t = _this$_cache$keys4.accessTokenKey,
  13283. n = _this$_cache$keys4.accessTokenExpireKey,
  13284. s = _this$_cache$keys4.refreshTokenKey;
  13285. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  13286. }
  13287. }, {
  13288. key: "setAccessToken",
  13289. value: function setAccessToken(e, t) {
  13290. var _this$_cache$keys5 = this._cache.keys,
  13291. n = _this$_cache$keys5.accessTokenKey,
  13292. s = _this$_cache$keys5.accessTokenExpireKey;
  13293. this._cache.setStore(n, e), this._cache.setStore(s, t);
  13294. }
  13295. }, {
  13296. key: "refreshUserInfo",
  13297. value: function () {
  13298. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  13299. var _yield$this$_request$, e;
  13300. return _regenerator.default.wrap(function _callee12$(_context12) {
  13301. while (1) {
  13302. switch (_context12.prev = _context12.next) {
  13303. case 0:
  13304. _context12.next = 2;
  13305. return this._request.send("auth.getUserInfo", {});
  13306. case 2:
  13307. _yield$this$_request$ = _context12.sent;
  13308. e = _yield$this$_request$.data;
  13309. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  13310. case 5:
  13311. case "end":
  13312. return _context12.stop();
  13313. }
  13314. }
  13315. }, _callee12, this);
  13316. }));
  13317. function refreshUserInfo() {
  13318. return _refreshUserInfo.apply(this, arguments);
  13319. }
  13320. return refreshUserInfo;
  13321. }()
  13322. }, {
  13323. key: "setLocalUserInfo",
  13324. value: function setLocalUserInfo(e) {
  13325. var t = this._cache.keys.userInfoKey;
  13326. this._cache.setStore(t, e);
  13327. }
  13328. }]);
  13329. return Qe;
  13330. }();
  13331. var Xe = /*#__PURE__*/function () {
  13332. function Xe(e) {
  13333. (0, _classCallCheck2.default)(this, Xe);
  13334. if (!e) throw new te({
  13335. code: "PARAM_ERROR",
  13336. message: "envId is not defined"
  13337. });
  13338. this._envId = e, this._cache = Ee(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  13339. }
  13340. (0, _createClass2.default)(Xe, [{
  13341. key: "linkWithTicket",
  13342. value: function linkWithTicket(e) {
  13343. if ("string" != typeof e) throw new te({
  13344. code: "PARAM_ERROR",
  13345. message: "ticket must be string"
  13346. });
  13347. return this._request.send("auth.linkWithTicket", {
  13348. ticket: e
  13349. });
  13350. }
  13351. }, {
  13352. key: "linkWithRedirect",
  13353. value: function linkWithRedirect(e) {
  13354. e.signInWithRedirect();
  13355. }
  13356. }, {
  13357. key: "updatePassword",
  13358. value: function updatePassword(e, t) {
  13359. return this._request.send("auth.updatePassword", {
  13360. oldPassword: t,
  13361. newPassword: e
  13362. });
  13363. }
  13364. }, {
  13365. key: "updateEmail",
  13366. value: function updateEmail(e) {
  13367. return this._request.send("auth.updateEmail", {
  13368. newEmail: e
  13369. });
  13370. }
  13371. }, {
  13372. key: "updateUsername",
  13373. value: function updateUsername(e) {
  13374. if ("string" != typeof e) throw new te({
  13375. code: "PARAM_ERROR",
  13376. message: "username must be a string"
  13377. });
  13378. return this._request.send("auth.updateUsername", {
  13379. username: e
  13380. });
  13381. }
  13382. }, {
  13383. key: "getLinkedUidList",
  13384. value: function () {
  13385. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  13386. var _yield$this$_request$2, e, t, n;
  13387. return _regenerator.default.wrap(function _callee13$(_context13) {
  13388. while (1) {
  13389. switch (_context13.prev = _context13.next) {
  13390. case 0:
  13391. _context13.next = 2;
  13392. return this._request.send("auth.getLinkedUidList", {});
  13393. case 2:
  13394. _yield$this$_request$2 = _context13.sent;
  13395. e = _yield$this$_request$2.data;
  13396. t = !1;
  13397. n = e.users;
  13398. return _context13.abrupt("return", (n.forEach(function (e) {
  13399. e.wxOpenId && e.wxPublicId && (t = !0);
  13400. }), {
  13401. users: n,
  13402. hasPrimaryUid: t
  13403. }));
  13404. case 7:
  13405. case "end":
  13406. return _context13.stop();
  13407. }
  13408. }
  13409. }, _callee13, this);
  13410. }));
  13411. function getLinkedUidList() {
  13412. return _getLinkedUidList.apply(this, arguments);
  13413. }
  13414. return getLinkedUidList;
  13415. }()
  13416. }, {
  13417. key: "setPrimaryUid",
  13418. value: function setPrimaryUid(e) {
  13419. return this._request.send("auth.setPrimaryUid", {
  13420. uid: e
  13421. });
  13422. }
  13423. }, {
  13424. key: "unlink",
  13425. value: function unlink(e) {
  13426. return this._request.send("auth.unlink", {
  13427. platform: e
  13428. });
  13429. }
  13430. }, {
  13431. key: "update",
  13432. value: function () {
  13433. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  13434. var t, n, s, r, i, o, _yield$this$_request$3, a;
  13435. return _regenerator.default.wrap(function _callee14$(_context14) {
  13436. while (1) {
  13437. switch (_context14.prev = _context14.next) {
  13438. case 0:
  13439. t = e.nickName;
  13440. n = e.gender;
  13441. s = e.avatarUrl;
  13442. r = e.province;
  13443. i = e.country;
  13444. o = e.city;
  13445. _context14.next = 8;
  13446. return this._request.send("auth.updateUserInfo", {
  13447. nickName: t,
  13448. gender: n,
  13449. avatarUrl: s,
  13450. province: r,
  13451. country: i,
  13452. city: o
  13453. });
  13454. case 8:
  13455. _yield$this$_request$3 = _context14.sent;
  13456. a = _yield$this$_request$3.data;
  13457. this.setLocalUserInfo(a);
  13458. case 11:
  13459. case "end":
  13460. return _context14.stop();
  13461. }
  13462. }
  13463. }, _callee14, this);
  13464. }));
  13465. function update(_x9) {
  13466. return _update.apply(this, arguments);
  13467. }
  13468. return update;
  13469. }()
  13470. }, {
  13471. key: "refresh",
  13472. value: function () {
  13473. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  13474. var _yield$this$_request$4, e;
  13475. return _regenerator.default.wrap(function _callee15$(_context15) {
  13476. while (1) {
  13477. switch (_context15.prev = _context15.next) {
  13478. case 0:
  13479. _context15.next = 2;
  13480. return this._request.send("auth.getUserInfo", {});
  13481. case 2:
  13482. _yield$this$_request$4 = _context15.sent;
  13483. e = _yield$this$_request$4.data;
  13484. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  13485. case 5:
  13486. case "end":
  13487. return _context15.stop();
  13488. }
  13489. }
  13490. }, _callee15, this);
  13491. }));
  13492. function refresh() {
  13493. return _refresh.apply(this, arguments);
  13494. }
  13495. return refresh;
  13496. }()
  13497. }, {
  13498. key: "setUserInfo",
  13499. value: function setUserInfo() {
  13500. var _this8 = this;
  13501. var e = this._cache.keys.userInfoKey,
  13502. t = this._cache.getStore(e);
  13503. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  13504. _this8[e] = t[e];
  13505. }), this.location = {
  13506. country: t.country,
  13507. province: t.province,
  13508. city: t.city
  13509. };
  13510. }
  13511. }, {
  13512. key: "setLocalUserInfo",
  13513. value: function setLocalUserInfo(e) {
  13514. var t = this._cache.keys.userInfoKey;
  13515. this._cache.setStore(t, e), this.setUserInfo();
  13516. }
  13517. }]);
  13518. return Xe;
  13519. }();
  13520. var Ze = /*#__PURE__*/function () {
  13521. function Ze(e) {
  13522. (0, _classCallCheck2.default)(this, Ze);
  13523. if (!e) throw new te({
  13524. code: "PARAM_ERROR",
  13525. message: "envId is not defined"
  13526. });
  13527. this._cache = Ee(e);
  13528. var _this$_cache$keys6 = this._cache.keys,
  13529. t = _this$_cache$keys6.refreshTokenKey,
  13530. n = _this$_cache$keys6.accessTokenKey,
  13531. s = _this$_cache$keys6.accessTokenExpireKey,
  13532. r = this._cache.getStore(t),
  13533. i = this._cache.getStore(n),
  13534. o = this._cache.getStore(s);
  13535. this.credential = {
  13536. refreshToken: r,
  13537. accessToken: i,
  13538. accessTokenExpire: o
  13539. }, this.user = new Xe(e);
  13540. }
  13541. (0, _createClass2.default)(Ze, [{
  13542. key: "isAnonymousAuth",
  13543. get: function get() {
  13544. return this.loginType === $e.ANONYMOUS;
  13545. }
  13546. }, {
  13547. key: "isCustomAuth",
  13548. get: function get() {
  13549. return this.loginType === $e.CUSTOM;
  13550. }
  13551. }, {
  13552. key: "isWeixinAuth",
  13553. get: function get() {
  13554. return this.loginType === $e.WECHAT || this.loginType === $e.WECHAT_OPEN || this.loginType === $e.WECHAT_PUBLIC;
  13555. }
  13556. }, {
  13557. key: "loginType",
  13558. get: function get() {
  13559. return this._cache.getStore(this._cache.keys.loginTypeKey);
  13560. }
  13561. }]);
  13562. return Ze;
  13563. }();
  13564. var et = /*#__PURE__*/function (_Qe) {
  13565. (0, _inherits2.default)(et, _Qe);
  13566. var _super4 = _createSuper(et);
  13567. function et() {
  13568. (0, _classCallCheck2.default)(this, et);
  13569. return _super4.apply(this, arguments);
  13570. }
  13571. (0, _createClass2.default)(et, [{
  13572. key: "signIn",
  13573. value: function () {
  13574. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  13575. var _this$_cache$keys7, e, t, n, s, r, _e16;
  13576. return _regenerator.default.wrap(function _callee16$(_context16) {
  13577. while (1) {
  13578. switch (_context16.prev = _context16.next) {
  13579. case 0:
  13580. this._cache.updatePersistence("local");
  13581. _this$_cache$keys7 = this._cache.keys;
  13582. e = _this$_cache$keys7.anonymousUuidKey;
  13583. t = _this$_cache$keys7.refreshTokenKey;
  13584. n = this._cache.getStore(e) || void 0;
  13585. s = this._cache.getStore(t) || void 0;
  13586. _context16.next = 8;
  13587. return this._request.send("auth.signInAnonymously", {
  13588. anonymous_uuid: n,
  13589. refresh_token: s
  13590. });
  13591. case 8:
  13592. r = _context16.sent;
  13593. if (!(r.uuid && r.refresh_token)) {
  13594. _context16.next = 20;
  13595. break;
  13596. }
  13597. this._setAnonymousUUID(r.uuid);
  13598. this.setRefreshToken(r.refresh_token);
  13599. _context16.next = 14;
  13600. return this._request.refreshAccessToken();
  13601. case 14:
  13602. De(qe);
  13603. De(Ke, {
  13604. env: this.config.env,
  13605. loginType: $e.ANONYMOUS,
  13606. persistence: "local"
  13607. });
  13608. _e16 = new Ze(this.config.env);
  13609. _context16.next = 19;
  13610. return _e16.user.refresh();
  13611. case 19:
  13612. return _context16.abrupt("return", _e16);
  13613. case 20:
  13614. throw new te({
  13615. message: "匿名登录失败"
  13616. });
  13617. case 21:
  13618. case "end":
  13619. return _context16.stop();
  13620. }
  13621. }
  13622. }, _callee16, this);
  13623. }));
  13624. function signIn() {
  13625. return _signIn.apply(this, arguments);
  13626. }
  13627. return signIn;
  13628. }()
  13629. }, {
  13630. key: "linkAndRetrieveDataWithTicket",
  13631. value: function () {
  13632. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  13633. var _this$_cache$keys8, t, n, s, r, i;
  13634. return _regenerator.default.wrap(function _callee17$(_context17) {
  13635. while (1) {
  13636. switch (_context17.prev = _context17.next) {
  13637. case 0:
  13638. _this$_cache$keys8 = this._cache.keys;
  13639. t = _this$_cache$keys8.anonymousUuidKey;
  13640. n = _this$_cache$keys8.refreshTokenKey;
  13641. s = this._cache.getStore(t);
  13642. r = this._cache.getStore(n);
  13643. _context17.next = 7;
  13644. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  13645. anonymous_uuid: s,
  13646. refresh_token: r,
  13647. ticket: e
  13648. });
  13649. case 7:
  13650. i = _context17.sent;
  13651. if (!i.refresh_token) {
  13652. _context17.next = 16;
  13653. break;
  13654. }
  13655. this._clearAnonymousUUID();
  13656. this.setRefreshToken(i.refresh_token);
  13657. _context17.next = 13;
  13658. return this._request.refreshAccessToken();
  13659. case 13:
  13660. De(je, {
  13661. env: this.config.env
  13662. });
  13663. De(Ke, {
  13664. loginType: $e.CUSTOM,
  13665. persistence: "local"
  13666. });
  13667. return _context17.abrupt("return", {
  13668. credential: {
  13669. refreshToken: i.refresh_token
  13670. }
  13671. });
  13672. case 16:
  13673. throw new te({
  13674. message: "匿名转化失败"
  13675. });
  13676. case 17:
  13677. case "end":
  13678. return _context17.stop();
  13679. }
  13680. }
  13681. }, _callee17, this);
  13682. }));
  13683. function linkAndRetrieveDataWithTicket(_x10) {
  13684. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  13685. }
  13686. return linkAndRetrieveDataWithTicket;
  13687. }()
  13688. }, {
  13689. key: "_setAnonymousUUID",
  13690. value: function _setAnonymousUUID(e) {
  13691. var _this$_cache$keys9 = this._cache.keys,
  13692. t = _this$_cache$keys9.anonymousUuidKey,
  13693. n = _this$_cache$keys9.loginTypeKey;
  13694. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, $e.ANONYMOUS);
  13695. }
  13696. }, {
  13697. key: "_clearAnonymousUUID",
  13698. value: function _clearAnonymousUUID() {
  13699. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  13700. }
  13701. }]);
  13702. return et;
  13703. }(Qe);
  13704. var tt = /*#__PURE__*/function (_Qe2) {
  13705. (0, _inherits2.default)(tt, _Qe2);
  13706. var _super5 = _createSuper(tt);
  13707. function tt() {
  13708. (0, _classCallCheck2.default)(this, tt);
  13709. return _super5.apply(this, arguments);
  13710. }
  13711. (0, _createClass2.default)(tt, [{
  13712. key: "signIn",
  13713. value: function () {
  13714. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  13715. var t, n;
  13716. return _regenerator.default.wrap(function _callee18$(_context18) {
  13717. while (1) {
  13718. switch (_context18.prev = _context18.next) {
  13719. case 0:
  13720. if (!("string" != typeof e)) {
  13721. _context18.next = 2;
  13722. break;
  13723. }
  13724. throw new te({
  13725. code: "PARAM_ERROR",
  13726. message: "ticket must be a string"
  13727. });
  13728. case 2:
  13729. t = this._cache.keys.refreshTokenKey;
  13730. _context18.next = 5;
  13731. return this._request.send("auth.signInWithTicket", {
  13732. ticket: e,
  13733. refresh_token: this._cache.getStore(t) || ""
  13734. });
  13735. case 5:
  13736. n = _context18.sent;
  13737. if (!n.refresh_token) {
  13738. _context18.next = 15;
  13739. break;
  13740. }
  13741. this.setRefreshToken(n.refresh_token);
  13742. _context18.next = 10;
  13743. return this._request.refreshAccessToken();
  13744. case 10:
  13745. De(qe);
  13746. De(Ke, {
  13747. env: this.config.env,
  13748. loginType: $e.CUSTOM,
  13749. persistence: this.config.persistence
  13750. });
  13751. _context18.next = 14;
  13752. return this.refreshUserInfo();
  13753. case 14:
  13754. return _context18.abrupt("return", new Ze(this.config.env));
  13755. case 15:
  13756. throw new te({
  13757. message: "自定义登录失败"
  13758. });
  13759. case 16:
  13760. case "end":
  13761. return _context18.stop();
  13762. }
  13763. }
  13764. }, _callee18, this);
  13765. }));
  13766. function signIn(_x11) {
  13767. return _signIn2.apply(this, arguments);
  13768. }
  13769. return signIn;
  13770. }()
  13771. }]);
  13772. return tt;
  13773. }(Qe);
  13774. var nt = /*#__PURE__*/function (_Qe3) {
  13775. (0, _inherits2.default)(nt, _Qe3);
  13776. var _super6 = _createSuper(nt);
  13777. function nt() {
  13778. (0, _classCallCheck2.default)(this, nt);
  13779. return _super6.apply(this, arguments);
  13780. }
  13781. (0, _createClass2.default)(nt, [{
  13782. key: "signIn",
  13783. value: function () {
  13784. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  13785. var n, s, r, i, o;
  13786. return _regenerator.default.wrap(function _callee19$(_context19) {
  13787. while (1) {
  13788. switch (_context19.prev = _context19.next) {
  13789. case 0:
  13790. if (!("string" != typeof e)) {
  13791. _context19.next = 2;
  13792. break;
  13793. }
  13794. throw new te({
  13795. code: "PARAM_ERROR",
  13796. message: "email must be a string"
  13797. });
  13798. case 2:
  13799. n = this._cache.keys.refreshTokenKey;
  13800. _context19.next = 5;
  13801. return this._request.send("auth.signIn", {
  13802. loginType: "EMAIL",
  13803. email: e,
  13804. password: t,
  13805. refresh_token: this._cache.getStore(n) || ""
  13806. });
  13807. case 5:
  13808. s = _context19.sent;
  13809. r = s.refresh_token;
  13810. i = s.access_token;
  13811. o = s.access_token_expire;
  13812. if (!r) {
  13813. _context19.next = 22;
  13814. break;
  13815. }
  13816. this.setRefreshToken(r);
  13817. if (!(i && o)) {
  13818. _context19.next = 15;
  13819. break;
  13820. }
  13821. this.setAccessToken(i, o);
  13822. _context19.next = 17;
  13823. break;
  13824. case 15:
  13825. _context19.next = 17;
  13826. return this._request.refreshAccessToken();
  13827. case 17:
  13828. _context19.next = 19;
  13829. return this.refreshUserInfo();
  13830. case 19:
  13831. De(qe);
  13832. De(Ke, {
  13833. env: this.config.env,
  13834. loginType: $e.EMAIL,
  13835. persistence: this.config.persistence
  13836. });
  13837. return _context19.abrupt("return", new Ze(this.config.env));
  13838. case 22:
  13839. throw s.code ? new te({
  13840. code: s.code,
  13841. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  13842. }) : new te({
  13843. message: "邮箱登录失败"
  13844. });
  13845. case 23:
  13846. case "end":
  13847. return _context19.stop();
  13848. }
  13849. }
  13850. }, _callee19, this);
  13851. }));
  13852. function signIn(_x12, _x13) {
  13853. return _signIn3.apply(this, arguments);
  13854. }
  13855. return signIn;
  13856. }()
  13857. }, {
  13858. key: "activate",
  13859. value: function () {
  13860. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  13861. return _regenerator.default.wrap(function _callee20$(_context20) {
  13862. while (1) {
  13863. switch (_context20.prev = _context20.next) {
  13864. case 0:
  13865. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  13866. token: e
  13867. }));
  13868. case 1:
  13869. case "end":
  13870. return _context20.stop();
  13871. }
  13872. }
  13873. }, _callee20, this);
  13874. }));
  13875. function activate(_x14) {
  13876. return _activate.apply(this, arguments);
  13877. }
  13878. return activate;
  13879. }()
  13880. }, {
  13881. key: "resetPasswordWithToken",
  13882. value: function () {
  13883. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  13884. return _regenerator.default.wrap(function _callee21$(_context21) {
  13885. while (1) {
  13886. switch (_context21.prev = _context21.next) {
  13887. case 0:
  13888. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  13889. token: e,
  13890. newPassword: t
  13891. }));
  13892. case 1:
  13893. case "end":
  13894. return _context21.stop();
  13895. }
  13896. }
  13897. }, _callee21, this);
  13898. }));
  13899. function resetPasswordWithToken(_x15, _x16) {
  13900. return _resetPasswordWithToken.apply(this, arguments);
  13901. }
  13902. return resetPasswordWithToken;
  13903. }()
  13904. }]);
  13905. return nt;
  13906. }(Qe);
  13907. var st = /*#__PURE__*/function (_Qe4) {
  13908. (0, _inherits2.default)(st, _Qe4);
  13909. var _super7 = _createSuper(st);
  13910. function st() {
  13911. (0, _classCallCheck2.default)(this, st);
  13912. return _super7.apply(this, arguments);
  13913. }
  13914. (0, _createClass2.default)(st, [{
  13915. key: "signIn",
  13916. value: function () {
  13917. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  13918. var n, s, r, i, o;
  13919. return _regenerator.default.wrap(function _callee22$(_context22) {
  13920. while (1) {
  13921. switch (_context22.prev = _context22.next) {
  13922. case 0:
  13923. if (!("string" != typeof e)) {
  13924. _context22.next = 2;
  13925. break;
  13926. }
  13927. throw new te({
  13928. code: "PARAM_ERROR",
  13929. message: "username must be a string"
  13930. });
  13931. case 2:
  13932. "string" != typeof t && (t = "", console.warn("password is empty"));
  13933. n = this._cache.keys.refreshTokenKey;
  13934. _context22.next = 6;
  13935. return this._request.send("auth.signIn", {
  13936. loginType: $e.USERNAME,
  13937. username: e,
  13938. password: t,
  13939. refresh_token: this._cache.getStore(n) || ""
  13940. });
  13941. case 6:
  13942. s = _context22.sent;
  13943. r = s.refresh_token;
  13944. i = s.access_token_expire;
  13945. o = s.access_token;
  13946. if (!r) {
  13947. _context22.next = 23;
  13948. break;
  13949. }
  13950. this.setRefreshToken(r);
  13951. if (!(o && i)) {
  13952. _context22.next = 16;
  13953. break;
  13954. }
  13955. this.setAccessToken(o, i);
  13956. _context22.next = 18;
  13957. break;
  13958. case 16:
  13959. _context22.next = 18;
  13960. return this._request.refreshAccessToken();
  13961. case 18:
  13962. _context22.next = 20;
  13963. return this.refreshUserInfo();
  13964. case 20:
  13965. De(qe);
  13966. De(Ke, {
  13967. env: this.config.env,
  13968. loginType: $e.USERNAME,
  13969. persistence: this.config.persistence
  13970. });
  13971. return _context22.abrupt("return", new Ze(this.config.env));
  13972. case 23:
  13973. throw s.code ? new te({
  13974. code: s.code,
  13975. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  13976. }) : new te({
  13977. message: "用户名密码登录失败"
  13978. });
  13979. case 24:
  13980. case "end":
  13981. return _context22.stop();
  13982. }
  13983. }
  13984. }, _callee22, this);
  13985. }));
  13986. function signIn(_x17, _x18) {
  13987. return _signIn4.apply(this, arguments);
  13988. }
  13989. return signIn;
  13990. }()
  13991. }]);
  13992. return st;
  13993. }(Qe);
  13994. var rt = /*#__PURE__*/function () {
  13995. function rt(e) {
  13996. (0, _classCallCheck2.default)(this, rt);
  13997. this.config = e, this._cache = Ee(e.env), this._request = Ye(e.env), this._onAnonymousConverted = this._onAnonymousConverted.bind(this), this._onLoginTypeChanged = this._onLoginTypeChanged.bind(this), Ne(Ke, this._onLoginTypeChanged);
  13998. }
  13999. (0, _createClass2.default)(rt, [{
  14000. key: "currentUser",
  14001. get: function get() {
  14002. var e = this.hasLoginState();
  14003. return e && e.user || null;
  14004. }
  14005. }, {
  14006. key: "loginType",
  14007. get: function get() {
  14008. return this._cache.getStore(this._cache.keys.loginTypeKey);
  14009. }
  14010. }, {
  14011. key: "anonymousAuthProvider",
  14012. value: function anonymousAuthProvider() {
  14013. return new et(this.config);
  14014. }
  14015. }, {
  14016. key: "customAuthProvider",
  14017. value: function customAuthProvider() {
  14018. return new tt(this.config);
  14019. }
  14020. }, {
  14021. key: "emailAuthProvider",
  14022. value: function emailAuthProvider() {
  14023. return new nt(this.config);
  14024. }
  14025. }, {
  14026. key: "usernameAuthProvider",
  14027. value: function usernameAuthProvider() {
  14028. return new st(this.config);
  14029. }
  14030. }, {
  14031. key: "signInAnonymously",
  14032. value: function () {
  14033. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  14034. return _regenerator.default.wrap(function _callee23$(_context23) {
  14035. while (1) {
  14036. switch (_context23.prev = _context23.next) {
  14037. case 0:
  14038. return _context23.abrupt("return", new et(this.config).signIn());
  14039. case 1:
  14040. case "end":
  14041. return _context23.stop();
  14042. }
  14043. }
  14044. }, _callee23, this);
  14045. }));
  14046. function signInAnonymously() {
  14047. return _signInAnonymously.apply(this, arguments);
  14048. }
  14049. return signInAnonymously;
  14050. }()
  14051. }, {
  14052. key: "signInWithEmailAndPassword",
  14053. value: function () {
  14054. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  14055. return _regenerator.default.wrap(function _callee24$(_context24) {
  14056. while (1) {
  14057. switch (_context24.prev = _context24.next) {
  14058. case 0:
  14059. return _context24.abrupt("return", new nt(this.config).signIn(e, t));
  14060. case 1:
  14061. case "end":
  14062. return _context24.stop();
  14063. }
  14064. }
  14065. }, _callee24, this);
  14066. }));
  14067. function signInWithEmailAndPassword(_x19, _x20) {
  14068. return _signInWithEmailAndPassword.apply(this, arguments);
  14069. }
  14070. return signInWithEmailAndPassword;
  14071. }()
  14072. }, {
  14073. key: "signInWithUsernameAndPassword",
  14074. value: function signInWithUsernameAndPassword(e, t) {
  14075. return new st(this.config).signIn(e, t);
  14076. }
  14077. }, {
  14078. key: "linkAndRetrieveDataWithTicket",
  14079. value: function () {
  14080. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  14081. return _regenerator.default.wrap(function _callee25$(_context25) {
  14082. while (1) {
  14083. switch (_context25.prev = _context25.next) {
  14084. case 0:
  14085. this._anonymousAuthProvider || (this._anonymousAuthProvider = new et(this.config)), Ne(je, this._onAnonymousConverted);
  14086. _context25.next = 3;
  14087. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  14088. case 3:
  14089. return _context25.abrupt("return", _context25.sent);
  14090. case 4:
  14091. case "end":
  14092. return _context25.stop();
  14093. }
  14094. }
  14095. }, _callee25, this);
  14096. }));
  14097. function linkAndRetrieveDataWithTicket(_x21) {
  14098. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  14099. }
  14100. return linkAndRetrieveDataWithTicket;
  14101. }()
  14102. }, {
  14103. key: "signOut",
  14104. value: function () {
  14105. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  14106. var _this$_cache$keys10, e, t, n, s, r;
  14107. return _regenerator.default.wrap(function _callee26$(_context26) {
  14108. while (1) {
  14109. switch (_context26.prev = _context26.next) {
  14110. case 0:
  14111. if (!(this.loginType === $e.ANONYMOUS)) {
  14112. _context26.next = 2;
  14113. break;
  14114. }
  14115. throw new te({
  14116. message: "匿名用户不支持登出操作"
  14117. });
  14118. case 2:
  14119. _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);
  14120. if (s) {
  14121. _context26.next = 5;
  14122. break;
  14123. }
  14124. return _context26.abrupt("return");
  14125. case 5:
  14126. _context26.next = 7;
  14127. return this._request.send("auth.logout", {
  14128. refresh_token: s
  14129. });
  14130. case 7:
  14131. r = _context26.sent;
  14132. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), De(qe), De(Ke, {
  14133. env: this.config.env,
  14134. loginType: $e.NULL,
  14135. persistence: this.config.persistence
  14136. }), r));
  14137. case 9:
  14138. case "end":
  14139. return _context26.stop();
  14140. }
  14141. }
  14142. }, _callee26, this);
  14143. }));
  14144. function signOut() {
  14145. return _signOut.apply(this, arguments);
  14146. }
  14147. return signOut;
  14148. }()
  14149. }, {
  14150. key: "signUpWithEmailAndPassword",
  14151. value: function () {
  14152. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  14153. return _regenerator.default.wrap(function _callee27$(_context27) {
  14154. while (1) {
  14155. switch (_context27.prev = _context27.next) {
  14156. case 0:
  14157. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  14158. email: e,
  14159. password: t
  14160. }));
  14161. case 1:
  14162. case "end":
  14163. return _context27.stop();
  14164. }
  14165. }
  14166. }, _callee27, this);
  14167. }));
  14168. function signUpWithEmailAndPassword(_x22, _x23) {
  14169. return _signUpWithEmailAndPassword.apply(this, arguments);
  14170. }
  14171. return signUpWithEmailAndPassword;
  14172. }()
  14173. }, {
  14174. key: "sendPasswordResetEmail",
  14175. value: function () {
  14176. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  14177. return _regenerator.default.wrap(function _callee28$(_context28) {
  14178. while (1) {
  14179. switch (_context28.prev = _context28.next) {
  14180. case 0:
  14181. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  14182. email: e
  14183. }));
  14184. case 1:
  14185. case "end":
  14186. return _context28.stop();
  14187. }
  14188. }
  14189. }, _callee28, this);
  14190. }));
  14191. function sendPasswordResetEmail(_x24) {
  14192. return _sendPasswordResetEmail.apply(this, arguments);
  14193. }
  14194. return sendPasswordResetEmail;
  14195. }()
  14196. }, {
  14197. key: "onLoginStateChanged",
  14198. value: function onLoginStateChanged(e) {
  14199. var _this9 = this;
  14200. Ne(qe, function () {
  14201. var t = _this9.hasLoginState();
  14202. e.call(_this9, t);
  14203. });
  14204. var t = this.hasLoginState();
  14205. e.call(this, t);
  14206. }
  14207. }, {
  14208. key: "onLoginStateExpired",
  14209. value: function onLoginStateExpired(e) {
  14210. Ne(Fe, e.bind(this));
  14211. }
  14212. }, {
  14213. key: "onAccessTokenRefreshed",
  14214. value: function onAccessTokenRefreshed(e) {
  14215. Ne(Be, e.bind(this));
  14216. }
  14217. }, {
  14218. key: "onAnonymousConverted",
  14219. value: function onAnonymousConverted(e) {
  14220. Ne(je, e.bind(this));
  14221. }
  14222. }, {
  14223. key: "onLoginTypeChanged",
  14224. value: function onLoginTypeChanged(e) {
  14225. var _this10 = this;
  14226. Ne(Ke, function () {
  14227. var t = _this10.hasLoginState();
  14228. e.call(_this10, t);
  14229. });
  14230. }
  14231. }, {
  14232. key: "getAccessToken",
  14233. value: function () {
  14234. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  14235. return _regenerator.default.wrap(function _callee29$(_context29) {
  14236. while (1) {
  14237. switch (_context29.prev = _context29.next) {
  14238. case 0:
  14239. _context29.next = 2;
  14240. return this._request.getAccessToken();
  14241. case 2:
  14242. _context29.t0 = _context29.sent.accessToken;
  14243. _context29.t1 = this.config.env;
  14244. return _context29.abrupt("return", {
  14245. accessToken: _context29.t0,
  14246. env: _context29.t1
  14247. });
  14248. case 5:
  14249. case "end":
  14250. return _context29.stop();
  14251. }
  14252. }
  14253. }, _callee29, this);
  14254. }));
  14255. function getAccessToken() {
  14256. return _getAccessToken2.apply(this, arguments);
  14257. }
  14258. return getAccessToken;
  14259. }()
  14260. }, {
  14261. key: "hasLoginState",
  14262. value: function hasLoginState() {
  14263. var e = this._cache.keys.refreshTokenKey;
  14264. return this._cache.getStore(e) ? new Ze(this.config.env) : null;
  14265. }
  14266. }, {
  14267. key: "isUsernameRegistered",
  14268. value: function () {
  14269. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  14270. var _yield$this$_request$5, t;
  14271. return _regenerator.default.wrap(function _callee30$(_context30) {
  14272. while (1) {
  14273. switch (_context30.prev = _context30.next) {
  14274. case 0:
  14275. if (!("string" != typeof e)) {
  14276. _context30.next = 2;
  14277. break;
  14278. }
  14279. throw new te({
  14280. code: "PARAM_ERROR",
  14281. message: "username must be a string"
  14282. });
  14283. case 2:
  14284. _context30.next = 4;
  14285. return this._request.send("auth.isUsernameRegistered", {
  14286. username: e
  14287. });
  14288. case 4:
  14289. _yield$this$_request$5 = _context30.sent;
  14290. t = _yield$this$_request$5.data;
  14291. return _context30.abrupt("return", t && t.isRegistered);
  14292. case 7:
  14293. case "end":
  14294. return _context30.stop();
  14295. }
  14296. }
  14297. }, _callee30, this);
  14298. }));
  14299. function isUsernameRegistered(_x25) {
  14300. return _isUsernameRegistered.apply(this, arguments);
  14301. }
  14302. return isUsernameRegistered;
  14303. }()
  14304. }, {
  14305. key: "getLoginState",
  14306. value: function getLoginState() {
  14307. return Promise.resolve(this.hasLoginState());
  14308. }
  14309. }, {
  14310. key: "signInWithTicket",
  14311. value: function () {
  14312. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  14313. return _regenerator.default.wrap(function _callee31$(_context31) {
  14314. while (1) {
  14315. switch (_context31.prev = _context31.next) {
  14316. case 0:
  14317. return _context31.abrupt("return", new tt(this.config).signIn(e));
  14318. case 1:
  14319. case "end":
  14320. return _context31.stop();
  14321. }
  14322. }
  14323. }, _callee31, this);
  14324. }));
  14325. function signInWithTicket(_x26) {
  14326. return _signInWithTicket.apply(this, arguments);
  14327. }
  14328. return signInWithTicket;
  14329. }()
  14330. }, {
  14331. key: "shouldRefreshAccessToken",
  14332. value: function shouldRefreshAccessToken(e) {
  14333. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  14334. }
  14335. }, {
  14336. key: "getUserInfo",
  14337. value: function getUserInfo() {
  14338. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  14339. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  14340. requestId: e.seqId
  14341. });
  14342. });
  14343. }
  14344. }, {
  14345. key: "getAuthHeader",
  14346. value: function getAuthHeader() {
  14347. var _this$_cache$keys11 = this._cache.keys,
  14348. e = _this$_cache$keys11.refreshTokenKey,
  14349. t = _this$_cache$keys11.accessTokenKey,
  14350. n = this._cache.getStore(e);
  14351. return {
  14352. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  14353. };
  14354. }
  14355. }, {
  14356. key: "_onAnonymousConverted",
  14357. value: function _onAnonymousConverted(e) {
  14358. var t = e.data.env;
  14359. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  14360. }
  14361. }, {
  14362. key: "_onLoginTypeChanged",
  14363. value: function _onLoginTypeChanged(e) {
  14364. var _e$data = e.data,
  14365. t = _e$data.loginType,
  14366. n = _e$data.persistence,
  14367. s = _e$data.env;
  14368. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  14369. }
  14370. }]);
  14371. return rt;
  14372. }();
  14373. var it = function it(e, t) {
  14374. t = t || we();
  14375. var n = Ye(this.config.env),
  14376. s = e.cloudPath,
  14377. r = e.filePath,
  14378. i = e.onUploadProgress,
  14379. _e$fileType = e.fileType,
  14380. o = _e$fileType === void 0 ? "image" : _e$fileType;
  14381. return n.send("storage.getUploadMetadata", {
  14382. path: s
  14383. }).then(function (e) {
  14384. var _e$data2 = e.data,
  14385. a = _e$data2.url,
  14386. c = _e$data2.authorization,
  14387. u = _e$data2.token,
  14388. l = _e$data2.fileId,
  14389. h = _e$data2.cosFileId,
  14390. d = e.requestId,
  14391. p = {
  14392. key: s,
  14393. signature: c,
  14394. "x-cos-meta-fileid": h,
  14395. success_action_status: "201",
  14396. "x-cos-security-token": u
  14397. };
  14398. n.upload({
  14399. url: a,
  14400. data: p,
  14401. file: r,
  14402. name: s,
  14403. fileType: o,
  14404. onUploadProgress: i
  14405. }).then(function (e) {
  14406. 201 === e.statusCode ? t(null, {
  14407. fileID: l,
  14408. requestId: d
  14409. }) : t(new te({
  14410. code: "STORAGE_REQUEST_FAIL",
  14411. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  14412. }));
  14413. }).catch(function (e) {
  14414. t(e);
  14415. });
  14416. }).catch(function (e) {
  14417. t(e);
  14418. }), t.promise;
  14419. },
  14420. ot = function ot(e, t) {
  14421. t = t || we();
  14422. var n = Ye(this.config.env),
  14423. s = e.cloudPath;
  14424. return n.send("storage.getUploadMetadata", {
  14425. path: s
  14426. }).then(function (e) {
  14427. t(null, e);
  14428. }).catch(function (e) {
  14429. t(e);
  14430. }), t.promise;
  14431. },
  14432. at = function at(_ref7, t) {
  14433. var e = _ref7.fileList;
  14434. if (t = t || we(), !e || !Array.isArray(e)) return {
  14435. code: "INVALID_PARAM",
  14436. message: "fileList必须是非空的数组"
  14437. };
  14438. var _iterator3 = _createForOfIteratorHelper(e),
  14439. _step3;
  14440. try {
  14441. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  14442. var _t8 = _step3.value;
  14443. if (!_t8 || "string" != typeof _t8) return {
  14444. code: "INVALID_PARAM",
  14445. message: "fileList的元素必须是非空的字符串"
  14446. };
  14447. }
  14448. } catch (err) {
  14449. _iterator3.e(err);
  14450. } finally {
  14451. _iterator3.f();
  14452. }
  14453. var n = {
  14454. fileid_list: e
  14455. };
  14456. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  14457. e.code ? t(null, e) : t(null, {
  14458. fileList: e.data.delete_list,
  14459. requestId: e.requestId
  14460. });
  14461. }).catch(function (e) {
  14462. t(e);
  14463. }), t.promise;
  14464. },
  14465. ct = function ct(_ref8, t) {
  14466. var e = _ref8.fileList;
  14467. t = t || we(), e && Array.isArray(e) || t(null, {
  14468. code: "INVALID_PARAM",
  14469. message: "fileList必须是非空的数组"
  14470. });
  14471. var n = [];
  14472. var _iterator4 = _createForOfIteratorHelper(e),
  14473. _step4;
  14474. try {
  14475. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  14476. var _s9 = _step4.value;
  14477. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  14478. code: "INVALID_PARAM",
  14479. message: "fileList的元素必须是包含fileID和maxAge的对象"
  14480. }), n.push({
  14481. fileid: _s9.fileID,
  14482. max_age: _s9.maxAge
  14483. })) : "string" == typeof _s9 ? n.push({
  14484. fileid: _s9
  14485. }) : t(null, {
  14486. code: "INVALID_PARAM",
  14487. message: "fileList的元素必须是字符串"
  14488. });
  14489. }
  14490. } catch (err) {
  14491. _iterator4.e(err);
  14492. } finally {
  14493. _iterator4.f();
  14494. }
  14495. var s = {
  14496. file_list: n
  14497. };
  14498. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  14499. e.code ? t(null, e) : t(null, {
  14500. fileList: e.data.download_list,
  14501. requestId: e.requestId
  14502. });
  14503. }).catch(function (e) {
  14504. t(e);
  14505. }), t.promise;
  14506. },
  14507. ut = /*#__PURE__*/function () {
  14508. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  14509. var e, n, s, r;
  14510. return _regenerator.default.wrap(function _callee32$(_context32) {
  14511. while (1) {
  14512. switch (_context32.prev = _context32.next) {
  14513. case 0:
  14514. e = _ref9.fileID;
  14515. _context32.next = 3;
  14516. return ct.call(this, {
  14517. fileList: [{
  14518. fileID: e,
  14519. maxAge: 600
  14520. }]
  14521. });
  14522. case 3:
  14523. n = _context32.sent.fileList[0];
  14524. if (!("SUCCESS" !== n.code)) {
  14525. _context32.next = 6;
  14526. break;
  14527. }
  14528. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  14529. e(n);
  14530. }));
  14531. case 6:
  14532. s = Ye(this.config.env);
  14533. r = n.download_url;
  14534. if (!(r = encodeURI(r), !t)) {
  14535. _context32.next = 10;
  14536. break;
  14537. }
  14538. return _context32.abrupt("return", s.download({
  14539. url: r
  14540. }));
  14541. case 10:
  14542. _context32.t0 = t;
  14543. _context32.next = 13;
  14544. return s.download({
  14545. url: r
  14546. });
  14547. case 13:
  14548. _context32.t1 = _context32.sent;
  14549. (0, _context32.t0)(_context32.t1);
  14550. case 15:
  14551. case "end":
  14552. return _context32.stop();
  14553. }
  14554. }
  14555. }, _callee32, this);
  14556. }));
  14557. return function ut(_x27, _x28) {
  14558. return _ref10.apply(this, arguments);
  14559. };
  14560. }(),
  14561. lt = function lt(_ref11, i) {
  14562. var e = _ref11.name,
  14563. t = _ref11.data,
  14564. n = _ref11.query,
  14565. s = _ref11.parse,
  14566. r = _ref11.search;
  14567. var o = i || we();
  14568. var a;
  14569. try {
  14570. a = t ? JSON.stringify(t) : "";
  14571. } catch (e) {
  14572. return Promise.reject(e);
  14573. }
  14574. if (!e) return Promise.reject(new te({
  14575. code: "PARAM_ERROR",
  14576. message: "函数名不能为空"
  14577. }));
  14578. var c = {
  14579. inQuery: n,
  14580. parse: s,
  14581. search: r,
  14582. function_name: e,
  14583. request_data: a
  14584. };
  14585. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  14586. if (e.code) o(null, e);else {
  14587. var _t9 = e.data.response_data;
  14588. if (s) o(null, {
  14589. result: _t9,
  14590. requestId: e.requestId
  14591. });else try {
  14592. _t9 = JSON.parse(e.data.response_data), o(null, {
  14593. result: _t9,
  14594. requestId: e.requestId
  14595. });
  14596. } catch (e) {
  14597. o(new te({
  14598. message: "response data must be json"
  14599. }));
  14600. }
  14601. }
  14602. return o.promise;
  14603. }).catch(function (e) {
  14604. o(e);
  14605. }), o.promise;
  14606. },
  14607. ht = {
  14608. timeout: 15e3,
  14609. persistence: "session"
  14610. },
  14611. dt = {};
  14612. var pt = /*#__PURE__*/function () {
  14613. function pt(e) {
  14614. (0, _classCallCheck2.default)(this, pt);
  14615. this.config = e || this.config, this.authObj = void 0;
  14616. }
  14617. (0, _createClass2.default)(pt, [{
  14618. key: "init",
  14619. value: function init(e) {
  14620. switch (ke.adapter || (this.requestClient = new ke.adapter.reqClass({
  14621. timeout: e.timeout || 5e3,
  14622. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  14623. })), this.config = _objectSpread(_objectSpread({}, ht), e), !0) {
  14624. case this.config.timeout > 6e5:
  14625. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  14626. break;
  14627. case this.config.timeout < 100:
  14628. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  14629. }
  14630. return new pt(this.config);
  14631. }
  14632. }, {
  14633. key: "auth",
  14634. value: function auth() {
  14635. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14636. e = _ref12.persistence;
  14637. if (this.authObj) return this.authObj;
  14638. var t = e || ke.adapter.primaryStorage || ht.persistence;
  14639. var n;
  14640. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  14641. var t = e.env;
  14642. xe[t] = new Ce(e), Oe[t] = new Ce(_objectSpread(_objectSpread({}, e), {}, {
  14643. persistence: "local"
  14644. }));
  14645. }(this.config), n = this.config, Ge[n.env] = new Ve(n), this.authObj = new rt(this.config), this.authObj;
  14646. }
  14647. }, {
  14648. key: "on",
  14649. value: function on(e, t) {
  14650. return Ne.apply(this, [e, t]);
  14651. }
  14652. }, {
  14653. key: "off",
  14654. value: function off(e, t) {
  14655. return Me.apply(this, [e, t]);
  14656. }
  14657. }, {
  14658. key: "callFunction",
  14659. value: function callFunction(e, t) {
  14660. return lt.apply(this, [e, t]);
  14661. }
  14662. }, {
  14663. key: "deleteFile",
  14664. value: function deleteFile(e, t) {
  14665. return at.apply(this, [e, t]);
  14666. }
  14667. }, {
  14668. key: "getTempFileURL",
  14669. value: function getTempFileURL(e, t) {
  14670. return ct.apply(this, [e, t]);
  14671. }
  14672. }, {
  14673. key: "downloadFile",
  14674. value: function downloadFile(e, t) {
  14675. return ut.apply(this, [e, t]);
  14676. }
  14677. }, {
  14678. key: "uploadFile",
  14679. value: function uploadFile(e, t) {
  14680. return it.apply(this, [e, t]);
  14681. }
  14682. }, {
  14683. key: "getUploadMetadata",
  14684. value: function getUploadMetadata(e, t) {
  14685. return ot.apply(this, [e, t]);
  14686. }
  14687. }, {
  14688. key: "registerExtension",
  14689. value: function registerExtension(e) {
  14690. dt[e.name] = e;
  14691. }
  14692. }, {
  14693. key: "invokeExtension",
  14694. value: function () {
  14695. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  14696. var n;
  14697. return _regenerator.default.wrap(function _callee33$(_context33) {
  14698. while (1) {
  14699. switch (_context33.prev = _context33.next) {
  14700. case 0:
  14701. n = dt[e];
  14702. if (n) {
  14703. _context33.next = 3;
  14704. break;
  14705. }
  14706. throw new te({
  14707. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  14708. });
  14709. case 3:
  14710. _context33.next = 5;
  14711. return n.invoke(t, this);
  14712. case 5:
  14713. return _context33.abrupt("return", _context33.sent);
  14714. case 6:
  14715. case "end":
  14716. return _context33.stop();
  14717. }
  14718. }
  14719. }, _callee33, this);
  14720. }));
  14721. function invokeExtension(_x29, _x30) {
  14722. return _invokeExtension.apply(this, arguments);
  14723. }
  14724. return invokeExtension;
  14725. }()
  14726. }, {
  14727. key: "useAdapters",
  14728. value: function useAdapters(e) {
  14729. var _ref13 = be(e) || {},
  14730. t = _ref13.adapter,
  14731. n = _ref13.runtime;
  14732. t && (ke.adapter = t), n && (ke.runtime = n);
  14733. }
  14734. }]);
  14735. return pt;
  14736. }();
  14737. var ft = new pt();
  14738. function gt(e, t, n) {
  14739. void 0 === n && (n = {});
  14740. var s = /\?/.test(t),
  14741. r = "";
  14742. for (var i in n) {
  14743. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  14744. }
  14745. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  14746. }
  14747. var mt = /*#__PURE__*/function () {
  14748. function mt() {
  14749. (0, _classCallCheck2.default)(this, mt);
  14750. }
  14751. (0, _createClass2.default)(mt, [{
  14752. key: "post",
  14753. value: function post(e) {
  14754. var t = e.url,
  14755. n = e.data,
  14756. s = e.headers;
  14757. return new Promise(function (e, r) {
  14758. ne.request({
  14759. url: gt("https:", t),
  14760. data: n,
  14761. method: "POST",
  14762. header: s,
  14763. success: function success(t) {
  14764. e(t);
  14765. },
  14766. fail: function fail(e) {
  14767. r(e);
  14768. }
  14769. });
  14770. });
  14771. }
  14772. }, {
  14773. key: "upload",
  14774. value: function upload(e) {
  14775. return new Promise(function (t, n) {
  14776. var s = e.url,
  14777. r = e.file,
  14778. i = e.data,
  14779. o = e.headers,
  14780. a = e.fileType,
  14781. c = ne.uploadFile({
  14782. url: gt("https:", s),
  14783. name: "file",
  14784. formData: Object.assign({}, i),
  14785. filePath: r,
  14786. fileType: a,
  14787. header: o,
  14788. success: function success(e) {
  14789. var n = {
  14790. statusCode: e.statusCode,
  14791. data: e.data || {}
  14792. };
  14793. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  14794. },
  14795. fail: function fail(e) {
  14796. n(new Error(e.errMsg || "uploadFile:fail"));
  14797. }
  14798. });
  14799. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  14800. e.onUploadProgress({
  14801. loaded: t.totalBytesSent,
  14802. total: t.totalBytesExpectedToSend
  14803. });
  14804. });
  14805. });
  14806. }
  14807. }]);
  14808. return mt;
  14809. }();
  14810. var yt = {
  14811. setItem: function setItem(e, t) {
  14812. ne.setStorageSync(e, t);
  14813. },
  14814. getItem: function getItem(e) {
  14815. return ne.getStorageSync(e);
  14816. },
  14817. removeItem: function removeItem(e) {
  14818. ne.removeStorageSync(e);
  14819. },
  14820. clear: function clear() {
  14821. ne.clearStorageSync();
  14822. }
  14823. };
  14824. var _t = {
  14825. genAdapter: function genAdapter() {
  14826. return {
  14827. root: {},
  14828. reqClass: mt,
  14829. localStorage: yt,
  14830. primaryStorage: "local"
  14831. };
  14832. },
  14833. isMatch: function isMatch() {
  14834. return !0;
  14835. },
  14836. runtime: "uni_app"
  14837. };
  14838. ft.useAdapters(_t);
  14839. var wt = ft,
  14840. vt = wt.init;
  14841. wt.init = function (e) {
  14842. e.env = e.spaceId;
  14843. var t = vt.call(this, e);
  14844. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  14845. var n = t.auth;
  14846. return t.auth = function (e) {
  14847. var t = n.call(this, e);
  14848. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  14849. var n;
  14850. t[e] = (n = t[e], function (e) {
  14851. e = e || {};
  14852. var _ee = ee(e),
  14853. t = _ee.success,
  14854. s = _ee.fail,
  14855. r = _ee.complete;
  14856. if (!(t || s || r)) return n.call(this, e);
  14857. n.call(this, e).then(function (e) {
  14858. t && t(e), r && r(e);
  14859. }, function (e) {
  14860. s && s(e), r && r(e);
  14861. });
  14862. }).bind(t);
  14863. }), t;
  14864. }, t.customAuth = t.auth, t;
  14865. };
  14866. var It = wt;
  14867. var St = /*#__PURE__*/function (_he) {
  14868. (0, _inherits2.default)(St, _he);
  14869. var _super8 = _createSuper(St);
  14870. function St() {
  14871. (0, _classCallCheck2.default)(this, St);
  14872. return _super8.apply(this, arguments);
  14873. }
  14874. (0, _createClass2.default)(St, [{
  14875. key: "getAccessToken",
  14876. value: function getAccessToken() {
  14877. var _this11 = this;
  14878. return new Promise(function (e, t) {
  14879. var n = "Anonymous_Access_token";
  14880. _this11.setAccessToken(n), e(n);
  14881. });
  14882. }
  14883. }, {
  14884. key: "setupRequest",
  14885. value: function setupRequest(e, t) {
  14886. var n = Object.assign({}, e, {
  14887. spaceId: this.config.spaceId,
  14888. timestamp: Date.now()
  14889. }),
  14890. s = {
  14891. "Content-Type": "application/json"
  14892. };
  14893. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = le.sign(n, this.config.clientSecret);
  14894. var r = ue();
  14895. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  14896. var _se = se(),
  14897. i = _se.token;
  14898. return s["x-client-token"] = i, {
  14899. url: this.config.requestUrl,
  14900. method: "POST",
  14901. data: n,
  14902. dataType: "json",
  14903. header: JSON.parse(JSON.stringify(s))
  14904. };
  14905. }
  14906. }, {
  14907. key: "uploadFileToOSS",
  14908. value: function uploadFileToOSS(_ref14) {
  14909. var _this12 = this;
  14910. var e = _ref14.url,
  14911. t = _ref14.formData,
  14912. n = _ref14.name,
  14913. s = _ref14.filePath,
  14914. r = _ref14.fileType,
  14915. i = _ref14.onUploadProgress;
  14916. return new Promise(function (o, a) {
  14917. var c = _this12.adapter.uploadFile({
  14918. url: e,
  14919. formData: t,
  14920. name: n,
  14921. filePath: s,
  14922. fileType: r,
  14923. success: function success(e) {
  14924. e && e.statusCode < 400 ? o(e) : a(new te({
  14925. code: "UPLOAD_FAILED",
  14926. message: "文件上传失败"
  14927. }));
  14928. },
  14929. fail: function fail(e) {
  14930. a(new te({
  14931. code: e.code || "UPLOAD_FAILED",
  14932. message: e.message || e.errMsg || "文件上传失败"
  14933. }));
  14934. }
  14935. });
  14936. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  14937. i({
  14938. loaded: e.totalBytesSent,
  14939. total: e.totalBytesExpectedToSend
  14940. });
  14941. });
  14942. });
  14943. }
  14944. }, {
  14945. key: "uploadFile",
  14946. value: function uploadFile(_ref15) {
  14947. var _this13 = this;
  14948. var e = _ref15.filePath,
  14949. t = _ref15.cloudPath,
  14950. _ref15$fileType = _ref15.fileType,
  14951. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  14952. s = _ref15.onUploadProgress;
  14953. if (!t) throw new te({
  14954. code: "CLOUDPATH_REQUIRED",
  14955. message: "cloudPath不可为空"
  14956. });
  14957. var r;
  14958. return this.getOSSUploadOptionsFromPath({
  14959. cloudPath: t
  14960. }).then(function (t) {
  14961. var _t$result = t.result,
  14962. i = _t$result.url,
  14963. o = _t$result.formData,
  14964. a = _t$result.name;
  14965. r = t.result.fileUrl;
  14966. var c = {
  14967. url: i,
  14968. formData: o,
  14969. name: a,
  14970. filePath: e,
  14971. fileType: n
  14972. };
  14973. return _this13.uploadFileToOSS(Object.assign({}, c, {
  14974. onUploadProgress: s
  14975. }));
  14976. }).then(function () {
  14977. return _this13.reportOSSUpload({
  14978. cloudPath: t
  14979. });
  14980. }).then(function (t) {
  14981. return new Promise(function (n, s) {
  14982. t.success ? n({
  14983. success: !0,
  14984. filePath: e,
  14985. fileID: r
  14986. }) : s(new te({
  14987. code: "UPLOAD_FAILED",
  14988. message: "文件上传失败"
  14989. }));
  14990. });
  14991. });
  14992. }
  14993. }, {
  14994. key: "deleteFile",
  14995. value: function deleteFile(_ref16) {
  14996. var e = _ref16.fileList;
  14997. var t = {
  14998. method: "serverless.file.resource.delete",
  14999. params: JSON.stringify({
  15000. fileList: e
  15001. })
  15002. };
  15003. return this.request(this.setupRequest(t)).then(function (e) {
  15004. if (e.success) return e.result;
  15005. throw new te({
  15006. code: "DELETE_FILE_FAILED",
  15007. message: "删除文件失败"
  15008. });
  15009. });
  15010. }
  15011. }, {
  15012. key: "getTempFileURL",
  15013. value: function getTempFileURL() {
  15014. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15015. e = _ref17.fileList,
  15016. t = _ref17.maxAge;
  15017. if (!Array.isArray(e) || 0 === e.length) throw new te({
  15018. code: "INVALID_PARAM",
  15019. message: "fileList的元素必须是非空的字符串"
  15020. });
  15021. var n = {
  15022. method: "serverless.file.resource.getTempFileURL",
  15023. params: JSON.stringify({
  15024. fileList: e,
  15025. maxAge: t
  15026. })
  15027. };
  15028. return this.request(this.setupRequest(n)).then(function (e) {
  15029. if (e.success) return {
  15030. fileList: e.result.fileList.map(function (e) {
  15031. return {
  15032. fileID: e.fileID,
  15033. tempFileURL: e.tempFileURL
  15034. };
  15035. })
  15036. };
  15037. throw new te({
  15038. code: "GET_TEMP_FILE_URL_FAILED",
  15039. message: "获取临时文件链接失败"
  15040. });
  15041. });
  15042. }
  15043. }]);
  15044. return St;
  15045. }(he);
  15046. var bt = {
  15047. init: function init(e) {
  15048. var t = new St(e),
  15049. n = {
  15050. signInAnonymously: function signInAnonymously() {
  15051. return t.authorize();
  15052. },
  15053. getLoginState: function getLoginState() {
  15054. return Promise.resolve(!1);
  15055. }
  15056. };
  15057. return t.auth = function () {
  15058. return n;
  15059. }, t.customAuth = t.auth, t;
  15060. }
  15061. },
  15062. kt = n(function (e, t) {
  15063. e.exports = r.enc.Hex;
  15064. });
  15065. function At() {
  15066. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  15067. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  15068. var n = t.data,
  15069. s = t.functionName,
  15070. r = t.method,
  15071. i = t.headers,
  15072. _t$signHeaderKeys = t.signHeaderKeys,
  15073. o = _t$signHeaderKeys === void 0 ? [] : _t$signHeaderKeys,
  15074. a = t.config,
  15075. c = Date.now(),
  15076. u = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (e) {
  15077. var t = 16 * Math.random() | 0;
  15078. return ("x" === e ? t : 3 & t | 8).toString(16);
  15079. }),
  15080. l = Object.assign({}, i, {
  15081. "x-from-app-id": a.appId,
  15082. "x-from-env-id": a.envId,
  15083. "x-to-env-id": a.envId,
  15084. "x-from-instance-id": c,
  15085. "x-from-function-name": s,
  15086. "x-client-timestamp": c,
  15087. "x-alipay-source": "client",
  15088. "x-request-id": u,
  15089. "x-alipay-callid": u
  15090. }),
  15091. h = ["x-from-app-id", "x-from-env-id", "x-to-env-id", "x-from-instance-id", "x-from-function-name", "x-client-timestamp"].concat(o),
  15092. _ref18 = e.split("?") || [],
  15093. _ref19 = (0, _slicedToArray2.default)(_ref18, 2),
  15094. _ref19$ = _ref19[0],
  15095. d = _ref19$ === void 0 ? "" : _ref19$,
  15096. _ref19$2 = _ref19[1],
  15097. p = _ref19$2 === void 0 ? "" : _ref19$2,
  15098. f = function (e) {
  15099. var t = e.signedHeaders.join(";"),
  15100. n = e.signedHeaders.map(function (t) {
  15101. return "".concat(t.toLowerCase(), ":").concat(e.headers[t], "\n");
  15102. }).join(""),
  15103. s = ye(e.body).toString(kt),
  15104. r = "".concat(e.method.toUpperCase(), "\n").concat(e.path, "\n").concat(e.query, "\n").concat(n, "\n").concat(t, "\n").concat(s, "\n"),
  15105. i = ye(r).toString(kt),
  15106. o = "HMAC-SHA256\n".concat(e.timestamp, "\n").concat(i, "\n"),
  15107. a = _e(o, e.secretKey).toString(kt);
  15108. return "HMAC-SHA256 Credential=".concat(e.secretId, ", SignedHeaders=").concat(t, ", Signature=").concat(a);
  15109. }({
  15110. path: d,
  15111. query: p,
  15112. method: r,
  15113. headers: l,
  15114. timestamp: c,
  15115. body: JSON.stringify(n),
  15116. secretId: a.secretId,
  15117. secretKey: a.secretKey,
  15118. signedHeaders: h.sort()
  15119. });
  15120. return {
  15121. url: "".concat(a.endpoint).concat(e.replace(/^\//, "")),
  15122. headers: Object.assign({}, l, {
  15123. Authorization: f
  15124. })
  15125. };
  15126. }
  15127. function Pt(_ref20) {
  15128. var e = _ref20.url,
  15129. t = _ref20.data,
  15130. _ref20$method = _ref20.method,
  15131. n = _ref20$method === void 0 ? "POST" : _ref20$method,
  15132. _ref20$headers = _ref20.headers,
  15133. s = _ref20$headers === void 0 ? {} : _ref20$headers;
  15134. return new Promise(function (r, i) {
  15135. ne.request({
  15136. url: e,
  15137. method: n,
  15138. data: t,
  15139. header: s,
  15140. dataType: "json",
  15141. complete: function complete() {
  15142. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  15143. if (!e.statusCode || e.statusCode >= 400) {
  15144. var _ref21 = e.data || {},
  15145. _t10 = _ref21.errMsg;
  15146. return i(new te({
  15147. code: "SYS_ERR",
  15148. message: _t10 || e.errMsg || "request:fail"
  15149. }));
  15150. }
  15151. r({
  15152. status: e.statusCode,
  15153. data: e.data,
  15154. headers: e.header
  15155. });
  15156. }
  15157. });
  15158. });
  15159. }
  15160. function Tt(e, t) {
  15161. var n = e.path,
  15162. s = e.data,
  15163. _e$method = e.method,
  15164. r = _e$method === void 0 ? "GET" : _e$method,
  15165. _At = At(n, {
  15166. functionName: "",
  15167. data: s,
  15168. method: r,
  15169. headers: {
  15170. "x-alipay-cloud-mode": "oss",
  15171. "x-data-api-type": "oss",
  15172. "x-expire-timestamp": Date.now() + 6e4
  15173. },
  15174. signHeaderKeys: ["x-data-api-type", "x-expire-timestamp"],
  15175. config: t
  15176. }),
  15177. i = _At.url,
  15178. o = _At.headers;
  15179. return Pt({
  15180. url: i,
  15181. data: s,
  15182. method: r,
  15183. headers: o
  15184. }).then(function (e) {
  15185. var t = e.data || {};
  15186. if (!t.success) throw new te({
  15187. code: e.code,
  15188. message: e.message,
  15189. requestId: e.trace_id
  15190. });
  15191. return t.data || {};
  15192. }).catch(function (e) {
  15193. throw new te({
  15194. code: e.errCode,
  15195. message: e.errMsg,
  15196. requestId: e.requestId
  15197. });
  15198. });
  15199. }
  15200. function Ct() {
  15201. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  15202. var t = e.trim().replace(/^cloud:\/\//, ""),
  15203. n = t.indexOf("/");
  15204. if (n <= 0) throw new te({
  15205. code: "INVALID_PARAM",
  15206. message: "fileID不合法"
  15207. });
  15208. var s = t.substring(0, n),
  15209. r = t.substring(n + 1);
  15210. return s !== this.config.envId && console.warn("file ".concat(e, " does not belong to env ").concat(this.config.envId)), r;
  15211. }
  15212. var xt = /*#__PURE__*/function () {
  15213. function xt(e) {
  15214. (0, _classCallCheck2.default)(this, xt);
  15215. ["spaceId", "spaceAppId", "accessKey", "secretKey"].forEach(function (t) {
  15216. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error("".concat(t, " required"));
  15217. });
  15218. var t = e.spaceAppId,
  15219. n = e.accessKey,
  15220. s = (0, _objectWithoutProperties2.default)(e, _excluded);
  15221. this.config = Object.assign({}, {
  15222. endpoint: e.endpoint || "https://".concat(e.envId, ".api-hz.cloudbasefunction.cn/"),
  15223. envId: e.spaceId,
  15224. appId: t,
  15225. secretId: n
  15226. }, s);
  15227. }
  15228. (0, _createClass2.default)(xt, [{
  15229. key: "callFunction",
  15230. value: function callFunction(e) {
  15231. return function (e, t) {
  15232. var n = e.name,
  15233. s = e.data,
  15234. r = "POST",
  15235. _At2 = At("/functions/invokeFunction", {
  15236. functionName: n,
  15237. data: s,
  15238. method: r,
  15239. headers: {
  15240. "x-to-function-name": n
  15241. },
  15242. signHeaderKeys: ["x-to-function-name"],
  15243. config: t
  15244. }),
  15245. i = _At2.url,
  15246. o = _At2.headers;
  15247. return Pt({
  15248. url: i,
  15249. data: s,
  15250. method: r,
  15251. headers: o
  15252. }).then(function (e) {
  15253. return e.errCode = 0, e.success = !0, e.requestId = e.requestID || e.requestId, e.result = e.data, delete e.requestID, delete e.data, e;
  15254. }).catch(function (e) {
  15255. throw new te({
  15256. code: e.errCode,
  15257. message: e.errMsg,
  15258. requestId: e.requestId
  15259. });
  15260. });
  15261. }(e, this.config);
  15262. }
  15263. }, {
  15264. key: "uploadFileToOSS",
  15265. value: function uploadFileToOSS(_ref22) {
  15266. var e = _ref22.url,
  15267. t = _ref22.filePath,
  15268. n = _ref22.fileType,
  15269. s = _ref22.formData,
  15270. r = _ref22.onUploadProgress;
  15271. return new Promise(function (i, o) {
  15272. var a = ne.uploadFile({
  15273. url: e,
  15274. filePath: t,
  15275. fileType: n,
  15276. formData: s,
  15277. success: function success(e) {
  15278. e && e.statusCode < 400 ? i(e) : o(new te({
  15279. code: "UPLOAD_FAILED",
  15280. message: "文件上传失败"
  15281. }));
  15282. },
  15283. fail: function fail(e) {
  15284. o(new te({
  15285. code: e.code || "UPLOAD_FAILED",
  15286. message: e.message || e.errMsg || "文件上传失败"
  15287. }));
  15288. }
  15289. });
  15290. "function" == typeof r && a && "function" == typeof a.onProgressUpdate && a.onProgressUpdate(function (e) {
  15291. r({
  15292. loaded: e.totalBytesSent,
  15293. total: e.totalBytesExpectedToSend
  15294. });
  15295. });
  15296. });
  15297. }
  15298. }, {
  15299. key: "uploadFile",
  15300. value: function () {
  15301. var _uploadFile2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(_ref23) {
  15302. var e, _ref23$cloudPath, t, _ref23$fileType, n, s, r, i, o, a, c;
  15303. return _regenerator.default.wrap(function _callee34$(_context34) {
  15304. while (1) {
  15305. switch (_context34.prev = _context34.next) {
  15306. case 0:
  15307. e = _ref23.filePath, _ref23$cloudPath = _ref23.cloudPath, t = _ref23$cloudPath === void 0 ? "" : _ref23$cloudPath, _ref23$fileType = _ref23.fileType, n = _ref23$fileType === void 0 ? "image" : _ref23$fileType, s = _ref23.onUploadProgress;
  15308. if (!("string" !== f(t))) {
  15309. _context34.next = 3;
  15310. break;
  15311. }
  15312. throw new te({
  15313. code: "INVALID_PARAM",
  15314. message: "cloudPath必须为字符串类型"
  15315. });
  15316. case 3:
  15317. if (t = t.trim()) {
  15318. _context34.next = 5;
  15319. break;
  15320. }
  15321. throw new te({
  15322. code: "INVALID_PARAM",
  15323. message: "cloudPath不可为空"
  15324. });
  15325. case 5:
  15326. if (!/:\/\//.test(t)) {
  15327. _context34.next = 7;
  15328. break;
  15329. }
  15330. throw new te({
  15331. code: "INVALID_PARAM",
  15332. message: "cloudPath不合法"
  15333. });
  15334. case 7:
  15335. _context34.next = 9;
  15336. return Tt({
  15337. path: "/".concat(t.replace(/^\//, ""), "?post_url")
  15338. }, this.config);
  15339. case 9:
  15340. r = _context34.sent;
  15341. i = r.file_id;
  15342. o = r.upload_url;
  15343. a = r.form_data;
  15344. c = a && a.reduce(function (e, t) {
  15345. return e[t.key] = t.value, e;
  15346. }, {});
  15347. return _context34.abrupt("return", this.uploadFileToOSS({
  15348. url: o,
  15349. filePath: e,
  15350. fileType: n,
  15351. formData: c,
  15352. onUploadProgress: s
  15353. }).then(function () {
  15354. return {
  15355. fileID: i
  15356. };
  15357. }));
  15358. case 15:
  15359. case "end":
  15360. return _context34.stop();
  15361. }
  15362. }
  15363. }, _callee34, this);
  15364. }));
  15365. function uploadFile(_x31) {
  15366. return _uploadFile2.apply(this, arguments);
  15367. }
  15368. return uploadFile;
  15369. }()
  15370. }, {
  15371. key: "getTempFileURL",
  15372. value: function () {
  15373. var _getTempFileURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(_ref24) {
  15374. var _this14 = this;
  15375. var e;
  15376. return _regenerator.default.wrap(function _callee35$(_context35) {
  15377. while (1) {
  15378. switch (_context35.prev = _context35.next) {
  15379. case 0:
  15380. e = _ref24.fileList;
  15381. return _context35.abrupt("return", new Promise(function (t, n) {
  15382. (!e || e.length < 0) && n(new te({
  15383. errCode: "INVALID_PARAM",
  15384. errMsg: "fileList不能为空数组"
  15385. })), e.length > 50 && n(new te({
  15386. errCode: "INVALID_PARAM",
  15387. errMsg: "fileList数组长度不能超过50"
  15388. }));
  15389. var s = [];
  15390. var _iterator5 = _createForOfIteratorHelper(e),
  15391. _step5;
  15392. try {
  15393. for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
  15394. var _t11 = _step5.value;
  15395. "string" !== f(_t11) && n(new te({
  15396. errCode: "INVALID_PARAM",
  15397. errMsg: "fileList的元素必须是非空的字符串"
  15398. }));
  15399. var _e17 = Ct.call(_this14, _t11);
  15400. s.push({
  15401. file_id: _e17,
  15402. expire: 600
  15403. });
  15404. }
  15405. } catch (err) {
  15406. _iterator5.e(err);
  15407. } finally {
  15408. _iterator5.f();
  15409. }
  15410. Tt({
  15411. path: "/?download_url",
  15412. data: {
  15413. file_list: s
  15414. },
  15415. method: "POST"
  15416. }, _this14.config).then(function (e) {
  15417. var _e$file_list = e.file_list,
  15418. n = _e$file_list === void 0 ? [] : _e$file_list;
  15419. t({
  15420. fileList: n.map(function (e) {
  15421. return {
  15422. fileID: e.file_id,
  15423. tempFileURL: e.download_url
  15424. };
  15425. })
  15426. });
  15427. }).catch(function (e) {
  15428. return n(e);
  15429. });
  15430. }));
  15431. case 2:
  15432. case "end":
  15433. return _context35.stop();
  15434. }
  15435. }
  15436. }, _callee35);
  15437. }));
  15438. function getTempFileURL(_x32) {
  15439. return _getTempFileURL.apply(this, arguments);
  15440. }
  15441. return getTempFileURL;
  15442. }()
  15443. }, {
  15444. key: "deleteFile",
  15445. value: function () {
  15446. var _deleteFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(_ref25) {
  15447. var _this15 = this;
  15448. var e;
  15449. return _regenerator.default.wrap(function _callee36$(_context36) {
  15450. while (1) {
  15451. switch (_context36.prev = _context36.next) {
  15452. case 0:
  15453. e = _ref25.fileList;
  15454. return _context36.abrupt("return", new Promise(function (t, n) {
  15455. (!e || e.length < 0) && n(new te({
  15456. errCode: "INVALID_PARAM",
  15457. errMsg: "fileList不能为空数组"
  15458. })), e.length > 50 && n(new te({
  15459. errCode: "INVALID_PARAM",
  15460. errMsg: "fileList数组长度不能超过50"
  15461. }));
  15462. var s = [];
  15463. var _iterator6 = _createForOfIteratorHelper(e),
  15464. _step6;
  15465. try {
  15466. for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {
  15467. var _t12 = _step6.value;
  15468. "string" !== f(_t12) && n(new te({
  15469. errCode: "INVALID_PARAM",
  15470. errMsg: "fileList的元素必须是非空的字符串"
  15471. })), s.push(Ct.call(_this15, _t12));
  15472. }
  15473. } catch (err) {
  15474. _iterator6.e(err);
  15475. } finally {
  15476. _iterator6.f();
  15477. }
  15478. Tt({
  15479. path: "/?delete",
  15480. data: {
  15481. file_list: s
  15482. },
  15483. method: "POST"
  15484. }, _this15.config).then(function (e) {
  15485. var _e$file_list2 = e.file_list,
  15486. n = _e$file_list2 === void 0 ? [] : _e$file_list2;
  15487. t({
  15488. fileList: n.map(function (e) {
  15489. return {
  15490. fileID: e.file_id,
  15491. tempFileURL: e.download_url
  15492. };
  15493. })
  15494. });
  15495. }).catch(function (e) {
  15496. return n(e);
  15497. });
  15498. }));
  15499. case 2:
  15500. case "end":
  15501. return _context36.stop();
  15502. }
  15503. }
  15504. }, _callee36);
  15505. }));
  15506. function deleteFile(_x33) {
  15507. return _deleteFile.apply(this, arguments);
  15508. }
  15509. return deleteFile;
  15510. }()
  15511. }]);
  15512. return xt;
  15513. }();
  15514. var Ot = {
  15515. init: function init(e) {
  15516. e.envId = e.spaceId, e.provider = "alipay";
  15517. var t = new xt(e);
  15518. return t.auth = function () {
  15519. return {
  15520. signInAnonymously: function signInAnonymously() {
  15521. return Promise.resolve();
  15522. },
  15523. getLoginState: function getLoginState() {
  15524. return Promise.resolve(!0);
  15525. }
  15526. };
  15527. }, t;
  15528. }
  15529. };
  15530. function Et(_ref26) {
  15531. var e = _ref26.data;
  15532. var t;
  15533. t = ue();
  15534. var n = JSON.parse(JSON.stringify(e || {}));
  15535. if (Object.assign(n, {
  15536. clientInfo: t
  15537. }), !n.uniIdToken) {
  15538. var _se2 = se(),
  15539. _e18 = _se2.token;
  15540. _e18 && (n.uniIdToken = _e18);
  15541. }
  15542. return n;
  15543. }
  15544. function Lt() {
  15545. return _Lt.apply(this, arguments);
  15546. }
  15547. function _Lt() {
  15548. _Lt = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57() {
  15549. var _this28 = this;
  15550. var _ref68,
  15551. e,
  15552. t,
  15553. _this$__dev__,
  15554. n,
  15555. s,
  15556. r,
  15557. i,
  15558. o,
  15559. a,
  15560. _args6 = arguments;
  15561. return _regenerator.default.wrap(function _callee57$(_context57) {
  15562. while (1) {
  15563. switch (_context57.prev = _context57.next) {
  15564. case 0:
  15565. _ref68 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref68.name, t = _ref68.data;
  15566. _context57.next = 3;
  15567. return this.__dev__.initLocalNetwork();
  15568. case 3:
  15569. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  15570. aliyun: "aliyun",
  15571. tencent: "tcb",
  15572. alipay: "alipay"
  15573. }[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);
  15574. return _context57.abrupt("return", new Promise(function (t, n) {
  15575. ne.request({
  15576. method: "POST",
  15577. url: o,
  15578. data: {
  15579. name: e,
  15580. platform: P,
  15581. provider: r,
  15582. spaceId: i
  15583. },
  15584. timeout: 3e3,
  15585. success: function success(e) {
  15586. t(e);
  15587. },
  15588. fail: function fail() {
  15589. t({
  15590. data: {
  15591. code: "NETWORK_ERROR",
  15592. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  15593. }
  15594. });
  15595. }
  15596. });
  15597. }).then(function () {
  15598. var _ref69 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15599. e = _ref69.data;
  15600. var _ref70 = e || {},
  15601. t = _ref70.code,
  15602. n = _ref70.message;
  15603. return {
  15604. code: 0 === t ? 0 : t || "SYS_ERR",
  15605. message: n || "SYS_ERR"
  15606. };
  15607. }).then(function (_ref71) {
  15608. var n = _ref71.code,
  15609. s = _ref71.message;
  15610. if (0 !== n) {
  15611. switch (n) {
  15612. case "MODULE_ENCRYPTED":
  15613. 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"));
  15614. break;
  15615. case "FUNCTION_ENCRYPTED":
  15616. 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"));
  15617. break;
  15618. case "ACTION_ENCRYPTED":
  15619. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  15620. break;
  15621. case "NETWORK_ERROR":
  15622. {
  15623. var _e30 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  15624. throw console.error(_e30), new Error(_e30);
  15625. }
  15626. case "SWITCH_TO_CLOUD":
  15627. break;
  15628. default:
  15629. {
  15630. 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");
  15631. throw console.error(_e31), new Error(_e31);
  15632. }
  15633. }
  15634. return _this28._callCloudFunction({
  15635. name: e,
  15636. data: t
  15637. });
  15638. }
  15639. return new Promise(function (e, n) {
  15640. var s = Et.call(_this28, {
  15641. data: t
  15642. });
  15643. ne.request({
  15644. method: "POST",
  15645. url: a,
  15646. data: {
  15647. provider: r,
  15648. platform: P,
  15649. param: s
  15650. },
  15651. success: function success() {
  15652. var _ref72 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15653. t = _ref72.statusCode,
  15654. s = _ref72.data;
  15655. return !t || t >= 400 ? n(new te({
  15656. code: s.code || "SYS_ERR",
  15657. message: s.message || "request:fail"
  15658. })) : e({
  15659. result: s
  15660. });
  15661. },
  15662. fail: function fail(e) {
  15663. n(new te({
  15664. code: e.code || e.errCode || "SYS_ERR",
  15665. message: e.message || e.errMsg || "request:fail"
  15666. }));
  15667. }
  15668. });
  15669. });
  15670. }));
  15671. case 5:
  15672. case "end":
  15673. return _context57.stop();
  15674. }
  15675. }
  15676. }, _callee57, this);
  15677. }));
  15678. return _Lt.apply(this, arguments);
  15679. }
  15680. var Rt = [{
  15681. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  15682. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  15683. mode: "append"
  15684. }];
  15685. var Ut = /[\\^$.*+?()[\]{}|]/g,
  15686. Nt = RegExp(Ut.source);
  15687. function Dt(e, t, n) {
  15688. return e.replace(new RegExp((s = t) && Nt.test(s) ? s.replace(Ut, "\\$&") : s, "g"), n);
  15689. var s;
  15690. }
  15691. var Mt = "none",
  15692. qt = "request",
  15693. Ft = "response",
  15694. Kt = "both";
  15695. var jt = /*#__PURE__*/function () {
  15696. function jt() {
  15697. var _ref27 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15698. e = _ref27.secretType,
  15699. t = _ref27.uniCloudIns;
  15700. (0, _classCallCheck2.default)(this, jt);
  15701. this.clientType = "", this.secretType = e || Mt, this.uniCloudIns = t;
  15702. var _this$uniCloudIns$con = this.uniCloudIns.config,
  15703. n = _this$uniCloudIns$con.provider,
  15704. s = _this$uniCloudIns$con.spaceId;
  15705. var r;
  15706. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  15707. }
  15708. (0, _createClass2.default)(jt, [{
  15709. key: "getSystemInfo",
  15710. value: function getSystemInfo() {
  15711. return this._systemInfo || (this._systemInfo = ae()), this._systemInfo;
  15712. }
  15713. }, {
  15714. key: "appId",
  15715. get: function get() {
  15716. return this.getSystemInfo().appId;
  15717. }
  15718. }, {
  15719. key: "deviceId",
  15720. get: function get() {
  15721. return this.getSystemInfo().deviceId;
  15722. }
  15723. }, {
  15724. key: "encryptData",
  15725. value: function () {
  15726. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(e) {
  15727. return _regenerator.default.wrap(function _callee37$(_context37) {
  15728. while (1) {
  15729. switch (_context37.prev = _context37.next) {
  15730. case 0:
  15731. return _context37.abrupt("return", this.secretType === Mt ? e : this.platformEncryptData(e));
  15732. case 1:
  15733. case "end":
  15734. return _context37.stop();
  15735. }
  15736. }
  15737. }, _callee37, this);
  15738. }));
  15739. function encryptData(_x34) {
  15740. return _encryptData.apply(this, arguments);
  15741. }
  15742. return encryptData;
  15743. }()
  15744. }, {
  15745. key: "decryptResult",
  15746. value: function () {
  15747. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38(e) {
  15748. var _ref28, t, n;
  15749. return _regenerator.default.wrap(function _callee38$(_context38) {
  15750. while (1) {
  15751. switch (_context38.prev = _context38.next) {
  15752. case 0:
  15753. if (!(this.secretType === Mt)) {
  15754. _context38.next = 2;
  15755. break;
  15756. }
  15757. return _context38.abrupt("return", e);
  15758. case 2:
  15759. _ref28 = e || {}, t = _ref28.errCode, n = _ref28.content;
  15760. return _context38.abrupt("return", t || !n ? e : this.secretType === qt ? n : this.platformDecryptResult(e));
  15761. case 4:
  15762. case "end":
  15763. return _context38.stop();
  15764. }
  15765. }
  15766. }, _callee38, this);
  15767. }));
  15768. function decryptResult(_x35) {
  15769. return _decryptResult.apply(this, arguments);
  15770. }
  15771. return decryptResult;
  15772. }()
  15773. }, {
  15774. key: "wrapVerifyClientCallFunction",
  15775. value: function wrapVerifyClientCallFunction(e) {
  15776. var t = this;
  15777. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  15778. var _ref30,
  15779. n,
  15780. _ref30$data,
  15781. s,
  15782. r,
  15783. _args39 = arguments;
  15784. return _regenerator.default.wrap(function _callee39$(_context39) {
  15785. while (1) {
  15786. switch (_context39.prev = _context39.next) {
  15787. case 0:
  15788. _ref30 = _args39.length > 0 && _args39[0] !== undefined ? _args39[0] : {}, n = _ref30.name, _ref30$data = _ref30.data, s = _ref30$data === void 0 ? {} : _ref30$data;
  15789. _context39.next = 3;
  15790. return t.prepare();
  15791. case 3:
  15792. _context39.next = 5;
  15793. return t.platformGetSignOption();
  15794. case 5:
  15795. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context39.sent;
  15796. _context39.next = 8;
  15797. return e({
  15798. name: n,
  15799. data: s
  15800. });
  15801. case 8:
  15802. r = _context39.sent;
  15803. _context39.t0 = t.isClientKeyNotFound(r);
  15804. if (!_context39.t0) {
  15805. _context39.next = 19;
  15806. break;
  15807. }
  15808. _context39.next = 13;
  15809. return t.prepare({
  15810. forceUpdate: !0
  15811. });
  15812. case 13:
  15813. _context39.next = 15;
  15814. return t.platformGetSignOption();
  15815. case 15:
  15816. s._uniCloudOptions = _context39.sent;
  15817. _context39.next = 18;
  15818. return e({
  15819. name: n,
  15820. data: s
  15821. });
  15822. case 18:
  15823. r = _context39.sent;
  15824. case 19:
  15825. return _context39.abrupt("return", r);
  15826. case 20:
  15827. case "end":
  15828. return _context39.stop();
  15829. }
  15830. }
  15831. }, _callee39);
  15832. }));
  15833. }
  15834. }, {
  15835. key: "wrapEncryptDataCallFunction",
  15836. value: function wrapEncryptDataCallFunction(e) {
  15837. var t = this;
  15838. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  15839. var _ref32,
  15840. n,
  15841. _ref32$data,
  15842. s,
  15843. r,
  15844. i,
  15845. _r3,
  15846. _args40 = arguments;
  15847. return _regenerator.default.wrap(function _callee40$(_context40) {
  15848. while (1) {
  15849. switch (_context40.prev = _context40.next) {
  15850. case 0:
  15851. _ref32 = _args40.length > 0 && _args40[0] !== undefined ? _args40[0] : {}, n = _ref32.name, _ref32$data = _ref32.data, s = _ref32$data === void 0 ? {} : _ref32$data;
  15852. _context40.next = 3;
  15853. return t.prepare();
  15854. case 3:
  15855. _context40.next = 5;
  15856. return t.encryptData(s);
  15857. case 5:
  15858. r = _context40.sent;
  15859. _context40.next = 8;
  15860. return e({
  15861. name: n,
  15862. data: r
  15863. });
  15864. case 8:
  15865. i = _context40.sent;
  15866. if (!t.isClientKeyNotFound(i)) {
  15867. _context40.next = 21;
  15868. break;
  15869. }
  15870. _context40.next = 12;
  15871. return t.prepare({
  15872. forceUpdate: !0
  15873. });
  15874. case 12:
  15875. _context40.next = 14;
  15876. return t.encryptData(s);
  15877. case 14:
  15878. _r3 = _context40.sent;
  15879. _context40.next = 17;
  15880. return t.platformGetSignOption();
  15881. case 17:
  15882. s._uniCloudOptions = _context40.sent;
  15883. _context40.next = 20;
  15884. return e({
  15885. name: n,
  15886. data: _r3
  15887. });
  15888. case 20:
  15889. i = _context40.sent;
  15890. case 21:
  15891. _context40.next = 23;
  15892. return t.decryptResult(i.result);
  15893. case 23:
  15894. i.result = _context40.sent;
  15895. return _context40.abrupt("return", i);
  15896. case 25:
  15897. case "end":
  15898. return _context40.stop();
  15899. }
  15900. }
  15901. }, _callee40);
  15902. }));
  15903. }
  15904. }]);
  15905. return jt;
  15906. }();
  15907. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  15908. function Bt(e) {
  15909. return parseInt(e) === e;
  15910. }
  15911. function $t(e) {
  15912. if (!Bt(e.length)) return !1;
  15913. for (var t = 0; t < e.length; t++) {
  15914. if (!Bt(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  15915. }
  15916. return !0;
  15917. }
  15918. function Wt(e, t) {
  15919. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  15920. if (Array.isArray(e)) {
  15921. if (!$t(e)) throw new Error("Array contains invalid value: " + e);
  15922. return new Uint8Array(e);
  15923. }
  15924. if (Bt(e.length) && $t(e)) return new Uint8Array(e);
  15925. throw new Error("unsupported array-like object");
  15926. }
  15927. function Ht(e) {
  15928. return new Uint8Array(e);
  15929. }
  15930. function zt(e, t, n, s, r) {
  15931. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  15932. }
  15933. var Jt,
  15934. Vt = {
  15935. toBytes: function toBytes(e) {
  15936. var t = [],
  15937. n = 0;
  15938. for (e = encodeURI(e); n < e.length;) {
  15939. var s = e.charCodeAt(n++);
  15940. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  15941. }
  15942. return Wt(t);
  15943. },
  15944. fromBytes: function fromBytes(e) {
  15945. for (var t = [], n = 0; n < e.length;) {
  15946. var s = e[n];
  15947. 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);
  15948. }
  15949. return t.join("");
  15950. }
  15951. },
  15952. Gt = (Jt = "0123456789abcdef", {
  15953. toBytes: function toBytes(e) {
  15954. for (var t = [], n = 0; n < e.length; n += 2) {
  15955. t.push(parseInt(e.substr(n, 2), 16));
  15956. }
  15957. return t;
  15958. },
  15959. fromBytes: function fromBytes(e) {
  15960. for (var t = [], n = 0; n < e.length; n++) {
  15961. var s = e[n];
  15962. t.push(Jt[(240 & s) >> 4] + Jt[15 & s]);
  15963. }
  15964. return t.join("");
  15965. }
  15966. }),
  15967. Yt = {
  15968. 16: 10,
  15969. 24: 12,
  15970. 32: 14
  15971. },
  15972. Qt = [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],
  15973. Xt = [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],
  15974. Zt = [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],
  15975. en = [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],
  15976. tn = [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],
  15977. nn = [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],
  15978. sn = [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],
  15979. rn = [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],
  15980. on = [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],
  15981. an = [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],
  15982. cn = [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],
  15983. un = [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],
  15984. ln = [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],
  15985. hn = [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],
  15986. dn = [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];
  15987. function pn(e) {
  15988. for (var t = [], n = 0; n < e.length; n += 4) {
  15989. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  15990. }
  15991. return t;
  15992. }
  15993. var fn = /*#__PURE__*/function () {
  15994. function fn(e) {
  15995. (0, _classCallCheck2.default)(this, fn);
  15996. if (!(this instanceof fn)) throw Error("AES must be instanitated with `new`");
  15997. Object.defineProperty(this, "key", {
  15998. value: Wt(e, !0)
  15999. }), this._prepare();
  16000. }
  16001. (0, _createClass2.default)(fn, [{
  16002. key: "_prepare",
  16003. value: function _prepare() {
  16004. var e = Yt[this.key.length];
  16005. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  16006. this._Ke = [], this._Kd = [];
  16007. for (var t = 0; t <= e; t++) {
  16008. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  16009. }
  16010. var n,
  16011. s = 4 * (e + 1),
  16012. r = this.key.length / 4,
  16013. i = pn(this.key);
  16014. for (t = 0; t < r; t++) {
  16015. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  16016. }
  16017. for (var o, a = 0, c = r; c < s;) {
  16018. if (o = i[r - 1], i[0] ^= Xt[o >> 16 & 255] << 24 ^ Xt[o >> 8 & 255] << 16 ^ Xt[255 & o] << 8 ^ Xt[o >> 24 & 255] ^ Qt[a] << 24, a += 1, 8 != r) for (t = 1; t < r; t++) {
  16019. i[t] ^= i[t - 1];
  16020. } else {
  16021. for (t = 1; t < r / 2; t++) {
  16022. i[t] ^= i[t - 1];
  16023. }
  16024. o = i[r / 2 - 1], i[r / 2] ^= Xt[255 & o] ^ Xt[o >> 8 & 255] << 8 ^ Xt[o >> 16 & 255] << 16 ^ Xt[o >> 24 & 255] << 24;
  16025. for (t = r / 2 + 1; t < r; t++) {
  16026. i[t] ^= i[t - 1];
  16027. }
  16028. }
  16029. for (t = 0; t < r && c < s;) {
  16030. u = c >> 2, l = c % 4, this._Ke[u][l] = i[t], this._Kd[e - u][l] = i[t++], c++;
  16031. }
  16032. }
  16033. for (var u = 1; u < e; u++) {
  16034. for (var l = 0; l < 4; l++) {
  16035. o = this._Kd[u][l], this._Kd[u][l] = un[o >> 24 & 255] ^ ln[o >> 16 & 255] ^ hn[o >> 8 & 255] ^ dn[255 & o];
  16036. }
  16037. }
  16038. }
  16039. }, {
  16040. key: "encrypt",
  16041. value: function encrypt(e) {
  16042. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  16043. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = pn(e), r = 0; r < 4; r++) {
  16044. s[r] ^= this._Ke[0][r];
  16045. }
  16046. for (var i = 1; i < t; i++) {
  16047. for (r = 0; r < 4; r++) {
  16048. n[r] = en[s[r] >> 24 & 255] ^ tn[s[(r + 1) % 4] >> 16 & 255] ^ nn[s[(r + 2) % 4] >> 8 & 255] ^ sn[255 & s[(r + 3) % 4]] ^ this._Ke[i][r];
  16049. }
  16050. s = n.slice();
  16051. }
  16052. var o,
  16053. a = Ht(16);
  16054. for (r = 0; r < 4; r++) {
  16055. o = this._Ke[t][r], a[4 * r] = 255 & (Xt[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (Xt[s[(r + 1) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (Xt[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (Xt[255 & s[(r + 3) % 4]] ^ o);
  16056. }
  16057. return a;
  16058. }
  16059. }, {
  16060. key: "decrypt",
  16061. value: function decrypt(e) {
  16062. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  16063. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = pn(e), r = 0; r < 4; r++) {
  16064. s[r] ^= this._Kd[0][r];
  16065. }
  16066. for (var i = 1; i < t; i++) {
  16067. for (r = 0; r < 4; r++) {
  16068. n[r] = rn[s[r] >> 24 & 255] ^ on[s[(r + 3) % 4] >> 16 & 255] ^ an[s[(r + 2) % 4] >> 8 & 255] ^ cn[255 & s[(r + 1) % 4]] ^ this._Kd[i][r];
  16069. }
  16070. s = n.slice();
  16071. }
  16072. var o,
  16073. a = Ht(16);
  16074. for (r = 0; r < 4; r++) {
  16075. o = this._Kd[t][r], a[4 * r] = 255 & (Zt[s[r] >> 24 & 255] ^ o >> 24), a[4 * r + 1] = 255 & (Zt[s[(r + 3) % 4] >> 16 & 255] ^ o >> 16), a[4 * r + 2] = 255 & (Zt[s[(r + 2) % 4] >> 8 & 255] ^ o >> 8), a[4 * r + 3] = 255 & (Zt[255 & s[(r + 1) % 4]] ^ o);
  16076. }
  16077. return a;
  16078. }
  16079. }]);
  16080. return fn;
  16081. }();
  16082. var gn = /*#__PURE__*/function () {
  16083. function gn(e) {
  16084. (0, _classCallCheck2.default)(this, gn);
  16085. if (!(this instanceof gn)) throw Error("AES must be instanitated with `new`");
  16086. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new fn(e);
  16087. }
  16088. (0, _createClass2.default)(gn, [{
  16089. key: "encrypt",
  16090. value: function encrypt(e) {
  16091. if ((e = Wt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  16092. for (var t = Ht(e.length), n = Ht(16), s = 0; s < e.length; s += 16) {
  16093. zt(e, n, 0, s, s + 16), zt(n = this._aes.encrypt(n), t, s);
  16094. }
  16095. return t;
  16096. }
  16097. }, {
  16098. key: "decrypt",
  16099. value: function decrypt(e) {
  16100. if ((e = Wt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  16101. for (var t = Ht(e.length), n = Ht(16), s = 0; s < e.length; s += 16) {
  16102. zt(e, n, 0, s, s + 16), zt(n = this._aes.decrypt(n), t, s);
  16103. }
  16104. return t;
  16105. }
  16106. }]);
  16107. return gn;
  16108. }();
  16109. var mn = /*#__PURE__*/function () {
  16110. function mn(e, t) {
  16111. (0, _classCallCheck2.default)(this, mn);
  16112. if (!(this instanceof mn)) throw Error("AES must be instanitated with `new`");
  16113. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  16114. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  16115. } else t = Ht(16);
  16116. this._lastCipherblock = Wt(t, !0), this._aes = new fn(e);
  16117. }
  16118. (0, _createClass2.default)(mn, [{
  16119. key: "encrypt",
  16120. value: function encrypt(e) {
  16121. if ((e = Wt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  16122. for (var t = Ht(e.length), n = Ht(16), s = 0; s < e.length; s += 16) {
  16123. zt(e, n, 0, s, s + 16);
  16124. for (var r = 0; r < 16; r++) {
  16125. n[r] ^= this._lastCipherblock[r];
  16126. }
  16127. this._lastCipherblock = this._aes.encrypt(n), zt(this._lastCipherblock, t, s);
  16128. }
  16129. return t;
  16130. }
  16131. }, {
  16132. key: "decrypt",
  16133. value: function decrypt(e) {
  16134. if ((e = Wt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  16135. for (var t = Ht(e.length), n = Ht(16), s = 0; s < e.length; s += 16) {
  16136. zt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  16137. for (var r = 0; r < 16; r++) {
  16138. t[s + r] = n[r] ^ this._lastCipherblock[r];
  16139. }
  16140. zt(e, this._lastCipherblock, 0, s, s + 16);
  16141. }
  16142. return t;
  16143. }
  16144. }]);
  16145. return mn;
  16146. }();
  16147. var yn = /*#__PURE__*/function () {
  16148. function yn(e, t, n) {
  16149. (0, _classCallCheck2.default)(this, yn);
  16150. if (!(this instanceof yn)) throw Error("AES must be instanitated with `new`");
  16151. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  16152. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  16153. } else t = Ht(16);
  16154. n || (n = 1), this.segmentSize = n, this._shiftRegister = Wt(t, !0), this._aes = new fn(e);
  16155. }
  16156. (0, _createClass2.default)(yn, [{
  16157. key: "encrypt",
  16158. value: function encrypt(e) {
  16159. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  16160. for (var t, n = Wt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  16161. t = this._aes.encrypt(this._shiftRegister);
  16162. for (var r = 0; r < this.segmentSize; r++) {
  16163. n[s + r] ^= t[r];
  16164. }
  16165. zt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), zt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  16166. }
  16167. return n;
  16168. }
  16169. }, {
  16170. key: "decrypt",
  16171. value: function decrypt(e) {
  16172. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  16173. for (var t, n = Wt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  16174. t = this._aes.encrypt(this._shiftRegister);
  16175. for (var r = 0; r < this.segmentSize; r++) {
  16176. n[s + r] ^= t[r];
  16177. }
  16178. zt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), zt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  16179. }
  16180. return n;
  16181. }
  16182. }]);
  16183. return yn;
  16184. }();
  16185. var _n = /*#__PURE__*/function () {
  16186. function _n(e, t) {
  16187. (0, _classCallCheck2.default)(this, _n);
  16188. if (!(this instanceof _n)) throw Error("AES must be instanitated with `new`");
  16189. if (this.description = "Output Feedback", this.name = "ofb", t) {
  16190. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  16191. } else t = Ht(16);
  16192. this._lastPrecipher = Wt(t, !0), this._lastPrecipherIndex = 16, this._aes = new fn(e);
  16193. }
  16194. (0, _createClass2.default)(_n, [{
  16195. key: "encrypt",
  16196. value: function encrypt(e) {
  16197. for (var t = Wt(e, !0), n = 0; n < t.length; n++) {
  16198. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  16199. }
  16200. return t;
  16201. }
  16202. }, {
  16203. key: "decrypt",
  16204. value: function decrypt(e) {
  16205. return this.encrypt(e);
  16206. }
  16207. }]);
  16208. return _n;
  16209. }();
  16210. var wn = /*#__PURE__*/function () {
  16211. function wn(e) {
  16212. (0, _classCallCheck2.default)(this, wn);
  16213. if (!(this instanceof wn)) throw Error("Counter must be instanitated with `new`");
  16214. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = Ht(16), this.setValue(e)) : this.setBytes(e);
  16215. }
  16216. (0, _createClass2.default)(wn, [{
  16217. key: "setValue",
  16218. value: function setValue(e) {
  16219. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  16220. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  16221. for (var t = 15; t >= 0; --t) {
  16222. this._counter[t] = e % 256, e = parseInt(e / 256);
  16223. }
  16224. }
  16225. }, {
  16226. key: "setBytes",
  16227. value: function setBytes(e) {
  16228. if (16 != (e = Wt(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  16229. this._counter = e;
  16230. }
  16231. }, {
  16232. key: "increment",
  16233. value: function increment() {
  16234. for (var e = 15; e >= 0; e--) {
  16235. if (255 !== this._counter[e]) {
  16236. this._counter[e]++;
  16237. break;
  16238. }
  16239. this._counter[e] = 0;
  16240. }
  16241. }
  16242. }]);
  16243. return wn;
  16244. }();
  16245. var vn = /*#__PURE__*/function () {
  16246. function vn(e, t) {
  16247. (0, _classCallCheck2.default)(this, vn);
  16248. if (!(this instanceof vn)) throw Error("AES must be instanitated with `new`");
  16249. this.description = "Counter", this.name = "ctr", t instanceof wn || (t = new wn(t)), this._counter = t, this._remainingCounter = null, this._remainingCounterIndex = 16, this._aes = new fn(e);
  16250. }
  16251. (0, _createClass2.default)(vn, [{
  16252. key: "encrypt",
  16253. value: function encrypt(e) {
  16254. for (var t = Wt(e, !0), n = 0; n < t.length; n++) {
  16255. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  16256. }
  16257. return t;
  16258. }
  16259. }, {
  16260. key: "decrypt",
  16261. value: function decrypt(e) {
  16262. return this.encrypt(e);
  16263. }
  16264. }]);
  16265. return vn;
  16266. }();
  16267. var In = {
  16268. AES: fn,
  16269. Counter: wn,
  16270. ModeOfOperation: {
  16271. ecb: gn,
  16272. cbc: mn,
  16273. cfb: yn,
  16274. ofb: _n,
  16275. ctr: vn
  16276. },
  16277. utils: {
  16278. hex: Gt,
  16279. utf8: Vt
  16280. },
  16281. padding: {
  16282. pkcs7: {
  16283. pad: function pad(e) {
  16284. var t = 16 - (e = Wt(e, !0)).length % 16,
  16285. n = Ht(e.length + t);
  16286. zt(e, n);
  16287. for (var s = e.length; s < n.length; s++) {
  16288. n[s] = t;
  16289. }
  16290. return n;
  16291. },
  16292. strip: function strip(e) {
  16293. if ((e = Wt(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  16294. var t = e[e.length - 1];
  16295. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  16296. for (var n = e.length - t, s = 0; s < t; s++) {
  16297. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  16298. }
  16299. var r = Ht(n);
  16300. return zt(e, r, 0, 0, n), r;
  16301. }
  16302. }
  16303. },
  16304. _arrayTest: {
  16305. coerceArray: Wt,
  16306. createArray: Ht,
  16307. copyArray: zt
  16308. }
  16309. };
  16310. function Sn(e, t, n) {
  16311. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  16312. r = In.utils.utf8.toBytes(n),
  16313. i = In.utils.utf8.toBytes(e),
  16314. o = new In.ModeOfOperation.cbc(s, r),
  16315. a = In.padding.pkcs7.pad(i),
  16316. c = o.encrypt(a);
  16317. return uni.arrayBufferToBase64(c);
  16318. }
  16319. var bn = {
  16320. code: 2e4,
  16321. message: "System error"
  16322. },
  16323. kn = {
  16324. code: 20101,
  16325. message: "Invalid client"
  16326. },
  16327. An = {
  16328. code: 20102,
  16329. message: "Get encrypt key failed"
  16330. },
  16331. Pn = {
  16332. 10001: "Secure network is not supported on current playground or unimpsdk",
  16333. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  16334. 10009: "Encrypt payload failed",
  16335. 10010: "Decrypt response failed"
  16336. };
  16337. function Tn(e) {
  16338. var _ref33 = e || {},
  16339. t = _ref33.errSubject,
  16340. n = _ref33.subject,
  16341. s = _ref33.errCode,
  16342. r = _ref33.errMsg,
  16343. i = _ref33.code,
  16344. o = _ref33.message,
  16345. a = _ref33.cause;
  16346. return new te({
  16347. subject: t || n || "uni-secure-network",
  16348. code: s || i || bn.code,
  16349. message: r || o,
  16350. cause: a
  16351. });
  16352. }
  16353. var Cn,
  16354. xn,
  16355. On = null;
  16356. var En = /*#__PURE__*/function (_jt) {
  16357. (0, _inherits2.default)(En, _jt);
  16358. var _super9 = _createSuper(En);
  16359. function En(e) {
  16360. var _this16;
  16361. (0, _classCallCheck2.default)(this, En);
  16362. _this16 = _super9.call(this, e), _this16.clientType = "mp-weixin", _this16.userEncryptKey = null;
  16363. return _this16;
  16364. }
  16365. (0, _createClass2.default)(En, [{
  16366. key: "isLogin",
  16367. value: function isLogin() {
  16368. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  16369. }
  16370. }, {
  16371. key: "prepare",
  16372. value: function () {
  16373. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41() {
  16374. return _regenerator.default.wrap(function _callee41$(_context41) {
  16375. while (1) {
  16376. switch (_context41.prev = _context41.next) {
  16377. case 0:
  16378. if (this.isLogin()) {
  16379. _context41.next = 7;
  16380. break;
  16381. }
  16382. if (this.scopedGlobalCache.initPromise) {
  16383. _context41.next = 3;
  16384. break;
  16385. }
  16386. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  16387. case 3:
  16388. _context41.next = 5;
  16389. return this.scopedGlobalCache.initPromise;
  16390. case 5:
  16391. if (this.isLogin()) {
  16392. _context41.next = 7;
  16393. break;
  16394. }
  16395. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  16396. case 7:
  16397. case "end":
  16398. return _context41.stop();
  16399. }
  16400. }
  16401. }, _callee41, this);
  16402. }));
  16403. function prepare() {
  16404. return _prepare2.apply(this, arguments);
  16405. }
  16406. return prepare;
  16407. }()
  16408. }, {
  16409. key: "getUserEncryptKey",
  16410. value: function () {
  16411. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
  16412. var _this17 = this;
  16413. var e;
  16414. return _regenerator.default.wrap(function _callee42$(_context42) {
  16415. while (1) {
  16416. switch (_context42.prev = _context42.next) {
  16417. case 0:
  16418. if (!this.userEncryptKey) {
  16419. _context42.next = 2;
  16420. break;
  16421. }
  16422. return _context42.abrupt("return", this.userEncryptKey);
  16423. case 2:
  16424. if (!(On && On.expireTime)) {
  16425. _context42.next = 6;
  16426. break;
  16427. }
  16428. e = Date.now();
  16429. if (!(On.expireTime - e > 0)) {
  16430. _context42.next = 6;
  16431. break;
  16432. }
  16433. return _context42.abrupt("return", (this.userEncryptKey = On, this.userEncryptKey));
  16434. case 6:
  16435. return _context42.abrupt("return", new Promise(function (e, t) {
  16436. uni.getUserCryptoManager().getLatestUserKey({
  16437. success: function success(t) {
  16438. On = t, _this17.userEncryptKey = t, e(_this17.userEncryptKey);
  16439. },
  16440. fail: function fail(e) {
  16441. t(Tn(_objectSpread(_objectSpread({}, An), {}, {
  16442. cause: e
  16443. })));
  16444. }
  16445. });
  16446. }));
  16447. case 7:
  16448. case "end":
  16449. return _context42.stop();
  16450. }
  16451. }
  16452. }, _callee42, this);
  16453. }));
  16454. function getUserEncryptKey() {
  16455. return _getUserEncryptKey.apply(this, arguments);
  16456. }
  16457. return getUserEncryptKey;
  16458. }()
  16459. }, {
  16460. key: "getWxAppId",
  16461. value: function getWxAppId() {
  16462. return wx.getAccountInfoSync().miniProgram.appId;
  16463. }
  16464. }, {
  16465. key: "platformGetSignOption",
  16466. value: function () {
  16467. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43() {
  16468. var _yield$this$getUserEn, e, t, n;
  16469. return _regenerator.default.wrap(function _callee43$(_context43) {
  16470. while (1) {
  16471. switch (_context43.prev = _context43.next) {
  16472. case 0:
  16473. _context43.next = 2;
  16474. return this.getUserEncryptKey();
  16475. case 2:
  16476. _yield$this$getUserEn = _context43.sent;
  16477. e = _yield$this$getUserEn.encryptKey;
  16478. t = _yield$this$getUserEn.iv;
  16479. n = _yield$this$getUserEn.version;
  16480. return _context43.abrupt("return", {
  16481. verifyClientSign: Sn(JSON.stringify({
  16482. data: JSON.stringify({}),
  16483. appId: this.appId,
  16484. deviceId: this.deviceId,
  16485. wxAppId: this.getWxAppId(),
  16486. simulator: "devtools" === ae().platform,
  16487. timestamp: Date.now()
  16488. }), e, t),
  16489. encryptKeyId: n,
  16490. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  16491. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  16492. });
  16493. case 7:
  16494. case "end":
  16495. return _context43.stop();
  16496. }
  16497. }
  16498. }, _callee43, this);
  16499. }));
  16500. function platformGetSignOption() {
  16501. return _platformGetSignOption.apply(this, arguments);
  16502. }
  16503. return platformGetSignOption;
  16504. }()
  16505. }, {
  16506. key: "platformEncryptData",
  16507. value: function () {
  16508. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44(e) {
  16509. var _yield$this$getUserEn2, t, n, s, r;
  16510. return _regenerator.default.wrap(function _callee44$(_context44) {
  16511. while (1) {
  16512. switch (_context44.prev = _context44.next) {
  16513. case 0:
  16514. _context44.next = 2;
  16515. return this.getUserEncryptKey();
  16516. case 2:
  16517. _yield$this$getUserEn2 = _context44.sent;
  16518. t = _yield$this$getUserEn2.encryptKey;
  16519. n = _yield$this$getUserEn2.iv;
  16520. s = _yield$this$getUserEn2.version;
  16521. r = {
  16522. secretType: this.secretType,
  16523. encryptKeyId: s,
  16524. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  16525. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  16526. };
  16527. return _context44.abrupt("return", this.secretType === Ft ? {
  16528. content: e,
  16529. _uniCloudOptions: r
  16530. } : {
  16531. content: Sn(JSON.stringify({
  16532. data: JSON.stringify(e),
  16533. appId: this.appId,
  16534. deviceId: this.deviceId,
  16535. wxAppId: this.getWxAppId(),
  16536. simulator: "devtools" === ae().platform,
  16537. timestamp: Date.now()
  16538. }), t, n),
  16539. _uniCloudOptions: r
  16540. });
  16541. case 8:
  16542. case "end":
  16543. return _context44.stop();
  16544. }
  16545. }
  16546. }, _callee44, this);
  16547. }));
  16548. function platformEncryptData(_x36) {
  16549. return _platformEncryptData.apply(this, arguments);
  16550. }
  16551. return platformEncryptData;
  16552. }()
  16553. }, {
  16554. key: "platformDecryptResult",
  16555. value: function () {
  16556. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45(e) {
  16557. var t, _yield$this$getUserEn3, n, s;
  16558. return _regenerator.default.wrap(function _callee45$(_context45) {
  16559. while (1) {
  16560. switch (_context45.prev = _context45.next) {
  16561. case 0:
  16562. t = e.content;
  16563. _context45.next = 3;
  16564. return this.getUserEncryptKey();
  16565. case 3:
  16566. _yield$this$getUserEn3 = _context45.sent;
  16567. n = _yield$this$getUserEn3.encryptKey;
  16568. s = _yield$this$getUserEn3.iv;
  16569. return _context45.abrupt("return", JSON.parse(function (e, t, n) {
  16570. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  16571. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  16572. i = In.utils.utf8.toBytes(n),
  16573. o = new In.ModeOfOperation.cbc(r, i),
  16574. a = In.padding.pkcs7.strip(o.decrypt(s));
  16575. return In.utils.utf8.fromBytes(a);
  16576. }(t, n, s)));
  16577. case 7:
  16578. case "end":
  16579. return _context45.stop();
  16580. }
  16581. }
  16582. }, _callee45, this);
  16583. }));
  16584. function platformDecryptResult(_x37) {
  16585. return _platformDecryptResult.apply(this, arguments);
  16586. }
  16587. return platformDecryptResult;
  16588. }()
  16589. }, {
  16590. key: "isClientKeyNotFound",
  16591. value: function isClientKeyNotFound() {
  16592. return !1;
  16593. }
  16594. }]);
  16595. return En;
  16596. }(jt);
  16597. function Ln(e) {
  16598. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  16599. n = {};
  16600. var _loop = function _loop(_s10) {
  16601. var r = t[_s10];
  16602. n[r] = function () {
  16603. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  16604. t[_key] = arguments[_key];
  16605. }
  16606. return new Promise(function (n, s) {
  16607. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  16608. var _ref34 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16609. e = _ref34.type,
  16610. t = _ref34.data,
  16611. r = _ref34.errCode,
  16612. i = _ref34.errMsg,
  16613. o = _ref34.errSubject,
  16614. a = _ref34.message;
  16615. "success" === e ? n(t) : s(Tn({
  16616. errCode: r,
  16617. errMsg: Pn[r] || i || a,
  16618. errSubject: o
  16619. }));
  16620. }])) : s(Tn({
  16621. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  16622. }));
  16623. });
  16624. };
  16625. };
  16626. for (var _s10 = 0; _s10 < t.length; _s10++) {
  16627. _loop(_s10);
  16628. }
  16629. return n;
  16630. }
  16631. var Rn = /*#__PURE__*/function (_jt2) {
  16632. (0, _inherits2.default)(Rn, _jt2);
  16633. var _super10 = _createSuper(Rn);
  16634. function Rn(e) {
  16635. var _this18;
  16636. (0, _classCallCheck2.default)(this, Rn);
  16637. _this18 = _super10.call(this, e), _this18.clientType = "app", _this18.appUtils = _objectSpread({}, Ln(uni.requireNativePlugin("plus"))), _this18.systemInfo = Cn || (Cn = ae());
  16638. return _this18;
  16639. }
  16640. (0, _createClass2.default)(Rn, [{
  16641. key: "hasClientKey",
  16642. value: function () {
  16643. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  16644. return _regenerator.default.wrap(function _callee46$(_context46) {
  16645. while (1) {
  16646. switch (_context46.prev = _context46.next) {
  16647. case 0:
  16648. _context46.next = 2;
  16649. return this.appUtils.hasClientKey({
  16650. provider: this.provider,
  16651. spaceId: this.spaceId
  16652. });
  16653. case 2:
  16654. this._hasClientKey = _context46.sent;
  16655. return _context46.abrupt("return", this._hasClientKey);
  16656. case 4:
  16657. case "end":
  16658. return _context46.stop();
  16659. }
  16660. }
  16661. }, _callee46, this);
  16662. }));
  16663. function hasClientKey() {
  16664. return _hasClientKey.apply(this, arguments);
  16665. }
  16666. return hasClientKey;
  16667. }()
  16668. }, {
  16669. key: "getAppClientKey",
  16670. value: function () {
  16671. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  16672. var _yield$this$appUtils$, e, t, n, s, r;
  16673. return _regenerator.default.wrap(function _callee47$(_context47) {
  16674. while (1) {
  16675. switch (_context47.prev = _context47.next) {
  16676. case 0:
  16677. _context47.next = 2;
  16678. return this.appUtils.encryptGetClientKeyPayload({
  16679. data: JSON.stringify({})
  16680. });
  16681. case 2:
  16682. _yield$this$appUtils$ = _context47.sent;
  16683. e = _yield$this$appUtils$.data;
  16684. t = _yield$this$appUtils$.key;
  16685. _context47.next = 7;
  16686. return this.uniCloudIns.callFunction({
  16687. name: "DCloud-clientDB",
  16688. data: {
  16689. redirectTo: "encryption",
  16690. action: "getAppClientKey",
  16691. data: e,
  16692. key: t
  16693. }
  16694. });
  16695. case 7:
  16696. _context47.t0 = _context47.sent.result;
  16697. if (_context47.t0) {
  16698. _context47.next = 10;
  16699. break;
  16700. }
  16701. _context47.t0 = {};
  16702. case 10:
  16703. n = _context47.t0;
  16704. if (!(0 !== n.errCode)) {
  16705. _context47.next = 13;
  16706. break;
  16707. }
  16708. throw function (e) {
  16709. return new te({
  16710. subject: e.errSubject || "uni-secure-network",
  16711. code: e.errCode || e.code || bn.code,
  16712. message: e.errMsg || e.message
  16713. });
  16714. }(n);
  16715. case 13:
  16716. s = n.clientKey, r = n.key;
  16717. _context47.next = 16;
  16718. return this.appUtils.setClientKey({
  16719. provider: this.provider,
  16720. spaceId: this.spaceId,
  16721. clientKey: s,
  16722. key: r
  16723. });
  16724. case 16:
  16725. case "end":
  16726. return _context47.stop();
  16727. }
  16728. }
  16729. }, _callee47, this);
  16730. }));
  16731. function getAppClientKey() {
  16732. return _getAppClientKey.apply(this, arguments);
  16733. }
  16734. return getAppClientKey;
  16735. }()
  16736. }, {
  16737. key: "ensureClientKey",
  16738. value: function () {
  16739. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48() {
  16740. var _this19 = this;
  16741. var _ref35,
  16742. _ref35$forceUpdate,
  16743. e,
  16744. _args48 = arguments;
  16745. return _regenerator.default.wrap(function _callee48$(_context48) {
  16746. while (1) {
  16747. switch (_context48.prev = _context48.next) {
  16748. case 0:
  16749. _ref35 = _args48.length > 0 && _args48[0] !== undefined ? _args48[0] : {}, _ref35$forceUpdate = _ref35.forceUpdate, e = _ref35$forceUpdate === void 0 ? !1 : _ref35$forceUpdate;
  16750. _context48.t1 = !0;
  16751. _context48.next = 4;
  16752. return this.hasClientKey();
  16753. case 4:
  16754. _context48.t2 = _context48.sent;
  16755. _context48.t0 = _context48.t1 !== _context48.t2;
  16756. if (_context48.t0) {
  16757. _context48.next = 8;
  16758. break;
  16759. }
  16760. _context48.t0 = e;
  16761. case 8:
  16762. if (!_context48.t0) {
  16763. _context48.next = 10;
  16764. break;
  16765. }
  16766. return _context48.abrupt("return", (e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus === h || !e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus !== p || (this.scopedGlobalCache.initPromise = this.getAppClientKey(), this.scopedGlobalCache.initPromise.then(function (e) {
  16767. _this19.scopedGlobalCache.initStatus = d;
  16768. }).catch(function (e) {
  16769. throw _this19.scopedGlobalCache.initStatus = p, e;
  16770. }), this.scopedGlobalCache.initStatus = h), this.scopedGlobalCache.initPromise));
  16771. case 10:
  16772. case "end":
  16773. return _context48.stop();
  16774. }
  16775. }
  16776. }, _callee48, this);
  16777. }));
  16778. function ensureClientKey() {
  16779. return _ensureClientKey.apply(this, arguments);
  16780. }
  16781. return ensureClientKey;
  16782. }()
  16783. }, {
  16784. key: "prepare",
  16785. value: function () {
  16786. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49() {
  16787. var _ref36,
  16788. _ref36$forceUpdate,
  16789. e,
  16790. _args49 = arguments;
  16791. return _regenerator.default.wrap(function _callee49$(_context49) {
  16792. while (1) {
  16793. switch (_context49.prev = _context49.next) {
  16794. case 0:
  16795. _ref36 = _args49.length > 0 && _args49[0] !== undefined ? _args49[0] : {}, _ref36$forceUpdate = _ref36.forceUpdate, e = _ref36$forceUpdate === void 0 ? !1 : _ref36$forceUpdate;
  16796. _context49.next = 3;
  16797. return this.ensureClientKey({
  16798. forceUpdate: e
  16799. });
  16800. case 3:
  16801. case "end":
  16802. return _context49.stop();
  16803. }
  16804. }
  16805. }, _callee49, this);
  16806. }));
  16807. function prepare() {
  16808. return _prepare3.apply(this, arguments);
  16809. }
  16810. return prepare;
  16811. }()
  16812. }, {
  16813. key: "platformGetSignOption",
  16814. value: function () {
  16815. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50() {
  16816. var _yield$this$appUtils$2, e, t;
  16817. return _regenerator.default.wrap(function _callee50$(_context50) {
  16818. while (1) {
  16819. switch (_context50.prev = _context50.next) {
  16820. case 0:
  16821. _context50.next = 2;
  16822. return this.appUtils.encrypt({
  16823. provider: this.provider,
  16824. spaceId: this.spaceId,
  16825. data: JSON.stringify({})
  16826. });
  16827. case 2:
  16828. _yield$this$appUtils$2 = _context50.sent;
  16829. e = _yield$this$appUtils$2.data;
  16830. t = _yield$this$appUtils$2.key;
  16831. return _context50.abrupt("return", {
  16832. verifyClientSign: e,
  16833. encryptKeyId: t
  16834. });
  16835. case 6:
  16836. case "end":
  16837. return _context50.stop();
  16838. }
  16839. }
  16840. }, _callee50, this);
  16841. }));
  16842. function platformGetSignOption() {
  16843. return _platformGetSignOption2.apply(this, arguments);
  16844. }
  16845. return platformGetSignOption;
  16846. }()
  16847. }, {
  16848. key: "platformEncryptData",
  16849. value: function () {
  16850. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51(e) {
  16851. var _yield$this$appUtils$3, t, n, s;
  16852. return _regenerator.default.wrap(function _callee51$(_context51) {
  16853. while (1) {
  16854. switch (_context51.prev = _context51.next) {
  16855. case 0:
  16856. _context51.next = 2;
  16857. return this.appUtils.encrypt({
  16858. provider: this.provider,
  16859. spaceId: this.spaceId,
  16860. data: JSON.stringify(e)
  16861. });
  16862. case 2:
  16863. _yield$this$appUtils$3 = _context51.sent;
  16864. t = _yield$this$appUtils$3.data;
  16865. n = _yield$this$appUtils$3.key;
  16866. s = {
  16867. secretType: this.secretType,
  16868. encryptKeyId: n
  16869. };
  16870. return _context51.abrupt("return", this.secretType === Ft ? {
  16871. content: e,
  16872. _uniCloudOptions: s
  16873. } : {
  16874. content: t,
  16875. _uniCloudOptions: s
  16876. });
  16877. case 7:
  16878. case "end":
  16879. return _context51.stop();
  16880. }
  16881. }
  16882. }, _callee51, this);
  16883. }));
  16884. function platformEncryptData(_x38) {
  16885. return _platformEncryptData2.apply(this, arguments);
  16886. }
  16887. return platformEncryptData;
  16888. }()
  16889. }, {
  16890. key: "platformDecryptResult",
  16891. value: function () {
  16892. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52(e) {
  16893. var t, _e$_uniCloudOptions, n, s, r;
  16894. return _regenerator.default.wrap(function _callee52$(_context52) {
  16895. while (1) {
  16896. switch (_context52.prev = _context52.next) {
  16897. case 0:
  16898. t = e.content;
  16899. _e$_uniCloudOptions = e._uniCloudOptions;
  16900. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  16901. s = n.encryptKeyId;
  16902. _context52.next = 6;
  16903. return this.appUtils.decrypt({
  16904. provider: this.provider,
  16905. spaceId: this.spaceId,
  16906. data: t,
  16907. key: s
  16908. });
  16909. case 6:
  16910. r = _context52.sent;
  16911. return _context52.abrupt("return", JSON.parse(r.data));
  16912. case 8:
  16913. case "end":
  16914. return _context52.stop();
  16915. }
  16916. }
  16917. }, _callee52, this);
  16918. }));
  16919. function platformDecryptResult(_x39) {
  16920. return _platformDecryptResult2.apply(this, arguments);
  16921. }
  16922. return platformDecryptResult;
  16923. }()
  16924. }, {
  16925. key: "isClientKeyNotFound",
  16926. value: function isClientKeyNotFound() {
  16927. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  16928. var t = e.result || {};
  16929. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  16930. }
  16931. }]);
  16932. return Rn;
  16933. }(jt);
  16934. function Un() {
  16935. var _ref37 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16936. e = _ref37.secretType;
  16937. return e === qt || e === Ft || e === Kt;
  16938. }
  16939. function Nn() {
  16940. var _ref38 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16941. e = _ref38.name,
  16942. _ref38$data = _ref38.data,
  16943. t = _ref38$data === void 0 ? {} : _ref38$data;
  16944. return "app" === P && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  16945. }
  16946. function Dn() {
  16947. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16948. e = _ref39.provider,
  16949. t = _ref39.spaceId,
  16950. n = _ref39.functionName;
  16951. var _ae = ae(),
  16952. s = _ae.appId,
  16953. r = _ae.uniPlatform,
  16954. i = _ae.osName;
  16955. var o = r;
  16956. "app" === r && (o = i);
  16957. var a = function () {
  16958. var _ref40 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16959. e = _ref40.provider,
  16960. t = _ref40.spaceId;
  16961. var n = A;
  16962. if (!n) return {};
  16963. e = function (e) {
  16964. return "tencent" === e ? "tcb" : e;
  16965. }(e);
  16966. var s = n.find(function (n) {
  16967. return n.provider === e && n.spaceId === t;
  16968. });
  16969. return s && s.config;
  16970. }({
  16971. provider: e,
  16972. spaceId: t
  16973. });
  16974. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  16975. var c = a.accessControl.function || {},
  16976. u = Object.keys(c);
  16977. if (0 === u.length) return !0;
  16978. var l = function (e, t) {
  16979. var n, s, r;
  16980. for (var _i2 = 0; _i2 < e.length; _i2++) {
  16981. var _o2 = e[_i2];
  16982. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  16983. return e.trim();
  16984. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  16985. }
  16986. return n || s || r;
  16987. }(u, n);
  16988. if (!l) return !1;
  16989. if ((c[l] || []).find(function () {
  16990. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  16991. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  16992. })) return !0;
  16993. 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")), Tn(kn);
  16994. }
  16995. function Mn(_ref41) {
  16996. var e = _ref41.functionName,
  16997. t = _ref41.result,
  16998. n = _ref41.logPvd;
  16999. if (S && this.__dev__.debugLog && t && t.requestId) {
  17000. var _s11 = JSON.stringify({
  17001. spaceId: this.config.spaceId,
  17002. functionName: e,
  17003. requestId: t.requestId
  17004. });
  17005. console.log("[".concat(n, "-request]").concat(_s11, "[/").concat(n, "-request]"));
  17006. }
  17007. }
  17008. function qn(e) {
  17009. var t = e.callFunction,
  17010. n = function n(_n7) {
  17011. var _this20 = this;
  17012. var s = _n7.name;
  17013. _n7.data = Et.call(e, {
  17014. data: _n7.data
  17015. });
  17016. var r = {
  17017. aliyun: "aliyun",
  17018. tencent: "tcb",
  17019. tcb: "tcb",
  17020. alipay: "alipay"
  17021. }[this.config.provider],
  17022. i = Un(_n7),
  17023. o = Nn(_n7),
  17024. a = i || o;
  17025. return t.call(this, _n7).then(function (e) {
  17026. return e.errCode = 0, !a && Mn.call(_this20, {
  17027. functionName: s,
  17028. result: e,
  17029. logPvd: r
  17030. }), Promise.resolve(e);
  17031. }, function (e) {
  17032. return !a && Mn.call(_this20, {
  17033. functionName: s,
  17034. result: e,
  17035. logPvd: r
  17036. }), e && e.message && (e.message = function () {
  17037. var _ref42 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17038. _ref42$message = _ref42.message,
  17039. e = _ref42$message === void 0 ? "" : _ref42$message,
  17040. _ref42$extraInfo = _ref42.extraInfo,
  17041. t = _ref42$extraInfo === void 0 ? {} : _ref42$extraInfo,
  17042. _ref42$formatter = _ref42.formatter,
  17043. n = _ref42$formatter === void 0 ? [] : _ref42$formatter;
  17044. for (var _s12 = 0; _s12 < n.length; _s12++) {
  17045. var _n$_s = n[_s12],
  17046. _r4 = _n$_s.rule,
  17047. _i3 = _n$_s.content,
  17048. _o3 = _n$_s.mode,
  17049. _a = e.match(_r4);
  17050. if (!_a) continue;
  17051. var _c = _i3;
  17052. for (var _e19 = 1; _e19 < _a.length; _e19++) {
  17053. _c = Dt(_c, "{$".concat(_e19, "}"), _a[_e19]);
  17054. }
  17055. for (var _e20 in t) {
  17056. _c = Dt(_c, "{".concat(_e20, "}"), t[_e20]);
  17057. }
  17058. return "replace" === _o3 ? _c : e + _c;
  17059. }
  17060. return e;
  17061. }({
  17062. message: "[".concat(_n7.name, "]: ").concat(e.message),
  17063. formatter: Rt,
  17064. extraInfo: {
  17065. functionName: s
  17066. }
  17067. })), Promise.reject(e);
  17068. });
  17069. };
  17070. e.callFunction = function (t) {
  17071. var _e$config = e.config,
  17072. s = _e$config.provider,
  17073. r = _e$config.spaceId,
  17074. i = t.name;
  17075. var o, a;
  17076. if (t.data = t.data || {}, S && e.__dev__.debugInfo && !e.__dev__.debugInfo.forceRemote && C ? (e._callCloudFunction || (e._callCloudFunction = n, e._callLocalFunction = Lt), o = Lt) : o = n, o = o.bind(e), Nn(t)) a = n.call(e, t);else if (function (_ref43) {
  17077. var e = _ref43.name,
  17078. _ref43$data = _ref43.data,
  17079. t = _ref43$data === void 0 ? {} : _ref43$data;
  17080. return "mp-weixin" === P && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  17081. }(t)) a = o.call(e, t);else if (Un(t)) {
  17082. a = new xn({
  17083. secretType: t.secretType,
  17084. uniCloudIns: e
  17085. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  17086. } else if (Dn({
  17087. provider: s,
  17088. spaceId: r,
  17089. functionName: i
  17090. })) {
  17091. a = new xn({
  17092. secretType: t.secretType,
  17093. uniCloudIns: e
  17094. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  17095. } else a = o(t);
  17096. return Object.defineProperty(a, "result", {
  17097. get: function get() {
  17098. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  17099. }
  17100. }), a;
  17101. };
  17102. }
  17103. xn = "mp-weixin" !== P && "app" !== P ? /*#__PURE__*/function () {
  17104. function _class2() {
  17105. (0, _classCallCheck2.default)(this, _class2);
  17106. throw Tn({
  17107. message: "Platform ".concat(P, " is not supported by secure network")
  17108. });
  17109. }
  17110. return (0, _createClass2.default)(_class2);
  17111. }() : k ? "mp-weixin" === P ? En : Rn : /*#__PURE__*/function () {
  17112. function _class3() {
  17113. (0, _classCallCheck2.default)(this, _class3);
  17114. throw Tn({
  17115. message: "Platform ".concat(P, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  17116. });
  17117. }
  17118. return (0, _createClass2.default)(_class3);
  17119. }();
  17120. var Fn = Symbol("CLIENT_DB_INTERNAL");
  17121. function Kn(e, t) {
  17122. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Fn, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  17123. get: function get(e, n, s) {
  17124. if ("_uniClient" === n) return null;
  17125. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  17126. if (n in e || "string" != typeof n) {
  17127. var _t13 = e[n];
  17128. return "function" == typeof _t13 ? _t13.bind(e) : _t13;
  17129. }
  17130. return t.get(e, n, s);
  17131. }
  17132. });
  17133. }
  17134. function jn(e) {
  17135. return {
  17136. on: function on(t, n) {
  17137. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  17138. },
  17139. off: function off(t, n) {
  17140. e[t] = e[t] || [];
  17141. var s = e[t].indexOf(n);
  17142. -1 !== s && e[t].splice(s, 1);
  17143. }
  17144. };
  17145. }
  17146. var Bn = ["db.Geo", "db.command", "command.aggregate"];
  17147. function $n(e, t) {
  17148. return Bn.indexOf("".concat(e, ".").concat(t)) > -1;
  17149. }
  17150. function Wn(e) {
  17151. switch (f(e)) {
  17152. case "array":
  17153. return e.map(function (e) {
  17154. return Wn(e);
  17155. });
  17156. case "object":
  17157. return e._internalType === Fn || Object.keys(e).forEach(function (t) {
  17158. e[t] = Wn(e[t]);
  17159. }), e;
  17160. case "regexp":
  17161. return {
  17162. $regexp: {
  17163. source: e.source,
  17164. flags: e.flags
  17165. }
  17166. };
  17167. case "date":
  17168. return {
  17169. $date: e.toISOString()
  17170. };
  17171. default:
  17172. return e;
  17173. }
  17174. }
  17175. function Hn(e) {
  17176. return e && e.content && e.content.$method;
  17177. }
  17178. var zn = /*#__PURE__*/function () {
  17179. function zn(e, t, n) {
  17180. (0, _classCallCheck2.default)(this, zn);
  17181. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  17182. }
  17183. (0, _createClass2.default)(zn, [{
  17184. key: "toJSON",
  17185. value: function toJSON() {
  17186. var e = this;
  17187. var t = [e.content];
  17188. for (; e.prevStage;) {
  17189. e = e.prevStage, t.push(e.content);
  17190. }
  17191. return {
  17192. $db: t.reverse().map(function (e) {
  17193. return {
  17194. $method: e.$method,
  17195. $param: Wn(e.$param)
  17196. };
  17197. })
  17198. };
  17199. }
  17200. }, {
  17201. key: "toString",
  17202. value: function toString() {
  17203. return JSON.stringify(this.toJSON());
  17204. }
  17205. }, {
  17206. key: "getAction",
  17207. value: function getAction() {
  17208. var e = this.toJSON().$db.find(function (e) {
  17209. return "action" === e.$method;
  17210. });
  17211. return e && e.$param && e.$param[0];
  17212. }
  17213. }, {
  17214. key: "getCommand",
  17215. value: function getCommand() {
  17216. return {
  17217. $db: this.toJSON().$db.filter(function (e) {
  17218. return "action" !== e.$method;
  17219. })
  17220. };
  17221. }
  17222. }, {
  17223. key: "isAggregate",
  17224. get: function get() {
  17225. var e = this;
  17226. for (; e;) {
  17227. var t = Hn(e),
  17228. _n8 = Hn(e.prevStage);
  17229. if ("aggregate" === t && "collection" === _n8 || "pipeline" === t) return !0;
  17230. e = e.prevStage;
  17231. }
  17232. return !1;
  17233. }
  17234. }, {
  17235. key: "isCommand",
  17236. get: function get() {
  17237. var e = this;
  17238. for (; e;) {
  17239. if ("command" === Hn(e)) return !0;
  17240. e = e.prevStage;
  17241. }
  17242. return !1;
  17243. }
  17244. }, {
  17245. key: "isAggregateCommand",
  17246. get: function get() {
  17247. var e = this;
  17248. for (; e;) {
  17249. var t = Hn(e),
  17250. _n9 = Hn(e.prevStage);
  17251. if ("aggregate" === t && "command" === _n9) return !0;
  17252. e = e.prevStage;
  17253. }
  17254. return !1;
  17255. }
  17256. }, {
  17257. key: "getNextStageFn",
  17258. value: function getNextStageFn(e) {
  17259. var t = this;
  17260. return function () {
  17261. return Jn({
  17262. $method: e,
  17263. $param: Wn(Array.from(arguments))
  17264. }, t, t._database);
  17265. };
  17266. }
  17267. }, {
  17268. key: "count",
  17269. get: function get() {
  17270. return this.isAggregate ? this.getNextStageFn("count") : function () {
  17271. return this._send("count", Array.from(arguments));
  17272. };
  17273. }
  17274. }, {
  17275. key: "remove",
  17276. get: function get() {
  17277. return this.isCommand ? this.getNextStageFn("remove") : function () {
  17278. return this._send("remove", Array.from(arguments));
  17279. };
  17280. }
  17281. }, {
  17282. key: "get",
  17283. value: function get() {
  17284. return this._send("get", Array.from(arguments));
  17285. }
  17286. }, {
  17287. key: "add",
  17288. get: function get() {
  17289. return this.isCommand ? this.getNextStageFn("add") : function () {
  17290. return this._send("add", Array.from(arguments));
  17291. };
  17292. }
  17293. }, {
  17294. key: "update",
  17295. value: function update() {
  17296. return this._send("update", Array.from(arguments));
  17297. }
  17298. }, {
  17299. key: "end",
  17300. value: function end() {
  17301. return this._send("end", Array.from(arguments));
  17302. }
  17303. }, {
  17304. key: "set",
  17305. get: function get() {
  17306. return this.isCommand ? this.getNextStageFn("set") : function () {
  17307. throw new Error("JQL禁止使用set方法");
  17308. };
  17309. }
  17310. }, {
  17311. key: "_send",
  17312. value: function _send(e, t) {
  17313. var n = this.getAction(),
  17314. s = this.getCommand();
  17315. if (s.$db.push({
  17316. $method: e,
  17317. $param: Wn(t)
  17318. }), S) {
  17319. var _e21 = s.$db.find(function (e) {
  17320. return "collection" === e.$method;
  17321. }),
  17322. _t14 = _e21 && _e21.$param;
  17323. _t14 && 1 === _t14.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- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  17324. }
  17325. return this._database._callCloudFunction({
  17326. action: n,
  17327. command: s
  17328. });
  17329. }
  17330. }]);
  17331. return zn;
  17332. }();
  17333. function Jn(e, t, n) {
  17334. return Kn(new zn(e, t, n), {
  17335. get: function get(e, t) {
  17336. var s = "db";
  17337. return e && e.content && (s = e.content.$method), $n(s, t) ? Jn({
  17338. $method: t
  17339. }, e, n) : function () {
  17340. return Jn({
  17341. $method: t,
  17342. $param: Wn(Array.from(arguments))
  17343. }, e, n);
  17344. };
  17345. }
  17346. });
  17347. }
  17348. function Vn(_ref44) {
  17349. var e = _ref44.path,
  17350. t = _ref44.method;
  17351. return /*#__PURE__*/function () {
  17352. function _class4() {
  17353. (0, _classCallCheck2.default)(this, _class4);
  17354. this.param = Array.from(arguments);
  17355. }
  17356. (0, _createClass2.default)(_class4, [{
  17357. key: "toJSON",
  17358. value: function toJSON() {
  17359. return {
  17360. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  17361. return {
  17362. $method: e
  17363. };
  17364. })), [{
  17365. $method: t,
  17366. $param: this.param
  17367. }])
  17368. };
  17369. }
  17370. }, {
  17371. key: "toString",
  17372. value: function toString() {
  17373. return JSON.stringify(this.toJSON());
  17374. }
  17375. }]);
  17376. return _class4;
  17377. }();
  17378. }
  17379. function Gn(e) {
  17380. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17381. return Kn(new e(t), {
  17382. get: function get(e, t) {
  17383. return $n("db", t) ? Jn({
  17384. $method: t
  17385. }, null, e) : function () {
  17386. return Jn({
  17387. $method: t,
  17388. $param: Wn(Array.from(arguments))
  17389. }, null, e);
  17390. };
  17391. }
  17392. });
  17393. }
  17394. var Yn = /*#__PURE__*/function (_ref45) {
  17395. (0, _inherits2.default)(Yn, _ref45);
  17396. var _super11 = _createSuper(Yn);
  17397. function Yn() {
  17398. (0, _classCallCheck2.default)(this, Yn);
  17399. return _super11.apply(this, arguments);
  17400. }
  17401. (0, _createClass2.default)(Yn, [{
  17402. key: "_parseResult",
  17403. value: function _parseResult(e) {
  17404. return this._isJQL ? e.result : e;
  17405. }
  17406. }, {
  17407. key: "_callCloudFunction",
  17408. value: function _callCloudFunction(_ref46) {
  17409. var _this21 = this;
  17410. var e = _ref46.action,
  17411. t = _ref46.command,
  17412. n = _ref46.multiCommand,
  17413. s = _ref46.queryList;
  17414. function r(e, t) {
  17415. if (n && s) for (var _n10 = 0; _n10 < s.length; _n10++) {
  17416. var _r5 = s[_n10];
  17417. _r5.udb && "function" == typeof _r5.udb.setResult && (t ? _r5.udb.setResult(t) : _r5.udb.setResult(e.result.dataList[_n10]));
  17418. }
  17419. }
  17420. var i = this,
  17421. o = this._isJQL ? "databaseForJQL" : "database";
  17422. function a(e) {
  17423. return i._callback("error", [e]), M(q(o, "fail"), e).then(function () {
  17424. return M(q(o, "complete"), e);
  17425. }).then(function () {
  17426. return r(null, e), Y(j, {
  17427. type: W,
  17428. content: e
  17429. }), Promise.reject(e);
  17430. });
  17431. }
  17432. var c = M(q(o, "invoke")),
  17433. u = this._uniClient;
  17434. return c.then(function () {
  17435. return u.callFunction({
  17436. name: "DCloud-clientDB",
  17437. type: l,
  17438. data: {
  17439. action: e,
  17440. command: t,
  17441. multiCommand: n
  17442. }
  17443. });
  17444. }).then(function (e) {
  17445. var _e$result = e.result,
  17446. t = _e$result.code,
  17447. n = _e$result.message,
  17448. s = _e$result.token,
  17449. c = _e$result.tokenExpired,
  17450. _e$result$systemInfo = _e$result.systemInfo,
  17451. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  17452. if (u) for (var _e22 = 0; _e22 < u.length; _e22++) {
  17453. var _u$_e = u[_e22],
  17454. _t15 = _u$_e.level,
  17455. _n11 = _u$_e.message,
  17456. _s13 = _u$_e.detail,
  17457. _r6 = console["app" === P && "warn" === _t15 ? "error" : _t15] || console.log;
  17458. var _i4 = "[System Info]" + _n11;
  17459. _s13 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s13)), _r6(_i4);
  17460. }
  17461. if (t) {
  17462. return a(new te({
  17463. code: t,
  17464. message: n,
  17465. requestId: e.requestId
  17466. }));
  17467. }
  17468. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (re({
  17469. token: s,
  17470. tokenExpired: c
  17471. }), _this21._callbackAuth("refreshToken", [{
  17472. token: s,
  17473. tokenExpired: c
  17474. }]), _this21._callback("refreshToken", [{
  17475. token: s,
  17476. tokenExpired: c
  17477. }]), Y($, {
  17478. token: s,
  17479. tokenExpired: c
  17480. }));
  17481. var l = [{
  17482. prop: "affectedDocs",
  17483. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  17484. }, {
  17485. prop: "code",
  17486. tips: "code不再推荐使用,请使用errCode替代"
  17487. }, {
  17488. prop: "message",
  17489. tips: "message不再推荐使用,请使用errMsg替代"
  17490. }];
  17491. var _loop2 = function _loop2(_t16) {
  17492. var _l$_t = l[_t16],
  17493. n = _l$_t.prop,
  17494. s = _l$_t.tips;
  17495. if (n in e.result) {
  17496. var _t17 = e.result[n];
  17497. Object.defineProperty(e.result, n, {
  17498. get: function get() {
  17499. return console.warn(s), _t17;
  17500. }
  17501. });
  17502. }
  17503. };
  17504. for (var _t16 = 0; _t16 < l.length; _t16++) {
  17505. _loop2(_t16);
  17506. }
  17507. return function (e) {
  17508. return M(q(o, "success"), e).then(function () {
  17509. return M(q(o, "complete"), e);
  17510. }).then(function () {
  17511. r(e, null);
  17512. var t = i._parseResult(e);
  17513. return Y(j, {
  17514. type: W,
  17515. content: t
  17516. }), Promise.resolve(t);
  17517. });
  17518. }(e);
  17519. }, function (e) {
  17520. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  17521. return a(new te({
  17522. code: e.code || "SYSTEM_ERROR",
  17523. message: e.message,
  17524. requestId: e.requestId
  17525. }));
  17526. });
  17527. }
  17528. }]);
  17529. return Yn;
  17530. }( /*#__PURE__*/function () {
  17531. function _class5() {
  17532. var _ref47 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17533. _ref47$uniClient = _ref47.uniClient,
  17534. e = _ref47$uniClient === void 0 ? {} : _ref47$uniClient,
  17535. _ref47$isJQL = _ref47.isJQL,
  17536. t = _ref47$isJQL === void 0 ? !1 : _ref47$isJQL;
  17537. (0, _classCallCheck2.default)(this, _class5);
  17538. this._uniClient = e, this._authCallBacks = {}, this._dbCallBacks = {}, e._isDefault && (this._dbCallBacks = L("_globalUniCloudDatabaseCallback")), t || (this.auth = jn(this._authCallBacks)), this._isJQL = t, Object.assign(this, jn(this._dbCallBacks)), this.env = Kn({}, {
  17539. get: function get(e, t) {
  17540. return {
  17541. $env: t
  17542. };
  17543. }
  17544. }), this.Geo = Kn({}, {
  17545. get: function get(e, t) {
  17546. return Vn({
  17547. path: ["Geo"],
  17548. method: t
  17549. });
  17550. }
  17551. }), this.serverDate = Vn({
  17552. path: [],
  17553. method: "serverDate"
  17554. }), this.RegExp = Vn({
  17555. path: [],
  17556. method: "RegExp"
  17557. });
  17558. }
  17559. (0, _createClass2.default)(_class5, [{
  17560. key: "getCloudEnv",
  17561. value: function getCloudEnv(e) {
  17562. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  17563. return {
  17564. $env: e.replace("$cloudEnv_", "")
  17565. };
  17566. }
  17567. }, {
  17568. key: "_callback",
  17569. value: function _callback(e, t) {
  17570. var n = this._dbCallBacks;
  17571. n[e] && n[e].forEach(function (e) {
  17572. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  17573. });
  17574. }
  17575. }, {
  17576. key: "_callbackAuth",
  17577. value: function _callbackAuth(e, t) {
  17578. var n = this._authCallBacks;
  17579. n[e] && n[e].forEach(function (e) {
  17580. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  17581. });
  17582. }
  17583. }, {
  17584. key: "multiSend",
  17585. value: function multiSend() {
  17586. var e = Array.from(arguments),
  17587. t = e.map(function (e) {
  17588. var t = e.getAction(),
  17589. n = e.getCommand();
  17590. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  17591. return {
  17592. action: t,
  17593. command: n
  17594. };
  17595. });
  17596. return this._callCloudFunction({
  17597. multiCommand: t,
  17598. queryList: e
  17599. });
  17600. }
  17601. }]);
  17602. return _class5;
  17603. }());
  17604. var Qn = "token无效,跳转登录页面",
  17605. Xn = "token过期,跳转登录页面",
  17606. Zn = {
  17607. TOKEN_INVALID_TOKEN_EXPIRED: Xn,
  17608. TOKEN_INVALID_INVALID_CLIENTID: Qn,
  17609. TOKEN_INVALID: Qn,
  17610. TOKEN_INVALID_WRONG_TOKEN: Qn,
  17611. TOKEN_INVALID_ANONYMOUS_USER: Qn
  17612. },
  17613. es = {
  17614. "uni-id-token-expired": Xn,
  17615. "uni-id-check-token-failed": Qn,
  17616. "uni-id-token-not-exist": Qn,
  17617. "uni-id-check-device-feature-failed": Qn
  17618. };
  17619. function ts(e, t) {
  17620. var n = "";
  17621. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  17622. }
  17623. function ns() {
  17624. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  17625. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  17626. var n = [],
  17627. s = [];
  17628. return e.forEach(function (e) {
  17629. !0 === e.needLogin ? n.push(ts(t, e.path)) : !1 === e.needLogin && s.push(ts(t, e.path));
  17630. }), {
  17631. needLoginPage: n,
  17632. notNeedLoginPage: s
  17633. };
  17634. }
  17635. function ss(e) {
  17636. return e.split("?")[0].replace(/^\//, "");
  17637. }
  17638. function rs() {
  17639. return function (e) {
  17640. var t = e && e.$page && e.$page.fullPath || "";
  17641. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  17642. }(function () {
  17643. var e = getCurrentPages();
  17644. return e[e.length - 1];
  17645. }());
  17646. }
  17647. function is() {
  17648. return ss(rs());
  17649. }
  17650. function os() {
  17651. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  17652. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17653. if (!e) return !1;
  17654. if (!(t && t.list && t.list.length)) return !1;
  17655. var n = t.list,
  17656. s = ss(e);
  17657. return n.some(function (e) {
  17658. return e.pagePath === s;
  17659. });
  17660. }
  17661. var as = !!_pages.default.uniIdRouter;
  17662. var _ref48 = function () {
  17663. var _ref29 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  17664. _ref29$pages = _ref29.pages,
  17665. t = _ref29$pages === void 0 ? [] : _ref29$pages,
  17666. _ref29$subPackages = _ref29.subPackages,
  17667. n = _ref29$subPackages === void 0 ? [] : _ref29$subPackages,
  17668. _ref29$uniIdRouter = _ref29.uniIdRouter,
  17669. s = _ref29$uniIdRouter === void 0 ? {} : _ref29$uniIdRouter,
  17670. _ref29$tabBar = _ref29.tabBar,
  17671. r = _ref29$tabBar === void 0 ? {} : _ref29$tabBar;
  17672. var i = s.loginPage,
  17673. _s$needLogin = s.needLogin,
  17674. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  17675. _s$resToLogin = s.resToLogin,
  17676. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  17677. _ns = ns(t),
  17678. c = _ns.needLoginPage,
  17679. u = _ns.notNeedLoginPage,
  17680. _ref31 = function () {
  17681. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  17682. var t = [],
  17683. n = [];
  17684. return e.forEach(function (e) {
  17685. var s = e.root,
  17686. _e$pages = e.pages,
  17687. r = _e$pages === void 0 ? [] : _e$pages,
  17688. _ns2 = ns(r, s),
  17689. i = _ns2.needLoginPage,
  17690. o = _ns2.notNeedLoginPage;
  17691. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  17692. }), {
  17693. needLoginPage: t,
  17694. notNeedLoginPage: n
  17695. };
  17696. }(n),
  17697. l = _ref31.needLoginPage,
  17698. h = _ref31.notNeedLoginPage;
  17699. return {
  17700. loginPage: i,
  17701. routerNeedLogin: o,
  17702. resToLogin: a,
  17703. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(l)),
  17704. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(h)),
  17705. loginPageInTabBar: os(i, r)
  17706. };
  17707. }(),
  17708. cs = _ref48.loginPage,
  17709. us = _ref48.routerNeedLogin,
  17710. ls = _ref48.resToLogin,
  17711. hs = _ref48.needLoginPage,
  17712. ds = _ref48.notNeedLoginPage,
  17713. ps = _ref48.loginPageInTabBar;
  17714. if (hs.indexOf(cs) > -1) throw new Error("Login page [".concat(cs, "] should not be \"needLogin\", please check your pages.json"));
  17715. function fs(e) {
  17716. var t = is();
  17717. if ("/" === e.charAt(0)) return e;
  17718. var _e$split = e.split("?"),
  17719. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  17720. n = _e$split2[0],
  17721. s = _e$split2[1],
  17722. r = n.replace(/^\//, "").split("/"),
  17723. i = t.split("/");
  17724. i.pop();
  17725. for (var _e23 = 0; _e23 < r.length; _e23++) {
  17726. var _t18 = r[_e23];
  17727. ".." === _t18 ? i.pop() : "." !== _t18 && i.push(_t18);
  17728. }
  17729. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  17730. }
  17731. function gs(e) {
  17732. var t = ss(fs(e));
  17733. return !(ds.indexOf(t) > -1) && (hs.indexOf(t) > -1 || us.some(function (t) {
  17734. return function (e, t) {
  17735. return new RegExp(t).test(e);
  17736. }(e, t);
  17737. }));
  17738. }
  17739. function ms(_ref49) {
  17740. var e = _ref49.redirect;
  17741. var t = ss(e),
  17742. n = ss(cs);
  17743. return is() !== n && t !== n;
  17744. }
  17745. function ys() {
  17746. var _ref50 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17747. e = _ref50.api,
  17748. t = _ref50.redirect;
  17749. if (!t || !ms({
  17750. redirect: t
  17751. })) return;
  17752. var n = function (e, t) {
  17753. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  17754. }(cs, t);
  17755. ps ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  17756. var s = {
  17757. navigateTo: uni.navigateTo,
  17758. redirectTo: uni.redirectTo,
  17759. switchTab: uni.switchTab,
  17760. reLaunch: uni.reLaunch
  17761. };
  17762. setTimeout(function () {
  17763. s[e]({
  17764. url: n
  17765. });
  17766. });
  17767. }
  17768. function _s() {
  17769. var _ref51 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17770. e = _ref51.url;
  17771. var t = {
  17772. abortLoginPageJump: !1,
  17773. autoToLoginPage: !1
  17774. },
  17775. n = function () {
  17776. var _se3 = se(),
  17777. e = _se3.token,
  17778. t = _se3.tokenExpired;
  17779. var n;
  17780. if (e) {
  17781. if (t < Date.now()) {
  17782. var _e24 = "uni-id-token-expired";
  17783. n = {
  17784. errCode: _e24,
  17785. errMsg: es[_e24]
  17786. };
  17787. }
  17788. } else {
  17789. var _e25 = "uni-id-check-token-failed";
  17790. n = {
  17791. errCode: _e25,
  17792. errMsg: es[_e25]
  17793. };
  17794. }
  17795. return n;
  17796. }();
  17797. if (gs(e) && n) {
  17798. n.uniIdRedirectUrl = e;
  17799. if (J(B).length > 0) return setTimeout(function () {
  17800. Y(B, n);
  17801. }, 0), t.abortLoginPageJump = !0, t;
  17802. t.autoToLoginPage = !0;
  17803. }
  17804. return t;
  17805. }
  17806. function ws() {
  17807. !function () {
  17808. var e = rs(),
  17809. _s14 = _s({
  17810. url: e
  17811. }),
  17812. t = _s14.abortLoginPageJump,
  17813. n = _s14.autoToLoginPage;
  17814. t || n && ys({
  17815. api: "redirectTo",
  17816. redirect: e
  17817. });
  17818. }();
  17819. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  17820. var _loop3 = function _loop3(_t19) {
  17821. var n = e[_t19];
  17822. uni.addInterceptor(n, {
  17823. invoke: function invoke(e) {
  17824. var _s15 = _s({
  17825. url: e.url
  17826. }),
  17827. t = _s15.abortLoginPageJump,
  17828. s = _s15.autoToLoginPage;
  17829. return t ? e : s ? (ys({
  17830. api: n,
  17831. redirect: fs(e.url)
  17832. }), !1) : e;
  17833. }
  17834. });
  17835. };
  17836. for (var _t19 = 0; _t19 < e.length; _t19++) {
  17837. _loop3(_t19);
  17838. }
  17839. }
  17840. function vs() {
  17841. this.onResponse(function (e) {
  17842. var t = e.type,
  17843. n = e.content;
  17844. var s = !1;
  17845. switch (t) {
  17846. case "cloudobject":
  17847. s = function (e) {
  17848. if ("object" != (0, _typeof2.default)(e)) return !1;
  17849. var _ref52 = e || {},
  17850. t = _ref52.errCode;
  17851. return t in es;
  17852. }(n);
  17853. break;
  17854. case "clientdb":
  17855. s = function (e) {
  17856. if ("object" != (0, _typeof2.default)(e)) return !1;
  17857. var _ref53 = e || {},
  17858. t = _ref53.errCode;
  17859. return t in Zn;
  17860. }(n);
  17861. }
  17862. s && function () {
  17863. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17864. var t = J(B);
  17865. Z().then(function () {
  17866. var n = rs();
  17867. if (n && ms({
  17868. redirect: n
  17869. })) return t.length > 0 ? Y(B, Object.assign({
  17870. uniIdRedirectUrl: n
  17871. }, e)) : void (cs && ys({
  17872. api: "navigateTo",
  17873. redirect: n
  17874. }));
  17875. });
  17876. }(n);
  17877. });
  17878. }
  17879. function Is(e) {
  17880. !function (e) {
  17881. e.onResponse = function (e) {
  17882. V(j, e);
  17883. }, e.offResponse = function (e) {
  17884. G(j, e);
  17885. };
  17886. }(e), function (e) {
  17887. e.onNeedLogin = function (e) {
  17888. V(B, e);
  17889. }, e.offNeedLogin = function (e) {
  17890. G(B, e);
  17891. }, as && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = !0, Z().then(function () {
  17892. ws.call(e);
  17893. }), ls && vs.call(e)));
  17894. }(e), function (e) {
  17895. e.onRefreshToken = function (e) {
  17896. V($, e);
  17897. }, e.offRefreshToken = function (e) {
  17898. G($, e);
  17899. };
  17900. }(e);
  17901. }
  17902. var Ss;
  17903. var bs = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  17904. ks = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  17905. function As() {
  17906. var e = se().token || "",
  17907. t = e.split(".");
  17908. if (!e || 3 !== t.length) return {
  17909. uid: null,
  17910. role: [],
  17911. permission: [],
  17912. tokenExpired: 0
  17913. };
  17914. var n;
  17915. try {
  17916. n = JSON.parse((s = t[1], decodeURIComponent(Ss(s).split("").map(function (e) {
  17917. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  17918. }).join(""))));
  17919. } catch (e) {
  17920. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  17921. }
  17922. var s;
  17923. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  17924. }
  17925. Ss = "function" != typeof atob ? function (e) {
  17926. if (e = String(e).replace(/[\t\n\f\r ]+/g, ""), !ks.test(e)) throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  17927. var t;
  17928. e += "==".slice(2 - (3 & e.length));
  17929. for (var n, s, r = "", i = 0; i < e.length;) {
  17930. t = bs.indexOf(e.charAt(i++)) << 18 | bs.indexOf(e.charAt(i++)) << 12 | (n = bs.indexOf(e.charAt(i++))) << 6 | (s = bs.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);
  17931. }
  17932. return r;
  17933. } : atob;
  17934. var Ps = n(function (e, t) {
  17935. Object.defineProperty(t, "__esModule", {
  17936. value: !0
  17937. });
  17938. var n = "chooseAndUploadFile:ok",
  17939. s = "chooseAndUploadFile:fail";
  17940. function r(e, t) {
  17941. return e.tempFiles.forEach(function (e, n) {
  17942. 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("."));
  17943. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  17944. return e.path;
  17945. })), e;
  17946. }
  17947. function i(e, t, _ref54) {
  17948. var s = _ref54.onChooseFile,
  17949. r = _ref54.onUploadProgress;
  17950. return t.then(function (e) {
  17951. if (s) {
  17952. var _t20 = s(e);
  17953. if (void 0 !== _t20) return Promise.resolve(_t20).then(function (t) {
  17954. return void 0 === t ? e : t;
  17955. });
  17956. }
  17957. return e;
  17958. }).then(function (t) {
  17959. return !1 === t ? {
  17960. errMsg: n,
  17961. tempFilePaths: [],
  17962. tempFiles: []
  17963. } : function (e, t) {
  17964. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  17965. var r = arguments.length > 3 ? arguments[3] : undefined;
  17966. (t = Object.assign({}, t)).errMsg = n;
  17967. var i = t.tempFiles,
  17968. o = i.length;
  17969. var a = 0;
  17970. return new Promise(function (n) {
  17971. for (; a < s;) {
  17972. c();
  17973. }
  17974. function c() {
  17975. var s = a++;
  17976. if (s >= o) return void (!i.find(function (e) {
  17977. return !e.url && !e.errMsg;
  17978. }) && n(t));
  17979. var u = i[s];
  17980. e.uploadFile({
  17981. filePath: u.path,
  17982. cloudPath: u.cloudPath,
  17983. fileType: u.fileType,
  17984. cloudPathAsRealPath: u.cloudPathAsRealPath,
  17985. onUploadProgress: function onUploadProgress(e) {
  17986. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  17987. }
  17988. }).then(function (e) {
  17989. u.url = e.fileID, s < o && c();
  17990. }).catch(function (e) {
  17991. u.errMsg = e.errMsg || e.message, s < o && c();
  17992. });
  17993. }
  17994. });
  17995. }(e, t, 5, r);
  17996. });
  17997. }
  17998. t.initChooseAndUploadFile = function (e) {
  17999. return function () {
  18000. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  18001. type: "all"
  18002. };
  18003. return "image" === t.type ? i(e, function (e) {
  18004. var t = e.count,
  18005. n = e.sizeType,
  18006. _e$sourceType = e.sourceType,
  18007. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  18008. o = e.extension;
  18009. return new Promise(function (e, a) {
  18010. uni.chooseImage({
  18011. count: t,
  18012. sizeType: n,
  18013. sourceType: i,
  18014. extension: o,
  18015. success: function success(t) {
  18016. e(r(t, "image"));
  18017. },
  18018. fail: function fail(e) {
  18019. a({
  18020. errMsg: e.errMsg.replace("chooseImage:fail", s)
  18021. });
  18022. }
  18023. });
  18024. });
  18025. }(t), t) : "video" === t.type ? i(e, function (e) {
  18026. var t = e.camera,
  18027. n = e.compressed,
  18028. i = e.maxDuration,
  18029. _e$sourceType2 = e.sourceType,
  18030. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  18031. a = e.extension;
  18032. return new Promise(function (e, c) {
  18033. uni.chooseVideo({
  18034. camera: t,
  18035. compressed: n,
  18036. maxDuration: i,
  18037. sourceType: o,
  18038. extension: a,
  18039. success: function success(t) {
  18040. var n = t.tempFilePath,
  18041. s = t.duration,
  18042. i = t.size,
  18043. o = t.height,
  18044. a = t.width;
  18045. e(r({
  18046. errMsg: "chooseVideo:ok",
  18047. tempFilePaths: [n],
  18048. tempFiles: [{
  18049. name: t.tempFile && t.tempFile.name || "",
  18050. path: n,
  18051. size: i,
  18052. type: t.tempFile && t.tempFile.type || "",
  18053. width: a,
  18054. height: o,
  18055. duration: s,
  18056. fileType: "video",
  18057. cloudPath: ""
  18058. }]
  18059. }, "video"));
  18060. },
  18061. fail: function fail(e) {
  18062. c({
  18063. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  18064. });
  18065. }
  18066. });
  18067. });
  18068. }(t), t) : i(e, function (e) {
  18069. var t = e.count,
  18070. n = e.extension;
  18071. return new Promise(function (e, i) {
  18072. var o = uni.chooseFile;
  18073. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  18074. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  18075. });
  18076. o({
  18077. type: "all",
  18078. count: t,
  18079. extension: n,
  18080. success: function success(t) {
  18081. e(r(t));
  18082. },
  18083. fail: function fail(e) {
  18084. i({
  18085. errMsg: e.errMsg.replace("chooseFile:fail", s)
  18086. });
  18087. }
  18088. });
  18089. });
  18090. }(t), t);
  18091. };
  18092. };
  18093. }),
  18094. Ts = t(Ps);
  18095. var Cs = "manual";
  18096. function xs(e) {
  18097. return {
  18098. props: {
  18099. localdata: {
  18100. type: Array,
  18101. default: function _default() {
  18102. return [];
  18103. }
  18104. },
  18105. options: {
  18106. type: [Object, Array],
  18107. default: function _default() {
  18108. return {};
  18109. }
  18110. },
  18111. spaceInfo: {
  18112. type: Object,
  18113. default: function _default() {
  18114. return {};
  18115. }
  18116. },
  18117. collection: {
  18118. type: [String, Array],
  18119. default: ""
  18120. },
  18121. action: {
  18122. type: String,
  18123. default: ""
  18124. },
  18125. field: {
  18126. type: String,
  18127. default: ""
  18128. },
  18129. orderby: {
  18130. type: String,
  18131. default: ""
  18132. },
  18133. where: {
  18134. type: [String, Object],
  18135. default: ""
  18136. },
  18137. pageData: {
  18138. type: String,
  18139. default: "add"
  18140. },
  18141. pageCurrent: {
  18142. type: Number,
  18143. default: 1
  18144. },
  18145. pageSize: {
  18146. type: Number,
  18147. default: 20
  18148. },
  18149. getcount: {
  18150. type: [Boolean, String],
  18151. default: !1
  18152. },
  18153. gettree: {
  18154. type: [Boolean, String],
  18155. default: !1
  18156. },
  18157. gettreepath: {
  18158. type: [Boolean, String],
  18159. default: !1
  18160. },
  18161. startwith: {
  18162. type: String,
  18163. default: ""
  18164. },
  18165. limitlevel: {
  18166. type: Number,
  18167. default: 10
  18168. },
  18169. groupby: {
  18170. type: String,
  18171. default: ""
  18172. },
  18173. groupField: {
  18174. type: String,
  18175. default: ""
  18176. },
  18177. distinct: {
  18178. type: [Boolean, String],
  18179. default: !1
  18180. },
  18181. foreignKey: {
  18182. type: String,
  18183. default: ""
  18184. },
  18185. loadtime: {
  18186. type: String,
  18187. default: "auto"
  18188. },
  18189. manual: {
  18190. type: Boolean,
  18191. default: !1
  18192. }
  18193. },
  18194. data: function data() {
  18195. return {
  18196. mixinDatacomLoading: !1,
  18197. mixinDatacomHasMore: !1,
  18198. mixinDatacomResData: [],
  18199. mixinDatacomErrorMessage: "",
  18200. mixinDatacomPage: {}
  18201. };
  18202. },
  18203. created: function created() {
  18204. var _this22 = this;
  18205. this.mixinDatacomPage = {
  18206. current: this.pageCurrent,
  18207. size: this.pageSize,
  18208. count: 0
  18209. }, this.$watch(function () {
  18210. var e = [];
  18211. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  18212. e.push(_this22[t]);
  18213. }), e;
  18214. }, function (e, t) {
  18215. if (_this22.loadtime === Cs) return;
  18216. var n = !1;
  18217. var s = [];
  18218. for (var _r7 = 2; _r7 < e.length; _r7++) {
  18219. e[_r7] !== t[_r7] && (s.push(e[_r7]), n = !0);
  18220. }
  18221. e[0] !== t[0] && (_this22.mixinDatacomPage.current = _this22.pageCurrent), _this22.mixinDatacomPage.size = _this22.pageSize, _this22.onMixinDatacomPropsChange(n, s);
  18222. });
  18223. },
  18224. methods: {
  18225. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  18226. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  18227. var _this23 = this;
  18228. var _ref55 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18229. _ref55$getone = _ref55.getone,
  18230. e = _ref55$getone === void 0 ? !1 : _ref55$getone,
  18231. t = _ref55.success,
  18232. n = _ref55.fail;
  18233. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {
  18234. _this23.mixinDatacomLoading = !1;
  18235. var _n$result = n.result,
  18236. s = _n$result.data,
  18237. r = _n$result.count;
  18238. _this23.getcount && (_this23.mixinDatacomPage.count = r), _this23.mixinDatacomHasMore = s.length < _this23.pageSize;
  18239. var i = e ? s.length ? s[0] : void 0 : s;
  18240. _this23.mixinDatacomResData = i, t && t(i);
  18241. }).catch(function (e) {
  18242. _this23.mixinDatacomLoading = !1, _this23.mixinDatacomErrorMessage = e, n && n(e);
  18243. }));
  18244. },
  18245. mixinDatacomGet: function mixinDatacomGet() {
  18246. var _n12;
  18247. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  18248. var n = e.database(this.spaceInfo);
  18249. var s = t.action || this.action;
  18250. s && (n = n.action(s));
  18251. var r = t.collection || this.collection;
  18252. n = Array.isArray(r) ? (_n12 = n).collection.apply(_n12, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  18253. var i = t.where || this.where;
  18254. i && Object.keys(i).length && (n = n.where(i));
  18255. var o = t.field || this.field;
  18256. o && (n = n.field(o));
  18257. var a = t.foreignKey || this.foreignKey;
  18258. a && (n = n.foreignKey(a));
  18259. var c = t.groupby || this.groupby;
  18260. c && (n = n.groupBy(c));
  18261. var u = t.groupField || this.groupField;
  18262. u && (n = n.groupField(u));
  18263. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  18264. var l = t.orderby || this.orderby;
  18265. l && (n = n.orderBy(l));
  18266. var h = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  18267. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  18268. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  18269. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  18270. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  18271. m = {
  18272. getCount: p
  18273. },
  18274. y = {
  18275. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  18276. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  18277. };
  18278. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (h - 1)).limit(d).get(m), n;
  18279. }
  18280. }
  18281. };
  18282. }
  18283. function Os(e) {
  18284. return function (t) {
  18285. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  18286. n = function (e) {
  18287. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  18288. 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;
  18289. }({
  18290. customUI: !1,
  18291. loadingOptions: {
  18292. title: "加载中...",
  18293. mask: !0
  18294. },
  18295. errorOptions: {
  18296. type: "modal",
  18297. retry: !1
  18298. }
  18299. }, n);
  18300. var _n13 = n,
  18301. s = _n13.customUI,
  18302. r = _n13.loadingOptions,
  18303. i = _n13.errorOptions,
  18304. o = _n13.parseSystemError,
  18305. a = !s;
  18306. return new Proxy({}, {
  18307. get: function get(s, c) {
  18308. return function () {
  18309. var _ref56 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18310. e = _ref56.fn,
  18311. t = _ref56.interceptorName,
  18312. n = _ref56.getCallbackArgs;
  18313. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  18314. var _len2,
  18315. s,
  18316. _key2,
  18317. r,
  18318. i,
  18319. o,
  18320. _args = arguments;
  18321. return _regenerator.default.wrap(function _callee53$(_context53) {
  18322. while (1) {
  18323. switch (_context53.prev = _context53.next) {
  18324. case 0:
  18325. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  18326. s[_key2] = _args[_key2];
  18327. }
  18328. r = n ? n({
  18329. params: s
  18330. }) : {};
  18331. _context53.prev = 2;
  18332. _context53.next = 5;
  18333. return M(q(t, "invoke"), _objectSpread({}, r));
  18334. case 5:
  18335. _context53.next = 7;
  18336. return e.apply(void 0, s);
  18337. case 7:
  18338. i = _context53.sent;
  18339. _context53.next = 10;
  18340. return M(q(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  18341. result: i
  18342. }));
  18343. case 10:
  18344. return _context53.abrupt("return", i);
  18345. case 13:
  18346. _context53.prev = 13;
  18347. _context53.t0 = _context53["catch"](2);
  18348. o = _context53.t0;
  18349. _context53.next = 18;
  18350. return M(q(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  18351. error: o
  18352. }));
  18353. case 18:
  18354. throw o;
  18355. case 19:
  18356. _context53.prev = 19;
  18357. _context53.next = 22;
  18358. return M(q(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  18359. error: o
  18360. }) : _objectSpread(_objectSpread({}, r), {}, {
  18361. result: i
  18362. }));
  18363. case 22:
  18364. return _context53.finish(19);
  18365. case 23:
  18366. case "end":
  18367. return _context53.stop();
  18368. }
  18369. }
  18370. }, _callee53, null, [[2, 13, 19, 23]]);
  18371. }));
  18372. }({
  18373. fn: function () {
  18374. var _s16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  18375. var h,
  18376. _len3,
  18377. l,
  18378. _key3,
  18379. d,
  18380. p,
  18381. _ref58,
  18382. f,
  18383. g,
  18384. m,
  18385. y,
  18386. _e26,
  18387. _yield,
  18388. _t21,
  18389. _n14,
  18390. _args4 = arguments;
  18391. return _regenerator.default.wrap(function _callee55$(_context55) {
  18392. while (1) {
  18393. switch (_context55.prev = _context55.next) {
  18394. case 0:
  18395. a && uni.showLoading({
  18396. title: r.title,
  18397. mask: r.mask
  18398. });
  18399. for (_len3 = _args4.length, l = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  18400. l[_key3] = _args4[_key3];
  18401. }
  18402. d = {
  18403. name: t,
  18404. type: u,
  18405. data: {
  18406. method: c,
  18407. params: l
  18408. }
  18409. };
  18410. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  18411. var n = t.data.method,
  18412. s = e.secretMethods || {},
  18413. r = s[n] || s["*"];
  18414. r && (t.secretType = r);
  18415. }(n, d);
  18416. p = !1;
  18417. _context55.prev = 5;
  18418. _context55.next = 8;
  18419. return e.callFunction(d);
  18420. case 8:
  18421. h = _context55.sent;
  18422. _context55.next = 14;
  18423. break;
  18424. case 11:
  18425. _context55.prev = 11;
  18426. _context55.t0 = _context55["catch"](5);
  18427. p = !0, h = {
  18428. result: new te(_context55.t0)
  18429. };
  18430. case 14:
  18431. _ref58 = h.result || {}, f = _ref58.errSubject, g = _ref58.errCode, m = _ref58.errMsg, y = _ref58.newToken;
  18432. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (re(y), Y($, _objectSpread({}, y))), g)) {
  18433. _context55.next = 39;
  18434. break;
  18435. }
  18436. _e26 = m;
  18437. if (!(p && o)) {
  18438. _context55.next = 24;
  18439. break;
  18440. }
  18441. _context55.next = 20;
  18442. return o({
  18443. objectName: t,
  18444. methodName: c,
  18445. params: l,
  18446. errSubject: f,
  18447. errCode: g,
  18448. errMsg: m
  18449. });
  18450. case 20:
  18451. _context55.t1 = _context55.sent.errMsg;
  18452. if (_context55.t1) {
  18453. _context55.next = 23;
  18454. break;
  18455. }
  18456. _context55.t1 = m;
  18457. case 23:
  18458. _e26 = _context55.t1;
  18459. case 24:
  18460. if (!a) {
  18461. _context55.next = 37;
  18462. break;
  18463. }
  18464. if (!("toast" === i.type)) {
  18465. _context55.next = 29;
  18466. break;
  18467. }
  18468. uni.showToast({
  18469. title: _e26,
  18470. icon: "none"
  18471. });
  18472. _context55.next = 37;
  18473. break;
  18474. case 29:
  18475. if (!("modal" !== i.type)) {
  18476. _context55.next = 31;
  18477. break;
  18478. }
  18479. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  18480. case 31:
  18481. _context55.next = 33;
  18482. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  18483. var _ref60,
  18484. e,
  18485. t,
  18486. n,
  18487. s,
  18488. r,
  18489. _args2 = arguments;
  18490. return _regenerator.default.wrap(function _callee54$(_context54) {
  18491. while (1) {
  18492. switch (_context54.prev = _context54.next) {
  18493. case 0:
  18494. _ref60 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref60.title, t = _ref60.content, n = _ref60.showCancel, s = _ref60.cancelText, r = _ref60.confirmText;
  18495. return _context54.abrupt("return", new Promise(function (i, o) {
  18496. uni.showModal({
  18497. title: e,
  18498. content: t,
  18499. showCancel: n,
  18500. cancelText: s,
  18501. confirmText: r,
  18502. success: function success(e) {
  18503. i(e);
  18504. },
  18505. fail: function fail() {
  18506. i({
  18507. confirm: !1,
  18508. cancel: !0
  18509. });
  18510. }
  18511. });
  18512. }));
  18513. case 2:
  18514. case "end":
  18515. return _context54.stop();
  18516. }
  18517. }
  18518. }, _callee54);
  18519. }))({
  18520. title: "提示",
  18521. content: _e26,
  18522. showCancel: i.retry,
  18523. cancelText: "取消",
  18524. confirmText: i.retry ? "重试" : "确定"
  18525. });
  18526. case 33:
  18527. _yield = _context55.sent;
  18528. _t21 = _yield.confirm;
  18529. if (!(i.retry && _t21)) {
  18530. _context55.next = 37;
  18531. break;
  18532. }
  18533. return _context55.abrupt("return", s.apply(void 0, l));
  18534. case 37:
  18535. _n14 = new te({
  18536. subject: f,
  18537. code: g,
  18538. message: m,
  18539. requestId: h.requestId
  18540. });
  18541. throw _n14.detail = h.result, Y(j, {
  18542. type: z,
  18543. content: _n14
  18544. }), _n14;
  18545. case 39:
  18546. return _context55.abrupt("return", (Y(j, {
  18547. type: z,
  18548. content: h.result
  18549. }), h.result));
  18550. case 40:
  18551. case "end":
  18552. return _context55.stop();
  18553. }
  18554. }
  18555. }, _callee55, null, [[5, 11]]);
  18556. }));
  18557. function s() {
  18558. return _s16.apply(this, arguments);
  18559. }
  18560. return s;
  18561. }(),
  18562. interceptorName: "callObject",
  18563. getCallbackArgs: function getCallbackArgs() {
  18564. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18565. e = _ref61.params;
  18566. return {
  18567. objectName: t,
  18568. methodName: c,
  18569. params: e
  18570. };
  18571. }
  18572. });
  18573. }
  18574. });
  18575. };
  18576. }
  18577. function Es(e) {
  18578. return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  18579. }
  18580. function Ls() {
  18581. return _Ls.apply(this, arguments);
  18582. }
  18583. function _Ls() {
  18584. _Ls = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58() {
  18585. var _ref73,
  18586. e,
  18587. _ref73$callLoginByWei,
  18588. t,
  18589. n,
  18590. s,
  18591. r,
  18592. _args7 = arguments;
  18593. return _regenerator.default.wrap(function _callee58$(_context58) {
  18594. while (1) {
  18595. switch (_context58.prev = _context58.next) {
  18596. case 0:
  18597. _ref73 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref73.openid, _ref73$callLoginByWei = _ref73.callLoginByWeixin, t = _ref73$callLoginByWei === void 0 ? !1 : _ref73$callLoginByWei;
  18598. n = Es(this);
  18599. if (!("mp-weixin" !== P)) {
  18600. _context58.next = 4;
  18601. break;
  18602. }
  18603. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(P, "`"));
  18604. case 4:
  18605. if (!(e && t)) {
  18606. _context58.next = 6;
  18607. break;
  18608. }
  18609. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  18610. case 6:
  18611. if (!e) {
  18612. _context58.next = 8;
  18613. break;
  18614. }
  18615. return _context58.abrupt("return", (n.mpWeixinOpenid = e, {}));
  18616. case 8:
  18617. _context58.next = 10;
  18618. return new Promise(function (e, t) {
  18619. uni.login({
  18620. success: function success(t) {
  18621. e(t.code);
  18622. },
  18623. fail: function fail(e) {
  18624. t(new Error(e.errMsg));
  18625. }
  18626. });
  18627. });
  18628. case 10:
  18629. s = _context58.sent;
  18630. r = this.importObject("uni-id-co", {
  18631. customUI: !0
  18632. });
  18633. _context58.next = 14;
  18634. return r.secureNetworkHandshakeByWeixin({
  18635. code: s,
  18636. callLoginByWeixin: t
  18637. });
  18638. case 14:
  18639. n.mpWeixinCode = s;
  18640. return _context58.abrupt("return", {
  18641. code: s
  18642. });
  18643. case 16:
  18644. case "end":
  18645. return _context58.stop();
  18646. }
  18647. }
  18648. }, _callee58, this);
  18649. }));
  18650. return _Ls.apply(this, arguments);
  18651. }
  18652. function Rs(_x40) {
  18653. return _Rs.apply(this, arguments);
  18654. }
  18655. function _Rs() {
  18656. _Rs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e) {
  18657. var t;
  18658. return _regenerator.default.wrap(function _callee59$(_context59) {
  18659. while (1) {
  18660. switch (_context59.prev = _context59.next) {
  18661. case 0:
  18662. t = Es(this);
  18663. return _context59.abrupt("return", (t.initPromise || (t.initPromise = Ls.call(this, e)), t.initPromise));
  18664. case 2:
  18665. case "end":
  18666. return _context59.stop();
  18667. }
  18668. }
  18669. }, _callee59, this);
  18670. }));
  18671. return _Rs.apply(this, arguments);
  18672. }
  18673. function Us(e) {
  18674. return function () {
  18675. var _ref62 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18676. t = _ref62.openid,
  18677. _ref62$callLoginByWei = _ref62.callLoginByWeixin,
  18678. n = _ref62$callLoginByWei === void 0 ? !1 : _ref62$callLoginByWei;
  18679. return Rs.call(e, {
  18680. openid: t,
  18681. callLoginByWeixin: n
  18682. });
  18683. };
  18684. }
  18685. function Ns(e) {
  18686. var t = {
  18687. getSystemInfo: uni.getSystemInfo,
  18688. getPushClientId: uni.getPushClientId
  18689. };
  18690. return function (n) {
  18691. return new Promise(function (s, r) {
  18692. t[e](_objectSpread(_objectSpread({}, n), {}, {
  18693. success: function success(e) {
  18694. s(e);
  18695. },
  18696. fail: function fail(e) {
  18697. r(e);
  18698. }
  18699. }));
  18700. });
  18701. };
  18702. }
  18703. var Ds = /*#__PURE__*/function (_ref63) {
  18704. (0, _inherits2.default)(Ds, _ref63);
  18705. var _super12 = _createSuper(Ds);
  18706. function Ds() {
  18707. var _this24;
  18708. (0, _classCallCheck2.default)(this, Ds);
  18709. _this24 = _super12.call(this), _this24._uniPushMessageCallback = _this24._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this24)), _this24._currentMessageId = -1, _this24._payloadQueue = [];
  18710. return _this24;
  18711. }
  18712. (0, _createClass2.default)(Ds, [{
  18713. key: "init",
  18714. value: function init() {
  18715. var _this25 = this;
  18716. return Promise.all([Ns("getSystemInfo")(), Ns("getPushClientId")()]).then(function () {
  18717. var _ref64 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  18718. _ref65 = (0, _slicedToArray2.default)(_ref64, 2),
  18719. _ref65$ = _ref65[0];
  18720. _ref65$ = _ref65$ === void 0 ? {} : _ref65$;
  18721. var e = _ref65$.appId,
  18722. _ref65$2 = _ref65[1];
  18723. _ref65$2 = _ref65$2 === void 0 ? {} : _ref65$2;
  18724. var t = _ref65$2.cid;
  18725. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  18726. if (!t) throw new Error("Invalid push client id");
  18727. _this25._appId = e, _this25._pushClientId = t, _this25._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this25.emit("open"), _this25._initMessageListener();
  18728. }, function (e) {
  18729. throw _this25.emit("error", e), _this25.close(), e;
  18730. });
  18731. }
  18732. }, {
  18733. key: "open",
  18734. value: function () {
  18735. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56() {
  18736. return _regenerator.default.wrap(function _callee56$(_context56) {
  18737. while (1) {
  18738. switch (_context56.prev = _context56.next) {
  18739. case 0:
  18740. return _context56.abrupt("return", this.init());
  18741. case 1:
  18742. case "end":
  18743. return _context56.stop();
  18744. }
  18745. }
  18746. }, _callee56, this);
  18747. }));
  18748. function open() {
  18749. return _open.apply(this, arguments);
  18750. }
  18751. return open;
  18752. }()
  18753. }, {
  18754. key: "_isUniCloudSSE",
  18755. value: function _isUniCloudSSE(e) {
  18756. if ("receive" !== e.type) return !1;
  18757. var t = e && e.data && e.data.payload;
  18758. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  18759. }
  18760. }, {
  18761. key: "_receivePushMessage",
  18762. value: function _receivePushMessage(e) {
  18763. if (!this._isUniCloudSSE(e)) return;
  18764. var t = e && e.data && e.data.payload,
  18765. n = t.action,
  18766. s = t.messageId,
  18767. r = t.message;
  18768. this._payloadQueue.push({
  18769. action: n,
  18770. messageId: s,
  18771. message: r
  18772. }), this._consumMessage();
  18773. }
  18774. }, {
  18775. key: "_consumMessage",
  18776. value: function _consumMessage() {
  18777. var _this26 = this;
  18778. for (;;) {
  18779. var _e27 = this._payloadQueue.find(function (e) {
  18780. return e.messageId === _this26._currentMessageId + 1;
  18781. });
  18782. if (!_e27) break;
  18783. this._currentMessageId++, this._parseMessagePayload(_e27);
  18784. }
  18785. }
  18786. }, {
  18787. key: "_parseMessagePayload",
  18788. value: function _parseMessagePayload(e) {
  18789. var t = e.action,
  18790. n = e.messageId,
  18791. s = e.message;
  18792. "end" === t ? this._end({
  18793. messageId: n,
  18794. message: s
  18795. }) : "message" === t && this._appendMessage({
  18796. messageId: n,
  18797. message: s
  18798. });
  18799. }
  18800. }, {
  18801. key: "_appendMessage",
  18802. value: function _appendMessage() {
  18803. var _ref66 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18804. e = _ref66.messageId,
  18805. t = _ref66.message;
  18806. this.emit("message", t);
  18807. }
  18808. }, {
  18809. key: "_end",
  18810. value: function _end() {
  18811. var _ref67 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  18812. e = _ref67.messageId,
  18813. t = _ref67.message;
  18814. this.emit("end", t), this.close();
  18815. }
  18816. }, {
  18817. key: "_initMessageListener",
  18818. value: function _initMessageListener() {
  18819. uni.onPushMessage(this._uniPushMessageCallback);
  18820. }
  18821. }, {
  18822. key: "_destroy",
  18823. value: function _destroy() {
  18824. uni.offPushMessage(this._uniPushMessageCallback);
  18825. }
  18826. }, {
  18827. key: "toJSON",
  18828. value: function toJSON() {
  18829. return {
  18830. appId: this._appId,
  18831. pushClientId: this._pushClientId,
  18832. seqId: this._seqId
  18833. };
  18834. }
  18835. }, {
  18836. key: "close",
  18837. value: function close() {
  18838. this._destroy(), this.emit("close");
  18839. }
  18840. }]);
  18841. return Ds;
  18842. }( /*#__PURE__*/function () {
  18843. function _class6() {
  18844. (0, _classCallCheck2.default)(this, _class6);
  18845. this._callback = {};
  18846. }
  18847. (0, _createClass2.default)(_class6, [{
  18848. key: "addListener",
  18849. value: function addListener(e, t) {
  18850. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  18851. }
  18852. }, {
  18853. key: "on",
  18854. value: function on(e, t) {
  18855. return this.addListener(e, t);
  18856. }
  18857. }, {
  18858. key: "removeListener",
  18859. value: function removeListener(e, t) {
  18860. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  18861. var n = this._callback[e];
  18862. if (!n) return;
  18863. var s = function (e, t) {
  18864. for (var _n15 = e.length - 1; _n15 >= 0; _n15--) {
  18865. if (e[_n15] === t) return _n15;
  18866. }
  18867. return -1;
  18868. }(n, t);
  18869. n.splice(s, 1);
  18870. }
  18871. }, {
  18872. key: "off",
  18873. value: function off(e, t) {
  18874. return this.removeListener(e, t);
  18875. }
  18876. }, {
  18877. key: "removeAllListener",
  18878. value: function removeAllListener(e) {
  18879. delete this._callback[e];
  18880. }
  18881. }, {
  18882. key: "emit",
  18883. value: function emit(e) {
  18884. var n = this._callback[e];
  18885. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  18886. t[_key4 - 1] = arguments[_key4];
  18887. }
  18888. if (n) for (var _e28 = 0; _e28 < n.length; _e28++) {
  18889. n[_e28].apply(n, t);
  18890. }
  18891. }
  18892. }]);
  18893. return _class6;
  18894. }());
  18895. function Ms(_x41, _x42) {
  18896. return _Ms.apply(this, arguments);
  18897. }
  18898. function _Ms() {
  18899. _Ms = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee60(e, t) {
  18900. var n, _e32, s;
  18901. return _regenerator.default.wrap(function _callee60$(_context60) {
  18902. while (1) {
  18903. switch (_context60.prev = _context60.next) {
  18904. case 0:
  18905. n = "http://".concat(e, ":").concat(t, "/system/ping");
  18906. _context60.prev = 1;
  18907. _context60.next = 4;
  18908. return s = {
  18909. url: n,
  18910. timeout: 500
  18911. }, new Promise(function (e, t) {
  18912. ne.request(_objectSpread(_objectSpread({}, s), {}, {
  18913. success: function success(t) {
  18914. e(t);
  18915. },
  18916. fail: function fail(e) {
  18917. t(e);
  18918. }
  18919. }));
  18920. });
  18921. case 4:
  18922. _e32 = _context60.sent;
  18923. return _context60.abrupt("return", !(!_e32.data || 0 !== _e32.data.code));
  18924. case 8:
  18925. _context60.prev = 8;
  18926. _context60.t0 = _context60["catch"](1);
  18927. return _context60.abrupt("return", !1);
  18928. case 11:
  18929. case "end":
  18930. return _context60.stop();
  18931. }
  18932. }
  18933. }, _callee60, null, [[1, 8]]);
  18934. }));
  18935. return _Ms.apply(this, arguments);
  18936. }
  18937. function qs(_x43) {
  18938. return _qs.apply(this, arguments);
  18939. }
  18940. function _qs() {
  18941. _qs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee62(e) {
  18942. var _ae2, _e33, _t23, t, _t$debugInfo, n, s, _yield2, r, i, o;
  18943. return _regenerator.default.wrap(function _callee62$(_context62) {
  18944. while (1) {
  18945. switch (_context62.prev = _context62.next) {
  18946. case 0:
  18947. if (S) {
  18948. _context62.next = 2;
  18949. break;
  18950. }
  18951. return _context62.abrupt("return", Promise.resolve());
  18952. case 2:
  18953. if ("app" === P) {
  18954. _ae2 = ae(), _e33 = _ae2.osName, _t23 = _ae2.osVersion;
  18955. "ios" === _e33 && function (e) {
  18956. if (!e || "string" != typeof e) return 0;
  18957. var t = e.match(/^(\d+)./);
  18958. return t && t[1] ? parseInt(t[1]) : 0;
  18959. }(_t23) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");
  18960. }
  18961. t = e.__dev__;
  18962. if (t.debugInfo) {
  18963. _context62.next = 6;
  18964. break;
  18965. }
  18966. return _context62.abrupt("return");
  18967. case 6:
  18968. _t$debugInfo = t.debugInfo;
  18969. n = _t$debugInfo.address;
  18970. s = _t$debugInfo.servePort;
  18971. _context62.next = 11;
  18972. return function () {
  18973. var _ref74 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee61(e, t) {
  18974. var n, _s17, _r8;
  18975. return _regenerator.default.wrap(function _callee61$(_context61) {
  18976. while (1) {
  18977. switch (_context61.prev = _context61.next) {
  18978. case 0:
  18979. _s17 = 0;
  18980. case 1:
  18981. if (!(_s17 < e.length)) {
  18982. _context61.next = 11;
  18983. break;
  18984. }
  18985. _r8 = e[_s17];
  18986. _context61.next = 5;
  18987. return Ms(_r8, t);
  18988. case 5:
  18989. if (!_context61.sent) {
  18990. _context61.next = 8;
  18991. break;
  18992. }
  18993. n = _r8;
  18994. return _context61.abrupt("break", 11);
  18995. case 8:
  18996. _s17++;
  18997. _context61.next = 1;
  18998. break;
  18999. case 11:
  19000. return _context61.abrupt("return", {
  19001. address: n,
  19002. port: t
  19003. });
  19004. case 12:
  19005. case "end":
  19006. return _context61.stop();
  19007. }
  19008. }
  19009. }, _callee61);
  19010. }));
  19011. return function (_x44, _x45) {
  19012. return _ref74.apply(this, arguments);
  19013. };
  19014. }()(n, s);
  19015. case 11:
  19016. _yield2 = _context62.sent;
  19017. r = _yield2.address;
  19018. if (!r) {
  19019. _context62.next = 15;
  19020. break;
  19021. }
  19022. return _context62.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  19023. case 15:
  19024. i = console["app" === P ? "error" : "warn"];
  19025. o = "";
  19026. 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" === P && (o += "\n- 部分浏览器开启节流模式之后访问本地地址受限,请检查是否启用了节流模式"), 0 === P.indexOf("mp-") && (o += "\n- 小程序中如何使用uniCloud,请参考:https://uniapp.dcloud.net.cn/uniCloud/publish.html#useinmp"), !t.debugInfo.forceRemote)) {
  19027. _context62.next = 19;
  19028. break;
  19029. }
  19030. throw new Error(o);
  19031. case 19:
  19032. i(o);
  19033. case 20:
  19034. case "end":
  19035. return _context62.stop();
  19036. }
  19037. }
  19038. }, _callee62);
  19039. }));
  19040. return _qs.apply(this, arguments);
  19041. }
  19042. function Fs(e) {
  19043. e._initPromiseHub || (e._initPromiseHub = new v({
  19044. createPromise: function createPromise() {
  19045. var t = Promise.resolve();
  19046. var n;
  19047. n = 1, t = new Promise(function (e) {
  19048. setTimeout(function () {
  19049. e();
  19050. }, n);
  19051. });
  19052. var s = e.auth();
  19053. return t.then(function () {
  19054. return s.getLoginState();
  19055. }).then(function (e) {
  19056. return e ? Promise.resolve() : s.signInAnonymously();
  19057. });
  19058. }
  19059. }));
  19060. }
  19061. var Ks = {
  19062. tcb: It,
  19063. tencent: It,
  19064. aliyun: de,
  19065. private: bt,
  19066. alipay: Ot
  19067. };
  19068. var js = new ( /*#__PURE__*/function () {
  19069. function _class7() {
  19070. (0, _classCallCheck2.default)(this, _class7);
  19071. }
  19072. (0, _createClass2.default)(_class7, [{
  19073. key: "init",
  19074. value: function init(e) {
  19075. var t = {};
  19076. var n = Ks[e.provider];
  19077. if (!n) throw new Error("未提供正确的provider参数");
  19078. t = n.init(e), S && function (e) {
  19079. if (!S) return;
  19080. var t = {};
  19081. e.__dev__ = t, t.debugLog = S && ("web" === P && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === P);
  19082. var n = T;
  19083. n && !n.code && (t.debugInfo = n);
  19084. var s = new v({
  19085. createPromise: function createPromise() {
  19086. return qs(e);
  19087. }
  19088. });
  19089. t.initLocalNetwork = function () {
  19090. return s.exec();
  19091. };
  19092. }(t), Fs(t), qn(t), function (e) {
  19093. var t = e.uploadFile;
  19094. e.uploadFile = function (e) {
  19095. return t.call(this, e);
  19096. };
  19097. }(t), function (e) {
  19098. e.database = function (t) {
  19099. if (t && Object.keys(t).length > 0) return e.init(t).database();
  19100. if (this._database) return this._database;
  19101. var n = Gn(Yn, {
  19102. uniClient: e
  19103. });
  19104. return this._database = n, n;
  19105. }, e.databaseForJQL = function (t) {
  19106. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  19107. if (this._databaseForJQL) return this._databaseForJQL;
  19108. var n = Gn(Yn, {
  19109. uniClient: e,
  19110. isJQL: !0
  19111. });
  19112. return this._databaseForJQL = n, n;
  19113. };
  19114. }(t), function (e) {
  19115. e.getCurrentUserInfo = As, e.chooseAndUploadFile = Ts.initChooseAndUploadFile(e), Object.assign(e, {
  19116. get mixinDatacom() {
  19117. return xs(e);
  19118. }
  19119. }), e.SSEChannel = Ds, e.initSecureNetworkByWeixin = Us(e), e.importObject = Os(e);
  19120. }(t);
  19121. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  19122. if (!t[e]) return;
  19123. var n = t[e];
  19124. t[e] = function () {
  19125. return n.apply(t, Array.from(arguments));
  19126. }, t[e] = function (e, t) {
  19127. return function (n) {
  19128. var _this27 = this;
  19129. var s = !1;
  19130. if ("callFunction" === t) {
  19131. var _e29 = n && n.type || c;
  19132. s = _e29 !== c;
  19133. }
  19134. var r = "callFunction" === t && !s,
  19135. i = this._initPromiseHub.exec();
  19136. n = n || {};
  19137. var _ee2 = ee(n),
  19138. o = _ee2.success,
  19139. a = _ee2.fail,
  19140. u = _ee2.complete,
  19141. l = i.then(function () {
  19142. return s ? Promise.resolve() : M(q(t, "invoke"), n);
  19143. }).then(function () {
  19144. return e.call(_this27, n);
  19145. }).then(function (e) {
  19146. return s ? Promise.resolve(e) : M(q(t, "success"), e).then(function () {
  19147. return M(q(t, "complete"), e);
  19148. }).then(function () {
  19149. return r && Y(j, {
  19150. type: H,
  19151. content: e
  19152. }), Promise.resolve(e);
  19153. });
  19154. }, function (e) {
  19155. return s ? Promise.reject(e) : M(q(t, "fail"), e).then(function () {
  19156. return M(q(t, "complete"), e);
  19157. }).then(function () {
  19158. return Y(j, {
  19159. type: H,
  19160. content: e
  19161. }), Promise.reject(e);
  19162. });
  19163. });
  19164. if (!(o || a || u)) return l;
  19165. l.then(function (e) {
  19166. o && o(e), u && u(e), r && Y(j, {
  19167. type: H,
  19168. content: e
  19169. });
  19170. }, function (e) {
  19171. a && a(e), u && u(e), r && Y(j, {
  19172. type: H,
  19173. content: e
  19174. });
  19175. });
  19176. };
  19177. }(t[e], e).bind(t);
  19178. }), t.init = this.init, t;
  19179. }
  19180. }]);
  19181. return _class7;
  19182. }())();
  19183. (function () {
  19184. var e = C;
  19185. var t = {};
  19186. if (e && 1 === e.length) t = e[0], js = js.init(t), js._isDefault = !0;else {
  19187. var _t22 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  19188. var _n16;
  19189. _n16 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : x ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t22.forEach(function (e) {
  19190. js[e] = function () {
  19191. return console.error(_n16), Promise.reject(new te({
  19192. code: "SYS_ERR",
  19193. message: _n16
  19194. }));
  19195. };
  19196. });
  19197. }
  19198. Object.assign(js, {
  19199. get mixinDatacom() {
  19200. return xs(js);
  19201. }
  19202. }), Is(js), js.addInterceptor = N, js.removeInterceptor = D, js.interceptObject = F, S && "web" === P && (window.uniCloud = js);
  19203. })();
  19204. var Bs = js;
  19205. exports.default = Bs;
  19206. /* 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"]))
  19207. /***/ }),
  19208. /***/ 289:
  19209. /*!************************************************************************!*\
  19210. !*** ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***!
  19211. \************************************************************************/
  19212. /*! no static exports found */
  19213. /***/ (function(module, exports, __webpack_require__) {
  19214. var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ 290);
  19215. function _objectWithoutProperties(source, excluded) {
  19216. if (source == null) return {};
  19217. var target = objectWithoutPropertiesLoose(source, excluded);
  19218. var key, i;
  19219. if (Object.getOwnPropertySymbols) {
  19220. var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
  19221. for (i = 0; i < sourceSymbolKeys.length; i++) {
  19222. key = sourceSymbolKeys[i];
  19223. if (excluded.indexOf(key) >= 0) continue;
  19224. if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
  19225. target[key] = source[key];
  19226. }
  19227. }
  19228. return target;
  19229. }
  19230. module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19231. /***/ }),
  19232. /***/ 290:
  19233. /*!*****************************************************************************!*\
  19234. !*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***!
  19235. \*****************************************************************************/
  19236. /*! no static exports found */
  19237. /***/ (function(module, exports) {
  19238. function _objectWithoutPropertiesLoose(source, excluded) {
  19239. if (source == null) return {};
  19240. var target = {};
  19241. var sourceKeys = Object.keys(source);
  19242. var key, i;
  19243. for (i = 0; i < sourceKeys.length; i++) {
  19244. key = sourceKeys[i];
  19245. if (excluded.indexOf(key) >= 0) continue;
  19246. target[key] = source[key];
  19247. }
  19248. return target;
  19249. }
  19250. module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19251. /***/ }),
  19252. /***/ 291:
  19253. /*!****************************************************************!*\
  19254. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  19255. \****************************************************************/
  19256. /*! no static exports found */
  19257. /***/ (function(module, exports, __webpack_require__) {
  19258. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 272);
  19259. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  19260. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 292);
  19261. var construct = __webpack_require__(/*! ./construct.js */ 15);
  19262. function _wrapNativeSuper(Class) {
  19263. var _cache = typeof Map === "function" ? new Map() : undefined;
  19264. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  19265. if (Class === null || !isNativeFunction(Class)) return Class;
  19266. if (typeof Class !== "function") {
  19267. throw new TypeError("Super expression must either be null or a function");
  19268. }
  19269. if (typeof _cache !== "undefined") {
  19270. if (_cache.has(Class)) return _cache.get(Class);
  19271. _cache.set(Class, Wrapper);
  19272. }
  19273. function Wrapper() {
  19274. return construct(Class, arguments, getPrototypeOf(this).constructor);
  19275. }
  19276. Wrapper.prototype = Object.create(Class.prototype, {
  19277. constructor: {
  19278. value: Wrapper,
  19279. enumerable: false,
  19280. writable: true,
  19281. configurable: true
  19282. }
  19283. });
  19284. return setPrototypeOf(Wrapper, Class);
  19285. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19286. return _wrapNativeSuper(Class);
  19287. }
  19288. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19289. /***/ }),
  19290. /***/ 292:
  19291. /*!*****************************************************************!*\
  19292. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  19293. \*****************************************************************/
  19294. /*! no static exports found */
  19295. /***/ (function(module, exports) {
  19296. function _isNativeFunction(fn) {
  19297. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  19298. }
  19299. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  19300. /***/ }),
  19301. /***/ 293:
  19302. /*!**********************************************************************************!*\
  19303. !*** E:/work/Project_newGit/UniappShell/pages.json?{"type":"origin-pages-json"} ***!
  19304. \**********************************************************************************/
  19305. /*! no static exports found */
  19306. /***/ (function(module, exports, __webpack_require__) {
  19307. "use strict";
  19308. Object.defineProperty(exports, "__esModule", {
  19309. value: true
  19310. });
  19311. exports.default = void 0;
  19312. var _default = {
  19313. "pages": [{
  19314. "path": "pages/login/index",
  19315. "style": {
  19316. "navigationBarTitleText": "登录"
  19317. }
  19318. }, {
  19319. "path": "pages/index/index",
  19320. "style": {
  19321. "navigationBarTitleText": "首页",
  19322. "navigationStyle": "custom",
  19323. "enablePullDownRefresh": true
  19324. }
  19325. }, {
  19326. "path": "pages/myCenter/myCenter",
  19327. "style": {
  19328. "navigationBarTitleText": "我的",
  19329. "navigationBarBackgroundColor": "#3D90F4",
  19330. "enablePullDownRefresh": false,
  19331. "navigationStyle": "custom"
  19332. }
  19333. }, {
  19334. "path": "pages/myCenter/personalData/personalData",
  19335. "style": {
  19336. "navigationBarTitleText": "个人资料",
  19337. "enablePullDownRefresh": false
  19338. }
  19339. }, {
  19340. "path": "pages/myCenter/updatePassword/updatePassword",
  19341. "style": {
  19342. "navigationBarTitleText": "修改密码",
  19343. "enablePullDownRefresh": false
  19344. }
  19345. }, {
  19346. "path": "pages/webview/webview",
  19347. "style": {
  19348. "navigationBarTitleText": "",
  19349. "enablePullDownRefresh": true
  19350. }
  19351. }, {
  19352. "path": "pages/history/history",
  19353. "style": {
  19354. "navigationBarTitleText": "信息中心",
  19355. "enablePullDownRefresh": true
  19356. }
  19357. }, {
  19358. "path": "pages/applicationCenter/applicationCenter",
  19359. "style": {
  19360. "navigationBarTitleText": "应用中心",
  19361. "enablePullDownRefresh": false
  19362. }
  19363. }, {
  19364. "path": "pages/message/message",
  19365. "style": {
  19366. "navigationBarTitleText": "消息",
  19367. "enablePullDownRefresh": false,
  19368. "navigationStyle": "custom"
  19369. }
  19370. }, {
  19371. "path": "pages/index/detail/detail",
  19372. "style": {
  19373. "navigationBarTitleText": "详情",
  19374. "enablePullDownRefresh": true
  19375. }
  19376. }, {
  19377. "path": "pages/index/handle/danger/index/index",
  19378. "style": {
  19379. "navigationBarTitleText": "隐患处理",
  19380. "enablePullDownRefresh": false
  19381. }
  19382. }, {
  19383. "path": "pages/index/handle/task/task",
  19384. "style": {
  19385. "navigationBarTitleText": "任务处理",
  19386. "enablePullDownRefresh": false
  19387. }
  19388. }, {
  19389. "path": "pages/index/handle/task/checkList/form/form",
  19390. "style": {
  19391. "navigationBarTitleText": "任务检查表处理",
  19392. "enablePullDownRefresh": false
  19393. }
  19394. }, {
  19395. "path": "pages/index/handle/alert/alert",
  19396. "style": {
  19397. "navigationBarTitleText": "预警处理",
  19398. "enablePullDownRefresh": false
  19399. }
  19400. }, {
  19401. "path": "pages/index/handle/warning/warning",
  19402. "style": {
  19403. "navigationBarTitleText": "告警处理",
  19404. "enablePullDownRefresh": false
  19405. }
  19406. }],
  19407. "tabBar": {
  19408. "color": "#7A7E83",
  19409. "selectedColor": "#1296db",
  19410. "borderStyle": "black",
  19411. "backgroundColor": "#ffffff",
  19412. "iconWidth": "24px",
  19413. "list": [{
  19414. "pagePath": "pages/index/index",
  19415. "iconPath": "static/tabbar/index.png",
  19416. "selectedIconPath": "static/tabbar/indexEd.png",
  19417. "text": "首页"
  19418. }, {
  19419. "pagePath": "pages/applicationCenter/applicationCenter",
  19420. "iconPath": "static/tabbar/app.png",
  19421. "selectedIconPath": "static/tabbar/appEd.png",
  19422. "text": "应用中心"
  19423. }, {
  19424. "pagePath": "pages/history/history",
  19425. "iconPath": "static/tabbar/info.png",
  19426. "selectedIconPath": "static/tabbar/infoEd.png",
  19427. "text": "信息中心"
  19428. }, {
  19429. "pagePath": "pages/myCenter/myCenter",
  19430. "iconPath": "static/tabbar/myCenter.png",
  19431. "selectedIconPath": "static/tabbar/myCenterEd.png",
  19432. "text": "我的"
  19433. }]
  19434. },
  19435. "globalStyle": {
  19436. "navigationBarTextStyle": "black",
  19437. "navigationBarTitleText": "智慧创新",
  19438. "navigationBarBackgroundColor": "#F8F8F8",
  19439. "backgroundColor": "#F8F8F8"
  19440. },
  19441. "uniIdRouter": {}
  19442. };
  19443. exports.default = _default;
  19444. /***/ }),
  19445. /***/ 294:
  19446. /*!*********************************************************************!*\
  19447. !*** E:/work/Project_newGit/UniappShell/pages.json?{"type":"stat"} ***!
  19448. \*********************************************************************/
  19449. /*! no static exports found */
  19450. /***/ (function(module, exports, __webpack_require__) {
  19451. "use strict";
  19452. Object.defineProperty(exports, "__esModule", {
  19453. value: true
  19454. });
  19455. exports.default = void 0;
  19456. var _default = {
  19457. "appid": "__UNI__73F6024"
  19458. };
  19459. exports.default = _default;
  19460. /***/ }),
  19461. /***/ 3:
  19462. /*!***********************************!*\
  19463. !*** (webpack)/buildin/global.js ***!
  19464. \***********************************/
  19465. /*! no static exports found */
  19466. /***/ (function(module, exports) {
  19467. var g;
  19468. // This works in non-strict mode
  19469. g = (function() {
  19470. return this;
  19471. })();
  19472. try {
  19473. // This works if eval is allowed (see CSP)
  19474. g = g || new Function("return this")();
  19475. } catch (e) {
  19476. // This works if the window reference is available
  19477. if (typeof window === "object") g = window;
  19478. }
  19479. // g can still be undefined, but nothing to do about it...
  19480. // We return undefined, instead of nothing here, so it's
  19481. // easier to handle this case. if(!global) { ...}
  19482. module.exports = g;
  19483. /***/ }),
  19484. /***/ 302:
  19485. /*!***************************************************************************************************************************!*\
  19486. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-file-picker/components/uni-file-picker/choose-and-upload-file.js ***!
  19487. \***************************************************************************************************************************/
  19488. /*! no static exports found */
  19489. /***/ (function(module, exports, __webpack_require__) {
  19490. "use strict";
  19491. /* WEBPACK VAR INJECTION */(function(uni, wx, uniCloud) {
  19492. Object.defineProperty(exports, "__esModule", {
  19493. value: true
  19494. });
  19495. exports.chooseAndUploadFile = chooseAndUploadFile;
  19496. exports.uploadCloudFiles = uploadCloudFiles;
  19497. var ERR_MSG_OK = 'chooseAndUploadFile:ok';
  19498. var ERR_MSG_FAIL = 'chooseAndUploadFile:fail';
  19499. function chooseImage(opts) {
  19500. var count = opts.count,
  19501. _opts$sizeType = opts.sizeType,
  19502. sizeType = _opts$sizeType === void 0 ? ['original', 'compressed'] : _opts$sizeType,
  19503. _opts$sourceType = opts.sourceType,
  19504. sourceType = _opts$sourceType === void 0 ? ['album', 'camera'] : _opts$sourceType,
  19505. extension = opts.extension;
  19506. return new Promise(function (resolve, reject) {
  19507. uni.chooseImage({
  19508. count: count,
  19509. sizeType: sizeType,
  19510. sourceType: sourceType,
  19511. extension: extension,
  19512. success: function success(res) {
  19513. resolve(normalizeChooseAndUploadFileRes(res, 'image'));
  19514. },
  19515. fail: function fail(res) {
  19516. reject({
  19517. errMsg: res.errMsg.replace('chooseImage:fail', ERR_MSG_FAIL)
  19518. });
  19519. }
  19520. });
  19521. });
  19522. }
  19523. function chooseVideo(opts) {
  19524. var camera = opts.camera,
  19525. compressed = opts.compressed,
  19526. maxDuration = opts.maxDuration,
  19527. _opts$sourceType2 = opts.sourceType,
  19528. sourceType = _opts$sourceType2 === void 0 ? ['album', 'camera'] : _opts$sourceType2,
  19529. extension = opts.extension;
  19530. return new Promise(function (resolve, reject) {
  19531. uni.chooseVideo({
  19532. camera: camera,
  19533. compressed: compressed,
  19534. maxDuration: maxDuration,
  19535. sourceType: sourceType,
  19536. extension: extension,
  19537. success: function success(res) {
  19538. var tempFilePath = res.tempFilePath,
  19539. duration = res.duration,
  19540. size = res.size,
  19541. height = res.height,
  19542. width = res.width;
  19543. resolve(normalizeChooseAndUploadFileRes({
  19544. errMsg: 'chooseVideo:ok',
  19545. tempFilePaths: [tempFilePath],
  19546. tempFiles: [{
  19547. name: res.tempFile && res.tempFile.name || '',
  19548. path: tempFilePath,
  19549. size: size,
  19550. type: res.tempFile && res.tempFile.type || '',
  19551. width: width,
  19552. height: height,
  19553. duration: duration,
  19554. fileType: 'video',
  19555. cloudPath: ''
  19556. }]
  19557. }, 'video'));
  19558. },
  19559. fail: function fail(res) {
  19560. reject({
  19561. errMsg: res.errMsg.replace('chooseVideo:fail', ERR_MSG_FAIL)
  19562. });
  19563. }
  19564. });
  19565. });
  19566. }
  19567. function chooseAll(opts) {
  19568. var count = opts.count,
  19569. extension = opts.extension;
  19570. return new Promise(function (resolve, reject) {
  19571. var chooseFile = uni.chooseFile;
  19572. if (typeof wx !== 'undefined' && typeof wx.chooseMessageFile === 'function') {
  19573. chooseFile = wx.chooseMessageFile;
  19574. }
  19575. if (typeof chooseFile !== 'function') {
  19576. return reject({
  19577. errMsg: ERR_MSG_FAIL + ' 请指定 type 类型,该平台仅支持选择 image 或 video。'
  19578. });
  19579. }
  19580. chooseFile({
  19581. type: 'all',
  19582. count: count,
  19583. extension: extension,
  19584. success: function success(res) {
  19585. resolve(normalizeChooseAndUploadFileRes(res));
  19586. },
  19587. fail: function fail(res) {
  19588. reject({
  19589. errMsg: res.errMsg.replace('chooseFile:fail', ERR_MSG_FAIL)
  19590. });
  19591. }
  19592. });
  19593. });
  19594. }
  19595. function normalizeChooseAndUploadFileRes(res, fileType) {
  19596. res.tempFiles.forEach(function (item, index) {
  19597. if (!item.name) {
  19598. item.name = item.path.substring(item.path.lastIndexOf('/') + 1);
  19599. }
  19600. if (fileType) {
  19601. item.fileType = fileType;
  19602. }
  19603. item.cloudPath = Date.now() + '_' + index + item.name.substring(item.name.lastIndexOf('.'));
  19604. });
  19605. if (!res.tempFilePaths) {
  19606. res.tempFilePaths = res.tempFiles.map(function (file) {
  19607. return file.path;
  19608. });
  19609. }
  19610. return res;
  19611. }
  19612. function uploadCloudFiles(files) {
  19613. var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;
  19614. var _onUploadProgress = arguments.length > 2 ? arguments[2] : undefined;
  19615. files = JSON.parse(JSON.stringify(files));
  19616. var len = files.length;
  19617. var count = 0;
  19618. var self = this;
  19619. return new Promise(function (resolve) {
  19620. while (count < max) {
  19621. next();
  19622. }
  19623. function next() {
  19624. var cur = count++;
  19625. if (cur >= len) {
  19626. !files.find(function (item) {
  19627. return !item.url && !item.errMsg;
  19628. }) && resolve(files);
  19629. return;
  19630. }
  19631. var fileItem = files[cur];
  19632. var index = self.files.findIndex(function (v) {
  19633. return v.uuid === fileItem.uuid;
  19634. });
  19635. fileItem.url = '';
  19636. delete fileItem.errMsg;
  19637. uniCloud.uploadFile({
  19638. filePath: fileItem.path,
  19639. cloudPath: fileItem.cloudPath,
  19640. fileType: fileItem.fileType,
  19641. onUploadProgress: function onUploadProgress(res) {
  19642. res.index = index;
  19643. _onUploadProgress && _onUploadProgress(res);
  19644. }
  19645. }).then(function (res) {
  19646. fileItem.url = res.fileID;
  19647. fileItem.index = index;
  19648. if (cur < len) {
  19649. next();
  19650. }
  19651. }).catch(function (res) {
  19652. fileItem.errMsg = res.errMsg || res.message;
  19653. fileItem.index = index;
  19654. if (cur < len) {
  19655. next();
  19656. }
  19657. });
  19658. }
  19659. });
  19660. }
  19661. function uploadFiles(choosePromise, _ref) {
  19662. var onChooseFile = _ref.onChooseFile,
  19663. onUploadProgress = _ref.onUploadProgress;
  19664. return choosePromise.then(function (res) {
  19665. if (onChooseFile) {
  19666. var customChooseRes = onChooseFile(res);
  19667. if (typeof customChooseRes !== 'undefined') {
  19668. return Promise.resolve(customChooseRes).then(function (chooseRes) {
  19669. return typeof chooseRes === 'undefined' ? res : chooseRes;
  19670. });
  19671. }
  19672. }
  19673. return res;
  19674. }).then(function (res) {
  19675. if (res === false) {
  19676. return {
  19677. errMsg: ERR_MSG_OK,
  19678. tempFilePaths: [],
  19679. tempFiles: []
  19680. };
  19681. }
  19682. return res;
  19683. });
  19684. }
  19685. function chooseAndUploadFile() {
  19686. var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  19687. type: 'all'
  19688. };
  19689. if (opts.type === 'image') {
  19690. return uploadFiles(chooseImage(opts), opts);
  19691. } else if (opts.type === 'video') {
  19692. return uploadFiles(chooseVideo(opts), opts);
  19693. }
  19694. return uploadFiles(chooseAll(opts), opts);
  19695. }
  19696. /* 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"], __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js */ 288)["default"]))
  19697. /***/ }),
  19698. /***/ 303:
  19699. /*!**********************************************************************************************************!*\
  19700. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-file-picker/components/uni-file-picker/utils.js ***!
  19701. \**********************************************************************************************************/
  19702. /*! no static exports found */
  19703. /***/ (function(module, exports, __webpack_require__) {
  19704. "use strict";
  19705. /* WEBPACK VAR INJECTION */(function(uni) {
  19706. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  19707. Object.defineProperty(exports, "__esModule", {
  19708. value: true
  19709. });
  19710. exports.get_files_and_is_max = exports.get_file_info = exports.get_file_ext = exports.get_file_data = exports.get_extname = void 0;
  19711. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 44));
  19712. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 46));
  19713. /**
  19714. * 获取文件名和后缀
  19715. * @param {String} name
  19716. */
  19717. var get_file_ext = function get_file_ext(name) {
  19718. var last_len = name.lastIndexOf('.');
  19719. var len = name.length;
  19720. return {
  19721. name: name.substring(0, last_len),
  19722. ext: name.substring(last_len + 1, len)
  19723. };
  19724. };
  19725. /**
  19726. * 获取扩展名
  19727. * @param {Array} fileExtname
  19728. */
  19729. exports.get_file_ext = get_file_ext;
  19730. var get_extname = function get_extname(fileExtname) {
  19731. if (!Array.isArray(fileExtname)) {
  19732. var extname = fileExtname.replace(/(\[|\])/g, '');
  19733. return extname.split(',');
  19734. } else {
  19735. return fileExtname;
  19736. }
  19737. return [];
  19738. };
  19739. /**
  19740. * 获取文件和检测是否可选
  19741. */
  19742. exports.get_extname = get_extname;
  19743. var get_files_and_is_max = function get_files_and_is_max(res, _extname) {
  19744. var filePaths = [];
  19745. var files = [];
  19746. if (!_extname || _extname.length === 0) {
  19747. return {
  19748. filePaths: filePaths,
  19749. files: files
  19750. };
  19751. }
  19752. res.tempFiles.forEach(function (v) {
  19753. var fileFullName = get_file_ext(v.name);
  19754. var extname = fileFullName.ext.toLowerCase();
  19755. if (_extname.indexOf(extname) !== -1) {
  19756. files.push(v);
  19757. filePaths.push(v.path);
  19758. }
  19759. });
  19760. if (files.length !== res.tempFiles.length) {
  19761. uni.showToast({
  19762. title: "\u5F53\u524D\u9009\u62E9\u4E86".concat(res.tempFiles.length, "\u4E2A\u6587\u4EF6 \uFF0C").concat(res.tempFiles.length - files.length, " \u4E2A\u6587\u4EF6\u683C\u5F0F\u4E0D\u6B63\u786E"),
  19763. icon: 'none',
  19764. duration: 5000
  19765. });
  19766. }
  19767. return {
  19768. filePaths: filePaths,
  19769. files: files
  19770. };
  19771. };
  19772. /**
  19773. * 获取图片信息
  19774. * @param {Object} filepath
  19775. */
  19776. exports.get_files_and_is_max = get_files_and_is_max;
  19777. var get_file_info = function get_file_info(filepath) {
  19778. return new Promise(function (resolve, reject) {
  19779. uni.getImageInfo({
  19780. src: filepath,
  19781. success: function success(res) {
  19782. resolve(res);
  19783. },
  19784. fail: function fail(err) {
  19785. reject(err);
  19786. }
  19787. });
  19788. });
  19789. };
  19790. /**
  19791. * 获取封装数据
  19792. */
  19793. exports.get_file_info = get_file_info;
  19794. var get_file_data = /*#__PURE__*/function () {
  19795. var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(files) {
  19796. var type,
  19797. fileFullName,
  19798. extname,
  19799. filedata,
  19800. imageinfo,
  19801. _args = arguments;
  19802. return _regenerator.default.wrap(function _callee$(_context) {
  19803. while (1) {
  19804. switch (_context.prev = _context.next) {
  19805. case 0:
  19806. type = _args.length > 1 && _args[1] !== undefined ? _args[1] : 'image';
  19807. // 最终需要上传数据库的数据
  19808. fileFullName = get_file_ext(files.name);
  19809. extname = fileFullName.ext.toLowerCase();
  19810. filedata = {
  19811. name: files.name,
  19812. uuid: files.uuid,
  19813. extname: extname || '',
  19814. cloudPath: files.cloudPath,
  19815. fileType: files.fileType,
  19816. url: files.path || files.path,
  19817. size: files.size,
  19818. //单位是字节
  19819. image: {},
  19820. path: files.path,
  19821. video: {}
  19822. };
  19823. if (!(type === 'image')) {
  19824. _context.next = 14;
  19825. break;
  19826. }
  19827. _context.next = 7;
  19828. return get_file_info(files.path);
  19829. case 7:
  19830. imageinfo = _context.sent;
  19831. delete filedata.video;
  19832. filedata.image.width = imageinfo.width;
  19833. filedata.image.height = imageinfo.height;
  19834. filedata.image.location = imageinfo.path;
  19835. _context.next = 15;
  19836. break;
  19837. case 14:
  19838. delete filedata.image;
  19839. case 15:
  19840. return _context.abrupt("return", filedata);
  19841. case 16:
  19842. case "end":
  19843. return _context.stop();
  19844. }
  19845. }
  19846. }, _callee);
  19847. }));
  19848. return function get_file_data(_x) {
  19849. return _ref.apply(this, arguments);
  19850. };
  19851. }();
  19852. exports.get_file_data = get_file_data;
  19853. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  19854. /***/ }),
  19855. /***/ 32:
  19856. /*!**********************************************************************************************************!*\
  19857. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  19858. \**********************************************************************************************************/
  19859. /*! exports provided: default */
  19860. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19861. "use strict";
  19862. __webpack_require__.r(__webpack_exports__);
  19863. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  19864. /* globals __VUE_SSR_CONTEXT__ */
  19865. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  19866. // This module is a runtime utility for cleaner component module output and will
  19867. // be included in the final webpack user bundle.
  19868. function normalizeComponent (
  19869. scriptExports,
  19870. render,
  19871. staticRenderFns,
  19872. functionalTemplate,
  19873. injectStyles,
  19874. scopeId,
  19875. moduleIdentifier, /* server only */
  19876. shadowMode, /* vue-cli only */
  19877. components, // fixed by xxxxxx auto components
  19878. renderjs // fixed by xxxxxx renderjs
  19879. ) {
  19880. // Vue.extend constructor export interop
  19881. var options = typeof scriptExports === 'function'
  19882. ? scriptExports.options
  19883. : scriptExports
  19884. // fixed by xxxxxx auto components
  19885. if (components) {
  19886. if (!options.components) {
  19887. options.components = {}
  19888. }
  19889. var hasOwn = Object.prototype.hasOwnProperty
  19890. for (var name in components) {
  19891. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  19892. options.components[name] = components[name]
  19893. }
  19894. }
  19895. }
  19896. // fixed by xxxxxx renderjs
  19897. if (renderjs) {
  19898. if(typeof renderjs.beforeCreate === 'function'){
  19899. renderjs.beforeCreate = [renderjs.beforeCreate]
  19900. }
  19901. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  19902. this[renderjs.__module] = this
  19903. });
  19904. (options.mixins || (options.mixins = [])).push(renderjs)
  19905. }
  19906. // render functions
  19907. if (render) {
  19908. options.render = render
  19909. options.staticRenderFns = staticRenderFns
  19910. options._compiled = true
  19911. }
  19912. // functional template
  19913. if (functionalTemplate) {
  19914. options.functional = true
  19915. }
  19916. // scopedId
  19917. if (scopeId) {
  19918. options._scopeId = 'data-v-' + scopeId
  19919. }
  19920. var hook
  19921. if (moduleIdentifier) { // server build
  19922. hook = function (context) {
  19923. // 2.3 injection
  19924. context =
  19925. context || // cached call
  19926. (this.$vnode && this.$vnode.ssrContext) || // stateful
  19927. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  19928. // 2.2 with runInNewContext: true
  19929. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  19930. context = __VUE_SSR_CONTEXT__
  19931. }
  19932. // inject component styles
  19933. if (injectStyles) {
  19934. injectStyles.call(this, context)
  19935. }
  19936. // register component module identifier for async chunk inferrence
  19937. if (context && context._registeredComponents) {
  19938. context._registeredComponents.add(moduleIdentifier)
  19939. }
  19940. }
  19941. // used by ssr in case component is cached and beforeCreate
  19942. // never gets called
  19943. options._ssrRegister = hook
  19944. } else if (injectStyles) {
  19945. hook = shadowMode
  19946. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  19947. : injectStyles
  19948. }
  19949. if (hook) {
  19950. if (options.functional) {
  19951. // for template-only hot-reload because in that case the render fn doesn't
  19952. // go through the normalizer
  19953. options._injectStyles = hook
  19954. // register for functioal component in vue file
  19955. var originalRender = options.render
  19956. options.render = function renderWithStyleInjection (h, context) {
  19957. hook.call(context)
  19958. return originalRender(h, context)
  19959. }
  19960. } else {
  19961. // inject component registration as beforeCreate hook
  19962. var existing = options.beforeCreate
  19963. options.beforeCreate = existing
  19964. ? [].concat(existing, hook)
  19965. : [hook]
  19966. }
  19967. }
  19968. return {
  19969. exports: scriptExports,
  19970. options: options
  19971. }
  19972. }
  19973. /***/ }),
  19974. /***/ 325:
  19975. /*!******************************************************************************************************************!*\
  19976. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-transition/components/uni-transition/createAnimation.js ***!
  19977. \******************************************************************************************************************/
  19978. /*! no static exports found */
  19979. /***/ (function(module, exports, __webpack_require__) {
  19980. "use strict";
  19981. /* WEBPACK VAR INJECTION */(function(uni) {
  19982. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  19983. Object.defineProperty(exports, "__esModule", {
  19984. value: true
  19985. });
  19986. exports.createAnimation = createAnimation;
  19987. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  19988. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  19989. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  19990. 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; }
  19991. 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; }
  19992. // const defaultOption = {
  19993. // duration: 300,
  19994. // timingFunction: 'linear',
  19995. // delay: 0,
  19996. // transformOrigin: '50% 50% 0'
  19997. // }
  19998. var MPAnimation = /*#__PURE__*/function () {
  19999. function MPAnimation(options, _this) {
  20000. (0, _classCallCheck2.default)(this, MPAnimation);
  20001. this.options = options;
  20002. this.animation = uni.createAnimation(options);
  20003. this.currentStepAnimates = {};
  20004. this.next = 0;
  20005. this.$ = _this;
  20006. }
  20007. (0, _createClass2.default)(MPAnimation, [{
  20008. key: "_nvuePushAnimates",
  20009. value: function _nvuePushAnimates(type, args) {
  20010. var aniObj = this.currentStepAnimates[this.next];
  20011. var styles = {};
  20012. if (!aniObj) {
  20013. styles = {
  20014. styles: {},
  20015. config: {}
  20016. };
  20017. } else {
  20018. styles = aniObj;
  20019. }
  20020. if (animateTypes1.includes(type)) {
  20021. if (!styles.styles.transform) {
  20022. styles.styles.transform = '';
  20023. }
  20024. var unit = '';
  20025. if (type === 'rotate') {
  20026. unit = 'deg';
  20027. }
  20028. styles.styles.transform += "".concat(type, "(").concat(args + unit, ") ");
  20029. } else {
  20030. styles.styles[type] = "".concat(args);
  20031. }
  20032. this.currentStepAnimates[this.next] = styles;
  20033. }
  20034. }, {
  20035. key: "_animateRun",
  20036. value: function _animateRun() {
  20037. var styles = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  20038. var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  20039. var ref = this.$.$refs['ani'].ref;
  20040. if (!ref) return;
  20041. return new Promise(function (resolve, reject) {
  20042. nvueAnimation.transition(ref, _objectSpread({
  20043. styles: styles
  20044. }, config), function (res) {
  20045. resolve();
  20046. });
  20047. });
  20048. }
  20049. }, {
  20050. key: "_nvueNextAnimate",
  20051. value: function _nvueNextAnimate(animates) {
  20052. var _this2 = this;
  20053. var step = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
  20054. var fn = arguments.length > 2 ? arguments[2] : undefined;
  20055. var obj = animates[step];
  20056. if (obj) {
  20057. var styles = obj.styles,
  20058. config = obj.config;
  20059. this._animateRun(styles, config).then(function () {
  20060. step += 1;
  20061. _this2._nvueNextAnimate(animates, step, fn);
  20062. });
  20063. } else {
  20064. this.currentStepAnimates = {};
  20065. typeof fn === 'function' && fn();
  20066. this.isEnd = true;
  20067. }
  20068. }
  20069. }, {
  20070. key: "step",
  20071. value: function step() {
  20072. var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  20073. this.animation.step(config);
  20074. return this;
  20075. }
  20076. }, {
  20077. key: "run",
  20078. value: function run(fn) {
  20079. this.$.animationData = this.animation.export();
  20080. this.$.timer = setTimeout(function () {
  20081. typeof fn === 'function' && fn();
  20082. }, this.$.durationTime);
  20083. }
  20084. }]);
  20085. return MPAnimation;
  20086. }();
  20087. var animateTypes1 = ['matrix', 'matrix3d', 'rotate', 'rotate3d', 'rotateX', 'rotateY', 'rotateZ', 'scale', 'scale3d', 'scaleX', 'scaleY', 'scaleZ', 'skew', 'skewX', 'skewY', 'translate', 'translate3d', 'translateX', 'translateY', 'translateZ'];
  20088. var animateTypes2 = ['opacity', 'backgroundColor'];
  20089. var animateTypes3 = ['width', 'height', 'left', 'right', 'top', 'bottom'];
  20090. animateTypes1.concat(animateTypes2, animateTypes3).forEach(function (type) {
  20091. MPAnimation.prototype[type] = function () {
  20092. var _this$animation;
  20093. (_this$animation = this.animation)[type].apply(_this$animation, arguments);
  20094. return this;
  20095. };
  20096. });
  20097. function createAnimation(option, _this) {
  20098. if (!_this) return;
  20099. clearTimeout(_this.timer);
  20100. return new MPAnimation(option, _this);
  20101. }
  20102. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  20103. /***/ }),
  20104. /***/ 33:
  20105. /*!*******************************************************************!*\
  20106. !*** E:/work/Project_newGit/UniappShell/uni.promisify.adaptor.js ***!
  20107. \*******************************************************************/
  20108. /*! no static exports found */
  20109. /***/ (function(module, exports, __webpack_require__) {
  20110. /* WEBPACK VAR INJECTION */(function(uni) {var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  20111. uni.addInterceptor({
  20112. returnValue: function returnValue(res) {
  20113. if (!(!!res && (_typeof(res) === "object" || typeof res === "function") && typeof res.then === "function")) {
  20114. return res;
  20115. }
  20116. return new Promise(function (resolve, reject) {
  20117. res.then(function (res) {
  20118. return res[0] ? reject(res[0]) : resolve(res[1]);
  20119. });
  20120. });
  20121. }
  20122. });
  20123. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  20124. /***/ }),
  20125. /***/ 345:
  20126. /*!***********************************************************************************************************!*\
  20127. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js ***!
  20128. \***********************************************************************************************************/
  20129. /*! no static exports found */
  20130. /***/ (function(module, exports, __webpack_require__) {
  20131. "use strict";
  20132. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20133. Object.defineProperty(exports, "__esModule", {
  20134. value: true
  20135. });
  20136. exports.default = void 0;
  20137. var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 346));
  20138. var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 347));
  20139. var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 348));
  20140. var _default = {
  20141. en: _en.default,
  20142. 'zh-Hans': _zhHans.default,
  20143. 'zh-Hant': _zhHant.default
  20144. };
  20145. exports.default = _default;
  20146. /***/ }),
  20147. /***/ 346:
  20148. /*!**********************************************************************************************************!*\
  20149. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json ***!
  20150. \**********************************************************************************************************/
  20151. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  20152. /***/ (function(module) {
  20153. 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\"}");
  20154. /***/ }),
  20155. /***/ 347:
  20156. /*!***************************************************************************************************************!*\
  20157. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json ***!
  20158. \***************************************************************************************************************/
  20159. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  20160. /***/ (function(module) {
  20161. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉显示更多\",\"uni-load-more.contentrefresh\":\"正在加载...\",\"uni-load-more.contentnomore\":\"没有更多数据了\"}");
  20162. /***/ }),
  20163. /***/ 348:
  20164. /*!***************************************************************************************************************!*\
  20165. !*** E:/work/Project_newGit/UniappShell/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json ***!
  20166. \***************************************************************************************************************/
  20167. /*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
  20168. /***/ (function(module) {
  20169. module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉顯示更多\",\"uni-load-more.contentrefresh\":\"正在加載...\",\"uni-load-more.contentnomore\":\"沒有更多數據了\"}");
  20170. /***/ }),
  20171. /***/ 4:
  20172. /*!**********************************************************************!*\
  20173. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  20174. \**********************************************************************/
  20175. /*! no static exports found */
  20176. /***/ (function(module, exports) {
  20177. function _interopRequireDefault(obj) {
  20178. return obj && obj.__esModule ? obj : {
  20179. "default": obj
  20180. };
  20181. }
  20182. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  20183. /***/ }),
  20184. /***/ 40:
  20185. /*!*********************************************************!*\
  20186. !*** E:/work/Project_newGit/UniappShell/store/index.js ***!
  20187. \*********************************************************/
  20188. /*! no static exports found */
  20189. /***/ (function(module, exports, __webpack_require__) {
  20190. "use strict";
  20191. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  20192. Object.defineProperty(exports, "__esModule", {
  20193. value: true
  20194. });
  20195. exports.default = void 0;
  20196. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  20197. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 41));
  20198. _vue.default.use(_vuex.default);
  20199. //实例store对象
  20200. var store = new _vuex.default.Store({
  20201. state: {
  20202. access_token: "",
  20203. jpush: null
  20204. },
  20205. mutations: {
  20206. setToken: function setToken(state, token) {
  20207. state.access_token = token;
  20208. },
  20209. initJpush: function initJpush(state, jpush) {
  20210. state.jpush = jpush;
  20211. }
  20212. }
  20213. });
  20214. //导出store对象
  20215. var _default = store;
  20216. exports.default = _default;
  20217. /***/ }),
  20218. /***/ 41:
  20219. /*!**************************************************************************************!*\
  20220. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  20221. \**************************************************************************************/
  20222. /*! no static exports found */
  20223. /***/ (function(module, exports, __webpack_require__) {
  20224. "use strict";
  20225. /* WEBPACK VAR INJECTION */(function(global) {/*!
  20226. * vuex v3.6.2
  20227. * (c) 2021 Evan You
  20228. * @license MIT
  20229. */
  20230. function applyMixin (Vue) {
  20231. var version = Number(Vue.version.split('.')[0]);
  20232. if (version >= 2) {
  20233. Vue.mixin({ beforeCreate: vuexInit });
  20234. } else {
  20235. // override init and inject vuex init procedure
  20236. // for 1.x backwards compatibility.
  20237. var _init = Vue.prototype._init;
  20238. Vue.prototype._init = function (options) {
  20239. if ( options === void 0 ) options = {};
  20240. options.init = options.init
  20241. ? [vuexInit].concat(options.init)
  20242. : vuexInit;
  20243. _init.call(this, options);
  20244. };
  20245. }
  20246. /**
  20247. * Vuex init hook, injected into each instances init hooks list.
  20248. */
  20249. function vuexInit () {
  20250. var options = this.$options;
  20251. // store injection
  20252. if (options.store) {
  20253. this.$store = typeof options.store === 'function'
  20254. ? options.store()
  20255. : options.store;
  20256. } else if (options.parent && options.parent.$store) {
  20257. this.$store = options.parent.$store;
  20258. }
  20259. }
  20260. }
  20261. var target = typeof window !== 'undefined'
  20262. ? window
  20263. : typeof global !== 'undefined'
  20264. ? global
  20265. : {};
  20266. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  20267. function devtoolPlugin (store) {
  20268. if (!devtoolHook) { return }
  20269. store._devtoolHook = devtoolHook;
  20270. devtoolHook.emit('vuex:init', store);
  20271. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  20272. store.replaceState(targetState);
  20273. });
  20274. store.subscribe(function (mutation, state) {
  20275. devtoolHook.emit('vuex:mutation', mutation, state);
  20276. }, { prepend: true });
  20277. store.subscribeAction(function (action, state) {
  20278. devtoolHook.emit('vuex:action', action, state);
  20279. }, { prepend: true });
  20280. }
  20281. /**
  20282. * Get the first item that pass the test
  20283. * by second argument function
  20284. *
  20285. * @param {Array} list
  20286. * @param {Function} f
  20287. * @return {*}
  20288. */
  20289. function find (list, f) {
  20290. return list.filter(f)[0]
  20291. }
  20292. /**
  20293. * Deep copy the given object considering circular structure.
  20294. * This function caches all nested objects and its copies.
  20295. * If it detects circular structure, use cached copy to avoid infinite loop.
  20296. *
  20297. * @param {*} obj
  20298. * @param {Array<Object>} cache
  20299. * @return {*}
  20300. */
  20301. function deepCopy (obj, cache) {
  20302. if ( cache === void 0 ) cache = [];
  20303. // just return if obj is immutable value
  20304. if (obj === null || typeof obj !== 'object') {
  20305. return obj
  20306. }
  20307. // if obj is hit, it is in circular structure
  20308. var hit = find(cache, function (c) { return c.original === obj; });
  20309. if (hit) {
  20310. return hit.copy
  20311. }
  20312. var copy = Array.isArray(obj) ? [] : {};
  20313. // put the copy into cache at first
  20314. // because we want to refer it in recursive deepCopy
  20315. cache.push({
  20316. original: obj,
  20317. copy: copy
  20318. });
  20319. Object.keys(obj).forEach(function (key) {
  20320. copy[key] = deepCopy(obj[key], cache);
  20321. });
  20322. return copy
  20323. }
  20324. /**
  20325. * forEach for object
  20326. */
  20327. function forEachValue (obj, fn) {
  20328. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  20329. }
  20330. function isObject (obj) {
  20331. return obj !== null && typeof obj === 'object'
  20332. }
  20333. function isPromise (val) {
  20334. return val && typeof val.then === 'function'
  20335. }
  20336. function assert (condition, msg) {
  20337. if (!condition) { throw new Error(("[vuex] " + msg)) }
  20338. }
  20339. function partial (fn, arg) {
  20340. return function () {
  20341. return fn(arg)
  20342. }
  20343. }
  20344. // Base data struct for store's module, package with some attribute and method
  20345. var Module = function Module (rawModule, runtime) {
  20346. this.runtime = runtime;
  20347. // Store some children item
  20348. this._children = Object.create(null);
  20349. // Store the origin module object which passed by programmer
  20350. this._rawModule = rawModule;
  20351. var rawState = rawModule.state;
  20352. // Store the origin module's state
  20353. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  20354. };
  20355. var prototypeAccessors = { namespaced: { configurable: true } };
  20356. prototypeAccessors.namespaced.get = function () {
  20357. return !!this._rawModule.namespaced
  20358. };
  20359. Module.prototype.addChild = function addChild (key, module) {
  20360. this._children[key] = module;
  20361. };
  20362. Module.prototype.removeChild = function removeChild (key) {
  20363. delete this._children[key];
  20364. };
  20365. Module.prototype.getChild = function getChild (key) {
  20366. return this._children[key]
  20367. };
  20368. Module.prototype.hasChild = function hasChild (key) {
  20369. return key in this._children
  20370. };
  20371. Module.prototype.update = function update (rawModule) {
  20372. this._rawModule.namespaced = rawModule.namespaced;
  20373. if (rawModule.actions) {
  20374. this._rawModule.actions = rawModule.actions;
  20375. }
  20376. if (rawModule.mutations) {
  20377. this._rawModule.mutations = rawModule.mutations;
  20378. }
  20379. if (rawModule.getters) {
  20380. this._rawModule.getters = rawModule.getters;
  20381. }
  20382. };
  20383. Module.prototype.forEachChild = function forEachChild (fn) {
  20384. forEachValue(this._children, fn);
  20385. };
  20386. Module.prototype.forEachGetter = function forEachGetter (fn) {
  20387. if (this._rawModule.getters) {
  20388. forEachValue(this._rawModule.getters, fn);
  20389. }
  20390. };
  20391. Module.prototype.forEachAction = function forEachAction (fn) {
  20392. if (this._rawModule.actions) {
  20393. forEachValue(this._rawModule.actions, fn);
  20394. }
  20395. };
  20396. Module.prototype.forEachMutation = function forEachMutation (fn) {
  20397. if (this._rawModule.mutations) {
  20398. forEachValue(this._rawModule.mutations, fn);
  20399. }
  20400. };
  20401. Object.defineProperties( Module.prototype, prototypeAccessors );
  20402. var ModuleCollection = function ModuleCollection (rawRootModule) {
  20403. // register root module (Vuex.Store options)
  20404. this.register([], rawRootModule, false);
  20405. };
  20406. ModuleCollection.prototype.get = function get (path) {
  20407. return path.reduce(function (module, key) {
  20408. return module.getChild(key)
  20409. }, this.root)
  20410. };
  20411. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  20412. var module = this.root;
  20413. return path.reduce(function (namespace, key) {
  20414. module = module.getChild(key);
  20415. return namespace + (module.namespaced ? key + '/' : '')
  20416. }, '')
  20417. };
  20418. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  20419. update([], this.root, rawRootModule);
  20420. };
  20421. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  20422. var this$1 = this;
  20423. if ( runtime === void 0 ) runtime = true;
  20424. if ((true)) {
  20425. assertRawModule(path, rawModule);
  20426. }
  20427. var newModule = new Module(rawModule, runtime);
  20428. if (path.length === 0) {
  20429. this.root = newModule;
  20430. } else {
  20431. var parent = this.get(path.slice(0, -1));
  20432. parent.addChild(path[path.length - 1], newModule);
  20433. }
  20434. // register nested modules
  20435. if (rawModule.modules) {
  20436. forEachValue(rawModule.modules, function (rawChildModule, key) {
  20437. this$1.register(path.concat(key), rawChildModule, runtime);
  20438. });
  20439. }
  20440. };
  20441. ModuleCollection.prototype.unregister = function unregister (path) {
  20442. var parent = this.get(path.slice(0, -1));
  20443. var key = path[path.length - 1];
  20444. var child = parent.getChild(key);
  20445. if (!child) {
  20446. if ((true)) {
  20447. console.warn(
  20448. "[vuex] trying to unregister module '" + key + "', which is " +
  20449. "not registered"
  20450. );
  20451. }
  20452. return
  20453. }
  20454. if (!child.runtime) {
  20455. return
  20456. }
  20457. parent.removeChild(key);
  20458. };
  20459. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  20460. var parent = this.get(path.slice(0, -1));
  20461. var key = path[path.length - 1];
  20462. if (parent) {
  20463. return parent.hasChild(key)
  20464. }
  20465. return false
  20466. };
  20467. function update (path, targetModule, newModule) {
  20468. if ((true)) {
  20469. assertRawModule(path, newModule);
  20470. }
  20471. // update target module
  20472. targetModule.update(newModule);
  20473. // update nested modules
  20474. if (newModule.modules) {
  20475. for (var key in newModule.modules) {
  20476. if (!targetModule.getChild(key)) {
  20477. if ((true)) {
  20478. console.warn(
  20479. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  20480. 'manual reload is needed'
  20481. );
  20482. }
  20483. return
  20484. }
  20485. update(
  20486. path.concat(key),
  20487. targetModule.getChild(key),
  20488. newModule.modules[key]
  20489. );
  20490. }
  20491. }
  20492. }
  20493. var functionAssert = {
  20494. assert: function (value) { return typeof value === 'function'; },
  20495. expected: 'function'
  20496. };
  20497. var objectAssert = {
  20498. assert: function (value) { return typeof value === 'function' ||
  20499. (typeof value === 'object' && typeof value.handler === 'function'); },
  20500. expected: 'function or object with "handler" function'
  20501. };
  20502. var assertTypes = {
  20503. getters: functionAssert,
  20504. mutations: functionAssert,
  20505. actions: objectAssert
  20506. };
  20507. function assertRawModule (path, rawModule) {
  20508. Object.keys(assertTypes).forEach(function (key) {
  20509. if (!rawModule[key]) { return }
  20510. var assertOptions = assertTypes[key];
  20511. forEachValue(rawModule[key], function (value, type) {
  20512. assert(
  20513. assertOptions.assert(value),
  20514. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  20515. );
  20516. });
  20517. });
  20518. }
  20519. function makeAssertionMessage (path, key, type, value, expected) {
  20520. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  20521. if (path.length > 0) {
  20522. buf += " in module \"" + (path.join('.')) + "\"";
  20523. }
  20524. buf += " is " + (JSON.stringify(value)) + ".";
  20525. return buf
  20526. }
  20527. var Vue; // bind on install
  20528. var Store = function Store (options) {
  20529. var this$1 = this;
  20530. if ( options === void 0 ) options = {};
  20531. // Auto install if it is not done yet and `window` has `Vue`.
  20532. // To allow users to avoid auto-installation in some cases,
  20533. // this code should be placed here. See #731
  20534. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  20535. install(window.Vue);
  20536. }
  20537. if ((true)) {
  20538. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  20539. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  20540. assert(this instanceof Store, "store must be called with the new operator.");
  20541. }
  20542. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  20543. var strict = options.strict; if ( strict === void 0 ) strict = false;
  20544. // store internal state
  20545. this._committing = false;
  20546. this._actions = Object.create(null);
  20547. this._actionSubscribers = [];
  20548. this._mutations = Object.create(null);
  20549. this._wrappedGetters = Object.create(null);
  20550. this._modules = new ModuleCollection(options);
  20551. this._modulesNamespaceMap = Object.create(null);
  20552. this._subscribers = [];
  20553. this._watcherVM = new Vue();
  20554. this._makeLocalGettersCache = Object.create(null);
  20555. // bind commit and dispatch to self
  20556. var store = this;
  20557. var ref = this;
  20558. var dispatch = ref.dispatch;
  20559. var commit = ref.commit;
  20560. this.dispatch = function boundDispatch (type, payload) {
  20561. return dispatch.call(store, type, payload)
  20562. };
  20563. this.commit = function boundCommit (type, payload, options) {
  20564. return commit.call(store, type, payload, options)
  20565. };
  20566. // strict mode
  20567. this.strict = strict;
  20568. var state = this._modules.root.state;
  20569. // init root module.
  20570. // this also recursively registers all sub-modules
  20571. // and collects all module getters inside this._wrappedGetters
  20572. installModule(this, state, [], this._modules.root);
  20573. // initialize the store vm, which is responsible for the reactivity
  20574. // (also registers _wrappedGetters as computed properties)
  20575. resetStoreVM(this, state);
  20576. // apply plugins
  20577. plugins.forEach(function (plugin) { return plugin(this$1); });
  20578. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  20579. if (useDevtools) {
  20580. devtoolPlugin(this);
  20581. }
  20582. };
  20583. var prototypeAccessors$1 = { state: { configurable: true } };
  20584. prototypeAccessors$1.state.get = function () {
  20585. return this._vm._data.$$state
  20586. };
  20587. prototypeAccessors$1.state.set = function (v) {
  20588. if ((true)) {
  20589. assert(false, "use store.replaceState() to explicit replace store state.");
  20590. }
  20591. };
  20592. Store.prototype.commit = function commit (_type, _payload, _options) {
  20593. var this$1 = this;
  20594. // check object-style commit
  20595. var ref = unifyObjectStyle(_type, _payload, _options);
  20596. var type = ref.type;
  20597. var payload = ref.payload;
  20598. var options = ref.options;
  20599. var mutation = { type: type, payload: payload };
  20600. var entry = this._mutations[type];
  20601. if (!entry) {
  20602. if ((true)) {
  20603. console.error(("[vuex] unknown mutation type: " + type));
  20604. }
  20605. return
  20606. }
  20607. this._withCommit(function () {
  20608. entry.forEach(function commitIterator (handler) {
  20609. handler(payload);
  20610. });
  20611. });
  20612. this._subscribers
  20613. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  20614. .forEach(function (sub) { return sub(mutation, this$1.state); });
  20615. if (
  20616. ( true) &&
  20617. options && options.silent
  20618. ) {
  20619. console.warn(
  20620. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  20621. 'Use the filter functionality in the vue-devtools'
  20622. );
  20623. }
  20624. };
  20625. Store.prototype.dispatch = function dispatch (_type, _payload) {
  20626. var this$1 = this;
  20627. // check object-style dispatch
  20628. var ref = unifyObjectStyle(_type, _payload);
  20629. var type = ref.type;
  20630. var payload = ref.payload;
  20631. var action = { type: type, payload: payload };
  20632. var entry = this._actions[type];
  20633. if (!entry) {
  20634. if ((true)) {
  20635. console.error(("[vuex] unknown action type: " + type));
  20636. }
  20637. return
  20638. }
  20639. try {
  20640. this._actionSubscribers
  20641. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  20642. .filter(function (sub) { return sub.before; })
  20643. .forEach(function (sub) { return sub.before(action, this$1.state); });
  20644. } catch (e) {
  20645. if ((true)) {
  20646. console.warn("[vuex] error in before action subscribers: ");
  20647. console.error(e);
  20648. }
  20649. }
  20650. var result = entry.length > 1
  20651. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  20652. : entry[0](payload);
  20653. return new Promise(function (resolve, reject) {
  20654. result.then(function (res) {
  20655. try {
  20656. this$1._actionSubscribers
  20657. .filter(function (sub) { return sub.after; })
  20658. .forEach(function (sub) { return sub.after(action, this$1.state); });
  20659. } catch (e) {
  20660. if ((true)) {
  20661. console.warn("[vuex] error in after action subscribers: ");
  20662. console.error(e);
  20663. }
  20664. }
  20665. resolve(res);
  20666. }, function (error) {
  20667. try {
  20668. this$1._actionSubscribers
  20669. .filter(function (sub) { return sub.error; })
  20670. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  20671. } catch (e) {
  20672. if ((true)) {
  20673. console.warn("[vuex] error in error action subscribers: ");
  20674. console.error(e);
  20675. }
  20676. }
  20677. reject(error);
  20678. });
  20679. })
  20680. };
  20681. Store.prototype.subscribe = function subscribe (fn, options) {
  20682. return genericSubscribe(fn, this._subscribers, options)
  20683. };
  20684. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  20685. var subs = typeof fn === 'function' ? { before: fn } : fn;
  20686. return genericSubscribe(subs, this._actionSubscribers, options)
  20687. };
  20688. Store.prototype.watch = function watch (getter, cb, options) {
  20689. var this$1 = this;
  20690. if ((true)) {
  20691. assert(typeof getter === 'function', "store.watch only accepts a function.");
  20692. }
  20693. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  20694. };
  20695. Store.prototype.replaceState = function replaceState (state) {
  20696. var this$1 = this;
  20697. this._withCommit(function () {
  20698. this$1._vm._data.$$state = state;
  20699. });
  20700. };
  20701. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  20702. if ( options === void 0 ) options = {};
  20703. if (typeof path === 'string') { path = [path]; }
  20704. if ((true)) {
  20705. assert(Array.isArray(path), "module path must be a string or an Array.");
  20706. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  20707. }
  20708. this._modules.register(path, rawModule);
  20709. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  20710. // reset store to update getters...
  20711. resetStoreVM(this, this.state);
  20712. };
  20713. Store.prototype.unregisterModule = function unregisterModule (path) {
  20714. var this$1 = this;
  20715. if (typeof path === 'string') { path = [path]; }
  20716. if ((true)) {
  20717. assert(Array.isArray(path), "module path must be a string or an Array.");
  20718. }
  20719. this._modules.unregister(path);
  20720. this._withCommit(function () {
  20721. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  20722. Vue.delete(parentState, path[path.length - 1]);
  20723. });
  20724. resetStore(this);
  20725. };
  20726. Store.prototype.hasModule = function hasModule (path) {
  20727. if (typeof path === 'string') { path = [path]; }
  20728. if ((true)) {
  20729. assert(Array.isArray(path), "module path must be a string or an Array.");
  20730. }
  20731. return this._modules.isRegistered(path)
  20732. };
  20733. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  20734. this._modules.update(newOptions);
  20735. resetStore(this, true);
  20736. };
  20737. Store.prototype._withCommit = function _withCommit (fn) {
  20738. var committing = this._committing;
  20739. this._committing = true;
  20740. fn();
  20741. this._committing = committing;
  20742. };
  20743. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  20744. function genericSubscribe (fn, subs, options) {
  20745. if (subs.indexOf(fn) < 0) {
  20746. options && options.prepend
  20747. ? subs.unshift(fn)
  20748. : subs.push(fn);
  20749. }
  20750. return function () {
  20751. var i = subs.indexOf(fn);
  20752. if (i > -1) {
  20753. subs.splice(i, 1);
  20754. }
  20755. }
  20756. }
  20757. function resetStore (store, hot) {
  20758. store._actions = Object.create(null);
  20759. store._mutations = Object.create(null);
  20760. store._wrappedGetters = Object.create(null);
  20761. store._modulesNamespaceMap = Object.create(null);
  20762. var state = store.state;
  20763. // init all modules
  20764. installModule(store, state, [], store._modules.root, true);
  20765. // reset vm
  20766. resetStoreVM(store, state, hot);
  20767. }
  20768. function resetStoreVM (store, state, hot) {
  20769. var oldVm = store._vm;
  20770. // bind store public getters
  20771. store.getters = {};
  20772. // reset local getters cache
  20773. store._makeLocalGettersCache = Object.create(null);
  20774. var wrappedGetters = store._wrappedGetters;
  20775. var computed = {};
  20776. forEachValue(wrappedGetters, function (fn, key) {
  20777. // use computed to leverage its lazy-caching mechanism
  20778. // direct inline function use will lead to closure preserving oldVm.
  20779. // using partial to return function with only arguments preserved in closure environment.
  20780. computed[key] = partial(fn, store);
  20781. Object.defineProperty(store.getters, key, {
  20782. get: function () { return store._vm[key]; },
  20783. enumerable: true // for local getters
  20784. });
  20785. });
  20786. // use a Vue instance to store the state tree
  20787. // suppress warnings just in case the user has added
  20788. // some funky global mixins
  20789. var silent = Vue.config.silent;
  20790. Vue.config.silent = true;
  20791. store._vm = new Vue({
  20792. data: {
  20793. $$state: state
  20794. },
  20795. computed: computed
  20796. });
  20797. Vue.config.silent = silent;
  20798. // enable strict mode for new vm
  20799. if (store.strict) {
  20800. enableStrictMode(store);
  20801. }
  20802. if (oldVm) {
  20803. if (hot) {
  20804. // dispatch changes in all subscribed watchers
  20805. // to force getter re-evaluation for hot reloading.
  20806. store._withCommit(function () {
  20807. oldVm._data.$$state = null;
  20808. });
  20809. }
  20810. Vue.nextTick(function () { return oldVm.$destroy(); });
  20811. }
  20812. }
  20813. function installModule (store, rootState, path, module, hot) {
  20814. var isRoot = !path.length;
  20815. var namespace = store._modules.getNamespace(path);
  20816. // register in namespace map
  20817. if (module.namespaced) {
  20818. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  20819. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  20820. }
  20821. store._modulesNamespaceMap[namespace] = module;
  20822. }
  20823. // set state
  20824. if (!isRoot && !hot) {
  20825. var parentState = getNestedState(rootState, path.slice(0, -1));
  20826. var moduleName = path[path.length - 1];
  20827. store._withCommit(function () {
  20828. if ((true)) {
  20829. if (moduleName in parentState) {
  20830. console.warn(
  20831. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  20832. );
  20833. }
  20834. }
  20835. Vue.set(parentState, moduleName, module.state);
  20836. });
  20837. }
  20838. var local = module.context = makeLocalContext(store, namespace, path);
  20839. module.forEachMutation(function (mutation, key) {
  20840. var namespacedType = namespace + key;
  20841. registerMutation(store, namespacedType, mutation, local);
  20842. });
  20843. module.forEachAction(function (action, key) {
  20844. var type = action.root ? key : namespace + key;
  20845. var handler = action.handler || action;
  20846. registerAction(store, type, handler, local);
  20847. });
  20848. module.forEachGetter(function (getter, key) {
  20849. var namespacedType = namespace + key;
  20850. registerGetter(store, namespacedType, getter, local);
  20851. });
  20852. module.forEachChild(function (child, key) {
  20853. installModule(store, rootState, path.concat(key), child, hot);
  20854. });
  20855. }
  20856. /**
  20857. * make localized dispatch, commit, getters and state
  20858. * if there is no namespace, just use root ones
  20859. */
  20860. function makeLocalContext (store, namespace, path) {
  20861. var noNamespace = namespace === '';
  20862. var local = {
  20863. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  20864. var args = unifyObjectStyle(_type, _payload, _options);
  20865. var payload = args.payload;
  20866. var options = args.options;
  20867. var type = args.type;
  20868. if (!options || !options.root) {
  20869. type = namespace + type;
  20870. if (( true) && !store._actions[type]) {
  20871. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  20872. return
  20873. }
  20874. }
  20875. return store.dispatch(type, payload)
  20876. },
  20877. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  20878. var args = unifyObjectStyle(_type, _payload, _options);
  20879. var payload = args.payload;
  20880. var options = args.options;
  20881. var type = args.type;
  20882. if (!options || !options.root) {
  20883. type = namespace + type;
  20884. if (( true) && !store._mutations[type]) {
  20885. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  20886. return
  20887. }
  20888. }
  20889. store.commit(type, payload, options);
  20890. }
  20891. };
  20892. // getters and state object must be gotten lazily
  20893. // because they will be changed by vm update
  20894. Object.defineProperties(local, {
  20895. getters: {
  20896. get: noNamespace
  20897. ? function () { return store.getters; }
  20898. : function () { return makeLocalGetters(store, namespace); }
  20899. },
  20900. state: {
  20901. get: function () { return getNestedState(store.state, path); }
  20902. }
  20903. });
  20904. return local
  20905. }
  20906. function makeLocalGetters (store, namespace) {
  20907. if (!store._makeLocalGettersCache[namespace]) {
  20908. var gettersProxy = {};
  20909. var splitPos = namespace.length;
  20910. Object.keys(store.getters).forEach(function (type) {
  20911. // skip if the target getter is not match this namespace
  20912. if (type.slice(0, splitPos) !== namespace) { return }
  20913. // extract local getter type
  20914. var localType = type.slice(splitPos);
  20915. // Add a port to the getters proxy.
  20916. // Define as getter property because
  20917. // we do not want to evaluate the getters in this time.
  20918. Object.defineProperty(gettersProxy, localType, {
  20919. get: function () { return store.getters[type]; },
  20920. enumerable: true
  20921. });
  20922. });
  20923. store._makeLocalGettersCache[namespace] = gettersProxy;
  20924. }
  20925. return store._makeLocalGettersCache[namespace]
  20926. }
  20927. function registerMutation (store, type, handler, local) {
  20928. var entry = store._mutations[type] || (store._mutations[type] = []);
  20929. entry.push(function wrappedMutationHandler (payload) {
  20930. handler.call(store, local.state, payload);
  20931. });
  20932. }
  20933. function registerAction (store, type, handler, local) {
  20934. var entry = store._actions[type] || (store._actions[type] = []);
  20935. entry.push(function wrappedActionHandler (payload) {
  20936. var res = handler.call(store, {
  20937. dispatch: local.dispatch,
  20938. commit: local.commit,
  20939. getters: local.getters,
  20940. state: local.state,
  20941. rootGetters: store.getters,
  20942. rootState: store.state
  20943. }, payload);
  20944. if (!isPromise(res)) {
  20945. res = Promise.resolve(res);
  20946. }
  20947. if (store._devtoolHook) {
  20948. return res.catch(function (err) {
  20949. store._devtoolHook.emit('vuex:error', err);
  20950. throw err
  20951. })
  20952. } else {
  20953. return res
  20954. }
  20955. });
  20956. }
  20957. function registerGetter (store, type, rawGetter, local) {
  20958. if (store._wrappedGetters[type]) {
  20959. if ((true)) {
  20960. console.error(("[vuex] duplicate getter key: " + type));
  20961. }
  20962. return
  20963. }
  20964. store._wrappedGetters[type] = function wrappedGetter (store) {
  20965. return rawGetter(
  20966. local.state, // local state
  20967. local.getters, // local getters
  20968. store.state, // root state
  20969. store.getters // root getters
  20970. )
  20971. };
  20972. }
  20973. function enableStrictMode (store) {
  20974. store._vm.$watch(function () { return this._data.$$state }, function () {
  20975. if ((true)) {
  20976. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  20977. }
  20978. }, { deep: true, sync: true });
  20979. }
  20980. function getNestedState (state, path) {
  20981. return path.reduce(function (state, key) { return state[key]; }, state)
  20982. }
  20983. function unifyObjectStyle (type, payload, options) {
  20984. if (isObject(type) && type.type) {
  20985. options = payload;
  20986. payload = type;
  20987. type = type.type;
  20988. }
  20989. if ((true)) {
  20990. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  20991. }
  20992. return { type: type, payload: payload, options: options }
  20993. }
  20994. function install (_Vue) {
  20995. if (Vue && _Vue === Vue) {
  20996. if ((true)) {
  20997. console.error(
  20998. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  20999. );
  21000. }
  21001. return
  21002. }
  21003. Vue = _Vue;
  21004. applyMixin(Vue);
  21005. }
  21006. /**
  21007. * Reduce the code which written in Vue.js for getting the state.
  21008. * @param {String} [namespace] - Module's namespace
  21009. * @param {Object|Array} states # Object's item can be a function which accept state and getters for param, you can do something for state and getters in it.
  21010. * @param {Object}
  21011. */
  21012. var mapState = normalizeNamespace(function (namespace, states) {
  21013. var res = {};
  21014. if (( true) && !isValidMap(states)) {
  21015. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  21016. }
  21017. normalizeMap(states).forEach(function (ref) {
  21018. var key = ref.key;
  21019. var val = ref.val;
  21020. res[key] = function mappedState () {
  21021. var state = this.$store.state;
  21022. var getters = this.$store.getters;
  21023. if (namespace) {
  21024. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  21025. if (!module) {
  21026. return
  21027. }
  21028. state = module.context.state;
  21029. getters = module.context.getters;
  21030. }
  21031. return typeof val === 'function'
  21032. ? val.call(this, state, getters)
  21033. : state[val]
  21034. };
  21035. // mark vuex getter for devtools
  21036. res[key].vuex = true;
  21037. });
  21038. return res
  21039. });
  21040. /**
  21041. * Reduce the code which written in Vue.js for committing the mutation
  21042. * @param {String} [namespace] - Module's namespace
  21043. * @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  21044. * @return {Object}
  21045. */
  21046. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  21047. var res = {};
  21048. if (( true) && !isValidMap(mutations)) {
  21049. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  21050. }
  21051. normalizeMap(mutations).forEach(function (ref) {
  21052. var key = ref.key;
  21053. var val = ref.val;
  21054. res[key] = function mappedMutation () {
  21055. var args = [], len = arguments.length;
  21056. while ( len-- ) args[ len ] = arguments[ len ];
  21057. // Get the commit method from store
  21058. var commit = this.$store.commit;
  21059. if (namespace) {
  21060. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  21061. if (!module) {
  21062. return
  21063. }
  21064. commit = module.context.commit;
  21065. }
  21066. return typeof val === 'function'
  21067. ? val.apply(this, [commit].concat(args))
  21068. : commit.apply(this.$store, [val].concat(args))
  21069. };
  21070. });
  21071. return res
  21072. });
  21073. /**
  21074. * Reduce the code which written in Vue.js for getting the getters
  21075. * @param {String} [namespace] - Module's namespace
  21076. * @param {Object|Array} getters
  21077. * @return {Object}
  21078. */
  21079. var mapGetters = normalizeNamespace(function (namespace, getters) {
  21080. var res = {};
  21081. if (( true) && !isValidMap(getters)) {
  21082. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  21083. }
  21084. normalizeMap(getters).forEach(function (ref) {
  21085. var key = ref.key;
  21086. var val = ref.val;
  21087. // The namespace has been mutated by normalizeNamespace
  21088. val = namespace + val;
  21089. res[key] = function mappedGetter () {
  21090. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  21091. return
  21092. }
  21093. if (( true) && !(val in this.$store.getters)) {
  21094. console.error(("[vuex] unknown getter: " + val));
  21095. return
  21096. }
  21097. return this.$store.getters[val]
  21098. };
  21099. // mark vuex getter for devtools
  21100. res[key].vuex = true;
  21101. });
  21102. return res
  21103. });
  21104. /**
  21105. * Reduce the code which written in Vue.js for dispatch the action
  21106. * @param {String} [namespace] - Module's namespace
  21107. * @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
  21108. * @return {Object}
  21109. */
  21110. var mapActions = normalizeNamespace(function (namespace, actions) {
  21111. var res = {};
  21112. if (( true) && !isValidMap(actions)) {
  21113. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  21114. }
  21115. normalizeMap(actions).forEach(function (ref) {
  21116. var key = ref.key;
  21117. var val = ref.val;
  21118. res[key] = function mappedAction () {
  21119. var args = [], len = arguments.length;
  21120. while ( len-- ) args[ len ] = arguments[ len ];
  21121. // get dispatch function from store
  21122. var dispatch = this.$store.dispatch;
  21123. if (namespace) {
  21124. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  21125. if (!module) {
  21126. return
  21127. }
  21128. dispatch = module.context.dispatch;
  21129. }
  21130. return typeof val === 'function'
  21131. ? val.apply(this, [dispatch].concat(args))
  21132. : dispatch.apply(this.$store, [val].concat(args))
  21133. };
  21134. });
  21135. return res
  21136. });
  21137. /**
  21138. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  21139. * @param {String} namespace
  21140. * @return {Object}
  21141. */
  21142. var createNamespacedHelpers = function (namespace) { return ({
  21143. mapState: mapState.bind(null, namespace),
  21144. mapGetters: mapGetters.bind(null, namespace),
  21145. mapMutations: mapMutations.bind(null, namespace),
  21146. mapActions: mapActions.bind(null, namespace)
  21147. }); };
  21148. /**
  21149. * Normalize the map
  21150. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  21151. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  21152. * @param {Array|Object} map
  21153. * @return {Object}
  21154. */
  21155. function normalizeMap (map) {
  21156. if (!isValidMap(map)) {
  21157. return []
  21158. }
  21159. return Array.isArray(map)
  21160. ? map.map(function (key) { return ({ key: key, val: key }); })
  21161. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  21162. }
  21163. /**
  21164. * Validate whether given map is valid or not
  21165. * @param {*} map
  21166. * @return {Boolean}
  21167. */
  21168. function isValidMap (map) {
  21169. return Array.isArray(map) || isObject(map)
  21170. }
  21171. /**
  21172. * Return a function expect two param contains namespace and map. it will normalize the namespace and then the param's function will handle the new namespace and the map.
  21173. * @param {Function} fn
  21174. * @return {Function}
  21175. */
  21176. function normalizeNamespace (fn) {
  21177. return function (namespace, map) {
  21178. if (typeof namespace !== 'string') {
  21179. map = namespace;
  21180. namespace = '';
  21181. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  21182. namespace += '/';
  21183. }
  21184. return fn(namespace, map)
  21185. }
  21186. }
  21187. /**
  21188. * Search a special module from store by namespace. if module not exist, print error message.
  21189. * @param {Object} store
  21190. * @param {String} helper
  21191. * @param {String} namespace
  21192. * @return {Object}
  21193. */
  21194. function getModuleByNamespace (store, helper, namespace) {
  21195. var module = store._modulesNamespaceMap[namespace];
  21196. if (( true) && !module) {
  21197. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  21198. }
  21199. return module
  21200. }
  21201. // Credits: borrowed code from fcomb/redux-logger
  21202. function createLogger (ref) {
  21203. if ( ref === void 0 ) ref = {};
  21204. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  21205. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  21206. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  21207. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  21208. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  21209. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  21210. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  21211. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  21212. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  21213. return function (store) {
  21214. var prevState = deepCopy(store.state);
  21215. if (typeof logger === 'undefined') {
  21216. return
  21217. }
  21218. if (logMutations) {
  21219. store.subscribe(function (mutation, state) {
  21220. var nextState = deepCopy(state);
  21221. if (filter(mutation, prevState, nextState)) {
  21222. var formattedTime = getFormattedTime();
  21223. var formattedMutation = mutationTransformer(mutation);
  21224. var message = "mutation " + (mutation.type) + formattedTime;
  21225. startMessage(logger, message, collapsed);
  21226. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  21227. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  21228. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  21229. endMessage(logger);
  21230. }
  21231. prevState = nextState;
  21232. });
  21233. }
  21234. if (logActions) {
  21235. store.subscribeAction(function (action, state) {
  21236. if (actionFilter(action, state)) {
  21237. var formattedTime = getFormattedTime();
  21238. var formattedAction = actionTransformer(action);
  21239. var message = "action " + (action.type) + formattedTime;
  21240. startMessage(logger, message, collapsed);
  21241. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  21242. endMessage(logger);
  21243. }
  21244. });
  21245. }
  21246. }
  21247. }
  21248. function startMessage (logger, message, collapsed) {
  21249. var startMessage = collapsed
  21250. ? logger.groupCollapsed
  21251. : logger.group;
  21252. // render
  21253. try {
  21254. startMessage.call(logger, message);
  21255. } catch (e) {
  21256. logger.log(message);
  21257. }
  21258. }
  21259. function endMessage (logger) {
  21260. try {
  21261. logger.groupEnd();
  21262. } catch (e) {
  21263. logger.log('—— log end ——');
  21264. }
  21265. }
  21266. function getFormattedTime () {
  21267. var time = new Date();
  21268. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  21269. }
  21270. function repeat (str, times) {
  21271. return (new Array(times + 1)).join(str)
  21272. }
  21273. function pad (num, maxLength) {
  21274. return repeat('0', maxLength - num.toString().length) + num
  21275. }
  21276. var index_cjs = {
  21277. Store: Store,
  21278. install: install,
  21279. version: '3.6.2',
  21280. mapState: mapState,
  21281. mapMutations: mapMutations,
  21282. mapGetters: mapGetters,
  21283. mapActions: mapActions,
  21284. createNamespacedHelpers: createNamespacedHelpers,
  21285. createLogger: createLogger
  21286. };
  21287. module.exports = index_cjs;
  21288. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  21289. /***/ }),
  21290. /***/ 42:
  21291. /*!*************************************************************!*\
  21292. !*** E:/work/Project_newGit/UniappShell/api/system/user.js ***!
  21293. \*************************************************************/
  21294. /*! no static exports found */
  21295. /***/ (function(module, exports, __webpack_require__) {
  21296. "use strict";
  21297. Object.defineProperty(exports, "__esModule", {
  21298. value: true
  21299. });
  21300. exports.getUserInfo = getUserInfo;
  21301. exports.getUserList = getUserList;
  21302. exports.getUserProfile = getUserProfile;
  21303. exports.login = login;
  21304. exports.logout = logout;
  21305. exports.register = register;
  21306. exports.updatePwd = updatePwd;
  21307. exports.updateUserProfile = updateUserProfile;
  21308. exports.uploadFile = uploadFile;
  21309. exports.wxWorkLogin = wxWorkLogin;
  21310. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  21311. function login(data) {
  21312. return (0, _request.request)({
  21313. url: '/login',
  21314. method: 'post',
  21315. header: {
  21316. 'content-type': "application/x-www-form-urlencoded"
  21317. },
  21318. data: data
  21319. });
  21320. }
  21321. // 获取用户基本信息
  21322. function getUserProfile() {
  21323. return (0, _request.request)({
  21324. url: '/user/profile',
  21325. method: 'GET'
  21326. });
  21327. }
  21328. // 更新用户基本信息
  21329. function updateUserProfile(data) {
  21330. return (0, _request.request)({
  21331. url: '/user/profile/update',
  21332. method: 'PUT',
  21333. data: data
  21334. });
  21335. }
  21336. function getUserInfo() {
  21337. return (0, _request.request)({
  21338. url: '/user/profile'
  21339. });
  21340. }
  21341. function logout() {
  21342. return (0, _request.request)({
  21343. url: '/logout',
  21344. method: 'GET'
  21345. });
  21346. }
  21347. function register(data) {
  21348. return (0, _request.request)({
  21349. url: '/user/register',
  21350. method: 'post',
  21351. data: data
  21352. });
  21353. }
  21354. /**公用上传接口 */
  21355. function uploadFile(data) {
  21356. return (0, _request.request)({
  21357. url: '/upload/file',
  21358. method: "post",
  21359. headers: {
  21360. 'Content-Type': 'multipart/form-data'
  21361. },
  21362. data: data
  21363. });
  21364. }
  21365. function updatePwd(data) {
  21366. return (0, _request.request)({
  21367. url: '/user/updatePassword',
  21368. method: "PUT",
  21369. data: data
  21370. });
  21371. }
  21372. //查询用户的带岗位
  21373. function getUserList() {
  21374. return (0, _request.request)({
  21375. url: '/user/select',
  21376. method: 'get'
  21377. });
  21378. }
  21379. //企业微信登录
  21380. function wxWorkLogin(_ref) {
  21381. var userId = _ref.userId,
  21382. code = _ref.code;
  21383. return (0, _request.request)({
  21384. url: "/user/updateWxUserId/".concat(userId, "/").concat(code),
  21385. method: 'post'
  21386. });
  21387. }
  21388. /***/ }),
  21389. /***/ 43:
  21390. /*!**********************************************************!*\
  21391. !*** E:/work/Project_newGit/UniappShell/libs/request.js ***!
  21392. \**********************************************************/
  21393. /*! no static exports found */
  21394. /***/ (function(module, exports, __webpack_require__) {
  21395. "use strict";
  21396. /* WEBPACK VAR INJECTION */(function(uni) {
  21397. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21398. Object.defineProperty(exports, "__esModule", {
  21399. value: true
  21400. });
  21401. exports.request = request;
  21402. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 44));
  21403. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  21404. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 46));
  21405. var _index = _interopRequireDefault(__webpack_require__(/*! @/config/index.js */ 47));
  21406. var _auth = __webpack_require__(/*! @/libs/auth.js */ 48);
  21407. 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; }
  21408. 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; }
  21409. var baseUrl = true ? _index.default.base.dev : undefined;
  21410. function request(_x) {
  21411. return _request.apply(this, arguments);
  21412. }
  21413. function _request() {
  21414. _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(params) {
  21415. return _regenerator.default.wrap(function _callee$(_context) {
  21416. while (1) {
  21417. switch (_context.prev = _context.next) {
  21418. case 0:
  21419. return _context.abrupt("return", new Promise(function (resolve, reject) {
  21420. try {
  21421. uni.showLoading({
  21422. title: '加载中',
  21423. mask: true
  21424. });
  21425. uni.request(_objectSpread(_objectSpread({}, formatRequestBody(params)), {}, {
  21426. success: function success(response) {
  21427. var data = response.data;
  21428. var code = data.code;
  21429. var msg = data.msg;
  21430. if (code === 200) {
  21431. resolve(data);
  21432. } else {
  21433. if (code === 401) {
  21434. uni.showToast({
  21435. title: "登录失效!",
  21436. mask: true,
  21437. icon: "none",
  21438. duration: 3000,
  21439. complete: function complete() {
  21440. // let pages=getCurrentPages()
  21441. // console.log({
  21442. // page:pages[pages.length-1].$route.fullPath
  21443. // })
  21444. // let qrcode=uni.getStorageSync('qrcode')
  21445. // if(qrcode){uni.setStorageSync('qrcode',qrcode)}
  21446. uni.clearStorageSync();
  21447. setTimeout(function () {
  21448. uni.reLaunch({
  21449. url: '/pages/login/index'
  21450. });
  21451. }, 3000);
  21452. }
  21453. });
  21454. } else {
  21455. reject(data);
  21456. uni.showToast({
  21457. title: msg,
  21458. mask: true,
  21459. duration: 3000,
  21460. icon: "none"
  21461. });
  21462. }
  21463. }
  21464. },
  21465. fail: function fail(res) {
  21466. uni.showToast({
  21467. title: res,
  21468. mask: true,
  21469. icon: "none"
  21470. });
  21471. reject(res);
  21472. },
  21473. complete: function complete(res) {
  21474. uni.hideLoading();
  21475. }
  21476. }));
  21477. } catch (err) {
  21478. console.log(err);
  21479. reject(err);
  21480. }
  21481. }));
  21482. case 1:
  21483. case "end":
  21484. return _context.stop();
  21485. }
  21486. }
  21487. }, _callee);
  21488. }));
  21489. return _request.apply(this, arguments);
  21490. }
  21491. function formatRequestBody(params) {
  21492. var url = params.url;
  21493. url = baseUrl + url;
  21494. var data = _objectSpread({}, params.data);
  21495. var header = _objectSpread(_objectSpread({}, params.header), {}, {
  21496. AppID: _index.default.appID,
  21497. AppKey: _index.default.appKey,
  21498. AppSecret: _index.default.appSecret
  21499. });
  21500. if ((0, _auth.getToken)()) {
  21501. header[_index.default.TokenKey] = (0, _auth.getToken)();
  21502. }
  21503. var method = params.method || "get";
  21504. var dataType = params.dataType || "json";
  21505. var requestBody = {
  21506. url: url,
  21507. data: data,
  21508. header: header,
  21509. method: method,
  21510. dataType: dataType
  21511. };
  21512. return requestBody;
  21513. }
  21514. ;
  21515. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21516. /***/ }),
  21517. /***/ 44:
  21518. /*!************************************************************************************************!*\
  21519. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  21520. \************************************************************************************************/
  21521. /*! no static exports found */
  21522. /***/ (function(module, exports, __webpack_require__) {
  21523. // TODO(Babel 8): Remove this file.
  21524. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 45)();
  21525. module.exports = runtime;
  21526. /***/ }),
  21527. /***/ 45:
  21528. /*!*******************************************************************!*\
  21529. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  21530. \*******************************************************************/
  21531. /*! no static exports found */
  21532. /***/ (function(module, exports, __webpack_require__) {
  21533. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  21534. function _regeneratorRuntime() {
  21535. "use strict";
  21536. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  21537. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  21538. return exports;
  21539. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  21540. var exports = {},
  21541. Op = Object.prototype,
  21542. hasOwn = Op.hasOwnProperty,
  21543. defineProperty = Object.defineProperty || function (obj, key, desc) {
  21544. obj[key] = desc.value;
  21545. },
  21546. $Symbol = "function" == typeof Symbol ? Symbol : {},
  21547. iteratorSymbol = $Symbol.iterator || "@@iterator",
  21548. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  21549. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  21550. function define(obj, key, value) {
  21551. return Object.defineProperty(obj, key, {
  21552. value: value,
  21553. enumerable: !0,
  21554. configurable: !0,
  21555. writable: !0
  21556. }), obj[key];
  21557. }
  21558. try {
  21559. define({}, "");
  21560. } catch (err) {
  21561. define = function define(obj, key, value) {
  21562. return obj[key] = value;
  21563. };
  21564. }
  21565. function wrap(innerFn, outerFn, self, tryLocsList) {
  21566. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  21567. generator = Object.create(protoGenerator.prototype),
  21568. context = new Context(tryLocsList || []);
  21569. return defineProperty(generator, "_invoke", {
  21570. value: makeInvokeMethod(innerFn, self, context)
  21571. }), generator;
  21572. }
  21573. function tryCatch(fn, obj, arg) {
  21574. try {
  21575. return {
  21576. type: "normal",
  21577. arg: fn.call(obj, arg)
  21578. };
  21579. } catch (err) {
  21580. return {
  21581. type: "throw",
  21582. arg: err
  21583. };
  21584. }
  21585. }
  21586. exports.wrap = wrap;
  21587. var ContinueSentinel = {};
  21588. function Generator() {}
  21589. function GeneratorFunction() {}
  21590. function GeneratorFunctionPrototype() {}
  21591. var IteratorPrototype = {};
  21592. define(IteratorPrototype, iteratorSymbol, function () {
  21593. return this;
  21594. });
  21595. var getProto = Object.getPrototypeOf,
  21596. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  21597. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  21598. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  21599. function defineIteratorMethods(prototype) {
  21600. ["next", "throw", "return"].forEach(function (method) {
  21601. define(prototype, method, function (arg) {
  21602. return this._invoke(method, arg);
  21603. });
  21604. });
  21605. }
  21606. function AsyncIterator(generator, PromiseImpl) {
  21607. function invoke(method, arg, resolve, reject) {
  21608. var record = tryCatch(generator[method], generator, arg);
  21609. if ("throw" !== record.type) {
  21610. var result = record.arg,
  21611. value = result.value;
  21612. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  21613. invoke("next", value, resolve, reject);
  21614. }, function (err) {
  21615. invoke("throw", err, resolve, reject);
  21616. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  21617. result.value = unwrapped, resolve(result);
  21618. }, function (error) {
  21619. return invoke("throw", error, resolve, reject);
  21620. });
  21621. }
  21622. reject(record.arg);
  21623. }
  21624. var previousPromise;
  21625. defineProperty(this, "_invoke", {
  21626. value: function value(method, arg) {
  21627. function callInvokeWithMethodAndArg() {
  21628. return new PromiseImpl(function (resolve, reject) {
  21629. invoke(method, arg, resolve, reject);
  21630. });
  21631. }
  21632. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  21633. }
  21634. });
  21635. }
  21636. function makeInvokeMethod(innerFn, self, context) {
  21637. var state = "suspendedStart";
  21638. return function (method, arg) {
  21639. if ("executing" === state) throw new Error("Generator is already running");
  21640. if ("completed" === state) {
  21641. if ("throw" === method) throw arg;
  21642. return doneResult();
  21643. }
  21644. for (context.method = method, context.arg = arg;;) {
  21645. var delegate = context.delegate;
  21646. if (delegate) {
  21647. var delegateResult = maybeInvokeDelegate(delegate, context);
  21648. if (delegateResult) {
  21649. if (delegateResult === ContinueSentinel) continue;
  21650. return delegateResult;
  21651. }
  21652. }
  21653. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  21654. if ("suspendedStart" === state) throw state = "completed", context.arg;
  21655. context.dispatchException(context.arg);
  21656. } else "return" === context.method && context.abrupt("return", context.arg);
  21657. state = "executing";
  21658. var record = tryCatch(innerFn, self, context);
  21659. if ("normal" === record.type) {
  21660. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  21661. return {
  21662. value: record.arg,
  21663. done: context.done
  21664. };
  21665. }
  21666. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  21667. }
  21668. };
  21669. }
  21670. function maybeInvokeDelegate(delegate, context) {
  21671. var methodName = context.method,
  21672. method = delegate.iterator[methodName];
  21673. 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;
  21674. var record = tryCatch(method, delegate.iterator, context.arg);
  21675. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  21676. var info = record.arg;
  21677. 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);
  21678. }
  21679. function pushTryEntry(locs) {
  21680. var entry = {
  21681. tryLoc: locs[0]
  21682. };
  21683. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  21684. }
  21685. function resetTryEntry(entry) {
  21686. var record = entry.completion || {};
  21687. record.type = "normal", delete record.arg, entry.completion = record;
  21688. }
  21689. function Context(tryLocsList) {
  21690. this.tryEntries = [{
  21691. tryLoc: "root"
  21692. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  21693. }
  21694. function values(iterable) {
  21695. if (iterable) {
  21696. var iteratorMethod = iterable[iteratorSymbol];
  21697. if (iteratorMethod) return iteratorMethod.call(iterable);
  21698. if ("function" == typeof iterable.next) return iterable;
  21699. if (!isNaN(iterable.length)) {
  21700. var i = -1,
  21701. next = function next() {
  21702. for (; ++i < iterable.length;) {
  21703. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  21704. }
  21705. return next.value = undefined, next.done = !0, next;
  21706. };
  21707. return next.next = next;
  21708. }
  21709. }
  21710. return {
  21711. next: doneResult
  21712. };
  21713. }
  21714. function doneResult() {
  21715. return {
  21716. value: undefined,
  21717. done: !0
  21718. };
  21719. }
  21720. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  21721. value: GeneratorFunctionPrototype,
  21722. configurable: !0
  21723. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  21724. value: GeneratorFunction,
  21725. configurable: !0
  21726. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  21727. var ctor = "function" == typeof genFun && genFun.constructor;
  21728. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  21729. }, exports.mark = function (genFun) {
  21730. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  21731. }, exports.awrap = function (arg) {
  21732. return {
  21733. __await: arg
  21734. };
  21735. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  21736. return this;
  21737. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  21738. void 0 === PromiseImpl && (PromiseImpl = Promise);
  21739. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  21740. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  21741. return result.done ? result.value : iter.next();
  21742. });
  21743. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  21744. return this;
  21745. }), define(Gp, "toString", function () {
  21746. return "[object Generator]";
  21747. }), exports.keys = function (val) {
  21748. var object = Object(val),
  21749. keys = [];
  21750. for (var key in object) {
  21751. keys.push(key);
  21752. }
  21753. return keys.reverse(), function next() {
  21754. for (; keys.length;) {
  21755. var key = keys.pop();
  21756. if (key in object) return next.value = key, next.done = !1, next;
  21757. }
  21758. return next.done = !0, next;
  21759. };
  21760. }, exports.values = values, Context.prototype = {
  21761. constructor: Context,
  21762. reset: function reset(skipTempReset) {
  21763. 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) {
  21764. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  21765. }
  21766. },
  21767. stop: function stop() {
  21768. this.done = !0;
  21769. var rootRecord = this.tryEntries[0].completion;
  21770. if ("throw" === rootRecord.type) throw rootRecord.arg;
  21771. return this.rval;
  21772. },
  21773. dispatchException: function dispatchException(exception) {
  21774. if (this.done) throw exception;
  21775. var context = this;
  21776. function handle(loc, caught) {
  21777. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  21778. }
  21779. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  21780. var entry = this.tryEntries[i],
  21781. record = entry.completion;
  21782. if ("root" === entry.tryLoc) return handle("end");
  21783. if (entry.tryLoc <= this.prev) {
  21784. var hasCatch = hasOwn.call(entry, "catchLoc"),
  21785. hasFinally = hasOwn.call(entry, "finallyLoc");
  21786. if (hasCatch && hasFinally) {
  21787. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  21788. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  21789. } else if (hasCatch) {
  21790. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  21791. } else {
  21792. if (!hasFinally) throw new Error("try statement without catch or finally");
  21793. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  21794. }
  21795. }
  21796. }
  21797. },
  21798. abrupt: function abrupt(type, arg) {
  21799. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  21800. var entry = this.tryEntries[i];
  21801. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  21802. var finallyEntry = entry;
  21803. break;
  21804. }
  21805. }
  21806. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  21807. var record = finallyEntry ? finallyEntry.completion : {};
  21808. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  21809. },
  21810. complete: function complete(record, afterLoc) {
  21811. if ("throw" === record.type) throw record.arg;
  21812. 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;
  21813. },
  21814. finish: function finish(finallyLoc) {
  21815. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  21816. var entry = this.tryEntries[i];
  21817. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  21818. }
  21819. },
  21820. "catch": function _catch(tryLoc) {
  21821. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  21822. var entry = this.tryEntries[i];
  21823. if (entry.tryLoc === tryLoc) {
  21824. var record = entry.completion;
  21825. if ("throw" === record.type) {
  21826. var thrown = record.arg;
  21827. resetTryEntry(entry);
  21828. }
  21829. return thrown;
  21830. }
  21831. }
  21832. throw new Error("illegal catch attempt");
  21833. },
  21834. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  21835. return this.delegate = {
  21836. iterator: values(iterable),
  21837. resultName: resultName,
  21838. nextLoc: nextLoc
  21839. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  21840. }
  21841. }, exports;
  21842. }
  21843. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  21844. /***/ }),
  21845. /***/ 46:
  21846. /*!*****************************************************************!*\
  21847. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  21848. \*****************************************************************/
  21849. /*! no static exports found */
  21850. /***/ (function(module, exports) {
  21851. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  21852. try {
  21853. var info = gen[key](arg);
  21854. var value = info.value;
  21855. } catch (error) {
  21856. reject(error);
  21857. return;
  21858. }
  21859. if (info.done) {
  21860. resolve(value);
  21861. } else {
  21862. Promise.resolve(value).then(_next, _throw);
  21863. }
  21864. }
  21865. function _asyncToGenerator(fn) {
  21866. return function () {
  21867. var self = this,
  21868. args = arguments;
  21869. return new Promise(function (resolve, reject) {
  21870. var gen = fn.apply(self, args);
  21871. function _next(value) {
  21872. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  21873. }
  21874. function _throw(err) {
  21875. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  21876. }
  21877. _next(undefined);
  21878. });
  21879. };
  21880. }
  21881. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  21882. /***/ }),
  21883. /***/ 47:
  21884. /*!**********************************************************!*\
  21885. !*** E:/work/Project_newGit/UniappShell/config/index.js ***!
  21886. \**********************************************************/
  21887. /*! no static exports found */
  21888. /***/ (function(module, exports, __webpack_require__) {
  21889. "use strict";
  21890. Object.defineProperty(exports, "__esModule", {
  21891. value: true
  21892. });
  21893. exports.default = void 0;
  21894. var _default = {
  21895. base: {
  21896. // dev: 'http://1.15.92.205:7001',
  21897. dev: 'https://api.xazhyc.com',
  21898. // dev: 'http://192.168.3.253:7001',
  21899. pro: 'https://api.xazhyc.com'
  21900. },
  21901. appID: '10007',
  21902. appKey: '82a8bf439373e311',
  21903. appSecret: '82a8bf439373e311',
  21904. permitTplId: 7,
  21905. TokenKey: "Authorization"
  21906. };
  21907. exports.default = _default;
  21908. /***/ }),
  21909. /***/ 48:
  21910. /*!*******************************************************!*\
  21911. !*** E:/work/Project_newGit/UniappShell/libs/auth.js ***!
  21912. \*******************************************************/
  21913. /*! no static exports found */
  21914. /***/ (function(module, exports, __webpack_require__) {
  21915. "use strict";
  21916. /* WEBPACK VAR INJECTION */(function(uni) {
  21917. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21918. Object.defineProperty(exports, "__esModule", {
  21919. value: true
  21920. });
  21921. exports.getToken = getToken;
  21922. exports.removeToken = removeToken;
  21923. exports.setToken = setToken;
  21924. var _index = _interopRequireDefault(__webpack_require__(/*! ../config/index.js */ 47));
  21925. var TokenKey = _index.default.TokenKey;
  21926. function getToken() {
  21927. return uni.getStorageSync(TokenKey);
  21928. }
  21929. function setToken(token) {
  21930. return uni.setStorageSync(TokenKey, token);
  21931. }
  21932. function removeToken() {
  21933. return uni.removeStorageSync(TokenKey);
  21934. }
  21935. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21936. /***/ }),
  21937. /***/ 5:
  21938. /*!**************************************************************!*\
  21939. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  21940. \**************************************************************/
  21941. /*! no static exports found */
  21942. /***/ (function(module, exports, __webpack_require__) {
  21943. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  21944. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  21945. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  21946. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  21947. function _slicedToArray(arr, i) {
  21948. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  21949. }
  21950. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  21951. /***/ }),
  21952. /***/ 57:
  21953. /*!************************************************************!*\
  21954. !*** E:/work/Project_newGit/UniappShell/api/system/art.js ***!
  21955. \************************************************************/
  21956. /*! no static exports found */
  21957. /***/ (function(module, exports, __webpack_require__) {
  21958. "use strict";
  21959. Object.defineProperty(exports, "__esModule", {
  21960. value: true
  21961. });
  21962. exports.getArtByList = getArtByList;
  21963. exports.getArtByPage = getArtByPage;
  21964. exports.getArtCatTop = getArtCatTop;
  21965. exports.getNotices = getNotices;
  21966. exports.getRecentArtByList = getRecentArtByList;
  21967. exports.getRecentListByArtCatAndLimit = getRecentListByArtCatAndLimit;
  21968. exports.getRecentListByLimit = getRecentListByLimit;
  21969. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  21970. function getNotices(data) {
  21971. return (0, _request.request)({
  21972. url: "/art/page",
  21973. data: data
  21974. });
  21975. }
  21976. /**
  21977. * 最近文章列表:50笔
  21978. * @param data
  21979. */
  21980. function getRecentArtByList(data) {
  21981. return (0, _request.request)({
  21982. url: '/art/recent',
  21983. method: 'GET',
  21984. data: data
  21985. });
  21986. }
  21987. /**
  21988. * 获取获取第1层文章分类
  21989. * @param data
  21990. * @returns
  21991. */
  21992. function getArtCatTop(data) {
  21993. return (0, _request.request)({
  21994. url: '/art/cat/top',
  21995. method: 'GET',
  21996. data: data
  21997. });
  21998. }
  21999. /**
  22000. * 文章列表
  22001. * @param data
  22002. */
  22003. function getArtByList(data) {
  22004. return (0, _request.request)({
  22005. url: '/art',
  22006. method: 'GET',
  22007. data: data
  22008. });
  22009. }
  22010. /**
  22011. * 文章列表
  22012. * @param data
  22013. */
  22014. function getArtByPage(data) {
  22015. return (0, _request.request)({
  22016. url: '/art/page',
  22017. method: 'GET',
  22018. data: data
  22019. });
  22020. }
  22021. /**
  22022. * 最近文章列表
  22023. * @param limit 限制笔数
  22024. */
  22025. function getRecentListByLimit(limit) {
  22026. return (0, _request.request)({
  22027. url: "/art/recent/".concat(limit),
  22028. method: 'GET'
  22029. });
  22030. }
  22031. /**
  22032. * 某个类别下的最近文章列表
  22033. * @param artCatId 分类
  22034. * @param limit 限制笔数
  22035. */
  22036. function getRecentListByArtCatAndLimit(artCatId, limit) {
  22037. return (0, _request.request)({
  22038. url: "/art/recent/".concat(artCatId, "/").concat(limit),
  22039. method: 'GET'
  22040. });
  22041. }
  22042. /***/ }),
  22043. /***/ 58:
  22044. /*!***************************************************************!*\
  22045. !*** E:/work/Project_newGit/UniappShell/api/aqpt/alertApi.js ***!
  22046. \***************************************************************/
  22047. /*! no static exports found */
  22048. /***/ (function(module, exports, __webpack_require__) {
  22049. "use strict";
  22050. Object.defineProperty(exports, "__esModule", {
  22051. value: true
  22052. });
  22053. exports.cancelAlert = cancelAlert;
  22054. exports.completeAlert = completeAlert;
  22055. exports.counterByStatus = counterByStatus;
  22056. exports.deleteAlertById = deleteAlertById;
  22057. exports.getAlertById = getAlertById;
  22058. exports.getAlertByList = getAlertByList;
  22059. exports.getAlertByPage = getAlertByPage;
  22060. exports.getAlertCounter = getAlertCounter;
  22061. exports.getAlertWaitingByList = getAlertWaitingByList;
  22062. exports.transferAlert = transferAlert;
  22063. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  22064. /**
  22065. * 分页查询
  22066. */
  22067. function getAlertByPage(data) {
  22068. return (0, _request.request)({
  22069. url: '/alert/page',
  22070. method: 'GET',
  22071. data: data
  22072. });
  22073. }
  22074. /**
  22075. * 列表查询
  22076. */
  22077. function getAlertByList(data) {
  22078. return (0, _request.request)({
  22079. url: '/alert',
  22080. method: 'GET',
  22081. data: data
  22082. });
  22083. }
  22084. /**
  22085. * 列表查询待处理告警
  22086. */
  22087. function getAlertWaitingByList(data) {
  22088. return (0, _request.request)({
  22089. url: '/alert/waiting',
  22090. method: 'GET',
  22091. data: data
  22092. });
  22093. }
  22094. /**
  22095. * 基于ID查询Alert
  22096. */
  22097. function getAlertById(alertId) {
  22098. return (0, _request.request)({
  22099. url: "/alert/".concat(alertId),
  22100. method: 'GET'
  22101. });
  22102. }
  22103. /**
  22104. * 完成处理
  22105. * @param data
  22106. * @returns
  22107. */
  22108. function completeAlert(data) {
  22109. return (0, _request.request)({
  22110. url: "/alert/complete",
  22111. method: 'POST',
  22112. data: data
  22113. });
  22114. }
  22115. /**
  22116. * 转交他人
  22117. * @param alertId
  22118. * @param data
  22119. * @returns
  22120. */
  22121. function transferAlert(alertId, data) {
  22122. return (0, _request.request)({
  22123. url: "/alert/transfer/".concat(alertId),
  22124. method: 'POST',
  22125. data: data
  22126. });
  22127. }
  22128. /**
  22129. * 撤消
  22130. * @param alertId
  22131. * @returns
  22132. */
  22133. function cancelAlert(alertId) {
  22134. return (0, _request.request)({
  22135. url: "/alert/cancel/".concat(alertId),
  22136. method: 'GET'
  22137. });
  22138. }
  22139. /**
  22140. * 删除
  22141. */
  22142. function deleteAlertById(alertId) {
  22143. return (0, _request.request)({
  22144. url: "/alert/".concat(alertId),
  22145. method: 'DELETE'
  22146. });
  22147. }
  22148. /**
  22149. * 查询统计结果
  22150. */
  22151. function counterByStatus(data) {
  22152. return (0, _request.request)({
  22153. url: '/alert/statis/counterByStatus',
  22154. method: 'GET',
  22155. data: data
  22156. });
  22157. }
  22158. /**
  22159. * 查询统计结果
  22160. */
  22161. function getAlertCounter() {
  22162. return (0, _request.request)({
  22163. url: '/alert/statis/getCounter',
  22164. method: 'GET'
  22165. });
  22166. }
  22167. /***/ }),
  22168. /***/ 59:
  22169. /*!****************************************************************!*\
  22170. !*** E:/work/Project_newGit/UniappShell/api/aqpt/dangerApi.js ***!
  22171. \****************************************************************/
  22172. /*! no static exports found */
  22173. /***/ (function(module, exports, __webpack_require__) {
  22174. "use strict";
  22175. Object.defineProperty(exports, "__esModule", {
  22176. value: true
  22177. });
  22178. exports.deleteDangerById = deleteDangerById;
  22179. exports.getDangerById = getDangerById;
  22180. exports.getDangerByList = getDangerByList;
  22181. exports.getDangerByPage = getDangerByPage;
  22182. exports.getDangerWaitingByList = getDangerWaitingByList;
  22183. exports.getRecentDangerByList = getRecentDangerByList;
  22184. exports.handleDanger = handleDanger;
  22185. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  22186. /**
  22187. * 获取Danger列表
  22188. * @param data
  22189. * @returns
  22190. */
  22191. function getDangerByList(data) {
  22192. return (0, _request.request)({
  22193. url: '/danger',
  22194. method: 'GET',
  22195. data: data
  22196. });
  22197. }
  22198. /**
  22199. * 获取Danger列表
  22200. * @param data
  22201. * @returns
  22202. */
  22203. function getRecentDangerByList(data) {
  22204. return (0, _request.request)({
  22205. url: '/danger/recent',
  22206. method: 'GET',
  22207. data: data
  22208. });
  22209. }
  22210. /**
  22211. * 查询待处理Danger列表
  22212. * @param data
  22213. * @returns
  22214. */
  22215. function getDangerWaitingByList(data) {
  22216. return (0, _request.request)({
  22217. url: '/danger/waiting',
  22218. method: 'GET',
  22219. data: data
  22220. });
  22221. }
  22222. /**
  22223. * 获取Danger分页
  22224. * @param data
  22225. * @returns
  22226. */
  22227. function getDangerByPage(data) {
  22228. return (0, _request.request)({
  22229. url: '/danger/page',
  22230. method: 'GET',
  22231. data: data
  22232. });
  22233. }
  22234. /**
  22235. * 根据Id获取Danger
  22236. * @param dangerId
  22237. * @returns
  22238. */
  22239. function getDangerById(dangerId) {
  22240. return (0, _request.request)({
  22241. url: "/danger/".concat(dangerId),
  22242. method: 'GET'
  22243. });
  22244. }
  22245. /**
  22246. * 删除Danger
  22247. * @param dangerId
  22248. * @returns
  22249. */
  22250. function deleteDangerById(dangerId) {
  22251. return (0, _request.request)({
  22252. url: "/danger/".concat(dangerId),
  22253. method: 'DELETE'
  22254. });
  22255. }
  22256. /**
  22257. * 处理Danger
  22258. * @param data
  22259. * @returns
  22260. */
  22261. function handleDanger(data) {
  22262. return (0, _request.request)({
  22263. url: "/danger/handle",
  22264. method: 'POST',
  22265. data: data
  22266. });
  22267. }
  22268. /***/ }),
  22269. /***/ 6:
  22270. /*!***************************************************************!*\
  22271. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  22272. \***************************************************************/
  22273. /*! no static exports found */
  22274. /***/ (function(module, exports) {
  22275. function _arrayWithHoles(arr) {
  22276. if (Array.isArray(arr)) return arr;
  22277. }
  22278. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22279. /***/ }),
  22280. /***/ 60:
  22281. /*!**************************************************************!*\
  22282. !*** E:/work/Project_newGit/UniappShell/api/aqpt/taskApi.js ***!
  22283. \**************************************************************/
  22284. /*! no static exports found */
  22285. /***/ (function(module, exports, __webpack_require__) {
  22286. "use strict";
  22287. Object.defineProperty(exports, "__esModule", {
  22288. value: true
  22289. });
  22290. exports.cancelTask = cancelTask;
  22291. exports.createTask = createTask;
  22292. exports.deleteTaskById = deleteTaskById;
  22293. exports.getRecentTaskByList = getRecentTaskByList;
  22294. exports.getTaskById = getTaskById;
  22295. exports.getTaskByList = getTaskByList;
  22296. exports.getTaskByPage = getTaskByPage;
  22297. exports.getWaitingTaskByList = getWaitingTaskByList;
  22298. exports.handleTask = handleTask;
  22299. exports.transferTask = transferTask;
  22300. exports.updateTask = updateTask;
  22301. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  22302. /**
  22303. * 分页查询Task
  22304. * @param data
  22305. * @returns
  22306. */
  22307. function getTaskByPage(data) {
  22308. return (0, _request.request)({
  22309. url: '/task/page',
  22310. method: 'GET',
  22311. data: data
  22312. });
  22313. }
  22314. /**
  22315. * 列表查询Task
  22316. * @param data
  22317. * @returns
  22318. */
  22319. function getTaskByList(data) {
  22320. return (0, _request.request)({
  22321. url: '/task',
  22322. method: 'GET',
  22323. data: data
  22324. });
  22325. }
  22326. /**
  22327. * 列表查询未执行Task
  22328. * @param data
  22329. * @returns
  22330. */
  22331. function getWaitingTaskByList(data) {
  22332. return (0, _request.request)({
  22333. url: '/task/waiting',
  22334. method: 'GET',
  22335. data: data
  22336. });
  22337. }
  22338. /**
  22339. * 列表查询Task: 50笔
  22340. * @param data
  22341. * @returns
  22342. */
  22343. function getRecentTaskByList(data) {
  22344. return (0, _request.request)({
  22345. url: '/task/recent',
  22346. method: 'GET',
  22347. data: data
  22348. });
  22349. }
  22350. /**
  22351. * @param taskId
  22352. * @returns
  22353. */
  22354. function getTaskById(taskId) {
  22355. return (0, _request.request)({
  22356. url: "/task/".concat(taskId),
  22357. method: 'GET'
  22358. });
  22359. }
  22360. /**
  22361. * 添加Task
  22362. * @param data
  22363. * @returns
  22364. */
  22365. function createTask(data) {
  22366. return (0, _request.request)({
  22367. url: "/task/add",
  22368. method: 'POST',
  22369. data: data
  22370. });
  22371. }
  22372. /**
  22373. * 更新Task
  22374. * @param data
  22375. * @returns
  22376. */
  22377. function updateTask(data) {
  22378. return (0, _request.request)({
  22379. url: "/task/update",
  22380. method: 'PUT',
  22381. data: data
  22382. });
  22383. }
  22384. /**
  22385. * 删除Task
  22386. * @param taskId
  22387. * @returns
  22388. */
  22389. function deleteTaskById(taskId) {
  22390. return (0, _request.request)({
  22391. url: "/task/".concat(taskId),
  22392. method: 'DELETE'
  22393. });
  22394. }
  22395. /**
  22396. * Handle Task
  22397. * @param taskId
  22398. * @returns
  22399. */
  22400. function handleTask(taskId) {
  22401. return (0, _request.request)({
  22402. url: "/task/handle/".concat(taskId),
  22403. method: 'PUT'
  22404. });
  22405. }
  22406. /**
  22407. * Transfer Task
  22408. * @param data
  22409. * @returns
  22410. */
  22411. function transferTask(data) {
  22412. return (0, _request.request)({
  22413. url: "/task/transfer",
  22414. method: 'PUT',
  22415. data: data
  22416. });
  22417. }
  22418. /**
  22419. * Cancel Task
  22420. * @param taskId
  22421. * @returns
  22422. */
  22423. function cancelTask(taskId) {
  22424. return (0, _request.request)({
  22425. url: "/task/cancel/".concat(taskId),
  22426. method: 'PUT'
  22427. });
  22428. }
  22429. /***/ }),
  22430. /***/ 61:
  22431. /*!**************************************************************!*\
  22432. !*** E:/work/Project_newGit/UniappShell/api/aqpt/warning.js ***!
  22433. \**************************************************************/
  22434. /*! no static exports found */
  22435. /***/ (function(module, exports, __webpack_require__) {
  22436. "use strict";
  22437. Object.defineProperty(exports, "__esModule", {
  22438. value: true
  22439. });
  22440. exports.getMyWarningWaitingTop = getMyWarningWaitingTop;
  22441. exports.getWarningByPage = getWarningByPage;
  22442. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  22443. /**
  22444. * 我的待处理告警TOP
  22445. */
  22446. function getMyWarningWaitingTop(limit) {
  22447. return (0, _request.request)({
  22448. url: "/warning/myWaiting/top/".concat(limit),
  22449. method: 'GET'
  22450. });
  22451. }
  22452. /**
  22453. * 分页查询告警
  22454. */
  22455. function getWarningByPage(data) {
  22456. return (0, _request.request)({
  22457. url: '/warning/page',
  22458. method: 'GET',
  22459. data: data
  22460. });
  22461. }
  22462. /***/ }),
  22463. /***/ 62:
  22464. /*!*******************************************************************!*\
  22465. !*** E:/work/Project_newGit/UniappShell/api/aqpt/checkTaskApi.js ***!
  22466. \*******************************************************************/
  22467. /*! no static exports found */
  22468. /***/ (function(module, exports, __webpack_require__) {
  22469. "use strict";
  22470. Object.defineProperty(exports, "__esModule", {
  22471. value: true
  22472. });
  22473. exports.cancelCheckTask = cancelCheckTask;
  22474. exports.completeCheckTask = completeCheckTask;
  22475. exports.createCheckTask = createCheckTask;
  22476. exports.deleteCheckTaskById = deleteCheckTaskById;
  22477. exports.getCheckTaskById = getCheckTaskById;
  22478. exports.getCheckTaskByList = getCheckTaskByList;
  22479. exports.getCheckTaskByPage = getCheckTaskByPage;
  22480. exports.getCheckTaskViewById = getCheckTaskViewById;
  22481. exports.handleCheckTask = handleCheckTask;
  22482. exports.transferCheckTask = transferCheckTask;
  22483. exports.updateCheckTask = updateCheckTask;
  22484. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  22485. /**
  22486. * 分页查询CheckTask
  22487. * @param data
  22488. */
  22489. function getCheckTaskByPage(data) {
  22490. return (0, _request.request)({
  22491. url: '/check/task/page',
  22492. method: 'GET',
  22493. params: data
  22494. });
  22495. }
  22496. /**
  22497. * 列表查询CheckTask
  22498. * @param data
  22499. */
  22500. function getCheckTaskByList(data) {
  22501. return (0, _request.request)({
  22502. url: '/check/task',
  22503. method: 'GET',
  22504. params: data
  22505. });
  22506. }
  22507. /**
  22508. * @param checkTaskId
  22509. */
  22510. function getCheckTaskById(checkTaskId) {
  22511. return (0, _request.request)({
  22512. url: "/check/task/".concat(checkTaskId),
  22513. method: 'GET'
  22514. });
  22515. }
  22516. /**
  22517. * 获取任务视图
  22518. * @param taskId
  22519. */
  22520. function getCheckTaskViewById(taskId) {
  22521. return (0, _request.request)({
  22522. url: "/check/task/view/".concat(taskId),
  22523. method: 'GET'
  22524. });
  22525. }
  22526. /**
  22527. * 添加一次性临时CheckTask
  22528. * @param data
  22529. */
  22530. function createCheckTask(data) {
  22531. return (0, _request.request)({
  22532. url: "/check/task/once/add",
  22533. method: 'POST',
  22534. data: data
  22535. });
  22536. }
  22537. /**
  22538. * 更新CheckTask
  22539. * @param data
  22540. */
  22541. function updateCheckTask(data) {
  22542. return (0, _request.request)({
  22543. url: "/check/task/update",
  22544. method: 'PUT',
  22545. data: data
  22546. });
  22547. }
  22548. /**
  22549. * 删除CheckTask
  22550. * @param taskId
  22551. */
  22552. function deleteCheckTaskById(taskId) {
  22553. return (0, _request.request)({
  22554. url: "/check/task/".concat(taskId),
  22555. method: 'DELETE'
  22556. });
  22557. }
  22558. /**
  22559. * Handle CheckTask
  22560. * @param taskId
  22561. */
  22562. function handleCheckTask(taskId) {
  22563. return (0, _request.request)({
  22564. url: "/check/task/handle/".concat(taskId),
  22565. method: 'PUT'
  22566. });
  22567. }
  22568. /**
  22569. * Transfer CheckTask
  22570. * @param data
  22571. */
  22572. function transferCheckTask(data) {
  22573. return (0, _request.request)({
  22574. url: "/check/task/transfer",
  22575. method: 'PUT',
  22576. data: data
  22577. });
  22578. }
  22579. /**
  22580. * Cancel CheckTask
  22581. * @param taskId
  22582. */
  22583. function cancelCheckTask(taskId) {
  22584. return (0, _request.request)({
  22585. url: "/check/task/cancel/".concat(taskId),
  22586. method: 'PUT'
  22587. });
  22588. }
  22589. /**
  22590. * Complete CheckTask
  22591. * @param taskId
  22592. */
  22593. function completeCheckTask(taskId) {
  22594. return (0, _request.request)({
  22595. url: "/check/task/complete/".concat(taskId),
  22596. method: 'PUT'
  22597. });
  22598. }
  22599. /***/ }),
  22600. /***/ 63:
  22601. /*!*******************************************************!*\
  22602. !*** E:/work/Project_newGit/UniappShell/libs/enum.js ***!
  22603. \*******************************************************/
  22604. /*! no static exports found */
  22605. /***/ (function(module, exports, __webpack_require__) {
  22606. "use strict";
  22607. Object.defineProperty(exports, "__esModule", {
  22608. value: true
  22609. });
  22610. exports.alertLevel = alertLevel;
  22611. exports.alertStatus = alertStatus;
  22612. exports.checkResult = checkResult;
  22613. exports.dangerLevel = dangerLevel;
  22614. exports.dangerRectifyCat = dangerRectifyCat;
  22615. exports.dangerSource = dangerSource;
  22616. exports.dangerStatus = dangerStatus;
  22617. exports.rectifyCat = rectifyCat;
  22618. exports.riskLevel = riskLevel;
  22619. exports.riskPointLevel = riskPointLevel;
  22620. exports.riskPointStatus = riskPointStatus;
  22621. exports.riskType = riskType;
  22622. exports.taskPriority = taskPriority;
  22623. exports.taskStatus = taskStatus;
  22624. exports.taskType = taskType;
  22625. exports.warningLevel = warningLevel;
  22626. exports.warningStatus = warningStatus;
  22627. exports.wfInsStatus = wfInsStatus;
  22628. exports.wfTaskInsStatus = wfTaskInsStatus;
  22629. // 风险类型
  22630. function riskType(val) {
  22631. var strs = ['默认', '人', '物', '管'];
  22632. return strs[val];
  22633. }
  22634. // 风险等级
  22635. function riskLevel(val) {
  22636. var strs = ['默认', '重大', '较大', '一般', '较小'];
  22637. return strs[val];
  22638. }
  22639. // 风险等级
  22640. function riskPointStatus(val) {
  22641. var strs = ['未知', '安全受控', '失控'];
  22642. return strs[val];
  22643. }
  22644. // 风险点等级
  22645. function riskPointLevel(val) {
  22646. var strs = ['默认', '重大', '较大', '一般', '较小'];
  22647. return strs[val];
  22648. }
  22649. function taskPriority(i) {
  22650. var strs = ['未知', '较低', '普通', '紧急', '非常紧急'];
  22651. return strs[i];
  22652. }
  22653. function taskType(i) {
  22654. var strs = ['未知', '常规', '审批任务', '巡检任务'];
  22655. return strs[i];
  22656. }
  22657. function taskStatus(i) {
  22658. var strs = ['待处理', '已完成'];
  22659. if (i === -1) {
  22660. return '已撤消';
  22661. } else {
  22662. return strs[i];
  22663. }
  22664. }
  22665. function checkResult(i) {
  22666. var strs = ['没执行', '通过', '没通过', '有隐患', '已完成'];
  22667. return strs[i];
  22668. }
  22669. function dangerStatus(i) {
  22670. if (i >= 0) {
  22671. var strs = ['待提交', '待评审', '待整改', '待验收', '已整改'];
  22672. return strs[i];
  22673. } else {
  22674. return '已撤销';
  22675. }
  22676. }
  22677. function dangerLevel(i) {
  22678. var strs = ['未知', '重大', '较大', '严重', '一般'];
  22679. return strs[i];
  22680. }
  22681. function dangerSource(i) {
  22682. var strs = ['自查', '内部反馈', '上级抽查', '政府执法'];
  22683. return strs[i];
  22684. }
  22685. function rectifyCat(i) {
  22686. var strs = ['自行整改', '外协整改'];
  22687. return strs[i];
  22688. }
  22689. function wfInsStatus(i) {
  22690. if (i >= 0) {
  22691. var strs = ['未开始', '执行中', '已完成'];
  22692. return strs[i];
  22693. } else {
  22694. return '已撤销';
  22695. }
  22696. }
  22697. function wfTaskInsStatus(i) {
  22698. var strs = ['未开始', '已完成'];
  22699. return strs[i];
  22700. }
  22701. function dangerRectifyCat(i) {
  22702. var strs = ['自行整改', '外协整改'];
  22703. return strs[i];
  22704. }
  22705. function alertLevel(i) {
  22706. var strs = ['未知', '1级', '2级', '3级', '4级', '5级', '6级'];
  22707. return strs[i];
  22708. }
  22709. function alertStatus(i) {
  22710. if (i >= 0) {
  22711. var strs = ['活动', '已解除'];
  22712. return strs[i];
  22713. } else {
  22714. return '已撤销';
  22715. }
  22716. }
  22717. function warningLevel(val) {
  22718. var enums = {
  22719. 1: 'Ⅰ级',
  22720. 2: 'Ⅱ级',
  22721. 3: 'Ⅲ级',
  22722. 4: 'Ⅳ级'
  22723. };
  22724. return enums[val];
  22725. }
  22726. function warningStatus(i) {
  22727. if (i >= 0) {
  22728. var strs = ['待处理', '已处理'];
  22729. return strs[i];
  22730. } else {
  22731. return '已撤销';
  22732. }
  22733. }
  22734. /***/ }),
  22735. /***/ 7:
  22736. /*!*********************************************************************!*\
  22737. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  22738. \*********************************************************************/
  22739. /*! no static exports found */
  22740. /***/ (function(module, exports) {
  22741. function _iterableToArrayLimit(arr, i) {
  22742. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  22743. if (null != _i) {
  22744. var _s,
  22745. _e,
  22746. _x,
  22747. _r,
  22748. _arr = [],
  22749. _n = !0,
  22750. _d = !1;
  22751. try {
  22752. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  22753. if (Object(_i) !== _i) return;
  22754. _n = !1;
  22755. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  22756. ;
  22757. }
  22758. } catch (err) {
  22759. _d = !0, _e = err;
  22760. } finally {
  22761. try {
  22762. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  22763. } finally {
  22764. if (_d) throw _e;
  22765. }
  22766. }
  22767. return _arr;
  22768. }
  22769. }
  22770. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22771. /***/ }),
  22772. /***/ 72:
  22773. /*!************************************************************!*\
  22774. !*** E:/work/Project_newGit/UniappShell/api/system/app.js ***!
  22775. \************************************************************/
  22776. /*! no static exports found */
  22777. /***/ (function(module, exports, __webpack_require__) {
  22778. "use strict";
  22779. Object.defineProperty(exports, "__esModule", {
  22780. value: true
  22781. });
  22782. exports.getAppList = getAppList;
  22783. exports.getAppVersion = getAppVersion;
  22784. exports.getQuickList = getQuickList;
  22785. var _request = __webpack_require__(/*! @/libs/request.js */ 43);
  22786. function getAppList() {
  22787. return (0, _request.request)({
  22788. url: "/mini/store"
  22789. });
  22790. }
  22791. function getQuickList() {
  22792. return (0, _request.request)({
  22793. url: "/mini/quick"
  22794. });
  22795. }
  22796. function getAppVersion() {
  22797. return (0, _request.request)({
  22798. url: "/setting/get/appVersion"
  22799. });
  22800. }
  22801. /***/ }),
  22802. /***/ 8:
  22803. /*!***************************************************************************!*\
  22804. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  22805. \***************************************************************************/
  22806. /*! no static exports found */
  22807. /***/ (function(module, exports, __webpack_require__) {
  22808. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  22809. function _unsupportedIterableToArray(o, minLen) {
  22810. if (!o) return;
  22811. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  22812. var n = Object.prototype.toString.call(o).slice(8, -1);
  22813. if (n === "Object" && o.constructor) n = o.constructor.name;
  22814. if (n === "Map" || n === "Set") return Array.from(o);
  22815. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  22816. }
  22817. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  22818. /***/ }),
  22819. /***/ 81:
  22820. /*!********************************************************!*\
  22821. !*** E:/work/Project_newGit/UniappShell/libs/index.js ***!
  22822. \********************************************************/
  22823. /*! no static exports found */
  22824. /***/ (function(module, exports, __webpack_require__) {
  22825. "use strict";
  22826. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  22827. Object.defineProperty(exports, "__esModule", {
  22828. value: true
  22829. });
  22830. exports.MessageTimeFormat = MessageTimeFormat;
  22831. exports.addClass = addClass;
  22832. exports.byteLength = byteLength;
  22833. exports.cleanArray = cleanArray;
  22834. exports.createUniqueString = createUniqueString;
  22835. exports.debounce = debounce;
  22836. exports.deepClone = deepClone;
  22837. exports.distanceTime = distanceTime;
  22838. exports.formatTime = formatTime;
  22839. exports.getQueryObject = getQueryObject;
  22840. exports.getTime = getTime;
  22841. exports.hasClass = hasClass;
  22842. exports.html2Text = html2Text;
  22843. exports.isEmpty = isEmpty;
  22844. exports.objectMerge = objectMerge;
  22845. exports.param = param;
  22846. exports.param2Obj = param2Obj;
  22847. exports.parseTime = parseTime;
  22848. exports.removeClass = removeClass;
  22849. exports.toggleClass = toggleClass;
  22850. exports.uniqueArr = uniqueArr;
  22851. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  22852. /**
  22853. * Created by PanJiaChen on 16/11/18.
  22854. */
  22855. /**
  22856. * Parse the time to string
  22857. * @param {(Object|string|number)} time
  22858. * @param {string} cFormat
  22859. * @returns {string | null}
  22860. */
  22861. function parseTime(time, cFormat) {
  22862. if (arguments.length === 0 || !time) {
  22863. return null;
  22864. }
  22865. var format = cFormat || '{y}-{m}-{d} {h}:{i}:{s}';
  22866. var date;
  22867. if ((0, _typeof2.default)(time) === 'object') {
  22868. date = time;
  22869. } else {
  22870. if (typeof time === 'string') {
  22871. if (/^[0-9]+$/.test(time)) {
  22872. // support "1548221490638"
  22873. time = parseInt(time);
  22874. } else {
  22875. // support safari
  22876. // https://stackoverflow.com/questions/4310953/invalid-date-in-safari
  22877. time = time.replace(new RegExp(/-/gm), '/');
  22878. }
  22879. }
  22880. if (typeof time === 'number' && time.toString().length === 10) {
  22881. time = time * 1000;
  22882. }
  22883. date = new Date(time);
  22884. }
  22885. var formatObj = {
  22886. y: date.getFullYear(),
  22887. m: date.getMonth() + 1,
  22888. d: date.getDate(),
  22889. h: date.getHours(),
  22890. i: date.getMinutes(),
  22891. s: date.getSeconds(),
  22892. a: date.getDay()
  22893. };
  22894. var time_str = format.replace(/{([ymdhisa])+}/g, function (result, key) {
  22895. var value = formatObj[key];
  22896. // Note: getDay() returns 0 on Sunday
  22897. if (key === 'a') {
  22898. return ['日', '一', '二', '三', '四', '五', '六'][value];
  22899. }
  22900. return value.toString().padStart(2, '0');
  22901. });
  22902. return time_str;
  22903. }
  22904. /**
  22905. * @param {number} time
  22906. * @param {string} option
  22907. * @returns {string}
  22908. */
  22909. function formatTime(time, option) {
  22910. if (('' + time).length === 10) {
  22911. time = parseInt(time) * 1000;
  22912. } else {
  22913. time = +time;
  22914. }
  22915. var d = new Date(time);
  22916. var now = Date.now();
  22917. var diff = (now - d) / 1000;
  22918. if (diff < 30) {
  22919. return '刚刚';
  22920. } else if (diff < 3600) {
  22921. // less 1 hour
  22922. return Math.ceil(diff / 60) + '分钟前';
  22923. } else if (diff < 3600 * 24) {
  22924. return Math.ceil(diff / 3600) + '小时前';
  22925. } else if (diff < 3600 * 24 * 2) {
  22926. return '1天前';
  22927. }
  22928. if (option) {
  22929. return parseTime(time, option);
  22930. } else {
  22931. return d.getMonth() + 1 + '月' + d.getDate() + '日' + d.getHours() + '时' + d.getMinutes() + '分';
  22932. }
  22933. }
  22934. /**
  22935. * @param {string} url
  22936. * @returns {Object}
  22937. */
  22938. function getQueryObject(url) {
  22939. url = url == null ? window.location.href : url;
  22940. var search = url.substring(url.lastIndexOf('?') + 1);
  22941. var obj = {};
  22942. var reg = /([^?&=]+)=([^?&=]*)/g;
  22943. search.replace(reg, function (rs, $1, $2) {
  22944. var name = decodeURIComponent($1);
  22945. var val = decodeURIComponent($2);
  22946. val = String(val);
  22947. obj[name] = val;
  22948. return rs;
  22949. });
  22950. return obj;
  22951. }
  22952. /**
  22953. * @param {string} input value
  22954. * @returns {number} output value
  22955. */
  22956. function byteLength(str) {
  22957. // returns the byte length of an utf8 string
  22958. var s = str.length;
  22959. for (var i = str.length - 1; i >= 0; i--) {
  22960. var code = str.charCodeAt(i);
  22961. if (code > 0x7f && code <= 0x7ff) s++;else if (code > 0x7ff && code <= 0xffff) s += 2;
  22962. if (code >= 0xDC00 && code <= 0xDFFF) i--;
  22963. }
  22964. return s;
  22965. }
  22966. /**
  22967. * @param {Array} actual
  22968. * @returns {Array}
  22969. */
  22970. function cleanArray(actual) {
  22971. var newArray = [];
  22972. for (var i = 0; i < actual.length; i++) {
  22973. if (actual[i]) {
  22974. newArray.push(actual[i]);
  22975. }
  22976. }
  22977. return newArray;
  22978. }
  22979. /**
  22980. * @param {Object} json
  22981. * @returns {Array}
  22982. */
  22983. function param(json) {
  22984. if (!json) return '';
  22985. return cleanArray(Object.keys(json).map(function (key) {
  22986. if (json[key] === undefined) return '';
  22987. return encodeURIComponent(key) + '=' + encodeURIComponent(json[key]);
  22988. })).join('&');
  22989. }
  22990. /**
  22991. * @param {string} url
  22992. * @returns {Object}
  22993. */
  22994. function param2Obj(url) {
  22995. var search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ');
  22996. if (!search) {
  22997. return {};
  22998. }
  22999. var obj = {};
  23000. var searchArr = search.split('&');
  23001. searchArr.forEach(function (v) {
  23002. var index = v.indexOf('=');
  23003. if (index !== -1) {
  23004. var name = v.substring(0, index);
  23005. var val = v.substring(index + 1, v.length);
  23006. obj[name] = val;
  23007. }
  23008. });
  23009. return obj;
  23010. }
  23011. /**
  23012. * @param {string} val
  23013. * @returns {string}
  23014. */
  23015. function html2Text(val) {
  23016. var div = document.createElement('div');
  23017. div.innerHTML = val;
  23018. return div.textContent || div.innerText;
  23019. }
  23020. /**
  23021. * Merges two objects, giving the last one precedence
  23022. * @param {Object} target
  23023. * @param {(Object|Array)} source
  23024. * @returns {Object}
  23025. */
  23026. function objectMerge(target, source) {
  23027. if ((0, _typeof2.default)(target) !== 'object') {
  23028. target = {};
  23029. }
  23030. if (Array.isArray(source)) {
  23031. return source.slice();
  23032. }
  23033. Object.keys(source).forEach(function (property) {
  23034. var sourceProperty = source[property];
  23035. if ((0, _typeof2.default)(sourceProperty) === 'object') {
  23036. target[property] = objectMerge(target[property], sourceProperty);
  23037. } else {
  23038. target[property] = sourceProperty;
  23039. }
  23040. });
  23041. return target;
  23042. }
  23043. /**
  23044. * @param {HTMLElement} element
  23045. * @param {string} className
  23046. */
  23047. function toggleClass(element, className) {
  23048. if (!element || !className) {
  23049. return;
  23050. }
  23051. var classString = element.className;
  23052. var nameIndex = classString.indexOf(className);
  23053. if (nameIndex === -1) {
  23054. classString += '' + className;
  23055. } else {
  23056. classString = classString.substr(0, nameIndex) + classString.substr(nameIndex + className.length);
  23057. }
  23058. element.className = classString;
  23059. }
  23060. /**
  23061. * @param {string} type
  23062. * @returns {Date}
  23063. */
  23064. function getTime(type) {
  23065. if (type === 'start') {
  23066. return new Date().getTime() - 3600 * 1000 * 24 * 90;
  23067. } else {
  23068. return new Date(new Date().toDateString());
  23069. }
  23070. }
  23071. /**
  23072. * @param {Function} func
  23073. * @param {number} wait
  23074. * @param {boolean} immediate
  23075. * @return {*}
  23076. */
  23077. function debounce(func, wait, immediate) {
  23078. var timeout, args, context, timestamp, result;
  23079. var later = function later() {
  23080. // 据上一次触发时间间隔
  23081. var last = +new Date() - timestamp;
  23082. // 上次被包装函数被调用时间间隔 last 小于设定时间间隔 wait
  23083. if (last < wait && last > 0) {
  23084. timeout = setTimeout(later, wait - last);
  23085. } else {
  23086. timeout = null;
  23087. // 如果设定为immediate===true,因为开始边界已经调用过了此处无需调用
  23088. if (!immediate) {
  23089. result = func.apply(context, args);
  23090. if (!timeout) context = args = null;
  23091. }
  23092. }
  23093. };
  23094. return function () {
  23095. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  23096. args[_key] = arguments[_key];
  23097. }
  23098. context = this;
  23099. timestamp = +new Date();
  23100. var callNow = immediate && !timeout;
  23101. // 如果延时不存在,重新设定延时
  23102. if (!timeout) timeout = setTimeout(later, wait);
  23103. if (callNow) {
  23104. result = func.apply(context, args);
  23105. context = args = null;
  23106. }
  23107. return result;
  23108. };
  23109. }
  23110. /**
  23111. * This is just a simple version of deep copy
  23112. * Has a lot of edge cases bug
  23113. * If you want to use a perfect deep copy, use lodash's _.cloneDeep
  23114. * @param {Object} source
  23115. * @returns {Object}
  23116. */
  23117. function deepClone(source) {
  23118. if (!source && (0, _typeof2.default)(source) !== 'object') {
  23119. throw new Error('error arguments', 'deepClone');
  23120. }
  23121. var targetObj = source.constructor === Array ? [] : {};
  23122. Object.keys(source).forEach(function (keys) {
  23123. if (source[keys] && (0, _typeof2.default)(source[keys]) === 'object') {
  23124. targetObj[keys] = deepClone(source[keys]);
  23125. } else {
  23126. targetObj[keys] = source[keys];
  23127. }
  23128. });
  23129. return targetObj;
  23130. }
  23131. /**
  23132. * @param {Array} arr
  23133. * @returns {Array}
  23134. */
  23135. function uniqueArr(arr) {
  23136. return Array.from(new Set(arr));
  23137. }
  23138. /**
  23139. * @returns {string}
  23140. */
  23141. function createUniqueString() {
  23142. var timestamp = +new Date() + '';
  23143. var randomNum = parseInt((1 + Math.random()) * 65536) + '';
  23144. return (+(randomNum + timestamp)).toString(32);
  23145. }
  23146. /**
  23147. * Check if an element has a class
  23148. * @param {HTMLElement} elm
  23149. * @param {string} cls
  23150. * @returns {boolean}
  23151. */
  23152. function hasClass(ele, cls) {
  23153. return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'));
  23154. }
  23155. /**
  23156. * Add class to element
  23157. * @param {HTMLElement} elm
  23158. * @param {string} cls
  23159. */
  23160. function addClass(ele, cls) {
  23161. if (!hasClass(ele, cls)) ele.className += ' ' + cls;
  23162. }
  23163. /**
  23164. * Remove class from element
  23165. * @param {HTMLElement} elm
  23166. * @param {string} cls
  23167. */
  23168. function removeClass(ele, cls) {
  23169. if (hasClass(ele, cls)) {
  23170. var reg = new RegExp('(\\s|^)' + cls + '(\\s|$)');
  23171. ele.className = ele.className.replace(reg, ' ');
  23172. }
  23173. }
  23174. function distanceTime(time) {
  23175. //获取当前时间
  23176. var date = new Date();
  23177. var now = date.getTime();
  23178. //设置截止时间
  23179. var endDate = new Date();
  23180. if (time) {
  23181. endDate = new Date(time);
  23182. }
  23183. var end = endDate.getTime();
  23184. //获取截止时间和当前时间的时间差
  23185. if (now >= end) {
  23186. return '已过期';
  23187. }
  23188. var leftTime = end - now;
  23189. //定义变量 d,h,m,s分别保存天数,小时,分钟,秒
  23190. var d, h, m, s;
  23191. //判断剩余天数,时,分,秒
  23192. if (leftTime >= 0) {
  23193. d = Math.floor(leftTime / 1000 / 60 / 60 / 24);
  23194. h = Math.floor(leftTime / 1000 / 60 / 60 % 24);
  23195. m = Math.floor(leftTime / 1000 / 60 % 60);
  23196. s = Math.floor(leftTime / 1000 % 60);
  23197. }
  23198. if (d > 0) {
  23199. return "".concat(d, "\u5929").concat(h, "\u5C0F\u65F6").concat(m, "\u5206\u949F");
  23200. } else {
  23201. if (h > 0) {
  23202. return "".concat(h, "\u5C0F\u65F6").concat(m, "\u5206\u949F");
  23203. } else {
  23204. return "".concat(m, "\u5206\u949F");
  23205. }
  23206. }
  23207. }
  23208. function isEmpty(value) {
  23209. if (value === undefined || value === "undefined" || value === "" || value === null) {
  23210. return true;
  23211. }
  23212. return false;
  23213. }
  23214. function MessageTimeFormat(d) {
  23215. var unix_stamp = '';
  23216. if (!d) return;
  23217. if ((0, _typeof2.default)(d) === 'object') {
  23218. unix_stamp = d.getTime();
  23219. } else {
  23220. unix_stamp = new Date(d).getTime();
  23221. }
  23222. var _today_obj = new Date();
  23223. var _today_date = {
  23224. y: _today_obj.getFullYear(),
  23225. m: _today_obj.getMonth() + 1 < 10 ? '0' + (_today_obj.getMonth() - -1) : _today_obj.getMonth() - -1,
  23226. d: _today_obj.getDate() < 10 ? '0' + _today_obj.getDate() : _today_obj.getDate()
  23227. };
  23228. var _today_stamp = Date.parse(_today_date.y + '/' + _today_date.m + '/' + _today_date.d + ' 00:00:00');
  23229. var stamp = [];
  23230. stamp[0] = _today_stamp + 86400000;
  23231. stamp[1] = _today_stamp;
  23232. stamp[2] = _today_stamp - 86400000;
  23233. stamp[3] = _today_stamp - 172800000;
  23234. stamp[4] = _today_stamp - 518400000; // 7天
  23235. stamp[5] = _today_stamp - 31536000000; // 365天
  23236. var _compare_obj = new Date();
  23237. _compare_obj.setTime(unix_stamp);
  23238. var return_str;
  23239. if (unix_stamp >= stamp[1] && unix_stamp < stamp[0]) {
  23240. return_str = _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  23241. } else if (unix_stamp >= stamp[2] && unix_stamp < stamp[1]) {
  23242. var yesterdayText = '昨天';
  23243. return_str = yesterdayText + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  23244. } else if (unix_stamp >= stamp[3] && unix_stamp < stamp[2]) {
  23245. var theDayBeforeYesterdayText = '前天';
  23246. return_str = theDayBeforeYesterdayText + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  23247. } else if (unix_stamp >= stamp[4] && unix_stamp < stamp[3]) {
  23248. // 7天内
  23249. var daynames = ['天', '一', '二', '三', '四', '五', '六'];
  23250. var dathStr = '星期' + daynames[_compare_obj.getDay()];
  23251. var SundayText = '星期天';
  23252. var MondayText = '星期一';
  23253. var TuesdayText = '星期二';
  23254. var WednesdayText = '星期三';
  23255. var ThursdayText = '星期四';
  23256. var FridayText = '星期五';
  23257. var SaturdayText = '星期六';
  23258. var dathStr2;
  23259. switch (dathStr) {
  23260. case '星期天':
  23261. dathStr2 = SundayText;
  23262. break;
  23263. case '星期一':
  23264. dathStr2 = MondayText;
  23265. break;
  23266. case '星期二':
  23267. dathStr2 = TuesdayText;
  23268. break;
  23269. case '星期三':
  23270. dathStr2 = WednesdayText;
  23271. break;
  23272. case '星期四':
  23273. dathStr2 = ThursdayText;
  23274. break;
  23275. case '星期五':
  23276. dathStr2 = FridayText;
  23277. break;
  23278. case '星期六':
  23279. dathStr2 = SaturdayText;
  23280. break;
  23281. default:
  23282. dathStr2 = dathStr;
  23283. break;
  23284. }
  23285. return_str = dathStr2 + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  23286. } else if (unix_stamp >= stamp[5] && unix_stamp < stamp[4]) {
  23287. // 365天内
  23288. var monthText = '月';
  23289. var dayText = '日';
  23290. return_str = _compare_obj.getMonth() - -1 + monthText + _compare_obj.getDate() + dayText + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  23291. } else {
  23292. var yearText = '年';
  23293. var _monthText = '月';
  23294. var _dayText = '日';
  23295. return_str = _compare_obj.getFullYear() + yearText + (_compare_obj.getMonth() - -1) + _monthText + _compare_obj.getDate() + _dayText + ' ' + _compare_obj.getHours() + ':' + (_compare_obj.getMinutes() < 10 ? '0' + _compare_obj.getMinutes() : _compare_obj.getMinutes());
  23296. }
  23297. return return_str;
  23298. }
  23299. /***/ }),
  23300. /***/ 82:
  23301. /*!***************************************************************!*\
  23302. !*** E:/work/Project_newGit/UniappShell/api/system/upload.js ***!
  23303. \***************************************************************/
  23304. /*! no static exports found */
  23305. /***/ (function(module, exports, __webpack_require__) {
  23306. "use strict";
  23307. /* WEBPACK VAR INJECTION */(function(uni) {
  23308. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  23309. Object.defineProperty(exports, "__esModule", {
  23310. value: true
  23311. });
  23312. exports.upload = void 0;
  23313. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  23314. var _auth = __webpack_require__(/*! @/libs/auth.js */ 48);
  23315. var _index = _interopRequireDefault(__webpack_require__(/*! @/config/index.js */ 47));
  23316. var baseUrl = true ? _index.default.base.dev : undefined;
  23317. var upload = function upload(_ref) {
  23318. var formData = _ref.formData,
  23319. filePath = _ref.filePath,
  23320. callback = _ref.callback;
  23321. uni.showLoading({
  23322. mask: true,
  23323. title: "上传中"
  23324. });
  23325. return new Promise(function (resolve, reject) {
  23326. var _header;
  23327. var uploadTask = uni.uploadFile({
  23328. url: baseUrl + '/upload/file',
  23329. filePath: filePath,
  23330. header: (_header = {}, (0, _defineProperty2.default)(_header, _index.default.TokenKey, (0, _auth.getToken)()), (0, _defineProperty2.default)(_header, "AppID", _index.default.appID), (0, _defineProperty2.default)(_header, "AppKey", _index.default.appKey), (0, _defineProperty2.default)(_header, "AppSecret", _index.default.appSecret), _header),
  23331. name: 'file',
  23332. formData: formData,
  23333. success: function success(uploadFileRes) {
  23334. uni.hideLoading();
  23335. resolve(uploadFileRes.data);
  23336. },
  23337. fail: function fail(_ref2) {
  23338. var errMsg = _ref2.errMsg;
  23339. uni.hideLoading({
  23340. mask: true,
  23341. title: "上传失败"
  23342. });
  23343. reject(errMsg);
  23344. }
  23345. });
  23346. if (callback) {
  23347. callback(uploadTask);
  23348. }
  23349. });
  23350. };
  23351. exports.upload = upload;
  23352. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  23353. /***/ }),
  23354. /***/ 83:
  23355. /*!***********************************************************************!*\
  23356. !*** E:/work/Project_newGit/UniappShell/static/components/avatar.png ***!
  23357. \***********************************************************************/
  23358. /*! no static exports found */
  23359. /***/ (function(module, exports) {
  23360. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAAAXNSR0IArs4c6QAAD2BJREFUeF7tXXuMHVUZ/77ZC2VL3WKVAmLwAYRWkD+sCkjL01AKQikIiQoYHqaGagPrzje3JOBVEnbnzLKQhRI2lhIVNbFARaQtRCq4IrWAiTwsBOqDhFdFZNfSpWXvfOZbZ8t2X3fmzjkzZ7b3JDe77Z7znd/3nd+dxznfA2EKtq6urlmDg4NzEXEOM88FAPnMAoDpiDidmacDwP7y70j9HQDwLiLuYGb5XT5vA8AWRNzCzC+USqUtra2t8n9TqmHRtalUKvs1NzcvAIAFiCg/ZbEPMqTXm0IKZu4FgN6BgYHeSqXynqG5MhFbSAJ0dHQsRMQT5QMA8pmWibXGTrITAB5n5qFPuVx+KCccdU9bGAJ0dHQschxnETMvQsQj6tbY4EBmfhkR14dhuL5cLq83OJU20VYToAiLPtFKFIUMVhJAKXUhAFwOAGdqo3q+gjYAwGoiWpMvjLGzW0UApdSl0cKfbJuhNOF5LCLCTzTJSy3GCgIEQXAZM38bAL6YWqNiCNiMiHe4rntX3nBzJUBnZ+e8MAxXAMAFeRsip/nvdRynva2t7emc5odcCNDT07NPf39/mZll8ZvzUt6SeQcQsb2lpaVj6dKl72eNKXMCBEGwmJnLAHB81spaPt8mROxwXff+LHFmSgDf9yuI+P0sFSzaXMz8A8/zKlnhzoQASqnDASAAgCVZKVbwedYCgEtEW03rYZwAQRAsYWZZfCFBo8W3wFZEdF3XFTIYa0YJ0Ljkp18307cEYwRQSvkAQOlN0JAAAIqIPBOWMEIApVQ3AHzXBOC9WOatRLRct/7aCRAEwSPMfJpuoA15AIi40XXd03XaQisBlFLiMDFbJ8CGrDEW2EZE2hxetBFAKdUHAC2NBcvEAv1ENFPHTFoIoJR6DgCO1gGoISO2BZ4nomNi956gY2oCBEGwgZkXpgXSGJ/cAoj4kOu6qXwmUhHA9/1ViHhFcuiNEboswMx3ep53Zb3y6iZAY5OnXpPrH5dms6guAkTbu/fpV8WcRER8kpn/AAAvIeIr1Wr1FQCQj7TDmpqaDmPmwwDgSEScz8xfMIdGv2REPL+ebePEBIgOdsT92fq9fbk8NjU1rZOFd113WxKzB0EwW4hQrVbPKshtTg6OFiY9QKqHAPLNt/pUTx6OqtXqzbr89CUOoamp6ZoCPOyuJaLzkxA9EQEKcN/fiYjLXNe9M4kR4vYNguAKZl6ZYyBKTahJnwdiEyDy5PlVTQT5dXgLAL5JROtMQlBKnQUAPwaAj5qcJ41sRDwvrmdRLAKID19fX9/vLXbj+hsiHuu67rtpDBd3bBAE+zPzMwDw6bhjMu63aebMmSfF8TGMRYAgCK5j5h9mrETc6TYR0QlxO+vsp5R6wtYvBSJe77ruDbX0rUmAyHVbomGt895FxJdd1z2ylpIm/x4EwUvMbGOs4oDjOAtquZzXJIBS6h5L/fb7mPk4z/NeNLnAtWT7vn8UIv4JALQcztSaL+Hf7yWir042ZlICRBE7qxNOmkn3ejc+TICzeWMMES+fLAJpUgIopYTZ1oVrIeI9rutKAKk1LQiCNcw86bctJ7Cbiei4ieaekABRoKa87ljXqtXqqStWrHjUJmDt7e2nNDU1/c4mTCOwyOvxuAGpkxFADGxdlC4z3+V5noSOW9d831+NiJdZBwzgMSI6ZTxc4xIgis//pYWKADOf4HneJhux+b5/PCLKq6GN7aLx8hNMRABJb5LK0cCQBbR4wRjCNiTWYu+oDUS0aLTuYwgQpWUxup1a7wIg4m2u61rtbh4Ewa3M/J16dTQ5LgzDs0bnLhpDAJt9+m18+Bu9YJY/DI6JLRhDAN/3xWHCxp2tQSLax+Q3RJdspZTE+Zd0ydMlRxJXeZ63x87pHgSw+fIPAG8R0YG6jGFSjlLqX7aeFo6+DexBAJsv/zbs+8cljcXnA6LCHreBPQhg8eVfgD9FRIXw01NKPQkAn49LmCz7jb4N7CaAuD05jiP57KxsiCh+fZIL2PoWBEEvM8+3FWgYhmcOu8vtJoDlZ/5iy2eJ6FhbjToSl1JKnEU+ayvWkb4Cuwng+/5vEPFsW0GLCzcRfcJifLuhKaX+Ka7mtmJl5gc9z/uK4BsiQHd397SBgYF3EHE/W0EDQB8RHWAxvpEEeMdS/4AhjMz8XnNz8wHLly/fOUQApZTcW8Xnz+pGRDUdWGxQQCnFNuCogeEkIuodMqjv+9choq0+fyP1GPdAwyZj23yQNtJOzHy953k3DF8B5Bx73ONCm4wLAHcT0SWWYdoDjlLqpwBwsc0YI2yPEtGpwwR4w2CZFZ22eI2IDtUpULcspdSrAPAx3XINyHuTiA7GqMDSvw1MYEQkIp7ruu4DRoSnFBoEwTnM/OuUYjIbXiqVPoJKKam5I1GzRWkPE5GVCSmUUhI0e0ZRDAkA8zGKd1tVINDyGnOx53k/swmz7/vfQMS7bcJUCwsiXilXgE4A+F6tzpb9/Qki+pJNmJRSfwSAXCKUUtjhJiHAgwAgAY+FasxMnudJDuLcm+/7LiKq3IEkB7BOCGBtfFsMfc42HQ1cC0MULSxfoiK2TUKAvwBAIQ5ZxrNwtVr91IoVK/6Rh/Xb29s/2dTU9Pc85tY05zPyEGhrcGNsHffdd9+Dr776aslSmlm75ZZbDtq1a5fsnxS2iZONXAGKsnFRy9BSYEEeaI03pVRbVADD+FyGJ3hNCGD1yVVCA/QQkZSfM9aUUncAwFJjE2QruE8IsAsACuFtG9M28lB7s+4qndEhzzUFfNWbzGzvT0UCDCu8BhFvdl03VahWEAQnMLMsvFXRyDG/DLW6DRFgKt0Cxigs1byZeX2pVFrf2tr6ci2LyN+7urqOGBwclCrlQ9XK44wpaJ+hW8BUeQiMswbPIuKLzPyqfBzHebVarQ46jiPuWx9HxEOZ+Sib/fniKJmgz2tT4jVwIoUR8QUAeFhcoR3HeT0Mw9cB4I0dO3a8XqlUdowc19PTM72vr++QMAwPKZVKB8vPKELqDGaek8Cohek6/BpY6I2gUdb+r2QJBYDfMvNGInpJx2oopSR/sJTB+XKULfRDOuRaIOOZom8FD9twFTM/MGPGjI3Lli3bbtKwK1eunLF9+/bTEPEcAKg7TbtJjAlkD20FF/IwKFJyTRiGt5XL5VwcWjs6Ok5yHEdCwYv6hjB0GFTE4+CHo1wBVngGRZ5AQoQiOYPId+imojmEbGbm2zzPE8dL65rv+5cgohDBusxq4xlr2CGkEC5hiHi767rLrFv1cQAFQbCSma8qANb5RXEK9YioUA4XSikpmyvlc61tQ06hgk4pZatb+FvVavVC23ICxl3RKF3MGkuTRfzfLTwigI2BIU8TkZUx9nEJMNxPKfUUAMxLOs5w/w8CQ2wLDUta9cKwobSIt63ayujQMJuCQ+8novO0WN0yIUopqbiy2BJYHwSHWhQeXpgcAPUuog25A8aEh4syNiSIcBxnbltbmxzgTNnW2dk5JwzDLXkqOCZBhICxIEXM14noF3kaJqu5lVJfA4CfZzXf6HnGTRGTZ5IoZg48z5P35r2m+b6vENHNQ+Fxk0RFt4E8soROWtAgDwNlNWceBTkmTBMX7Qd0A0CmyZiZ+VJb9/ZNEyE6Oxi3kIPBuSdOFJlDqlhrQ70NLsAeorMOKZ80VWzWtwGbkz1kRYAsk0rUTBad8W1gDRFdlJWhbZ5HKSXVWbJwKqmdLj6r20AYhifn5cljGxkiz6LHTOOKVTAiugqYLhmzioi+ZVrhIslXSv3IsI9hvJIxEQHkcmSsaJRNRR9tIUkGxSfjF42KSGCkbBwibp82bdqhy5cv77fF+Dbg6O7ubtm5c6cErMwwgCdZ2biIAJcCgPbCkRKm5Xle4VLSGFiUMSJ9318n4WgG5kpeODIigYnSsYVz7zKwIOOKNORGVl/pWEFooni04zhHt7W1/TUroxZpns7Ozs+EYfi8TsypikdHVwGd5eO3EpGNFcl02jyVLKWURDAfnkrIB4PTlY8XOZ2dnfPCMOwFgGYNoMZsRGiQOaVEaCzcNeA4zoK2tranJzNQrPz7unwFmHmZ53m3T6kV06yM7/tXIeLKtGJHnvmnJkBPT88+fX19En93fBpgzLzY87zCJFNOo2u9Y33fPxcR7693fDRu08yZM09aunSpFLCctMW6AkQPhIuZWZwa07R5RPTnNAKm+lil1OcAYNLLdi0bIOJ5ruvGIlFsAsikaV2bBwcHZ1977bVSVbPRJrDAjTfeeGCpVNpWr4GSutQnIoCAUkrdBwBL6gFYlJo/9eimc0yKmkNriej8JFjqIYC8okgWjqSvKu8Q0YeTgNtb+yql/gMASSukbQWAhUQkP2O3xASIngeWMLNcCZK054nomCQD9ta+SqnnAODoJPrXe8BWFwF0PA8kUa7Rd3ILJL3vj5RWNwEiEqxCxCsaC5SfBZj5Ts/z6s5VlIoA0e1gQ5Q5Kz8r7KUzS0Y013XPTKN+agJEbwaJ71lpQDfGDllAyzOVFgJEJOgDgJbG4mRigX4imqljJm0EiEggRRtm6wDWkDGhBbYR0UG67KOVANEzwSPMLFk1G02zBRBxo+u6p+sUq50A0ZUg8xAznUaxVJaRo3QjBIhIIBmy9qqIX4PEUUTkmZBvjAACNu3hkQmFiyYzzSZPHF2NEiB6JpBtYynwmPTsIA7+qdxnq+QPcF13rUkljRMguh3I4gsJ6jpFNGkAS2XLoksVtEQHO/XokgkBhoE1bgm1l8j0JX80gkwJEN0SxLOonNa9rLYpC9djEyJ2xPXk0aVd5gQQ4OJj2N/fX2bmFZq8jXXZIw85A4jY3tLS0hHHh083wFwIMKxE5HIuJLhAt2IFkXev4zjttVy3TeqSKwGGFYsikKTiZyHy7GtYkM2IeIfrundpkJVKhBUEGNZAKSUBqZcDwMmptLJ3sCSBWE1EWSeGmtAiVhFgBBEkP4EQIdVZt0U82BAtvKSOt6pZSYBhC0Xpaoaqd0Y1/Kwy3mRgJCGTVC0Nw3B9uVyWjCtWNqsJMNJiRSBDURZ9pF0LQ4BRZFiIiCfKBwDkMy2nr9dOAHicmYc+5XJZ3OUL1QpJgJEWrlQq+zU3N0u9gwWIKD/nAoA2h4lRqykOL1uYWaKlewcGBnorlcp7hVrxUWALT4DxjN/V1TVrcHBwLiLOYWYhhHxmAcB0RJzOzNMBYH/5dzRe6gi/i4g7mFl+l8/bstiIKAv+QqlU2tLa2ir/N6Xa/wBXxyT5Pl8TYwAAAABJRU5ErkJggg=="
  23361. /***/ }),
  23362. /***/ 9:
  23363. /*!*****************************************************************!*\
  23364. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  23365. \*****************************************************************/
  23366. /*! no static exports found */
  23367. /***/ (function(module, exports) {
  23368. function _arrayLikeToArray(arr, len) {
  23369. if (len == null || len > arr.length) len = arr.length;
  23370. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  23371. arr2[i] = arr[i];
  23372. }
  23373. return arr2;
  23374. }
  23375. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  23376. /***/ })
  23377. }]);
  23378. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map