vendor.js 928 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830
  1. (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["common/vendor"],[
  2. /* 0 */,
  3. /* 1 */
  4. /*!*********************************************************!*\
  5. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js ***!
  6. \*********************************************************/
  7. /*! no static exports found */
  8. /***/ (function(module, exports, __webpack_require__) {
  9. "use strict";
  10. Object.defineProperty(exports, "__esModule", {
  11. value: true
  12. });
  13. exports.default = void 0;
  14. var objectKeys = ['qy', 'env', 'error', 'version', 'lanDebug', 'cloud', 'serviceMarket', 'router', 'worklet', '__webpack_require_UNI_MP_PLUGIN__'];
  15. var singlePageDisableKey = ['lanDebug', 'router', 'worklet'];
  16. var target = typeof globalThis !== 'undefined' ? globalThis : function () {
  17. return this;
  18. }();
  19. var key = ['w', 'x'].join('');
  20. var oldWx = target[key];
  21. var launchOption = oldWx.getLaunchOptionsSync ? oldWx.getLaunchOptionsSync() : null;
  22. function isWxKey(key) {
  23. if (launchOption && launchOption.scene === 1154 && singlePageDisableKey.includes(key)) {
  24. return false;
  25. }
  26. return objectKeys.indexOf(key) > -1 || typeof oldWx[key] === 'function';
  27. }
  28. function initWx() {
  29. var newWx = {};
  30. for (var _key in oldWx) {
  31. if (isWxKey(_key)) {
  32. // TODO wrapper function
  33. newWx[_key] = oldWx[_key];
  34. }
  35. }
  36. return newWx;
  37. }
  38. target[key] = initWx();
  39. var _default = target[key];
  40. exports.default = _default;
  41. /***/ }),
  42. /* 2 */
  43. /*!************************************************************!*\
  44. !*** ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js ***!
  45. \************************************************************/
  46. /*! no static exports found */
  47. /***/ (function(module, exports, __webpack_require__) {
  48. "use strict";
  49. /* WEBPACK VAR INJECTION */(function(wx, global) {
  50. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  51. Object.defineProperty(exports, "__esModule", {
  52. value: true
  53. });
  54. exports.createApp = createApp;
  55. exports.createComponent = createComponent;
  56. exports.createPage = createPage;
  57. exports.createPlugin = createPlugin;
  58. exports.createSubpackageApp = createSubpackageApp;
  59. exports.default = void 0;
  60. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  61. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  62. var _construct2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/construct */ 15));
  63. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  64. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  65. var _uniI18n = __webpack_require__(/*! @dcloudio/uni-i18n */ 22);
  66. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  67. 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; }
  68. 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; }
  69. var realAtob;
  70. var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
  71. var b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  72. if (typeof atob !== 'function') {
  73. realAtob = function realAtob(str) {
  74. str = String(str).replace(/[\t\n\f\r ]+/g, '');
  75. if (!b64re.test(str)) {
  76. throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
  77. }
  78. // Adding the padding if missing, for semplicity
  79. str += '=='.slice(2 - (str.length & 3));
  80. var bitmap;
  81. var result = '';
  82. var r1;
  83. var r2;
  84. var i = 0;
  85. for (; i < str.length;) {
  86. 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++)));
  87. 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);
  88. }
  89. return result;
  90. };
  91. } else {
  92. // 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
  93. realAtob = atob;
  94. }
  95. function b64DecodeUnicode(str) {
  96. return decodeURIComponent(realAtob(str).split('').map(function (c) {
  97. return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
  98. }).join(''));
  99. }
  100. function getCurrentUserInfo() {
  101. var token = wx.getStorageSync('uni_id_token') || '';
  102. var tokenArr = token.split('.');
  103. if (!token || tokenArr.length !== 3) {
  104. return {
  105. uid: null,
  106. role: [],
  107. permission: [],
  108. tokenExpired: 0
  109. };
  110. }
  111. var userInfo;
  112. try {
  113. userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
  114. } catch (error) {
  115. throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
  116. }
  117. userInfo.tokenExpired = userInfo.exp * 1000;
  118. delete userInfo.exp;
  119. delete userInfo.iat;
  120. return userInfo;
  121. }
  122. function uniIdMixin(Vue) {
  123. Vue.prototype.uniIDHasRole = function (roleId) {
  124. var _getCurrentUserInfo = getCurrentUserInfo(),
  125. role = _getCurrentUserInfo.role;
  126. return role.indexOf(roleId) > -1;
  127. };
  128. Vue.prototype.uniIDHasPermission = function (permissionId) {
  129. var _getCurrentUserInfo2 = getCurrentUserInfo(),
  130. permission = _getCurrentUserInfo2.permission;
  131. return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
  132. };
  133. Vue.prototype.uniIDTokenValid = function () {
  134. var _getCurrentUserInfo3 = getCurrentUserInfo(),
  135. tokenExpired = _getCurrentUserInfo3.tokenExpired;
  136. return tokenExpired > Date.now();
  137. };
  138. }
  139. var _toString = Object.prototype.toString;
  140. var hasOwnProperty = Object.prototype.hasOwnProperty;
  141. function isFn(fn) {
  142. return typeof fn === 'function';
  143. }
  144. function isStr(str) {
  145. return typeof str === 'string';
  146. }
  147. function isObject(obj) {
  148. return obj !== null && (0, _typeof2.default)(obj) === 'object';
  149. }
  150. function isPlainObject(obj) {
  151. return _toString.call(obj) === '[object Object]';
  152. }
  153. function hasOwn(obj, key) {
  154. return hasOwnProperty.call(obj, key);
  155. }
  156. function noop() {}
  157. /**
  158. * Create a cached version of a pure function.
  159. */
  160. function cached(fn) {
  161. var cache = Object.create(null);
  162. return function cachedFn(str) {
  163. var hit = cache[str];
  164. return hit || (cache[str] = fn(str));
  165. };
  166. }
  167. /**
  168. * Camelize a hyphen-delimited string.
  169. */
  170. var camelizeRE = /-(\w)/g;
  171. var camelize = cached(function (str) {
  172. return str.replace(camelizeRE, function (_, c) {
  173. return c ? c.toUpperCase() : '';
  174. });
  175. });
  176. function sortObject(obj) {
  177. var sortObj = {};
  178. if (isPlainObject(obj)) {
  179. Object.keys(obj).sort().forEach(function (key) {
  180. sortObj[key] = obj[key];
  181. });
  182. }
  183. return !Object.keys(sortObj) ? obj : sortObj;
  184. }
  185. var HOOKS = ['invoke', 'success', 'fail', 'complete', 'returnValue'];
  186. var globalInterceptors = {};
  187. var scopedInterceptors = {};
  188. function mergeHook(parentVal, childVal) {
  189. var res = childVal ? parentVal ? parentVal.concat(childVal) : Array.isArray(childVal) ? childVal : [childVal] : parentVal;
  190. return res ? dedupeHooks(res) : res;
  191. }
  192. function dedupeHooks(hooks) {
  193. var res = [];
  194. for (var i = 0; i < hooks.length; i++) {
  195. if (res.indexOf(hooks[i]) === -1) {
  196. res.push(hooks[i]);
  197. }
  198. }
  199. return res;
  200. }
  201. function removeHook(hooks, hook) {
  202. var index = hooks.indexOf(hook);
  203. if (index !== -1) {
  204. hooks.splice(index, 1);
  205. }
  206. }
  207. function mergeInterceptorHook(interceptor, option) {
  208. Object.keys(option).forEach(function (hook) {
  209. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  210. interceptor[hook] = mergeHook(interceptor[hook], option[hook]);
  211. }
  212. });
  213. }
  214. function removeInterceptorHook(interceptor, option) {
  215. if (!interceptor || !option) {
  216. return;
  217. }
  218. Object.keys(option).forEach(function (hook) {
  219. if (HOOKS.indexOf(hook) !== -1 && isFn(option[hook])) {
  220. removeHook(interceptor[hook], option[hook]);
  221. }
  222. });
  223. }
  224. function addInterceptor(method, option) {
  225. if (typeof method === 'string' && isPlainObject(option)) {
  226. mergeInterceptorHook(scopedInterceptors[method] || (scopedInterceptors[method] = {}), option);
  227. } else if (isPlainObject(method)) {
  228. mergeInterceptorHook(globalInterceptors, method);
  229. }
  230. }
  231. function removeInterceptor(method, option) {
  232. if (typeof method === 'string') {
  233. if (isPlainObject(option)) {
  234. removeInterceptorHook(scopedInterceptors[method], option);
  235. } else {
  236. delete scopedInterceptors[method];
  237. }
  238. } else if (isPlainObject(method)) {
  239. removeInterceptorHook(globalInterceptors, method);
  240. }
  241. }
  242. function wrapperHook(hook, params) {
  243. return function (data) {
  244. return hook(data, params) || data;
  245. };
  246. }
  247. function isPromise(obj) {
  248. return !!obj && ((0, _typeof2.default)(obj) === 'object' || typeof obj === 'function') && typeof obj.then === 'function';
  249. }
  250. function queue(hooks, data, params) {
  251. var promise = false;
  252. for (var i = 0; i < hooks.length; i++) {
  253. var hook = hooks[i];
  254. if (promise) {
  255. promise = Promise.resolve(wrapperHook(hook, params));
  256. } else {
  257. var res = hook(data, params);
  258. if (isPromise(res)) {
  259. promise = Promise.resolve(res);
  260. }
  261. if (res === false) {
  262. return {
  263. then: function then() {}
  264. };
  265. }
  266. }
  267. }
  268. return promise || {
  269. then: function then(callback) {
  270. return callback(data);
  271. }
  272. };
  273. }
  274. function wrapperOptions(interceptor) {
  275. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  276. ['success', 'fail', 'complete'].forEach(function (name) {
  277. if (Array.isArray(interceptor[name])) {
  278. var oldCallback = options[name];
  279. options[name] = function callbackInterceptor(res) {
  280. queue(interceptor[name], res, options).then(function (res) {
  281. /* eslint-disable no-mixed-operators */
  282. return isFn(oldCallback) && oldCallback(res) || res;
  283. });
  284. };
  285. }
  286. });
  287. return options;
  288. }
  289. function wrapperReturnValue(method, returnValue) {
  290. var returnValueHooks = [];
  291. if (Array.isArray(globalInterceptors.returnValue)) {
  292. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(globalInterceptors.returnValue));
  293. }
  294. var interceptor = scopedInterceptors[method];
  295. if (interceptor && Array.isArray(interceptor.returnValue)) {
  296. returnValueHooks.push.apply(returnValueHooks, (0, _toConsumableArray2.default)(interceptor.returnValue));
  297. }
  298. returnValueHooks.forEach(function (hook) {
  299. returnValue = hook(returnValue) || returnValue;
  300. });
  301. return returnValue;
  302. }
  303. function getApiInterceptorHooks(method) {
  304. var interceptor = Object.create(null);
  305. Object.keys(globalInterceptors).forEach(function (hook) {
  306. if (hook !== 'returnValue') {
  307. interceptor[hook] = globalInterceptors[hook].slice();
  308. }
  309. });
  310. var scopedInterceptor = scopedInterceptors[method];
  311. if (scopedInterceptor) {
  312. Object.keys(scopedInterceptor).forEach(function (hook) {
  313. if (hook !== 'returnValue') {
  314. interceptor[hook] = (interceptor[hook] || []).concat(scopedInterceptor[hook]);
  315. }
  316. });
  317. }
  318. return interceptor;
  319. }
  320. function invokeApi(method, api, options) {
  321. for (var _len = arguments.length, params = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
  322. params[_key - 3] = arguments[_key];
  323. }
  324. var interceptor = getApiInterceptorHooks(method);
  325. if (interceptor && Object.keys(interceptor).length) {
  326. if (Array.isArray(interceptor.invoke)) {
  327. var res = queue(interceptor.invoke, options);
  328. return res.then(function (options) {
  329. // 重新访问 getApiInterceptorHooks, 允许 invoke 中再次调用 addInterceptor,removeInterceptor
  330. return api.apply(void 0, [wrapperOptions(getApiInterceptorHooks(method), options)].concat(params));
  331. });
  332. } else {
  333. return api.apply(void 0, [wrapperOptions(interceptor, options)].concat(params));
  334. }
  335. }
  336. return api.apply(void 0, [options].concat(params));
  337. }
  338. var promiseInterceptor = {
  339. returnValue: function returnValue(res) {
  340. if (!isPromise(res)) {
  341. return res;
  342. }
  343. return new Promise(function (resolve, reject) {
  344. res.then(function (res) {
  345. if (res[0]) {
  346. reject(res[0]);
  347. } else {
  348. resolve(res[1]);
  349. }
  350. });
  351. });
  352. }
  353. };
  354. 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/;
  355. var CONTEXT_API_RE = /^create|Manager$/;
  356. // Context例外情况
  357. var CONTEXT_API_RE_EXC = ['createBLEConnection'];
  358. // 同步例外情况
  359. var ASYNC_API = ['createBLEConnection', 'createPushMessage'];
  360. var CALLBACK_API_RE = /^on|^off/;
  361. function isContextApi(name) {
  362. return CONTEXT_API_RE.test(name) && CONTEXT_API_RE_EXC.indexOf(name) === -1;
  363. }
  364. function isSyncApi(name) {
  365. return SYNC_API_RE.test(name) && ASYNC_API.indexOf(name) === -1;
  366. }
  367. function isCallbackApi(name) {
  368. return CALLBACK_API_RE.test(name) && name !== 'onPush';
  369. }
  370. function handlePromise(promise) {
  371. return promise.then(function (data) {
  372. return [null, data];
  373. }).catch(function (err) {
  374. return [err];
  375. });
  376. }
  377. function shouldPromise(name) {
  378. if (isContextApi(name) || isSyncApi(name) || isCallbackApi(name)) {
  379. return false;
  380. }
  381. return true;
  382. }
  383. /* eslint-disable no-extend-native */
  384. if (!Promise.prototype.finally) {
  385. Promise.prototype.finally = function (callback) {
  386. var promise = this.constructor;
  387. return this.then(function (value) {
  388. return promise.resolve(callback()).then(function () {
  389. return value;
  390. });
  391. }, function (reason) {
  392. return promise.resolve(callback()).then(function () {
  393. throw reason;
  394. });
  395. });
  396. };
  397. }
  398. function promisify(name, api) {
  399. if (!shouldPromise(name) || !isFn(api)) {
  400. return api;
  401. }
  402. return function promiseApi() {
  403. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  404. for (var _len2 = arguments.length, params = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  405. params[_key2 - 1] = arguments[_key2];
  406. }
  407. if (isFn(options.success) || isFn(options.fail) || isFn(options.complete)) {
  408. return wrapperReturnValue(name, invokeApi.apply(void 0, [name, api, options].concat(params)));
  409. }
  410. return wrapperReturnValue(name, handlePromise(new Promise(function (resolve, reject) {
  411. invokeApi.apply(void 0, [name, api, Object.assign({}, options, {
  412. success: resolve,
  413. fail: reject
  414. })].concat(params));
  415. })));
  416. };
  417. }
  418. var EPS = 1e-4;
  419. var BASE_DEVICE_WIDTH = 750;
  420. var isIOS = false;
  421. var deviceWidth = 0;
  422. var deviceDPR = 0;
  423. function checkDeviceWidth() {
  424. var _wx$getSystemInfoSync = wx.getSystemInfoSync(),
  425. platform = _wx$getSystemInfoSync.platform,
  426. pixelRatio = _wx$getSystemInfoSync.pixelRatio,
  427. windowWidth = _wx$getSystemInfoSync.windowWidth; // uni=>wx runtime 编译目标是 uni 对象,内部不允许直接使用 uni
  428. deviceWidth = windowWidth;
  429. deviceDPR = pixelRatio;
  430. isIOS = platform === 'ios';
  431. }
  432. function upx2px(number, newDeviceWidth) {
  433. if (deviceWidth === 0) {
  434. checkDeviceWidth();
  435. }
  436. number = Number(number);
  437. if (number === 0) {
  438. return 0;
  439. }
  440. var result = number / BASE_DEVICE_WIDTH * (newDeviceWidth || deviceWidth);
  441. if (result < 0) {
  442. result = -result;
  443. }
  444. result = Math.floor(result + EPS);
  445. if (result === 0) {
  446. if (deviceDPR === 1 || !isIOS) {
  447. result = 1;
  448. } else {
  449. result = 0.5;
  450. }
  451. }
  452. return number < 0 ? -result : result;
  453. }
  454. var LOCALE_ZH_HANS = 'zh-Hans';
  455. var LOCALE_ZH_HANT = 'zh-Hant';
  456. var LOCALE_EN = 'en';
  457. var LOCALE_FR = 'fr';
  458. var LOCALE_ES = 'es';
  459. var messages = {};
  460. var locale;
  461. {
  462. locale = normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  463. }
  464. function initI18nMessages() {
  465. if (!isEnableLocale()) {
  466. return;
  467. }
  468. var localeKeys = Object.keys(__uniConfig.locales);
  469. if (localeKeys.length) {
  470. localeKeys.forEach(function (locale) {
  471. var curMessages = messages[locale];
  472. var userMessages = __uniConfig.locales[locale];
  473. if (curMessages) {
  474. Object.assign(curMessages, userMessages);
  475. } else {
  476. messages[locale] = userMessages;
  477. }
  478. });
  479. }
  480. }
  481. initI18nMessages();
  482. var i18n = (0, _uniI18n.initVueI18n)(locale, {});
  483. var t = i18n.t;
  484. var i18nMixin = i18n.mixin = {
  485. beforeCreate: function beforeCreate() {
  486. var _this = this;
  487. var unwatch = i18n.i18n.watchLocale(function () {
  488. _this.$forceUpdate();
  489. });
  490. this.$once('hook:beforeDestroy', function () {
  491. unwatch();
  492. });
  493. },
  494. methods: {
  495. $$t: function $$t(key, values) {
  496. return t(key, values);
  497. }
  498. }
  499. };
  500. var setLocale = i18n.setLocale;
  501. var getLocale = i18n.getLocale;
  502. function initAppLocale(Vue, appVm, locale) {
  503. var state = Vue.observable({
  504. locale: locale || i18n.getLocale()
  505. });
  506. var localeWatchers = [];
  507. appVm.$watchLocale = function (fn) {
  508. localeWatchers.push(fn);
  509. };
  510. Object.defineProperty(appVm, '$locale', {
  511. get: function get() {
  512. return state.locale;
  513. },
  514. set: function set(v) {
  515. state.locale = v;
  516. localeWatchers.forEach(function (watch) {
  517. return watch(v);
  518. });
  519. }
  520. });
  521. }
  522. function isEnableLocale() {
  523. return typeof __uniConfig !== 'undefined' && __uniConfig.locales && !!Object.keys(__uniConfig.locales).length;
  524. }
  525. function include(str, parts) {
  526. return !!parts.find(function (part) {
  527. return str.indexOf(part) !== -1;
  528. });
  529. }
  530. function startsWith(str, parts) {
  531. return parts.find(function (part) {
  532. return str.indexOf(part) === 0;
  533. });
  534. }
  535. function normalizeLocale(locale, messages) {
  536. if (!locale) {
  537. return;
  538. }
  539. locale = locale.trim().replace(/_/g, '-');
  540. if (messages && messages[locale]) {
  541. return locale;
  542. }
  543. locale = locale.toLowerCase();
  544. if (locale === 'chinese') {
  545. // 支付宝
  546. return LOCALE_ZH_HANS;
  547. }
  548. if (locale.indexOf('zh') === 0) {
  549. if (locale.indexOf('-hans') > -1) {
  550. return LOCALE_ZH_HANS;
  551. }
  552. if (locale.indexOf('-hant') > -1) {
  553. return LOCALE_ZH_HANT;
  554. }
  555. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  556. return LOCALE_ZH_HANT;
  557. }
  558. return LOCALE_ZH_HANS;
  559. }
  560. var lang = startsWith(locale, [LOCALE_EN, LOCALE_FR, LOCALE_ES]);
  561. if (lang) {
  562. return lang;
  563. }
  564. }
  565. // export function initI18n() {
  566. // const localeKeys = Object.keys(__uniConfig.locales || {})
  567. // if (localeKeys.length) {
  568. // localeKeys.forEach((locale) =>
  569. // i18n.add(locale, __uniConfig.locales[locale])
  570. // )
  571. // }
  572. // }
  573. function getLocale$1() {
  574. // 优先使用 $locale
  575. if (isFn(getApp)) {
  576. var app = getApp({
  577. allowDefault: true
  578. });
  579. if (app && app.$vm) {
  580. return app.$vm.$locale;
  581. }
  582. }
  583. return normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN;
  584. }
  585. function setLocale$1(locale) {
  586. var app = isFn(getApp) ? getApp() : false;
  587. if (!app) {
  588. return false;
  589. }
  590. var oldLocale = app.$vm.$locale;
  591. if (oldLocale !== locale) {
  592. app.$vm.$locale = locale;
  593. onLocaleChangeCallbacks.forEach(function (fn) {
  594. return fn({
  595. locale: locale
  596. });
  597. });
  598. return true;
  599. }
  600. return false;
  601. }
  602. var onLocaleChangeCallbacks = [];
  603. function onLocaleChange(fn) {
  604. if (onLocaleChangeCallbacks.indexOf(fn) === -1) {
  605. onLocaleChangeCallbacks.push(fn);
  606. }
  607. }
  608. if (typeof global !== 'undefined') {
  609. global.getLocale = getLocale$1;
  610. }
  611. var interceptors = {
  612. promiseInterceptor: promiseInterceptor
  613. };
  614. var baseApi = /*#__PURE__*/Object.freeze({
  615. __proto__: null,
  616. upx2px: upx2px,
  617. getLocale: getLocale$1,
  618. setLocale: setLocale$1,
  619. onLocaleChange: onLocaleChange,
  620. addInterceptor: addInterceptor,
  621. removeInterceptor: removeInterceptor,
  622. interceptors: interceptors
  623. });
  624. function findExistsPageIndex(url) {
  625. var pages = getCurrentPages();
  626. var len = pages.length;
  627. while (len--) {
  628. var page = pages[len];
  629. if (page.$page && page.$page.fullPath === url) {
  630. return len;
  631. }
  632. }
  633. return -1;
  634. }
  635. var redirectTo = {
  636. name: function name(fromArgs) {
  637. if (fromArgs.exists === 'back' && fromArgs.delta) {
  638. return 'navigateBack';
  639. }
  640. return 'redirectTo';
  641. },
  642. args: function args(fromArgs) {
  643. if (fromArgs.exists === 'back' && fromArgs.url) {
  644. var existsPageIndex = findExistsPageIndex(fromArgs.url);
  645. if (existsPageIndex !== -1) {
  646. var delta = getCurrentPages().length - 1 - existsPageIndex;
  647. if (delta > 0) {
  648. fromArgs.delta = delta;
  649. }
  650. }
  651. }
  652. }
  653. };
  654. var previewImage = {
  655. args: function args(fromArgs) {
  656. var currentIndex = parseInt(fromArgs.current);
  657. if (isNaN(currentIndex)) {
  658. return;
  659. }
  660. var urls = fromArgs.urls;
  661. if (!Array.isArray(urls)) {
  662. return;
  663. }
  664. var len = urls.length;
  665. if (!len) {
  666. return;
  667. }
  668. if (currentIndex < 0) {
  669. currentIndex = 0;
  670. } else if (currentIndex >= len) {
  671. currentIndex = len - 1;
  672. }
  673. if (currentIndex > 0) {
  674. fromArgs.current = urls[currentIndex];
  675. fromArgs.urls = urls.filter(function (item, index) {
  676. return index < currentIndex ? item !== urls[currentIndex] : true;
  677. });
  678. } else {
  679. fromArgs.current = urls[0];
  680. }
  681. return {
  682. indicator: false,
  683. loop: false
  684. };
  685. }
  686. };
  687. var UUID_KEY = '__DC_STAT_UUID';
  688. var deviceId;
  689. function useDeviceId(result) {
  690. deviceId = deviceId || wx.getStorageSync(UUID_KEY);
  691. if (!deviceId) {
  692. deviceId = Date.now() + '' + Math.floor(Math.random() * 1e7);
  693. wx.setStorage({
  694. key: UUID_KEY,
  695. data: deviceId
  696. });
  697. }
  698. result.deviceId = deviceId;
  699. }
  700. function addSafeAreaInsets(result) {
  701. if (result.safeArea) {
  702. var safeArea = result.safeArea;
  703. result.safeAreaInsets = {
  704. top: safeArea.top,
  705. left: safeArea.left,
  706. right: result.windowWidth - safeArea.right,
  707. bottom: result.screenHeight - safeArea.bottom
  708. };
  709. }
  710. }
  711. function populateParameters(result) {
  712. var _result$brand = result.brand,
  713. brand = _result$brand === void 0 ? '' : _result$brand,
  714. _result$model = result.model,
  715. model = _result$model === void 0 ? '' : _result$model,
  716. _result$system = result.system,
  717. system = _result$system === void 0 ? '' : _result$system,
  718. _result$language = result.language,
  719. language = _result$language === void 0 ? '' : _result$language,
  720. theme = result.theme,
  721. version = result.version,
  722. platform = result.platform,
  723. fontSizeSetting = result.fontSizeSetting,
  724. SDKVersion = result.SDKVersion,
  725. pixelRatio = result.pixelRatio,
  726. deviceOrientation = result.deviceOrientation;
  727. // const isQuickApp = "mp-weixin".indexOf('quickapp-webview') !== -1
  728. var extraParam = {};
  729. // osName osVersion
  730. var osName = '';
  731. var osVersion = '';
  732. {
  733. osName = system.split(' ')[0] || '';
  734. osVersion = system.split(' ')[1] || '';
  735. }
  736. var hostVersion = version;
  737. // deviceType
  738. var deviceType = getGetDeviceType(result, model);
  739. // deviceModel
  740. var deviceBrand = getDeviceBrand(brand);
  741. // hostName
  742. var _hostName = getHostName(result);
  743. // deviceOrientation
  744. var _deviceOrientation = deviceOrientation; // 仅 微信 百度 支持
  745. // devicePixelRatio
  746. var _devicePixelRatio = pixelRatio;
  747. // SDKVersion
  748. var _SDKVersion = SDKVersion;
  749. // hostLanguage
  750. var hostLanguage = language.replace(/_/g, '-');
  751. // wx.getAccountInfoSync
  752. var parameters = {
  753. appId: "__UNI__8C5F0F6",
  754. appName: "阿斯利康码头管理",
  755. appVersion: "1.0.0",
  756. appVersionCode: "100",
  757. appLanguage: getAppLanguage(hostLanguage),
  758. uniCompileVersion: "3.98",
  759. uniRuntimeVersion: "3.98",
  760. uniPlatform: undefined || "mp-weixin",
  761. deviceBrand: deviceBrand,
  762. deviceModel: model,
  763. deviceType: deviceType,
  764. devicePixelRatio: _devicePixelRatio,
  765. deviceOrientation: _deviceOrientation,
  766. osName: osName.toLocaleLowerCase(),
  767. osVersion: osVersion,
  768. hostTheme: theme,
  769. hostVersion: hostVersion,
  770. hostLanguage: hostLanguage,
  771. hostName: _hostName,
  772. hostSDKVersion: _SDKVersion,
  773. hostFontSizeSetting: fontSizeSetting,
  774. windowTop: 0,
  775. windowBottom: 0,
  776. // TODO
  777. osLanguage: undefined,
  778. osTheme: undefined,
  779. ua: undefined,
  780. hostPackageName: undefined,
  781. browserName: undefined,
  782. browserVersion: undefined
  783. };
  784. Object.assign(result, parameters, extraParam);
  785. }
  786. function getGetDeviceType(result, model) {
  787. var deviceType = result.deviceType || 'phone';
  788. {
  789. var deviceTypeMaps = {
  790. ipad: 'pad',
  791. windows: 'pc',
  792. mac: 'pc'
  793. };
  794. var deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
  795. var _model = model.toLocaleLowerCase();
  796. for (var index = 0; index < deviceTypeMapsKeys.length; index++) {
  797. var _m = deviceTypeMapsKeys[index];
  798. if (_model.indexOf(_m) !== -1) {
  799. deviceType = deviceTypeMaps[_m];
  800. break;
  801. }
  802. }
  803. }
  804. return deviceType;
  805. }
  806. function getDeviceBrand(brand) {
  807. var deviceBrand = brand;
  808. if (deviceBrand) {
  809. deviceBrand = brand.toLocaleLowerCase();
  810. }
  811. return deviceBrand;
  812. }
  813. function getAppLanguage(defaultLanguage) {
  814. return getLocale$1 ? getLocale$1() : defaultLanguage;
  815. }
  816. function getHostName(result) {
  817. var _platform = 'WeChat';
  818. var _hostName = result.hostName || _platform; // mp-jd
  819. {
  820. if (result.environment) {
  821. _hostName = result.environment;
  822. } else if (result.host && result.host.env) {
  823. _hostName = result.host.env;
  824. }
  825. }
  826. return _hostName;
  827. }
  828. var getSystemInfo = {
  829. returnValue: function returnValue(result) {
  830. useDeviceId(result);
  831. addSafeAreaInsets(result);
  832. populateParameters(result);
  833. }
  834. };
  835. var showActionSheet = {
  836. args: function args(fromArgs) {
  837. if ((0, _typeof2.default)(fromArgs) === 'object') {
  838. fromArgs.alertText = fromArgs.title;
  839. }
  840. }
  841. };
  842. var getAppBaseInfo = {
  843. returnValue: function returnValue(result) {
  844. var _result = result,
  845. version = _result.version,
  846. language = _result.language,
  847. SDKVersion = _result.SDKVersion,
  848. theme = _result.theme;
  849. var _hostName = getHostName(result);
  850. var hostLanguage = language.replace('_', '-');
  851. result = sortObject(Object.assign(result, {
  852. appId: "__UNI__8C5F0F6",
  853. appName: "阿斯利康码头管理",
  854. appVersion: "1.0.0",
  855. appVersionCode: "100",
  856. appLanguage: getAppLanguage(hostLanguage),
  857. hostVersion: version,
  858. hostLanguage: hostLanguage,
  859. hostName: _hostName,
  860. hostSDKVersion: SDKVersion,
  861. hostTheme: theme
  862. }));
  863. }
  864. };
  865. var getDeviceInfo = {
  866. returnValue: function returnValue(result) {
  867. var _result2 = result,
  868. brand = _result2.brand,
  869. model = _result2.model;
  870. var deviceType = getGetDeviceType(result, model);
  871. var deviceBrand = getDeviceBrand(brand);
  872. useDeviceId(result);
  873. result = sortObject(Object.assign(result, {
  874. deviceType: deviceType,
  875. deviceBrand: deviceBrand,
  876. deviceModel: model
  877. }));
  878. }
  879. };
  880. var getWindowInfo = {
  881. returnValue: function returnValue(result) {
  882. addSafeAreaInsets(result);
  883. result = sortObject(Object.assign(result, {
  884. windowTop: 0,
  885. windowBottom: 0
  886. }));
  887. }
  888. };
  889. var getAppAuthorizeSetting = {
  890. returnValue: function returnValue(result) {
  891. var locationReducedAccuracy = result.locationReducedAccuracy;
  892. result.locationAccuracy = 'unsupported';
  893. if (locationReducedAccuracy === true) {
  894. result.locationAccuracy = 'reduced';
  895. } else if (locationReducedAccuracy === false) {
  896. result.locationAccuracy = 'full';
  897. }
  898. }
  899. };
  900. // import navigateTo from 'uni-helpers/navigate-to'
  901. var compressImage = {
  902. args: function args(fromArgs) {
  903. // https://developers.weixin.qq.com/community/develop/doc/000c08940c865011298e0a43256800?highLine=compressHeight
  904. if (fromArgs.compressedHeight && !fromArgs.compressHeight) {
  905. fromArgs.compressHeight = fromArgs.compressedHeight;
  906. }
  907. if (fromArgs.compressedWidth && !fromArgs.compressWidth) {
  908. fromArgs.compressWidth = fromArgs.compressedWidth;
  909. }
  910. }
  911. };
  912. var protocols = {
  913. redirectTo: redirectTo,
  914. // navigateTo, // 由于在微信开发者工具的页面参数,会显示__id__参数,因此暂时关闭mp-weixin对于navigateTo的AOP
  915. previewImage: previewImage,
  916. getSystemInfo: getSystemInfo,
  917. getSystemInfoSync: getSystemInfo,
  918. showActionSheet: showActionSheet,
  919. getAppBaseInfo: getAppBaseInfo,
  920. getDeviceInfo: getDeviceInfo,
  921. getWindowInfo: getWindowInfo,
  922. getAppAuthorizeSetting: getAppAuthorizeSetting,
  923. compressImage: compressImage
  924. };
  925. var todos = ['vibrate', 'preloadPage', 'unPreloadPage', 'loadSubPackage'];
  926. var canIUses = [];
  927. var CALLBACKS = ['success', 'fail', 'cancel', 'complete'];
  928. function processCallback(methodName, method, returnValue) {
  929. return function (res) {
  930. return method(processReturnValue(methodName, res, returnValue));
  931. };
  932. }
  933. function processArgs(methodName, fromArgs) {
  934. var argsOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  935. var returnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  936. var keepFromArgs = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
  937. if (isPlainObject(fromArgs)) {
  938. // 一般 api 的参数解析
  939. var toArgs = keepFromArgs === true ? fromArgs : {}; // returnValue 为 false 时,说明是格式化返回值,直接在返回值对象上修改赋值
  940. if (isFn(argsOption)) {
  941. argsOption = argsOption(fromArgs, toArgs) || {};
  942. }
  943. for (var key in fromArgs) {
  944. if (hasOwn(argsOption, key)) {
  945. var keyOption = argsOption[key];
  946. if (isFn(keyOption)) {
  947. keyOption = keyOption(fromArgs[key], fromArgs, toArgs);
  948. }
  949. if (!keyOption) {
  950. // 不支持的参数
  951. console.warn("The '".concat(methodName, "' method of platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support option '").concat(key, "'"));
  952. } else if (isStr(keyOption)) {
  953. // 重写参数 key
  954. toArgs[keyOption] = fromArgs[key];
  955. } else if (isPlainObject(keyOption)) {
  956. // {name:newName,value:value}可重新指定参数 key:value
  957. toArgs[keyOption.name ? keyOption.name : key] = keyOption.value;
  958. }
  959. } else if (CALLBACKS.indexOf(key) !== -1) {
  960. if (isFn(fromArgs[key])) {
  961. toArgs[key] = processCallback(methodName, fromArgs[key], returnValue);
  962. }
  963. } else {
  964. if (!keepFromArgs) {
  965. toArgs[key] = fromArgs[key];
  966. }
  967. }
  968. }
  969. return toArgs;
  970. } else if (isFn(fromArgs)) {
  971. fromArgs = processCallback(methodName, fromArgs, returnValue);
  972. }
  973. return fromArgs;
  974. }
  975. function processReturnValue(methodName, res, returnValue) {
  976. var keepReturnValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
  977. if (isFn(protocols.returnValue)) {
  978. // 处理通用 returnValue
  979. res = protocols.returnValue(methodName, res);
  980. }
  981. return processArgs(methodName, res, returnValue, {}, keepReturnValue);
  982. }
  983. function wrapper(methodName, method) {
  984. if (hasOwn(protocols, methodName)) {
  985. var protocol = protocols[methodName];
  986. if (!protocol) {
  987. // 暂不支持的 api
  988. return function () {
  989. console.error("Platform '\u5FAE\u4FE1\u5C0F\u7A0B\u5E8F' does not support '".concat(methodName, "'."));
  990. };
  991. }
  992. return function (arg1, arg2) {
  993. // 目前 api 最多两个参数
  994. var options = protocol;
  995. if (isFn(protocol)) {
  996. options = protocol(arg1);
  997. }
  998. arg1 = processArgs(methodName, arg1, options.args, options.returnValue);
  999. var args = [arg1];
  1000. if (typeof arg2 !== 'undefined') {
  1001. args.push(arg2);
  1002. }
  1003. if (isFn(options.name)) {
  1004. methodName = options.name(arg1);
  1005. } else if (isStr(options.name)) {
  1006. methodName = options.name;
  1007. }
  1008. var returnValue = wx[methodName].apply(wx, args);
  1009. if (isSyncApi(methodName)) {
  1010. // 同步 api
  1011. return processReturnValue(methodName, returnValue, options.returnValue, isContextApi(methodName));
  1012. }
  1013. return returnValue;
  1014. };
  1015. }
  1016. return method;
  1017. }
  1018. var todoApis = Object.create(null);
  1019. var TODOS = ['onTabBarMidButtonTap', 'subscribePush', 'unsubscribePush', 'onPush', 'offPush', 'share'];
  1020. function createTodoApi(name) {
  1021. return function todoApi(_ref) {
  1022. var fail = _ref.fail,
  1023. complete = _ref.complete;
  1024. var res = {
  1025. errMsg: "".concat(name, ":fail method '").concat(name, "' not supported")
  1026. };
  1027. isFn(fail) && fail(res);
  1028. isFn(complete) && complete(res);
  1029. };
  1030. }
  1031. TODOS.forEach(function (name) {
  1032. todoApis[name] = createTodoApi(name);
  1033. });
  1034. var providers = {
  1035. oauth: ['weixin'],
  1036. share: ['weixin'],
  1037. payment: ['wxpay'],
  1038. push: ['weixin']
  1039. };
  1040. function getProvider(_ref2) {
  1041. var service = _ref2.service,
  1042. success = _ref2.success,
  1043. fail = _ref2.fail,
  1044. complete = _ref2.complete;
  1045. var res = false;
  1046. if (providers[service]) {
  1047. res = {
  1048. errMsg: 'getProvider:ok',
  1049. service: service,
  1050. provider: providers[service]
  1051. };
  1052. isFn(success) && success(res);
  1053. } else {
  1054. res = {
  1055. errMsg: 'getProvider:fail service not found'
  1056. };
  1057. isFn(fail) && fail(res);
  1058. }
  1059. isFn(complete) && complete(res);
  1060. }
  1061. var extraApi = /*#__PURE__*/Object.freeze({
  1062. __proto__: null,
  1063. getProvider: getProvider
  1064. });
  1065. var getEmitter = function () {
  1066. var Emitter;
  1067. return function getUniEmitter() {
  1068. if (!Emitter) {
  1069. Emitter = new _vue.default();
  1070. }
  1071. return Emitter;
  1072. };
  1073. }();
  1074. function apply(ctx, method, args) {
  1075. return ctx[method].apply(ctx, args);
  1076. }
  1077. function $on() {
  1078. return apply(getEmitter(), '$on', Array.prototype.slice.call(arguments));
  1079. }
  1080. function $off() {
  1081. return apply(getEmitter(), '$off', Array.prototype.slice.call(arguments));
  1082. }
  1083. function $once() {
  1084. return apply(getEmitter(), '$once', Array.prototype.slice.call(arguments));
  1085. }
  1086. function $emit() {
  1087. return apply(getEmitter(), '$emit', Array.prototype.slice.call(arguments));
  1088. }
  1089. var eventApi = /*#__PURE__*/Object.freeze({
  1090. __proto__: null,
  1091. $on: $on,
  1092. $off: $off,
  1093. $once: $once,
  1094. $emit: $emit
  1095. });
  1096. /**
  1097. * 框架内 try-catch
  1098. */
  1099. /**
  1100. * 开发者 try-catch
  1101. */
  1102. function tryCatch(fn) {
  1103. return function () {
  1104. try {
  1105. return fn.apply(fn, arguments);
  1106. } catch (e) {
  1107. // TODO
  1108. console.error(e);
  1109. }
  1110. };
  1111. }
  1112. function getApiCallbacks(params) {
  1113. var apiCallbacks = {};
  1114. for (var name in params) {
  1115. var param = params[name];
  1116. if (isFn(param)) {
  1117. apiCallbacks[name] = tryCatch(param);
  1118. delete params[name];
  1119. }
  1120. }
  1121. return apiCallbacks;
  1122. }
  1123. var cid;
  1124. var cidErrMsg;
  1125. var enabled;
  1126. function normalizePushMessage(message) {
  1127. try {
  1128. return JSON.parse(message);
  1129. } catch (e) {}
  1130. return message;
  1131. }
  1132. function invokePushCallback(args) {
  1133. if (args.type === 'enabled') {
  1134. enabled = true;
  1135. } else if (args.type === 'clientId') {
  1136. cid = args.cid;
  1137. cidErrMsg = args.errMsg;
  1138. invokeGetPushCidCallbacks(cid, args.errMsg);
  1139. } else if (args.type === 'pushMsg') {
  1140. var message = {
  1141. type: 'receive',
  1142. data: normalizePushMessage(args.message)
  1143. };
  1144. for (var i = 0; i < onPushMessageCallbacks.length; i++) {
  1145. var callback = onPushMessageCallbacks[i];
  1146. callback(message);
  1147. // 该消息已被阻止
  1148. if (message.stopped) {
  1149. break;
  1150. }
  1151. }
  1152. } else if (args.type === 'click') {
  1153. onPushMessageCallbacks.forEach(function (callback) {
  1154. callback({
  1155. type: 'click',
  1156. data: normalizePushMessage(args.message)
  1157. });
  1158. });
  1159. }
  1160. }
  1161. var getPushCidCallbacks = [];
  1162. function invokeGetPushCidCallbacks(cid, errMsg) {
  1163. getPushCidCallbacks.forEach(function (callback) {
  1164. callback(cid, errMsg);
  1165. });
  1166. getPushCidCallbacks.length = 0;
  1167. }
  1168. function getPushClientId(args) {
  1169. if (!isPlainObject(args)) {
  1170. args = {};
  1171. }
  1172. var _getApiCallbacks = getApiCallbacks(args),
  1173. success = _getApiCallbacks.success,
  1174. fail = _getApiCallbacks.fail,
  1175. complete = _getApiCallbacks.complete;
  1176. var hasSuccess = isFn(success);
  1177. var hasFail = isFn(fail);
  1178. var hasComplete = isFn(complete);
  1179. Promise.resolve().then(function () {
  1180. if (typeof enabled === 'undefined') {
  1181. enabled = false;
  1182. cid = '';
  1183. cidErrMsg = 'uniPush is not enabled';
  1184. }
  1185. getPushCidCallbacks.push(function (cid, errMsg) {
  1186. var res;
  1187. if (cid) {
  1188. res = {
  1189. errMsg: 'getPushClientId:ok',
  1190. cid: cid
  1191. };
  1192. hasSuccess && success(res);
  1193. } else {
  1194. res = {
  1195. errMsg: 'getPushClientId:fail' + (errMsg ? ' ' + errMsg : '')
  1196. };
  1197. hasFail && fail(res);
  1198. }
  1199. hasComplete && complete(res);
  1200. });
  1201. if (typeof cid !== 'undefined') {
  1202. invokeGetPushCidCallbacks(cid, cidErrMsg);
  1203. }
  1204. });
  1205. }
  1206. var onPushMessageCallbacks = [];
  1207. // 不使用 defineOnApi 实现,是因为 defineOnApi 依赖 UniServiceJSBridge ,该对象目前在小程序上未提供,故简单实现
  1208. var onPushMessage = function onPushMessage(fn) {
  1209. if (onPushMessageCallbacks.indexOf(fn) === -1) {
  1210. onPushMessageCallbacks.push(fn);
  1211. }
  1212. };
  1213. var offPushMessage = function offPushMessage(fn) {
  1214. if (!fn) {
  1215. onPushMessageCallbacks.length = 0;
  1216. } else {
  1217. var index = onPushMessageCallbacks.indexOf(fn);
  1218. if (index > -1) {
  1219. onPushMessageCallbacks.splice(index, 1);
  1220. }
  1221. }
  1222. };
  1223. var baseInfo = wx.getAppBaseInfo && wx.getAppBaseInfo();
  1224. if (!baseInfo) {
  1225. baseInfo = wx.getSystemInfoSync();
  1226. }
  1227. var host = baseInfo ? baseInfo.host : null;
  1228. var shareVideoMessage = host && host.env === 'SAAASDK' ? wx.miniapp.shareVideoMessage : wx.shareVideoMessage;
  1229. var api = /*#__PURE__*/Object.freeze({
  1230. __proto__: null,
  1231. shareVideoMessage: shareVideoMessage,
  1232. getPushClientId: getPushClientId,
  1233. onPushMessage: onPushMessage,
  1234. offPushMessage: offPushMessage,
  1235. invokePushCallback: invokePushCallback
  1236. });
  1237. var mocks = ['__route__', '__wxExparserNodeId__', '__wxWebviewId__'];
  1238. function findVmByVueId(vm, vuePid) {
  1239. var $children = vm.$children;
  1240. // 优先查找直属(反向查找:https://github.com/dcloudio/uni-app/issues/1200)
  1241. for (var i = $children.length - 1; i >= 0; i--) {
  1242. var childVm = $children[i];
  1243. if (childVm.$scope._$vueId === vuePid) {
  1244. return childVm;
  1245. }
  1246. }
  1247. // 反向递归查找
  1248. var parentVm;
  1249. for (var _i = $children.length - 1; _i >= 0; _i--) {
  1250. parentVm = findVmByVueId($children[_i], vuePid);
  1251. if (parentVm) {
  1252. return parentVm;
  1253. }
  1254. }
  1255. }
  1256. function initBehavior(options) {
  1257. return Behavior(options);
  1258. }
  1259. function isPage() {
  1260. return !!this.route;
  1261. }
  1262. function initRelation(detail) {
  1263. this.triggerEvent('__l', detail);
  1264. }
  1265. function selectAllComponents(mpInstance, selector, $refs) {
  1266. var components = mpInstance.selectAllComponents(selector) || [];
  1267. components.forEach(function (component) {
  1268. var ref = component.dataset.ref;
  1269. $refs[ref] = component.$vm || toSkip(component);
  1270. {
  1271. if (component.dataset.vueGeneric === 'scoped') {
  1272. component.selectAllComponents('.scoped-ref').forEach(function (scopedComponent) {
  1273. selectAllComponents(scopedComponent, selector, $refs);
  1274. });
  1275. }
  1276. }
  1277. });
  1278. }
  1279. function syncRefs(refs, newRefs) {
  1280. var oldKeys = (0, _construct2.default)(Set, (0, _toConsumableArray2.default)(Object.keys(refs)));
  1281. var newKeys = Object.keys(newRefs);
  1282. newKeys.forEach(function (key) {
  1283. var oldValue = refs[key];
  1284. var newValue = newRefs[key];
  1285. if (Array.isArray(oldValue) && Array.isArray(newValue) && oldValue.length === newValue.length && newValue.every(function (value) {
  1286. return oldValue.includes(value);
  1287. })) {
  1288. return;
  1289. }
  1290. refs[key] = newValue;
  1291. oldKeys.delete(key);
  1292. });
  1293. oldKeys.forEach(function (key) {
  1294. delete refs[key];
  1295. });
  1296. return refs;
  1297. }
  1298. function initRefs(vm) {
  1299. var mpInstance = vm.$scope;
  1300. var refs = {};
  1301. Object.defineProperty(vm, '$refs', {
  1302. get: function get() {
  1303. var $refs = {};
  1304. selectAllComponents(mpInstance, '.vue-ref', $refs);
  1305. // TODO 暂不考虑 for 中的 scoped
  1306. var forComponents = mpInstance.selectAllComponents('.vue-ref-in-for') || [];
  1307. forComponents.forEach(function (component) {
  1308. var ref = component.dataset.ref;
  1309. if (!$refs[ref]) {
  1310. $refs[ref] = [];
  1311. }
  1312. $refs[ref].push(component.$vm || toSkip(component));
  1313. });
  1314. return syncRefs(refs, $refs);
  1315. }
  1316. });
  1317. }
  1318. function handleLink(event) {
  1319. var _ref3 = event.detail || event.value,
  1320. vuePid = _ref3.vuePid,
  1321. vueOptions = _ref3.vueOptions; // detail 是微信,value 是百度(dipatch)
  1322. var parentVm;
  1323. if (vuePid) {
  1324. parentVm = findVmByVueId(this.$vm, vuePid);
  1325. }
  1326. if (!parentVm) {
  1327. parentVm = this.$vm;
  1328. }
  1329. vueOptions.parent = parentVm;
  1330. }
  1331. function markMPComponent(component) {
  1332. // 在 Vue 中标记为小程序组件
  1333. var IS_MP = '__v_isMPComponent';
  1334. Object.defineProperty(component, IS_MP, {
  1335. configurable: true,
  1336. enumerable: false,
  1337. value: true
  1338. });
  1339. return component;
  1340. }
  1341. function toSkip(obj) {
  1342. var OB = '__ob__';
  1343. var SKIP = '__v_skip';
  1344. if (isObject(obj) && Object.isExtensible(obj)) {
  1345. // 避免被 @vue/composition-api 观测
  1346. Object.defineProperty(obj, OB, {
  1347. configurable: true,
  1348. enumerable: false,
  1349. value: (0, _defineProperty2.default)({}, SKIP, true)
  1350. });
  1351. }
  1352. return obj;
  1353. }
  1354. var WORKLET_RE = /_(.*)_worklet_factory_/;
  1355. function initWorkletMethods(mpMethods, vueMethods) {
  1356. if (vueMethods) {
  1357. Object.keys(vueMethods).forEach(function (name) {
  1358. var matches = name.match(WORKLET_RE);
  1359. if (matches) {
  1360. var workletName = matches[1];
  1361. mpMethods[name] = vueMethods[name];
  1362. mpMethods[workletName] = vueMethods[workletName];
  1363. }
  1364. });
  1365. }
  1366. }
  1367. var MPPage = Page;
  1368. var MPComponent = Component;
  1369. var customizeRE = /:/g;
  1370. var customize = cached(function (str) {
  1371. return camelize(str.replace(customizeRE, '-'));
  1372. });
  1373. function initTriggerEvent(mpInstance) {
  1374. var oldTriggerEvent = mpInstance.triggerEvent;
  1375. var newTriggerEvent = function newTriggerEvent(event) {
  1376. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  1377. args[_key3 - 1] = arguments[_key3];
  1378. }
  1379. // 事件名统一转驼峰格式,仅处理:当前组件为 vue 组件、当前组件为 vue 组件子组件
  1380. if (this.$vm || this.dataset && this.dataset.comType) {
  1381. event = customize(event);
  1382. } else {
  1383. // 针对微信/QQ小程序单独补充驼峰格式事件,以兼容历史项目
  1384. var newEvent = customize(event);
  1385. if (newEvent !== event) {
  1386. oldTriggerEvent.apply(this, [newEvent].concat(args));
  1387. }
  1388. }
  1389. return oldTriggerEvent.apply(this, [event].concat(args));
  1390. };
  1391. try {
  1392. // 京东小程序 triggerEvent 为只读
  1393. mpInstance.triggerEvent = newTriggerEvent;
  1394. } catch (error) {
  1395. mpInstance._triggerEvent = newTriggerEvent;
  1396. }
  1397. }
  1398. function initHook(name, options, isComponent) {
  1399. var oldHook = options[name];
  1400. options[name] = function () {
  1401. markMPComponent(this);
  1402. initTriggerEvent(this);
  1403. if (oldHook) {
  1404. for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
  1405. args[_key4] = arguments[_key4];
  1406. }
  1407. return oldHook.apply(this, args);
  1408. }
  1409. };
  1410. }
  1411. if (!MPPage.__$wrappered) {
  1412. MPPage.__$wrappered = true;
  1413. Page = function Page() {
  1414. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1415. initHook('onLoad', options);
  1416. return MPPage(options);
  1417. };
  1418. Page.after = MPPage.after;
  1419. Component = function Component() {
  1420. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1421. initHook('created', options);
  1422. return MPComponent(options);
  1423. };
  1424. }
  1425. var PAGE_EVENT_HOOKS = ['onPullDownRefresh', 'onReachBottom', 'onAddToFavorites', 'onShareTimeline', 'onShareAppMessage', 'onPageScroll', 'onResize', 'onTabItemTap'];
  1426. function initMocks(vm, mocks) {
  1427. var mpInstance = vm.$mp[vm.mpType];
  1428. mocks.forEach(function (mock) {
  1429. if (hasOwn(mpInstance, mock)) {
  1430. vm[mock] = mpInstance[mock];
  1431. }
  1432. });
  1433. }
  1434. function hasHook(hook, vueOptions) {
  1435. if (!vueOptions) {
  1436. return true;
  1437. }
  1438. if (_vue.default.options && Array.isArray(_vue.default.options[hook])) {
  1439. return true;
  1440. }
  1441. vueOptions = vueOptions.default || vueOptions;
  1442. if (isFn(vueOptions)) {
  1443. if (isFn(vueOptions.extendOptions[hook])) {
  1444. return true;
  1445. }
  1446. if (vueOptions.super && vueOptions.super.options && Array.isArray(vueOptions.super.options[hook])) {
  1447. return true;
  1448. }
  1449. return false;
  1450. }
  1451. if (isFn(vueOptions[hook]) || Array.isArray(vueOptions[hook])) {
  1452. return true;
  1453. }
  1454. var mixins = vueOptions.mixins;
  1455. if (Array.isArray(mixins)) {
  1456. return !!mixins.find(function (mixin) {
  1457. return hasHook(hook, mixin);
  1458. });
  1459. }
  1460. }
  1461. function initHooks(mpOptions, hooks, vueOptions) {
  1462. hooks.forEach(function (hook) {
  1463. if (hasHook(hook, vueOptions)) {
  1464. mpOptions[hook] = function (args) {
  1465. return this.$vm && this.$vm.__call_hook(hook, args);
  1466. };
  1467. }
  1468. });
  1469. }
  1470. function initUnknownHooks(mpOptions, vueOptions) {
  1471. var excludes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1472. findHooks(vueOptions).forEach(function (hook) {
  1473. return initHook$1(mpOptions, hook, excludes);
  1474. });
  1475. }
  1476. function findHooks(vueOptions) {
  1477. var hooks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
  1478. if (vueOptions) {
  1479. Object.keys(vueOptions).forEach(function (name) {
  1480. if (name.indexOf('on') === 0 && isFn(vueOptions[name])) {
  1481. hooks.push(name);
  1482. }
  1483. });
  1484. }
  1485. return hooks;
  1486. }
  1487. function initHook$1(mpOptions, hook, excludes) {
  1488. if (excludes.indexOf(hook) === -1 && !hasOwn(mpOptions, hook)) {
  1489. mpOptions[hook] = function (args) {
  1490. return this.$vm && this.$vm.__call_hook(hook, args);
  1491. };
  1492. }
  1493. }
  1494. function initVueComponent(Vue, vueOptions) {
  1495. vueOptions = vueOptions.default || vueOptions;
  1496. var VueComponent;
  1497. if (isFn(vueOptions)) {
  1498. VueComponent = vueOptions;
  1499. } else {
  1500. VueComponent = Vue.extend(vueOptions);
  1501. }
  1502. vueOptions = VueComponent.options;
  1503. return [VueComponent, vueOptions];
  1504. }
  1505. function initSlots(vm, vueSlots) {
  1506. if (Array.isArray(vueSlots) && vueSlots.length) {
  1507. var $slots = Object.create(null);
  1508. vueSlots.forEach(function (slotName) {
  1509. $slots[slotName] = true;
  1510. });
  1511. vm.$scopedSlots = vm.$slots = $slots;
  1512. }
  1513. }
  1514. function initVueIds(vueIds, mpInstance) {
  1515. vueIds = (vueIds || '').split(',');
  1516. var len = vueIds.length;
  1517. if (len === 1) {
  1518. mpInstance._$vueId = vueIds[0];
  1519. } else if (len === 2) {
  1520. mpInstance._$vueId = vueIds[0];
  1521. mpInstance._$vuePid = vueIds[1];
  1522. }
  1523. }
  1524. function initData(vueOptions, context) {
  1525. var data = vueOptions.data || {};
  1526. var methods = vueOptions.methods || {};
  1527. if (typeof data === 'function') {
  1528. try {
  1529. data = data.call(context); // 支持 Vue.prototype 上挂的数据
  1530. } catch (e) {
  1531. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"阿斯利康码头管理","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  1532. console.warn('根据 Vue 的 data 函数初始化小程序 data 失败,请尽量确保 data 函数中不访问 vm 对象,否则可能影响首次数据渲染速度。', data);
  1533. }
  1534. }
  1535. } else {
  1536. try {
  1537. // 对 data 格式化
  1538. data = JSON.parse(JSON.stringify(data));
  1539. } catch (e) {}
  1540. }
  1541. if (!isPlainObject(data)) {
  1542. data = {};
  1543. }
  1544. Object.keys(methods).forEach(function (methodName) {
  1545. if (context.__lifecycle_hooks__.indexOf(methodName) === -1 && !hasOwn(data, methodName)) {
  1546. data[methodName] = methods[methodName];
  1547. }
  1548. });
  1549. return data;
  1550. }
  1551. var PROP_TYPES = [String, Number, Boolean, Object, Array, null];
  1552. function createObserver(name) {
  1553. return function observer(newVal, oldVal) {
  1554. if (this.$vm) {
  1555. this.$vm[name] = newVal; // 为了触发其他非 render watcher
  1556. }
  1557. };
  1558. }
  1559. function initBehaviors(vueOptions, initBehavior) {
  1560. var vueBehaviors = vueOptions.behaviors;
  1561. var vueExtends = vueOptions.extends;
  1562. var vueMixins = vueOptions.mixins;
  1563. var vueProps = vueOptions.props;
  1564. if (!vueProps) {
  1565. vueOptions.props = vueProps = [];
  1566. }
  1567. var behaviors = [];
  1568. if (Array.isArray(vueBehaviors)) {
  1569. vueBehaviors.forEach(function (behavior) {
  1570. behaviors.push(behavior.replace('uni://', "wx".concat("://")));
  1571. if (behavior === 'uni://form-field') {
  1572. if (Array.isArray(vueProps)) {
  1573. vueProps.push('name');
  1574. vueProps.push('value');
  1575. } else {
  1576. vueProps.name = {
  1577. type: String,
  1578. default: ''
  1579. };
  1580. vueProps.value = {
  1581. type: [String, Number, Boolean, Array, Object, Date],
  1582. default: ''
  1583. };
  1584. }
  1585. }
  1586. });
  1587. }
  1588. if (isPlainObject(vueExtends) && vueExtends.props) {
  1589. behaviors.push(initBehavior({
  1590. properties: initProperties(vueExtends.props, true)
  1591. }));
  1592. }
  1593. if (Array.isArray(vueMixins)) {
  1594. vueMixins.forEach(function (vueMixin) {
  1595. if (isPlainObject(vueMixin) && vueMixin.props) {
  1596. behaviors.push(initBehavior({
  1597. properties: initProperties(vueMixin.props, true)
  1598. }));
  1599. }
  1600. });
  1601. }
  1602. return behaviors;
  1603. }
  1604. function parsePropType(key, type, defaultValue, file) {
  1605. // [String]=>String
  1606. if (Array.isArray(type) && type.length === 1) {
  1607. return type[0];
  1608. }
  1609. return type;
  1610. }
  1611. function initProperties(props) {
  1612. var isBehavior = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
  1613. var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
  1614. var options = arguments.length > 3 ? arguments[3] : undefined;
  1615. var properties = {};
  1616. if (!isBehavior) {
  1617. properties.vueId = {
  1618. type: String,
  1619. value: ''
  1620. };
  1621. {
  1622. if (options.virtualHost) {
  1623. properties.virtualHostStyle = {
  1624. type: null,
  1625. value: ''
  1626. };
  1627. properties.virtualHostClass = {
  1628. type: null,
  1629. value: ''
  1630. };
  1631. }
  1632. }
  1633. // scopedSlotsCompiler auto
  1634. properties.scopedSlotsCompiler = {
  1635. type: String,
  1636. value: ''
  1637. };
  1638. properties.vueSlots = {
  1639. // 小程序不能直接定义 $slots 的 props,所以通过 vueSlots 转换到 $slots
  1640. type: null,
  1641. value: [],
  1642. observer: function observer(newVal, oldVal) {
  1643. var $slots = Object.create(null);
  1644. newVal.forEach(function (slotName) {
  1645. $slots[slotName] = true;
  1646. });
  1647. this.setData({
  1648. $slots: $slots
  1649. });
  1650. }
  1651. };
  1652. }
  1653. if (Array.isArray(props)) {
  1654. // ['title']
  1655. props.forEach(function (key) {
  1656. properties[key] = {
  1657. type: null,
  1658. observer: createObserver(key)
  1659. };
  1660. });
  1661. } else if (isPlainObject(props)) {
  1662. // {title:{type:String,default:''},content:String}
  1663. Object.keys(props).forEach(function (key) {
  1664. var opts = props[key];
  1665. if (isPlainObject(opts)) {
  1666. // title:{type:String,default:''}
  1667. var value = opts.default;
  1668. if (isFn(value)) {
  1669. value = value();
  1670. }
  1671. opts.type = parsePropType(key, opts.type);
  1672. properties[key] = {
  1673. type: PROP_TYPES.indexOf(opts.type) !== -1 ? opts.type : null,
  1674. value: value,
  1675. observer: createObserver(key)
  1676. };
  1677. } else {
  1678. // content:String
  1679. var type = parsePropType(key, opts);
  1680. properties[key] = {
  1681. type: PROP_TYPES.indexOf(type) !== -1 ? type : null,
  1682. observer: createObserver(key)
  1683. };
  1684. }
  1685. });
  1686. }
  1687. return properties;
  1688. }
  1689. function wrapper$1(event) {
  1690. // TODO 又得兼容 mpvue 的 mp 对象
  1691. try {
  1692. event.mp = JSON.parse(JSON.stringify(event));
  1693. } catch (e) {}
  1694. event.stopPropagation = noop;
  1695. event.preventDefault = noop;
  1696. event.target = event.target || {};
  1697. if (!hasOwn(event, 'detail')) {
  1698. event.detail = {};
  1699. }
  1700. if (hasOwn(event, 'markerId')) {
  1701. event.detail = (0, _typeof2.default)(event.detail) === 'object' ? event.detail : {};
  1702. event.detail.markerId = event.markerId;
  1703. }
  1704. if (isPlainObject(event.detail)) {
  1705. event.target = Object.assign({}, event.target, event.detail);
  1706. }
  1707. return event;
  1708. }
  1709. function getExtraValue(vm, dataPathsArray) {
  1710. var context = vm;
  1711. dataPathsArray.forEach(function (dataPathArray) {
  1712. var dataPath = dataPathArray[0];
  1713. var value = dataPathArray[2];
  1714. if (dataPath || typeof value !== 'undefined') {
  1715. // ['','',index,'disable']
  1716. var propPath = dataPathArray[1];
  1717. var valuePath = dataPathArray[3];
  1718. var vFor;
  1719. if (Number.isInteger(dataPath)) {
  1720. vFor = dataPath;
  1721. } else if (!dataPath) {
  1722. vFor = context;
  1723. } else if (typeof dataPath === 'string' && dataPath) {
  1724. if (dataPath.indexOf('#s#') === 0) {
  1725. vFor = dataPath.substr(3);
  1726. } else {
  1727. vFor = vm.__get_value(dataPath, context);
  1728. }
  1729. }
  1730. if (Number.isInteger(vFor)) {
  1731. context = value;
  1732. } else if (!propPath) {
  1733. context = vFor[value];
  1734. } else {
  1735. if (Array.isArray(vFor)) {
  1736. context = vFor.find(function (vForItem) {
  1737. return vm.__get_value(propPath, vForItem) === value;
  1738. });
  1739. } else if (isPlainObject(vFor)) {
  1740. context = Object.keys(vFor).find(function (vForKey) {
  1741. return vm.__get_value(propPath, vFor[vForKey]) === value;
  1742. });
  1743. } else {
  1744. console.error('v-for 暂不支持循环数据:', vFor);
  1745. }
  1746. }
  1747. if (valuePath) {
  1748. context = vm.__get_value(valuePath, context);
  1749. }
  1750. }
  1751. });
  1752. return context;
  1753. }
  1754. function processEventExtra(vm, extra, event, __args__) {
  1755. var extraObj = {};
  1756. if (Array.isArray(extra) && extra.length) {
  1757. /**
  1758. *[
  1759. * ['data.items', 'data.id', item.data.id],
  1760. * ['metas', 'id', meta.id]
  1761. *],
  1762. *[
  1763. * ['data.items', 'data.id', item.data.id],
  1764. * ['metas', 'id', meta.id]
  1765. *],
  1766. *'test'
  1767. */
  1768. extra.forEach(function (dataPath, index) {
  1769. if (typeof dataPath === 'string') {
  1770. if (!dataPath) {
  1771. // model,prop.sync
  1772. extraObj['$' + index] = vm;
  1773. } else {
  1774. if (dataPath === '$event') {
  1775. // $event
  1776. extraObj['$' + index] = event;
  1777. } else if (dataPath === 'arguments') {
  1778. extraObj['$' + index] = event.detail ? event.detail.__args__ || __args__ : __args__;
  1779. } else if (dataPath.indexOf('$event.') === 0) {
  1780. // $event.target.value
  1781. extraObj['$' + index] = vm.__get_value(dataPath.replace('$event.', ''), event);
  1782. } else {
  1783. extraObj['$' + index] = vm.__get_value(dataPath);
  1784. }
  1785. }
  1786. } else {
  1787. extraObj['$' + index] = getExtraValue(vm, dataPath);
  1788. }
  1789. });
  1790. }
  1791. return extraObj;
  1792. }
  1793. function getObjByArray(arr) {
  1794. var obj = {};
  1795. for (var i = 1; i < arr.length; i++) {
  1796. var element = arr[i];
  1797. obj[element[0]] = element[1];
  1798. }
  1799. return obj;
  1800. }
  1801. function processEventArgs(vm, event) {
  1802. var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
  1803. var extra = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
  1804. var isCustom = arguments.length > 4 ? arguments[4] : undefined;
  1805. var methodName = arguments.length > 5 ? arguments[5] : undefined;
  1806. var isCustomMPEvent = false; // wxcomponent 组件,传递原始 event 对象
  1807. // fixed 用户直接触发 mpInstance.triggerEvent
  1808. var __args__ = isPlainObject(event.detail) ? event.detail.__args__ || [event.detail] : [event.detail];
  1809. if (isCustom) {
  1810. // 自定义事件
  1811. isCustomMPEvent = event.currentTarget && event.currentTarget.dataset && event.currentTarget.dataset.comType === 'wx';
  1812. if (!args.length) {
  1813. // 无参数,直接传入 event 或 detail 数组
  1814. if (isCustomMPEvent) {
  1815. return [event];
  1816. }
  1817. return __args__;
  1818. }
  1819. }
  1820. var extraObj = processEventExtra(vm, extra, event, __args__);
  1821. var ret = [];
  1822. args.forEach(function (arg) {
  1823. if (arg === '$event') {
  1824. if (methodName === '__set_model' && !isCustom) {
  1825. // input v-model value
  1826. ret.push(event.target.value);
  1827. } else {
  1828. if (isCustom && !isCustomMPEvent) {
  1829. ret.push(__args__[0]);
  1830. } else {
  1831. // wxcomponent 组件或内置组件
  1832. ret.push(event);
  1833. }
  1834. }
  1835. } else {
  1836. if (Array.isArray(arg) && arg[0] === 'o') {
  1837. ret.push(getObjByArray(arg));
  1838. } else if (typeof arg === 'string' && hasOwn(extraObj, arg)) {
  1839. ret.push(extraObj[arg]);
  1840. } else {
  1841. ret.push(arg);
  1842. }
  1843. }
  1844. });
  1845. return ret;
  1846. }
  1847. var ONCE = '~';
  1848. var CUSTOM = '^';
  1849. function isMatchEventType(eventType, optType) {
  1850. return eventType === optType || optType === 'regionchange' && (eventType === 'begin' || eventType === 'end');
  1851. }
  1852. function getContextVm(vm) {
  1853. var $parent = vm.$parent;
  1854. // 父组件是 scoped slots 或者其他自定义组件时继续查找
  1855. while ($parent && $parent.$parent && ($parent.$options.generic || $parent.$parent.$options.generic || $parent.$scope._$vuePid)) {
  1856. $parent = $parent.$parent;
  1857. }
  1858. return $parent && $parent.$parent;
  1859. }
  1860. function handleEvent(event) {
  1861. var _this2 = this;
  1862. event = wrapper$1(event);
  1863. // [['tap',[['handle',[1,2,a]],['handle1',[1,2,a]]]]]
  1864. var dataset = (event.currentTarget || event.target).dataset;
  1865. if (!dataset) {
  1866. return console.warn('事件信息不存在');
  1867. }
  1868. var eventOpts = dataset.eventOpts || dataset['event-opts']; // 支付宝 web-view 组件 dataset 非驼峰
  1869. if (!eventOpts) {
  1870. return console.warn('事件信息不存在');
  1871. }
  1872. // [['handle',[1,2,a]],['handle1',[1,2,a]]]
  1873. var eventType = event.type;
  1874. var ret = [];
  1875. eventOpts.forEach(function (eventOpt) {
  1876. var type = eventOpt[0];
  1877. var eventsArray = eventOpt[1];
  1878. var isCustom = type.charAt(0) === CUSTOM;
  1879. type = isCustom ? type.slice(1) : type;
  1880. var isOnce = type.charAt(0) === ONCE;
  1881. type = isOnce ? type.slice(1) : type;
  1882. if (eventsArray && isMatchEventType(eventType, type)) {
  1883. eventsArray.forEach(function (eventArray) {
  1884. var methodName = eventArray[0];
  1885. if (methodName) {
  1886. var handlerCtx = _this2.$vm;
  1887. if (handlerCtx.$options.generic) {
  1888. // mp-weixin,mp-toutiao 抽象节点模拟 scoped slots
  1889. handlerCtx = getContextVm(handlerCtx) || handlerCtx;
  1890. }
  1891. if (methodName === '$emit') {
  1892. handlerCtx.$emit.apply(handlerCtx, processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName));
  1893. return;
  1894. }
  1895. var handler = handlerCtx[methodName];
  1896. if (!isFn(handler)) {
  1897. var _type = _this2.$vm.mpType === 'page' ? 'Page' : 'Component';
  1898. var path = _this2.route || _this2.is;
  1899. throw new Error("".concat(_type, " \"").concat(path, "\" does not have a method \"").concat(methodName, "\""));
  1900. }
  1901. if (isOnce) {
  1902. if (handler.once) {
  1903. return;
  1904. }
  1905. handler.once = true;
  1906. }
  1907. var params = processEventArgs(_this2.$vm, event, eventArray[1], eventArray[2], isCustom, methodName);
  1908. params = Array.isArray(params) ? params : [];
  1909. // 参数尾部增加原始事件对象用于复杂表达式内获取额外数据
  1910. if (/=\s*\S+\.eventParams\s*\|\|\s*\S+\[['"]event-params['"]\]/.test(handler.toString())) {
  1911. // eslint-disable-next-line no-sparse-arrays
  1912. params = params.concat([,,,,,,,,,, event]);
  1913. }
  1914. ret.push(handler.apply(handlerCtx, params));
  1915. }
  1916. });
  1917. }
  1918. });
  1919. if (eventType === 'input' && ret.length === 1 && typeof ret[0] !== 'undefined') {
  1920. return ret[0];
  1921. }
  1922. }
  1923. var eventChannels = {};
  1924. function getEventChannel(id) {
  1925. var eventChannel = eventChannels[id];
  1926. delete eventChannels[id];
  1927. return eventChannel;
  1928. }
  1929. var hooks = ['onShow', 'onHide', 'onError', 'onPageNotFound', 'onThemeChange', 'onUnhandledRejection'];
  1930. function initEventChannel() {
  1931. _vue.default.prototype.getOpenerEventChannel = function () {
  1932. // 微信小程序使用自身getOpenerEventChannel
  1933. {
  1934. return this.$scope.getOpenerEventChannel();
  1935. }
  1936. };
  1937. var callHook = _vue.default.prototype.__call_hook;
  1938. _vue.default.prototype.__call_hook = function (hook, args) {
  1939. if (hook === 'onLoad' && args && args.__id__) {
  1940. this.__eventChannel__ = getEventChannel(args.__id__);
  1941. delete args.__id__;
  1942. }
  1943. return callHook.call(this, hook, args);
  1944. };
  1945. }
  1946. function initScopedSlotsParams() {
  1947. var center = {};
  1948. var parents = {};
  1949. function currentId(fn) {
  1950. var vueIds = this.$options.propsData.vueId;
  1951. if (vueIds) {
  1952. var vueId = vueIds.split(',')[0];
  1953. fn(vueId);
  1954. }
  1955. }
  1956. _vue.default.prototype.$hasSSP = function (vueId) {
  1957. var slot = center[vueId];
  1958. if (!slot) {
  1959. parents[vueId] = this;
  1960. this.$on('hook:destroyed', function () {
  1961. delete parents[vueId];
  1962. });
  1963. }
  1964. return slot;
  1965. };
  1966. _vue.default.prototype.$getSSP = function (vueId, name, needAll) {
  1967. var slot = center[vueId];
  1968. if (slot) {
  1969. var params = slot[name] || [];
  1970. if (needAll) {
  1971. return params;
  1972. }
  1973. return params[0];
  1974. }
  1975. };
  1976. _vue.default.prototype.$setSSP = function (name, value) {
  1977. var index = 0;
  1978. currentId.call(this, function (vueId) {
  1979. var slot = center[vueId];
  1980. var params = slot[name] = slot[name] || [];
  1981. params.push(value);
  1982. index = params.length - 1;
  1983. });
  1984. return index;
  1985. };
  1986. _vue.default.prototype.$initSSP = function () {
  1987. currentId.call(this, function (vueId) {
  1988. center[vueId] = {};
  1989. });
  1990. };
  1991. _vue.default.prototype.$callSSP = function () {
  1992. currentId.call(this, function (vueId) {
  1993. if (parents[vueId]) {
  1994. parents[vueId].$forceUpdate();
  1995. }
  1996. });
  1997. };
  1998. _vue.default.mixin({
  1999. destroyed: function destroyed() {
  2000. var propsData = this.$options.propsData;
  2001. var vueId = propsData && propsData.vueId;
  2002. if (vueId) {
  2003. delete center[vueId];
  2004. delete parents[vueId];
  2005. }
  2006. }
  2007. });
  2008. }
  2009. function parseBaseApp(vm, _ref4) {
  2010. var mocks = _ref4.mocks,
  2011. initRefs = _ref4.initRefs;
  2012. initEventChannel();
  2013. {
  2014. initScopedSlotsParams();
  2015. }
  2016. if (vm.$options.store) {
  2017. _vue.default.prototype.$store = vm.$options.store;
  2018. }
  2019. uniIdMixin(_vue.default);
  2020. _vue.default.prototype.mpHost = "mp-weixin";
  2021. _vue.default.mixin({
  2022. beforeCreate: function beforeCreate() {
  2023. if (!this.$options.mpType) {
  2024. return;
  2025. }
  2026. this.mpType = this.$options.mpType;
  2027. this.$mp = (0, _defineProperty2.default)({
  2028. data: {}
  2029. }, this.mpType, this.$options.mpInstance);
  2030. this.$scope = this.$options.mpInstance;
  2031. delete this.$options.mpType;
  2032. delete this.$options.mpInstance;
  2033. if (this.mpType === 'page' && typeof getApp === 'function') {
  2034. // hack vue-i18n
  2035. var app = getApp();
  2036. if (app.$vm && app.$vm.$i18n) {
  2037. this._i18n = app.$vm.$i18n;
  2038. }
  2039. }
  2040. if (this.mpType !== 'app') {
  2041. initRefs(this);
  2042. initMocks(this, mocks);
  2043. }
  2044. }
  2045. });
  2046. var appOptions = {
  2047. onLaunch: function onLaunch(args) {
  2048. if (this.$vm) {
  2049. // 已经初始化过了,主要是为了百度,百度 onShow 在 onLaunch 之前
  2050. return;
  2051. }
  2052. {
  2053. if (wx.canIUse && !wx.canIUse('nextTick')) {
  2054. // 事实 上2.2.3 即可,简单使用 2.3.0 的 nextTick 判断
  2055. console.error('当前微信基础库版本过低,请将 微信开发者工具-详情-项目设置-调试基础库版本 更换为`2.3.0`以上');
  2056. }
  2057. }
  2058. this.$vm = vm;
  2059. this.$vm.$mp = {
  2060. app: this
  2061. };
  2062. this.$vm.$scope = this;
  2063. // vm 上也挂载 globalData
  2064. this.$vm.globalData = this.globalData;
  2065. this.$vm._isMounted = true;
  2066. this.$vm.__call_hook('mounted', args);
  2067. this.$vm.__call_hook('onLaunch', args);
  2068. }
  2069. };
  2070. // 兼容旧版本 globalData
  2071. appOptions.globalData = vm.$options.globalData || {};
  2072. // 将 methods 中的方法挂在 getApp() 中
  2073. var methods = vm.$options.methods;
  2074. if (methods) {
  2075. Object.keys(methods).forEach(function (name) {
  2076. appOptions[name] = methods[name];
  2077. });
  2078. }
  2079. initAppLocale(_vue.default, vm, normalizeLocale(wx.getSystemInfoSync().language) || LOCALE_EN);
  2080. initHooks(appOptions, hooks);
  2081. initUnknownHooks(appOptions, vm.$options);
  2082. return appOptions;
  2083. }
  2084. function parseApp(vm) {
  2085. return parseBaseApp(vm, {
  2086. mocks: mocks,
  2087. initRefs: initRefs
  2088. });
  2089. }
  2090. function createApp(vm) {
  2091. App(parseApp(vm));
  2092. return vm;
  2093. }
  2094. var encodeReserveRE = /[!'()*]/g;
  2095. var encodeReserveReplacer = function encodeReserveReplacer(c) {
  2096. return '%' + c.charCodeAt(0).toString(16);
  2097. };
  2098. var commaRE = /%2C/g;
  2099. // fixed encodeURIComponent which is more conformant to RFC3986:
  2100. // - escapes [!'()*]
  2101. // - preserve commas
  2102. var encode = function encode(str) {
  2103. return encodeURIComponent(str).replace(encodeReserveRE, encodeReserveReplacer).replace(commaRE, ',');
  2104. };
  2105. function stringifyQuery(obj) {
  2106. var encodeStr = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : encode;
  2107. var res = obj ? Object.keys(obj).map(function (key) {
  2108. var val = obj[key];
  2109. if (val === undefined) {
  2110. return '';
  2111. }
  2112. if (val === null) {
  2113. return encodeStr(key);
  2114. }
  2115. if (Array.isArray(val)) {
  2116. var result = [];
  2117. val.forEach(function (val2) {
  2118. if (val2 === undefined) {
  2119. return;
  2120. }
  2121. if (val2 === null) {
  2122. result.push(encodeStr(key));
  2123. } else {
  2124. result.push(encodeStr(key) + '=' + encodeStr(val2));
  2125. }
  2126. });
  2127. return result.join('&');
  2128. }
  2129. return encodeStr(key) + '=' + encodeStr(val);
  2130. }).filter(function (x) {
  2131. return x.length > 0;
  2132. }).join('&') : null;
  2133. return res ? "?".concat(res) : '';
  2134. }
  2135. function parseBaseComponent(vueComponentOptions) {
  2136. var _ref5 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  2137. isPage = _ref5.isPage,
  2138. initRelation = _ref5.initRelation;
  2139. var needVueOptions = arguments.length > 2 ? arguments[2] : undefined;
  2140. var _initVueComponent = initVueComponent(_vue.default, vueComponentOptions),
  2141. _initVueComponent2 = (0, _slicedToArray2.default)(_initVueComponent, 2),
  2142. VueComponent = _initVueComponent2[0],
  2143. vueOptions = _initVueComponent2[1];
  2144. var options = _objectSpread({
  2145. multipleSlots: true,
  2146. // styleIsolation: 'apply-shared',
  2147. addGlobalClass: true
  2148. }, vueOptions.options || {});
  2149. {
  2150. // 微信 multipleSlots 部分情况有 bug,导致内容顺序错乱 如 u-list,提供覆盖选项
  2151. if (vueOptions['mp-weixin'] && vueOptions['mp-weixin'].options) {
  2152. Object.assign(options, vueOptions['mp-weixin'].options);
  2153. }
  2154. }
  2155. var componentOptions = {
  2156. options: options,
  2157. data: initData(vueOptions, _vue.default.prototype),
  2158. behaviors: initBehaviors(vueOptions, initBehavior),
  2159. properties: initProperties(vueOptions.props, false, vueOptions.__file, options),
  2160. lifetimes: {
  2161. attached: function attached() {
  2162. var properties = this.properties;
  2163. var options = {
  2164. mpType: isPage.call(this) ? 'page' : 'component',
  2165. mpInstance: this,
  2166. propsData: properties
  2167. };
  2168. initVueIds(properties.vueId, this);
  2169. // 处理父子关系
  2170. initRelation.call(this, {
  2171. vuePid: this._$vuePid,
  2172. vueOptions: options
  2173. });
  2174. // 初始化 vue 实例
  2175. this.$vm = new VueComponent(options);
  2176. // 处理$slots,$scopedSlots(暂不支持动态变化$slots)
  2177. initSlots(this.$vm, properties.vueSlots);
  2178. // 触发首次 setData
  2179. this.$vm.$mount();
  2180. },
  2181. ready: function ready() {
  2182. // 当组件 props 默认值为 true,初始化时传入 false 会导致 created,ready 触发, 但 attached 不触发
  2183. // https://developers.weixin.qq.com/community/develop/doc/00066ae2844cc0f8eb883e2a557800
  2184. if (this.$vm) {
  2185. this.$vm._isMounted = true;
  2186. this.$vm.__call_hook('mounted');
  2187. this.$vm.__call_hook('onReady');
  2188. }
  2189. },
  2190. detached: function detached() {
  2191. this.$vm && this.$vm.$destroy();
  2192. }
  2193. },
  2194. pageLifetimes: {
  2195. show: function show(args) {
  2196. this.$vm && this.$vm.__call_hook('onPageShow', args);
  2197. },
  2198. hide: function hide() {
  2199. this.$vm && this.$vm.__call_hook('onPageHide');
  2200. },
  2201. resize: function resize(size) {
  2202. this.$vm && this.$vm.__call_hook('onPageResize', size);
  2203. }
  2204. },
  2205. methods: {
  2206. __l: handleLink,
  2207. __e: handleEvent
  2208. }
  2209. };
  2210. // externalClasses
  2211. if (vueOptions.externalClasses) {
  2212. componentOptions.externalClasses = vueOptions.externalClasses;
  2213. }
  2214. if (Array.isArray(vueOptions.wxsCallMethods)) {
  2215. vueOptions.wxsCallMethods.forEach(function (callMethod) {
  2216. componentOptions.methods[callMethod] = function (args) {
  2217. return this.$vm[callMethod](args);
  2218. };
  2219. });
  2220. }
  2221. if (needVueOptions) {
  2222. return [componentOptions, vueOptions, VueComponent];
  2223. }
  2224. if (isPage) {
  2225. return componentOptions;
  2226. }
  2227. return [componentOptions, VueComponent];
  2228. }
  2229. function parseComponent(vueComponentOptions, needVueOptions) {
  2230. return parseBaseComponent(vueComponentOptions, {
  2231. isPage: isPage,
  2232. initRelation: initRelation
  2233. }, needVueOptions);
  2234. }
  2235. var hooks$1 = ['onShow', 'onHide', 'onUnload'];
  2236. hooks$1.push.apply(hooks$1, PAGE_EVENT_HOOKS);
  2237. function parseBasePage(vuePageOptions) {
  2238. var _parseComponent = parseComponent(vuePageOptions, true),
  2239. _parseComponent2 = (0, _slicedToArray2.default)(_parseComponent, 2),
  2240. pageOptions = _parseComponent2[0],
  2241. vueOptions = _parseComponent2[1];
  2242. initHooks(pageOptions.methods, hooks$1, vueOptions);
  2243. pageOptions.methods.onLoad = function (query) {
  2244. this.options = query;
  2245. var copyQuery = Object.assign({}, query);
  2246. delete copyQuery.__id__;
  2247. this.$page = {
  2248. fullPath: '/' + (this.route || this.is) + stringifyQuery(copyQuery)
  2249. };
  2250. this.$vm.$mp.query = query; // 兼容 mpvue
  2251. this.$vm.__call_hook('onLoad', query);
  2252. };
  2253. {
  2254. initUnknownHooks(pageOptions.methods, vuePageOptions, ['onReady']);
  2255. }
  2256. {
  2257. initWorkletMethods(pageOptions.methods, vueOptions.methods);
  2258. }
  2259. return pageOptions;
  2260. }
  2261. function parsePage(vuePageOptions) {
  2262. return parseBasePage(vuePageOptions);
  2263. }
  2264. function createPage(vuePageOptions) {
  2265. {
  2266. return Component(parsePage(vuePageOptions));
  2267. }
  2268. }
  2269. function createComponent(vueOptions) {
  2270. {
  2271. return Component(parseComponent(vueOptions));
  2272. }
  2273. }
  2274. function createSubpackageApp(vm) {
  2275. var appOptions = parseApp(vm);
  2276. var app = getApp({
  2277. allowDefault: true
  2278. });
  2279. vm.$scope = app;
  2280. var globalData = app.globalData;
  2281. if (globalData) {
  2282. Object.keys(appOptions.globalData).forEach(function (name) {
  2283. if (!hasOwn(globalData, name)) {
  2284. globalData[name] = appOptions.globalData[name];
  2285. }
  2286. });
  2287. }
  2288. Object.keys(appOptions).forEach(function (name) {
  2289. if (!hasOwn(app, name)) {
  2290. app[name] = appOptions[name];
  2291. }
  2292. });
  2293. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2294. wx.onAppShow(function () {
  2295. for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
  2296. args[_key5] = arguments[_key5];
  2297. }
  2298. vm.__call_hook('onShow', args);
  2299. });
  2300. }
  2301. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2302. wx.onAppHide(function () {
  2303. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  2304. args[_key6] = arguments[_key6];
  2305. }
  2306. vm.__call_hook('onHide', args);
  2307. });
  2308. }
  2309. if (isFn(appOptions.onLaunch)) {
  2310. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2311. vm.__call_hook('onLaunch', args);
  2312. }
  2313. return vm;
  2314. }
  2315. function createPlugin(vm) {
  2316. var appOptions = parseApp(vm);
  2317. if (isFn(appOptions.onShow) && wx.onAppShow) {
  2318. wx.onAppShow(function () {
  2319. for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
  2320. args[_key7] = arguments[_key7];
  2321. }
  2322. vm.__call_hook('onShow', args);
  2323. });
  2324. }
  2325. if (isFn(appOptions.onHide) && wx.onAppHide) {
  2326. wx.onAppHide(function () {
  2327. for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
  2328. args[_key8] = arguments[_key8];
  2329. }
  2330. vm.__call_hook('onHide', args);
  2331. });
  2332. }
  2333. if (isFn(appOptions.onLaunch)) {
  2334. var args = wx.getLaunchOptionsSync && wx.getLaunchOptionsSync();
  2335. vm.__call_hook('onLaunch', args);
  2336. }
  2337. return vm;
  2338. }
  2339. todos.forEach(function (todoApi) {
  2340. protocols[todoApi] = false;
  2341. });
  2342. canIUses.forEach(function (canIUseApi) {
  2343. var apiName = protocols[canIUseApi] && protocols[canIUseApi].name ? protocols[canIUseApi].name : canIUseApi;
  2344. if (!wx.canIUse(apiName)) {
  2345. protocols[canIUseApi] = false;
  2346. }
  2347. });
  2348. var uni = {};
  2349. if (typeof Proxy !== 'undefined' && "mp-weixin" !== 'app-plus') {
  2350. uni = new Proxy({}, {
  2351. get: function get(target, name) {
  2352. if (hasOwn(target, name)) {
  2353. return target[name];
  2354. }
  2355. if (baseApi[name]) {
  2356. return baseApi[name];
  2357. }
  2358. if (api[name]) {
  2359. return promisify(name, api[name]);
  2360. }
  2361. {
  2362. if (extraApi[name]) {
  2363. return promisify(name, extraApi[name]);
  2364. }
  2365. if (todoApis[name]) {
  2366. return promisify(name, todoApis[name]);
  2367. }
  2368. }
  2369. if (eventApi[name]) {
  2370. return eventApi[name];
  2371. }
  2372. return promisify(name, wrapper(name, wx[name]));
  2373. },
  2374. set: function set(target, name, value) {
  2375. target[name] = value;
  2376. return true;
  2377. }
  2378. });
  2379. } else {
  2380. Object.keys(baseApi).forEach(function (name) {
  2381. uni[name] = baseApi[name];
  2382. });
  2383. {
  2384. Object.keys(todoApis).forEach(function (name) {
  2385. uni[name] = promisify(name, todoApis[name]);
  2386. });
  2387. Object.keys(extraApi).forEach(function (name) {
  2388. uni[name] = promisify(name, extraApi[name]);
  2389. });
  2390. }
  2391. Object.keys(eventApi).forEach(function (name) {
  2392. uni[name] = eventApi[name];
  2393. });
  2394. Object.keys(api).forEach(function (name) {
  2395. uni[name] = promisify(name, api[name]);
  2396. });
  2397. Object.keys(wx).forEach(function (name) {
  2398. if (hasOwn(wx, name) || hasOwn(protocols, name)) {
  2399. uni[name] = promisify(name, wrapper(name, wx[name]));
  2400. }
  2401. });
  2402. }
  2403. wx.createApp = createApp;
  2404. wx.createPage = createPage;
  2405. wx.createComponent = createComponent;
  2406. wx.createSubpackageApp = createSubpackageApp;
  2407. wx.createPlugin = createPlugin;
  2408. var uni$1 = uni;
  2409. var _default = uni$1;
  2410. exports.default = _default;
  2411. /* 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)))
  2412. /***/ }),
  2413. /* 3 */
  2414. /*!***********************************!*\
  2415. !*** (webpack)/buildin/global.js ***!
  2416. \***********************************/
  2417. /*! no static exports found */
  2418. /***/ (function(module, exports) {
  2419. var g;
  2420. // This works in non-strict mode
  2421. g = (function() {
  2422. return this;
  2423. })();
  2424. try {
  2425. // This works if eval is allowed (see CSP)
  2426. g = g || new Function("return this")();
  2427. } catch (e) {
  2428. // This works if the window reference is available
  2429. if (typeof window === "object") g = window;
  2430. }
  2431. // g can still be undefined, but nothing to do about it...
  2432. // We return undefined, instead of nothing here, so it's
  2433. // easier to handle this case. if(!global) { ...}
  2434. module.exports = g;
  2435. /***/ }),
  2436. /* 4 */
  2437. /*!**********************************************************************!*\
  2438. !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
  2439. \**********************************************************************/
  2440. /*! no static exports found */
  2441. /***/ (function(module, exports) {
  2442. function _interopRequireDefault(obj) {
  2443. return obj && obj.__esModule ? obj : {
  2444. "default": obj
  2445. };
  2446. }
  2447. module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2448. /***/ }),
  2449. /* 5 */
  2450. /*!**************************************************************!*\
  2451. !*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
  2452. \**************************************************************/
  2453. /*! no static exports found */
  2454. /***/ (function(module, exports, __webpack_require__) {
  2455. var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ 6);
  2456. var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ 7);
  2457. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2458. var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ 10);
  2459. function _slicedToArray(arr, i) {
  2460. return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
  2461. }
  2462. module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2463. /***/ }),
  2464. /* 6 */
  2465. /*!***************************************************************!*\
  2466. !*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
  2467. \***************************************************************/
  2468. /*! no static exports found */
  2469. /***/ (function(module, exports) {
  2470. function _arrayWithHoles(arr) {
  2471. if (Array.isArray(arr)) return arr;
  2472. }
  2473. module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2474. /***/ }),
  2475. /* 7 */
  2476. /*!*********************************************************************!*\
  2477. !*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
  2478. \*********************************************************************/
  2479. /*! no static exports found */
  2480. /***/ (function(module, exports) {
  2481. function _iterableToArrayLimit(arr, i) {
  2482. var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
  2483. if (null != _i) {
  2484. var _s,
  2485. _e,
  2486. _x,
  2487. _r,
  2488. _arr = [],
  2489. _n = !0,
  2490. _d = !1;
  2491. try {
  2492. if (_x = (_i = _i.call(arr)).next, 0 === i) {
  2493. if (Object(_i) !== _i) return;
  2494. _n = !1;
  2495. } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0) {
  2496. ;
  2497. }
  2498. } catch (err) {
  2499. _d = !0, _e = err;
  2500. } finally {
  2501. try {
  2502. if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
  2503. } finally {
  2504. if (_d) throw _e;
  2505. }
  2506. }
  2507. return _arr;
  2508. }
  2509. }
  2510. module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2511. /***/ }),
  2512. /* 8 */
  2513. /*!***************************************************************************!*\
  2514. !*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
  2515. \***************************************************************************/
  2516. /*! no static exports found */
  2517. /***/ (function(module, exports, __webpack_require__) {
  2518. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2519. function _unsupportedIterableToArray(o, minLen) {
  2520. if (!o) return;
  2521. if (typeof o === "string") return arrayLikeToArray(o, minLen);
  2522. var n = Object.prototype.toString.call(o).slice(8, -1);
  2523. if (n === "Object" && o.constructor) n = o.constructor.name;
  2524. if (n === "Map" || n === "Set") return Array.from(o);
  2525. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
  2526. }
  2527. module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2528. /***/ }),
  2529. /* 9 */
  2530. /*!*****************************************************************!*\
  2531. !*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
  2532. \*****************************************************************/
  2533. /*! no static exports found */
  2534. /***/ (function(module, exports) {
  2535. function _arrayLikeToArray(arr, len) {
  2536. if (len == null || len > arr.length) len = arr.length;
  2537. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  2538. arr2[i] = arr[i];
  2539. }
  2540. return arr2;
  2541. }
  2542. module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2543. /***/ }),
  2544. /* 10 */
  2545. /*!****************************************************************!*\
  2546. !*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
  2547. \****************************************************************/
  2548. /*! no static exports found */
  2549. /***/ (function(module, exports) {
  2550. function _nonIterableRest() {
  2551. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2552. }
  2553. module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2554. /***/ }),
  2555. /* 11 */
  2556. /*!***************************************************************!*\
  2557. !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
  2558. \***************************************************************/
  2559. /*! no static exports found */
  2560. /***/ (function(module, exports, __webpack_require__) {
  2561. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  2562. function _defineProperty(obj, key, value) {
  2563. key = toPropertyKey(key);
  2564. if (key in obj) {
  2565. Object.defineProperty(obj, key, {
  2566. value: value,
  2567. enumerable: true,
  2568. configurable: true,
  2569. writable: true
  2570. });
  2571. } else {
  2572. obj[key] = value;
  2573. }
  2574. return obj;
  2575. }
  2576. module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2577. /***/ }),
  2578. /* 12 */
  2579. /*!**************************************************************!*\
  2580. !*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
  2581. \**************************************************************/
  2582. /*! no static exports found */
  2583. /***/ (function(module, exports, __webpack_require__) {
  2584. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2585. var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ 14);
  2586. function _toPropertyKey(arg) {
  2587. var key = toPrimitive(arg, "string");
  2588. return _typeof(key) === "symbol" ? key : String(key);
  2589. }
  2590. module.exports = _toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2591. /***/ }),
  2592. /* 13 */
  2593. /*!*******************************************************!*\
  2594. !*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
  2595. \*******************************************************/
  2596. /*! no static exports found */
  2597. /***/ (function(module, exports) {
  2598. function _typeof(obj) {
  2599. "@babel/helpers - typeof";
  2600. return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  2601. return typeof obj;
  2602. } : function (obj) {
  2603. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  2604. }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
  2605. }
  2606. module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2607. /***/ }),
  2608. /* 14 */
  2609. /*!************************************************************!*\
  2610. !*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
  2611. \************************************************************/
  2612. /*! no static exports found */
  2613. /***/ (function(module, exports, __webpack_require__) {
  2614. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  2615. function _toPrimitive(input, hint) {
  2616. if (_typeof(input) !== "object" || input === null) return input;
  2617. var prim = input[Symbol.toPrimitive];
  2618. if (prim !== undefined) {
  2619. var res = prim.call(input, hint || "default");
  2620. if (_typeof(res) !== "object") return res;
  2621. throw new TypeError("@@toPrimitive must return a primitive value.");
  2622. }
  2623. return (hint === "string" ? String : Number)(input);
  2624. }
  2625. module.exports = _toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2626. /***/ }),
  2627. /* 15 */
  2628. /*!**********************************************************!*\
  2629. !*** ./node_modules/@babel/runtime/helpers/construct.js ***!
  2630. \**********************************************************/
  2631. /*! no static exports found */
  2632. /***/ (function(module, exports, __webpack_require__) {
  2633. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  2634. var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ 17);
  2635. function _construct(Parent, args, Class) {
  2636. if (isNativeReflectConstruct()) {
  2637. module.exports = _construct = Reflect.construct.bind(), module.exports.__esModule = true, module.exports["default"] = module.exports;
  2638. } else {
  2639. module.exports = _construct = function _construct(Parent, args, Class) {
  2640. var a = [null];
  2641. a.push.apply(a, args);
  2642. var Constructor = Function.bind.apply(Parent, a);
  2643. var instance = new Constructor();
  2644. if (Class) setPrototypeOf(instance, Class.prototype);
  2645. return instance;
  2646. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2647. }
  2648. return _construct.apply(null, arguments);
  2649. }
  2650. module.exports = _construct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2651. /***/ }),
  2652. /* 16 */
  2653. /*!***************************************************************!*\
  2654. !*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
  2655. \***************************************************************/
  2656. /*! no static exports found */
  2657. /***/ (function(module, exports) {
  2658. function _setPrototypeOf(o, p) {
  2659. module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
  2660. o.__proto__ = p;
  2661. return o;
  2662. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2663. return _setPrototypeOf(o, p);
  2664. }
  2665. module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2666. /***/ }),
  2667. /* 17 */
  2668. /*!*************************************************************************!*\
  2669. !*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
  2670. \*************************************************************************/
  2671. /*! no static exports found */
  2672. /***/ (function(module, exports) {
  2673. function _isNativeReflectConstruct() {
  2674. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  2675. if (Reflect.construct.sham) return false;
  2676. if (typeof Proxy === "function") return true;
  2677. try {
  2678. Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
  2679. return true;
  2680. } catch (e) {
  2681. return false;
  2682. }
  2683. }
  2684. module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2685. /***/ }),
  2686. /* 18 */
  2687. /*!******************************************************************!*\
  2688. !*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
  2689. \******************************************************************/
  2690. /*! no static exports found */
  2691. /***/ (function(module, exports, __webpack_require__) {
  2692. var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ 19);
  2693. var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ 20);
  2694. var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ 8);
  2695. var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ 21);
  2696. function _toConsumableArray(arr) {
  2697. return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
  2698. }
  2699. module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2700. /***/ }),
  2701. /* 19 */
  2702. /*!******************************************************************!*\
  2703. !*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
  2704. \******************************************************************/
  2705. /*! no static exports found */
  2706. /***/ (function(module, exports, __webpack_require__) {
  2707. var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ 9);
  2708. function _arrayWithoutHoles(arr) {
  2709. if (Array.isArray(arr)) return arrayLikeToArray(arr);
  2710. }
  2711. module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2712. /***/ }),
  2713. /* 20 */
  2714. /*!****************************************************************!*\
  2715. !*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
  2716. \****************************************************************/
  2717. /*! no static exports found */
  2718. /***/ (function(module, exports) {
  2719. function _iterableToArray(iter) {
  2720. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  2721. }
  2722. module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2723. /***/ }),
  2724. /* 21 */
  2725. /*!******************************************************************!*\
  2726. !*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
  2727. \******************************************************************/
  2728. /*! no static exports found */
  2729. /***/ (function(module, exports) {
  2730. function _nonIterableSpread() {
  2731. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  2732. }
  2733. module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
  2734. /***/ }),
  2735. /* 22 */
  2736. /*!*************************************************************!*\
  2737. !*** ./node_modules/@dcloudio/uni-i18n/dist/uni-i18n.es.js ***!
  2738. \*************************************************************/
  2739. /*! no static exports found */
  2740. /***/ (function(module, exports, __webpack_require__) {
  2741. "use strict";
  2742. /* WEBPACK VAR INJECTION */(function(uni, global) {
  2743. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  2744. Object.defineProperty(exports, "__esModule", {
  2745. value: true
  2746. });
  2747. exports.LOCALE_ZH_HANT = exports.LOCALE_ZH_HANS = exports.LOCALE_FR = exports.LOCALE_ES = exports.LOCALE_EN = exports.I18n = exports.Formatter = void 0;
  2748. exports.compileI18nJsonStr = compileI18nJsonStr;
  2749. exports.hasI18nJson = hasI18nJson;
  2750. exports.initVueI18n = initVueI18n;
  2751. exports.isI18nStr = isI18nStr;
  2752. exports.isString = void 0;
  2753. exports.normalizeLocale = normalizeLocale;
  2754. exports.parseI18nJson = parseI18nJson;
  2755. exports.resolveLocale = resolveLocale;
  2756. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  2757. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  2758. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  2759. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  2760. var isObject = function isObject(val) {
  2761. return val !== null && (0, _typeof2.default)(val) === 'object';
  2762. };
  2763. var defaultDelimiters = ['{', '}'];
  2764. var BaseFormatter = /*#__PURE__*/function () {
  2765. function BaseFormatter() {
  2766. (0, _classCallCheck2.default)(this, BaseFormatter);
  2767. this._caches = Object.create(null);
  2768. }
  2769. (0, _createClass2.default)(BaseFormatter, [{
  2770. key: "interpolate",
  2771. value: function interpolate(message, values) {
  2772. var delimiters = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultDelimiters;
  2773. if (!values) {
  2774. return [message];
  2775. }
  2776. var tokens = this._caches[message];
  2777. if (!tokens) {
  2778. tokens = parse(message, delimiters);
  2779. this._caches[message] = tokens;
  2780. }
  2781. return compile(tokens, values);
  2782. }
  2783. }]);
  2784. return BaseFormatter;
  2785. }();
  2786. exports.Formatter = BaseFormatter;
  2787. var RE_TOKEN_LIST_VALUE = /^(?:\d)+/;
  2788. var RE_TOKEN_NAMED_VALUE = /^(?:\w)+/;
  2789. function parse(format, _ref) {
  2790. var _ref2 = (0, _slicedToArray2.default)(_ref, 2),
  2791. startDelimiter = _ref2[0],
  2792. endDelimiter = _ref2[1];
  2793. var tokens = [];
  2794. var position = 0;
  2795. var text = '';
  2796. while (position < format.length) {
  2797. var char = format[position++];
  2798. if (char === startDelimiter) {
  2799. if (text) {
  2800. tokens.push({
  2801. type: 'text',
  2802. value: text
  2803. });
  2804. }
  2805. text = '';
  2806. var sub = '';
  2807. char = format[position++];
  2808. while (char !== undefined && char !== endDelimiter) {
  2809. sub += char;
  2810. char = format[position++];
  2811. }
  2812. var isClosed = char === endDelimiter;
  2813. var type = RE_TOKEN_LIST_VALUE.test(sub) ? 'list' : isClosed && RE_TOKEN_NAMED_VALUE.test(sub) ? 'named' : 'unknown';
  2814. tokens.push({
  2815. value: sub,
  2816. type: type
  2817. });
  2818. }
  2819. // else if (char === '%') {
  2820. // // when found rails i18n syntax, skip text capture
  2821. // if (format[position] !== '{') {
  2822. // text += char
  2823. // }
  2824. // }
  2825. else {
  2826. text += char;
  2827. }
  2828. }
  2829. text && tokens.push({
  2830. type: 'text',
  2831. value: text
  2832. });
  2833. return tokens;
  2834. }
  2835. function compile(tokens, values) {
  2836. var compiled = [];
  2837. var index = 0;
  2838. var mode = Array.isArray(values) ? 'list' : isObject(values) ? 'named' : 'unknown';
  2839. if (mode === 'unknown') {
  2840. return compiled;
  2841. }
  2842. while (index < tokens.length) {
  2843. var token = tokens[index];
  2844. switch (token.type) {
  2845. case 'text':
  2846. compiled.push(token.value);
  2847. break;
  2848. case 'list':
  2849. compiled.push(values[parseInt(token.value, 10)]);
  2850. break;
  2851. case 'named':
  2852. if (mode === 'named') {
  2853. compiled.push(values[token.value]);
  2854. } else {
  2855. if (true) {
  2856. console.warn("Type of token '".concat(token.type, "' and format of value '").concat(mode, "' don't match!"));
  2857. }
  2858. }
  2859. break;
  2860. case 'unknown':
  2861. if (true) {
  2862. console.warn("Detect 'unknown' type of token!");
  2863. }
  2864. break;
  2865. }
  2866. index++;
  2867. }
  2868. return compiled;
  2869. }
  2870. var LOCALE_ZH_HANS = 'zh-Hans';
  2871. exports.LOCALE_ZH_HANS = LOCALE_ZH_HANS;
  2872. var LOCALE_ZH_HANT = 'zh-Hant';
  2873. exports.LOCALE_ZH_HANT = LOCALE_ZH_HANT;
  2874. var LOCALE_EN = 'en';
  2875. exports.LOCALE_EN = LOCALE_EN;
  2876. var LOCALE_FR = 'fr';
  2877. exports.LOCALE_FR = LOCALE_FR;
  2878. var LOCALE_ES = 'es';
  2879. exports.LOCALE_ES = LOCALE_ES;
  2880. var hasOwnProperty = Object.prototype.hasOwnProperty;
  2881. var hasOwn = function hasOwn(val, key) {
  2882. return hasOwnProperty.call(val, key);
  2883. };
  2884. var defaultFormatter = new BaseFormatter();
  2885. function include(str, parts) {
  2886. return !!parts.find(function (part) {
  2887. return str.indexOf(part) !== -1;
  2888. });
  2889. }
  2890. function startsWith(str, parts) {
  2891. return parts.find(function (part) {
  2892. return str.indexOf(part) === 0;
  2893. });
  2894. }
  2895. function normalizeLocale(locale, messages) {
  2896. if (!locale) {
  2897. return;
  2898. }
  2899. locale = locale.trim().replace(/_/g, '-');
  2900. if (messages && messages[locale]) {
  2901. return locale;
  2902. }
  2903. locale = locale.toLowerCase();
  2904. if (locale === 'chinese') {
  2905. // 支付宝
  2906. return LOCALE_ZH_HANS;
  2907. }
  2908. if (locale.indexOf('zh') === 0) {
  2909. if (locale.indexOf('-hans') > -1) {
  2910. return LOCALE_ZH_HANS;
  2911. }
  2912. if (locale.indexOf('-hant') > -1) {
  2913. return LOCALE_ZH_HANT;
  2914. }
  2915. if (include(locale, ['-tw', '-hk', '-mo', '-cht'])) {
  2916. return LOCALE_ZH_HANT;
  2917. }
  2918. return LOCALE_ZH_HANS;
  2919. }
  2920. var locales = [LOCALE_EN, LOCALE_FR, LOCALE_ES];
  2921. if (messages && Object.keys(messages).length > 0) {
  2922. locales = Object.keys(messages);
  2923. }
  2924. var lang = startsWith(locale, locales);
  2925. if (lang) {
  2926. return lang;
  2927. }
  2928. }
  2929. var I18n = /*#__PURE__*/function () {
  2930. function I18n(_ref3) {
  2931. var locale = _ref3.locale,
  2932. fallbackLocale = _ref3.fallbackLocale,
  2933. messages = _ref3.messages,
  2934. watcher = _ref3.watcher,
  2935. formater = _ref3.formater;
  2936. (0, _classCallCheck2.default)(this, I18n);
  2937. this.locale = LOCALE_EN;
  2938. this.fallbackLocale = LOCALE_EN;
  2939. this.message = {};
  2940. this.messages = {};
  2941. this.watchers = [];
  2942. if (fallbackLocale) {
  2943. this.fallbackLocale = fallbackLocale;
  2944. }
  2945. this.formater = formater || defaultFormatter;
  2946. this.messages = messages || {};
  2947. this.setLocale(locale || LOCALE_EN);
  2948. if (watcher) {
  2949. this.watchLocale(watcher);
  2950. }
  2951. }
  2952. (0, _createClass2.default)(I18n, [{
  2953. key: "setLocale",
  2954. value: function setLocale(locale) {
  2955. var _this = this;
  2956. var oldLocale = this.locale;
  2957. this.locale = normalizeLocale(locale, this.messages) || this.fallbackLocale;
  2958. if (!this.messages[this.locale]) {
  2959. // 可能初始化时不存在
  2960. this.messages[this.locale] = {};
  2961. }
  2962. this.message = this.messages[this.locale];
  2963. // 仅发生变化时,通知
  2964. if (oldLocale !== this.locale) {
  2965. this.watchers.forEach(function (watcher) {
  2966. watcher(_this.locale, oldLocale);
  2967. });
  2968. }
  2969. }
  2970. }, {
  2971. key: "getLocale",
  2972. value: function getLocale() {
  2973. return this.locale;
  2974. }
  2975. }, {
  2976. key: "watchLocale",
  2977. value: function watchLocale(fn) {
  2978. var _this2 = this;
  2979. var index = this.watchers.push(fn) - 1;
  2980. return function () {
  2981. _this2.watchers.splice(index, 1);
  2982. };
  2983. }
  2984. }, {
  2985. key: "add",
  2986. value: function add(locale, message) {
  2987. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  2988. var curMessages = this.messages[locale];
  2989. if (curMessages) {
  2990. if (override) {
  2991. Object.assign(curMessages, message);
  2992. } else {
  2993. Object.keys(message).forEach(function (key) {
  2994. if (!hasOwn(curMessages, key)) {
  2995. curMessages[key] = message[key];
  2996. }
  2997. });
  2998. }
  2999. } else {
  3000. this.messages[locale] = message;
  3001. }
  3002. }
  3003. }, {
  3004. key: "f",
  3005. value: function f(message, values, delimiters) {
  3006. return this.formater.interpolate(message, values, delimiters).join('');
  3007. }
  3008. }, {
  3009. key: "t",
  3010. value: function t(key, locale, values) {
  3011. var message = this.message;
  3012. if (typeof locale === 'string') {
  3013. locale = normalizeLocale(locale, this.messages);
  3014. locale && (message = this.messages[locale]);
  3015. } else {
  3016. values = locale;
  3017. }
  3018. if (!hasOwn(message, key)) {
  3019. console.warn("Cannot translate the value of keypath ".concat(key, ". Use the value of keypath as default."));
  3020. return key;
  3021. }
  3022. return this.formater.interpolate(message[key], values).join('');
  3023. }
  3024. }]);
  3025. return I18n;
  3026. }();
  3027. exports.I18n = I18n;
  3028. function watchAppLocale(appVm, i18n) {
  3029. // 需要保证 watch 的触发在组件渲染之前
  3030. if (appVm.$watchLocale) {
  3031. // vue2
  3032. appVm.$watchLocale(function (newLocale) {
  3033. i18n.setLocale(newLocale);
  3034. });
  3035. } else {
  3036. appVm.$watch(function () {
  3037. return appVm.$locale;
  3038. }, function (newLocale) {
  3039. i18n.setLocale(newLocale);
  3040. });
  3041. }
  3042. }
  3043. function getDefaultLocale() {
  3044. if (typeof uni !== 'undefined' && uni.getLocale) {
  3045. return uni.getLocale();
  3046. }
  3047. // 小程序平台,uni 和 uni-i18n 互相引用,导致访问不到 uni,故在 global 上挂了 getLocale
  3048. if (typeof global !== 'undefined' && global.getLocale) {
  3049. return global.getLocale();
  3050. }
  3051. return LOCALE_EN;
  3052. }
  3053. function initVueI18n(locale) {
  3054. var messages = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  3055. var fallbackLocale = arguments.length > 2 ? arguments[2] : undefined;
  3056. var watcher = arguments.length > 3 ? arguments[3] : undefined;
  3057. // 兼容旧版本入参
  3058. if (typeof locale !== 'string') {
  3059. var _ref4 = [messages, locale];
  3060. locale = _ref4[0];
  3061. messages = _ref4[1];
  3062. }
  3063. if (typeof locale !== 'string') {
  3064. // 因为小程序平台,uni-i18n 和 uni 互相引用,导致此时访问 uni 时,为 undefined
  3065. locale = getDefaultLocale();
  3066. }
  3067. if (typeof fallbackLocale !== 'string') {
  3068. fallbackLocale = typeof __uniConfig !== 'undefined' && __uniConfig.fallbackLocale || LOCALE_EN;
  3069. }
  3070. var i18n = new I18n({
  3071. locale: locale,
  3072. fallbackLocale: fallbackLocale,
  3073. messages: messages,
  3074. watcher: watcher
  3075. });
  3076. var _t = function t(key, values) {
  3077. if (typeof getApp !== 'function') {
  3078. // app view
  3079. /* eslint-disable no-func-assign */
  3080. _t = function t(key, values) {
  3081. return i18n.t(key, values);
  3082. };
  3083. } else {
  3084. var isWatchedAppLocale = false;
  3085. _t = function t(key, values) {
  3086. var appVm = getApp().$vm;
  3087. // 可能$vm还不存在,比如在支付宝小程序中,组件定义较早,在props的default里使用了t()函数(如uni-goods-nav),此时app还未初始化
  3088. // options: {
  3089. // type: Array,
  3090. // default () {
  3091. // return [{
  3092. // icon: 'shop',
  3093. // text: t("uni-goods-nav.options.shop"),
  3094. // }, {
  3095. // icon: 'cart',
  3096. // text: t("uni-goods-nav.options.cart")
  3097. // }]
  3098. // }
  3099. // },
  3100. if (appVm) {
  3101. // 触发响应式
  3102. appVm.$locale;
  3103. if (!isWatchedAppLocale) {
  3104. isWatchedAppLocale = true;
  3105. watchAppLocale(appVm, i18n);
  3106. }
  3107. }
  3108. return i18n.t(key, values);
  3109. };
  3110. }
  3111. return _t(key, values);
  3112. };
  3113. return {
  3114. i18n: i18n,
  3115. f: function f(message, values, delimiters) {
  3116. return i18n.f(message, values, delimiters);
  3117. },
  3118. t: function t(key, values) {
  3119. return _t(key, values);
  3120. },
  3121. add: function add(locale, message) {
  3122. var override = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
  3123. return i18n.add(locale, message, override);
  3124. },
  3125. watch: function watch(fn) {
  3126. return i18n.watchLocale(fn);
  3127. },
  3128. getLocale: function getLocale() {
  3129. return i18n.getLocale();
  3130. },
  3131. setLocale: function setLocale(newLocale) {
  3132. return i18n.setLocale(newLocale);
  3133. }
  3134. };
  3135. }
  3136. var isString = function isString(val) {
  3137. return typeof val === 'string';
  3138. };
  3139. exports.isString = isString;
  3140. var formater;
  3141. function hasI18nJson(jsonObj, delimiters) {
  3142. if (!formater) {
  3143. formater = new BaseFormatter();
  3144. }
  3145. return walkJsonObj(jsonObj, function (jsonObj, key) {
  3146. var value = jsonObj[key];
  3147. if (isString(value)) {
  3148. if (isI18nStr(value, delimiters)) {
  3149. return true;
  3150. }
  3151. } else {
  3152. return hasI18nJson(value, delimiters);
  3153. }
  3154. });
  3155. }
  3156. function parseI18nJson(jsonObj, values, delimiters) {
  3157. if (!formater) {
  3158. formater = new BaseFormatter();
  3159. }
  3160. walkJsonObj(jsonObj, function (jsonObj, key) {
  3161. var value = jsonObj[key];
  3162. if (isString(value)) {
  3163. if (isI18nStr(value, delimiters)) {
  3164. jsonObj[key] = compileStr(value, values, delimiters);
  3165. }
  3166. } else {
  3167. parseI18nJson(value, values, delimiters);
  3168. }
  3169. });
  3170. return jsonObj;
  3171. }
  3172. function compileI18nJsonStr(jsonStr, _ref5) {
  3173. var locale = _ref5.locale,
  3174. locales = _ref5.locales,
  3175. delimiters = _ref5.delimiters;
  3176. if (!isI18nStr(jsonStr, delimiters)) {
  3177. return jsonStr;
  3178. }
  3179. if (!formater) {
  3180. formater = new BaseFormatter();
  3181. }
  3182. var localeValues = [];
  3183. Object.keys(locales).forEach(function (name) {
  3184. if (name !== locale) {
  3185. localeValues.push({
  3186. locale: name,
  3187. values: locales[name]
  3188. });
  3189. }
  3190. });
  3191. localeValues.unshift({
  3192. locale: locale,
  3193. values: locales[locale]
  3194. });
  3195. try {
  3196. return JSON.stringify(compileJsonObj(JSON.parse(jsonStr), localeValues, delimiters), null, 2);
  3197. } catch (e) {}
  3198. return jsonStr;
  3199. }
  3200. function isI18nStr(value, delimiters) {
  3201. return value.indexOf(delimiters[0]) > -1;
  3202. }
  3203. function compileStr(value, values, delimiters) {
  3204. return formater.interpolate(value, values, delimiters).join('');
  3205. }
  3206. function compileValue(jsonObj, key, localeValues, delimiters) {
  3207. var value = jsonObj[key];
  3208. if (isString(value)) {
  3209. // 存在国际化
  3210. if (isI18nStr(value, delimiters)) {
  3211. jsonObj[key] = compileStr(value, localeValues[0].values, delimiters);
  3212. if (localeValues.length > 1) {
  3213. // 格式化国际化语言
  3214. var valueLocales = jsonObj[key + 'Locales'] = {};
  3215. localeValues.forEach(function (localValue) {
  3216. valueLocales[localValue.locale] = compileStr(value, localValue.values, delimiters);
  3217. });
  3218. }
  3219. }
  3220. } else {
  3221. compileJsonObj(value, localeValues, delimiters);
  3222. }
  3223. }
  3224. function compileJsonObj(jsonObj, localeValues, delimiters) {
  3225. walkJsonObj(jsonObj, function (jsonObj, key) {
  3226. compileValue(jsonObj, key, localeValues, delimiters);
  3227. });
  3228. return jsonObj;
  3229. }
  3230. function walkJsonObj(jsonObj, walk) {
  3231. if (Array.isArray(jsonObj)) {
  3232. for (var i = 0; i < jsonObj.length; i++) {
  3233. if (walk(jsonObj, i)) {
  3234. return true;
  3235. }
  3236. }
  3237. } else if (isObject(jsonObj)) {
  3238. for (var key in jsonObj) {
  3239. if (walk(jsonObj, key)) {
  3240. return true;
  3241. }
  3242. }
  3243. }
  3244. return false;
  3245. }
  3246. function resolveLocale(locales) {
  3247. return function (locale) {
  3248. if (!locale) {
  3249. return locale;
  3250. }
  3251. locale = normalizeLocale(locale) || locale;
  3252. return resolveLocaleChain(locale).find(function (locale) {
  3253. return locales.indexOf(locale) > -1;
  3254. });
  3255. };
  3256. }
  3257. function resolveLocaleChain(locale) {
  3258. var chain = [];
  3259. var tokens = locale.split('-');
  3260. while (tokens.length) {
  3261. chain.push(tokens.join('-'));
  3262. tokens.pop();
  3263. }
  3264. return chain;
  3265. }
  3266. /* 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)))
  3267. /***/ }),
  3268. /* 23 */
  3269. /*!***************************************************************!*\
  3270. !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
  3271. \***************************************************************/
  3272. /*! no static exports found */
  3273. /***/ (function(module, exports) {
  3274. function _classCallCheck(instance, Constructor) {
  3275. if (!(instance instanceof Constructor)) {
  3276. throw new TypeError("Cannot call a class as a function");
  3277. }
  3278. }
  3279. module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3280. /***/ }),
  3281. /* 24 */
  3282. /*!************************************************************!*\
  3283. !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
  3284. \************************************************************/
  3285. /*! no static exports found */
  3286. /***/ (function(module, exports, __webpack_require__) {
  3287. var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ 12);
  3288. function _defineProperties(target, props) {
  3289. for (var i = 0; i < props.length; i++) {
  3290. var descriptor = props[i];
  3291. descriptor.enumerable = descriptor.enumerable || false;
  3292. descriptor.configurable = true;
  3293. if ("value" in descriptor) descriptor.writable = true;
  3294. Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
  3295. }
  3296. }
  3297. function _createClass(Constructor, protoProps, staticProps) {
  3298. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  3299. if (staticProps) _defineProperties(Constructor, staticProps);
  3300. Object.defineProperty(Constructor, "prototype", {
  3301. writable: false
  3302. });
  3303. return Constructor;
  3304. }
  3305. module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
  3306. /***/ }),
  3307. /* 25 */
  3308. /*!******************************************************************************************!*\
  3309. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
  3310. \******************************************************************************************/
  3311. /*! exports provided: default */
  3312. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  3313. "use strict";
  3314. __webpack_require__.r(__webpack_exports__);
  3315. /* WEBPACK VAR INJECTION */(function(global) {/*!
  3316. * Vue.js v2.6.11
  3317. * (c) 2014-2023 Evan You
  3318. * Released under the MIT License.
  3319. */
  3320. /* */
  3321. var emptyObject = Object.freeze({});
  3322. // These helpers produce better VM code in JS engines due to their
  3323. // explicitness and function inlining.
  3324. function isUndef (v) {
  3325. return v === undefined || v === null
  3326. }
  3327. function isDef (v) {
  3328. return v !== undefined && v !== null
  3329. }
  3330. function isTrue (v) {
  3331. return v === true
  3332. }
  3333. function isFalse (v) {
  3334. return v === false
  3335. }
  3336. /**
  3337. * Check if value is primitive.
  3338. */
  3339. function isPrimitive (value) {
  3340. return (
  3341. typeof value === 'string' ||
  3342. typeof value === 'number' ||
  3343. // $flow-disable-line
  3344. typeof value === 'symbol' ||
  3345. typeof value === 'boolean'
  3346. )
  3347. }
  3348. /**
  3349. * Quick object check - this is primarily used to tell
  3350. * Objects from primitive values when we know the value
  3351. * is a JSON-compliant type.
  3352. */
  3353. function isObject (obj) {
  3354. return obj !== null && typeof obj === 'object'
  3355. }
  3356. /**
  3357. * Get the raw type string of a value, e.g., [object Object].
  3358. */
  3359. var _toString = Object.prototype.toString;
  3360. function toRawType (value) {
  3361. return _toString.call(value).slice(8, -1)
  3362. }
  3363. /**
  3364. * Strict object type check. Only returns true
  3365. * for plain JavaScript objects.
  3366. */
  3367. function isPlainObject (obj) {
  3368. return _toString.call(obj) === '[object Object]'
  3369. }
  3370. function isRegExp (v) {
  3371. return _toString.call(v) === '[object RegExp]'
  3372. }
  3373. /**
  3374. * Check if val is a valid array index.
  3375. */
  3376. function isValidArrayIndex (val) {
  3377. var n = parseFloat(String(val));
  3378. return n >= 0 && Math.floor(n) === n && isFinite(val)
  3379. }
  3380. function isPromise (val) {
  3381. return (
  3382. isDef(val) &&
  3383. typeof val.then === 'function' &&
  3384. typeof val.catch === 'function'
  3385. )
  3386. }
  3387. /**
  3388. * Convert a value to a string that is actually rendered.
  3389. */
  3390. function toString (val) {
  3391. return val == null
  3392. ? ''
  3393. : Array.isArray(val) || (isPlainObject(val) && val.toString === _toString)
  3394. ? JSON.stringify(val, null, 2)
  3395. : String(val)
  3396. }
  3397. /**
  3398. * Convert an input value to a number for persistence.
  3399. * If the conversion fails, return original string.
  3400. */
  3401. function toNumber (val) {
  3402. var n = parseFloat(val);
  3403. return isNaN(n) ? val : n
  3404. }
  3405. /**
  3406. * Make a map and return a function for checking if a key
  3407. * is in that map.
  3408. */
  3409. function makeMap (
  3410. str,
  3411. expectsLowerCase
  3412. ) {
  3413. var map = Object.create(null);
  3414. var list = str.split(',');
  3415. for (var i = 0; i < list.length; i++) {
  3416. map[list[i]] = true;
  3417. }
  3418. return expectsLowerCase
  3419. ? function (val) { return map[val.toLowerCase()]; }
  3420. : function (val) { return map[val]; }
  3421. }
  3422. /**
  3423. * Check if a tag is a built-in tag.
  3424. */
  3425. var isBuiltInTag = makeMap('slot,component', true);
  3426. /**
  3427. * Check if an attribute is a reserved attribute.
  3428. */
  3429. var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is');
  3430. /**
  3431. * Remove an item from an array.
  3432. */
  3433. function remove (arr, item) {
  3434. if (arr.length) {
  3435. var index = arr.indexOf(item);
  3436. if (index > -1) {
  3437. return arr.splice(index, 1)
  3438. }
  3439. }
  3440. }
  3441. /**
  3442. * Check whether an object has the property.
  3443. */
  3444. var hasOwnProperty = Object.prototype.hasOwnProperty;
  3445. function hasOwn (obj, key) {
  3446. return hasOwnProperty.call(obj, key)
  3447. }
  3448. /**
  3449. * Create a cached version of a pure function.
  3450. */
  3451. function cached (fn) {
  3452. var cache = Object.create(null);
  3453. return (function cachedFn (str) {
  3454. var hit = cache[str];
  3455. return hit || (cache[str] = fn(str))
  3456. })
  3457. }
  3458. /**
  3459. * Camelize a hyphen-delimited string.
  3460. */
  3461. var camelizeRE = /-(\w)/g;
  3462. var camelize = cached(function (str) {
  3463. return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; })
  3464. });
  3465. /**
  3466. * Capitalize a string.
  3467. */
  3468. var capitalize = cached(function (str) {
  3469. return str.charAt(0).toUpperCase() + str.slice(1)
  3470. });
  3471. /**
  3472. * Hyphenate a camelCase string.
  3473. */
  3474. var hyphenateRE = /\B([A-Z])/g;
  3475. var hyphenate = cached(function (str) {
  3476. return str.replace(hyphenateRE, '-$1').toLowerCase()
  3477. });
  3478. /**
  3479. * Simple bind polyfill for environments that do not support it,
  3480. * e.g., PhantomJS 1.x. Technically, we don't need this anymore
  3481. * since native bind is now performant enough in most browsers.
  3482. * But removing it would mean breaking code that was able to run in
  3483. * PhantomJS 1.x, so this must be kept for backward compatibility.
  3484. */
  3485. /* istanbul ignore next */
  3486. function polyfillBind (fn, ctx) {
  3487. function boundFn (a) {
  3488. var l = arguments.length;
  3489. return l
  3490. ? l > 1
  3491. ? fn.apply(ctx, arguments)
  3492. : fn.call(ctx, a)
  3493. : fn.call(ctx)
  3494. }
  3495. boundFn._length = fn.length;
  3496. return boundFn
  3497. }
  3498. function nativeBind (fn, ctx) {
  3499. return fn.bind(ctx)
  3500. }
  3501. var bind = Function.prototype.bind
  3502. ? nativeBind
  3503. : polyfillBind;
  3504. /**
  3505. * Convert an Array-like object to a real Array.
  3506. */
  3507. function toArray (list, start) {
  3508. start = start || 0;
  3509. var i = list.length - start;
  3510. var ret = new Array(i);
  3511. while (i--) {
  3512. ret[i] = list[i + start];
  3513. }
  3514. return ret
  3515. }
  3516. /**
  3517. * Mix properties into target object.
  3518. */
  3519. function extend (to, _from) {
  3520. for (var key in _from) {
  3521. to[key] = _from[key];
  3522. }
  3523. return to
  3524. }
  3525. /**
  3526. * Merge an Array of Objects into a single Object.
  3527. */
  3528. function toObject (arr) {
  3529. var res = {};
  3530. for (var i = 0; i < arr.length; i++) {
  3531. if (arr[i]) {
  3532. extend(res, arr[i]);
  3533. }
  3534. }
  3535. return res
  3536. }
  3537. /* eslint-disable no-unused-vars */
  3538. /**
  3539. * Perform no operation.
  3540. * Stubbing args to make Flow happy without leaving useless transpiled code
  3541. * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/).
  3542. */
  3543. function noop (a, b, c) {}
  3544. /**
  3545. * Always return false.
  3546. */
  3547. var no = function (a, b, c) { return false; };
  3548. /* eslint-enable no-unused-vars */
  3549. /**
  3550. * Return the same value.
  3551. */
  3552. var identity = function (_) { return _; };
  3553. /**
  3554. * Check if two values are loosely equal - that is,
  3555. * if they are plain objects, do they have the same shape?
  3556. */
  3557. function looseEqual (a, b) {
  3558. if (a === b) { return true }
  3559. var isObjectA = isObject(a);
  3560. var isObjectB = isObject(b);
  3561. if (isObjectA && isObjectB) {
  3562. try {
  3563. var isArrayA = Array.isArray(a);
  3564. var isArrayB = Array.isArray(b);
  3565. if (isArrayA && isArrayB) {
  3566. return a.length === b.length && a.every(function (e, i) {
  3567. return looseEqual(e, b[i])
  3568. })
  3569. } else if (a instanceof Date && b instanceof Date) {
  3570. return a.getTime() === b.getTime()
  3571. } else if (!isArrayA && !isArrayB) {
  3572. var keysA = Object.keys(a);
  3573. var keysB = Object.keys(b);
  3574. return keysA.length === keysB.length && keysA.every(function (key) {
  3575. return looseEqual(a[key], b[key])
  3576. })
  3577. } else {
  3578. /* istanbul ignore next */
  3579. return false
  3580. }
  3581. } catch (e) {
  3582. /* istanbul ignore next */
  3583. return false
  3584. }
  3585. } else if (!isObjectA && !isObjectB) {
  3586. return String(a) === String(b)
  3587. } else {
  3588. return false
  3589. }
  3590. }
  3591. /**
  3592. * Return the first index at which a loosely equal value can be
  3593. * found in the array (if value is a plain object, the array must
  3594. * contain an object of the same shape), or -1 if it is not present.
  3595. */
  3596. function looseIndexOf (arr, val) {
  3597. for (var i = 0; i < arr.length; i++) {
  3598. if (looseEqual(arr[i], val)) { return i }
  3599. }
  3600. return -1
  3601. }
  3602. /**
  3603. * Ensure a function is called only once.
  3604. */
  3605. function once (fn) {
  3606. var called = false;
  3607. return function () {
  3608. if (!called) {
  3609. called = true;
  3610. fn.apply(this, arguments);
  3611. }
  3612. }
  3613. }
  3614. var ASSET_TYPES = [
  3615. 'component',
  3616. 'directive',
  3617. 'filter'
  3618. ];
  3619. var LIFECYCLE_HOOKS = [
  3620. 'beforeCreate',
  3621. 'created',
  3622. 'beforeMount',
  3623. 'mounted',
  3624. 'beforeUpdate',
  3625. 'updated',
  3626. 'beforeDestroy',
  3627. 'destroyed',
  3628. 'activated',
  3629. 'deactivated',
  3630. 'errorCaptured',
  3631. 'serverPrefetch'
  3632. ];
  3633. /* */
  3634. var config = ({
  3635. /**
  3636. * Option merge strategies (used in core/util/options)
  3637. */
  3638. // $flow-disable-line
  3639. optionMergeStrategies: Object.create(null),
  3640. /**
  3641. * Whether to suppress warnings.
  3642. */
  3643. silent: false,
  3644. /**
  3645. * Show production mode tip message on boot?
  3646. */
  3647. productionTip: "development" !== 'production',
  3648. /**
  3649. * Whether to enable devtools
  3650. */
  3651. devtools: "development" !== 'production',
  3652. /**
  3653. * Whether to record perf
  3654. */
  3655. performance: false,
  3656. /**
  3657. * Error handler for watcher errors
  3658. */
  3659. errorHandler: null,
  3660. /**
  3661. * Warn handler for watcher warns
  3662. */
  3663. warnHandler: null,
  3664. /**
  3665. * Ignore certain custom elements
  3666. */
  3667. ignoredElements: [],
  3668. /**
  3669. * Custom user key aliases for v-on
  3670. */
  3671. // $flow-disable-line
  3672. keyCodes: Object.create(null),
  3673. /**
  3674. * Check if a tag is reserved so that it cannot be registered as a
  3675. * component. This is platform-dependent and may be overwritten.
  3676. */
  3677. isReservedTag: no,
  3678. /**
  3679. * Check if an attribute is reserved so that it cannot be used as a component
  3680. * prop. This is platform-dependent and may be overwritten.
  3681. */
  3682. isReservedAttr: no,
  3683. /**
  3684. * Check if a tag is an unknown element.
  3685. * Platform-dependent.
  3686. */
  3687. isUnknownElement: no,
  3688. /**
  3689. * Get the namespace of an element
  3690. */
  3691. getTagNamespace: noop,
  3692. /**
  3693. * Parse the real tag name for the specific platform.
  3694. */
  3695. parsePlatformTagName: identity,
  3696. /**
  3697. * Check if an attribute must be bound using property, e.g. value
  3698. * Platform-dependent.
  3699. */
  3700. mustUseProp: no,
  3701. /**
  3702. * Perform updates asynchronously. Intended to be used by Vue Test Utils
  3703. * This will significantly reduce performance if set to false.
  3704. */
  3705. async: true,
  3706. /**
  3707. * Exposed for legacy reasons
  3708. */
  3709. _lifecycleHooks: LIFECYCLE_HOOKS
  3710. });
  3711. /* */
  3712. /**
  3713. * unicode letters used for parsing html tags, component names and property paths.
  3714. * using https://www.w3.org/TR/html53/semantics-scripting.html#potentialcustomelementname
  3715. * skipping \u10000-\uEFFFF due to it freezing up PhantomJS
  3716. */
  3717. 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/;
  3718. /**
  3719. * Check if a string starts with $ or _
  3720. */
  3721. function isReserved (str) {
  3722. var c = (str + '').charCodeAt(0);
  3723. return c === 0x24 || c === 0x5F
  3724. }
  3725. /**
  3726. * Define a property.
  3727. */
  3728. function def (obj, key, val, enumerable) {
  3729. Object.defineProperty(obj, key, {
  3730. value: val,
  3731. enumerable: !!enumerable,
  3732. writable: true,
  3733. configurable: true
  3734. });
  3735. }
  3736. /**
  3737. * Parse simple path.
  3738. */
  3739. var bailRE = new RegExp(("[^" + (unicodeRegExp.source) + ".$_\\d]"));
  3740. function parsePath (path) {
  3741. if (bailRE.test(path)) {
  3742. return
  3743. }
  3744. var segments = path.split('.');
  3745. return function (obj) {
  3746. for (var i = 0; i < segments.length; i++) {
  3747. if (!obj) { return }
  3748. obj = obj[segments[i]];
  3749. }
  3750. return obj
  3751. }
  3752. }
  3753. /* */
  3754. // can we use __proto__?
  3755. var hasProto = '__proto__' in {};
  3756. // Browser environment sniffing
  3757. var inBrowser = typeof window !== 'undefined';
  3758. var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform;
  3759. var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase();
  3760. var UA = inBrowser && window.navigator.userAgent.toLowerCase();
  3761. var isIE = UA && /msie|trident/.test(UA);
  3762. var isIE9 = UA && UA.indexOf('msie 9.0') > 0;
  3763. var isEdge = UA && UA.indexOf('edge/') > 0;
  3764. var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android');
  3765. var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios');
  3766. var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
  3767. var isPhantomJS = UA && /phantomjs/.test(UA);
  3768. var isFF = UA && UA.match(/firefox\/(\d+)/);
  3769. // Firefox has a "watch" function on Object.prototype...
  3770. var nativeWatch = ({}).watch;
  3771. if (inBrowser) {
  3772. try {
  3773. var opts = {};
  3774. Object.defineProperty(opts, 'passive', ({
  3775. get: function get () {
  3776. }
  3777. })); // https://github.com/facebook/flow/issues/285
  3778. window.addEventListener('test-passive', null, opts);
  3779. } catch (e) {}
  3780. }
  3781. // this needs to be lazy-evaled because vue may be required before
  3782. // vue-server-renderer can set VUE_ENV
  3783. var _isServer;
  3784. var isServerRendering = function () {
  3785. if (_isServer === undefined) {
  3786. /* istanbul ignore if */
  3787. if (!inBrowser && !inWeex && typeof global !== 'undefined') {
  3788. // detect presence of vue-server-renderer and avoid
  3789. // Webpack shimming the process
  3790. _isServer = global['process'] && global['process'].env.VUE_ENV === 'server';
  3791. } else {
  3792. _isServer = false;
  3793. }
  3794. }
  3795. return _isServer
  3796. };
  3797. // detect devtools
  3798. var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  3799. /* istanbul ignore next */
  3800. function isNative (Ctor) {
  3801. return typeof Ctor === 'function' && /native code/.test(Ctor.toString())
  3802. }
  3803. var hasSymbol =
  3804. typeof Symbol !== 'undefined' && isNative(Symbol) &&
  3805. typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys);
  3806. var _Set;
  3807. /* istanbul ignore if */ // $flow-disable-line
  3808. if (typeof Set !== 'undefined' && isNative(Set)) {
  3809. // use native Set when available.
  3810. _Set = Set;
  3811. } else {
  3812. // a non-standard Set polyfill that only works with primitive keys.
  3813. _Set = /*@__PURE__*/(function () {
  3814. function Set () {
  3815. this.set = Object.create(null);
  3816. }
  3817. Set.prototype.has = function has (key) {
  3818. return this.set[key] === true
  3819. };
  3820. Set.prototype.add = function add (key) {
  3821. this.set[key] = true;
  3822. };
  3823. Set.prototype.clear = function clear () {
  3824. this.set = Object.create(null);
  3825. };
  3826. return Set;
  3827. }());
  3828. }
  3829. /* */
  3830. var warn = noop;
  3831. var tip = noop;
  3832. var generateComponentTrace = (noop); // work around flow check
  3833. var formatComponentName = (noop);
  3834. if (true) {
  3835. var hasConsole = typeof console !== 'undefined';
  3836. var classifyRE = /(?:^|[-_])(\w)/g;
  3837. var classify = function (str) { return str
  3838. .replace(classifyRE, function (c) { return c.toUpperCase(); })
  3839. .replace(/[-_]/g, ''); };
  3840. warn = function (msg, vm) {
  3841. var trace = vm ? generateComponentTrace(vm) : '';
  3842. if (config.warnHandler) {
  3843. config.warnHandler.call(null, msg, vm, trace);
  3844. } else if (hasConsole && (!config.silent)) {
  3845. console.error(("[Vue warn]: " + msg + trace));
  3846. }
  3847. };
  3848. tip = function (msg, vm) {
  3849. if (hasConsole && (!config.silent)) {
  3850. console.warn("[Vue tip]: " + msg + (
  3851. vm ? generateComponentTrace(vm) : ''
  3852. ));
  3853. }
  3854. };
  3855. formatComponentName = function (vm, includeFile) {
  3856. if (vm.$root === vm) {
  3857. if (vm.$options && vm.$options.__file) { // fixed by xxxxxx
  3858. return ('') + vm.$options.__file
  3859. }
  3860. return '<Root>'
  3861. }
  3862. var options = typeof vm === 'function' && vm.cid != null
  3863. ? vm.options
  3864. : vm._isVue
  3865. ? vm.$options || vm.constructor.options
  3866. : vm;
  3867. var name = options.name || options._componentTag;
  3868. var file = options.__file;
  3869. if (!name && file) {
  3870. var match = file.match(/([^/\\]+)\.vue$/);
  3871. name = match && match[1];
  3872. }
  3873. return (
  3874. (name ? ("<" + (classify(name)) + ">") : "<Anonymous>") +
  3875. (file && includeFile !== false ? (" at " + file) : '')
  3876. )
  3877. };
  3878. var repeat = function (str, n) {
  3879. var res = '';
  3880. while (n) {
  3881. if (n % 2 === 1) { res += str; }
  3882. if (n > 1) { str += str; }
  3883. n >>= 1;
  3884. }
  3885. return res
  3886. };
  3887. generateComponentTrace = function (vm) {
  3888. if (vm._isVue && vm.$parent) {
  3889. var tree = [];
  3890. var currentRecursiveSequence = 0;
  3891. while (vm && vm.$options.name !== 'PageBody') {
  3892. if (tree.length > 0) {
  3893. var last = tree[tree.length - 1];
  3894. if (last.constructor === vm.constructor) {
  3895. currentRecursiveSequence++;
  3896. vm = vm.$parent;
  3897. continue
  3898. } else if (currentRecursiveSequence > 0) {
  3899. tree[tree.length - 1] = [last, currentRecursiveSequence];
  3900. currentRecursiveSequence = 0;
  3901. }
  3902. }
  3903. !vm.$options.isReserved && tree.push(vm);
  3904. vm = vm.$parent;
  3905. }
  3906. return '\n\nfound in\n\n' + tree
  3907. .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm)
  3908. ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)")
  3909. : formatComponentName(vm))); })
  3910. .join('\n')
  3911. } else {
  3912. return ("\n\n(found in " + (formatComponentName(vm)) + ")")
  3913. }
  3914. };
  3915. }
  3916. /* */
  3917. var uid = 0;
  3918. /**
  3919. * A dep is an observable that can have multiple
  3920. * directives subscribing to it.
  3921. */
  3922. var Dep = function Dep () {
  3923. this.id = uid++;
  3924. this.subs = [];
  3925. };
  3926. Dep.prototype.addSub = function addSub (sub) {
  3927. this.subs.push(sub);
  3928. };
  3929. Dep.prototype.removeSub = function removeSub (sub) {
  3930. remove(this.subs, sub);
  3931. };
  3932. Dep.prototype.depend = function depend () {
  3933. if (Dep.SharedObject.target) {
  3934. Dep.SharedObject.target.addDep(this);
  3935. }
  3936. };
  3937. Dep.prototype.notify = function notify () {
  3938. // stabilize the subscriber list first
  3939. var subs = this.subs.slice();
  3940. if ( true && !config.async) {
  3941. // subs aren't sorted in scheduler if not running async
  3942. // we need to sort them now to make sure they fire in correct
  3943. // order
  3944. subs.sort(function (a, b) { return a.id - b.id; });
  3945. }
  3946. for (var i = 0, l = subs.length; i < l; i++) {
  3947. subs[i].update();
  3948. }
  3949. };
  3950. // The current target watcher being evaluated.
  3951. // This is globally unique because only one watcher
  3952. // can be evaluated at a time.
  3953. // fixed by xxxxxx (nvue shared vuex)
  3954. /* eslint-disable no-undef */
  3955. Dep.SharedObject = {};
  3956. Dep.SharedObject.target = null;
  3957. Dep.SharedObject.targetStack = [];
  3958. function pushTarget (target) {
  3959. Dep.SharedObject.targetStack.push(target);
  3960. Dep.SharedObject.target = target;
  3961. Dep.target = target;
  3962. }
  3963. function popTarget () {
  3964. Dep.SharedObject.targetStack.pop();
  3965. Dep.SharedObject.target = Dep.SharedObject.targetStack[Dep.SharedObject.targetStack.length - 1];
  3966. Dep.target = Dep.SharedObject.target;
  3967. }
  3968. /* */
  3969. var VNode = function VNode (
  3970. tag,
  3971. data,
  3972. children,
  3973. text,
  3974. elm,
  3975. context,
  3976. componentOptions,
  3977. asyncFactory
  3978. ) {
  3979. this.tag = tag;
  3980. this.data = data;
  3981. this.children = children;
  3982. this.text = text;
  3983. this.elm = elm;
  3984. this.ns = undefined;
  3985. this.context = context;
  3986. this.fnContext = undefined;
  3987. this.fnOptions = undefined;
  3988. this.fnScopeId = undefined;
  3989. this.key = data && data.key;
  3990. this.componentOptions = componentOptions;
  3991. this.componentInstance = undefined;
  3992. this.parent = undefined;
  3993. this.raw = false;
  3994. this.isStatic = false;
  3995. this.isRootInsert = true;
  3996. this.isComment = false;
  3997. this.isCloned = false;
  3998. this.isOnce = false;
  3999. this.asyncFactory = asyncFactory;
  4000. this.asyncMeta = undefined;
  4001. this.isAsyncPlaceholder = false;
  4002. };
  4003. var prototypeAccessors = { child: { configurable: true } };
  4004. // DEPRECATED: alias for componentInstance for backwards compat.
  4005. /* istanbul ignore next */
  4006. prototypeAccessors.child.get = function () {
  4007. return this.componentInstance
  4008. };
  4009. Object.defineProperties( VNode.prototype, prototypeAccessors );
  4010. var createEmptyVNode = function (text) {
  4011. if ( text === void 0 ) text = '';
  4012. var node = new VNode();
  4013. node.text = text;
  4014. node.isComment = true;
  4015. return node
  4016. };
  4017. function createTextVNode (val) {
  4018. return new VNode(undefined, undefined, undefined, String(val))
  4019. }
  4020. // optimized shallow clone
  4021. // used for static nodes and slot nodes because they may be reused across
  4022. // multiple renders, cloning them avoids errors when DOM manipulations rely
  4023. // on their elm reference.
  4024. function cloneVNode (vnode) {
  4025. var cloned = new VNode(
  4026. vnode.tag,
  4027. vnode.data,
  4028. // #7975
  4029. // clone children array to avoid mutating original in case of cloning
  4030. // a child.
  4031. vnode.children && vnode.children.slice(),
  4032. vnode.text,
  4033. vnode.elm,
  4034. vnode.context,
  4035. vnode.componentOptions,
  4036. vnode.asyncFactory
  4037. );
  4038. cloned.ns = vnode.ns;
  4039. cloned.isStatic = vnode.isStatic;
  4040. cloned.key = vnode.key;
  4041. cloned.isComment = vnode.isComment;
  4042. cloned.fnContext = vnode.fnContext;
  4043. cloned.fnOptions = vnode.fnOptions;
  4044. cloned.fnScopeId = vnode.fnScopeId;
  4045. cloned.asyncMeta = vnode.asyncMeta;
  4046. cloned.isCloned = true;
  4047. return cloned
  4048. }
  4049. /*
  4050. * not type checking this file because flow doesn't play well with
  4051. * dynamically accessing methods on Array prototype
  4052. */
  4053. var arrayProto = Array.prototype;
  4054. var arrayMethods = Object.create(arrayProto);
  4055. var methodsToPatch = [
  4056. 'push',
  4057. 'pop',
  4058. 'shift',
  4059. 'unshift',
  4060. 'splice',
  4061. 'sort',
  4062. 'reverse'
  4063. ];
  4064. /**
  4065. * Intercept mutating methods and emit events
  4066. */
  4067. methodsToPatch.forEach(function (method) {
  4068. // cache original method
  4069. var original = arrayProto[method];
  4070. def(arrayMethods, method, function mutator () {
  4071. var args = [], len = arguments.length;
  4072. while ( len-- ) args[ len ] = arguments[ len ];
  4073. var result = original.apply(this, args);
  4074. var ob = this.__ob__;
  4075. var inserted;
  4076. switch (method) {
  4077. case 'push':
  4078. case 'unshift':
  4079. inserted = args;
  4080. break
  4081. case 'splice':
  4082. inserted = args.slice(2);
  4083. break
  4084. }
  4085. if (inserted) { ob.observeArray(inserted); }
  4086. // notify change
  4087. ob.dep.notify();
  4088. return result
  4089. });
  4090. });
  4091. /* */
  4092. var arrayKeys = Object.getOwnPropertyNames(arrayMethods);
  4093. /**
  4094. * In some cases we may want to disable observation inside a component's
  4095. * update computation.
  4096. */
  4097. var shouldObserve = true;
  4098. function toggleObserving (value) {
  4099. shouldObserve = value;
  4100. }
  4101. /**
  4102. * Observer class that is attached to each observed
  4103. * object. Once attached, the observer converts the target
  4104. * object's property keys into getter/setters that
  4105. * collect dependencies and dispatch updates.
  4106. */
  4107. var Observer = function Observer (value) {
  4108. this.value = value;
  4109. this.dep = new Dep();
  4110. this.vmCount = 0;
  4111. def(value, '__ob__', this);
  4112. if (Array.isArray(value)) {
  4113. if (hasProto) {
  4114. {// fixed by xxxxxx 微信小程序使用 plugins 之后,数组方法被直接挂载到了数组对象上,需要执行 copyAugment 逻辑
  4115. if(value.push !== value.__proto__.push){
  4116. copyAugment(value, arrayMethods, arrayKeys);
  4117. } else {
  4118. protoAugment(value, arrayMethods);
  4119. }
  4120. }
  4121. } else {
  4122. copyAugment(value, arrayMethods, arrayKeys);
  4123. }
  4124. this.observeArray(value);
  4125. } else {
  4126. this.walk(value);
  4127. }
  4128. };
  4129. /**
  4130. * Walk through all properties and convert them into
  4131. * getter/setters. This method should only be called when
  4132. * value type is Object.
  4133. */
  4134. Observer.prototype.walk = function walk (obj) {
  4135. var keys = Object.keys(obj);
  4136. for (var i = 0; i < keys.length; i++) {
  4137. defineReactive$$1(obj, keys[i]);
  4138. }
  4139. };
  4140. /**
  4141. * Observe a list of Array items.
  4142. */
  4143. Observer.prototype.observeArray = function observeArray (items) {
  4144. for (var i = 0, l = items.length; i < l; i++) {
  4145. observe(items[i]);
  4146. }
  4147. };
  4148. // helpers
  4149. /**
  4150. * Augment a target Object or Array by intercepting
  4151. * the prototype chain using __proto__
  4152. */
  4153. function protoAugment (target, src) {
  4154. /* eslint-disable no-proto */
  4155. target.__proto__ = src;
  4156. /* eslint-enable no-proto */
  4157. }
  4158. /**
  4159. * Augment a target Object or Array by defining
  4160. * hidden properties.
  4161. */
  4162. /* istanbul ignore next */
  4163. function copyAugment (target, src, keys) {
  4164. for (var i = 0, l = keys.length; i < l; i++) {
  4165. var key = keys[i];
  4166. def(target, key, src[key]);
  4167. }
  4168. }
  4169. /**
  4170. * Attempt to create an observer instance for a value,
  4171. * returns the new observer if successfully observed,
  4172. * or the existing observer if the value already has one.
  4173. */
  4174. function observe (value, asRootData) {
  4175. if (!isObject(value) || value instanceof VNode) {
  4176. return
  4177. }
  4178. var ob;
  4179. if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) {
  4180. ob = value.__ob__;
  4181. } else if (
  4182. shouldObserve &&
  4183. !isServerRendering() &&
  4184. (Array.isArray(value) || isPlainObject(value)) &&
  4185. Object.isExtensible(value) &&
  4186. !value._isVue &&
  4187. !value.__v_isMPComponent
  4188. ) {
  4189. ob = new Observer(value);
  4190. }
  4191. if (asRootData && ob) {
  4192. ob.vmCount++;
  4193. }
  4194. return ob
  4195. }
  4196. /**
  4197. * Define a reactive property on an Object.
  4198. */
  4199. function defineReactive$$1 (
  4200. obj,
  4201. key,
  4202. val,
  4203. customSetter,
  4204. shallow
  4205. ) {
  4206. var dep = new Dep();
  4207. var property = Object.getOwnPropertyDescriptor(obj, key);
  4208. if (property && property.configurable === false) {
  4209. return
  4210. }
  4211. // cater for pre-defined getter/setters
  4212. var getter = property && property.get;
  4213. var setter = property && property.set;
  4214. if ((!getter || setter) && arguments.length === 2) {
  4215. val = obj[key];
  4216. }
  4217. var childOb = !shallow && observe(val);
  4218. Object.defineProperty(obj, key, {
  4219. enumerable: true,
  4220. configurable: true,
  4221. get: function reactiveGetter () {
  4222. var value = getter ? getter.call(obj) : val;
  4223. if (Dep.SharedObject.target) { // fixed by xxxxxx
  4224. dep.depend();
  4225. if (childOb) {
  4226. childOb.dep.depend();
  4227. if (Array.isArray(value)) {
  4228. dependArray(value);
  4229. }
  4230. }
  4231. }
  4232. return value
  4233. },
  4234. set: function reactiveSetter (newVal) {
  4235. var value = getter ? getter.call(obj) : val;
  4236. /* eslint-disable no-self-compare */
  4237. if (newVal === value || (newVal !== newVal && value !== value)) {
  4238. return
  4239. }
  4240. /* eslint-enable no-self-compare */
  4241. if ( true && customSetter) {
  4242. customSetter();
  4243. }
  4244. // #7981: for accessor properties without setter
  4245. if (getter && !setter) { return }
  4246. if (setter) {
  4247. setter.call(obj, newVal);
  4248. } else {
  4249. val = newVal;
  4250. }
  4251. childOb = !shallow && observe(newVal);
  4252. dep.notify();
  4253. }
  4254. });
  4255. }
  4256. /**
  4257. * Set a property on an object. Adds the new property and
  4258. * triggers change notification if the property doesn't
  4259. * already exist.
  4260. */
  4261. function set (target, key, val) {
  4262. if ( true &&
  4263. (isUndef(target) || isPrimitive(target))
  4264. ) {
  4265. warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target))));
  4266. }
  4267. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4268. target.length = Math.max(target.length, key);
  4269. target.splice(key, 1, val);
  4270. return val
  4271. }
  4272. if (key in target && !(key in Object.prototype)) {
  4273. target[key] = val;
  4274. return val
  4275. }
  4276. var ob = (target).__ob__;
  4277. if (target._isVue || (ob && ob.vmCount)) {
  4278. true && warn(
  4279. 'Avoid adding reactive properties to a Vue instance or its root $data ' +
  4280. 'at runtime - declare it upfront in the data option.'
  4281. );
  4282. return val
  4283. }
  4284. if (!ob) {
  4285. target[key] = val;
  4286. return val
  4287. }
  4288. defineReactive$$1(ob.value, key, val);
  4289. ob.dep.notify();
  4290. return val
  4291. }
  4292. /**
  4293. * Delete a property and trigger change if necessary.
  4294. */
  4295. function del (target, key) {
  4296. if ( true &&
  4297. (isUndef(target) || isPrimitive(target))
  4298. ) {
  4299. warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target))));
  4300. }
  4301. if (Array.isArray(target) && isValidArrayIndex(key)) {
  4302. target.splice(key, 1);
  4303. return
  4304. }
  4305. var ob = (target).__ob__;
  4306. if (target._isVue || (ob && ob.vmCount)) {
  4307. true && warn(
  4308. 'Avoid deleting properties on a Vue instance or its root $data ' +
  4309. '- just set it to null.'
  4310. );
  4311. return
  4312. }
  4313. if (!hasOwn(target, key)) {
  4314. return
  4315. }
  4316. delete target[key];
  4317. if (!ob) {
  4318. return
  4319. }
  4320. ob.dep.notify();
  4321. }
  4322. /**
  4323. * Collect dependencies on array elements when the array is touched, since
  4324. * we cannot intercept array element access like property getters.
  4325. */
  4326. function dependArray (value) {
  4327. for (var e = (void 0), i = 0, l = value.length; i < l; i++) {
  4328. e = value[i];
  4329. e && e.__ob__ && e.__ob__.dep.depend();
  4330. if (Array.isArray(e)) {
  4331. dependArray(e);
  4332. }
  4333. }
  4334. }
  4335. /* */
  4336. /**
  4337. * Option overwriting strategies are functions that handle
  4338. * how to merge a parent option value and a child option
  4339. * value into the final value.
  4340. */
  4341. var strats = config.optionMergeStrategies;
  4342. /**
  4343. * Options with restrictions
  4344. */
  4345. if (true) {
  4346. strats.el = strats.propsData = function (parent, child, vm, key) {
  4347. if (!vm) {
  4348. warn(
  4349. "option \"" + key + "\" can only be used during instance " +
  4350. 'creation with the `new` keyword.'
  4351. );
  4352. }
  4353. return defaultStrat(parent, child)
  4354. };
  4355. }
  4356. /**
  4357. * Helper that recursively merges two data objects together.
  4358. */
  4359. function mergeData (to, from) {
  4360. if (!from) { return to }
  4361. var key, toVal, fromVal;
  4362. var keys = hasSymbol
  4363. ? Reflect.ownKeys(from)
  4364. : Object.keys(from);
  4365. for (var i = 0; i < keys.length; i++) {
  4366. key = keys[i];
  4367. // in case the object is already observed...
  4368. if (key === '__ob__') { continue }
  4369. toVal = to[key];
  4370. fromVal = from[key];
  4371. if (!hasOwn(to, key)) {
  4372. set(to, key, fromVal);
  4373. } else if (
  4374. toVal !== fromVal &&
  4375. isPlainObject(toVal) &&
  4376. isPlainObject(fromVal)
  4377. ) {
  4378. mergeData(toVal, fromVal);
  4379. }
  4380. }
  4381. return to
  4382. }
  4383. /**
  4384. * Data
  4385. */
  4386. function mergeDataOrFn (
  4387. parentVal,
  4388. childVal,
  4389. vm
  4390. ) {
  4391. if (!vm) {
  4392. // in a Vue.extend merge, both should be functions
  4393. if (!childVal) {
  4394. return parentVal
  4395. }
  4396. if (!parentVal) {
  4397. return childVal
  4398. }
  4399. // when parentVal & childVal are both present,
  4400. // we need to return a function that returns the
  4401. // merged result of both functions... no need to
  4402. // check if parentVal is a function here because
  4403. // it has to be a function to pass previous merges.
  4404. return function mergedDataFn () {
  4405. return mergeData(
  4406. typeof childVal === 'function' ? childVal.call(this, this) : childVal,
  4407. typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal
  4408. )
  4409. }
  4410. } else {
  4411. return function mergedInstanceDataFn () {
  4412. // instance merge
  4413. var instanceData = typeof childVal === 'function'
  4414. ? childVal.call(vm, vm)
  4415. : childVal;
  4416. var defaultData = typeof parentVal === 'function'
  4417. ? parentVal.call(vm, vm)
  4418. : parentVal;
  4419. if (instanceData) {
  4420. return mergeData(instanceData, defaultData)
  4421. } else {
  4422. return defaultData
  4423. }
  4424. }
  4425. }
  4426. }
  4427. strats.data = function (
  4428. parentVal,
  4429. childVal,
  4430. vm
  4431. ) {
  4432. if (!vm) {
  4433. if (childVal && typeof childVal !== 'function') {
  4434. true && warn(
  4435. 'The "data" option should be a function ' +
  4436. 'that returns a per-instance value in component ' +
  4437. 'definitions.',
  4438. vm
  4439. );
  4440. return parentVal
  4441. }
  4442. return mergeDataOrFn(parentVal, childVal)
  4443. }
  4444. return mergeDataOrFn(parentVal, childVal, vm)
  4445. };
  4446. /**
  4447. * Hooks and props are merged as arrays.
  4448. */
  4449. function mergeHook (
  4450. parentVal,
  4451. childVal
  4452. ) {
  4453. var res = childVal
  4454. ? parentVal
  4455. ? parentVal.concat(childVal)
  4456. : Array.isArray(childVal)
  4457. ? childVal
  4458. : [childVal]
  4459. : parentVal;
  4460. return res
  4461. ? dedupeHooks(res)
  4462. : res
  4463. }
  4464. function dedupeHooks (hooks) {
  4465. var res = [];
  4466. for (var i = 0; i < hooks.length; i++) {
  4467. if (res.indexOf(hooks[i]) === -1) {
  4468. res.push(hooks[i]);
  4469. }
  4470. }
  4471. return res
  4472. }
  4473. LIFECYCLE_HOOKS.forEach(function (hook) {
  4474. strats[hook] = mergeHook;
  4475. });
  4476. /**
  4477. * Assets
  4478. *
  4479. * When a vm is present (instance creation), we need to do
  4480. * a three-way merge between constructor options, instance
  4481. * options and parent options.
  4482. */
  4483. function mergeAssets (
  4484. parentVal,
  4485. childVal,
  4486. vm,
  4487. key
  4488. ) {
  4489. var res = Object.create(parentVal || null);
  4490. if (childVal) {
  4491. true && assertObjectType(key, childVal, vm);
  4492. return extend(res, childVal)
  4493. } else {
  4494. return res
  4495. }
  4496. }
  4497. ASSET_TYPES.forEach(function (type) {
  4498. strats[type + 's'] = mergeAssets;
  4499. });
  4500. /**
  4501. * Watchers.
  4502. *
  4503. * Watchers hashes should not overwrite one
  4504. * another, so we merge them as arrays.
  4505. */
  4506. strats.watch = function (
  4507. parentVal,
  4508. childVal,
  4509. vm,
  4510. key
  4511. ) {
  4512. // work around Firefox's Object.prototype.watch...
  4513. if (parentVal === nativeWatch) { parentVal = undefined; }
  4514. if (childVal === nativeWatch) { childVal = undefined; }
  4515. /* istanbul ignore if */
  4516. if (!childVal) { return Object.create(parentVal || null) }
  4517. if (true) {
  4518. assertObjectType(key, childVal, vm);
  4519. }
  4520. if (!parentVal) { return childVal }
  4521. var ret = {};
  4522. extend(ret, parentVal);
  4523. for (var key$1 in childVal) {
  4524. var parent = ret[key$1];
  4525. var child = childVal[key$1];
  4526. if (parent && !Array.isArray(parent)) {
  4527. parent = [parent];
  4528. }
  4529. ret[key$1] = parent
  4530. ? parent.concat(child)
  4531. : Array.isArray(child) ? child : [child];
  4532. }
  4533. return ret
  4534. };
  4535. /**
  4536. * Other object hashes.
  4537. */
  4538. strats.props =
  4539. strats.methods =
  4540. strats.inject =
  4541. strats.computed = function (
  4542. parentVal,
  4543. childVal,
  4544. vm,
  4545. key
  4546. ) {
  4547. if (childVal && "development" !== 'production') {
  4548. assertObjectType(key, childVal, vm);
  4549. }
  4550. if (!parentVal) { return childVal }
  4551. var ret = Object.create(null);
  4552. extend(ret, parentVal);
  4553. if (childVal) { extend(ret, childVal); }
  4554. return ret
  4555. };
  4556. strats.provide = mergeDataOrFn;
  4557. /**
  4558. * Default strategy.
  4559. */
  4560. var defaultStrat = function (parentVal, childVal) {
  4561. return childVal === undefined
  4562. ? parentVal
  4563. : childVal
  4564. };
  4565. /**
  4566. * Validate component names
  4567. */
  4568. function checkComponents (options) {
  4569. for (var key in options.components) {
  4570. validateComponentName(key);
  4571. }
  4572. }
  4573. function validateComponentName (name) {
  4574. if (!new RegExp(("^[a-zA-Z][\\-\\.0-9_" + (unicodeRegExp.source) + "]*$")).test(name)) {
  4575. warn(
  4576. 'Invalid component name: "' + name + '". Component names ' +
  4577. 'should conform to valid custom element name in html5 specification.'
  4578. );
  4579. }
  4580. if (isBuiltInTag(name) || config.isReservedTag(name)) {
  4581. warn(
  4582. 'Do not use built-in or reserved HTML elements as component ' +
  4583. 'id: ' + name
  4584. );
  4585. }
  4586. }
  4587. /**
  4588. * Ensure all props option syntax are normalized into the
  4589. * Object-based format.
  4590. */
  4591. function normalizeProps (options, vm) {
  4592. var props = options.props;
  4593. if (!props) { return }
  4594. var res = {};
  4595. var i, val, name;
  4596. if (Array.isArray(props)) {
  4597. i = props.length;
  4598. while (i--) {
  4599. val = props[i];
  4600. if (typeof val === 'string') {
  4601. name = camelize(val);
  4602. res[name] = { type: null };
  4603. } else if (true) {
  4604. warn('props must be strings when using array syntax.');
  4605. }
  4606. }
  4607. } else if (isPlainObject(props)) {
  4608. for (var key in props) {
  4609. val = props[key];
  4610. name = camelize(key);
  4611. res[name] = isPlainObject(val)
  4612. ? val
  4613. : { type: val };
  4614. }
  4615. } else if (true) {
  4616. warn(
  4617. "Invalid value for option \"props\": expected an Array or an Object, " +
  4618. "but got " + (toRawType(props)) + ".",
  4619. vm
  4620. );
  4621. }
  4622. options.props = res;
  4623. }
  4624. /**
  4625. * Normalize all injections into Object-based format
  4626. */
  4627. function normalizeInject (options, vm) {
  4628. var inject = options.inject;
  4629. if (!inject) { return }
  4630. var normalized = options.inject = {};
  4631. if (Array.isArray(inject)) {
  4632. for (var i = 0; i < inject.length; i++) {
  4633. normalized[inject[i]] = { from: inject[i] };
  4634. }
  4635. } else if (isPlainObject(inject)) {
  4636. for (var key in inject) {
  4637. var val = inject[key];
  4638. normalized[key] = isPlainObject(val)
  4639. ? extend({ from: key }, val)
  4640. : { from: val };
  4641. }
  4642. } else if (true) {
  4643. warn(
  4644. "Invalid value for option \"inject\": expected an Array or an Object, " +
  4645. "but got " + (toRawType(inject)) + ".",
  4646. vm
  4647. );
  4648. }
  4649. }
  4650. /**
  4651. * Normalize raw function directives into object format.
  4652. */
  4653. function normalizeDirectives (options) {
  4654. var dirs = options.directives;
  4655. if (dirs) {
  4656. for (var key in dirs) {
  4657. var def$$1 = dirs[key];
  4658. if (typeof def$$1 === 'function') {
  4659. dirs[key] = { bind: def$$1, update: def$$1 };
  4660. }
  4661. }
  4662. }
  4663. }
  4664. function assertObjectType (name, value, vm) {
  4665. if (!isPlainObject(value)) {
  4666. warn(
  4667. "Invalid value for option \"" + name + "\": expected an Object, " +
  4668. "but got " + (toRawType(value)) + ".",
  4669. vm
  4670. );
  4671. }
  4672. }
  4673. /**
  4674. * Merge two option objects into a new one.
  4675. * Core utility used in both instantiation and inheritance.
  4676. */
  4677. function mergeOptions (
  4678. parent,
  4679. child,
  4680. vm
  4681. ) {
  4682. if (true) {
  4683. checkComponents(child);
  4684. }
  4685. if (typeof child === 'function') {
  4686. child = child.options;
  4687. }
  4688. normalizeProps(child, vm);
  4689. normalizeInject(child, vm);
  4690. normalizeDirectives(child);
  4691. // Apply extends and mixins on the child options,
  4692. // but only if it is a raw options object that isn't
  4693. // the result of another mergeOptions call.
  4694. // Only merged options has the _base property.
  4695. if (!child._base) {
  4696. if (child.extends) {
  4697. parent = mergeOptions(parent, child.extends, vm);
  4698. }
  4699. if (child.mixins) {
  4700. for (var i = 0, l = child.mixins.length; i < l; i++) {
  4701. parent = mergeOptions(parent, child.mixins[i], vm);
  4702. }
  4703. }
  4704. }
  4705. var options = {};
  4706. var key;
  4707. for (key in parent) {
  4708. mergeField(key);
  4709. }
  4710. for (key in child) {
  4711. if (!hasOwn(parent, key)) {
  4712. mergeField(key);
  4713. }
  4714. }
  4715. function mergeField (key) {
  4716. var strat = strats[key] || defaultStrat;
  4717. options[key] = strat(parent[key], child[key], vm, key);
  4718. }
  4719. return options
  4720. }
  4721. /**
  4722. * Resolve an asset.
  4723. * This function is used because child instances need access
  4724. * to assets defined in its ancestor chain.
  4725. */
  4726. function resolveAsset (
  4727. options,
  4728. type,
  4729. id,
  4730. warnMissing
  4731. ) {
  4732. /* istanbul ignore if */
  4733. if (typeof id !== 'string') {
  4734. return
  4735. }
  4736. var assets = options[type];
  4737. // check local registration variations first
  4738. if (hasOwn(assets, id)) { return assets[id] }
  4739. var camelizedId = camelize(id);
  4740. if (hasOwn(assets, camelizedId)) { return assets[camelizedId] }
  4741. var PascalCaseId = capitalize(camelizedId);
  4742. if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] }
  4743. // fallback to prototype chain
  4744. var res = assets[id] || assets[camelizedId] || assets[PascalCaseId];
  4745. if ( true && warnMissing && !res) {
  4746. warn(
  4747. 'Failed to resolve ' + type.slice(0, -1) + ': ' + id,
  4748. options
  4749. );
  4750. }
  4751. return res
  4752. }
  4753. /* */
  4754. function validateProp (
  4755. key,
  4756. propOptions,
  4757. propsData,
  4758. vm
  4759. ) {
  4760. var prop = propOptions[key];
  4761. var absent = !hasOwn(propsData, key);
  4762. var value = propsData[key];
  4763. // boolean casting
  4764. var booleanIndex = getTypeIndex(Boolean, prop.type);
  4765. if (booleanIndex > -1) {
  4766. if (absent && !hasOwn(prop, 'default')) {
  4767. value = false;
  4768. } else if (value === '' || value === hyphenate(key)) {
  4769. // only cast empty string / same name to boolean if
  4770. // boolean has higher priority
  4771. var stringIndex = getTypeIndex(String, prop.type);
  4772. if (stringIndex < 0 || booleanIndex < stringIndex) {
  4773. value = true;
  4774. }
  4775. }
  4776. }
  4777. // check default value
  4778. if (value === undefined) {
  4779. value = getPropDefaultValue(vm, prop, key);
  4780. // since the default value is a fresh copy,
  4781. // make sure to observe it.
  4782. var prevShouldObserve = shouldObserve;
  4783. toggleObserving(true);
  4784. observe(value);
  4785. toggleObserving(prevShouldObserve);
  4786. }
  4787. if (
  4788. true
  4789. ) {
  4790. assertProp(prop, key, value, vm, absent);
  4791. }
  4792. return value
  4793. }
  4794. /**
  4795. * Get the default value of a prop.
  4796. */
  4797. function getPropDefaultValue (vm, prop, key) {
  4798. // no default, return undefined
  4799. if (!hasOwn(prop, 'default')) {
  4800. return undefined
  4801. }
  4802. var def = prop.default;
  4803. // warn against non-factory defaults for Object & Array
  4804. if ( true && isObject(def)) {
  4805. warn(
  4806. 'Invalid default value for prop "' + key + '": ' +
  4807. 'Props with type Object/Array must use a factory function ' +
  4808. 'to return the default value.',
  4809. vm
  4810. );
  4811. }
  4812. // the raw prop value was also undefined from previous render,
  4813. // return previous default value to avoid unnecessary watcher trigger
  4814. if (vm && vm.$options.propsData &&
  4815. vm.$options.propsData[key] === undefined &&
  4816. vm._props[key] !== undefined
  4817. ) {
  4818. return vm._props[key]
  4819. }
  4820. // call factory function for non-Function types
  4821. // a value is Function if its prototype is function even across different execution context
  4822. return typeof def === 'function' && getType(prop.type) !== 'Function'
  4823. ? def.call(vm)
  4824. : def
  4825. }
  4826. /**
  4827. * Assert whether a prop is valid.
  4828. */
  4829. function assertProp (
  4830. prop,
  4831. name,
  4832. value,
  4833. vm,
  4834. absent
  4835. ) {
  4836. if (prop.required && absent) {
  4837. warn(
  4838. 'Missing required prop: "' + name + '"',
  4839. vm
  4840. );
  4841. return
  4842. }
  4843. if (value == null && !prop.required) {
  4844. return
  4845. }
  4846. var type = prop.type;
  4847. var valid = !type || type === true;
  4848. var expectedTypes = [];
  4849. if (type) {
  4850. if (!Array.isArray(type)) {
  4851. type = [type];
  4852. }
  4853. for (var i = 0; i < type.length && !valid; i++) {
  4854. var assertedType = assertType(value, type[i]);
  4855. expectedTypes.push(assertedType.expectedType || '');
  4856. valid = assertedType.valid;
  4857. }
  4858. }
  4859. if (!valid) {
  4860. warn(
  4861. getInvalidTypeMessage(name, value, expectedTypes),
  4862. vm
  4863. );
  4864. return
  4865. }
  4866. var validator = prop.validator;
  4867. if (validator) {
  4868. if (!validator(value)) {
  4869. warn(
  4870. 'Invalid prop: custom validator check failed for prop "' + name + '".',
  4871. vm
  4872. );
  4873. }
  4874. }
  4875. }
  4876. var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/;
  4877. function assertType (value, type) {
  4878. var valid;
  4879. var expectedType = getType(type);
  4880. if (simpleCheckRE.test(expectedType)) {
  4881. var t = typeof value;
  4882. valid = t === expectedType.toLowerCase();
  4883. // for primitive wrapper objects
  4884. if (!valid && t === 'object') {
  4885. valid = value instanceof type;
  4886. }
  4887. } else if (expectedType === 'Object') {
  4888. valid = isPlainObject(value);
  4889. } else if (expectedType === 'Array') {
  4890. valid = Array.isArray(value);
  4891. } else {
  4892. valid = value instanceof type;
  4893. }
  4894. return {
  4895. valid: valid,
  4896. expectedType: expectedType
  4897. }
  4898. }
  4899. /**
  4900. * Use function string name to check built-in types,
  4901. * because a simple equality check will fail when running
  4902. * across different vms / iframes.
  4903. */
  4904. function getType (fn) {
  4905. var match = fn && fn.toString().match(/^\s*function (\w+)/);
  4906. return match ? match[1] : ''
  4907. }
  4908. function isSameType (a, b) {
  4909. return getType(a) === getType(b)
  4910. }
  4911. function getTypeIndex (type, expectedTypes) {
  4912. if (!Array.isArray(expectedTypes)) {
  4913. return isSameType(expectedTypes, type) ? 0 : -1
  4914. }
  4915. for (var i = 0, len = expectedTypes.length; i < len; i++) {
  4916. if (isSameType(expectedTypes[i], type)) {
  4917. return i
  4918. }
  4919. }
  4920. return -1
  4921. }
  4922. function getInvalidTypeMessage (name, value, expectedTypes) {
  4923. var message = "Invalid prop: type check failed for prop \"" + name + "\"." +
  4924. " Expected " + (expectedTypes.map(capitalize).join(', '));
  4925. var expectedType = expectedTypes[0];
  4926. var receivedType = toRawType(value);
  4927. var expectedValue = styleValue(value, expectedType);
  4928. var receivedValue = styleValue(value, receivedType);
  4929. // check if we need to specify expected value
  4930. if (expectedTypes.length === 1 &&
  4931. isExplicable(expectedType) &&
  4932. !isBoolean(expectedType, receivedType)) {
  4933. message += " with value " + expectedValue;
  4934. }
  4935. message += ", got " + receivedType + " ";
  4936. // check if we need to specify received value
  4937. if (isExplicable(receivedType)) {
  4938. message += "with value " + receivedValue + ".";
  4939. }
  4940. return message
  4941. }
  4942. function styleValue (value, type) {
  4943. if (type === 'String') {
  4944. return ("\"" + value + "\"")
  4945. } else if (type === 'Number') {
  4946. return ("" + (Number(value)))
  4947. } else {
  4948. return ("" + value)
  4949. }
  4950. }
  4951. function isExplicable (value) {
  4952. var explicitTypes = ['string', 'number', 'boolean'];
  4953. return explicitTypes.some(function (elem) { return value.toLowerCase() === elem; })
  4954. }
  4955. function isBoolean () {
  4956. var args = [], len = arguments.length;
  4957. while ( len-- ) args[ len ] = arguments[ len ];
  4958. return args.some(function (elem) { return elem.toLowerCase() === 'boolean'; })
  4959. }
  4960. /* */
  4961. function handleError (err, vm, info) {
  4962. // Deactivate deps tracking while processing error handler to avoid possible infinite rendering.
  4963. // See: https://github.com/vuejs/vuex/issues/1505
  4964. pushTarget();
  4965. try {
  4966. if (vm) {
  4967. var cur = vm;
  4968. while ((cur = cur.$parent)) {
  4969. var hooks = cur.$options.errorCaptured;
  4970. if (hooks) {
  4971. for (var i = 0; i < hooks.length; i++) {
  4972. try {
  4973. var capture = hooks[i].call(cur, err, vm, info) === false;
  4974. if (capture) { return }
  4975. } catch (e) {
  4976. globalHandleError(e, cur, 'errorCaptured hook');
  4977. }
  4978. }
  4979. }
  4980. }
  4981. }
  4982. globalHandleError(err, vm, info);
  4983. } finally {
  4984. popTarget();
  4985. }
  4986. }
  4987. function invokeWithErrorHandling (
  4988. handler,
  4989. context,
  4990. args,
  4991. vm,
  4992. info
  4993. ) {
  4994. var res;
  4995. try {
  4996. res = args ? handler.apply(context, args) : handler.call(context);
  4997. if (res && !res._isVue && isPromise(res) && !res._handled) {
  4998. res.catch(function (e) { return handleError(e, vm, info + " (Promise/async)"); });
  4999. // issue #9511
  5000. // avoid catch triggering multiple times when nested calls
  5001. res._handled = true;
  5002. }
  5003. } catch (e) {
  5004. handleError(e, vm, info);
  5005. }
  5006. return res
  5007. }
  5008. function globalHandleError (err, vm, info) {
  5009. if (config.errorHandler) {
  5010. try {
  5011. return config.errorHandler.call(null, err, vm, info)
  5012. } catch (e) {
  5013. // if the user intentionally throws the original error in the handler,
  5014. // do not log it twice
  5015. if (e !== err) {
  5016. logError(e, null, 'config.errorHandler');
  5017. }
  5018. }
  5019. }
  5020. logError(err, vm, info);
  5021. }
  5022. function logError (err, vm, info) {
  5023. if (true) {
  5024. warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  5025. }
  5026. /* istanbul ignore else */
  5027. if ((inBrowser || inWeex) && typeof console !== 'undefined') {
  5028. console.error(err);
  5029. } else {
  5030. throw err
  5031. }
  5032. }
  5033. /* */
  5034. var callbacks = [];
  5035. var pending = false;
  5036. function flushCallbacks () {
  5037. pending = false;
  5038. var copies = callbacks.slice(0);
  5039. callbacks.length = 0;
  5040. for (var i = 0; i < copies.length; i++) {
  5041. copies[i]();
  5042. }
  5043. }
  5044. // Here we have async deferring wrappers using microtasks.
  5045. // In 2.5 we used (macro) tasks (in combination with microtasks).
  5046. // However, it has subtle problems when state is changed right before repaint
  5047. // (e.g. #6813, out-in transitions).
  5048. // Also, using (macro) tasks in event handler would cause some weird behaviors
  5049. // that cannot be circumvented (e.g. #7109, #7153, #7546, #7834, #8109).
  5050. // So we now use microtasks everywhere, again.
  5051. // A major drawback of this tradeoff is that there are some scenarios
  5052. // where microtasks have too high a priority and fire in between supposedly
  5053. // sequential events (e.g. #4521, #6690, which have workarounds)
  5054. // or even between bubbling of the same event (#6566).
  5055. var timerFunc;
  5056. // The nextTick behavior leverages the microtask queue, which can be accessed
  5057. // via either native Promise.then or MutationObserver.
  5058. // MutationObserver has wider support, however it is seriously bugged in
  5059. // UIWebView in iOS >= 9.3.3 when triggered in touch event handlers. It
  5060. // completely stops working after triggering a few times... so, if native
  5061. // Promise is available, we will use it:
  5062. /* istanbul ignore next, $flow-disable-line */
  5063. if (typeof Promise !== 'undefined' && isNative(Promise)) {
  5064. var p = Promise.resolve();
  5065. timerFunc = function () {
  5066. p.then(flushCallbacks);
  5067. // In problematic UIWebViews, Promise.then doesn't completely break, but
  5068. // it can get stuck in a weird state where callbacks are pushed into the
  5069. // microtask queue but the queue isn't being flushed, until the browser
  5070. // needs to do some other work, e.g. handle a timer. Therefore we can
  5071. // "force" the microtask queue to be flushed by adding an empty timer.
  5072. if (isIOS) { setTimeout(noop); }
  5073. };
  5074. } else if (!isIE && typeof MutationObserver !== 'undefined' && (
  5075. isNative(MutationObserver) ||
  5076. // PhantomJS and iOS 7.x
  5077. MutationObserver.toString() === '[object MutationObserverConstructor]'
  5078. )) {
  5079. // Use MutationObserver where native Promise is not available,
  5080. // e.g. PhantomJS, iOS7, Android 4.4
  5081. // (#6466 MutationObserver is unreliable in IE11)
  5082. var counter = 1;
  5083. var observer = new MutationObserver(flushCallbacks);
  5084. var textNode = document.createTextNode(String(counter));
  5085. observer.observe(textNode, {
  5086. characterData: true
  5087. });
  5088. timerFunc = function () {
  5089. counter = (counter + 1) % 2;
  5090. textNode.data = String(counter);
  5091. };
  5092. } else if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) {
  5093. // Fallback to setImmediate.
  5094. // Technically it leverages the (macro) task queue,
  5095. // but it is still a better choice than setTimeout.
  5096. timerFunc = function () {
  5097. setImmediate(flushCallbacks);
  5098. };
  5099. } else {
  5100. // Fallback to setTimeout.
  5101. timerFunc = function () {
  5102. setTimeout(flushCallbacks, 0);
  5103. };
  5104. }
  5105. function nextTick (cb, ctx) {
  5106. var _resolve;
  5107. callbacks.push(function () {
  5108. if (cb) {
  5109. try {
  5110. cb.call(ctx);
  5111. } catch (e) {
  5112. handleError(e, ctx, 'nextTick');
  5113. }
  5114. } else if (_resolve) {
  5115. _resolve(ctx);
  5116. }
  5117. });
  5118. if (!pending) {
  5119. pending = true;
  5120. timerFunc();
  5121. }
  5122. // $flow-disable-line
  5123. if (!cb && typeof Promise !== 'undefined') {
  5124. return new Promise(function (resolve) {
  5125. _resolve = resolve;
  5126. })
  5127. }
  5128. }
  5129. /* */
  5130. /* not type checking this file because flow doesn't play well with Proxy */
  5131. var initProxy;
  5132. if (true) {
  5133. var allowedGlobals = makeMap(
  5134. 'Infinity,undefined,NaN,isFinite,isNaN,' +
  5135. 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' +
  5136. 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' +
  5137. 'require' // for Webpack/Browserify
  5138. );
  5139. var warnNonPresent = function (target, key) {
  5140. warn(
  5141. "Property or method \"" + key + "\" is not defined on the instance but " +
  5142. 'referenced during render. Make sure that this property is reactive, ' +
  5143. 'either in the data option, or for class-based components, by ' +
  5144. 'initializing the property. ' +
  5145. 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',
  5146. target
  5147. );
  5148. };
  5149. var warnReservedPrefix = function (target, key) {
  5150. warn(
  5151. "Property \"" + key + "\" must be accessed with \"$data." + key + "\" because " +
  5152. 'properties starting with "$" or "_" are not proxied in the Vue instance to ' +
  5153. 'prevent conflicts with Vue internals. ' +
  5154. 'See: https://vuejs.org/v2/api/#data',
  5155. target
  5156. );
  5157. };
  5158. var hasProxy =
  5159. typeof Proxy !== 'undefined' && isNative(Proxy);
  5160. if (hasProxy) {
  5161. var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact');
  5162. config.keyCodes = new Proxy(config.keyCodes, {
  5163. set: function set (target, key, value) {
  5164. if (isBuiltInModifier(key)) {
  5165. warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key));
  5166. return false
  5167. } else {
  5168. target[key] = value;
  5169. return true
  5170. }
  5171. }
  5172. });
  5173. }
  5174. var hasHandler = {
  5175. has: function has (target, key) {
  5176. var has = key in target;
  5177. var isAllowed = allowedGlobals(key) ||
  5178. (typeof key === 'string' && key.charAt(0) === '_' && !(key in target.$data));
  5179. if (!has && !isAllowed) {
  5180. if (key in target.$data) { warnReservedPrefix(target, key); }
  5181. else { warnNonPresent(target, key); }
  5182. }
  5183. return has || !isAllowed
  5184. }
  5185. };
  5186. var getHandler = {
  5187. get: function get (target, key) {
  5188. if (typeof key === 'string' && !(key in target)) {
  5189. if (key in target.$data) { warnReservedPrefix(target, key); }
  5190. else { warnNonPresent(target, key); }
  5191. }
  5192. return target[key]
  5193. }
  5194. };
  5195. initProxy = function initProxy (vm) {
  5196. if (hasProxy) {
  5197. // determine which proxy handler to use
  5198. var options = vm.$options;
  5199. var handlers = options.render && options.render._withStripped
  5200. ? getHandler
  5201. : hasHandler;
  5202. vm._renderProxy = new Proxy(vm, handlers);
  5203. } else {
  5204. vm._renderProxy = vm;
  5205. }
  5206. };
  5207. }
  5208. /* */
  5209. var seenObjects = new _Set();
  5210. /**
  5211. * Recursively traverse an object to evoke all converted
  5212. * getters, so that every nested property inside the object
  5213. * is collected as a "deep" dependency.
  5214. */
  5215. function traverse (val) {
  5216. _traverse(val, seenObjects);
  5217. seenObjects.clear();
  5218. }
  5219. function _traverse (val, seen) {
  5220. var i, keys;
  5221. var isA = Array.isArray(val);
  5222. if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) {
  5223. return
  5224. }
  5225. if (val.__ob__) {
  5226. var depId = val.__ob__.dep.id;
  5227. if (seen.has(depId)) {
  5228. return
  5229. }
  5230. seen.add(depId);
  5231. }
  5232. if (isA) {
  5233. i = val.length;
  5234. while (i--) { _traverse(val[i], seen); }
  5235. } else {
  5236. keys = Object.keys(val);
  5237. i = keys.length;
  5238. while (i--) { _traverse(val[keys[i]], seen); }
  5239. }
  5240. }
  5241. var mark;
  5242. var measure;
  5243. if (true) {
  5244. var perf = inBrowser && window.performance;
  5245. /* istanbul ignore if */
  5246. if (
  5247. perf &&
  5248. perf.mark &&
  5249. perf.measure &&
  5250. perf.clearMarks &&
  5251. perf.clearMeasures
  5252. ) {
  5253. mark = function (tag) { return perf.mark(tag); };
  5254. measure = function (name, startTag, endTag) {
  5255. perf.measure(name, startTag, endTag);
  5256. perf.clearMarks(startTag);
  5257. perf.clearMarks(endTag);
  5258. // perf.clearMeasures(name)
  5259. };
  5260. }
  5261. }
  5262. /* */
  5263. var normalizeEvent = cached(function (name) {
  5264. var passive = name.charAt(0) === '&';
  5265. name = passive ? name.slice(1) : name;
  5266. var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first
  5267. name = once$$1 ? name.slice(1) : name;
  5268. var capture = name.charAt(0) === '!';
  5269. name = capture ? name.slice(1) : name;
  5270. return {
  5271. name: name,
  5272. once: once$$1,
  5273. capture: capture,
  5274. passive: passive
  5275. }
  5276. });
  5277. function createFnInvoker (fns, vm) {
  5278. function invoker () {
  5279. var arguments$1 = arguments;
  5280. var fns = invoker.fns;
  5281. if (Array.isArray(fns)) {
  5282. var cloned = fns.slice();
  5283. for (var i = 0; i < cloned.length; i++) {
  5284. invokeWithErrorHandling(cloned[i], null, arguments$1, vm, "v-on handler");
  5285. }
  5286. } else {
  5287. // return handler return value for single handlers
  5288. return invokeWithErrorHandling(fns, null, arguments, vm, "v-on handler")
  5289. }
  5290. }
  5291. invoker.fns = fns;
  5292. return invoker
  5293. }
  5294. function updateListeners (
  5295. on,
  5296. oldOn,
  5297. add,
  5298. remove$$1,
  5299. createOnceHandler,
  5300. vm
  5301. ) {
  5302. var name, def$$1, cur, old, event;
  5303. for (name in on) {
  5304. def$$1 = cur = on[name];
  5305. old = oldOn[name];
  5306. event = normalizeEvent(name);
  5307. if (isUndef(cur)) {
  5308. true && warn(
  5309. "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
  5310. vm
  5311. );
  5312. } else if (isUndef(old)) {
  5313. if (isUndef(cur.fns)) {
  5314. cur = on[name] = createFnInvoker(cur, vm);
  5315. }
  5316. if (isTrue(event.once)) {
  5317. cur = on[name] = createOnceHandler(event.name, cur, event.capture);
  5318. }
  5319. add(event.name, cur, event.capture, event.passive, event.params);
  5320. } else if (cur !== old) {
  5321. old.fns = cur;
  5322. on[name] = old;
  5323. }
  5324. }
  5325. for (name in oldOn) {
  5326. if (isUndef(on[name])) {
  5327. event = normalizeEvent(name);
  5328. remove$$1(event.name, oldOn[name], event.capture);
  5329. }
  5330. }
  5331. }
  5332. /* */
  5333. /* */
  5334. // fixed by xxxxxx (mp properties)
  5335. function extractPropertiesFromVNodeData(data, Ctor, res, context) {
  5336. var propOptions = Ctor.options.mpOptions && Ctor.options.mpOptions.properties;
  5337. if (isUndef(propOptions)) {
  5338. return res
  5339. }
  5340. var externalClasses = Ctor.options.mpOptions.externalClasses || [];
  5341. var attrs = data.attrs;
  5342. var props = data.props;
  5343. if (isDef(attrs) || isDef(props)) {
  5344. for (var key in propOptions) {
  5345. var altKey = hyphenate(key);
  5346. var result = checkProp(res, props, key, altKey, true) ||
  5347. checkProp(res, attrs, key, altKey, false);
  5348. // externalClass
  5349. if (
  5350. result &&
  5351. res[key] &&
  5352. externalClasses.indexOf(altKey) !== -1 &&
  5353. context[camelize(res[key])]
  5354. ) {
  5355. // 赋值 externalClass 真正的值(模板里 externalClass 的值可能是字符串)
  5356. res[key] = context[camelize(res[key])];
  5357. }
  5358. }
  5359. }
  5360. return res
  5361. }
  5362. function extractPropsFromVNodeData (
  5363. data,
  5364. Ctor,
  5365. tag,
  5366. context// fixed by xxxxxx
  5367. ) {
  5368. // we are only extracting raw values here.
  5369. // validation and default values are handled in the child
  5370. // component itself.
  5371. var propOptions = Ctor.options.props;
  5372. if (isUndef(propOptions)) {
  5373. // fixed by xxxxxx
  5374. return extractPropertiesFromVNodeData(data, Ctor, {}, context)
  5375. }
  5376. var res = {};
  5377. var attrs = data.attrs;
  5378. var props = data.props;
  5379. if (isDef(attrs) || isDef(props)) {
  5380. for (var key in propOptions) {
  5381. var altKey = hyphenate(key);
  5382. if (true) {
  5383. var keyInLowerCase = key.toLowerCase();
  5384. if (
  5385. key !== keyInLowerCase &&
  5386. attrs && hasOwn(attrs, keyInLowerCase)
  5387. ) {
  5388. tip(
  5389. "Prop \"" + keyInLowerCase + "\" is passed to component " +
  5390. (formatComponentName(tag || Ctor)) + ", but the declared prop name is" +
  5391. " \"" + key + "\". " +
  5392. "Note that HTML attributes are case-insensitive and camelCased " +
  5393. "props need to use their kebab-case equivalents when using in-DOM " +
  5394. "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"."
  5395. );
  5396. }
  5397. }
  5398. checkProp(res, props, key, altKey, true) ||
  5399. checkProp(res, attrs, key, altKey, false);
  5400. }
  5401. }
  5402. // fixed by xxxxxx
  5403. return extractPropertiesFromVNodeData(data, Ctor, res, context)
  5404. }
  5405. function checkProp (
  5406. res,
  5407. hash,
  5408. key,
  5409. altKey,
  5410. preserve
  5411. ) {
  5412. if (isDef(hash)) {
  5413. if (hasOwn(hash, key)) {
  5414. res[key] = hash[key];
  5415. if (!preserve) {
  5416. delete hash[key];
  5417. }
  5418. return true
  5419. } else if (hasOwn(hash, altKey)) {
  5420. res[key] = hash[altKey];
  5421. if (!preserve) {
  5422. delete hash[altKey];
  5423. }
  5424. return true
  5425. }
  5426. }
  5427. return false
  5428. }
  5429. /* */
  5430. // The template compiler attempts to minimize the need for normalization by
  5431. // statically analyzing the template at compile time.
  5432. //
  5433. // For plain HTML markup, normalization can be completely skipped because the
  5434. // generated render function is guaranteed to return Array<VNode>. There are
  5435. // two cases where extra normalization is needed:
  5436. // 1. When the children contains components - because a functional component
  5437. // may return an Array instead of a single root. In this case, just a simple
  5438. // normalization is needed - if any child is an Array, we flatten the whole
  5439. // thing with Array.prototype.concat. It is guaranteed to be only 1-level deep
  5440. // because functional components already normalize their own children.
  5441. function simpleNormalizeChildren (children) {
  5442. for (var i = 0; i < children.length; i++) {
  5443. if (Array.isArray(children[i])) {
  5444. return Array.prototype.concat.apply([], children)
  5445. }
  5446. }
  5447. return children
  5448. }
  5449. // 2. When the children contains constructs that always generated nested Arrays,
  5450. // e.g. <template>, <slot>, v-for, or when the children is provided by user
  5451. // with hand-written render functions / JSX. In such cases a full normalization
  5452. // is needed to cater to all possible types of children values.
  5453. function normalizeChildren (children) {
  5454. return isPrimitive(children)
  5455. ? [createTextVNode(children)]
  5456. : Array.isArray(children)
  5457. ? normalizeArrayChildren(children)
  5458. : undefined
  5459. }
  5460. function isTextNode (node) {
  5461. return isDef(node) && isDef(node.text) && isFalse(node.isComment)
  5462. }
  5463. function normalizeArrayChildren (children, nestedIndex) {
  5464. var res = [];
  5465. var i, c, lastIndex, last;
  5466. for (i = 0; i < children.length; i++) {
  5467. c = children[i];
  5468. if (isUndef(c) || typeof c === 'boolean') { continue }
  5469. lastIndex = res.length - 1;
  5470. last = res[lastIndex];
  5471. // nested
  5472. if (Array.isArray(c)) {
  5473. if (c.length > 0) {
  5474. c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i));
  5475. // merge adjacent text nodes
  5476. if (isTextNode(c[0]) && isTextNode(last)) {
  5477. res[lastIndex] = createTextVNode(last.text + (c[0]).text);
  5478. c.shift();
  5479. }
  5480. res.push.apply(res, c);
  5481. }
  5482. } else if (isPrimitive(c)) {
  5483. if (isTextNode(last)) {
  5484. // merge adjacent text nodes
  5485. // this is necessary for SSR hydration because text nodes are
  5486. // essentially merged when rendered to HTML strings
  5487. res[lastIndex] = createTextVNode(last.text + c);
  5488. } else if (c !== '') {
  5489. // convert primitive to vnode
  5490. res.push(createTextVNode(c));
  5491. }
  5492. } else {
  5493. if (isTextNode(c) && isTextNode(last)) {
  5494. // merge adjacent text nodes
  5495. res[lastIndex] = createTextVNode(last.text + c.text);
  5496. } else {
  5497. // default key for nested array children (likely generated by v-for)
  5498. if (isTrue(children._isVList) &&
  5499. isDef(c.tag) &&
  5500. isUndef(c.key) &&
  5501. isDef(nestedIndex)) {
  5502. c.key = "__vlist" + nestedIndex + "_" + i + "__";
  5503. }
  5504. res.push(c);
  5505. }
  5506. }
  5507. }
  5508. return res
  5509. }
  5510. /* */
  5511. function initProvide (vm) {
  5512. var provide = vm.$options.provide;
  5513. if (provide) {
  5514. vm._provided = typeof provide === 'function'
  5515. ? provide.call(vm)
  5516. : provide;
  5517. }
  5518. }
  5519. function initInjections (vm) {
  5520. var result = resolveInject(vm.$options.inject, vm);
  5521. if (result) {
  5522. toggleObserving(false);
  5523. Object.keys(result).forEach(function (key) {
  5524. /* istanbul ignore else */
  5525. if (true) {
  5526. defineReactive$$1(vm, key, result[key], function () {
  5527. warn(
  5528. "Avoid mutating an injected value directly since the changes will be " +
  5529. "overwritten whenever the provided component re-renders. " +
  5530. "injection being mutated: \"" + key + "\"",
  5531. vm
  5532. );
  5533. });
  5534. } else {}
  5535. });
  5536. toggleObserving(true);
  5537. }
  5538. }
  5539. function resolveInject (inject, vm) {
  5540. if (inject) {
  5541. // inject is :any because flow is not smart enough to figure out cached
  5542. var result = Object.create(null);
  5543. var keys = hasSymbol
  5544. ? Reflect.ownKeys(inject)
  5545. : Object.keys(inject);
  5546. for (var i = 0; i < keys.length; i++) {
  5547. var key = keys[i];
  5548. // #6574 in case the inject object is observed...
  5549. if (key === '__ob__') { continue }
  5550. var provideKey = inject[key].from;
  5551. var source = vm;
  5552. while (source) {
  5553. if (source._provided && hasOwn(source._provided, provideKey)) {
  5554. result[key] = source._provided[provideKey];
  5555. break
  5556. }
  5557. source = source.$parent;
  5558. }
  5559. if (!source) {
  5560. if ('default' in inject[key]) {
  5561. var provideDefault = inject[key].default;
  5562. result[key] = typeof provideDefault === 'function'
  5563. ? provideDefault.call(vm)
  5564. : provideDefault;
  5565. } else if (true) {
  5566. warn(("Injection \"" + key + "\" not found"), vm);
  5567. }
  5568. }
  5569. }
  5570. return result
  5571. }
  5572. }
  5573. /* */
  5574. /**
  5575. * Runtime helper for resolving raw children VNodes into a slot object.
  5576. */
  5577. function resolveSlots (
  5578. children,
  5579. context
  5580. ) {
  5581. if (!children || !children.length) {
  5582. return {}
  5583. }
  5584. var slots = {};
  5585. for (var i = 0, l = children.length; i < l; i++) {
  5586. var child = children[i];
  5587. var data = child.data;
  5588. // remove slot attribute if the node is resolved as a Vue slot node
  5589. if (data && data.attrs && data.attrs.slot) {
  5590. delete data.attrs.slot;
  5591. }
  5592. // named slots should only be respected if the vnode was rendered in the
  5593. // same context.
  5594. if ((child.context === context || child.fnContext === context) &&
  5595. data && data.slot != null
  5596. ) {
  5597. var name = data.slot;
  5598. var slot = (slots[name] || (slots[name] = []));
  5599. if (child.tag === 'template') {
  5600. slot.push.apply(slot, child.children || []);
  5601. } else {
  5602. slot.push(child);
  5603. }
  5604. } else {
  5605. // fixed by xxxxxx 临时 hack 掉 uni-app 中的异步 name slot page
  5606. if(child.asyncMeta && child.asyncMeta.data && child.asyncMeta.data.slot === 'page'){
  5607. (slots['page'] || (slots['page'] = [])).push(child);
  5608. }else{
  5609. (slots.default || (slots.default = [])).push(child);
  5610. }
  5611. }
  5612. }
  5613. // ignore slots that contains only whitespace
  5614. for (var name$1 in slots) {
  5615. if (slots[name$1].every(isWhitespace)) {
  5616. delete slots[name$1];
  5617. }
  5618. }
  5619. return slots
  5620. }
  5621. function isWhitespace (node) {
  5622. return (node.isComment && !node.asyncFactory) || node.text === ' '
  5623. }
  5624. /* */
  5625. function normalizeScopedSlots (
  5626. slots,
  5627. normalSlots,
  5628. prevSlots
  5629. ) {
  5630. var res;
  5631. var hasNormalSlots = Object.keys(normalSlots).length > 0;
  5632. var isStable = slots ? !!slots.$stable : !hasNormalSlots;
  5633. var key = slots && slots.$key;
  5634. if (!slots) {
  5635. res = {};
  5636. } else if (slots._normalized) {
  5637. // fast path 1: child component re-render only, parent did not change
  5638. return slots._normalized
  5639. } else if (
  5640. isStable &&
  5641. prevSlots &&
  5642. prevSlots !== emptyObject &&
  5643. key === prevSlots.$key &&
  5644. !hasNormalSlots &&
  5645. !prevSlots.$hasNormal
  5646. ) {
  5647. // fast path 2: stable scoped slots w/ no normal slots to proxy,
  5648. // only need to normalize once
  5649. return prevSlots
  5650. } else {
  5651. res = {};
  5652. for (var key$1 in slots) {
  5653. if (slots[key$1] && key$1[0] !== '$') {
  5654. res[key$1] = normalizeScopedSlot(normalSlots, key$1, slots[key$1]);
  5655. }
  5656. }
  5657. }
  5658. // expose normal slots on scopedSlots
  5659. for (var key$2 in normalSlots) {
  5660. if (!(key$2 in res)) {
  5661. res[key$2] = proxyNormalSlot(normalSlots, key$2);
  5662. }
  5663. }
  5664. // avoriaz seems to mock a non-extensible $scopedSlots object
  5665. // and when that is passed down this would cause an error
  5666. if (slots && Object.isExtensible(slots)) {
  5667. (slots)._normalized = res;
  5668. }
  5669. def(res, '$stable', isStable);
  5670. def(res, '$key', key);
  5671. def(res, '$hasNormal', hasNormalSlots);
  5672. return res
  5673. }
  5674. function normalizeScopedSlot(normalSlots, key, fn) {
  5675. var normalized = function () {
  5676. var res = arguments.length ? fn.apply(null, arguments) : fn({});
  5677. res = res && typeof res === 'object' && !Array.isArray(res)
  5678. ? [res] // single vnode
  5679. : normalizeChildren(res);
  5680. return res && (
  5681. res.length === 0 ||
  5682. (res.length === 1 && res[0].isComment) // #9658
  5683. ) ? undefined
  5684. : res
  5685. };
  5686. // this is a slot using the new v-slot syntax without scope. although it is
  5687. // compiled as a scoped slot, render fn users would expect it to be present
  5688. // on this.$slots because the usage is semantically a normal slot.
  5689. if (fn.proxy) {
  5690. Object.defineProperty(normalSlots, key, {
  5691. get: normalized,
  5692. enumerable: true,
  5693. configurable: true
  5694. });
  5695. }
  5696. return normalized
  5697. }
  5698. function proxyNormalSlot(slots, key) {
  5699. return function () { return slots[key]; }
  5700. }
  5701. /* */
  5702. /**
  5703. * Runtime helper for rendering v-for lists.
  5704. */
  5705. function renderList (
  5706. val,
  5707. render
  5708. ) {
  5709. var ret, i, l, keys, key;
  5710. if (Array.isArray(val) || typeof val === 'string') {
  5711. ret = new Array(val.length);
  5712. for (i = 0, l = val.length; i < l; i++) {
  5713. ret[i] = render(val[i], i, i, i); // fixed by xxxxxx
  5714. }
  5715. } else if (typeof val === 'number') {
  5716. ret = new Array(val);
  5717. for (i = 0; i < val; i++) {
  5718. ret[i] = render(i + 1, i, i, i); // fixed by xxxxxx
  5719. }
  5720. } else if (isObject(val)) {
  5721. if (hasSymbol && val[Symbol.iterator]) {
  5722. ret = [];
  5723. var iterator = val[Symbol.iterator]();
  5724. var result = iterator.next();
  5725. while (!result.done) {
  5726. ret.push(render(result.value, ret.length, i, i++)); // fixed by xxxxxx
  5727. result = iterator.next();
  5728. }
  5729. } else {
  5730. keys = Object.keys(val);
  5731. ret = new Array(keys.length);
  5732. for (i = 0, l = keys.length; i < l; i++) {
  5733. key = keys[i];
  5734. ret[i] = render(val[key], key, i, i); // fixed by xxxxxx
  5735. }
  5736. }
  5737. }
  5738. if (!isDef(ret)) {
  5739. ret = [];
  5740. }
  5741. (ret)._isVList = true;
  5742. return ret
  5743. }
  5744. /* */
  5745. /**
  5746. * Runtime helper for rendering <slot>
  5747. */
  5748. function renderSlot (
  5749. name,
  5750. fallback,
  5751. props,
  5752. bindObject
  5753. ) {
  5754. var scopedSlotFn = this.$scopedSlots[name];
  5755. var nodes;
  5756. if (scopedSlotFn) { // scoped slot
  5757. props = props || {};
  5758. if (bindObject) {
  5759. if ( true && !isObject(bindObject)) {
  5760. warn(
  5761. 'slot v-bind without argument expects an Object',
  5762. this
  5763. );
  5764. }
  5765. props = extend(extend({}, bindObject), props);
  5766. }
  5767. // fixed by xxxxxx app-plus scopedSlot
  5768. nodes = scopedSlotFn(props, this, props._i) || fallback;
  5769. } else {
  5770. nodes = this.$slots[name] || fallback;
  5771. }
  5772. var target = props && props.slot;
  5773. if (target) {
  5774. return this.$createElement('template', { slot: target }, nodes)
  5775. } else {
  5776. return nodes
  5777. }
  5778. }
  5779. /* */
  5780. /**
  5781. * Runtime helper for resolving filters
  5782. */
  5783. function resolveFilter (id) {
  5784. return resolveAsset(this.$options, 'filters', id, true) || identity
  5785. }
  5786. /* */
  5787. function isKeyNotMatch (expect, actual) {
  5788. if (Array.isArray(expect)) {
  5789. return expect.indexOf(actual) === -1
  5790. } else {
  5791. return expect !== actual
  5792. }
  5793. }
  5794. /**
  5795. * Runtime helper for checking keyCodes from config.
  5796. * exposed as Vue.prototype._k
  5797. * passing in eventKeyName as last argument separately for backwards compat
  5798. */
  5799. function checkKeyCodes (
  5800. eventKeyCode,
  5801. key,
  5802. builtInKeyCode,
  5803. eventKeyName,
  5804. builtInKeyName
  5805. ) {
  5806. var mappedKeyCode = config.keyCodes[key] || builtInKeyCode;
  5807. if (builtInKeyName && eventKeyName && !config.keyCodes[key]) {
  5808. return isKeyNotMatch(builtInKeyName, eventKeyName)
  5809. } else if (mappedKeyCode) {
  5810. return isKeyNotMatch(mappedKeyCode, eventKeyCode)
  5811. } else if (eventKeyName) {
  5812. return hyphenate(eventKeyName) !== key
  5813. }
  5814. }
  5815. /* */
  5816. /**
  5817. * Runtime helper for merging v-bind="object" into a VNode's data.
  5818. */
  5819. function bindObjectProps (
  5820. data,
  5821. tag,
  5822. value,
  5823. asProp,
  5824. isSync
  5825. ) {
  5826. if (value) {
  5827. if (!isObject(value)) {
  5828. true && warn(
  5829. 'v-bind without argument expects an Object or Array value',
  5830. this
  5831. );
  5832. } else {
  5833. if (Array.isArray(value)) {
  5834. value = toObject(value);
  5835. }
  5836. var hash;
  5837. var loop = function ( key ) {
  5838. if (
  5839. key === 'class' ||
  5840. key === 'style' ||
  5841. isReservedAttribute(key)
  5842. ) {
  5843. hash = data;
  5844. } else {
  5845. var type = data.attrs && data.attrs.type;
  5846. hash = asProp || config.mustUseProp(tag, type, key)
  5847. ? data.domProps || (data.domProps = {})
  5848. : data.attrs || (data.attrs = {});
  5849. }
  5850. var camelizedKey = camelize(key);
  5851. var hyphenatedKey = hyphenate(key);
  5852. if (!(camelizedKey in hash) && !(hyphenatedKey in hash)) {
  5853. hash[key] = value[key];
  5854. if (isSync) {
  5855. var on = data.on || (data.on = {});
  5856. on[("update:" + key)] = function ($event) {
  5857. value[key] = $event;
  5858. };
  5859. }
  5860. }
  5861. };
  5862. for (var key in value) loop( key );
  5863. }
  5864. }
  5865. return data
  5866. }
  5867. /* */
  5868. /**
  5869. * Runtime helper for rendering static trees.
  5870. */
  5871. function renderStatic (
  5872. index,
  5873. isInFor
  5874. ) {
  5875. var cached = this._staticTrees || (this._staticTrees = []);
  5876. var tree = cached[index];
  5877. // if has already-rendered static tree and not inside v-for,
  5878. // we can reuse the same tree.
  5879. if (tree && !isInFor) {
  5880. return tree
  5881. }
  5882. // otherwise, render a fresh tree.
  5883. tree = cached[index] = this.$options.staticRenderFns[index].call(
  5884. this._renderProxy,
  5885. null,
  5886. this // for render fns generated for functional component templates
  5887. );
  5888. markStatic(tree, ("__static__" + index), false);
  5889. return tree
  5890. }
  5891. /**
  5892. * Runtime helper for v-once.
  5893. * Effectively it means marking the node as static with a unique key.
  5894. */
  5895. function markOnce (
  5896. tree,
  5897. index,
  5898. key
  5899. ) {
  5900. markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true);
  5901. return tree
  5902. }
  5903. function markStatic (
  5904. tree,
  5905. key,
  5906. isOnce
  5907. ) {
  5908. if (Array.isArray(tree)) {
  5909. for (var i = 0; i < tree.length; i++) {
  5910. if (tree[i] && typeof tree[i] !== 'string') {
  5911. markStaticNode(tree[i], (key + "_" + i), isOnce);
  5912. }
  5913. }
  5914. } else {
  5915. markStaticNode(tree, key, isOnce);
  5916. }
  5917. }
  5918. function markStaticNode (node, key, isOnce) {
  5919. node.isStatic = true;
  5920. node.key = key;
  5921. node.isOnce = isOnce;
  5922. }
  5923. /* */
  5924. function bindObjectListeners (data, value) {
  5925. if (value) {
  5926. if (!isPlainObject(value)) {
  5927. true && warn(
  5928. 'v-on without argument expects an Object value',
  5929. this
  5930. );
  5931. } else {
  5932. var on = data.on = data.on ? extend({}, data.on) : {};
  5933. for (var key in value) {
  5934. var existing = on[key];
  5935. var ours = value[key];
  5936. on[key] = existing ? [].concat(existing, ours) : ours;
  5937. }
  5938. }
  5939. }
  5940. return data
  5941. }
  5942. /* */
  5943. function resolveScopedSlots (
  5944. fns, // see flow/vnode
  5945. res,
  5946. // the following are added in 2.6
  5947. hasDynamicKeys,
  5948. contentHashKey
  5949. ) {
  5950. res = res || { $stable: !hasDynamicKeys };
  5951. for (var i = 0; i < fns.length; i++) {
  5952. var slot = fns[i];
  5953. if (Array.isArray(slot)) {
  5954. resolveScopedSlots(slot, res, hasDynamicKeys);
  5955. } else if (slot) {
  5956. // marker for reverse proxying v-slot without scope on this.$slots
  5957. if (slot.proxy) {
  5958. slot.fn.proxy = true;
  5959. }
  5960. res[slot.key] = slot.fn;
  5961. }
  5962. }
  5963. if (contentHashKey) {
  5964. (res).$key = contentHashKey;
  5965. }
  5966. return res
  5967. }
  5968. /* */
  5969. function bindDynamicKeys (baseObj, values) {
  5970. for (var i = 0; i < values.length; i += 2) {
  5971. var key = values[i];
  5972. if (typeof key === 'string' && key) {
  5973. baseObj[values[i]] = values[i + 1];
  5974. } else if ( true && key !== '' && key !== null) {
  5975. // null is a special value for explicitly removing a binding
  5976. warn(
  5977. ("Invalid value for dynamic directive argument (expected string or null): " + key),
  5978. this
  5979. );
  5980. }
  5981. }
  5982. return baseObj
  5983. }
  5984. // helper to dynamically append modifier runtime markers to event names.
  5985. // ensure only append when value is already string, otherwise it will be cast
  5986. // to string and cause the type check to miss.
  5987. function prependModifier (value, symbol) {
  5988. return typeof value === 'string' ? symbol + value : value
  5989. }
  5990. /* */
  5991. function installRenderHelpers (target) {
  5992. target._o = markOnce;
  5993. target._n = toNumber;
  5994. target._s = toString;
  5995. target._l = renderList;
  5996. target._t = renderSlot;
  5997. target._q = looseEqual;
  5998. target._i = looseIndexOf;
  5999. target._m = renderStatic;
  6000. target._f = resolveFilter;
  6001. target._k = checkKeyCodes;
  6002. target._b = bindObjectProps;
  6003. target._v = createTextVNode;
  6004. target._e = createEmptyVNode;
  6005. target._u = resolveScopedSlots;
  6006. target._g = bindObjectListeners;
  6007. target._d = bindDynamicKeys;
  6008. target._p = prependModifier;
  6009. }
  6010. /* */
  6011. function FunctionalRenderContext (
  6012. data,
  6013. props,
  6014. children,
  6015. parent,
  6016. Ctor
  6017. ) {
  6018. var this$1 = this;
  6019. var options = Ctor.options;
  6020. // ensure the createElement function in functional components
  6021. // gets a unique context - this is necessary for correct named slot check
  6022. var contextVm;
  6023. if (hasOwn(parent, '_uid')) {
  6024. contextVm = Object.create(parent);
  6025. // $flow-disable-line
  6026. contextVm._original = parent;
  6027. } else {
  6028. // the context vm passed in is a functional context as well.
  6029. // in this case we want to make sure we are able to get a hold to the
  6030. // real context instance.
  6031. contextVm = parent;
  6032. // $flow-disable-line
  6033. parent = parent._original;
  6034. }
  6035. var isCompiled = isTrue(options._compiled);
  6036. var needNormalization = !isCompiled;
  6037. this.data = data;
  6038. this.props = props;
  6039. this.children = children;
  6040. this.parent = parent;
  6041. this.listeners = data.on || emptyObject;
  6042. this.injections = resolveInject(options.inject, parent);
  6043. this.slots = function () {
  6044. if (!this$1.$slots) {
  6045. normalizeScopedSlots(
  6046. data.scopedSlots,
  6047. this$1.$slots = resolveSlots(children, parent)
  6048. );
  6049. }
  6050. return this$1.$slots
  6051. };
  6052. Object.defineProperty(this, 'scopedSlots', ({
  6053. enumerable: true,
  6054. get: function get () {
  6055. return normalizeScopedSlots(data.scopedSlots, this.slots())
  6056. }
  6057. }));
  6058. // support for compiled functional template
  6059. if (isCompiled) {
  6060. // exposing $options for renderStatic()
  6061. this.$options = options;
  6062. // pre-resolve slots for renderSlot()
  6063. this.$slots = this.slots();
  6064. this.$scopedSlots = normalizeScopedSlots(data.scopedSlots, this.$slots);
  6065. }
  6066. if (options._scopeId) {
  6067. this._c = function (a, b, c, d) {
  6068. var vnode = createElement(contextVm, a, b, c, d, needNormalization);
  6069. if (vnode && !Array.isArray(vnode)) {
  6070. vnode.fnScopeId = options._scopeId;
  6071. vnode.fnContext = parent;
  6072. }
  6073. return vnode
  6074. };
  6075. } else {
  6076. this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); };
  6077. }
  6078. }
  6079. installRenderHelpers(FunctionalRenderContext.prototype);
  6080. function createFunctionalComponent (
  6081. Ctor,
  6082. propsData,
  6083. data,
  6084. contextVm,
  6085. children
  6086. ) {
  6087. var options = Ctor.options;
  6088. var props = {};
  6089. var propOptions = options.props;
  6090. if (isDef(propOptions)) {
  6091. for (var key in propOptions) {
  6092. props[key] = validateProp(key, propOptions, propsData || emptyObject);
  6093. }
  6094. } else {
  6095. if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
  6096. if (isDef(data.props)) { mergeProps(props, data.props); }
  6097. }
  6098. var renderContext = new FunctionalRenderContext(
  6099. data,
  6100. props,
  6101. children,
  6102. contextVm,
  6103. Ctor
  6104. );
  6105. var vnode = options.render.call(null, renderContext._c, renderContext);
  6106. if (vnode instanceof VNode) {
  6107. return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options, renderContext)
  6108. } else if (Array.isArray(vnode)) {
  6109. var vnodes = normalizeChildren(vnode) || [];
  6110. var res = new Array(vnodes.length);
  6111. for (var i = 0; i < vnodes.length; i++) {
  6112. res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options, renderContext);
  6113. }
  6114. return res
  6115. }
  6116. }
  6117. function cloneAndMarkFunctionalResult (vnode, data, contextVm, options, renderContext) {
  6118. // #7817 clone node before setting fnContext, otherwise if the node is reused
  6119. // (e.g. it was from a cached normal slot) the fnContext causes named slots
  6120. // that should not be matched to match.
  6121. var clone = cloneVNode(vnode);
  6122. clone.fnContext = contextVm;
  6123. clone.fnOptions = options;
  6124. if (true) {
  6125. (clone.devtoolsMeta = clone.devtoolsMeta || {}).renderContext = renderContext;
  6126. }
  6127. if (data.slot) {
  6128. (clone.data || (clone.data = {})).slot = data.slot;
  6129. }
  6130. return clone
  6131. }
  6132. function mergeProps (to, from) {
  6133. for (var key in from) {
  6134. to[camelize(key)] = from[key];
  6135. }
  6136. }
  6137. /* */
  6138. /* */
  6139. /* */
  6140. /* */
  6141. // inline hooks to be invoked on component VNodes during patch
  6142. var componentVNodeHooks = {
  6143. init: function init (vnode, hydrating) {
  6144. if (
  6145. vnode.componentInstance &&
  6146. !vnode.componentInstance._isDestroyed &&
  6147. vnode.data.keepAlive
  6148. ) {
  6149. // kept-alive components, treat as a patch
  6150. var mountedNode = vnode; // work around flow
  6151. componentVNodeHooks.prepatch(mountedNode, mountedNode);
  6152. } else {
  6153. var child = vnode.componentInstance = createComponentInstanceForVnode(
  6154. vnode,
  6155. activeInstance
  6156. );
  6157. child.$mount(hydrating ? vnode.elm : undefined, hydrating);
  6158. }
  6159. },
  6160. prepatch: function prepatch (oldVnode, vnode) {
  6161. var options = vnode.componentOptions;
  6162. var child = vnode.componentInstance = oldVnode.componentInstance;
  6163. updateChildComponent(
  6164. child,
  6165. options.propsData, // updated props
  6166. options.listeners, // updated listeners
  6167. vnode, // new parent vnode
  6168. options.children // new children
  6169. );
  6170. },
  6171. insert: function insert (vnode) {
  6172. var context = vnode.context;
  6173. var componentInstance = vnode.componentInstance;
  6174. if (!componentInstance._isMounted) {
  6175. callHook(componentInstance, 'onServiceCreated');
  6176. callHook(componentInstance, 'onServiceAttached');
  6177. componentInstance._isMounted = true;
  6178. callHook(componentInstance, 'mounted');
  6179. }
  6180. if (vnode.data.keepAlive) {
  6181. if (context._isMounted) {
  6182. // vue-router#1212
  6183. // During updates, a kept-alive component's child components may
  6184. // change, so directly walking the tree here may call activated hooks
  6185. // on incorrect children. Instead we push them into a queue which will
  6186. // be processed after the whole patch process ended.
  6187. queueActivatedComponent(componentInstance);
  6188. } else {
  6189. activateChildComponent(componentInstance, true /* direct */);
  6190. }
  6191. }
  6192. },
  6193. destroy: function destroy (vnode) {
  6194. var componentInstance = vnode.componentInstance;
  6195. if (!componentInstance._isDestroyed) {
  6196. if (!vnode.data.keepAlive) {
  6197. componentInstance.$destroy();
  6198. } else {
  6199. deactivateChildComponent(componentInstance, true /* direct */);
  6200. }
  6201. }
  6202. }
  6203. };
  6204. var hooksToMerge = Object.keys(componentVNodeHooks);
  6205. function createComponent (
  6206. Ctor,
  6207. data,
  6208. context,
  6209. children,
  6210. tag
  6211. ) {
  6212. if (isUndef(Ctor)) {
  6213. return
  6214. }
  6215. var baseCtor = context.$options._base;
  6216. // plain options object: turn it into a constructor
  6217. if (isObject(Ctor)) {
  6218. Ctor = baseCtor.extend(Ctor);
  6219. }
  6220. // if at this stage it's not a constructor or an async component factory,
  6221. // reject.
  6222. if (typeof Ctor !== 'function') {
  6223. if (true) {
  6224. warn(("Invalid Component definition: " + (String(Ctor))), context);
  6225. }
  6226. return
  6227. }
  6228. // async component
  6229. var asyncFactory;
  6230. if (isUndef(Ctor.cid)) {
  6231. asyncFactory = Ctor;
  6232. Ctor = resolveAsyncComponent(asyncFactory, baseCtor);
  6233. if (Ctor === undefined) {
  6234. // return a placeholder node for async component, which is rendered
  6235. // as a comment node but preserves all the raw information for the node.
  6236. // the information will be used for async server-rendering and hydration.
  6237. return createAsyncPlaceholder(
  6238. asyncFactory,
  6239. data,
  6240. context,
  6241. children,
  6242. tag
  6243. )
  6244. }
  6245. }
  6246. data = data || {};
  6247. // resolve constructor options in case global mixins are applied after
  6248. // component constructor creation
  6249. resolveConstructorOptions(Ctor);
  6250. // transform component v-model data into props & events
  6251. if (isDef(data.model)) {
  6252. transformModel(Ctor.options, data);
  6253. }
  6254. // extract props
  6255. var propsData = extractPropsFromVNodeData(data, Ctor, tag, context); // fixed by xxxxxx
  6256. // functional component
  6257. if (isTrue(Ctor.options.functional)) {
  6258. return createFunctionalComponent(Ctor, propsData, data, context, children)
  6259. }
  6260. // extract listeners, since these needs to be treated as
  6261. // child component listeners instead of DOM listeners
  6262. var listeners = data.on;
  6263. // replace with listeners with .native modifier
  6264. // so it gets processed during parent component patch.
  6265. data.on = data.nativeOn;
  6266. if (isTrue(Ctor.options.abstract)) {
  6267. // abstract components do not keep anything
  6268. // other than props & listeners & slot
  6269. // work around flow
  6270. var slot = data.slot;
  6271. data = {};
  6272. if (slot) {
  6273. data.slot = slot;
  6274. }
  6275. }
  6276. // install component management hooks onto the placeholder node
  6277. installComponentHooks(data);
  6278. // return a placeholder vnode
  6279. var name = Ctor.options.name || tag;
  6280. var vnode = new VNode(
  6281. ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
  6282. data, undefined, undefined, undefined, context,
  6283. { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
  6284. asyncFactory
  6285. );
  6286. return vnode
  6287. }
  6288. function createComponentInstanceForVnode (
  6289. vnode, // we know it's MountedComponentVNode but flow doesn't
  6290. parent // activeInstance in lifecycle state
  6291. ) {
  6292. var options = {
  6293. _isComponent: true,
  6294. _parentVnode: vnode,
  6295. parent: parent
  6296. };
  6297. // check inline-template render functions
  6298. var inlineTemplate = vnode.data.inlineTemplate;
  6299. if (isDef(inlineTemplate)) {
  6300. options.render = inlineTemplate.render;
  6301. options.staticRenderFns = inlineTemplate.staticRenderFns;
  6302. }
  6303. return new vnode.componentOptions.Ctor(options)
  6304. }
  6305. function installComponentHooks (data) {
  6306. var hooks = data.hook || (data.hook = {});
  6307. for (var i = 0; i < hooksToMerge.length; i++) {
  6308. var key = hooksToMerge[i];
  6309. var existing = hooks[key];
  6310. var toMerge = componentVNodeHooks[key];
  6311. if (existing !== toMerge && !(existing && existing._merged)) {
  6312. hooks[key] = existing ? mergeHook$1(toMerge, existing) : toMerge;
  6313. }
  6314. }
  6315. }
  6316. function mergeHook$1 (f1, f2) {
  6317. var merged = function (a, b) {
  6318. // flow complains about extra args which is why we use any
  6319. f1(a, b);
  6320. f2(a, b);
  6321. };
  6322. merged._merged = true;
  6323. return merged
  6324. }
  6325. // transform component v-model info (value and callback) into
  6326. // prop and event handler respectively.
  6327. function transformModel (options, data) {
  6328. var prop = (options.model && options.model.prop) || 'value';
  6329. var event = (options.model && options.model.event) || 'input'
  6330. ;(data.attrs || (data.attrs = {}))[prop] = data.model.value;
  6331. var on = data.on || (data.on = {});
  6332. var existing = on[event];
  6333. var callback = data.model.callback;
  6334. if (isDef(existing)) {
  6335. if (
  6336. Array.isArray(existing)
  6337. ? existing.indexOf(callback) === -1
  6338. : existing !== callback
  6339. ) {
  6340. on[event] = [callback].concat(existing);
  6341. }
  6342. } else {
  6343. on[event] = callback;
  6344. }
  6345. }
  6346. /* */
  6347. var SIMPLE_NORMALIZE = 1;
  6348. var ALWAYS_NORMALIZE = 2;
  6349. // wrapper function for providing a more flexible interface
  6350. // without getting yelled at by flow
  6351. function createElement (
  6352. context,
  6353. tag,
  6354. data,
  6355. children,
  6356. normalizationType,
  6357. alwaysNormalize
  6358. ) {
  6359. if (Array.isArray(data) || isPrimitive(data)) {
  6360. normalizationType = children;
  6361. children = data;
  6362. data = undefined;
  6363. }
  6364. if (isTrue(alwaysNormalize)) {
  6365. normalizationType = ALWAYS_NORMALIZE;
  6366. }
  6367. return _createElement(context, tag, data, children, normalizationType)
  6368. }
  6369. function _createElement (
  6370. context,
  6371. tag,
  6372. data,
  6373. children,
  6374. normalizationType
  6375. ) {
  6376. if (isDef(data) && isDef((data).__ob__)) {
  6377. true && warn(
  6378. "Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" +
  6379. 'Always create fresh vnode data objects in each render!',
  6380. context
  6381. );
  6382. return createEmptyVNode()
  6383. }
  6384. // object syntax in v-bind
  6385. if (isDef(data) && isDef(data.is)) {
  6386. tag = data.is;
  6387. }
  6388. if (!tag) {
  6389. // in case of component :is set to falsy value
  6390. return createEmptyVNode()
  6391. }
  6392. // warn against non-primitive key
  6393. if ( true &&
  6394. isDef(data) && isDef(data.key) && !isPrimitive(data.key)
  6395. ) {
  6396. {
  6397. warn(
  6398. 'Avoid using non-primitive value as key, ' +
  6399. 'use string/number value instead.',
  6400. context
  6401. );
  6402. }
  6403. }
  6404. // support single function children as default scoped slot
  6405. if (Array.isArray(children) &&
  6406. typeof children[0] === 'function'
  6407. ) {
  6408. data = data || {};
  6409. data.scopedSlots = { default: children[0] };
  6410. children.length = 0;
  6411. }
  6412. if (normalizationType === ALWAYS_NORMALIZE) {
  6413. children = normalizeChildren(children);
  6414. } else if (normalizationType === SIMPLE_NORMALIZE) {
  6415. children = simpleNormalizeChildren(children);
  6416. }
  6417. var vnode, ns;
  6418. if (typeof tag === 'string') {
  6419. var Ctor;
  6420. ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
  6421. if (config.isReservedTag(tag)) {
  6422. // platform built-in elements
  6423. if ( true && isDef(data) && isDef(data.nativeOn)) {
  6424. warn(
  6425. ("The .native modifier for v-on is only valid on components but it was used on <" + tag + ">."),
  6426. context
  6427. );
  6428. }
  6429. vnode = new VNode(
  6430. config.parsePlatformTagName(tag), data, children,
  6431. undefined, undefined, context
  6432. );
  6433. } else if ((!data || !data.pre) && isDef(Ctor = resolveAsset(context.$options, 'components', tag))) {
  6434. // component
  6435. vnode = createComponent(Ctor, data, context, children, tag);
  6436. } else {
  6437. // unknown or unlisted namespaced elements
  6438. // check at runtime because it may get assigned a namespace when its
  6439. // parent normalizes children
  6440. vnode = new VNode(
  6441. tag, data, children,
  6442. undefined, undefined, context
  6443. );
  6444. }
  6445. } else {
  6446. // direct component options / constructor
  6447. vnode = createComponent(tag, data, context, children);
  6448. }
  6449. if (Array.isArray(vnode)) {
  6450. return vnode
  6451. } else if (isDef(vnode)) {
  6452. if (isDef(ns)) { applyNS(vnode, ns); }
  6453. if (isDef(data)) { registerDeepBindings(data); }
  6454. return vnode
  6455. } else {
  6456. return createEmptyVNode()
  6457. }
  6458. }
  6459. function applyNS (vnode, ns, force) {
  6460. vnode.ns = ns;
  6461. if (vnode.tag === 'foreignObject') {
  6462. // use default namespace inside foreignObject
  6463. ns = undefined;
  6464. force = true;
  6465. }
  6466. if (isDef(vnode.children)) {
  6467. for (var i = 0, l = vnode.children.length; i < l; i++) {
  6468. var child = vnode.children[i];
  6469. if (isDef(child.tag) && (
  6470. isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) {
  6471. applyNS(child, ns, force);
  6472. }
  6473. }
  6474. }
  6475. }
  6476. // ref #5318
  6477. // necessary to ensure parent re-render when deep bindings like :style and
  6478. // :class are used on slot nodes
  6479. function registerDeepBindings (data) {
  6480. if (isObject(data.style)) {
  6481. traverse(data.style);
  6482. }
  6483. if (isObject(data.class)) {
  6484. traverse(data.class);
  6485. }
  6486. }
  6487. /* */
  6488. function initRender (vm) {
  6489. vm._vnode = null; // the root of the child tree
  6490. vm._staticTrees = null; // v-once cached trees
  6491. var options = vm.$options;
  6492. var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree
  6493. var renderContext = parentVnode && parentVnode.context;
  6494. vm.$slots = resolveSlots(options._renderChildren, renderContext);
  6495. vm.$scopedSlots = emptyObject;
  6496. // bind the createElement fn to this instance
  6497. // so that we get proper render context inside it.
  6498. // args order: tag, data, children, normalizationType, alwaysNormalize
  6499. // internal version is used by render functions compiled from templates
  6500. vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); };
  6501. // normalization is always applied for the public version, used in
  6502. // user-written render functions.
  6503. vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
  6504. // $attrs & $listeners are exposed for easier HOC creation.
  6505. // they need to be reactive so that HOCs using them are always updated
  6506. var parentData = parentVnode && parentVnode.data;
  6507. /* istanbul ignore else */
  6508. if (true) {
  6509. defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
  6510. !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
  6511. }, true);
  6512. defineReactive$$1(vm, '$listeners', options._parentListeners || emptyObject, function () {
  6513. !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
  6514. }, true);
  6515. } else {}
  6516. }
  6517. var currentRenderingInstance = null;
  6518. function renderMixin (Vue) {
  6519. // install runtime convenience helpers
  6520. installRenderHelpers(Vue.prototype);
  6521. Vue.prototype.$nextTick = function (fn) {
  6522. return nextTick(fn, this)
  6523. };
  6524. Vue.prototype._render = function () {
  6525. var vm = this;
  6526. var ref = vm.$options;
  6527. var render = ref.render;
  6528. var _parentVnode = ref._parentVnode;
  6529. if (_parentVnode) {
  6530. vm.$scopedSlots = normalizeScopedSlots(
  6531. _parentVnode.data.scopedSlots,
  6532. vm.$slots,
  6533. vm.$scopedSlots
  6534. );
  6535. }
  6536. // set parent vnode. this allows render functions to have access
  6537. // to the data on the placeholder node.
  6538. vm.$vnode = _parentVnode;
  6539. // render self
  6540. var vnode;
  6541. try {
  6542. // There's no need to maintain a stack because all render fns are called
  6543. // separately from one another. Nested component's render fns are called
  6544. // when parent component is patched.
  6545. currentRenderingInstance = vm;
  6546. vnode = render.call(vm._renderProxy, vm.$createElement);
  6547. } catch (e) {
  6548. handleError(e, vm, "render");
  6549. // return error render result,
  6550. // or previous vnode to prevent render error causing blank component
  6551. /* istanbul ignore else */
  6552. if ( true && vm.$options.renderError) {
  6553. try {
  6554. vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e);
  6555. } catch (e) {
  6556. handleError(e, vm, "renderError");
  6557. vnode = vm._vnode;
  6558. }
  6559. } else {
  6560. vnode = vm._vnode;
  6561. }
  6562. } finally {
  6563. currentRenderingInstance = null;
  6564. }
  6565. // if the returned array contains only a single node, allow it
  6566. if (Array.isArray(vnode) && vnode.length === 1) {
  6567. vnode = vnode[0];
  6568. }
  6569. // return empty vnode in case the render function errored out
  6570. if (!(vnode instanceof VNode)) {
  6571. if ( true && Array.isArray(vnode)) {
  6572. warn(
  6573. 'Multiple root nodes returned from render function. Render function ' +
  6574. 'should return a single root node.',
  6575. vm
  6576. );
  6577. }
  6578. vnode = createEmptyVNode();
  6579. }
  6580. // set parent
  6581. vnode.parent = _parentVnode;
  6582. return vnode
  6583. };
  6584. }
  6585. /* */
  6586. function ensureCtor (comp, base) {
  6587. if (
  6588. comp.__esModule ||
  6589. (hasSymbol && comp[Symbol.toStringTag] === 'Module')
  6590. ) {
  6591. comp = comp.default;
  6592. }
  6593. return isObject(comp)
  6594. ? base.extend(comp)
  6595. : comp
  6596. }
  6597. function createAsyncPlaceholder (
  6598. factory,
  6599. data,
  6600. context,
  6601. children,
  6602. tag
  6603. ) {
  6604. var node = createEmptyVNode();
  6605. node.asyncFactory = factory;
  6606. node.asyncMeta = { data: data, context: context, children: children, tag: tag };
  6607. return node
  6608. }
  6609. function resolveAsyncComponent (
  6610. factory,
  6611. baseCtor
  6612. ) {
  6613. if (isTrue(factory.error) && isDef(factory.errorComp)) {
  6614. return factory.errorComp
  6615. }
  6616. if (isDef(factory.resolved)) {
  6617. return factory.resolved
  6618. }
  6619. var owner = currentRenderingInstance;
  6620. if (owner && isDef(factory.owners) && factory.owners.indexOf(owner) === -1) {
  6621. // already pending
  6622. factory.owners.push(owner);
  6623. }
  6624. if (isTrue(factory.loading) && isDef(factory.loadingComp)) {
  6625. return factory.loadingComp
  6626. }
  6627. if (owner && !isDef(factory.owners)) {
  6628. var owners = factory.owners = [owner];
  6629. var sync = true;
  6630. var timerLoading = null;
  6631. var timerTimeout = null
  6632. ;(owner).$on('hook:destroyed', function () { return remove(owners, owner); });
  6633. var forceRender = function (renderCompleted) {
  6634. for (var i = 0, l = owners.length; i < l; i++) {
  6635. (owners[i]).$forceUpdate();
  6636. }
  6637. if (renderCompleted) {
  6638. owners.length = 0;
  6639. if (timerLoading !== null) {
  6640. clearTimeout(timerLoading);
  6641. timerLoading = null;
  6642. }
  6643. if (timerTimeout !== null) {
  6644. clearTimeout(timerTimeout);
  6645. timerTimeout = null;
  6646. }
  6647. }
  6648. };
  6649. var resolve = once(function (res) {
  6650. // cache resolved
  6651. factory.resolved = ensureCtor(res, baseCtor);
  6652. // invoke callbacks only if this is not a synchronous resolve
  6653. // (async resolves are shimmed as synchronous during SSR)
  6654. if (!sync) {
  6655. forceRender(true);
  6656. } else {
  6657. owners.length = 0;
  6658. }
  6659. });
  6660. var reject = once(function (reason) {
  6661. true && warn(
  6662. "Failed to resolve async component: " + (String(factory)) +
  6663. (reason ? ("\nReason: " + reason) : '')
  6664. );
  6665. if (isDef(factory.errorComp)) {
  6666. factory.error = true;
  6667. forceRender(true);
  6668. }
  6669. });
  6670. var res = factory(resolve, reject);
  6671. if (isObject(res)) {
  6672. if (isPromise(res)) {
  6673. // () => Promise
  6674. if (isUndef(factory.resolved)) {
  6675. res.then(resolve, reject);
  6676. }
  6677. } else if (isPromise(res.component)) {
  6678. res.component.then(resolve, reject);
  6679. if (isDef(res.error)) {
  6680. factory.errorComp = ensureCtor(res.error, baseCtor);
  6681. }
  6682. if (isDef(res.loading)) {
  6683. factory.loadingComp = ensureCtor(res.loading, baseCtor);
  6684. if (res.delay === 0) {
  6685. factory.loading = true;
  6686. } else {
  6687. timerLoading = setTimeout(function () {
  6688. timerLoading = null;
  6689. if (isUndef(factory.resolved) && isUndef(factory.error)) {
  6690. factory.loading = true;
  6691. forceRender(false);
  6692. }
  6693. }, res.delay || 200);
  6694. }
  6695. }
  6696. if (isDef(res.timeout)) {
  6697. timerTimeout = setTimeout(function () {
  6698. timerTimeout = null;
  6699. if (isUndef(factory.resolved)) {
  6700. reject(
  6701. true
  6702. ? ("timeout (" + (res.timeout) + "ms)")
  6703. : undefined
  6704. );
  6705. }
  6706. }, res.timeout);
  6707. }
  6708. }
  6709. }
  6710. sync = false;
  6711. // return in case resolved synchronously
  6712. return factory.loading
  6713. ? factory.loadingComp
  6714. : factory.resolved
  6715. }
  6716. }
  6717. /* */
  6718. function isAsyncPlaceholder (node) {
  6719. return node.isComment && node.asyncFactory
  6720. }
  6721. /* */
  6722. function getFirstComponentChild (children) {
  6723. if (Array.isArray(children)) {
  6724. for (var i = 0; i < children.length; i++) {
  6725. var c = children[i];
  6726. if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
  6727. return c
  6728. }
  6729. }
  6730. }
  6731. }
  6732. /* */
  6733. /* */
  6734. function initEvents (vm) {
  6735. vm._events = Object.create(null);
  6736. vm._hasHookEvent = false;
  6737. // init parent attached events
  6738. var listeners = vm.$options._parentListeners;
  6739. if (listeners) {
  6740. updateComponentListeners(vm, listeners);
  6741. }
  6742. }
  6743. var target;
  6744. function add (event, fn) {
  6745. target.$on(event, fn);
  6746. }
  6747. function remove$1 (event, fn) {
  6748. target.$off(event, fn);
  6749. }
  6750. function createOnceHandler (event, fn) {
  6751. var _target = target;
  6752. return function onceHandler () {
  6753. var res = fn.apply(null, arguments);
  6754. if (res !== null) {
  6755. _target.$off(event, onceHandler);
  6756. }
  6757. }
  6758. }
  6759. function updateComponentListeners (
  6760. vm,
  6761. listeners,
  6762. oldListeners
  6763. ) {
  6764. target = vm;
  6765. updateListeners(listeners, oldListeners || {}, add, remove$1, createOnceHandler, vm);
  6766. target = undefined;
  6767. }
  6768. function eventsMixin (Vue) {
  6769. var hookRE = /^hook:/;
  6770. Vue.prototype.$on = function (event, fn) {
  6771. var vm = this;
  6772. if (Array.isArray(event)) {
  6773. for (var i = 0, l = event.length; i < l; i++) {
  6774. vm.$on(event[i], fn);
  6775. }
  6776. } else {
  6777. (vm._events[event] || (vm._events[event] = [])).push(fn);
  6778. // optimize hook:event cost by using a boolean flag marked at registration
  6779. // instead of a hash lookup
  6780. if (hookRE.test(event)) {
  6781. vm._hasHookEvent = true;
  6782. }
  6783. }
  6784. return vm
  6785. };
  6786. Vue.prototype.$once = function (event, fn) {
  6787. var vm = this;
  6788. function on () {
  6789. vm.$off(event, on);
  6790. fn.apply(vm, arguments);
  6791. }
  6792. on.fn = fn;
  6793. vm.$on(event, on);
  6794. return vm
  6795. };
  6796. Vue.prototype.$off = function (event, fn) {
  6797. var vm = this;
  6798. // all
  6799. if (!arguments.length) {
  6800. vm._events = Object.create(null);
  6801. return vm
  6802. }
  6803. // array of events
  6804. if (Array.isArray(event)) {
  6805. for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
  6806. vm.$off(event[i$1], fn);
  6807. }
  6808. return vm
  6809. }
  6810. // specific event
  6811. var cbs = vm._events[event];
  6812. if (!cbs) {
  6813. return vm
  6814. }
  6815. if (!fn) {
  6816. vm._events[event] = null;
  6817. return vm
  6818. }
  6819. // specific handler
  6820. var cb;
  6821. var i = cbs.length;
  6822. while (i--) {
  6823. cb = cbs[i];
  6824. if (cb === fn || cb.fn === fn) {
  6825. cbs.splice(i, 1);
  6826. break
  6827. }
  6828. }
  6829. return vm
  6830. };
  6831. Vue.prototype.$emit = function (event) {
  6832. var vm = this;
  6833. if (true) {
  6834. var lowerCaseEvent = event.toLowerCase();
  6835. if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) {
  6836. tip(
  6837. "Event \"" + lowerCaseEvent + "\" is emitted in component " +
  6838. (formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " +
  6839. "Note that HTML attributes are case-insensitive and you cannot use " +
  6840. "v-on to listen to camelCase events when using in-DOM templates. " +
  6841. "You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"."
  6842. );
  6843. }
  6844. }
  6845. var cbs = vm._events[event];
  6846. if (cbs) {
  6847. cbs = cbs.length > 1 ? toArray(cbs) : cbs;
  6848. var args = toArray(arguments, 1);
  6849. var info = "event handler for \"" + event + "\"";
  6850. for (var i = 0, l = cbs.length; i < l; i++) {
  6851. invokeWithErrorHandling(cbs[i], vm, args, vm, info);
  6852. }
  6853. }
  6854. return vm
  6855. };
  6856. }
  6857. /* */
  6858. var activeInstance = null;
  6859. var isUpdatingChildComponent = false;
  6860. function setActiveInstance(vm) {
  6861. var prevActiveInstance = activeInstance;
  6862. activeInstance = vm;
  6863. return function () {
  6864. activeInstance = prevActiveInstance;
  6865. }
  6866. }
  6867. function initLifecycle (vm) {
  6868. var options = vm.$options;
  6869. // locate first non-abstract parent
  6870. var parent = options.parent;
  6871. if (parent && !options.abstract) {
  6872. while (parent.$options.abstract && parent.$parent) {
  6873. parent = parent.$parent;
  6874. }
  6875. parent.$children.push(vm);
  6876. }
  6877. vm.$parent = parent;
  6878. vm.$root = parent ? parent.$root : vm;
  6879. vm.$children = [];
  6880. vm.$refs = {};
  6881. vm._watcher = null;
  6882. vm._inactive = null;
  6883. vm._directInactive = false;
  6884. vm._isMounted = false;
  6885. vm._isDestroyed = false;
  6886. vm._isBeingDestroyed = false;
  6887. }
  6888. function lifecycleMixin (Vue) {
  6889. Vue.prototype._update = function (vnode, hydrating) {
  6890. var vm = this;
  6891. var prevEl = vm.$el;
  6892. var prevVnode = vm._vnode;
  6893. var restoreActiveInstance = setActiveInstance(vm);
  6894. vm._vnode = vnode;
  6895. // Vue.prototype.__patch__ is injected in entry points
  6896. // based on the rendering backend used.
  6897. if (!prevVnode) {
  6898. // initial render
  6899. vm.$el = vm.__patch__(vm.$el, vnode, hydrating, false /* removeOnly */);
  6900. } else {
  6901. // updates
  6902. vm.$el = vm.__patch__(prevVnode, vnode);
  6903. }
  6904. restoreActiveInstance();
  6905. // update __vue__ reference
  6906. if (prevEl) {
  6907. prevEl.__vue__ = null;
  6908. }
  6909. if (vm.$el) {
  6910. vm.$el.__vue__ = vm;
  6911. }
  6912. // if parent is an HOC, update its $el as well
  6913. if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) {
  6914. vm.$parent.$el = vm.$el;
  6915. }
  6916. // updated hook is called by the scheduler to ensure that children are
  6917. // updated in a parent's updated hook.
  6918. };
  6919. Vue.prototype.$forceUpdate = function () {
  6920. var vm = this;
  6921. if (vm._watcher) {
  6922. vm._watcher.update();
  6923. }
  6924. };
  6925. Vue.prototype.$destroy = function () {
  6926. var vm = this;
  6927. if (vm._isBeingDestroyed) {
  6928. return
  6929. }
  6930. callHook(vm, 'beforeDestroy');
  6931. vm._isBeingDestroyed = true;
  6932. // remove self from parent
  6933. var parent = vm.$parent;
  6934. if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) {
  6935. remove(parent.$children, vm);
  6936. }
  6937. // teardown watchers
  6938. if (vm._watcher) {
  6939. vm._watcher.teardown();
  6940. }
  6941. var i = vm._watchers.length;
  6942. while (i--) {
  6943. vm._watchers[i].teardown();
  6944. }
  6945. // remove reference from data ob
  6946. // frozen object may not have observer.
  6947. if (vm._data.__ob__) {
  6948. vm._data.__ob__.vmCount--;
  6949. }
  6950. // call the last hook...
  6951. vm._isDestroyed = true;
  6952. // invoke destroy hooks on current rendered tree
  6953. vm.__patch__(vm._vnode, null);
  6954. // fire destroyed hook
  6955. callHook(vm, 'destroyed');
  6956. // turn off all instance listeners.
  6957. vm.$off();
  6958. // remove __vue__ reference
  6959. if (vm.$el) {
  6960. vm.$el.__vue__ = null;
  6961. }
  6962. // release circular reference (#6759)
  6963. if (vm.$vnode) {
  6964. vm.$vnode.parent = null;
  6965. }
  6966. };
  6967. }
  6968. function updateChildComponent (
  6969. vm,
  6970. propsData,
  6971. listeners,
  6972. parentVnode,
  6973. renderChildren
  6974. ) {
  6975. if (true) {
  6976. isUpdatingChildComponent = true;
  6977. }
  6978. // determine whether component has slot children
  6979. // we need to do this before overwriting $options._renderChildren.
  6980. // check if there are dynamic scopedSlots (hand-written or compiled but with
  6981. // dynamic slot names). Static scoped slots compiled from template has the
  6982. // "$stable" marker.
  6983. var newScopedSlots = parentVnode.data.scopedSlots;
  6984. var oldScopedSlots = vm.$scopedSlots;
  6985. var hasDynamicScopedSlot = !!(
  6986. (newScopedSlots && !newScopedSlots.$stable) ||
  6987. (oldScopedSlots !== emptyObject && !oldScopedSlots.$stable) ||
  6988. (newScopedSlots && vm.$scopedSlots.$key !== newScopedSlots.$key)
  6989. );
  6990. // Any static slot children from the parent may have changed during parent's
  6991. // update. Dynamic scoped slots may also have changed. In such cases, a forced
  6992. // update is necessary to ensure correctness.
  6993. var needsForceUpdate = !!(
  6994. renderChildren || // has new static slots
  6995. vm.$options._renderChildren || // has old static slots
  6996. hasDynamicScopedSlot
  6997. );
  6998. vm.$options._parentVnode = parentVnode;
  6999. vm.$vnode = parentVnode; // update vm's placeholder node without re-render
  7000. if (vm._vnode) { // update child tree's parent
  7001. vm._vnode.parent = parentVnode;
  7002. }
  7003. vm.$options._renderChildren = renderChildren;
  7004. // update $attrs and $listeners hash
  7005. // these are also reactive so they may trigger child update if the child
  7006. // used them during render
  7007. vm.$attrs = parentVnode.data.attrs || emptyObject;
  7008. vm.$listeners = listeners || emptyObject;
  7009. // update props
  7010. if (propsData && vm.$options.props) {
  7011. toggleObserving(false);
  7012. var props = vm._props;
  7013. var propKeys = vm.$options._propKeys || [];
  7014. for (var i = 0; i < propKeys.length; i++) {
  7015. var key = propKeys[i];
  7016. var propOptions = vm.$options.props; // wtf flow?
  7017. props[key] = validateProp(key, propOptions, propsData, vm);
  7018. }
  7019. toggleObserving(true);
  7020. // keep a copy of raw propsData
  7021. vm.$options.propsData = propsData;
  7022. }
  7023. // fixed by xxxxxx update properties(mp runtime)
  7024. vm._$updateProperties && vm._$updateProperties(vm);
  7025. // update listeners
  7026. listeners = listeners || emptyObject;
  7027. var oldListeners = vm.$options._parentListeners;
  7028. vm.$options._parentListeners = listeners;
  7029. updateComponentListeners(vm, listeners, oldListeners);
  7030. // resolve slots + force update if has children
  7031. if (needsForceUpdate) {
  7032. vm.$slots = resolveSlots(renderChildren, parentVnode.context);
  7033. vm.$forceUpdate();
  7034. }
  7035. if (true) {
  7036. isUpdatingChildComponent = false;
  7037. }
  7038. }
  7039. function isInInactiveTree (vm) {
  7040. while (vm && (vm = vm.$parent)) {
  7041. if (vm._inactive) { return true }
  7042. }
  7043. return false
  7044. }
  7045. function activateChildComponent (vm, direct) {
  7046. if (direct) {
  7047. vm._directInactive = false;
  7048. if (isInInactiveTree(vm)) {
  7049. return
  7050. }
  7051. } else if (vm._directInactive) {
  7052. return
  7053. }
  7054. if (vm._inactive || vm._inactive === null) {
  7055. vm._inactive = false;
  7056. for (var i = 0; i < vm.$children.length; i++) {
  7057. activateChildComponent(vm.$children[i]);
  7058. }
  7059. callHook(vm, 'activated');
  7060. }
  7061. }
  7062. function deactivateChildComponent (vm, direct) {
  7063. if (direct) {
  7064. vm._directInactive = true;
  7065. if (isInInactiveTree(vm)) {
  7066. return
  7067. }
  7068. }
  7069. if (!vm._inactive) {
  7070. vm._inactive = true;
  7071. for (var i = 0; i < vm.$children.length; i++) {
  7072. deactivateChildComponent(vm.$children[i]);
  7073. }
  7074. callHook(vm, 'deactivated');
  7075. }
  7076. }
  7077. function callHook (vm, hook) {
  7078. // #7573 disable dep collection when invoking lifecycle hooks
  7079. pushTarget();
  7080. var handlers = vm.$options[hook];
  7081. var info = hook + " hook";
  7082. if (handlers) {
  7083. for (var i = 0, j = handlers.length; i < j; i++) {
  7084. invokeWithErrorHandling(handlers[i], vm, null, vm, info);
  7085. }
  7086. }
  7087. if (vm._hasHookEvent) {
  7088. vm.$emit('hook:' + hook);
  7089. }
  7090. popTarget();
  7091. }
  7092. /* */
  7093. var MAX_UPDATE_COUNT = 100;
  7094. var queue = [];
  7095. var activatedChildren = [];
  7096. var has = {};
  7097. var circular = {};
  7098. var waiting = false;
  7099. var flushing = false;
  7100. var index = 0;
  7101. /**
  7102. * Reset the scheduler's state.
  7103. */
  7104. function resetSchedulerState () {
  7105. index = queue.length = activatedChildren.length = 0;
  7106. has = {};
  7107. if (true) {
  7108. circular = {};
  7109. }
  7110. waiting = flushing = false;
  7111. }
  7112. // Async edge case #6566 requires saving the timestamp when event listeners are
  7113. // attached. However, calling performance.now() has a perf overhead especially
  7114. // if the page has thousands of event listeners. Instead, we take a timestamp
  7115. // every time the scheduler flushes and use that for all event listeners
  7116. // attached during that flush.
  7117. var currentFlushTimestamp = 0;
  7118. // Async edge case fix requires storing an event listener's attach timestamp.
  7119. var getNow = Date.now;
  7120. // Determine what event timestamp the browser is using. Annoyingly, the
  7121. // timestamp can either be hi-res (relative to page load) or low-res
  7122. // (relative to UNIX epoch), so in order to compare time we have to use the
  7123. // same timestamp type when saving the flush timestamp.
  7124. // All IE versions use low-res event timestamps, and have problematic clock
  7125. // implementations (#9632)
  7126. if (inBrowser && !isIE) {
  7127. var performance = window.performance;
  7128. if (
  7129. performance &&
  7130. typeof performance.now === 'function' &&
  7131. getNow() > document.createEvent('Event').timeStamp
  7132. ) {
  7133. // if the event timestamp, although evaluated AFTER the Date.now(), is
  7134. // smaller than it, it means the event is using a hi-res timestamp,
  7135. // and we need to use the hi-res version for event listener timestamps as
  7136. // well.
  7137. getNow = function () { return performance.now(); };
  7138. }
  7139. }
  7140. /**
  7141. * Flush both queues and run the watchers.
  7142. */
  7143. function flushSchedulerQueue () {
  7144. currentFlushTimestamp = getNow();
  7145. flushing = true;
  7146. var watcher, id;
  7147. // Sort queue before flush.
  7148. // This ensures that:
  7149. // 1. Components are updated from parent to child. (because parent is always
  7150. // created before the child)
  7151. // 2. A component's user watchers are run before its render watcher (because
  7152. // user watchers are created before the render watcher)
  7153. // 3. If a component is destroyed during a parent component's watcher run,
  7154. // its watchers can be skipped.
  7155. queue.sort(function (a, b) { return a.id - b.id; });
  7156. // do not cache length because more watchers might be pushed
  7157. // as we run existing watchers
  7158. for (index = 0; index < queue.length; index++) {
  7159. watcher = queue[index];
  7160. if (watcher.before) {
  7161. watcher.before();
  7162. }
  7163. id = watcher.id;
  7164. has[id] = null;
  7165. watcher.run();
  7166. // in dev build, check and stop circular updates.
  7167. if ( true && has[id] != null) {
  7168. circular[id] = (circular[id] || 0) + 1;
  7169. if (circular[id] > MAX_UPDATE_COUNT) {
  7170. warn(
  7171. 'You may have an infinite update loop ' + (
  7172. watcher.user
  7173. ? ("in watcher with expression \"" + (watcher.expression) + "\"")
  7174. : "in a component render function."
  7175. ),
  7176. watcher.vm
  7177. );
  7178. break
  7179. }
  7180. }
  7181. }
  7182. // keep copies of post queues before resetting state
  7183. var activatedQueue = activatedChildren.slice();
  7184. var updatedQueue = queue.slice();
  7185. resetSchedulerState();
  7186. // call component updated and activated hooks
  7187. callActivatedHooks(activatedQueue);
  7188. callUpdatedHooks(updatedQueue);
  7189. // devtool hook
  7190. /* istanbul ignore if */
  7191. if (devtools && config.devtools) {
  7192. devtools.emit('flush');
  7193. }
  7194. }
  7195. function callUpdatedHooks (queue) {
  7196. var i = queue.length;
  7197. while (i--) {
  7198. var watcher = queue[i];
  7199. var vm = watcher.vm;
  7200. if (vm._watcher === watcher && vm._isMounted && !vm._isDestroyed) {
  7201. callHook(vm, 'updated');
  7202. }
  7203. }
  7204. }
  7205. /**
  7206. * Queue a kept-alive component that was activated during patch.
  7207. * The queue will be processed after the entire tree has been patched.
  7208. */
  7209. function queueActivatedComponent (vm) {
  7210. // setting _inactive to false here so that a render function can
  7211. // rely on checking whether it's in an inactive tree (e.g. router-view)
  7212. vm._inactive = false;
  7213. activatedChildren.push(vm);
  7214. }
  7215. function callActivatedHooks (queue) {
  7216. for (var i = 0; i < queue.length; i++) {
  7217. queue[i]._inactive = true;
  7218. activateChildComponent(queue[i], true /* true */);
  7219. }
  7220. }
  7221. /**
  7222. * Push a watcher into the watcher queue.
  7223. * Jobs with duplicate IDs will be skipped unless it's
  7224. * pushed when the queue is being flushed.
  7225. */
  7226. function queueWatcher (watcher) {
  7227. var id = watcher.id;
  7228. if (has[id] == null) {
  7229. has[id] = true;
  7230. if (!flushing) {
  7231. queue.push(watcher);
  7232. } else {
  7233. // if already flushing, splice the watcher based on its id
  7234. // if already past its id, it will be run next immediately.
  7235. var i = queue.length - 1;
  7236. while (i > index && queue[i].id > watcher.id) {
  7237. i--;
  7238. }
  7239. queue.splice(i + 1, 0, watcher);
  7240. }
  7241. // queue the flush
  7242. if (!waiting) {
  7243. waiting = true;
  7244. if ( true && !config.async) {
  7245. flushSchedulerQueue();
  7246. return
  7247. }
  7248. nextTick(flushSchedulerQueue);
  7249. }
  7250. }
  7251. }
  7252. /* */
  7253. var uid$2 = 0;
  7254. /**
  7255. * A watcher parses an expression, collects dependencies,
  7256. * and fires callback when the expression value changes.
  7257. * This is used for both the $watch() api and directives.
  7258. */
  7259. var Watcher = function Watcher (
  7260. vm,
  7261. expOrFn,
  7262. cb,
  7263. options,
  7264. isRenderWatcher
  7265. ) {
  7266. this.vm = vm;
  7267. if (isRenderWatcher) {
  7268. vm._watcher = this;
  7269. }
  7270. vm._watchers.push(this);
  7271. // options
  7272. if (options) {
  7273. this.deep = !!options.deep;
  7274. this.user = !!options.user;
  7275. this.lazy = !!options.lazy;
  7276. this.sync = !!options.sync;
  7277. this.before = options.before;
  7278. } else {
  7279. this.deep = this.user = this.lazy = this.sync = false;
  7280. }
  7281. this.cb = cb;
  7282. this.id = ++uid$2; // uid for batching
  7283. this.active = true;
  7284. this.dirty = this.lazy; // for lazy watchers
  7285. this.deps = [];
  7286. this.newDeps = [];
  7287. this.depIds = new _Set();
  7288. this.newDepIds = new _Set();
  7289. this.expression = true
  7290. ? expOrFn.toString()
  7291. : undefined;
  7292. // parse expression for getter
  7293. if (typeof expOrFn === 'function') {
  7294. this.getter = expOrFn;
  7295. } else {
  7296. this.getter = parsePath(expOrFn);
  7297. if (!this.getter) {
  7298. this.getter = noop;
  7299. true && warn(
  7300. "Failed watching path: \"" + expOrFn + "\" " +
  7301. 'Watcher only accepts simple dot-delimited paths. ' +
  7302. 'For full control, use a function instead.',
  7303. vm
  7304. );
  7305. }
  7306. }
  7307. this.value = this.lazy
  7308. ? undefined
  7309. : this.get();
  7310. };
  7311. /**
  7312. * Evaluate the getter, and re-collect dependencies.
  7313. */
  7314. Watcher.prototype.get = function get () {
  7315. pushTarget(this);
  7316. var value;
  7317. var vm = this.vm;
  7318. try {
  7319. value = this.getter.call(vm, vm);
  7320. } catch (e) {
  7321. if (this.user) {
  7322. handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
  7323. } else {
  7324. throw e
  7325. }
  7326. } finally {
  7327. // "touch" every property so they are all tracked as
  7328. // dependencies for deep watching
  7329. if (this.deep) {
  7330. traverse(value);
  7331. }
  7332. popTarget();
  7333. this.cleanupDeps();
  7334. }
  7335. return value
  7336. };
  7337. /**
  7338. * Add a dependency to this directive.
  7339. */
  7340. Watcher.prototype.addDep = function addDep (dep) {
  7341. var id = dep.id;
  7342. if (!this.newDepIds.has(id)) {
  7343. this.newDepIds.add(id);
  7344. this.newDeps.push(dep);
  7345. if (!this.depIds.has(id)) {
  7346. dep.addSub(this);
  7347. }
  7348. }
  7349. };
  7350. /**
  7351. * Clean up for dependency collection.
  7352. */
  7353. Watcher.prototype.cleanupDeps = function cleanupDeps () {
  7354. var i = this.deps.length;
  7355. while (i--) {
  7356. var dep = this.deps[i];
  7357. if (!this.newDepIds.has(dep.id)) {
  7358. dep.removeSub(this);
  7359. }
  7360. }
  7361. var tmp = this.depIds;
  7362. this.depIds = this.newDepIds;
  7363. this.newDepIds = tmp;
  7364. this.newDepIds.clear();
  7365. tmp = this.deps;
  7366. this.deps = this.newDeps;
  7367. this.newDeps = tmp;
  7368. this.newDeps.length = 0;
  7369. };
  7370. /**
  7371. * Subscriber interface.
  7372. * Will be called when a dependency changes.
  7373. */
  7374. Watcher.prototype.update = function update () {
  7375. /* istanbul ignore else */
  7376. if (this.lazy) {
  7377. this.dirty = true;
  7378. } else if (this.sync) {
  7379. this.run();
  7380. } else {
  7381. queueWatcher(this);
  7382. }
  7383. };
  7384. /**
  7385. * Scheduler job interface.
  7386. * Will be called by the scheduler.
  7387. */
  7388. Watcher.prototype.run = function run () {
  7389. if (this.active) {
  7390. var value = this.get();
  7391. if (
  7392. value !== this.value ||
  7393. // Deep watchers and watchers on Object/Arrays should fire even
  7394. // when the value is the same, because the value may
  7395. // have mutated.
  7396. isObject(value) ||
  7397. this.deep
  7398. ) {
  7399. // set new value
  7400. var oldValue = this.value;
  7401. this.value = value;
  7402. if (this.user) {
  7403. try {
  7404. this.cb.call(this.vm, value, oldValue);
  7405. } catch (e) {
  7406. handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\""));
  7407. }
  7408. } else {
  7409. this.cb.call(this.vm, value, oldValue);
  7410. }
  7411. }
  7412. }
  7413. };
  7414. /**
  7415. * Evaluate the value of the watcher.
  7416. * This only gets called for lazy watchers.
  7417. */
  7418. Watcher.prototype.evaluate = function evaluate () {
  7419. this.value = this.get();
  7420. this.dirty = false;
  7421. };
  7422. /**
  7423. * Depend on all deps collected by this watcher.
  7424. */
  7425. Watcher.prototype.depend = function depend () {
  7426. var i = this.deps.length;
  7427. while (i--) {
  7428. this.deps[i].depend();
  7429. }
  7430. };
  7431. /**
  7432. * Remove self from all dependencies' subscriber list.
  7433. */
  7434. Watcher.prototype.teardown = function teardown () {
  7435. if (this.active) {
  7436. // remove self from vm's watcher list
  7437. // this is a somewhat expensive operation so we skip it
  7438. // if the vm is being destroyed.
  7439. if (!this.vm._isBeingDestroyed) {
  7440. remove(this.vm._watchers, this);
  7441. }
  7442. var i = this.deps.length;
  7443. while (i--) {
  7444. this.deps[i].removeSub(this);
  7445. }
  7446. this.active = false;
  7447. }
  7448. };
  7449. /* */
  7450. var sharedPropertyDefinition = {
  7451. enumerable: true,
  7452. configurable: true,
  7453. get: noop,
  7454. set: noop
  7455. };
  7456. function proxy (target, sourceKey, key) {
  7457. sharedPropertyDefinition.get = function proxyGetter () {
  7458. return this[sourceKey][key]
  7459. };
  7460. sharedPropertyDefinition.set = function proxySetter (val) {
  7461. this[sourceKey][key] = val;
  7462. };
  7463. Object.defineProperty(target, key, sharedPropertyDefinition);
  7464. }
  7465. function initState (vm) {
  7466. vm._watchers = [];
  7467. var opts = vm.$options;
  7468. if (opts.props) { initProps(vm, opts.props); }
  7469. if (opts.methods) { initMethods(vm, opts.methods); }
  7470. if (opts.data) {
  7471. initData(vm);
  7472. } else {
  7473. observe(vm._data = {}, true /* asRootData */);
  7474. }
  7475. if (opts.computed) { initComputed(vm, opts.computed); }
  7476. if (opts.watch && opts.watch !== nativeWatch) {
  7477. initWatch(vm, opts.watch);
  7478. }
  7479. }
  7480. function initProps (vm, propsOptions) {
  7481. var propsData = vm.$options.propsData || {};
  7482. var props = vm._props = {};
  7483. // cache prop keys so that future props updates can iterate using Array
  7484. // instead of dynamic object key enumeration.
  7485. var keys = vm.$options._propKeys = [];
  7486. var isRoot = !vm.$parent;
  7487. // root instance props should be converted
  7488. if (!isRoot) {
  7489. toggleObserving(false);
  7490. }
  7491. var loop = function ( key ) {
  7492. keys.push(key);
  7493. var value = validateProp(key, propsOptions, propsData, vm);
  7494. /* istanbul ignore else */
  7495. if (true) {
  7496. var hyphenatedKey = hyphenate(key);
  7497. if (isReservedAttribute(hyphenatedKey) ||
  7498. config.isReservedAttr(hyphenatedKey)) {
  7499. warn(
  7500. ("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."),
  7501. vm
  7502. );
  7503. }
  7504. defineReactive$$1(props, key, value, function () {
  7505. if (!isRoot && !isUpdatingChildComponent) {
  7506. {
  7507. if(vm.mpHost === 'mp-baidu' || vm.mpHost === 'mp-kuaishou' || vm.mpHost === 'mp-xhs'){//百度、快手、小红书 observer 在 setData callback 之后触发,直接忽略该 warn
  7508. return
  7509. }
  7510. //fixed by xxxxxx __next_tick_pending,uni://form-field 时不告警
  7511. if(
  7512. key === 'value' &&
  7513. Array.isArray(vm.$options.behaviors) &&
  7514. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  7515. ){
  7516. return
  7517. }
  7518. if(vm._getFormData){
  7519. return
  7520. }
  7521. var $parent = vm.$parent;
  7522. while($parent){
  7523. if($parent.__next_tick_pending){
  7524. return
  7525. }
  7526. $parent = $parent.$parent;
  7527. }
  7528. }
  7529. warn(
  7530. "Avoid mutating a prop directly since the value will be " +
  7531. "overwritten whenever the parent component re-renders. " +
  7532. "Instead, use a data or computed property based on the prop's " +
  7533. "value. Prop being mutated: \"" + key + "\"",
  7534. vm
  7535. );
  7536. }
  7537. });
  7538. } else {}
  7539. // static props are already proxied on the component's prototype
  7540. // during Vue.extend(). We only need to proxy props defined at
  7541. // instantiation here.
  7542. if (!(key in vm)) {
  7543. proxy(vm, "_props", key);
  7544. }
  7545. };
  7546. for (var key in propsOptions) loop( key );
  7547. toggleObserving(true);
  7548. }
  7549. function initData (vm) {
  7550. var data = vm.$options.data;
  7551. data = vm._data = typeof data === 'function'
  7552. ? getData(data, vm)
  7553. : data || {};
  7554. if (!isPlainObject(data)) {
  7555. data = {};
  7556. true && warn(
  7557. 'data functions should return an object:\n' +
  7558. 'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function',
  7559. vm
  7560. );
  7561. }
  7562. // proxy data on instance
  7563. var keys = Object.keys(data);
  7564. var props = vm.$options.props;
  7565. var methods = vm.$options.methods;
  7566. var i = keys.length;
  7567. while (i--) {
  7568. var key = keys[i];
  7569. if (true) {
  7570. if (methods && hasOwn(methods, key)) {
  7571. warn(
  7572. ("Method \"" + key + "\" has already been defined as a data property."),
  7573. vm
  7574. );
  7575. }
  7576. }
  7577. if (props && hasOwn(props, key)) {
  7578. true && warn(
  7579. "The data property \"" + key + "\" is already declared as a prop. " +
  7580. "Use prop default value instead.",
  7581. vm
  7582. );
  7583. } else if (!isReserved(key)) {
  7584. proxy(vm, "_data", key);
  7585. }
  7586. }
  7587. // observe data
  7588. observe(data, true /* asRootData */);
  7589. }
  7590. function getData (data, vm) {
  7591. // #7573 disable dep collection when invoking data getters
  7592. pushTarget();
  7593. try {
  7594. return data.call(vm, vm)
  7595. } catch (e) {
  7596. handleError(e, vm, "data()");
  7597. return {}
  7598. } finally {
  7599. popTarget();
  7600. }
  7601. }
  7602. var computedWatcherOptions = { lazy: true };
  7603. function initComputed (vm, computed) {
  7604. // $flow-disable-line
  7605. var watchers = vm._computedWatchers = Object.create(null);
  7606. // computed properties are just getters during SSR
  7607. var isSSR = isServerRendering();
  7608. for (var key in computed) {
  7609. var userDef = computed[key];
  7610. var getter = typeof userDef === 'function' ? userDef : userDef.get;
  7611. if ( true && getter == null) {
  7612. warn(
  7613. ("Getter is missing for computed property \"" + key + "\"."),
  7614. vm
  7615. );
  7616. }
  7617. if (!isSSR) {
  7618. // create internal watcher for the computed property.
  7619. watchers[key] = new Watcher(
  7620. vm,
  7621. getter || noop,
  7622. noop,
  7623. computedWatcherOptions
  7624. );
  7625. }
  7626. // component-defined computed properties are already defined on the
  7627. // component prototype. We only need to define computed properties defined
  7628. // at instantiation here.
  7629. if (!(key in vm)) {
  7630. defineComputed(vm, key, userDef);
  7631. } else if (true) {
  7632. if (key in vm.$data) {
  7633. warn(("The computed property \"" + key + "\" is already defined in data."), vm);
  7634. } else if (vm.$options.props && key in vm.$options.props) {
  7635. warn(("The computed property \"" + key + "\" is already defined as a prop."), vm);
  7636. }
  7637. }
  7638. }
  7639. }
  7640. function defineComputed (
  7641. target,
  7642. key,
  7643. userDef
  7644. ) {
  7645. var shouldCache = !isServerRendering();
  7646. if (typeof userDef === 'function') {
  7647. sharedPropertyDefinition.get = shouldCache
  7648. ? createComputedGetter(key)
  7649. : createGetterInvoker(userDef);
  7650. sharedPropertyDefinition.set = noop;
  7651. } else {
  7652. sharedPropertyDefinition.get = userDef.get
  7653. ? shouldCache && userDef.cache !== false
  7654. ? createComputedGetter(key)
  7655. : createGetterInvoker(userDef.get)
  7656. : noop;
  7657. sharedPropertyDefinition.set = userDef.set || noop;
  7658. }
  7659. if ( true &&
  7660. sharedPropertyDefinition.set === noop) {
  7661. sharedPropertyDefinition.set = function () {
  7662. warn(
  7663. ("Computed property \"" + key + "\" was assigned to but it has no setter."),
  7664. this
  7665. );
  7666. };
  7667. }
  7668. Object.defineProperty(target, key, sharedPropertyDefinition);
  7669. }
  7670. function createComputedGetter (key) {
  7671. return function computedGetter () {
  7672. var watcher = this._computedWatchers && this._computedWatchers[key];
  7673. if (watcher) {
  7674. if (watcher.dirty) {
  7675. watcher.evaluate();
  7676. }
  7677. if (Dep.SharedObject.target) {// fixed by xxxxxx
  7678. watcher.depend();
  7679. }
  7680. return watcher.value
  7681. }
  7682. }
  7683. }
  7684. function createGetterInvoker(fn) {
  7685. return function computedGetter () {
  7686. return fn.call(this, this)
  7687. }
  7688. }
  7689. function initMethods (vm, methods) {
  7690. var props = vm.$options.props;
  7691. for (var key in methods) {
  7692. if (true) {
  7693. if (typeof methods[key] !== 'function') {
  7694. warn(
  7695. "Method \"" + key + "\" has type \"" + (typeof methods[key]) + "\" in the component definition. " +
  7696. "Did you reference the function correctly?",
  7697. vm
  7698. );
  7699. }
  7700. if (props && hasOwn(props, key)) {
  7701. warn(
  7702. ("Method \"" + key + "\" has already been defined as a prop."),
  7703. vm
  7704. );
  7705. }
  7706. if ((key in vm) && isReserved(key)) {
  7707. warn(
  7708. "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
  7709. "Avoid defining component methods that start with _ or $."
  7710. );
  7711. }
  7712. }
  7713. vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[key], vm);
  7714. }
  7715. }
  7716. function initWatch (vm, watch) {
  7717. for (var key in watch) {
  7718. var handler = watch[key];
  7719. if (Array.isArray(handler)) {
  7720. for (var i = 0; i < handler.length; i++) {
  7721. createWatcher(vm, key, handler[i]);
  7722. }
  7723. } else {
  7724. createWatcher(vm, key, handler);
  7725. }
  7726. }
  7727. }
  7728. function createWatcher (
  7729. vm,
  7730. expOrFn,
  7731. handler,
  7732. options
  7733. ) {
  7734. if (isPlainObject(handler)) {
  7735. options = handler;
  7736. handler = handler.handler;
  7737. }
  7738. if (typeof handler === 'string') {
  7739. handler = vm[handler];
  7740. }
  7741. return vm.$watch(expOrFn, handler, options)
  7742. }
  7743. function stateMixin (Vue) {
  7744. // flow somehow has problems with directly declared definition object
  7745. // when using Object.defineProperty, so we have to procedurally build up
  7746. // the object here.
  7747. var dataDef = {};
  7748. dataDef.get = function () { return this._data };
  7749. var propsDef = {};
  7750. propsDef.get = function () { return this._props };
  7751. if (true) {
  7752. dataDef.set = function () {
  7753. warn(
  7754. 'Avoid replacing instance root $data. ' +
  7755. 'Use nested data properties instead.',
  7756. this
  7757. );
  7758. };
  7759. propsDef.set = function () {
  7760. warn("$props is readonly.", this);
  7761. };
  7762. }
  7763. Object.defineProperty(Vue.prototype, '$data', dataDef);
  7764. Object.defineProperty(Vue.prototype, '$props', propsDef);
  7765. Vue.prototype.$set = set;
  7766. Vue.prototype.$delete = del;
  7767. Vue.prototype.$watch = function (
  7768. expOrFn,
  7769. cb,
  7770. options
  7771. ) {
  7772. var vm = this;
  7773. if (isPlainObject(cb)) {
  7774. return createWatcher(vm, expOrFn, cb, options)
  7775. }
  7776. options = options || {};
  7777. options.user = true;
  7778. var watcher = new Watcher(vm, expOrFn, cb, options);
  7779. if (options.immediate) {
  7780. try {
  7781. cb.call(vm, watcher.value);
  7782. } catch (error) {
  7783. handleError(error, vm, ("callback for immediate watcher \"" + (watcher.expression) + "\""));
  7784. }
  7785. }
  7786. return function unwatchFn () {
  7787. watcher.teardown();
  7788. }
  7789. };
  7790. }
  7791. /* */
  7792. var uid$3 = 0;
  7793. function initMixin (Vue) {
  7794. Vue.prototype._init = function (options) {
  7795. var vm = this;
  7796. // a uid
  7797. vm._uid = uid$3++;
  7798. var startTag, endTag;
  7799. /* istanbul ignore if */
  7800. if ( true && config.performance && mark) {
  7801. startTag = "vue-perf-start:" + (vm._uid);
  7802. endTag = "vue-perf-end:" + (vm._uid);
  7803. mark(startTag);
  7804. }
  7805. // a flag to avoid this being observed
  7806. vm._isVue = true;
  7807. // merge options
  7808. if (options && options._isComponent) {
  7809. // optimize internal component instantiation
  7810. // since dynamic options merging is pretty slow, and none of the
  7811. // internal component options needs special treatment.
  7812. initInternalComponent(vm, options);
  7813. } else {
  7814. vm.$options = mergeOptions(
  7815. resolveConstructorOptions(vm.constructor),
  7816. options || {},
  7817. vm
  7818. );
  7819. }
  7820. /* istanbul ignore else */
  7821. if (true) {
  7822. initProxy(vm);
  7823. } else {}
  7824. // expose real self
  7825. vm._self = vm;
  7826. initLifecycle(vm);
  7827. initEvents(vm);
  7828. initRender(vm);
  7829. callHook(vm, 'beforeCreate');
  7830. !vm._$fallback && initInjections(vm); // resolve injections before data/props
  7831. initState(vm);
  7832. !vm._$fallback && initProvide(vm); // resolve provide after data/props
  7833. !vm._$fallback && callHook(vm, 'created');
  7834. /* istanbul ignore if */
  7835. if ( true && config.performance && mark) {
  7836. vm._name = formatComponentName(vm, false);
  7837. mark(endTag);
  7838. measure(("vue " + (vm._name) + " init"), startTag, endTag);
  7839. }
  7840. if (vm.$options.el) {
  7841. vm.$mount(vm.$options.el);
  7842. }
  7843. };
  7844. }
  7845. function initInternalComponent (vm, options) {
  7846. var opts = vm.$options = Object.create(vm.constructor.options);
  7847. // doing this because it's faster than dynamic enumeration.
  7848. var parentVnode = options._parentVnode;
  7849. opts.parent = options.parent;
  7850. opts._parentVnode = parentVnode;
  7851. var vnodeComponentOptions = parentVnode.componentOptions;
  7852. opts.propsData = vnodeComponentOptions.propsData;
  7853. opts._parentListeners = vnodeComponentOptions.listeners;
  7854. opts._renderChildren = vnodeComponentOptions.children;
  7855. opts._componentTag = vnodeComponentOptions.tag;
  7856. if (options.render) {
  7857. opts.render = options.render;
  7858. opts.staticRenderFns = options.staticRenderFns;
  7859. }
  7860. }
  7861. function resolveConstructorOptions (Ctor) {
  7862. var options = Ctor.options;
  7863. if (Ctor.super) {
  7864. var superOptions = resolveConstructorOptions(Ctor.super);
  7865. var cachedSuperOptions = Ctor.superOptions;
  7866. if (superOptions !== cachedSuperOptions) {
  7867. // super option changed,
  7868. // need to resolve new options.
  7869. Ctor.superOptions = superOptions;
  7870. // check if there are any late-modified/attached options (#4976)
  7871. var modifiedOptions = resolveModifiedOptions(Ctor);
  7872. // update base extend options
  7873. if (modifiedOptions) {
  7874. extend(Ctor.extendOptions, modifiedOptions);
  7875. }
  7876. options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions);
  7877. if (options.name) {
  7878. options.components[options.name] = Ctor;
  7879. }
  7880. }
  7881. }
  7882. return options
  7883. }
  7884. function resolveModifiedOptions (Ctor) {
  7885. var modified;
  7886. var latest = Ctor.options;
  7887. var sealed = Ctor.sealedOptions;
  7888. for (var key in latest) {
  7889. if (latest[key] !== sealed[key]) {
  7890. if (!modified) { modified = {}; }
  7891. modified[key] = latest[key];
  7892. }
  7893. }
  7894. return modified
  7895. }
  7896. function Vue (options) {
  7897. if ( true &&
  7898. !(this instanceof Vue)
  7899. ) {
  7900. warn('Vue is a constructor and should be called with the `new` keyword');
  7901. }
  7902. this._init(options);
  7903. }
  7904. initMixin(Vue);
  7905. stateMixin(Vue);
  7906. eventsMixin(Vue);
  7907. lifecycleMixin(Vue);
  7908. renderMixin(Vue);
  7909. /* */
  7910. function initUse (Vue) {
  7911. Vue.use = function (plugin) {
  7912. var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
  7913. if (installedPlugins.indexOf(plugin) > -1) {
  7914. return this
  7915. }
  7916. // additional parameters
  7917. var args = toArray(arguments, 1);
  7918. args.unshift(this);
  7919. if (typeof plugin.install === 'function') {
  7920. plugin.install.apply(plugin, args);
  7921. } else if (typeof plugin === 'function') {
  7922. plugin.apply(null, args);
  7923. }
  7924. installedPlugins.push(plugin);
  7925. return this
  7926. };
  7927. }
  7928. /* */
  7929. function initMixin$1 (Vue) {
  7930. Vue.mixin = function (mixin) {
  7931. this.options = mergeOptions(this.options, mixin);
  7932. return this
  7933. };
  7934. }
  7935. /* */
  7936. function initExtend (Vue) {
  7937. /**
  7938. * Each instance constructor, including Vue, has a unique
  7939. * cid. This enables us to create wrapped "child
  7940. * constructors" for prototypal inheritance and cache them.
  7941. */
  7942. Vue.cid = 0;
  7943. var cid = 1;
  7944. /**
  7945. * Class inheritance
  7946. */
  7947. Vue.extend = function (extendOptions) {
  7948. extendOptions = extendOptions || {};
  7949. var Super = this;
  7950. var SuperId = Super.cid;
  7951. var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {});
  7952. if (cachedCtors[SuperId]) {
  7953. return cachedCtors[SuperId]
  7954. }
  7955. var name = extendOptions.name || Super.options.name;
  7956. if ( true && name) {
  7957. validateComponentName(name);
  7958. }
  7959. var Sub = function VueComponent (options) {
  7960. this._init(options);
  7961. };
  7962. Sub.prototype = Object.create(Super.prototype);
  7963. Sub.prototype.constructor = Sub;
  7964. Sub.cid = cid++;
  7965. Sub.options = mergeOptions(
  7966. Super.options,
  7967. extendOptions
  7968. );
  7969. Sub['super'] = Super;
  7970. // For props and computed properties, we define the proxy getters on
  7971. // the Vue instances at extension time, on the extended prototype. This
  7972. // avoids Object.defineProperty calls for each instance created.
  7973. if (Sub.options.props) {
  7974. initProps$1(Sub);
  7975. }
  7976. if (Sub.options.computed) {
  7977. initComputed$1(Sub);
  7978. }
  7979. // allow further extension/mixin/plugin usage
  7980. Sub.extend = Super.extend;
  7981. Sub.mixin = Super.mixin;
  7982. Sub.use = Super.use;
  7983. // create asset registers, so extended classes
  7984. // can have their private assets too.
  7985. ASSET_TYPES.forEach(function (type) {
  7986. Sub[type] = Super[type];
  7987. });
  7988. // enable recursive self-lookup
  7989. if (name) {
  7990. Sub.options.components[name] = Sub;
  7991. }
  7992. // keep a reference to the super options at extension time.
  7993. // later at instantiation we can check if Super's options have
  7994. // been updated.
  7995. Sub.superOptions = Super.options;
  7996. Sub.extendOptions = extendOptions;
  7997. Sub.sealedOptions = extend({}, Sub.options);
  7998. // cache constructor
  7999. cachedCtors[SuperId] = Sub;
  8000. return Sub
  8001. };
  8002. }
  8003. function initProps$1 (Comp) {
  8004. var props = Comp.options.props;
  8005. for (var key in props) {
  8006. proxy(Comp.prototype, "_props", key);
  8007. }
  8008. }
  8009. function initComputed$1 (Comp) {
  8010. var computed = Comp.options.computed;
  8011. for (var key in computed) {
  8012. defineComputed(Comp.prototype, key, computed[key]);
  8013. }
  8014. }
  8015. /* */
  8016. function initAssetRegisters (Vue) {
  8017. /**
  8018. * Create asset registration methods.
  8019. */
  8020. ASSET_TYPES.forEach(function (type) {
  8021. Vue[type] = function (
  8022. id,
  8023. definition
  8024. ) {
  8025. if (!definition) {
  8026. return this.options[type + 's'][id]
  8027. } else {
  8028. /* istanbul ignore if */
  8029. if ( true && type === 'component') {
  8030. validateComponentName(id);
  8031. }
  8032. if (type === 'component' && isPlainObject(definition)) {
  8033. definition.name = definition.name || id;
  8034. definition = this.options._base.extend(definition);
  8035. }
  8036. if (type === 'directive' && typeof definition === 'function') {
  8037. definition = { bind: definition, update: definition };
  8038. }
  8039. this.options[type + 's'][id] = definition;
  8040. return definition
  8041. }
  8042. };
  8043. });
  8044. }
  8045. /* */
  8046. function getComponentName (opts) {
  8047. return opts && (opts.Ctor.options.name || opts.tag)
  8048. }
  8049. function matches (pattern, name) {
  8050. if (Array.isArray(pattern)) {
  8051. return pattern.indexOf(name) > -1
  8052. } else if (typeof pattern === 'string') {
  8053. return pattern.split(',').indexOf(name) > -1
  8054. } else if (isRegExp(pattern)) {
  8055. return pattern.test(name)
  8056. }
  8057. /* istanbul ignore next */
  8058. return false
  8059. }
  8060. function pruneCache (keepAliveInstance, filter) {
  8061. var cache = keepAliveInstance.cache;
  8062. var keys = keepAliveInstance.keys;
  8063. var _vnode = keepAliveInstance._vnode;
  8064. for (var key in cache) {
  8065. var cachedNode = cache[key];
  8066. if (cachedNode) {
  8067. var name = getComponentName(cachedNode.componentOptions);
  8068. if (name && !filter(name)) {
  8069. pruneCacheEntry(cache, key, keys, _vnode);
  8070. }
  8071. }
  8072. }
  8073. }
  8074. function pruneCacheEntry (
  8075. cache,
  8076. key,
  8077. keys,
  8078. current
  8079. ) {
  8080. var cached$$1 = cache[key];
  8081. if (cached$$1 && (!current || cached$$1.tag !== current.tag)) {
  8082. cached$$1.componentInstance.$destroy();
  8083. }
  8084. cache[key] = null;
  8085. remove(keys, key);
  8086. }
  8087. var patternTypes = [String, RegExp, Array];
  8088. var KeepAlive = {
  8089. name: 'keep-alive',
  8090. abstract: true,
  8091. props: {
  8092. include: patternTypes,
  8093. exclude: patternTypes,
  8094. max: [String, Number]
  8095. },
  8096. created: function created () {
  8097. this.cache = Object.create(null);
  8098. this.keys = [];
  8099. },
  8100. destroyed: function destroyed () {
  8101. for (var key in this.cache) {
  8102. pruneCacheEntry(this.cache, key, this.keys);
  8103. }
  8104. },
  8105. mounted: function mounted () {
  8106. var this$1 = this;
  8107. this.$watch('include', function (val) {
  8108. pruneCache(this$1, function (name) { return matches(val, name); });
  8109. });
  8110. this.$watch('exclude', function (val) {
  8111. pruneCache(this$1, function (name) { return !matches(val, name); });
  8112. });
  8113. },
  8114. render: function render () {
  8115. var slot = this.$slots.default;
  8116. var vnode = getFirstComponentChild(slot);
  8117. var componentOptions = vnode && vnode.componentOptions;
  8118. if (componentOptions) {
  8119. // check pattern
  8120. var name = getComponentName(componentOptions);
  8121. var ref = this;
  8122. var include = ref.include;
  8123. var exclude = ref.exclude;
  8124. if (
  8125. // not included
  8126. (include && (!name || !matches(include, name))) ||
  8127. // excluded
  8128. (exclude && name && matches(exclude, name))
  8129. ) {
  8130. return vnode
  8131. }
  8132. var ref$1 = this;
  8133. var cache = ref$1.cache;
  8134. var keys = ref$1.keys;
  8135. var key = vnode.key == null
  8136. // same constructor may get registered as different local components
  8137. // so cid alone is not enough (#3269)
  8138. ? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '')
  8139. : vnode.key;
  8140. if (cache[key]) {
  8141. vnode.componentInstance = cache[key].componentInstance;
  8142. // make current key freshest
  8143. remove(keys, key);
  8144. keys.push(key);
  8145. } else {
  8146. cache[key] = vnode;
  8147. keys.push(key);
  8148. // prune oldest entry
  8149. if (this.max && keys.length > parseInt(this.max)) {
  8150. pruneCacheEntry(cache, keys[0], keys, this._vnode);
  8151. }
  8152. }
  8153. vnode.data.keepAlive = true;
  8154. }
  8155. return vnode || (slot && slot[0])
  8156. }
  8157. };
  8158. var builtInComponents = {
  8159. KeepAlive: KeepAlive
  8160. };
  8161. /* */
  8162. function initGlobalAPI (Vue) {
  8163. // config
  8164. var configDef = {};
  8165. configDef.get = function () { return config; };
  8166. if (true) {
  8167. configDef.set = function () {
  8168. warn(
  8169. 'Do not replace the Vue.config object, set individual fields instead.'
  8170. );
  8171. };
  8172. }
  8173. Object.defineProperty(Vue, 'config', configDef);
  8174. // exposed util methods.
  8175. // NOTE: these are not considered part of the public API - avoid relying on
  8176. // them unless you are aware of the risk.
  8177. Vue.util = {
  8178. warn: warn,
  8179. extend: extend,
  8180. mergeOptions: mergeOptions,
  8181. defineReactive: defineReactive$$1
  8182. };
  8183. Vue.set = set;
  8184. Vue.delete = del;
  8185. Vue.nextTick = nextTick;
  8186. // 2.6 explicit observable API
  8187. Vue.observable = function (obj) {
  8188. observe(obj);
  8189. return obj
  8190. };
  8191. Vue.options = Object.create(null);
  8192. ASSET_TYPES.forEach(function (type) {
  8193. Vue.options[type + 's'] = Object.create(null);
  8194. });
  8195. // this is used to identify the "base" constructor to extend all plain-object
  8196. // components with in Weex's multi-instance scenarios.
  8197. Vue.options._base = Vue;
  8198. extend(Vue.options.components, builtInComponents);
  8199. initUse(Vue);
  8200. initMixin$1(Vue);
  8201. initExtend(Vue);
  8202. initAssetRegisters(Vue);
  8203. }
  8204. initGlobalAPI(Vue);
  8205. Object.defineProperty(Vue.prototype, '$isServer', {
  8206. get: isServerRendering
  8207. });
  8208. Object.defineProperty(Vue.prototype, '$ssrContext', {
  8209. get: function get () {
  8210. /* istanbul ignore next */
  8211. return this.$vnode && this.$vnode.ssrContext
  8212. }
  8213. });
  8214. // expose FunctionalRenderContext for ssr runtime helper installation
  8215. Object.defineProperty(Vue, 'FunctionalRenderContext', {
  8216. value: FunctionalRenderContext
  8217. });
  8218. Vue.version = '2.6.11';
  8219. /**
  8220. * https://raw.githubusercontent.com/Tencent/westore/master/packages/westore/utils/diff.js
  8221. */
  8222. var ARRAYTYPE = '[object Array]';
  8223. var OBJECTTYPE = '[object Object]';
  8224. var NULLTYPE = '[object Null]';
  8225. var UNDEFINEDTYPE = '[object Undefined]';
  8226. // const FUNCTIONTYPE = '[object Function]'
  8227. function diff(current, pre) {
  8228. var result = {};
  8229. syncKeys(current, pre);
  8230. _diff(current, pre, '', result);
  8231. return result
  8232. }
  8233. function syncKeys(current, pre) {
  8234. if (current === pre) { return }
  8235. var rootCurrentType = type(current);
  8236. var rootPreType = type(pre);
  8237. if (rootCurrentType == OBJECTTYPE && rootPreType == OBJECTTYPE) {
  8238. if(Object.keys(current).length >= Object.keys(pre).length){
  8239. for (var key in pre) {
  8240. var currentValue = current[key];
  8241. if (currentValue === undefined) {
  8242. current[key] = null;
  8243. } else {
  8244. syncKeys(currentValue, pre[key]);
  8245. }
  8246. }
  8247. }
  8248. } else if (rootCurrentType == ARRAYTYPE && rootPreType == ARRAYTYPE) {
  8249. if (current.length >= pre.length) {
  8250. pre.forEach(function (item, index) {
  8251. syncKeys(current[index], item);
  8252. });
  8253. }
  8254. }
  8255. }
  8256. function nullOrUndefined(currentType, preType) {
  8257. if(
  8258. (currentType === NULLTYPE || currentType === UNDEFINEDTYPE) &&
  8259. (preType === NULLTYPE || preType === UNDEFINEDTYPE)
  8260. ) {
  8261. return false
  8262. }
  8263. return true
  8264. }
  8265. function _diff(current, pre, path, result) {
  8266. if (current === pre) { return }
  8267. var rootCurrentType = type(current);
  8268. var rootPreType = type(pre);
  8269. if (rootCurrentType == OBJECTTYPE) {
  8270. if (rootPreType != OBJECTTYPE || Object.keys(current).length < Object.keys(pre).length) {
  8271. setResult(result, path, current);
  8272. } else {
  8273. var loop = function ( key ) {
  8274. var currentValue = current[key];
  8275. var preValue = pre[key];
  8276. var currentType = type(currentValue);
  8277. var preType = type(preValue);
  8278. if (currentType != ARRAYTYPE && currentType != OBJECTTYPE) {
  8279. if (currentValue !== pre[key] && nullOrUndefined(currentType, preType)) {
  8280. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8281. }
  8282. } else if (currentType == ARRAYTYPE) {
  8283. if (preType != ARRAYTYPE) {
  8284. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8285. } else {
  8286. if (currentValue.length < preValue.length) {
  8287. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8288. } else {
  8289. currentValue.forEach(function (item, index) {
  8290. _diff(item, preValue[index], (path == '' ? '' : path + ".") + key + '[' + index + ']', result);
  8291. });
  8292. }
  8293. }
  8294. } else if (currentType == OBJECTTYPE) {
  8295. if (preType != OBJECTTYPE || Object.keys(currentValue).length < Object.keys(preValue).length) {
  8296. setResult(result, (path == '' ? '' : path + ".") + key, currentValue);
  8297. } else {
  8298. for (var subKey in currentValue) {
  8299. _diff(currentValue[subKey], preValue[subKey], (path == '' ? '' : path + ".") + key + '.' + subKey, result);
  8300. }
  8301. }
  8302. }
  8303. };
  8304. for (var key in current) loop( key );
  8305. }
  8306. } else if (rootCurrentType == ARRAYTYPE) {
  8307. if (rootPreType != ARRAYTYPE) {
  8308. setResult(result, path, current);
  8309. } else {
  8310. if (current.length < pre.length) {
  8311. setResult(result, path, current);
  8312. } else {
  8313. current.forEach(function (item, index) {
  8314. _diff(item, pre[index], path + '[' + index + ']', result);
  8315. });
  8316. }
  8317. }
  8318. } else {
  8319. setResult(result, path, current);
  8320. }
  8321. }
  8322. function setResult(result, k, v) {
  8323. // if (type(v) != FUNCTIONTYPE) {
  8324. result[k] = v;
  8325. // }
  8326. }
  8327. function type(obj) {
  8328. return Object.prototype.toString.call(obj)
  8329. }
  8330. /* */
  8331. function flushCallbacks$1(vm) {
  8332. if (vm.__next_tick_callbacks && vm.__next_tick_callbacks.length) {
  8333. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"阿斯利康码头管理","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8334. var mpInstance = vm.$scope;
  8335. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8336. ']:flushCallbacks[' + vm.__next_tick_callbacks.length + ']');
  8337. }
  8338. var copies = vm.__next_tick_callbacks.slice(0);
  8339. vm.__next_tick_callbacks.length = 0;
  8340. for (var i = 0; i < copies.length; i++) {
  8341. copies[i]();
  8342. }
  8343. }
  8344. }
  8345. function hasRenderWatcher(vm) {
  8346. return queue.find(function (watcher) { return vm._watcher === watcher; })
  8347. }
  8348. function nextTick$1(vm, cb) {
  8349. //1.nextTick 之前 已 setData 且 setData 还未回调完成
  8350. //2.nextTick 之前存在 render watcher
  8351. if (!vm.__next_tick_pending && !hasRenderWatcher(vm)) {
  8352. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"阿斯利康码头管理","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8353. var mpInstance = vm.$scope;
  8354. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + vm._uid +
  8355. ']:nextVueTick');
  8356. }
  8357. return nextTick(cb, vm)
  8358. }else{
  8359. if(Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"阿斯利康码头管理","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG){
  8360. var mpInstance$1 = vm.$scope;
  8361. console.log('[' + (+new Date) + '][' + (mpInstance$1.is || mpInstance$1.route) + '][' + vm._uid +
  8362. ']:nextMPTick');
  8363. }
  8364. }
  8365. var _resolve;
  8366. if (!vm.__next_tick_callbacks) {
  8367. vm.__next_tick_callbacks = [];
  8368. }
  8369. vm.__next_tick_callbacks.push(function () {
  8370. if (cb) {
  8371. try {
  8372. cb.call(vm);
  8373. } catch (e) {
  8374. handleError(e, vm, 'nextTick');
  8375. }
  8376. } else if (_resolve) {
  8377. _resolve(vm);
  8378. }
  8379. });
  8380. // $flow-disable-line
  8381. if (!cb && typeof Promise !== 'undefined') {
  8382. return new Promise(function (resolve) {
  8383. _resolve = resolve;
  8384. })
  8385. }
  8386. }
  8387. /* */
  8388. function clearInstance(key, value) {
  8389. // 简易去除 Vue 和小程序组件实例
  8390. if (value) {
  8391. if (value._isVue || value.__v_isMPComponent) {
  8392. return {}
  8393. }
  8394. }
  8395. return value
  8396. }
  8397. function cloneWithData(vm) {
  8398. // 确保当前 vm 所有数据被同步
  8399. var ret = Object.create(null);
  8400. var dataKeys = [].concat(
  8401. Object.keys(vm._data || {}),
  8402. Object.keys(vm._computedWatchers || {}));
  8403. dataKeys.reduce(function(ret, key) {
  8404. ret[key] = vm[key];
  8405. return ret
  8406. }, ret);
  8407. // vue-composition-api
  8408. var compositionApiState = vm.__composition_api_state__ || vm.__secret_vfa_state__;
  8409. var rawBindings = compositionApiState && compositionApiState.rawBindings;
  8410. if (rawBindings) {
  8411. Object.keys(rawBindings).forEach(function (key) {
  8412. ret[key] = vm[key];
  8413. });
  8414. }
  8415. //TODO 需要把无用数据处理掉,比如 list=>l0 则 list 需要移除,否则多传输一份数据
  8416. Object.assign(ret, vm.$mp.data || {});
  8417. if (
  8418. Array.isArray(vm.$options.behaviors) &&
  8419. vm.$options.behaviors.indexOf('uni://form-field') !== -1
  8420. ) { //form-field
  8421. ret['name'] = vm.name;
  8422. ret['value'] = vm.value;
  8423. }
  8424. return JSON.parse(JSON.stringify(ret, clearInstance))
  8425. }
  8426. var patch = function(oldVnode, vnode) {
  8427. var this$1 = this;
  8428. if (vnode === null) { //destroy
  8429. return
  8430. }
  8431. if (this.mpType === 'page' || this.mpType === 'component') {
  8432. var mpInstance = this.$scope;
  8433. var data = Object.create(null);
  8434. try {
  8435. data = cloneWithData(this);
  8436. } catch (err) {
  8437. console.error(err);
  8438. }
  8439. data.__webviewId__ = mpInstance.data.__webviewId__;
  8440. var mpData = Object.create(null);
  8441. Object.keys(data).forEach(function (key) { //仅同步 data 中有的数据
  8442. mpData[key] = mpInstance.data[key];
  8443. });
  8444. var diffData = this.$shouldDiffData === false ? data : diff(data, mpData);
  8445. if (Object.keys(diffData).length) {
  8446. if (Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"阿斯利康码头管理","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}).VUE_APP_DEBUG) {
  8447. console.log('[' + (+new Date) + '][' + (mpInstance.is || mpInstance.route) + '][' + this._uid +
  8448. ']差量更新',
  8449. JSON.stringify(diffData));
  8450. }
  8451. this.__next_tick_pending = true;
  8452. mpInstance.setData(diffData, function () {
  8453. this$1.__next_tick_pending = false;
  8454. flushCallbacks$1(this$1);
  8455. });
  8456. } else {
  8457. flushCallbacks$1(this);
  8458. }
  8459. }
  8460. };
  8461. /* */
  8462. function createEmptyRender() {
  8463. }
  8464. function mountComponent$1(
  8465. vm,
  8466. el,
  8467. hydrating
  8468. ) {
  8469. if (!vm.mpType) {//main.js 中的 new Vue
  8470. return vm
  8471. }
  8472. if (vm.mpType === 'app') {
  8473. vm.$options.render = createEmptyRender;
  8474. }
  8475. if (!vm.$options.render) {
  8476. vm.$options.render = createEmptyRender;
  8477. if (true) {
  8478. /* istanbul ignore if */
  8479. if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') ||
  8480. vm.$options.el || el) {
  8481. warn(
  8482. 'You are using the runtime-only build of Vue where the template ' +
  8483. 'compiler is not available. Either pre-compile the templates into ' +
  8484. 'render functions, or use the compiler-included build.',
  8485. vm
  8486. );
  8487. } else {
  8488. warn(
  8489. 'Failed to mount component: template or render function not defined.',
  8490. vm
  8491. );
  8492. }
  8493. }
  8494. }
  8495. !vm._$fallback && callHook(vm, 'beforeMount');
  8496. var updateComponent = function () {
  8497. vm._update(vm._render(), hydrating);
  8498. };
  8499. // we set this to vm._watcher inside the watcher's constructor
  8500. // since the watcher's initial patch may call $forceUpdate (e.g. inside child
  8501. // component's mounted hook), which relies on vm._watcher being already defined
  8502. new Watcher(vm, updateComponent, noop, {
  8503. before: function before() {
  8504. if (vm._isMounted && !vm._isDestroyed) {
  8505. callHook(vm, 'beforeUpdate');
  8506. }
  8507. }
  8508. }, true /* isRenderWatcher */);
  8509. hydrating = false;
  8510. return vm
  8511. }
  8512. /* */
  8513. function renderClass (
  8514. staticClass,
  8515. dynamicClass
  8516. ) {
  8517. if (isDef(staticClass) || isDef(dynamicClass)) {
  8518. return concat(staticClass, stringifyClass(dynamicClass))
  8519. }
  8520. /* istanbul ignore next */
  8521. return ''
  8522. }
  8523. function concat (a, b) {
  8524. return a ? b ? (a + ' ' + b) : a : (b || '')
  8525. }
  8526. function stringifyClass (value) {
  8527. if (Array.isArray(value)) {
  8528. return stringifyArray(value)
  8529. }
  8530. if (isObject(value)) {
  8531. return stringifyObject(value)
  8532. }
  8533. if (typeof value === 'string') {
  8534. return value
  8535. }
  8536. /* istanbul ignore next */
  8537. return ''
  8538. }
  8539. function stringifyArray (value) {
  8540. var res = '';
  8541. var stringified;
  8542. for (var i = 0, l = value.length; i < l; i++) {
  8543. if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
  8544. if (res) { res += ' '; }
  8545. res += stringified;
  8546. }
  8547. }
  8548. return res
  8549. }
  8550. function stringifyObject (value) {
  8551. var res = '';
  8552. for (var key in value) {
  8553. if (value[key]) {
  8554. if (res) { res += ' '; }
  8555. res += key;
  8556. }
  8557. }
  8558. return res
  8559. }
  8560. /* */
  8561. var parseStyleText = cached(function (cssText) {
  8562. var res = {};
  8563. var listDelimiter = /;(?![^(]*\))/g;
  8564. var propertyDelimiter = /:(.+)/;
  8565. cssText.split(listDelimiter).forEach(function (item) {
  8566. if (item) {
  8567. var tmp = item.split(propertyDelimiter);
  8568. tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim());
  8569. }
  8570. });
  8571. return res
  8572. });
  8573. // normalize possible array / string values into Object
  8574. function normalizeStyleBinding (bindingStyle) {
  8575. if (Array.isArray(bindingStyle)) {
  8576. return toObject(bindingStyle)
  8577. }
  8578. if (typeof bindingStyle === 'string') {
  8579. return parseStyleText(bindingStyle)
  8580. }
  8581. return bindingStyle
  8582. }
  8583. /* */
  8584. var MP_METHODS = ['createSelectorQuery', 'createIntersectionObserver', 'selectAllComponents', 'selectComponent'];
  8585. function getTarget(obj, path) {
  8586. var parts = path.split('.');
  8587. var key = parts[0];
  8588. if (key.indexOf('__$n') === 0) { //number index
  8589. key = parseInt(key.replace('__$n', ''));
  8590. }
  8591. if (parts.length === 1) {
  8592. return obj[key]
  8593. }
  8594. return getTarget(obj[key], parts.slice(1).join('.'))
  8595. }
  8596. function internalMixin(Vue) {
  8597. Vue.config.errorHandler = function(err, vm, info) {
  8598. Vue.util.warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm);
  8599. console.error(err);
  8600. /* eslint-disable no-undef */
  8601. var app = typeof getApp === 'function' && getApp();
  8602. if (app && app.onError) {
  8603. app.onError(err);
  8604. }
  8605. };
  8606. var oldEmit = Vue.prototype.$emit;
  8607. Vue.prototype.$emit = function(event) {
  8608. if (this.$scope && event) {
  8609. var triggerEvent = this.$scope['_triggerEvent'] || this.$scope['triggerEvent'];
  8610. if (triggerEvent) {
  8611. try {
  8612. triggerEvent.call(this.$scope, event, {
  8613. __args__: toArray(arguments, 1)
  8614. });
  8615. } catch (error) {
  8616. }
  8617. }
  8618. }
  8619. return oldEmit.apply(this, arguments)
  8620. };
  8621. Vue.prototype.$nextTick = function(fn) {
  8622. return nextTick$1(this, fn)
  8623. };
  8624. MP_METHODS.forEach(function (method) {
  8625. Vue.prototype[method] = function(args) {
  8626. if (this.$scope && this.$scope[method]) {
  8627. return this.$scope[method](args)
  8628. }
  8629. // mp-alipay
  8630. if (typeof my === 'undefined') {
  8631. return
  8632. }
  8633. if (method === 'createSelectorQuery') {
  8634. /* eslint-disable no-undef */
  8635. return my.createSelectorQuery(args)
  8636. } else if (method === 'createIntersectionObserver') {
  8637. /* eslint-disable no-undef */
  8638. return my.createIntersectionObserver(args)
  8639. }
  8640. // TODO mp-alipay 暂不支持 selectAllComponents,selectComponent
  8641. };
  8642. });
  8643. Vue.prototype.__init_provide = initProvide;
  8644. Vue.prototype.__init_injections = initInjections;
  8645. Vue.prototype.__call_hook = function(hook, args) {
  8646. var vm = this;
  8647. // #7573 disable dep collection when invoking lifecycle hooks
  8648. pushTarget();
  8649. var handlers = vm.$options[hook];
  8650. var info = hook + " hook";
  8651. var ret;
  8652. if (handlers) {
  8653. for (var i = 0, j = handlers.length; i < j; i++) {
  8654. ret = invokeWithErrorHandling(handlers[i], vm, args ? [args] : null, vm, info);
  8655. }
  8656. }
  8657. if (vm._hasHookEvent) {
  8658. vm.$emit('hook:' + hook, args);
  8659. }
  8660. popTarget();
  8661. return ret
  8662. };
  8663. Vue.prototype.__set_model = function(target, key, value, modifiers) {
  8664. if (Array.isArray(modifiers)) {
  8665. if (modifiers.indexOf('trim') !== -1) {
  8666. value = value.trim();
  8667. }
  8668. if (modifiers.indexOf('number') !== -1) {
  8669. value = this._n(value);
  8670. }
  8671. }
  8672. if (!target) {
  8673. target = this;
  8674. }
  8675. // 解决动态属性添加
  8676. Vue.set(target, key, value);
  8677. };
  8678. Vue.prototype.__set_sync = function(target, key, value) {
  8679. if (!target) {
  8680. target = this;
  8681. }
  8682. // 解决动态属性添加
  8683. Vue.set(target, key, value);
  8684. };
  8685. Vue.prototype.__get_orig = function(item) {
  8686. if (isPlainObject(item)) {
  8687. return item['$orig'] || item
  8688. }
  8689. return item
  8690. };
  8691. Vue.prototype.__get_value = function(dataPath, target) {
  8692. return getTarget(target || this, dataPath)
  8693. };
  8694. Vue.prototype.__get_class = function(dynamicClass, staticClass) {
  8695. return renderClass(staticClass, dynamicClass)
  8696. };
  8697. Vue.prototype.__get_style = function(dynamicStyle, staticStyle) {
  8698. if (!dynamicStyle && !staticStyle) {
  8699. return ''
  8700. }
  8701. var dynamicStyleObj = normalizeStyleBinding(dynamicStyle);
  8702. var styleObj = staticStyle ? extend(staticStyle, dynamicStyleObj) : dynamicStyleObj;
  8703. return Object.keys(styleObj).map(function (name) { return ((hyphenate(name)) + ":" + (styleObj[name])); }).join(';')
  8704. };
  8705. Vue.prototype.__map = function(val, iteratee) {
  8706. //TODO 暂不考虑 string
  8707. var ret, i, l, keys, key;
  8708. if (Array.isArray(val)) {
  8709. ret = new Array(val.length);
  8710. for (i = 0, l = val.length; i < l; i++) {
  8711. ret[i] = iteratee(val[i], i);
  8712. }
  8713. return ret
  8714. } else if (isObject(val)) {
  8715. keys = Object.keys(val);
  8716. ret = Object.create(null);
  8717. for (i = 0, l = keys.length; i < l; i++) {
  8718. key = keys[i];
  8719. ret[key] = iteratee(val[key], key, i);
  8720. }
  8721. return ret
  8722. } else if (typeof val === 'number') {
  8723. ret = new Array(val);
  8724. for (i = 0, l = val; i < l; i++) {
  8725. // 第一个参数暂时仍和小程序一致
  8726. ret[i] = iteratee(i, i);
  8727. }
  8728. return ret
  8729. }
  8730. return []
  8731. };
  8732. }
  8733. /* */
  8734. var LIFECYCLE_HOOKS$1 = [
  8735. //App
  8736. 'onLaunch',
  8737. 'onShow',
  8738. 'onHide',
  8739. 'onUniNViewMessage',
  8740. 'onPageNotFound',
  8741. 'onThemeChange',
  8742. 'onError',
  8743. 'onUnhandledRejection',
  8744. //Page
  8745. 'onInit',
  8746. 'onLoad',
  8747. // 'onShow',
  8748. 'onReady',
  8749. // 'onHide',
  8750. 'onUnload',
  8751. 'onPullDownRefresh',
  8752. 'onReachBottom',
  8753. 'onTabItemTap',
  8754. 'onAddToFavorites',
  8755. 'onShareTimeline',
  8756. 'onShareAppMessage',
  8757. 'onResize',
  8758. 'onPageScroll',
  8759. 'onNavigationBarButtonTap',
  8760. 'onBackPress',
  8761. 'onNavigationBarSearchInputChanged',
  8762. 'onNavigationBarSearchInputConfirmed',
  8763. 'onNavigationBarSearchInputClicked',
  8764. 'onUploadDouyinVideo',
  8765. 'onNFCReadMessage',
  8766. //Component
  8767. // 'onReady', // 兼容旧版本,应该移除该事件
  8768. 'onPageShow',
  8769. 'onPageHide',
  8770. 'onPageResize'
  8771. ];
  8772. function lifecycleMixin$1(Vue) {
  8773. //fixed vue-class-component
  8774. var oldExtend = Vue.extend;
  8775. Vue.extend = function(extendOptions) {
  8776. extendOptions = extendOptions || {};
  8777. var methods = extendOptions.methods;
  8778. if (methods) {
  8779. Object.keys(methods).forEach(function (methodName) {
  8780. if (LIFECYCLE_HOOKS$1.indexOf(methodName)!==-1) {
  8781. extendOptions[methodName] = methods[methodName];
  8782. delete methods[methodName];
  8783. }
  8784. });
  8785. }
  8786. return oldExtend.call(this, extendOptions)
  8787. };
  8788. var strategies = Vue.config.optionMergeStrategies;
  8789. var mergeHook = strategies.created;
  8790. LIFECYCLE_HOOKS$1.forEach(function (hook) {
  8791. strategies[hook] = mergeHook;
  8792. });
  8793. Vue.prototype.__lifecycle_hooks__ = LIFECYCLE_HOOKS$1;
  8794. }
  8795. /* */
  8796. // install platform patch function
  8797. Vue.prototype.__patch__ = patch;
  8798. // public mount method
  8799. Vue.prototype.$mount = function(
  8800. el ,
  8801. hydrating
  8802. ) {
  8803. return mountComponent$1(this, el, hydrating)
  8804. };
  8805. lifecycleMixin$1(Vue);
  8806. internalMixin(Vue);
  8807. /* */
  8808. /* harmony default export */ __webpack_exports__["default"] = (Vue);
  8809. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  8810. /***/ }),
  8811. /* 26 */
  8812. /*!************************************************************!*\
  8813. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages.json ***!
  8814. \************************************************************/
  8815. /*! no static exports found */
  8816. /***/ (function(module, exports) {
  8817. /***/ }),
  8818. /* 27 */
  8819. /*!*******************************************************************!*\
  8820. !*** ./node_modules/@dcloudio/uni-stat/dist/uni-cloud-stat.es.js ***!
  8821. \*******************************************************************/
  8822. /*! no static exports found */
  8823. /***/ (function(module, exports, __webpack_require__) {
  8824. /* WEBPACK VAR INJECTION */(function(uni, uniCloud) {var _inherits = __webpack_require__(/*! @babel/runtime/helpers/inherits */ 33);
  8825. var _possibleConstructorReturn = __webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 34);
  8826. var _getPrototypeOf = __webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 35);
  8827. var _classCallCheck = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23);
  8828. var _createClass = __webpack_require__(/*! @babel/runtime/helpers/createClass */ 24);
  8829. var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ 13);
  8830. var _defineProperty = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11);
  8831. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
  8832. 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; } }
  8833. /**
  8834. * 获取系统信息
  8835. */
  8836. var sys = uni.getSystemInfoSync();
  8837. // 访问开始即启动小程序,访问结束结分为:进入后台超过5min、在前台无任何操作超过30min、在新的来源打开小程序;
  8838. var STAT_VERSION = "3.98";
  8839. var STAT_URL = 'https://tongji.dcloud.io/uni/stat';
  8840. var STAT_H5_URL = 'https://tongji.dcloud.io/uni/stat.gif';
  8841. var PAGE_PVER_TIME = 1800; // 页面在前台无操作结束访问时间 单位s
  8842. var APP_PVER_TIME = 300; // 应用在后台结束访问时间 单位s
  8843. var OPERATING_TIME = 10; // 数据上报时间 单位s
  8844. var DIFF_TIME = 60 * 1000 * 60 * 24;
  8845. var appid = "__UNI__8C5F0F6"; // 做应用隔离
  8846. var dbSet = function dbSet(name, value) {
  8847. var data = uni.getStorageSync('$$STAT__DBDATA:' + appid) || {};
  8848. if (!data) {
  8849. data = {};
  8850. }
  8851. data[name] = value;
  8852. uni.setStorageSync('$$STAT__DBDATA:' + appid, data);
  8853. };
  8854. var dbGet = function dbGet(name) {
  8855. var data = uni.getStorageSync('$$STAT__DBDATA:' + appid) || {};
  8856. if (!data[name]) {
  8857. var dbdata = uni.getStorageSync('$$STAT__DBDATA:' + appid);
  8858. if (!dbdata) {
  8859. dbdata = {};
  8860. }
  8861. if (!dbdata[name]) {
  8862. return undefined;
  8863. }
  8864. data[name] = dbdata[name];
  8865. }
  8866. return data[name];
  8867. };
  8868. var dbRemove = function dbRemove(name) {
  8869. var data = uni.getStorageSync('$$STAT__DBDATA:' + appid) || {};
  8870. if (data[name]) {
  8871. delete data[name];
  8872. uni.setStorageSync('$$STAT__DBDATA:' + appid, data);
  8873. } else {
  8874. data = uni.getStorageSync('$$STAT__DBDATA:' + appid);
  8875. if (data[name]) {
  8876. delete data[name];
  8877. uni.setStorageSync('$$STAT__DBDATA:' + appid, data);
  8878. }
  8879. }
  8880. };
  8881. // 获取 manifest.json 中统计配置
  8882. var uniStatisticsConfig = {"version":"2","enable":true};
  8883. var statConfig = {
  8884. appid: "__UNI__8C5F0F6"
  8885. };
  8886. var titleJsons = {};
  8887. var debug = false || false;
  8888. // eslint-disable-next-line no-restricted-globals
  8889. var pagesTitle = __webpack_require__(/*! uni-pages?{"type":"style"} */ 40).default;
  8890. var pagesData = pagesTitle.pages;
  8891. for (var i in pagesData) {
  8892. var _style$navigationBar;
  8893. var style = pagesData[i];
  8894. var titleText =
  8895. // MP
  8896. style.navigationBarTitleText ||
  8897. // ali
  8898. style.defaultTitle || ( // H5 || App
  8899. (_style$navigationBar = style.navigationBar) === null || _style$navigationBar === void 0 ? void 0 : _style$navigationBar.titleText) || '';
  8900. if (titleText) {
  8901. titleJsons[i] = titleText;
  8902. }
  8903. }
  8904. // TODO 在云函数中获取,暂时注释
  8905. var UUID_KEY = '__DC_STAT_UUID';
  8906. var UUID_VALUE = '__DC_UUID_VALUE';
  8907. function getUuid() {
  8908. var uuid = '';
  8909. if (get_platform_name() === 'n') {
  8910. try {
  8911. uuid = plus.runtime.getDCloudId();
  8912. } catch (e) {
  8913. uuid = '';
  8914. }
  8915. return uuid;
  8916. }
  8917. try {
  8918. uuid = uni.getStorageSync(UUID_KEY);
  8919. } catch (e) {
  8920. uuid = UUID_VALUE;
  8921. }
  8922. if (!uuid) {
  8923. uuid = Date.now() + '' + Math.floor(Math.random() * 1e7);
  8924. try {
  8925. uni.setStorageSync(UUID_KEY, uuid);
  8926. } catch (e) {
  8927. uni.setStorageSync(UUID_KEY, UUID_VALUE);
  8928. }
  8929. }
  8930. return uuid;
  8931. }
  8932. var get_uuid = function get_uuid(statData) {
  8933. // 有可能不存在 deviceId(一般不存在就是出bug了),就自己生成一个
  8934. return sys.deviceId || getUuid();
  8935. };
  8936. /**
  8937. * 获取老版的 deviceid ,兼容以前的错误 deviceid
  8938. * @param {*} statData
  8939. * @returns
  8940. */
  8941. var get_odid = function get_odid(statData) {
  8942. var odid = '';
  8943. if (get_platform_name() === 'n') {
  8944. try {
  8945. odid = plus.device.uuid;
  8946. } catch (e) {
  8947. odid = '';
  8948. }
  8949. return odid;
  8950. }
  8951. return sys.deviceId || getUuid();
  8952. };
  8953. /**
  8954. * 获取配置信息 如 appid
  8955. */
  8956. var stat_config = statConfig;
  8957. var get_sgin = function get_sgin(statData) {
  8958. var arr = Object.keys(statData);
  8959. var sortArr = arr.sort();
  8960. var sgin = {};
  8961. var sginStr = '';
  8962. for (var i in sortArr) {
  8963. sgin[sortArr[i]] = statData[sortArr[i]];
  8964. sginStr += sortArr[i] + '=' + statData[sortArr[i]] + '&';
  8965. }
  8966. return {
  8967. sign: '',
  8968. options: sginStr.substr(0, sginStr.length - 1)
  8969. };
  8970. };
  8971. var get_encodeURIComponent_options = function get_encodeURIComponent_options(statData) {
  8972. var data = {};
  8973. for (var prop in statData) {
  8974. data[prop] = encodeURIComponent(statData[prop]);
  8975. }
  8976. return data;
  8977. };
  8978. /**
  8979. * 获取当前平台
  8980. * 移动端 : 'n',
  8981. * h5 : 'h5',
  8982. * 微信 : 'wx',
  8983. * 阿里 : 'ali',
  8984. * 百度 : 'bd',
  8985. * 头条 : 'tt',
  8986. * qq : 'qq',
  8987. * 快应用 : 'qn',
  8988. * 快手 : 'ks',
  8989. * 飞书 : 'lark',
  8990. * 快应用 : 'qw',
  8991. * 钉钉 : 'dt'
  8992. */
  8993. var get_platform_name = function get_platform_name() {
  8994. var _platformList;
  8995. // 苹果审核代码中禁止出现 alipay 字样 ,需要特殊处理一下
  8996. var aliArr = ['y', 'a', 'p', 'mp-ali'];
  8997. var platformList = (_platformList = {
  8998. app: 'n',
  8999. 'app-plus': 'n',
  9000. h5: 'h5',
  9001. 'mp-weixin': 'wx'
  9002. }, _defineProperty(_platformList, aliArr.reverse().join(''), 'ali'), _defineProperty(_platformList, 'mp-baidu', 'bd'), _defineProperty(_platformList, 'mp-toutiao', 'tt'), _defineProperty(_platformList, 'mp-qq', 'qq'), _defineProperty(_platformList, 'quickapp-native', 'qn'), _defineProperty(_platformList, 'mp-kuaishou', 'ks'), _defineProperty(_platformList, 'mp-lark', 'lark'), _defineProperty(_platformList, 'quickapp-webview', 'qw'), _platformList);
  9003. if (platformList["mp-weixin"] === 'ali') {
  9004. if (my && my.env) {
  9005. var clientName = my.env.clientName;
  9006. if (clientName === 'ap') return 'ali';
  9007. if (clientName === 'dingtalk') return 'dt';
  9008. // TODO 缺少 ali 下的其他平台
  9009. }
  9010. }
  9011. return platformList["mp-weixin"];
  9012. };
  9013. /**
  9014. * 获取小程序 appid
  9015. */
  9016. var get_pack_name = function get_pack_name() {
  9017. var packName = '';
  9018. if (get_platform_name() === 'wx' || get_platform_name() === 'qq') {
  9019. // 兼容微信小程序低版本基础库
  9020. if (uni.canIUse('getAccountInfoSync')) {
  9021. packName = uni.getAccountInfoSync().miniProgram.appId || '';
  9022. }
  9023. }
  9024. if (get_platform_name() === 'n') ;
  9025. return packName;
  9026. };
  9027. /**
  9028. * 应用版本
  9029. */
  9030. var get_version = function get_version() {
  9031. return get_platform_name() === 'n' ? plus.runtime.version : '';
  9032. };
  9033. /**
  9034. * 获取渠道
  9035. */
  9036. var get_channel = function get_channel() {
  9037. var platformName = get_platform_name();
  9038. var channel = '';
  9039. if (platformName === 'n') {
  9040. channel = plus.runtime.channel;
  9041. }
  9042. return channel;
  9043. };
  9044. /**
  9045. * 获取小程序场景值
  9046. * @param {Object} options 页面信息
  9047. */
  9048. var get_scene = function get_scene(options) {
  9049. var platformName = get_platform_name();
  9050. var scene = '';
  9051. if (options) {
  9052. return options;
  9053. }
  9054. if (platformName === 'wx') {
  9055. scene = uni.getLaunchOptionsSync().scene;
  9056. }
  9057. return scene;
  9058. };
  9059. /**
  9060. * 获取页面url,不包含参数
  9061. */
  9062. var get_route$1 = function get_route$1(pageVm) {
  9063. var _self = pageVm || get_page_vm();
  9064. if (get_platform_name() === 'bd') {
  9065. var mp_route = _self.$mp && _self.$mp.page && _self.$mp.page.is;
  9066. var scope_route = _self.$scope && _self.$scope.is;
  9067. return mp_route || scope_route || '';
  9068. } else {
  9069. return _self.route || _self.$scope && _self.$scope.route || _self.$mp && _self.$mp.page.route;
  9070. }
  9071. };
  9072. /**
  9073. * 获取页面url, 包含参数
  9074. */
  9075. var get_page_route = function get_page_route(pageVm) {
  9076. // 从 app 进入应用 ,没有 $page ,获取不到路由 ,需要获取页面 尝试从 getCurrentPages 获取也页面实例
  9077. // FIXME 尽量不使用 getCurrentPages ,大部分获取路由是从 onHide 获取 ,这时可以获取到,如果是 onload ,则可能获取不到,比如 百度
  9078. var page = pageVm && (pageVm.$page || pageVm.$scope && pageVm.$scope.$page);
  9079. var lastPageRoute = uni.getStorageSync('_STAT_LAST_PAGE_ROUTE');
  9080. if (!page) return lastPageRoute || '';
  9081. // 如果找不到 fullPath 就取 route 的值
  9082. return page.fullPath === '/' ? page.route : page.fullPath || page.route;
  9083. };
  9084. /**
  9085. * 获取页面实例
  9086. */
  9087. var get_page_vm = function get_page_vm() {
  9088. var pages = getCurrentPages();
  9089. var $page = pages[pages.length - 1];
  9090. if (!$page) return null;
  9091. return $page.$vm;
  9092. };
  9093. /**
  9094. * 获取页面类型
  9095. */
  9096. var get_page_types = function get_page_types(self) {
  9097. // XXX 百度有问题 ,获取的都是 componet ,等待修复
  9098. if (self.mpType === 'page' || self.$mpType === 'page' || self.$mp && self.$mp.mpType === 'page' || self.$options.mpType === 'page') {
  9099. return 'page';
  9100. }
  9101. if (self.mpType === 'app' || self.$mpType === 'app' || self.$mp && self.$mp.mpType === 'app' || self.$options.mpType === 'app') {
  9102. return 'app';
  9103. }
  9104. return null;
  9105. };
  9106. /**
  9107. * 处理上报参数
  9108. * @param {Object} 需要处理的数据
  9109. */
  9110. var handle_data = function handle_data(statData) {
  9111. var firstArr = [];
  9112. var contentArr = [];
  9113. var lastArr = [];
  9114. var _loop = function _loop(_i) {
  9115. var rd = statData[_i];
  9116. rd.forEach(function (elm) {
  9117. var newData = '';
  9118. {
  9119. newData = elm;
  9120. }
  9121. if (_i === 0) {
  9122. firstArr.push(newData);
  9123. } else if (_i === 3) {
  9124. lastArr.push(newData);
  9125. } else {
  9126. contentArr.push(newData);
  9127. }
  9128. });
  9129. };
  9130. for (var _i in statData) {
  9131. _loop(_i);
  9132. }
  9133. firstArr.push.apply(firstArr, contentArr.concat(lastArr));
  9134. // 参数需要处理成字符串,方便上传
  9135. return JSON.stringify(firstArr);
  9136. };
  9137. /**
  9138. * 自定义事件参数校验
  9139. */
  9140. var calibration = function calibration(eventName, options) {
  9141. // login 、 share 、pay_success 、pay_fail 、register 、title
  9142. if (!eventName) {
  9143. console.error("uni.report Missing [eventName] parameter");
  9144. return true;
  9145. }
  9146. if (typeof eventName !== 'string') {
  9147. console.error("uni.report [eventName] Parameter type error, it can only be of type String");
  9148. return true;
  9149. }
  9150. if (eventName.length > 255) {
  9151. console.error("uni.report [eventName] Parameter length cannot be greater than 255");
  9152. return true;
  9153. }
  9154. if (typeof options !== 'string' && _typeof(options) !== 'object') {
  9155. console.error('uni.report [options] Parameter type error, Only supports String or Object type');
  9156. return true;
  9157. }
  9158. if (typeof options === 'string' && options.length > 255) {
  9159. console.error("uni.report [options] Parameter length cannot be greater than 255");
  9160. return true;
  9161. }
  9162. if (eventName === 'title' && typeof options !== 'string') {
  9163. console.error("uni.report [eventName] When the parameter is title, the [options] parameter can only be of type String");
  9164. return true;
  9165. }
  9166. };
  9167. var get_page_name = function get_page_name(routepath) {
  9168. return titleJsons && titleJsons[routepath] || '';
  9169. };
  9170. var Report_Data_Time = 'Report_Data_Time';
  9171. var Report_Status = 'Report_Status';
  9172. var is_report_data = function is_report_data() {
  9173. return new Promise(function (resolve, reject) {
  9174. var start_time = '';
  9175. var end_time = new Date().getTime();
  9176. var diff_time = DIFF_TIME;
  9177. var report_status = 1;
  9178. try {
  9179. start_time = uni.getStorageSync(Report_Data_Time);
  9180. report_status = uni.getStorageSync(Report_Status);
  9181. } catch (e) {
  9182. start_time = '';
  9183. report_status = 1;
  9184. }
  9185. if (report_status === '') {
  9186. requestData(function (_ref) {
  9187. var enable = _ref.enable;
  9188. uni.setStorageSync(Report_Data_Time, end_time);
  9189. uni.setStorageSync(Report_Status, enable);
  9190. if (enable === 1) {
  9191. resolve();
  9192. }
  9193. });
  9194. return;
  9195. }
  9196. if (report_status === 1) {
  9197. resolve();
  9198. }
  9199. if (!start_time) {
  9200. uni.setStorageSync(Report_Data_Time, end_time);
  9201. start_time = end_time;
  9202. }
  9203. if (end_time - start_time > diff_time) {
  9204. requestData(function (_ref2) {
  9205. var enable = _ref2.enable;
  9206. uni.setStorageSync(Report_Data_Time, end_time);
  9207. uni.setStorageSync(Report_Status, enable);
  9208. });
  9209. }
  9210. });
  9211. };
  9212. var requestData = function requestData(done) {
  9213. var appid = "__UNI__8C5F0F6";
  9214. var formData = {
  9215. usv: STAT_VERSION,
  9216. conf: JSON.stringify({
  9217. ak: appid
  9218. })
  9219. };
  9220. uni.request({
  9221. url: STAT_URL,
  9222. method: 'GET',
  9223. data: formData,
  9224. success: function success(res) {
  9225. var data = res.data;
  9226. if (data.ret === 0) {
  9227. typeof done === 'function' && done({
  9228. enable: data.enable
  9229. });
  9230. }
  9231. },
  9232. fail: function fail(e) {
  9233. var report_status_code = 1;
  9234. try {
  9235. report_status_code = uni.getStorageSync(Report_Status);
  9236. } catch (e) {
  9237. report_status_code = 1;
  9238. }
  9239. if (report_status_code === '') {
  9240. report_status_code = 1;
  9241. }
  9242. typeof done === 'function' && done({
  9243. enable: report_status_code
  9244. });
  9245. }
  9246. });
  9247. };
  9248. /**
  9249. * 获取uniCloud服务空间配置
  9250. * @returns {Object}
  9251. */
  9252. var uni_cloud_config = function uni_cloud_config() {
  9253. return {} || {};
  9254. };
  9255. /**
  9256. * 获取服务空间
  9257. * @param {*} config
  9258. * @returns
  9259. */
  9260. var get_space = function get_space(config) {
  9261. var uniCloudConfig = uni_cloud_config();
  9262. var spaceId = uniCloudConfig.spaceId,
  9263. provider = uniCloudConfig.provider,
  9264. clientSecret = uniCloudConfig.clientSecret,
  9265. secretKey = uniCloudConfig.secretKey,
  9266. secretId = uniCloudConfig.secretId;
  9267. var space_type = ['tcb', 'tencent', 'aliyun', 'alipay'];
  9268. var is_provider = space_type.indexOf(provider) !== -1;
  9269. var is_aliyun = provider === 'aliyun' && spaceId && clientSecret;
  9270. var is_tcb = (provider === 'tcb' || provider === 'tencent') && spaceId;
  9271. var is_alipay = provider === 'alipay' && spaceId && secretKey && secretId;
  9272. if (is_provider && (is_aliyun || is_tcb || is_alipay)) {
  9273. return uniCloudConfig;
  9274. } else {
  9275. if (config && config.spaceId) {
  9276. return config;
  9277. }
  9278. }
  9279. return null;
  9280. };
  9281. /**
  9282. * 是否开启 debug 模式
  9283. */
  9284. var is_debug = debug;
  9285. /**
  9286. * 日志输出
  9287. * @param {*} data
  9288. */
  9289. var log = function log(data, type) {
  9290. var msg_type = '';
  9291. switch (data.lt) {
  9292. case '1':
  9293. msg_type = '应用启动';
  9294. break;
  9295. case '3':
  9296. msg_type = '应用进入后台';
  9297. break;
  9298. case '11':
  9299. msg_type = '页面切换';
  9300. break;
  9301. case '21':
  9302. msg_type = '事件触发';
  9303. break;
  9304. case '31':
  9305. msg_type = '应用错误';
  9306. break;
  9307. case '101':
  9308. msg_type = 'PUSH';
  9309. break;
  9310. }
  9311. if (type) {
  9312. console.log("=== \u7EDF\u8BA1\u961F\u5217\u6570\u636E\u4E0A\u62A5 ===");
  9313. console.log(data);
  9314. console.log("=== \u4E0A\u62A5\u7ED3\u675F ===");
  9315. return;
  9316. }
  9317. if (msg_type) {
  9318. console.log("=== \u7EDF\u8BA1\u6570\u636E\u91C7\u96C6\uFF1A".concat(msg_type, " ==="));
  9319. console.log(data);
  9320. console.log("=== \u91C7\u96C6\u7ED3\u675F ===");
  9321. }
  9322. };
  9323. /**
  9324. * 获取上报时间间隔
  9325. * @param {*} defaultTime 默认上报间隔时间 单位s
  9326. */
  9327. var get_report_Interval = function get_report_Interval(defaultTime) {
  9328. var time = uniStatisticsConfig.reportInterval;
  9329. // 如果上报时间配置为0 相当于立即上报
  9330. if (Number(time) === 0) return 0;
  9331. time = time || defaultTime;
  9332. var reg = /(^[1-9]\d*$)/;
  9333. // 如果不是整数,则默认为上报间隔时间
  9334. if (!reg.test(time)) return defaultTime;
  9335. return Number(time);
  9336. };
  9337. /**
  9338. * 获取隐私协议配置
  9339. */
  9340. var is_push_clientid = function is_push_clientid() {
  9341. if (uniStatisticsConfig.collectItems) {
  9342. var ClientID = uniStatisticsConfig.collectItems.uniPushClientID;
  9343. return typeof ClientID === 'boolean' ? ClientID : false;
  9344. }
  9345. return false;
  9346. };
  9347. /**
  9348. * 是否上报页面数据
  9349. * @returns
  9350. */
  9351. var is_page_report = function is_page_report() {
  9352. if (uniStatisticsConfig.collectItems) {
  9353. var statPageLog = uniStatisticsConfig.collectItems.uniStatPageLog;
  9354. // 如果字段不存在返回 true , 如果是boolean 值按原值返回,如果是其他类型 返回false
  9355. if (statPageLog === undefined) return true;
  9356. return typeof statPageLog === 'boolean' ? statPageLog : true;
  9357. }
  9358. return true;
  9359. };
  9360. /**
  9361. * 是否已处理设备 DeviceId
  9362. * 如果值为 1 则表示已处理
  9363. */
  9364. var IS_HANDLE_DEVECE_ID = 'is_handle_device_id';
  9365. var is_handle_device = function is_handle_device() {
  9366. var isHandleDevice = dbGet(IS_HANDLE_DEVECE_ID) || '';
  9367. dbSet(IS_HANDLE_DEVECE_ID, '1');
  9368. return isHandleDevice === '1';
  9369. };
  9370. // 首次访问时间
  9371. var FIRST_VISIT_TIME_KEY = '__first__visit__time';
  9372. // 最后访问时间
  9373. var LAST_VISIT_TIME_KEY = '__last__visit__time';
  9374. /**
  9375. * 获取当前时间
  9376. */
  9377. var get_time = function get_time() {
  9378. return parseInt(new Date().getTime() / 1000);
  9379. };
  9380. /**
  9381. * 获取首次访问时间
  9382. */
  9383. var get_first_visit_time = function get_first_visit_time() {
  9384. var timeStorge = dbGet(FIRST_VISIT_TIME_KEY);
  9385. var time = 0;
  9386. if (timeStorge) {
  9387. time = timeStorge;
  9388. } else {
  9389. time = get_time();
  9390. dbSet(FIRST_VISIT_TIME_KEY, time);
  9391. // 首次访问需要 将最后访问时间置 0
  9392. dbRemove(LAST_VISIT_TIME_KEY);
  9393. }
  9394. return time;
  9395. };
  9396. /**
  9397. * 最后访问时间
  9398. */
  9399. var get_last_visit_time = function get_last_visit_time() {
  9400. var timeStorge = dbGet(LAST_VISIT_TIME_KEY);
  9401. var time = 0;
  9402. if (timeStorge) {
  9403. time = timeStorge;
  9404. }
  9405. dbSet(LAST_VISIT_TIME_KEY, get_time());
  9406. return time;
  9407. };
  9408. // 页面停留时间记录key
  9409. var PAGE_RESIDENCE_TIME = '__page__residence__time';
  9410. var First_Page_Residence_Time = 0;
  9411. var Last_Page_Residence_Time = 0;
  9412. /**
  9413. * 设置页面停留时间
  9414. */
  9415. var set_page_residence_time = function set_page_residence_time() {
  9416. First_Page_Residence_Time = get_time();
  9417. dbSet(PAGE_RESIDENCE_TIME, First_Page_Residence_Time);
  9418. return First_Page_Residence_Time;
  9419. };
  9420. /**
  9421. * 获取页面停留时间
  9422. */
  9423. var get_page_residence_time = function get_page_residence_time() {
  9424. Last_Page_Residence_Time = get_time();
  9425. First_Page_Residence_Time = dbGet(PAGE_RESIDENCE_TIME);
  9426. return Last_Page_Residence_Time - First_Page_Residence_Time;
  9427. };
  9428. /**
  9429. * 获取总访问次数
  9430. */
  9431. var TOTAL_VISIT_COUNT = '__total__visit__count';
  9432. var get_total_visit_count = function get_total_visit_count() {
  9433. var timeStorge = dbGet(TOTAL_VISIT_COUNT);
  9434. var count = 1;
  9435. if (timeStorge) {
  9436. count = timeStorge;
  9437. count++;
  9438. }
  9439. dbSet(TOTAL_VISIT_COUNT, count);
  9440. return count;
  9441. };
  9442. var FIRST_TIME = '__first_time';
  9443. /**
  9444. * 设置页面首次访问时间,用户获取页面/应用停留时常
  9445. */
  9446. var set_first_time = function set_first_time() {
  9447. // 获取当前时间 ,以下代码获取到是毫秒级时间戳 ,实际上用到是秒级时间戳,所以需要除以1000
  9448. // const time = new Date().getTime()
  9449. var time = get_time();
  9450. var timeStorge = dbSet(FIRST_TIME, time);
  9451. return timeStorge;
  9452. };
  9453. /**
  9454. * 获取最后一次时间 ,暂时用不到,直接获取当前时间即可
  9455. */
  9456. // export const get_last_time = () => {
  9457. // let time = new Date().getTime()
  9458. // Set__Last__Time = time
  9459. // return time
  9460. // }
  9461. /**
  9462. * 获取页面 \ 应用停留时间
  9463. */
  9464. var get_residence_time = function get_residence_time(type) {
  9465. var residenceTime = 0;
  9466. var first_time = dbGet(FIRST_TIME);
  9467. var last_time = get_time();
  9468. if (first_time !== 0) {
  9469. residenceTime = last_time - first_time;
  9470. }
  9471. // 将毫秒级时间戳转换为秒级时间戳,因为直接获取的是秒级时间戳,所以不需要转换
  9472. // residenceTime = parseInt(residenceTime / 1000)
  9473. residenceTime = residenceTime < 1 ? 1 : residenceTime;
  9474. if (type === 'app') {
  9475. var overtime = residenceTime > APP_PVER_TIME ? true : false;
  9476. return {
  9477. residenceTime: residenceTime,
  9478. overtime: overtime
  9479. };
  9480. }
  9481. if (type === 'page') {
  9482. var _overtime = residenceTime > PAGE_PVER_TIME ? true : false;
  9483. return {
  9484. residenceTime: residenceTime,
  9485. overtime: _overtime
  9486. };
  9487. }
  9488. return {
  9489. residenceTime: residenceTime
  9490. };
  9491. };
  9492. var eport_Interval = get_report_Interval(OPERATING_TIME);
  9493. // 统计数据默认值
  9494. var statData = {
  9495. uuid: get_uuid(),
  9496. // 设备标识
  9497. ak: stat_config.appid,
  9498. // uni-app 应用 Appid
  9499. p: sys.platform === 'android' ? 'a' : 'i',
  9500. // 手机系统
  9501. ut: get_platform_name(),
  9502. // 平台类型
  9503. mpn: get_pack_name(),
  9504. // 原生平台包名、小程序 appid
  9505. usv: STAT_VERSION,
  9506. // 统计 sdk 版本
  9507. v: get_version(),
  9508. // 应用版本,仅app
  9509. ch: get_channel(),
  9510. // 渠道信息
  9511. cn: '',
  9512. // 国家
  9513. pn: '',
  9514. // 省份
  9515. ct: '',
  9516. // 城市
  9517. t: get_time(),
  9518. // 上报数据时的时间戳
  9519. tt: '',
  9520. brand: sys.brand || '',
  9521. // 手机品牌
  9522. md: sys.model,
  9523. // 手机型号
  9524. sv: sys.system.replace(/(Android|iOS)\s/, ''),
  9525. // 手机系统版本
  9526. mpsdk: sys.SDKVersion || '',
  9527. // x程序 sdk version
  9528. mpv: sys.version || '',
  9529. // 小程序平台版本 ,如微信、支付宝
  9530. lang: sys.language,
  9531. // 语言
  9532. pr: sys.pixelRatio,
  9533. // pixelRatio 设备像素比
  9534. ww: sys.windowWidth,
  9535. // windowWidth 可使用窗口宽度
  9536. wh: sys.windowHeight,
  9537. // windowHeight 可使用窗口高度
  9538. sw: sys.screenWidth,
  9539. // screenWidth 屏幕宽度
  9540. sh: sys.screenHeight // screenHeight 屏幕高度
  9541. };
  9542. var Report = /*#__PURE__*/function () {
  9543. "use strict";
  9544. function Report() {
  9545. _classCallCheck(this, Report);
  9546. // 页面实例
  9547. this.self = '';
  9548. // 进入应用标识
  9549. this.__licationShow = false;
  9550. // 离开应用标识
  9551. this.__licationHide = false;
  9552. // 统计默认值
  9553. this.statData = statData;
  9554. // 标题默认值
  9555. this._navigationBarTitle = {
  9556. config: '',
  9557. page: '',
  9558. report: '',
  9559. lt: ''
  9560. };
  9561. // 页面参数
  9562. this._query = {};
  9563. // 页面最后停留页面的 url
  9564. // this._lastPageRoute = ''
  9565. // 注册拦截器
  9566. var registerInterceptor = typeof uni.addInterceptor === 'function';
  9567. if (registerInterceptor) {
  9568. this.addInterceptorInit();
  9569. this.interceptLogin();
  9570. this.interceptShare(true);
  9571. this.interceptRequestPayment();
  9572. }
  9573. }
  9574. _createClass(Report, [{
  9575. key: "addInterceptorInit",
  9576. value: function addInterceptorInit() {
  9577. var self = this;
  9578. uni.addInterceptor('setNavigationBarTitle', {
  9579. invoke: function invoke(args) {
  9580. self._navigationBarTitle.page = args.title;
  9581. }
  9582. });
  9583. }
  9584. }, {
  9585. key: "interceptLogin",
  9586. value: function interceptLogin() {
  9587. var self = this;
  9588. uni.addInterceptor('login', {
  9589. complete: function complete() {
  9590. self._login();
  9591. }
  9592. });
  9593. }
  9594. }, {
  9595. key: "interceptShare",
  9596. value: function interceptShare(type) {
  9597. var self = this;
  9598. if (!type) {
  9599. self._share();
  9600. return;
  9601. }
  9602. uni.addInterceptor('share', {
  9603. success: function success() {
  9604. self._share();
  9605. },
  9606. fail: function fail() {
  9607. self._share();
  9608. }
  9609. });
  9610. }
  9611. }, {
  9612. key: "interceptRequestPayment",
  9613. value: function interceptRequestPayment() {
  9614. var self = this;
  9615. uni.addInterceptor('requestPayment', {
  9616. success: function success() {
  9617. self._payment('pay_success');
  9618. },
  9619. fail: function fail() {
  9620. self._payment('pay_fail');
  9621. }
  9622. });
  9623. }
  9624. }, {
  9625. key: "_login",
  9626. value: function _login() {
  9627. this.sendEventRequest({
  9628. key: 'login'
  9629. }, 0);
  9630. }
  9631. }, {
  9632. key: "_share",
  9633. value: function _share() {
  9634. this.sendEventRequest({
  9635. key: 'share'
  9636. }, 0);
  9637. }
  9638. }, {
  9639. key: "_payment",
  9640. value: function _payment(key) {
  9641. this.sendEventRequest({
  9642. key: key
  9643. }, 0);
  9644. }
  9645. /**
  9646. * 进入应用触发
  9647. */
  9648. }, {
  9649. key: "applicationShow",
  9650. value: function applicationShow() {
  9651. // 通过 __licationHide 判断保证是进入后台后在次进入应用,避免重复上报数据
  9652. if (this.__licationHide) {
  9653. var time = get_residence_time('app');
  9654. // 需要判断进入后台是否超过时限 ,默认是 30min ,是的话需要执行进入应用的上报
  9655. if (time.overtime) {
  9656. var lastPageRoute = uni.getStorageSync('_STAT_LAST_PAGE_ROUTE');
  9657. var options = {
  9658. path: lastPageRoute,
  9659. scene: this.statData.sc,
  9660. cst: 2
  9661. };
  9662. this.sendReportRequest(options);
  9663. }
  9664. // 状态重置
  9665. this.__licationHide = false;
  9666. }
  9667. }
  9668. /**
  9669. * 离开应用触发
  9670. * @param {Object} self
  9671. * @param {Object} type
  9672. */
  9673. }, {
  9674. key: "applicationHide",
  9675. value: function applicationHide(self, type) {
  9676. if (!self) {
  9677. // 表示应用切换到后台 ,此时需要从页面栈获取页面实例
  9678. self = get_page_vm();
  9679. }
  9680. // 进入应用后台保存状态,方便进入前台后判断是否上报应用数据
  9681. this.__licationHide = true;
  9682. var time = get_residence_time();
  9683. var route = get_page_route(self);
  9684. uni.setStorageSync('_STAT_LAST_PAGE_ROUTE', route);
  9685. this.sendHideRequest({
  9686. urlref: route,
  9687. urlref_ts: time.residenceTime
  9688. }, type);
  9689. // 更新页面首次访问时间
  9690. set_first_time();
  9691. }
  9692. /**
  9693. * 进入页面触发
  9694. */
  9695. }, {
  9696. key: "pageShow",
  9697. value: function pageShow(self) {
  9698. // 清空值 ,初始化 ,避免污染后面的上报数据
  9699. this._navigationBarTitle = {
  9700. config: '',
  9701. page: '',
  9702. report: '',
  9703. lt: ''
  9704. };
  9705. var route = get_page_route(self);
  9706. var routepath = get_route$1(self);
  9707. this._navigationBarTitle.config = get_page_name(routepath);
  9708. // 表示应用触发 ,页面切换不触发之后的逻辑
  9709. if (this.__licationShow) {
  9710. // 更新页面首次访问时间
  9711. set_first_time();
  9712. // this._lastPageRoute = route
  9713. uni.setStorageSync('_STAT_LAST_PAGE_ROUTE', route);
  9714. this.__licationShow = false;
  9715. return;
  9716. }
  9717. var time = get_residence_time('page');
  9718. // 停留时间
  9719. if (time.overtime) {
  9720. var options = {
  9721. path: route,
  9722. scene: this.statData.sc,
  9723. cst: 3
  9724. };
  9725. this.sendReportRequest(options);
  9726. }
  9727. // 更新页面首次访问时间
  9728. set_first_time();
  9729. }
  9730. /**
  9731. * 离开页面触发
  9732. */
  9733. }, {
  9734. key: "pageHide",
  9735. value: function pageHide(self) {
  9736. if (!this.__licationHide) {
  9737. var time = get_residence_time('page');
  9738. var route = get_page_route(self);
  9739. var lastPageRoute = uni.getStorageSync('_STAT_LAST_PAGE_ROUTE');
  9740. if (!lastPageRoute) {
  9741. lastPageRoute = route;
  9742. }
  9743. uni.setStorageSync('_STAT_LAST_PAGE_ROUTE', route);
  9744. this.sendPageRequest({
  9745. url: route,
  9746. urlref: lastPageRoute,
  9747. urlref_ts: time.residenceTime
  9748. });
  9749. // this._lastPageRoute = route
  9750. return;
  9751. }
  9752. }
  9753. /**
  9754. * 发送请求,应用维度上报
  9755. * @param {Object} options 页面信息
  9756. * @param {Boolean} type 是否立即上报
  9757. */
  9758. }, {
  9759. key: "sendReportRequest",
  9760. value: function sendReportRequest(options, type) {
  9761. this._navigationBarTitle.lt = '1';
  9762. this._navigationBarTitle.config = get_page_name(options.path);
  9763. var is_opt = options.query && JSON.stringify(options.query) !== '{}';
  9764. var query = is_opt ? '?' + JSON.stringify(options.query) : '';
  9765. var last_time = get_last_visit_time();
  9766. // 非老用户
  9767. if (last_time !== 0 || !last_time) {
  9768. var odid = get_odid();
  9769. // 2.0 处理规则
  9770. {
  9771. var have_device = is_handle_device();
  9772. // 如果没有上报过设备信息 ,则需要上报设备信息
  9773. if (!have_device) {
  9774. this.statData.odid = odid;
  9775. }
  9776. }
  9777. }
  9778. Object.assign(this.statData, {
  9779. lt: '1',
  9780. url: options.path + query || '',
  9781. t: get_time(),
  9782. sc: get_scene(options.scene),
  9783. fvts: get_first_visit_time(),
  9784. lvts: last_time,
  9785. tvc: get_total_visit_count(),
  9786. // create session type 上报类型 ,1 应用进入 2.后台30min进入 3.页面30min进入
  9787. cst: options.cst || 1
  9788. });
  9789. if (get_platform_name() === 'n') {
  9790. this.getProperty(type);
  9791. } else {
  9792. this.getNetworkInfo(type);
  9793. }
  9794. }
  9795. /**
  9796. * 发送请求,页面维度上报
  9797. * @param {Object} opt
  9798. */
  9799. }, {
  9800. key: "sendPageRequest",
  9801. value: function sendPageRequest(opt) {
  9802. var url = opt.url,
  9803. urlref = opt.urlref,
  9804. urlref_ts = opt.urlref_ts;
  9805. this._navigationBarTitle.lt = '11';
  9806. var options = {
  9807. ak: this.statData.ak,
  9808. uuid: this.statData.uuid,
  9809. p: this.statData.p,
  9810. lt: '11',
  9811. ut: this.statData.ut,
  9812. url: url,
  9813. tt: this.statData.tt,
  9814. urlref: urlref,
  9815. urlref_ts: urlref_ts,
  9816. ch: this.statData.ch,
  9817. usv: this.statData.usv,
  9818. t: get_time()
  9819. };
  9820. this.request(options);
  9821. }
  9822. /**
  9823. * 进入后台上报数据
  9824. * @param {Object} opt
  9825. * @param {Object} type
  9826. */
  9827. }, {
  9828. key: "sendHideRequest",
  9829. value: function sendHideRequest(opt, type) {
  9830. var urlref = opt.urlref,
  9831. urlref_ts = opt.urlref_ts;
  9832. var options = {
  9833. ak: this.statData.ak,
  9834. uuid: this.statData.uuid,
  9835. p: this.statData.p,
  9836. lt: '3',
  9837. ut: this.statData.ut,
  9838. urlref: urlref,
  9839. urlref_ts: urlref_ts,
  9840. ch: this.statData.ch,
  9841. usv: this.statData.usv,
  9842. t: get_time()
  9843. };
  9844. this.request(options, type);
  9845. }
  9846. /**
  9847. * 自定义事件上报
  9848. */
  9849. }, {
  9850. key: "sendEventRequest",
  9851. value: function sendEventRequest() {
  9852. var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  9853. _ref3$key = _ref3.key,
  9854. key = _ref3$key === void 0 ? '' : _ref3$key,
  9855. _ref3$value = _ref3.value,
  9856. value = _ref3$value === void 0 ? '' : _ref3$value;
  9857. var routepath = '';
  9858. try {
  9859. routepath = get_route$1();
  9860. } catch (error) {
  9861. var launch_options = dbGet('__launch_options');
  9862. routepath = launch_options.path;
  9863. }
  9864. this._navigationBarTitle.config = get_page_name(routepath);
  9865. this._navigationBarTitle.lt = '21';
  9866. var options = {
  9867. ak: this.statData.ak,
  9868. uuid: this.statData.uuid,
  9869. p: this.statData.p,
  9870. lt: '21',
  9871. ut: this.statData.ut,
  9872. url: routepath,
  9873. ch: this.statData.ch,
  9874. e_n: key,
  9875. e_v: _typeof(value) === 'object' ? JSON.stringify(value) : value.toString(),
  9876. usv: this.statData.usv,
  9877. t: get_time()
  9878. };
  9879. this.request(options);
  9880. }
  9881. }, {
  9882. key: "sendPushRequest",
  9883. value: function sendPushRequest(options, cid) {
  9884. var _this = this;
  9885. var time = get_time();
  9886. var statData = {
  9887. lt: '101',
  9888. cid: cid,
  9889. t: time,
  9890. ut: this.statData.ut
  9891. };
  9892. // debug 打印打点信息
  9893. if (is_debug) {
  9894. log(statData);
  9895. }
  9896. var stat_data = handle_data({
  9897. 101: [statData]
  9898. });
  9899. var optionsData = {
  9900. usv: STAT_VERSION,
  9901. //统计 SDK 版本号
  9902. t: time,
  9903. //发送请求时的时间戮
  9904. requests: stat_data
  9905. };
  9906. // XXX 安卓需要延迟上报 ,否则会有未知错误,需要验证处理
  9907. if (get_platform_name() === 'n' && this.statData.p === 'a') {
  9908. setTimeout(function () {
  9909. _this.sendRequest(optionsData);
  9910. }, 200);
  9911. return;
  9912. }
  9913. this.sendRequest(optionsData);
  9914. }
  9915. /**
  9916. * 获取wgt资源版本
  9917. */
  9918. }, {
  9919. key: "getProperty",
  9920. value: function getProperty(type) {
  9921. var _this2 = this;
  9922. plus.runtime.getProperty(plus.runtime.appid, function (wgtinfo) {
  9923. _this2.statData.v = wgtinfo.version || '';
  9924. _this2.getNetworkInfo(type);
  9925. });
  9926. }
  9927. /**
  9928. * 获取网络信息
  9929. */
  9930. }, {
  9931. key: "getNetworkInfo",
  9932. value: function getNetworkInfo(type) {
  9933. var _this3 = this;
  9934. uni.getNetworkType({
  9935. success: function success(result) {
  9936. _this3.statData.net = result.networkType;
  9937. _this3.getLocation(type);
  9938. }
  9939. });
  9940. }
  9941. /**
  9942. * 获取位置信息
  9943. */
  9944. }, {
  9945. key: "getLocation",
  9946. value: function getLocation(type) {
  9947. var _this4 = this;
  9948. if (stat_config.getLocation) {
  9949. uni.getLocation({
  9950. type: 'wgs84',
  9951. geocode: true,
  9952. success: function success(result) {
  9953. if (result.address) {
  9954. _this4.statData.cn = result.address.country;
  9955. _this4.statData.pn = result.address.province;
  9956. _this4.statData.ct = result.address.city;
  9957. }
  9958. _this4.statData.lat = result.latitude;
  9959. _this4.statData.lng = result.longitude;
  9960. _this4.request(_this4.statData, type);
  9961. }
  9962. });
  9963. } else {
  9964. this.statData.lat = 0;
  9965. this.statData.lng = 0;
  9966. this.request(this.statData, type);
  9967. }
  9968. }
  9969. /**
  9970. * 发送请求
  9971. * @param {Object} data 上报数据
  9972. * @param {Object} type 类型
  9973. */
  9974. }, {
  9975. key: "request",
  9976. value: function request(data, type) {
  9977. var _this5 = this;
  9978. var time = get_time();
  9979. var title = this._navigationBarTitle;
  9980. Object.assign(data, {
  9981. ttn: title.page,
  9982. ttpj: title.config,
  9983. ttc: title.report
  9984. });
  9985. var uniStatData = dbGet('__UNI__STAT__DATA') || {};
  9986. if (!uniStatData[data.lt]) {
  9987. uniStatData[data.lt] = [];
  9988. }
  9989. // 加入队列
  9990. uniStatData[data.lt].push(data);
  9991. dbSet('__UNI__STAT__DATA', uniStatData);
  9992. var page_residence_time = get_page_residence_time();
  9993. // debug 打印打点信息
  9994. if (is_debug) {
  9995. log(data);
  9996. }
  9997. // 判断时候到达上报时间 ,默认 10 秒上报
  9998. if (page_residence_time < eport_Interval && !type) return;
  9999. // 时间超过,重新获取时间戳
  10000. set_page_residence_time();
  10001. var stat_data = handle_data(uniStatData);
  10002. var optionsData = {
  10003. usv: STAT_VERSION,
  10004. //统计 SDK 版本号
  10005. t: time,
  10006. //发送请求时的时间戮
  10007. requests: stat_data
  10008. };
  10009. // 重置队列
  10010. dbRemove('__UNI__STAT__DATA');
  10011. // XXX 安卓需要延迟上报 ,否则会有未知错误,需要验证处理
  10012. if (get_platform_name() === 'n' && this.statData.p === 'a') {
  10013. setTimeout(function () {
  10014. _this5.sendRequest(optionsData);
  10015. }, 200);
  10016. return;
  10017. }
  10018. this.sendRequest(optionsData);
  10019. }
  10020. }, {
  10021. key: "getIsReportData",
  10022. value: function getIsReportData() {
  10023. return is_report_data();
  10024. }
  10025. /**
  10026. * 数据上报
  10027. * @param {Object} optionsData 需要上报的数据
  10028. */
  10029. }, {
  10030. key: "sendRequest",
  10031. value: function sendRequest(optionsData) {
  10032. {
  10033. if (!uni.__stat_uniCloud_space) {
  10034. console.error('应用未关联服务空间,统计上报失败,请在uniCloud目录右键关联服务空间.');
  10035. return;
  10036. }
  10037. var uniCloudObj = uni.__stat_uniCloud_space.importObject('uni-stat-receiver', {
  10038. customUI: true
  10039. });
  10040. uniCloudObj.report(optionsData).then(function () {
  10041. if (is_debug) {
  10042. log(optionsData, true);
  10043. }
  10044. }).catch(function (err) {
  10045. if (is_debug) {
  10046. console.warn('=== 统计上报错误');
  10047. console.error(err);
  10048. }
  10049. });
  10050. }
  10051. }
  10052. /**
  10053. * h5 请求
  10054. */
  10055. }, {
  10056. key: "imageRequest",
  10057. value: function imageRequest(data) {
  10058. this.getIsReportData().then(function () {
  10059. var image = new Image();
  10060. var options = get_sgin(get_encodeURIComponent_options(data)).options;
  10061. image.src = STAT_H5_URL + '?' + options;
  10062. if (is_debug) {
  10063. log(data, true);
  10064. }
  10065. });
  10066. }
  10067. }, {
  10068. key: "sendEvent",
  10069. value: function sendEvent(key, value) {
  10070. // 校验 type 参数
  10071. if (calibration(key, value)) return;
  10072. if (key === 'title') {
  10073. this._navigationBarTitle.report = value;
  10074. return;
  10075. }
  10076. this.sendEventRequest({
  10077. key: key,
  10078. value: _typeof(value) === 'object' ? JSON.stringify(value) : value
  10079. }, 1);
  10080. }
  10081. }]);
  10082. return Report;
  10083. }();
  10084. var Stat = /*#__PURE__*/function (_Report) {
  10085. "use strict";
  10086. _inherits(Stat, _Report);
  10087. var _super = _createSuper(Stat);
  10088. function Stat() {
  10089. _classCallCheck(this, Stat);
  10090. return _super.call(this);
  10091. }
  10092. /**
  10093. * 获取推送id
  10094. */
  10095. _createClass(Stat, [{
  10096. key: "pushEvent",
  10097. value: function pushEvent(options) {
  10098. var _this6 = this;
  10099. var ClientID = is_push_clientid();
  10100. if (uni.getPushClientId && ClientID) {
  10101. uni.getPushClientId({
  10102. success: function success(res) {
  10103. var cid = res.cid || false;
  10104. // 只有获取到才会上传
  10105. if (cid) {
  10106. _this6.sendPushRequest(options, cid);
  10107. }
  10108. }
  10109. });
  10110. }
  10111. }
  10112. /**
  10113. * 进入应用
  10114. * @param {Object} options 页面参数
  10115. * @param {Object} self 当前页面实例
  10116. */
  10117. }, {
  10118. key: "launch",
  10119. value: function launch(options, self) {
  10120. // 初始化页面停留时间 start
  10121. set_page_residence_time();
  10122. this.__licationShow = true;
  10123. dbSet('__launch_options', options);
  10124. // 应用初始上报参数为1
  10125. options.cst = 1;
  10126. this.sendReportRequest(options, true);
  10127. }
  10128. }, {
  10129. key: "load",
  10130. value: function load(options, self) {
  10131. this.self = self;
  10132. this._query = options;
  10133. }
  10134. }, {
  10135. key: "appHide",
  10136. value: function appHide(self) {
  10137. this.applicationHide(self, true);
  10138. }
  10139. }, {
  10140. key: "appShow",
  10141. value: function appShow(self) {
  10142. this.applicationShow(self);
  10143. }
  10144. }, {
  10145. key: "show",
  10146. value: function show(self) {
  10147. this.self = self;
  10148. if (get_page_types(self) === 'page') {
  10149. var isPageReport = is_page_report();
  10150. if (isPageReport) {
  10151. this.pageShow(self);
  10152. }
  10153. }
  10154. if (get_page_types(self) === 'app') {
  10155. this.appShow();
  10156. }
  10157. }
  10158. }, {
  10159. key: "hide",
  10160. value: function hide(self) {
  10161. this.self = self;
  10162. if (get_page_types(self) === 'page') {
  10163. var isPageReport = is_page_report();
  10164. if (isPageReport) {
  10165. this.pageHide(self);
  10166. }
  10167. }
  10168. if (get_page_types(self) === 'app') {
  10169. this.appHide();
  10170. }
  10171. }
  10172. }, {
  10173. key: "error",
  10174. value: function error(em) {
  10175. // 开发工具内不上报错误
  10176. // if (this._platform === 'devtools') {
  10177. // if (process.env.NODE_ENV === 'development') {
  10178. // console.info('当前运行环境为开发者工具,不上报数据。')
  10179. // return
  10180. // }
  10181. // }
  10182. var emVal = '';
  10183. if (!em.message) {
  10184. emVal = JSON.stringify(em);
  10185. } else {
  10186. emVal = em.stack;
  10187. }
  10188. var route = '';
  10189. try {
  10190. route = get_route();
  10191. } catch (e) {
  10192. // 未获取到页面路径
  10193. route = '';
  10194. }
  10195. var options = {
  10196. ak: this.statData.ak,
  10197. uuid: this.statData.uuid,
  10198. p: this.statData.p,
  10199. lt: '31',
  10200. url: route,
  10201. ut: this.statData.ut,
  10202. ch: this.statData.ch,
  10203. mpsdk: this.statData.mpsdk,
  10204. mpv: this.statData.mpv,
  10205. v: this.statData.v,
  10206. em: emVal,
  10207. usv: this.statData.usv,
  10208. t: parseInt(new Date().getTime() / 1000)
  10209. };
  10210. this.request(options);
  10211. }
  10212. }], [{
  10213. key: "getInstance",
  10214. value: function getInstance() {
  10215. if (!uni.__stat_instance) {
  10216. uni.__stat_instance = new Stat();
  10217. }
  10218. // 2.0 init 服务空间
  10219. {
  10220. var space = get_space(uniCloud.config);
  10221. if (!uni.__stat_uniCloud_space) {
  10222. // 判断不为空对象
  10223. if (space && Object.keys(space).length !== 0) {
  10224. var spaceData = {
  10225. provider: space.provider,
  10226. spaceId: space.spaceId,
  10227. clientSecret: space.clientSecret
  10228. };
  10229. if (space.endpoint) {
  10230. spaceData.endpoint = space.endpoint;
  10231. }
  10232. if (space.provider === 'alipay') {
  10233. spaceData.secretKey = space.secretKey;
  10234. spaceData.accessKey = space.accessKey || space.secretId;
  10235. spaceData.spaceAppId = space.spaceAppId || space.appId;
  10236. }
  10237. uni.__stat_uniCloud_space = uniCloud.init(spaceData);
  10238. // console.log(
  10239. // '=== 当前绑定的统计服务空间spaceId:' +
  10240. // uni.__stat_uniCloud_space.config.spaceId
  10241. // )
  10242. } else {
  10243. console.error('应用未关联服务空间,请在uniCloud目录右键关联服务空间');
  10244. }
  10245. }
  10246. }
  10247. return uni.__stat_instance;
  10248. }
  10249. }]);
  10250. return Stat;
  10251. }(Report);
  10252. var Stat$1 = Stat;
  10253. var stat = Stat$1.getInstance();
  10254. // 用于判断是隐藏页面还是卸载页面
  10255. var isHide = false;
  10256. var lifecycle = {
  10257. onLaunch: function onLaunch(options) {
  10258. // 进入应用上报数据
  10259. stat.launch(options, this);
  10260. // 上报push推送id
  10261. stat.pushEvent(options);
  10262. },
  10263. onLoad: function onLoad(options) {
  10264. stat.load(options, this);
  10265. // 重写分享,获取分享上报事件
  10266. if (this.$scope && this.$scope.onShareAppMessage) {
  10267. var oldShareAppMessage = this.$scope.onShareAppMessage;
  10268. this.$scope.onShareAppMessage = function (options) {
  10269. stat.interceptShare(false);
  10270. return oldShareAppMessage.call(this, options);
  10271. };
  10272. }
  10273. },
  10274. onShow: function onShow() {
  10275. isHide = false;
  10276. stat.show(this);
  10277. },
  10278. onHide: function onHide() {
  10279. isHide = true;
  10280. stat.hide(this);
  10281. },
  10282. onUnload: function onUnload() {
  10283. if (isHide) {
  10284. isHide = false;
  10285. return;
  10286. }
  10287. stat.hide(this);
  10288. },
  10289. onError: function onError(e) {
  10290. stat.error(e);
  10291. }
  10292. };
  10293. // 加载统计代码
  10294. function load_stat() {
  10295. // eslint-disable-next-line no-restricted-globals
  10296. var Vue = __webpack_require__(/*! vue */ 25);
  10297. (Vue.default || Vue).mixin(lifecycle);
  10298. uni.report = function (type, options) {
  10299. stat.sendEvent(type, options);
  10300. };
  10301. }
  10302. function main() {
  10303. if (is_debug) {
  10304. {
  10305. console.log('=== uni统计开启,version:2.0 ===');
  10306. }
  10307. load_stat();
  10308. } else {
  10309. if (true) {
  10310. uni.report = function (type, options) {};
  10311. } else {}
  10312. }
  10313. }
  10314. main();
  10315. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js */ 28)["default"]))
  10316. /***/ }),
  10317. /* 28 */
  10318. /*!************************************************************************************!*\
  10319. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/uni-cloud/dist/index.js ***!
  10320. \************************************************************************************/
  10321. /*! no static exports found */
  10322. /***/ (function(module, exports, __webpack_require__) {
  10323. "use strict";
  10324. /* WEBPACK VAR INJECTION */(function(global, uni, wx) {
  10325. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  10326. Object.defineProperty(exports, "__esModule", {
  10327. value: true
  10328. });
  10329. exports.default = void 0;
  10330. var _regenerator = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/regenerator */ 29));
  10331. var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/assertThisInitialized */ 31));
  10332. var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ 5));
  10333. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  10334. var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/toConsumableArray */ 18));
  10335. var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/asyncToGenerator */ 32));
  10336. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  10337. var _inherits2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/inherits */ 33));
  10338. var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/possibleConstructorReturn */ 34));
  10339. var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/getPrototypeOf */ 35));
  10340. var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/wrapNativeSuper */ 36));
  10341. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  10342. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  10343. var _pages = _interopRequireDefault(__webpack_require__(/*! @/pages.json */ 38));
  10344. 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; } } }; }
  10345. 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); }
  10346. 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; }
  10347. 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; }
  10348. 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; }
  10349. 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); }; }
  10350. 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; } }
  10351. "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self && self;
  10352. function t(e) {
  10353. return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
  10354. }
  10355. function n(e, t, n) {
  10356. return e(n = {
  10357. path: t,
  10358. exports: {},
  10359. require: function require(e, t) {
  10360. return function () {
  10361. throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
  10362. }(null == t && n.path);
  10363. }
  10364. }, n.exports), n.exports;
  10365. }
  10366. var s = n(function (e, t) {
  10367. var n;
  10368. e.exports = (n = n || function (e, t) {
  10369. var n = Object.create || function () {
  10370. function e() {}
  10371. return function (t) {
  10372. var n;
  10373. return e.prototype = t, n = new e(), e.prototype = null, n;
  10374. };
  10375. }(),
  10376. s = {},
  10377. r = s.lib = {},
  10378. i = r.Base = {
  10379. extend: function extend(e) {
  10380. var t = n(this);
  10381. return e && t.mixIn(e), t.hasOwnProperty("init") && this.init !== t.init || (t.init = function () {
  10382. t.$super.init.apply(this, arguments);
  10383. }), t.init.prototype = t, t.$super = this, t;
  10384. },
  10385. create: function create() {
  10386. var e = this.extend();
  10387. return e.init.apply(e, arguments), e;
  10388. },
  10389. init: function init() {},
  10390. mixIn: function mixIn(e) {
  10391. for (var t in e) {
  10392. e.hasOwnProperty(t) && (this[t] = e[t]);
  10393. }
  10394. e.hasOwnProperty("toString") && (this.toString = e.toString);
  10395. },
  10396. clone: function clone() {
  10397. return this.init.prototype.extend(this);
  10398. }
  10399. },
  10400. o = r.WordArray = i.extend({
  10401. init: function init(e, n) {
  10402. e = this.words = e || [], this.sigBytes = n != t ? n : 4 * e.length;
  10403. },
  10404. toString: function toString(e) {
  10405. return (e || c).stringify(this);
  10406. },
  10407. concat: function concat(e) {
  10408. var t = this.words,
  10409. n = e.words,
  10410. s = this.sigBytes,
  10411. r = e.sigBytes;
  10412. if (this.clamp(), s % 4) for (var i = 0; i < r; i++) {
  10413. var o = n[i >>> 2] >>> 24 - i % 4 * 8 & 255;
  10414. t[s + i >>> 2] |= o << 24 - (s + i) % 4 * 8;
  10415. } else for (i = 0; i < r; i += 4) {
  10416. t[s + i >>> 2] = n[i >>> 2];
  10417. }
  10418. return this.sigBytes += r, this;
  10419. },
  10420. clamp: function clamp() {
  10421. var t = this.words,
  10422. n = this.sigBytes;
  10423. t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);
  10424. },
  10425. clone: function clone() {
  10426. var e = i.clone.call(this);
  10427. return e.words = this.words.slice(0), e;
  10428. },
  10429. random: function random(t) {
  10430. for (var n, s = [], r = function r(t) {
  10431. t = t;
  10432. var n = 987654321,
  10433. s = 4294967295;
  10434. return function () {
  10435. var r = ((n = 36969 * (65535 & n) + (n >> 16) & s) << 16) + (t = 18e3 * (65535 & t) + (t >> 16) & s) & s;
  10436. return r /= 4294967296, (r += .5) * (e.random() > .5 ? 1 : -1);
  10437. };
  10438. }, i = 0; i < t; i += 4) {
  10439. var a = r(4294967296 * (n || e.random()));
  10440. n = 987654071 * a(), s.push(4294967296 * a() | 0);
  10441. }
  10442. return new o.init(s, t);
  10443. }
  10444. }),
  10445. a = s.enc = {},
  10446. c = a.Hex = {
  10447. stringify: function stringify(e) {
  10448. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  10449. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  10450. s.push((i >>> 4).toString(16)), s.push((15 & i).toString(16));
  10451. }
  10452. return s.join("");
  10453. },
  10454. parse: function parse(e) {
  10455. for (var t = e.length, n = [], s = 0; s < t; s += 2) {
  10456. n[s >>> 3] |= parseInt(e.substr(s, 2), 16) << 24 - s % 8 * 4;
  10457. }
  10458. return new o.init(n, t / 2);
  10459. }
  10460. },
  10461. u = a.Latin1 = {
  10462. stringify: function stringify(e) {
  10463. for (var t = e.words, n = e.sigBytes, s = [], r = 0; r < n; r++) {
  10464. var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;
  10465. s.push(String.fromCharCode(i));
  10466. }
  10467. return s.join("");
  10468. },
  10469. parse: function parse(e) {
  10470. for (var t = e.length, n = [], s = 0; s < t; s++) {
  10471. n[s >>> 2] |= (255 & e.charCodeAt(s)) << 24 - s % 4 * 8;
  10472. }
  10473. return new o.init(n, t);
  10474. }
  10475. },
  10476. h = a.Utf8 = {
  10477. stringify: function stringify(e) {
  10478. try {
  10479. return decodeURIComponent(escape(u.stringify(e)));
  10480. } catch (e) {
  10481. throw new Error("Malformed UTF-8 data");
  10482. }
  10483. },
  10484. parse: function parse(e) {
  10485. return u.parse(unescape(encodeURIComponent(e)));
  10486. }
  10487. },
  10488. l = r.BufferedBlockAlgorithm = i.extend({
  10489. reset: function reset() {
  10490. this._data = new o.init(), this._nDataBytes = 0;
  10491. },
  10492. _append: function _append(e) {
  10493. "string" == typeof e && (e = h.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;
  10494. },
  10495. _process: function _process(t) {
  10496. var n = this._data,
  10497. s = n.words,
  10498. r = n.sigBytes,
  10499. i = this.blockSize,
  10500. a = r / (4 * i),
  10501. c = (a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0)) * i,
  10502. u = e.min(4 * c, r);
  10503. if (c) {
  10504. for (var h = 0; h < c; h += i) {
  10505. this._doProcessBlock(s, h);
  10506. }
  10507. var l = s.splice(0, c);
  10508. n.sigBytes -= u;
  10509. }
  10510. return new o.init(l, u);
  10511. },
  10512. clone: function clone() {
  10513. var e = i.clone.call(this);
  10514. return e._data = this._data.clone(), e;
  10515. },
  10516. _minBufferSize: 0
  10517. });
  10518. r.Hasher = l.extend({
  10519. cfg: i.extend(),
  10520. init: function init(e) {
  10521. this.cfg = this.cfg.extend(e), this.reset();
  10522. },
  10523. reset: function reset() {
  10524. l.reset.call(this), this._doReset();
  10525. },
  10526. update: function update(e) {
  10527. return this._append(e), this._process(), this;
  10528. },
  10529. finalize: function finalize(e) {
  10530. return e && this._append(e), this._doFinalize();
  10531. },
  10532. blockSize: 16,
  10533. _createHelper: function _createHelper(e) {
  10534. return function (t, n) {
  10535. return new e.init(n).finalize(t);
  10536. };
  10537. },
  10538. _createHmacHelper: function _createHmacHelper(e) {
  10539. return function (t, n) {
  10540. return new d.HMAC.init(e, n).finalize(t);
  10541. };
  10542. }
  10543. });
  10544. var d = s.algo = {};
  10545. return s;
  10546. }(Math), n);
  10547. }),
  10548. r = s,
  10549. i = (n(function (e, t) {
  10550. var n;
  10551. e.exports = (n = r, function (e) {
  10552. var t = n,
  10553. s = t.lib,
  10554. r = s.WordArray,
  10555. i = s.Hasher,
  10556. o = t.algo,
  10557. a = [];
  10558. !function () {
  10559. for (var t = 0; t < 64; t++) {
  10560. a[t] = 4294967296 * e.abs(e.sin(t + 1)) | 0;
  10561. }
  10562. }();
  10563. var c = o.MD5 = i.extend({
  10564. _doReset: function _doReset() {
  10565. this._hash = new r.init([1732584193, 4023233417, 2562383102, 271733878]);
  10566. },
  10567. _doProcessBlock: function _doProcessBlock(e, t) {
  10568. for (var n = 0; n < 16; n++) {
  10569. var s = t + n,
  10570. r = e[s];
  10571. e[s] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8);
  10572. }
  10573. var i = this._hash.words,
  10574. o = e[t + 0],
  10575. c = e[t + 1],
  10576. p = e[t + 2],
  10577. f = e[t + 3],
  10578. g = e[t + 4],
  10579. m = e[t + 5],
  10580. y = e[t + 6],
  10581. _ = e[t + 7],
  10582. w = e[t + 8],
  10583. v = e[t + 9],
  10584. I = e[t + 10],
  10585. S = e[t + 11],
  10586. b = e[t + 12],
  10587. k = e[t + 13],
  10588. A = e[t + 14],
  10589. P = e[t + 15],
  10590. T = i[0],
  10591. C = i[1],
  10592. x = i[2],
  10593. O = i[3];
  10594. 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 = h(T, C = u(C, x, O, T, P, 22, a[15]), x, O, c, 5, a[16]), O = h(O, T, C, x, y, 9, a[17]), x = h(x, O, T, C, S, 14, a[18]), C = h(C, x, O, T, o, 20, a[19]), T = h(T, C, x, O, m, 5, a[20]), O = h(O, T, C, x, I, 9, a[21]), x = h(x, O, T, C, P, 14, a[22]), C = h(C, x, O, T, g, 20, a[23]), T = h(T, C, x, O, v, 5, a[24]), O = h(O, T, C, x, A, 9, a[25]), x = h(x, O, T, C, f, 14, a[26]), C = h(C, x, O, T, w, 20, a[27]), T = h(T, C, x, O, k, 5, a[28]), O = h(O, T, C, x, p, 9, a[29]), x = h(x, O, T, C, _, 14, a[30]), T = l(T, C = h(C, x, O, T, b, 20, a[31]), x, O, m, 4, a[32]), O = l(O, T, C, x, w, 11, a[33]), x = l(x, O, T, C, S, 16, a[34]), C = l(C, x, O, T, A, 23, a[35]), T = l(T, C, x, O, c, 4, a[36]), O = l(O, T, C, x, g, 11, a[37]), x = l(x, O, T, C, _, 16, a[38]), C = l(C, x, O, T, I, 23, a[39]), T = l(T, C, x, O, k, 4, a[40]), O = l(O, T, C, x, o, 11, a[41]), x = l(x, O, T, C, f, 16, a[42]), C = l(C, x, O, T, y, 23, a[43]), T = l(T, C, x, O, v, 4, a[44]), O = l(O, T, C, x, b, 11, a[45]), x = l(x, O, T, C, P, 16, a[46]), T = d(T, C = l(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;
  10595. },
  10596. _doFinalize: function _doFinalize() {
  10597. var t = this._data,
  10598. n = t.words,
  10599. s = 8 * this._nDataBytes,
  10600. r = 8 * t.sigBytes;
  10601. n[r >>> 5] |= 128 << 24 - r % 32;
  10602. var i = e.floor(s / 4294967296),
  10603. o = s;
  10604. 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();
  10605. for (var a = this._hash, c = a.words, u = 0; u < 4; u++) {
  10606. var h = c[u];
  10607. c[u] = 16711935 & (h << 8 | h >>> 24) | 4278255360 & (h << 24 | h >>> 8);
  10608. }
  10609. return a;
  10610. },
  10611. clone: function clone() {
  10612. var e = i.clone.call(this);
  10613. return e._hash = this._hash.clone(), e;
  10614. }
  10615. });
  10616. function u(e, t, n, s, r, i, o) {
  10617. var a = e + (t & n | ~t & s) + r + o;
  10618. return (a << i | a >>> 32 - i) + t;
  10619. }
  10620. function h(e, t, n, s, r, i, o) {
  10621. var a = e + (t & s | n & ~s) + r + o;
  10622. return (a << i | a >>> 32 - i) + t;
  10623. }
  10624. function l(e, t, n, s, r, i, o) {
  10625. var a = e + (t ^ n ^ s) + r + o;
  10626. return (a << i | a >>> 32 - i) + t;
  10627. }
  10628. function d(e, t, n, s, r, i, o) {
  10629. var a = e + (n ^ (t | ~s)) + r + o;
  10630. return (a << i | a >>> 32 - i) + t;
  10631. }
  10632. t.MD5 = i._createHelper(c), t.HmacMD5 = i._createHmacHelper(c);
  10633. }(Math), n.MD5);
  10634. }), n(function (e, t) {
  10635. var n;
  10636. e.exports = (n = r, void function () {
  10637. var e = n,
  10638. t = e.lib.Base,
  10639. s = e.enc.Utf8;
  10640. e.algo.HMAC = t.extend({
  10641. init: function init(e, t) {
  10642. e = this._hasher = new e.init(), "string" == typeof t && (t = s.parse(t));
  10643. var n = e.blockSize,
  10644. r = 4 * n;
  10645. t.sigBytes > r && (t = e.finalize(t)), t.clamp();
  10646. for (var i = this._oKey = t.clone(), o = this._iKey = t.clone(), a = i.words, c = o.words, u = 0; u < n; u++) {
  10647. a[u] ^= 1549556828, c[u] ^= 909522486;
  10648. }
  10649. i.sigBytes = o.sigBytes = r, this.reset();
  10650. },
  10651. reset: function reset() {
  10652. var e = this._hasher;
  10653. e.reset(), e.update(this._iKey);
  10654. },
  10655. update: function update(e) {
  10656. return this._hasher.update(e), this;
  10657. },
  10658. finalize: function finalize(e) {
  10659. var t = this._hasher,
  10660. n = t.finalize(e);
  10661. return t.reset(), t.finalize(this._oKey.clone().concat(n));
  10662. }
  10663. });
  10664. }());
  10665. }), n(function (e, t) {
  10666. e.exports = r.HmacMD5;
  10667. })),
  10668. o = n(function (e, t) {
  10669. e.exports = r.enc.Utf8;
  10670. }),
  10671. a = n(function (e, t) {
  10672. var n;
  10673. e.exports = (n = r, function () {
  10674. var e = n,
  10675. t = e.lib.WordArray;
  10676. function s(e, n, s) {
  10677. for (var r = [], i = 0, o = 0; o < n; o++) {
  10678. if (o % 4) {
  10679. var a = s[e.charCodeAt(o - 1)] << o % 4 * 2,
  10680. c = s[e.charCodeAt(o)] >>> 6 - o % 4 * 2;
  10681. r[i >>> 2] |= (a | c) << 24 - i % 4 * 8, i++;
  10682. }
  10683. }
  10684. return t.create(r, i);
  10685. }
  10686. e.enc.Base64 = {
  10687. stringify: function stringify(e) {
  10688. var t = e.words,
  10689. n = e.sigBytes,
  10690. s = this._map;
  10691. e.clamp();
  10692. for (var r = [], i = 0; i < n; i += 3) {
  10693. 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++) {
  10694. r.push(s.charAt(o >>> 6 * (3 - a) & 63));
  10695. }
  10696. }
  10697. var c = s.charAt(64);
  10698. if (c) for (; r.length % 4;) {
  10699. r.push(c);
  10700. }
  10701. return r.join("");
  10702. },
  10703. parse: function parse(e) {
  10704. var t = e.length,
  10705. n = this._map,
  10706. r = this._reverseMap;
  10707. if (!r) {
  10708. r = this._reverseMap = [];
  10709. for (var i = 0; i < n.length; i++) {
  10710. r[n.charCodeAt(i)] = i;
  10711. }
  10712. }
  10713. var o = n.charAt(64);
  10714. if (o) {
  10715. var a = e.indexOf(o);
  10716. -1 !== a && (t = a);
  10717. }
  10718. return s(e, t, r);
  10719. },
  10720. _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
  10721. };
  10722. }(), n.enc.Base64);
  10723. });
  10724. var c = "FUNCTION",
  10725. u = "OBJECT",
  10726. h = "CLIENT_DB",
  10727. l = "pending",
  10728. d = "fulfilled",
  10729. p = "rejected";
  10730. function f(e) {
  10731. return Object.prototype.toString.call(e).slice(8, -1).toLowerCase();
  10732. }
  10733. function g(e) {
  10734. return "object" === f(e);
  10735. }
  10736. function m(e) {
  10737. return "function" == typeof e;
  10738. }
  10739. function y(e) {
  10740. return function () {
  10741. try {
  10742. return e.apply(e, arguments);
  10743. } catch (e) {
  10744. console.error(e);
  10745. }
  10746. };
  10747. }
  10748. var _ = "REJECTED",
  10749. w = "NOT_PENDING";
  10750. var v = /*#__PURE__*/function () {
  10751. function v() {
  10752. var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  10753. e = _ref.createPromise,
  10754. _ref$retryRule = _ref.retryRule,
  10755. t = _ref$retryRule === void 0 ? _ : _ref$retryRule;
  10756. (0, _classCallCheck2.default)(this, v);
  10757. this.createPromise = e, this.status = null, this.promise = null, this.retryRule = t;
  10758. }
  10759. (0, _createClass2.default)(v, [{
  10760. key: "needRetry",
  10761. get: function get() {
  10762. if (!this.status) return !0;
  10763. switch (this.retryRule) {
  10764. case _:
  10765. return this.status === p;
  10766. case w:
  10767. return this.status !== l;
  10768. }
  10769. }
  10770. }, {
  10771. key: "exec",
  10772. value: function exec() {
  10773. var _this = this;
  10774. return this.needRetry ? (this.status = l, this.promise = this.createPromise().then(function (e) {
  10775. return _this.status = d, Promise.resolve(e);
  10776. }, function (e) {
  10777. return _this.status = p, Promise.reject(e);
  10778. }), this.promise) : this.promise;
  10779. }
  10780. }]);
  10781. return v;
  10782. }();
  10783. function I(e) {
  10784. return e && "string" == typeof e ? JSON.parse(e) : e;
  10785. }
  10786. var S = "development" === "development",
  10787. b = "mp-weixin",
  10788. k = "true" === undefined || !0 === undefined,
  10789. A = I([]),
  10790. P = "h5" === b ? "web" : "app-plus" === b ? "app" : b,
  10791. T = I(undefined),
  10792. C = I([]) || [],
  10793. x = true;
  10794. var O = "";
  10795. try {
  10796. O = (__webpack_require__(/*! uni-stat-config */ 39).default || __webpack_require__(/*! uni-stat-config */ 39)).appid;
  10797. } catch (e) {}
  10798. var E = {};
  10799. function L(e) {
  10800. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  10801. var n, s;
  10802. return n = E, s = e, Object.prototype.hasOwnProperty.call(n, s) || (E[e] = t), E[e];
  10803. }
  10804. "app" === P && (E = uni._globalUniCloudObj ? uni._globalUniCloudObj : uni._globalUniCloudObj = {});
  10805. var R = ["invoke", "success", "fail", "complete"],
  10806. U = L("_globalUniCloudInterceptor");
  10807. function N(e, t) {
  10808. U[e] || (U[e] = {}), g(t) && Object.keys(t).forEach(function (n) {
  10809. R.indexOf(n) > -1 && function (e, t, n) {
  10810. var s = U[e][t];
  10811. s || (s = U[e][t] = []), -1 === s.indexOf(n) && m(n) && s.push(n);
  10812. }(e, n, t[n]);
  10813. });
  10814. }
  10815. function D(e, t) {
  10816. U[e] || (U[e] = {}), g(t) ? Object.keys(t).forEach(function (n) {
  10817. R.indexOf(n) > -1 && function (e, t, n) {
  10818. var s = U[e][t];
  10819. if (!s) return;
  10820. var r = s.indexOf(n);
  10821. r > -1 && s.splice(r, 1);
  10822. }(e, n, t[n]);
  10823. }) : delete U[e];
  10824. }
  10825. function M(e, t) {
  10826. return e && 0 !== e.length ? e.reduce(function (e, n) {
  10827. return e.then(function () {
  10828. return n(t);
  10829. });
  10830. }, Promise.resolve()) : Promise.resolve();
  10831. }
  10832. function q(e, t) {
  10833. return U[e] && U[e][t] || [];
  10834. }
  10835. function F(e) {
  10836. N("callObject", e);
  10837. }
  10838. var K = L("_globalUniCloudListener"),
  10839. j = "response",
  10840. $ = "needLogin",
  10841. B = "refreshToken",
  10842. W = "clientdb",
  10843. H = "cloudfunction",
  10844. z = "cloudobject";
  10845. function J(e) {
  10846. return K[e] || (K[e] = []), K[e];
  10847. }
  10848. function G(e, t) {
  10849. var n = J(e);
  10850. n.includes(t) || n.push(t);
  10851. }
  10852. function V(e, t) {
  10853. var n = J(e),
  10854. s = n.indexOf(t);
  10855. -1 !== s && n.splice(s, 1);
  10856. }
  10857. function Y(e, t) {
  10858. var n = J(e);
  10859. for (var _e2 = 0; _e2 < n.length; _e2++) {
  10860. (0, n[_e2])(t);
  10861. }
  10862. }
  10863. var Q,
  10864. X = !1;
  10865. function Z() {
  10866. return Q || (Q = new Promise(function (e) {
  10867. X && e(), function t() {
  10868. if ("function" == typeof getCurrentPages) {
  10869. var _t2 = getCurrentPages();
  10870. _t2 && _t2[0] && (X = !0, e());
  10871. }
  10872. X || setTimeout(function () {
  10873. t();
  10874. }, 30);
  10875. }();
  10876. }), Q);
  10877. }
  10878. function ee(e) {
  10879. var t = {};
  10880. for (var _n2 in e) {
  10881. var _s2 = e[_n2];
  10882. m(_s2) && (t[_n2] = y(_s2));
  10883. }
  10884. return t;
  10885. }
  10886. var te = /*#__PURE__*/function (_Error) {
  10887. (0, _inherits2.default)(te, _Error);
  10888. var _super = _createSuper(te);
  10889. function te(e) {
  10890. var _this2;
  10891. (0, _classCallCheck2.default)(this, te);
  10892. _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;
  10893. return _this2;
  10894. }
  10895. (0, _createClass2.default)(te, [{
  10896. key: "toJson",
  10897. value: function toJson() {
  10898. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
  10899. if (!(e >= 10)) return e++, {
  10900. errCode: this.errCode,
  10901. errMsg: this.errMsg,
  10902. errSubject: this.errSubject,
  10903. cause: this.cause && this.cause.toJson ? this.cause.toJson(e) : this.cause
  10904. };
  10905. }
  10906. }]);
  10907. return te;
  10908. }( /*#__PURE__*/(0, _wrapNativeSuper2.default)(Error));
  10909. var ne = {
  10910. request: function request(e) {
  10911. return uni.request(e);
  10912. },
  10913. uploadFile: function uploadFile(e) {
  10914. return uni.uploadFile(e);
  10915. },
  10916. setStorageSync: function setStorageSync(e, t) {
  10917. return uni.setStorageSync(e, t);
  10918. },
  10919. getStorageSync: function getStorageSync(e) {
  10920. return uni.getStorageSync(e);
  10921. },
  10922. removeStorageSync: function removeStorageSync(e) {
  10923. return uni.removeStorageSync(e);
  10924. },
  10925. clearStorageSync: function clearStorageSync() {
  10926. return uni.clearStorageSync();
  10927. }
  10928. };
  10929. function se() {
  10930. return {
  10931. token: ne.getStorageSync("uni_id_token") || ne.getStorageSync("uniIdToken"),
  10932. tokenExpired: ne.getStorageSync("uni_id_token_expired")
  10933. };
  10934. }
  10935. function re() {
  10936. var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  10937. e = _ref2.token,
  10938. t = _ref2.tokenExpired;
  10939. e && ne.setStorageSync("uni_id_token", e), t && ne.setStorageSync("uni_id_token_expired", t);
  10940. }
  10941. var ie, oe;
  10942. function ae() {
  10943. return ie || (ie = uni.getSystemInfoSync()), ie;
  10944. }
  10945. function ce() {
  10946. var e, t;
  10947. try {
  10948. if (uni.getLaunchOptionsSync) {
  10949. if (uni.getLaunchOptionsSync.toString().indexOf("not yet implemented") > -1) return;
  10950. var _uni$getLaunchOptions = uni.getLaunchOptionsSync(),
  10951. _n3 = _uni$getLaunchOptions.scene,
  10952. _s3 = _uni$getLaunchOptions.channel;
  10953. e = _s3, t = _n3;
  10954. }
  10955. } catch (e) {}
  10956. return {
  10957. channel: e,
  10958. scene: t
  10959. };
  10960. }
  10961. function ue() {
  10962. var e = uni.getLocale && uni.getLocale() || "en";
  10963. if (oe) return _objectSpread(_objectSpread({}, oe), {}, {
  10964. locale: e,
  10965. LOCALE: e
  10966. });
  10967. var t = ae(),
  10968. n = t.deviceId,
  10969. s = t.osName,
  10970. r = t.uniPlatform,
  10971. i = t.appId,
  10972. o = ["pixelRatio", "brand", "model", "system", "language", "version", "platform", "host", "SDKVersion", "swanNativeVersion", "app", "AppPlatform", "fontSizeSetting"];
  10973. for (var _e3 = 0; _e3 < o.length; _e3++) {
  10974. delete t[o[_e3]];
  10975. }
  10976. return oe = _objectSpread(_objectSpread({
  10977. PLATFORM: r,
  10978. OS: s,
  10979. APPID: i,
  10980. DEVICEID: n
  10981. }, ce()), t), _objectSpread(_objectSpread({}, oe), {}, {
  10982. locale: e,
  10983. LOCALE: e
  10984. });
  10985. }
  10986. var he = {
  10987. sign: function sign(e, t) {
  10988. var n = "";
  10989. return Object.keys(e).sort().forEach(function (t) {
  10990. e[t] && (n = n + "&" + t + "=" + e[t]);
  10991. }), n = n.slice(1), i(n, t).toString();
  10992. },
  10993. wrappedRequest: function wrappedRequest(e, t) {
  10994. return new Promise(function (n, s) {
  10995. t(Object.assign(e, {
  10996. complete: function complete(e) {
  10997. 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");
  10998. var t = e.data && e.data.header && e.data.header["x-serverless-request-id"] || e.header && e.header["request-id"];
  10999. if (!e.statusCode || e.statusCode >= 400) return s(new te({
  11000. code: "SYS_ERR",
  11001. message: e.errMsg || "request:fail",
  11002. requestId: t
  11003. }));
  11004. var r = e.data;
  11005. if (r.error) return s(new te({
  11006. code: r.error.code,
  11007. message: r.error.message,
  11008. requestId: t
  11009. }));
  11010. r.result = r.data, r.requestId = t, delete r.data, n(r);
  11011. }
  11012. }));
  11013. });
  11014. },
  11015. toBase64: function toBase64(e) {
  11016. return a.stringify(o.parse(e));
  11017. }
  11018. };
  11019. var le = /*#__PURE__*/function () {
  11020. function le(e) {
  11021. var _this3 = this;
  11022. (0, _classCallCheck2.default)(this, le);
  11023. ["spaceId", "clientSecret"].forEach(function (t) {
  11024. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error("".concat(t, " required"));
  11025. }), this.config = Object.assign({}, {
  11026. endpoint: 0 === e.spaceId.indexOf("mp-") ? "https://api.next.bspapp.com" : "https://api.bspapp.com"
  11027. }, 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({
  11028. createPromise: function createPromise() {
  11029. return _this3.requestAuth(_this3.setupRequest({
  11030. method: "serverless.auth.user.anonymousAuthorize",
  11031. params: "{}"
  11032. }, "auth")).then(function (e) {
  11033. if (!e.result || !e.result.accessToken) throw new te({
  11034. code: "AUTH_FAILED",
  11035. message: "获取accessToken失败"
  11036. });
  11037. _this3.setAccessToken(e.result.accessToken);
  11038. });
  11039. },
  11040. retryRule: w
  11041. });
  11042. }
  11043. (0, _createClass2.default)(le, [{
  11044. key: "hasAccessToken",
  11045. get: function get() {
  11046. return !!this.accessToken;
  11047. }
  11048. }, {
  11049. key: "setAccessToken",
  11050. value: function setAccessToken(e) {
  11051. this.accessToken = e;
  11052. }
  11053. }, {
  11054. key: "requestWrapped",
  11055. value: function requestWrapped(e) {
  11056. return he.wrappedRequest(e, this.adapter.request);
  11057. }
  11058. }, {
  11059. key: "requestAuth",
  11060. value: function requestAuth(e) {
  11061. return this.requestWrapped(e);
  11062. }
  11063. }, {
  11064. key: "request",
  11065. value: function request(e, t) {
  11066. var _this4 = this;
  11067. return Promise.resolve().then(function () {
  11068. return _this4.hasAccessToken ? t ? _this4.requestWrapped(e) : _this4.requestWrapped(e).catch(function (t) {
  11069. return new Promise(function (e, n) {
  11070. !t || "GATEWAY_INVALID_TOKEN" !== t.code && "InvalidParameter.InvalidToken" !== t.code ? n(t) : e();
  11071. }).then(function () {
  11072. return _this4.getAccessToken();
  11073. }).then(function () {
  11074. var t = _this4.rebuildRequest(e);
  11075. return _this4.request(t, !0);
  11076. });
  11077. }) : _this4.getAccessToken().then(function () {
  11078. var t = _this4.rebuildRequest(e);
  11079. return _this4.request(t, !0);
  11080. });
  11081. });
  11082. }
  11083. }, {
  11084. key: "rebuildRequest",
  11085. value: function rebuildRequest(e) {
  11086. var t = Object.assign({}, e);
  11087. return t.data.token = this.accessToken, t.header["x-basement-token"] = this.accessToken, t.header["x-serverless-sign"] = he.sign(t.data, this.config.clientSecret), t;
  11088. }
  11089. }, {
  11090. key: "setupRequest",
  11091. value: function setupRequest(e, t) {
  11092. var n = Object.assign({}, e, {
  11093. spaceId: this.config.spaceId,
  11094. timestamp: Date.now()
  11095. }),
  11096. s = {
  11097. "Content-Type": "application/json"
  11098. };
  11099. return "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = he.sign(n, this.config.clientSecret), {
  11100. url: this.config.requestUrl,
  11101. method: "POST",
  11102. data: n,
  11103. dataType: "json",
  11104. header: s
  11105. };
  11106. }
  11107. }, {
  11108. key: "getAccessToken",
  11109. value: function getAccessToken() {
  11110. return this._getAccessTokenPromiseHub.exec();
  11111. }
  11112. }, {
  11113. key: "authorize",
  11114. value: function () {
  11115. var _authorize = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
  11116. return _regenerator.default.wrap(function _callee$(_context) {
  11117. while (1) {
  11118. switch (_context.prev = _context.next) {
  11119. case 0:
  11120. _context.next = 2;
  11121. return this.getAccessToken();
  11122. case 2:
  11123. case "end":
  11124. return _context.stop();
  11125. }
  11126. }
  11127. }, _callee, this);
  11128. }));
  11129. function authorize() {
  11130. return _authorize.apply(this, arguments);
  11131. }
  11132. return authorize;
  11133. }()
  11134. }, {
  11135. key: "callFunction",
  11136. value: function callFunction(e) {
  11137. var t = {
  11138. method: "serverless.function.runtime.invoke",
  11139. params: JSON.stringify({
  11140. functionTarget: e.name,
  11141. functionArgs: e.data || {}
  11142. })
  11143. };
  11144. return this.request(this.setupRequest(t));
  11145. }
  11146. }, {
  11147. key: "getOSSUploadOptionsFromPath",
  11148. value: function getOSSUploadOptionsFromPath(e) {
  11149. var t = {
  11150. method: "serverless.file.resource.generateProximalSign",
  11151. params: JSON.stringify(e)
  11152. };
  11153. return this.request(this.setupRequest(t));
  11154. }
  11155. }, {
  11156. key: "uploadFileToOSS",
  11157. value: function uploadFileToOSS(_ref3) {
  11158. var _this5 = this;
  11159. var e = _ref3.url,
  11160. t = _ref3.formData,
  11161. n = _ref3.name,
  11162. s = _ref3.filePath,
  11163. r = _ref3.fileType,
  11164. i = _ref3.onUploadProgress;
  11165. return new Promise(function (o, a) {
  11166. var c = _this5.adapter.uploadFile({
  11167. url: e,
  11168. formData: t,
  11169. name: n,
  11170. filePath: s,
  11171. fileType: r,
  11172. header: {
  11173. "X-OSS-server-side-encrpytion": "AES256"
  11174. },
  11175. success: function success(e) {
  11176. e && e.statusCode < 400 ? o(e) : a(new te({
  11177. code: "UPLOAD_FAILED",
  11178. message: "文件上传失败"
  11179. }));
  11180. },
  11181. fail: function fail(e) {
  11182. a(new te({
  11183. code: e.code || "UPLOAD_FAILED",
  11184. message: e.message || e.errMsg || "文件上传失败"
  11185. }));
  11186. }
  11187. });
  11188. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  11189. i({
  11190. loaded: e.totalBytesSent,
  11191. total: e.totalBytesExpectedToSend
  11192. });
  11193. });
  11194. });
  11195. }
  11196. }, {
  11197. key: "reportOSSUpload",
  11198. value: function reportOSSUpload(e) {
  11199. var t = {
  11200. method: "serverless.file.resource.report",
  11201. params: JSON.stringify(e)
  11202. };
  11203. return this.request(this.setupRequest(t));
  11204. }
  11205. }, {
  11206. key: "uploadFile",
  11207. value: function () {
  11208. var _uploadFile = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(_ref4) {
  11209. var e, t, _ref4$fileType, n, _ref4$cloudPathAsReal, s, r, i, o, a, c, u, h, l, d, p, g, m, y, _, _e4, w;
  11210. return _regenerator.default.wrap(function _callee2$(_context2) {
  11211. while (1) {
  11212. switch (_context2.prev = _context2.next) {
  11213. case 0:
  11214. 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;
  11215. if (!("string" !== f(t))) {
  11216. _context2.next = 3;
  11217. break;
  11218. }
  11219. throw new te({
  11220. code: "INVALID_PARAM",
  11221. message: "cloudPath必须为字符串类型"
  11222. });
  11223. case 3:
  11224. if (t = t.trim()) {
  11225. _context2.next = 5;
  11226. break;
  11227. }
  11228. throw new te({
  11229. code: "INVALID_PARAM",
  11230. message: "cloudPath不可为空"
  11231. });
  11232. case 5:
  11233. if (!/:\/\//.test(t)) {
  11234. _context2.next = 7;
  11235. break;
  11236. }
  11237. throw new te({
  11238. code: "INVALID_PARAM",
  11239. message: "cloudPath不合法"
  11240. });
  11241. case 7:
  11242. o = i && i.envType || this.config.envType;
  11243. if (!(s && ("/" !== t[0] && (t = "/" + t), t.indexOf("\\") > -1))) {
  11244. _context2.next = 10;
  11245. break;
  11246. }
  11247. throw new te({
  11248. code: "INVALID_PARAM",
  11249. message: "使用cloudPath作为路径时,cloudPath不可包含“\\”"
  11250. });
  11251. case 10:
  11252. _context2.next = 12;
  11253. return this.getOSSUploadOptionsFromPath({
  11254. env: o,
  11255. filename: s ? t.split("/").pop() : t,
  11256. fileId: s ? t : void 0
  11257. });
  11258. case 12:
  11259. a = _context2.sent.result;
  11260. c = "https://" + a.cdnDomain + "/" + a.ossPath;
  11261. u = a.securityToken;
  11262. h = a.accessKeyId;
  11263. l = a.signature;
  11264. d = a.host;
  11265. p = a.ossPath;
  11266. g = a.id;
  11267. m = a.policy;
  11268. y = a.ossCallbackUrl;
  11269. _ = {
  11270. "Cache-Control": "max-age=2592000",
  11271. "Content-Disposition": "attachment",
  11272. OSSAccessKeyId: h,
  11273. Signature: l,
  11274. host: d,
  11275. id: g,
  11276. key: p,
  11277. policy: m,
  11278. success_action_status: 200
  11279. };
  11280. if (u && (_["x-oss-security-token"] = u), y) {
  11281. _e4 = JSON.stringify({
  11282. callbackUrl: y,
  11283. callbackBody: JSON.stringify({
  11284. fileId: g,
  11285. spaceId: this.config.spaceId
  11286. }),
  11287. callbackBodyType: "application/json"
  11288. });
  11289. _.callback = he.toBase64(_e4);
  11290. }
  11291. w = {
  11292. url: "https://" + a.host,
  11293. formData: _,
  11294. fileName: "file",
  11295. name: "file",
  11296. filePath: e,
  11297. fileType: n
  11298. };
  11299. _context2.next = 27;
  11300. return this.uploadFileToOSS(Object.assign({}, w, {
  11301. onUploadProgress: r
  11302. }));
  11303. case 27:
  11304. if (!y) {
  11305. _context2.next = 29;
  11306. break;
  11307. }
  11308. return _context2.abrupt("return", {
  11309. success: !0,
  11310. filePath: e,
  11311. fileID: c
  11312. });
  11313. case 29:
  11314. _context2.next = 31;
  11315. return this.reportOSSUpload({
  11316. id: g
  11317. });
  11318. case 31:
  11319. if (!_context2.sent.success) {
  11320. _context2.next = 33;
  11321. break;
  11322. }
  11323. return _context2.abrupt("return", {
  11324. success: !0,
  11325. filePath: e,
  11326. fileID: c
  11327. });
  11328. case 33:
  11329. throw new te({
  11330. code: "UPLOAD_FAILED",
  11331. message: "文件上传失败"
  11332. });
  11333. case 34:
  11334. case "end":
  11335. return _context2.stop();
  11336. }
  11337. }
  11338. }, _callee2, this);
  11339. }));
  11340. function uploadFile(_x) {
  11341. return _uploadFile.apply(this, arguments);
  11342. }
  11343. return uploadFile;
  11344. }()
  11345. }, {
  11346. key: "getTempFileURL",
  11347. value: function getTempFileURL() {
  11348. var _ref5 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  11349. e = _ref5.fileList;
  11350. return new Promise(function (t, n) {
  11351. Array.isArray(e) && 0 !== e.length || n(new te({
  11352. code: "INVALID_PARAM",
  11353. message: "fileList的元素必须是非空的字符串"
  11354. })), t({
  11355. fileList: e.map(function (e) {
  11356. return {
  11357. fileID: e,
  11358. tempFileURL: e
  11359. };
  11360. })
  11361. });
  11362. });
  11363. }
  11364. }, {
  11365. key: "getFileInfo",
  11366. value: function () {
  11367. var _getFileInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
  11368. var _ref6,
  11369. e,
  11370. t,
  11371. _args3 = arguments;
  11372. return _regenerator.default.wrap(function _callee3$(_context3) {
  11373. while (1) {
  11374. switch (_context3.prev = _context3.next) {
  11375. case 0:
  11376. _ref6 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, e = _ref6.fileList;
  11377. if (!(!Array.isArray(e) || 0 === e.length)) {
  11378. _context3.next = 3;
  11379. break;
  11380. }
  11381. throw new te({
  11382. code: "INVALID_PARAM",
  11383. message: "fileList的元素必须是非空的字符串"
  11384. });
  11385. case 3:
  11386. t = {
  11387. method: "serverless.file.resource.info",
  11388. params: JSON.stringify({
  11389. id: e.map(function (e) {
  11390. return e.split("?")[0];
  11391. }).join(",")
  11392. })
  11393. };
  11394. _context3.next = 6;
  11395. return this.request(this.setupRequest(t));
  11396. case 6:
  11397. _context3.t0 = _context3.sent.result;
  11398. return _context3.abrupt("return", {
  11399. fileList: _context3.t0
  11400. });
  11401. case 8:
  11402. case "end":
  11403. return _context3.stop();
  11404. }
  11405. }
  11406. }, _callee3, this);
  11407. }));
  11408. function getFileInfo() {
  11409. return _getFileInfo.apply(this, arguments);
  11410. }
  11411. return getFileInfo;
  11412. }()
  11413. }]);
  11414. return le;
  11415. }();
  11416. var de = {
  11417. init: function init(e) {
  11418. var t = new le(e),
  11419. n = {
  11420. signInAnonymously: function signInAnonymously() {
  11421. return t.authorize();
  11422. },
  11423. getLoginState: function getLoginState() {
  11424. return Promise.resolve(!1);
  11425. }
  11426. };
  11427. return t.auth = function () {
  11428. return n;
  11429. }, t.customAuth = t.auth, t;
  11430. }
  11431. };
  11432. var pe = "undefined" != typeof location && "http:" === location.protocol ? "http:" : "https:";
  11433. var fe;
  11434. !function (e) {
  11435. e.local = "local", e.none = "none", e.session = "session";
  11436. }(fe || (fe = {}));
  11437. var ge = function ge() {},
  11438. me = n(function (e, t) {
  11439. var n;
  11440. e.exports = (n = r, function (e) {
  11441. var t = n,
  11442. s = t.lib,
  11443. r = s.WordArray,
  11444. i = s.Hasher,
  11445. o = t.algo,
  11446. a = [],
  11447. c = [];
  11448. !function () {
  11449. function t(t) {
  11450. for (var n = e.sqrt(t), s = 2; s <= n; s++) {
  11451. if (!(t % s)) return !1;
  11452. }
  11453. return !0;
  11454. }
  11455. function n(e) {
  11456. return 4294967296 * (e - (0 | e)) | 0;
  11457. }
  11458. for (var s = 2, r = 0; r < 64;) {
  11459. t(s) && (r < 8 && (a[r] = n(e.pow(s, .5))), c[r] = n(e.pow(s, 1 / 3)), r++), s++;
  11460. }
  11461. }();
  11462. var u = [],
  11463. h = o.SHA256 = i.extend({
  11464. _doReset: function _doReset() {
  11465. this._hash = new r.init(a.slice(0));
  11466. },
  11467. _doProcessBlock: function _doProcessBlock(e, t) {
  11468. for (var n = this._hash.words, s = n[0], r = n[1], i = n[2], o = n[3], a = n[4], h = n[5], l = n[6], d = n[7], p = 0; p < 64; p++) {
  11469. if (p < 16) u[p] = 0 | e[t + p];else {
  11470. var f = u[p - 15],
  11471. g = (f << 25 | f >>> 7) ^ (f << 14 | f >>> 18) ^ f >>> 3,
  11472. m = u[p - 2],
  11473. y = (m << 15 | m >>> 17) ^ (m << 13 | m >>> 19) ^ m >>> 10;
  11474. u[p] = g + u[p - 7] + y + u[p - 16];
  11475. }
  11476. var _ = s & r ^ s & i ^ r & i,
  11477. w = (s << 30 | s >>> 2) ^ (s << 19 | s >>> 13) ^ (s << 10 | s >>> 22),
  11478. v = d + ((a << 26 | a >>> 6) ^ (a << 21 | a >>> 11) ^ (a << 7 | a >>> 25)) + (a & h ^ ~a & l) + c[p] + u[p];
  11479. d = l, l = h, h = a, a = o + v | 0, o = i, i = r, r = s, s = v + (w + _) | 0;
  11480. }
  11481. 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] + h | 0, n[6] = n[6] + l | 0, n[7] = n[7] + d | 0;
  11482. },
  11483. _doFinalize: function _doFinalize() {
  11484. var t = this._data,
  11485. n = t.words,
  11486. s = 8 * this._nDataBytes,
  11487. r = 8 * t.sigBytes;
  11488. 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;
  11489. },
  11490. clone: function clone() {
  11491. var e = i.clone.call(this);
  11492. return e._hash = this._hash.clone(), e;
  11493. }
  11494. });
  11495. t.SHA256 = i._createHelper(h), t.HmacSHA256 = i._createHmacHelper(h);
  11496. }(Math), n.SHA256);
  11497. }),
  11498. ye = me,
  11499. _e = n(function (e, t) {
  11500. e.exports = r.HmacSHA256;
  11501. });
  11502. var we = function we() {
  11503. var e;
  11504. if (!Promise) {
  11505. e = function e() {}, e.promise = {};
  11506. var _t3 = function _t3() {
  11507. throw new te({
  11508. message: 'Your Node runtime does support ES6 Promises. Set "global.Promise" to your preferred implementation of promises.'
  11509. });
  11510. };
  11511. return Object.defineProperty(e.promise, "then", {
  11512. get: _t3
  11513. }), Object.defineProperty(e.promise, "catch", {
  11514. get: _t3
  11515. }), e;
  11516. }
  11517. var t = new Promise(function (t, n) {
  11518. e = function e(_e5, s) {
  11519. return _e5 ? n(_e5) : t(s);
  11520. };
  11521. });
  11522. return e.promise = t, e;
  11523. };
  11524. function ve(e) {
  11525. return void 0 === e;
  11526. }
  11527. function Ie(e) {
  11528. return "[object Null]" === Object.prototype.toString.call(e);
  11529. }
  11530. var Se;
  11531. function be(e) {
  11532. var t = (n = e, "[object Array]" === Object.prototype.toString.call(n) ? e : [e]);
  11533. var n;
  11534. var _iterator = _createForOfIteratorHelper(t),
  11535. _step;
  11536. try {
  11537. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  11538. var _e6 = _step.value;
  11539. var _t4 = _e6.isMatch,
  11540. _n4 = _e6.genAdapter,
  11541. _s4 = _e6.runtime;
  11542. if (_t4()) return {
  11543. adapter: _n4(),
  11544. runtime: _s4
  11545. };
  11546. }
  11547. } catch (err) {
  11548. _iterator.e(err);
  11549. } finally {
  11550. _iterator.f();
  11551. }
  11552. }
  11553. !function (e) {
  11554. e.WEB = "web", e.WX_MP = "wx_mp";
  11555. }(Se || (Se = {}));
  11556. var ke = {
  11557. adapter: null,
  11558. runtime: void 0
  11559. },
  11560. Ae = ["anonymousUuidKey"];
  11561. var Pe = /*#__PURE__*/function (_ge) {
  11562. (0, _inherits2.default)(Pe, _ge);
  11563. var _super2 = _createSuper(Pe);
  11564. function Pe() {
  11565. var _this6;
  11566. (0, _classCallCheck2.default)(this, Pe);
  11567. _this6 = _super2.call(this), ke.adapter.root.tcbObject || (ke.adapter.root.tcbObject = {});
  11568. return _this6;
  11569. }
  11570. (0, _createClass2.default)(Pe, [{
  11571. key: "setItem",
  11572. value: function setItem(e, t) {
  11573. ke.adapter.root.tcbObject[e] = t;
  11574. }
  11575. }, {
  11576. key: "getItem",
  11577. value: function getItem(e) {
  11578. return ke.adapter.root.tcbObject[e];
  11579. }
  11580. }, {
  11581. key: "removeItem",
  11582. value: function removeItem(e) {
  11583. delete ke.adapter.root.tcbObject[e];
  11584. }
  11585. }, {
  11586. key: "clear",
  11587. value: function clear() {
  11588. delete ke.adapter.root.tcbObject;
  11589. }
  11590. }]);
  11591. return Pe;
  11592. }(ge);
  11593. function Te(e, t) {
  11594. switch (e) {
  11595. case "local":
  11596. return t.localStorage || new Pe();
  11597. case "none":
  11598. return new Pe();
  11599. default:
  11600. return t.sessionStorage || new Pe();
  11601. }
  11602. }
  11603. var Ce = /*#__PURE__*/function () {
  11604. function Ce(e) {
  11605. (0, _classCallCheck2.default)(this, Ce);
  11606. if (!this._storage) {
  11607. this._persistence = ke.adapter.primaryStorage || e.persistence, this._storage = Te(this._persistence, ke.adapter);
  11608. var _t5 = "access_token_".concat(e.env),
  11609. _n5 = "access_token_expire_".concat(e.env),
  11610. _s5 = "refresh_token_".concat(e.env),
  11611. _r = "anonymous_uuid_".concat(e.env),
  11612. _i = "login_type_".concat(e.env),
  11613. _o = "user_info_".concat(e.env);
  11614. this.keys = {
  11615. accessTokenKey: _t5,
  11616. accessTokenExpireKey: _n5,
  11617. refreshTokenKey: _s5,
  11618. anonymousUuidKey: _r,
  11619. loginTypeKey: _i,
  11620. userInfoKey: _o
  11621. };
  11622. }
  11623. }
  11624. (0, _createClass2.default)(Ce, [{
  11625. key: "updatePersistence",
  11626. value: function updatePersistence(e) {
  11627. if (e === this._persistence) return;
  11628. var t = "local" === this._persistence;
  11629. this._persistence = e;
  11630. var n = Te(e, ke.adapter);
  11631. for (var _e7 in this.keys) {
  11632. var _s6 = this.keys[_e7];
  11633. if (t && Ae.includes(_e7)) continue;
  11634. var _r2 = this._storage.getItem(_s6);
  11635. ve(_r2) || Ie(_r2) || (n.setItem(_s6, _r2), this._storage.removeItem(_s6));
  11636. }
  11637. this._storage = n;
  11638. }
  11639. }, {
  11640. key: "setStore",
  11641. value: function setStore(e, t, n) {
  11642. if (!this._storage) return;
  11643. var s = {
  11644. version: n || "localCachev1",
  11645. content: t
  11646. },
  11647. r = JSON.stringify(s);
  11648. try {
  11649. this._storage.setItem(e, r);
  11650. } catch (e) {
  11651. throw e;
  11652. }
  11653. }
  11654. }, {
  11655. key: "getStore",
  11656. value: function getStore(e, t) {
  11657. try {
  11658. if (!this._storage) return;
  11659. } catch (e) {
  11660. return "";
  11661. }
  11662. t = t || "localCachev1";
  11663. var n = this._storage.getItem(e);
  11664. if (!n) return "";
  11665. if (n.indexOf(t) >= 0) {
  11666. return JSON.parse(n).content;
  11667. }
  11668. return "";
  11669. }
  11670. }, {
  11671. key: "removeStore",
  11672. value: function removeStore(e) {
  11673. this._storage.removeItem(e);
  11674. }
  11675. }]);
  11676. return Ce;
  11677. }();
  11678. var xe = {},
  11679. Oe = {};
  11680. function Ee(e) {
  11681. return xe[e];
  11682. }
  11683. var Le = /*#__PURE__*/(0, _createClass2.default)(function Le(e, t) {
  11684. (0, _classCallCheck2.default)(this, Le);
  11685. this.data = t || null, this.name = e;
  11686. });
  11687. var Re = /*#__PURE__*/function (_Le) {
  11688. (0, _inherits2.default)(Re, _Le);
  11689. var _super3 = _createSuper(Re);
  11690. function Re(e, t) {
  11691. var _this7;
  11692. (0, _classCallCheck2.default)(this, Re);
  11693. _this7 = _super3.call(this, "error", {
  11694. error: e,
  11695. data: t
  11696. }), _this7.error = e;
  11697. return _this7;
  11698. }
  11699. return (0, _createClass2.default)(Re);
  11700. }(Le);
  11701. var Ue = new ( /*#__PURE__*/function () {
  11702. function _class() {
  11703. (0, _classCallCheck2.default)(this, _class);
  11704. this._listeners = {};
  11705. }
  11706. (0, _createClass2.default)(_class, [{
  11707. key: "on",
  11708. value: function on(e, t) {
  11709. return function (e, t, n) {
  11710. n[e] = n[e] || [], n[e].push(t);
  11711. }(e, t, this._listeners), this;
  11712. }
  11713. }, {
  11714. key: "off",
  11715. value: function off(e, t) {
  11716. return function (e, t, n) {
  11717. if (n && n[e]) {
  11718. var _s7 = n[e].indexOf(t);
  11719. -1 !== _s7 && n[e].splice(_s7, 1);
  11720. }
  11721. }(e, t, this._listeners), this;
  11722. }
  11723. }, {
  11724. key: "fire",
  11725. value: function fire(e, t) {
  11726. if (e instanceof Re) return console.error(e.error), this;
  11727. var n = "string" == typeof e ? new Le(e, t || {}) : e;
  11728. var s = n.name;
  11729. if (this._listens(s)) {
  11730. n.target = this;
  11731. var _e8 = this._listeners[s] ? (0, _toConsumableArray2.default)(this._listeners[s]) : [];
  11732. var _iterator2 = _createForOfIteratorHelper(_e8),
  11733. _step2;
  11734. try {
  11735. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  11736. var _t6 = _step2.value;
  11737. _t6.call(this, n);
  11738. }
  11739. } catch (err) {
  11740. _iterator2.e(err);
  11741. } finally {
  11742. _iterator2.f();
  11743. }
  11744. }
  11745. return this;
  11746. }
  11747. }, {
  11748. key: "_listens",
  11749. value: function _listens(e) {
  11750. return this._listeners[e] && this._listeners[e].length > 0;
  11751. }
  11752. }]);
  11753. return _class;
  11754. }())();
  11755. function Ne(e, t) {
  11756. Ue.on(e, t);
  11757. }
  11758. function De(e) {
  11759. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  11760. Ue.fire(e, t);
  11761. }
  11762. function Me(e, t) {
  11763. Ue.off(e, t);
  11764. }
  11765. var qe = "loginStateChanged",
  11766. Fe = "loginStateExpire",
  11767. Ke = "loginTypeChanged",
  11768. je = "anonymousConverted",
  11769. $e = "refreshAccessToken";
  11770. var Be;
  11771. !function (e) {
  11772. 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";
  11773. }(Be || (Be = {}));
  11774. var We = ["auth.getJwt", "auth.logout", "auth.signInWithTicket", "auth.signInAnonymously", "auth.signIn", "auth.fetchAccessTokenWithRefreshToken", "auth.signUpWithEmailAndPassword", "auth.activateEndUserMail", "auth.sendPasswordResetEmail", "auth.resetPasswordWithToken", "auth.isUsernameRegistered"],
  11775. He = {
  11776. "X-SDK-Version": "1.3.5"
  11777. };
  11778. function ze(e, t, n) {
  11779. var s = e[t];
  11780. e[t] = function (t) {
  11781. var r = {},
  11782. i = {};
  11783. n.forEach(function (n) {
  11784. var _n$call = n.call(e, t),
  11785. s = _n$call.data,
  11786. o = _n$call.headers;
  11787. Object.assign(r, s), Object.assign(i, o);
  11788. });
  11789. var o = t.data;
  11790. return o && function () {
  11791. var e;
  11792. if (e = o, "[object FormData]" !== Object.prototype.toString.call(e)) t.data = _objectSpread(_objectSpread({}, o), r);else for (var _e9 in r) {
  11793. o.append(_e9, r[_e9]);
  11794. }
  11795. }(), t.headers = _objectSpread(_objectSpread({}, t.headers || {}), i), s.call(e, t);
  11796. };
  11797. }
  11798. function Je() {
  11799. var e = Math.random().toString(16).slice(2);
  11800. return {
  11801. data: {
  11802. seqId: e
  11803. },
  11804. headers: _objectSpread(_objectSpread({}, He), {}, {
  11805. "x-seqid": e
  11806. })
  11807. };
  11808. }
  11809. var Ge = /*#__PURE__*/function () {
  11810. function Ge() {
  11811. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11812. (0, _classCallCheck2.default)(this, Ge);
  11813. var t;
  11814. this.config = e, this._reqClass = new ke.adapter.reqClass({
  11815. timeout: this.config.timeout,
  11816. timeoutMsg: "\u8BF7\u6C42\u5728".concat(this.config.timeout / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD"),
  11817. restrictedMethods: ["post"]
  11818. }), 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]);
  11819. }
  11820. (0, _createClass2.default)(Ge, [{
  11821. key: "post",
  11822. value: function () {
  11823. var _post = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee4(e) {
  11824. return _regenerator.default.wrap(function _callee4$(_context4) {
  11825. while (1) {
  11826. switch (_context4.prev = _context4.next) {
  11827. case 0:
  11828. _context4.next = 2;
  11829. return this._reqClass.post(e);
  11830. case 2:
  11831. return _context4.abrupt("return", _context4.sent);
  11832. case 3:
  11833. case "end":
  11834. return _context4.stop();
  11835. }
  11836. }
  11837. }, _callee4, this);
  11838. }));
  11839. function post(_x2) {
  11840. return _post.apply(this, arguments);
  11841. }
  11842. return post;
  11843. }()
  11844. }, {
  11845. key: "upload",
  11846. value: function () {
  11847. var _upload = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee5(e) {
  11848. return _regenerator.default.wrap(function _callee5$(_context5) {
  11849. while (1) {
  11850. switch (_context5.prev = _context5.next) {
  11851. case 0:
  11852. _context5.next = 2;
  11853. return this._reqClass.upload(e);
  11854. case 2:
  11855. return _context5.abrupt("return", _context5.sent);
  11856. case 3:
  11857. case "end":
  11858. return _context5.stop();
  11859. }
  11860. }
  11861. }, _callee5, this);
  11862. }));
  11863. function upload(_x3) {
  11864. return _upload.apply(this, arguments);
  11865. }
  11866. return upload;
  11867. }()
  11868. }, {
  11869. key: "download",
  11870. value: function () {
  11871. var _download = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee6(e) {
  11872. return _regenerator.default.wrap(function _callee6$(_context6) {
  11873. while (1) {
  11874. switch (_context6.prev = _context6.next) {
  11875. case 0:
  11876. _context6.next = 2;
  11877. return this._reqClass.download(e);
  11878. case 2:
  11879. return _context6.abrupt("return", _context6.sent);
  11880. case 3:
  11881. case "end":
  11882. return _context6.stop();
  11883. }
  11884. }
  11885. }, _callee6, this);
  11886. }));
  11887. function download(_x4) {
  11888. return _download.apply(this, arguments);
  11889. }
  11890. return download;
  11891. }()
  11892. }, {
  11893. key: "refreshAccessToken",
  11894. value: function () {
  11895. var _refreshAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee7() {
  11896. var e, t;
  11897. return _regenerator.default.wrap(function _callee7$(_context7) {
  11898. while (1) {
  11899. switch (_context7.prev = _context7.next) {
  11900. case 0:
  11901. this._refreshAccessTokenPromise || (this._refreshAccessTokenPromise = this._refreshAccessToken());
  11902. _context7.prev = 1;
  11903. _context7.next = 4;
  11904. return this._refreshAccessTokenPromise;
  11905. case 4:
  11906. e = _context7.sent;
  11907. _context7.next = 10;
  11908. break;
  11909. case 7:
  11910. _context7.prev = 7;
  11911. _context7.t0 = _context7["catch"](1);
  11912. t = _context7.t0;
  11913. case 10:
  11914. if (!(this._refreshAccessTokenPromise = null, this._shouldRefreshAccessTokenHook = null, t)) {
  11915. _context7.next = 12;
  11916. break;
  11917. }
  11918. throw t;
  11919. case 12:
  11920. return _context7.abrupt("return", e);
  11921. case 13:
  11922. case "end":
  11923. return _context7.stop();
  11924. }
  11925. }
  11926. }, _callee7, this, [[1, 7]]);
  11927. }));
  11928. function refreshAccessToken() {
  11929. return _refreshAccessToken2.apply(this, arguments);
  11930. }
  11931. return refreshAccessToken;
  11932. }()
  11933. }, {
  11934. key: "_refreshAccessToken",
  11935. value: function () {
  11936. var _refreshAccessToken3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee8() {
  11937. var _this$_cache$keys, e, t, n, s, r, i, o, a, _e10, _e11, _t7, _s8;
  11938. return _regenerator.default.wrap(function _callee8$(_context8) {
  11939. while (1) {
  11940. switch (_context8.prev = _context8.next) {
  11941. case 0:
  11942. _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;
  11943. this._cache.removeStore(e), this._cache.removeStore(t);
  11944. i = this._cache.getStore(n);
  11945. if (i) {
  11946. _context8.next = 5;
  11947. break;
  11948. }
  11949. throw new te({
  11950. message: "未登录CloudBase"
  11951. });
  11952. case 5:
  11953. o = {
  11954. refresh_token: i
  11955. };
  11956. _context8.next = 8;
  11957. return this.request("auth.fetchAccessTokenWithRefreshToken", o);
  11958. case 8:
  11959. a = _context8.sent;
  11960. if (!a.data.code) {
  11961. _context8.next = 21;
  11962. break;
  11963. }
  11964. _e10 = a.data.code;
  11965. if (!("SIGN_PARAM_INVALID" === _e10 || "REFRESH_TOKEN_EXPIRED" === _e10 || "INVALID_REFRESH_TOKEN" === _e10)) {
  11966. _context8.next = 20;
  11967. break;
  11968. }
  11969. if (!(this._cache.getStore(s) === Be.ANONYMOUS && "INVALID_REFRESH_TOKEN" === _e10)) {
  11970. _context8.next = 19;
  11971. break;
  11972. }
  11973. _e11 = this._cache.getStore(r);
  11974. _t7 = this._cache.getStore(n);
  11975. _context8.next = 17;
  11976. return this.send("auth.signInAnonymously", {
  11977. anonymous_uuid: _e11,
  11978. refresh_token: _t7
  11979. });
  11980. case 17:
  11981. _s8 = _context8.sent;
  11982. return _context8.abrupt("return", (this.setRefreshToken(_s8.refresh_token), this._refreshAccessToken()));
  11983. case 19:
  11984. De(Fe), this._cache.removeStore(n);
  11985. case 20:
  11986. throw new te({
  11987. code: a.data.code,
  11988. message: "\u5237\u65B0access token\u5931\u8D25\uFF1A".concat(a.data.code)
  11989. });
  11990. case 21:
  11991. if (!a.data.access_token) {
  11992. _context8.next = 23;
  11993. break;
  11994. }
  11995. return _context8.abrupt("return", (De($e), this._cache.setStore(e, a.data.access_token), this._cache.setStore(t, a.data.access_token_expire + Date.now()), {
  11996. accessToken: a.data.access_token,
  11997. accessTokenExpire: a.data.access_token_expire
  11998. }));
  11999. case 23:
  12000. a.data.refresh_token && (this._cache.removeStore(n), this._cache.setStore(n, a.data.refresh_token), this._refreshAccessToken());
  12001. case 24:
  12002. case "end":
  12003. return _context8.stop();
  12004. }
  12005. }
  12006. }, _callee8, this);
  12007. }));
  12008. function _refreshAccessToken() {
  12009. return _refreshAccessToken3.apply(this, arguments);
  12010. }
  12011. return _refreshAccessToken;
  12012. }()
  12013. }, {
  12014. key: "getAccessToken",
  12015. value: function () {
  12016. var _getAccessToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee9() {
  12017. var _this$_cache$keys2, e, t, n, s, r, i;
  12018. return _regenerator.default.wrap(function _callee9$(_context9) {
  12019. while (1) {
  12020. switch (_context9.prev = _context9.next) {
  12021. case 0:
  12022. _this$_cache$keys2 = this._cache.keys, e = _this$_cache$keys2.accessTokenKey, t = _this$_cache$keys2.accessTokenExpireKey, n = _this$_cache$keys2.refreshTokenKey;
  12023. if (this._cache.getStore(n)) {
  12024. _context9.next = 3;
  12025. break;
  12026. }
  12027. throw new te({
  12028. message: "refresh token不存在,登录状态异常"
  12029. });
  12030. case 3:
  12031. s = this._cache.getStore(e), r = this._cache.getStore(t), i = !0;
  12032. _context9.t0 = this._shouldRefreshAccessTokenHook;
  12033. if (!_context9.t0) {
  12034. _context9.next = 9;
  12035. break;
  12036. }
  12037. _context9.next = 8;
  12038. return this._shouldRefreshAccessTokenHook(s, r);
  12039. case 8:
  12040. _context9.t0 = !_context9.sent;
  12041. case 9:
  12042. _context9.t1 = _context9.t0;
  12043. if (!_context9.t1) {
  12044. _context9.next = 12;
  12045. break;
  12046. }
  12047. i = !1;
  12048. case 12:
  12049. return _context9.abrupt("return", (!s || !r || r < Date.now()) && i ? this.refreshAccessToken() : {
  12050. accessToken: s,
  12051. accessTokenExpire: r
  12052. });
  12053. case 13:
  12054. case "end":
  12055. return _context9.stop();
  12056. }
  12057. }
  12058. }, _callee9, this);
  12059. }));
  12060. function getAccessToken() {
  12061. return _getAccessToken.apply(this, arguments);
  12062. }
  12063. return getAccessToken;
  12064. }()
  12065. }, {
  12066. key: "request",
  12067. value: function () {
  12068. var _request = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(e, t, n) {
  12069. var s, r, i, _e12, o, _e13, _e14, a, c, u, h, l, d, p, f, g;
  12070. return _regenerator.default.wrap(function _callee10$(_context10) {
  12071. while (1) {
  12072. switch (_context10.prev = _context10.next) {
  12073. case 0:
  12074. s = "x-tcb-trace_".concat(this.config.env);
  12075. r = "application/x-www-form-urlencoded";
  12076. i = _objectSpread({
  12077. action: e,
  12078. env: this.config.env,
  12079. dataVersion: "2019-08-16"
  12080. }, t);
  12081. if (!(-1 === We.indexOf(e))) {
  12082. _context10.next = 10;
  12083. break;
  12084. }
  12085. _e12 = this._cache.keys.refreshTokenKey;
  12086. _context10.t0 = this._cache.getStore(_e12);
  12087. if (!_context10.t0) {
  12088. _context10.next = 10;
  12089. break;
  12090. }
  12091. _context10.next = 9;
  12092. return this.getAccessToken();
  12093. case 9:
  12094. i.access_token = _context10.sent.accessToken;
  12095. case 10:
  12096. if ("storage.uploadFile" === e) {
  12097. o = new FormData();
  12098. for (_e13 in o) {
  12099. o.hasOwnProperty(_e13) && void 0 !== o[_e13] && o.append(_e13, i[_e13]);
  12100. }
  12101. r = "multipart/form-data";
  12102. } else {
  12103. r = "application/json", o = {};
  12104. for (_e14 in i) {
  12105. void 0 !== i[_e14] && (o[_e14] = i[_e14]);
  12106. }
  12107. }
  12108. a = {
  12109. headers: {
  12110. "content-type": r
  12111. }
  12112. };
  12113. n && n.onUploadProgress && (a.onUploadProgress = n.onUploadProgress);
  12114. c = this._localCache.getStore(s);
  12115. c && (a.headers["X-TCB-Trace"] = c);
  12116. u = t.parse, h = t.inQuery, l = t.search;
  12117. d = {
  12118. env: this.config.env
  12119. };
  12120. u && (d.parse = !0), h && (d = _objectSpread(_objectSpread({}, h), d));
  12121. p = function (e, t) {
  12122. var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  12123. var s = /\?/.test(t);
  12124. var r = "";
  12125. for (var _e15 in n) {
  12126. "" === r ? !s && (t += "?") : r += "&", r += "".concat(_e15, "=").concat(encodeURIComponent(n[_e15]));
  12127. }
  12128. return /^http(s)?\:\/\//.test(t += r) ? t : "".concat(e).concat(t);
  12129. }(pe, "//tcb-api.tencentcloudapi.com/web", d);
  12130. l && (p += l);
  12131. _context10.next = 22;
  12132. return this.post(_objectSpread({
  12133. url: p,
  12134. data: o
  12135. }, a));
  12136. case 22:
  12137. f = _context10.sent;
  12138. g = f.header && f.header["x-tcb-trace"];
  12139. if (!(g && this._localCache.setStore(s, g), 200 !== Number(f.status) && 200 !== Number(f.statusCode) || !f.data)) {
  12140. _context10.next = 26;
  12141. break;
  12142. }
  12143. throw new te({
  12144. code: "NETWORK_ERROR",
  12145. message: "network request error"
  12146. });
  12147. case 26:
  12148. return _context10.abrupt("return", f);
  12149. case 27:
  12150. case "end":
  12151. return _context10.stop();
  12152. }
  12153. }
  12154. }, _callee10, this);
  12155. }));
  12156. function request(_x5, _x6, _x7) {
  12157. return _request.apply(this, arguments);
  12158. }
  12159. return request;
  12160. }()
  12161. }, {
  12162. key: "send",
  12163. value: function () {
  12164. var _send = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(e) {
  12165. var t,
  12166. n,
  12167. _n6,
  12168. _args11 = arguments;
  12169. return _regenerator.default.wrap(function _callee11$(_context11) {
  12170. while (1) {
  12171. switch (_context11.prev = _context11.next) {
  12172. case 0:
  12173. t = _args11.length > 1 && _args11[1] !== undefined ? _args11[1] : {};
  12174. _context11.next = 3;
  12175. return this.request(e, t, {
  12176. onUploadProgress: t.onUploadProgress
  12177. });
  12178. case 3:
  12179. n = _context11.sent;
  12180. if (!("ACCESS_TOKEN_EXPIRED" === n.data.code && -1 === We.indexOf(e))) {
  12181. _context11.next = 13;
  12182. break;
  12183. }
  12184. _context11.next = 7;
  12185. return this.refreshAccessToken();
  12186. case 7:
  12187. _context11.next = 9;
  12188. return this.request(e, t, {
  12189. onUploadProgress: t.onUploadProgress
  12190. });
  12191. case 9:
  12192. _n6 = _context11.sent;
  12193. if (!_n6.data.code) {
  12194. _context11.next = 12;
  12195. break;
  12196. }
  12197. throw new te({
  12198. code: _n6.data.code,
  12199. message: _n6.data.message
  12200. });
  12201. case 12:
  12202. return _context11.abrupt("return", _n6.data);
  12203. case 13:
  12204. if (!n.data.code) {
  12205. _context11.next = 15;
  12206. break;
  12207. }
  12208. throw new te({
  12209. code: n.data.code,
  12210. message: n.data.message
  12211. });
  12212. case 15:
  12213. return _context11.abrupt("return", n.data);
  12214. case 16:
  12215. case "end":
  12216. return _context11.stop();
  12217. }
  12218. }
  12219. }, _callee11, this);
  12220. }));
  12221. function send(_x8) {
  12222. return _send.apply(this, arguments);
  12223. }
  12224. return send;
  12225. }()
  12226. }, {
  12227. key: "setRefreshToken",
  12228. value: function setRefreshToken(e) {
  12229. var _this$_cache$keys3 = this._cache.keys,
  12230. t = _this$_cache$keys3.accessTokenKey,
  12231. n = _this$_cache$keys3.accessTokenExpireKey,
  12232. s = _this$_cache$keys3.refreshTokenKey;
  12233. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  12234. }
  12235. }]);
  12236. return Ge;
  12237. }();
  12238. var Ve = {};
  12239. function Ye(e) {
  12240. return Ve[e];
  12241. }
  12242. var Qe = /*#__PURE__*/function () {
  12243. function Qe(e) {
  12244. (0, _classCallCheck2.default)(this, Qe);
  12245. this.config = e, this._cache = Ee(e.env), this._request = Ye(e.env);
  12246. }
  12247. (0, _createClass2.default)(Qe, [{
  12248. key: "setRefreshToken",
  12249. value: function setRefreshToken(e) {
  12250. var _this$_cache$keys4 = this._cache.keys,
  12251. t = _this$_cache$keys4.accessTokenKey,
  12252. n = _this$_cache$keys4.accessTokenExpireKey,
  12253. s = _this$_cache$keys4.refreshTokenKey;
  12254. this._cache.removeStore(t), this._cache.removeStore(n), this._cache.setStore(s, e);
  12255. }
  12256. }, {
  12257. key: "setAccessToken",
  12258. value: function setAccessToken(e, t) {
  12259. var _this$_cache$keys5 = this._cache.keys,
  12260. n = _this$_cache$keys5.accessTokenKey,
  12261. s = _this$_cache$keys5.accessTokenExpireKey;
  12262. this._cache.setStore(n, e), this._cache.setStore(s, t);
  12263. }
  12264. }, {
  12265. key: "refreshUserInfo",
  12266. value: function () {
  12267. var _refreshUserInfo = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee12() {
  12268. var _yield$this$_request$, e;
  12269. return _regenerator.default.wrap(function _callee12$(_context12) {
  12270. while (1) {
  12271. switch (_context12.prev = _context12.next) {
  12272. case 0:
  12273. _context12.next = 2;
  12274. return this._request.send("auth.getUserInfo", {});
  12275. case 2:
  12276. _yield$this$_request$ = _context12.sent;
  12277. e = _yield$this$_request$.data;
  12278. return _context12.abrupt("return", (this.setLocalUserInfo(e), e));
  12279. case 5:
  12280. case "end":
  12281. return _context12.stop();
  12282. }
  12283. }
  12284. }, _callee12, this);
  12285. }));
  12286. function refreshUserInfo() {
  12287. return _refreshUserInfo.apply(this, arguments);
  12288. }
  12289. return refreshUserInfo;
  12290. }()
  12291. }, {
  12292. key: "setLocalUserInfo",
  12293. value: function setLocalUserInfo(e) {
  12294. var t = this._cache.keys.userInfoKey;
  12295. this._cache.setStore(t, e);
  12296. }
  12297. }]);
  12298. return Qe;
  12299. }();
  12300. var Xe = /*#__PURE__*/function () {
  12301. function Xe(e) {
  12302. (0, _classCallCheck2.default)(this, Xe);
  12303. if (!e) throw new te({
  12304. code: "PARAM_ERROR",
  12305. message: "envId is not defined"
  12306. });
  12307. this._envId = e, this._cache = Ee(this._envId), this._request = Ye(this._envId), this.setUserInfo();
  12308. }
  12309. (0, _createClass2.default)(Xe, [{
  12310. key: "linkWithTicket",
  12311. value: function linkWithTicket(e) {
  12312. if ("string" != typeof e) throw new te({
  12313. code: "PARAM_ERROR",
  12314. message: "ticket must be string"
  12315. });
  12316. return this._request.send("auth.linkWithTicket", {
  12317. ticket: e
  12318. });
  12319. }
  12320. }, {
  12321. key: "linkWithRedirect",
  12322. value: function linkWithRedirect(e) {
  12323. e.signInWithRedirect();
  12324. }
  12325. }, {
  12326. key: "updatePassword",
  12327. value: function updatePassword(e, t) {
  12328. return this._request.send("auth.updatePassword", {
  12329. oldPassword: t,
  12330. newPassword: e
  12331. });
  12332. }
  12333. }, {
  12334. key: "updateEmail",
  12335. value: function updateEmail(e) {
  12336. return this._request.send("auth.updateEmail", {
  12337. newEmail: e
  12338. });
  12339. }
  12340. }, {
  12341. key: "updateUsername",
  12342. value: function updateUsername(e) {
  12343. if ("string" != typeof e) throw new te({
  12344. code: "PARAM_ERROR",
  12345. message: "username must be a string"
  12346. });
  12347. return this._request.send("auth.updateUsername", {
  12348. username: e
  12349. });
  12350. }
  12351. }, {
  12352. key: "getLinkedUidList",
  12353. value: function () {
  12354. var _getLinkedUidList = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee13() {
  12355. var _yield$this$_request$2, e, t, n;
  12356. return _regenerator.default.wrap(function _callee13$(_context13) {
  12357. while (1) {
  12358. switch (_context13.prev = _context13.next) {
  12359. case 0:
  12360. _context13.next = 2;
  12361. return this._request.send("auth.getLinkedUidList", {});
  12362. case 2:
  12363. _yield$this$_request$2 = _context13.sent;
  12364. e = _yield$this$_request$2.data;
  12365. t = !1;
  12366. n = e.users;
  12367. return _context13.abrupt("return", (n.forEach(function (e) {
  12368. e.wxOpenId && e.wxPublicId && (t = !0);
  12369. }), {
  12370. users: n,
  12371. hasPrimaryUid: t
  12372. }));
  12373. case 7:
  12374. case "end":
  12375. return _context13.stop();
  12376. }
  12377. }
  12378. }, _callee13, this);
  12379. }));
  12380. function getLinkedUidList() {
  12381. return _getLinkedUidList.apply(this, arguments);
  12382. }
  12383. return getLinkedUidList;
  12384. }()
  12385. }, {
  12386. key: "setPrimaryUid",
  12387. value: function setPrimaryUid(e) {
  12388. return this._request.send("auth.setPrimaryUid", {
  12389. uid: e
  12390. });
  12391. }
  12392. }, {
  12393. key: "unlink",
  12394. value: function unlink(e) {
  12395. return this._request.send("auth.unlink", {
  12396. platform: e
  12397. });
  12398. }
  12399. }, {
  12400. key: "update",
  12401. value: function () {
  12402. var _update = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee14(e) {
  12403. var t, n, s, r, i, o, _yield$this$_request$3, a;
  12404. return _regenerator.default.wrap(function _callee14$(_context14) {
  12405. while (1) {
  12406. switch (_context14.prev = _context14.next) {
  12407. case 0:
  12408. t = e.nickName;
  12409. n = e.gender;
  12410. s = e.avatarUrl;
  12411. r = e.province;
  12412. i = e.country;
  12413. o = e.city;
  12414. _context14.next = 8;
  12415. return this._request.send("auth.updateUserInfo", {
  12416. nickName: t,
  12417. gender: n,
  12418. avatarUrl: s,
  12419. province: r,
  12420. country: i,
  12421. city: o
  12422. });
  12423. case 8:
  12424. _yield$this$_request$3 = _context14.sent;
  12425. a = _yield$this$_request$3.data;
  12426. this.setLocalUserInfo(a);
  12427. case 11:
  12428. case "end":
  12429. return _context14.stop();
  12430. }
  12431. }
  12432. }, _callee14, this);
  12433. }));
  12434. function update(_x9) {
  12435. return _update.apply(this, arguments);
  12436. }
  12437. return update;
  12438. }()
  12439. }, {
  12440. key: "refresh",
  12441. value: function () {
  12442. var _refresh = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee15() {
  12443. var _yield$this$_request$4, e;
  12444. return _regenerator.default.wrap(function _callee15$(_context15) {
  12445. while (1) {
  12446. switch (_context15.prev = _context15.next) {
  12447. case 0:
  12448. _context15.next = 2;
  12449. return this._request.send("auth.getUserInfo", {});
  12450. case 2:
  12451. _yield$this$_request$4 = _context15.sent;
  12452. e = _yield$this$_request$4.data;
  12453. return _context15.abrupt("return", (this.setLocalUserInfo(e), e));
  12454. case 5:
  12455. case "end":
  12456. return _context15.stop();
  12457. }
  12458. }
  12459. }, _callee15, this);
  12460. }));
  12461. function refresh() {
  12462. return _refresh.apply(this, arguments);
  12463. }
  12464. return refresh;
  12465. }()
  12466. }, {
  12467. key: "setUserInfo",
  12468. value: function setUserInfo() {
  12469. var _this8 = this;
  12470. var e = this._cache.keys.userInfoKey,
  12471. t = this._cache.getStore(e);
  12472. ["uid", "loginType", "openid", "wxOpenId", "wxPublicId", "unionId", "qqMiniOpenId", "email", "hasPassword", "customUserId", "nickName", "gender", "avatarUrl"].forEach(function (e) {
  12473. _this8[e] = t[e];
  12474. }), this.location = {
  12475. country: t.country,
  12476. province: t.province,
  12477. city: t.city
  12478. };
  12479. }
  12480. }, {
  12481. key: "setLocalUserInfo",
  12482. value: function setLocalUserInfo(e) {
  12483. var t = this._cache.keys.userInfoKey;
  12484. this._cache.setStore(t, e), this.setUserInfo();
  12485. }
  12486. }]);
  12487. return Xe;
  12488. }();
  12489. var Ze = /*#__PURE__*/function () {
  12490. function Ze(e) {
  12491. (0, _classCallCheck2.default)(this, Ze);
  12492. if (!e) throw new te({
  12493. code: "PARAM_ERROR",
  12494. message: "envId is not defined"
  12495. });
  12496. this._cache = Ee(e);
  12497. var _this$_cache$keys6 = this._cache.keys,
  12498. t = _this$_cache$keys6.refreshTokenKey,
  12499. n = _this$_cache$keys6.accessTokenKey,
  12500. s = _this$_cache$keys6.accessTokenExpireKey,
  12501. r = this._cache.getStore(t),
  12502. i = this._cache.getStore(n),
  12503. o = this._cache.getStore(s);
  12504. this.credential = {
  12505. refreshToken: r,
  12506. accessToken: i,
  12507. accessTokenExpire: o
  12508. }, this.user = new Xe(e);
  12509. }
  12510. (0, _createClass2.default)(Ze, [{
  12511. key: "isAnonymousAuth",
  12512. get: function get() {
  12513. return this.loginType === Be.ANONYMOUS;
  12514. }
  12515. }, {
  12516. key: "isCustomAuth",
  12517. get: function get() {
  12518. return this.loginType === Be.CUSTOM;
  12519. }
  12520. }, {
  12521. key: "isWeixinAuth",
  12522. get: function get() {
  12523. return this.loginType === Be.WECHAT || this.loginType === Be.WECHAT_OPEN || this.loginType === Be.WECHAT_PUBLIC;
  12524. }
  12525. }, {
  12526. key: "loginType",
  12527. get: function get() {
  12528. return this._cache.getStore(this._cache.keys.loginTypeKey);
  12529. }
  12530. }]);
  12531. return Ze;
  12532. }();
  12533. var et = /*#__PURE__*/function (_Qe) {
  12534. (0, _inherits2.default)(et, _Qe);
  12535. var _super4 = _createSuper(et);
  12536. function et() {
  12537. (0, _classCallCheck2.default)(this, et);
  12538. return _super4.apply(this, arguments);
  12539. }
  12540. (0, _createClass2.default)(et, [{
  12541. key: "signIn",
  12542. value: function () {
  12543. var _signIn = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee16() {
  12544. var _this$_cache$keys7, e, t, n, s, r, _e16;
  12545. return _regenerator.default.wrap(function _callee16$(_context16) {
  12546. while (1) {
  12547. switch (_context16.prev = _context16.next) {
  12548. case 0:
  12549. this._cache.updatePersistence("local");
  12550. _this$_cache$keys7 = this._cache.keys;
  12551. e = _this$_cache$keys7.anonymousUuidKey;
  12552. t = _this$_cache$keys7.refreshTokenKey;
  12553. n = this._cache.getStore(e) || void 0;
  12554. s = this._cache.getStore(t) || void 0;
  12555. _context16.next = 8;
  12556. return this._request.send("auth.signInAnonymously", {
  12557. anonymous_uuid: n,
  12558. refresh_token: s
  12559. });
  12560. case 8:
  12561. r = _context16.sent;
  12562. if (!(r.uuid && r.refresh_token)) {
  12563. _context16.next = 20;
  12564. break;
  12565. }
  12566. this._setAnonymousUUID(r.uuid);
  12567. this.setRefreshToken(r.refresh_token);
  12568. _context16.next = 14;
  12569. return this._request.refreshAccessToken();
  12570. case 14:
  12571. De(qe);
  12572. De(Ke, {
  12573. env: this.config.env,
  12574. loginType: Be.ANONYMOUS,
  12575. persistence: "local"
  12576. });
  12577. _e16 = new Ze(this.config.env);
  12578. _context16.next = 19;
  12579. return _e16.user.refresh();
  12580. case 19:
  12581. return _context16.abrupt("return", _e16);
  12582. case 20:
  12583. throw new te({
  12584. message: "匿名登录失败"
  12585. });
  12586. case 21:
  12587. case "end":
  12588. return _context16.stop();
  12589. }
  12590. }
  12591. }, _callee16, this);
  12592. }));
  12593. function signIn() {
  12594. return _signIn.apply(this, arguments);
  12595. }
  12596. return signIn;
  12597. }()
  12598. }, {
  12599. key: "linkAndRetrieveDataWithTicket",
  12600. value: function () {
  12601. var _linkAndRetrieveDataWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee17(e) {
  12602. var _this$_cache$keys8, t, n, s, r, i;
  12603. return _regenerator.default.wrap(function _callee17$(_context17) {
  12604. while (1) {
  12605. switch (_context17.prev = _context17.next) {
  12606. case 0:
  12607. _this$_cache$keys8 = this._cache.keys;
  12608. t = _this$_cache$keys8.anonymousUuidKey;
  12609. n = _this$_cache$keys8.refreshTokenKey;
  12610. s = this._cache.getStore(t);
  12611. r = this._cache.getStore(n);
  12612. _context17.next = 7;
  12613. return this._request.send("auth.linkAndRetrieveDataWithTicket", {
  12614. anonymous_uuid: s,
  12615. refresh_token: r,
  12616. ticket: e
  12617. });
  12618. case 7:
  12619. i = _context17.sent;
  12620. if (!i.refresh_token) {
  12621. _context17.next = 16;
  12622. break;
  12623. }
  12624. this._clearAnonymousUUID();
  12625. this.setRefreshToken(i.refresh_token);
  12626. _context17.next = 13;
  12627. return this._request.refreshAccessToken();
  12628. case 13:
  12629. De(je, {
  12630. env: this.config.env
  12631. });
  12632. De(Ke, {
  12633. loginType: Be.CUSTOM,
  12634. persistence: "local"
  12635. });
  12636. return _context17.abrupt("return", {
  12637. credential: {
  12638. refreshToken: i.refresh_token
  12639. }
  12640. });
  12641. case 16:
  12642. throw new te({
  12643. message: "匿名转化失败"
  12644. });
  12645. case 17:
  12646. case "end":
  12647. return _context17.stop();
  12648. }
  12649. }
  12650. }, _callee17, this);
  12651. }));
  12652. function linkAndRetrieveDataWithTicket(_x10) {
  12653. return _linkAndRetrieveDataWithTicket.apply(this, arguments);
  12654. }
  12655. return linkAndRetrieveDataWithTicket;
  12656. }()
  12657. }, {
  12658. key: "_setAnonymousUUID",
  12659. value: function _setAnonymousUUID(e) {
  12660. var _this$_cache$keys9 = this._cache.keys,
  12661. t = _this$_cache$keys9.anonymousUuidKey,
  12662. n = _this$_cache$keys9.loginTypeKey;
  12663. this._cache.removeStore(t), this._cache.setStore(t, e), this._cache.setStore(n, Be.ANONYMOUS);
  12664. }
  12665. }, {
  12666. key: "_clearAnonymousUUID",
  12667. value: function _clearAnonymousUUID() {
  12668. this._cache.removeStore(this._cache.keys.anonymousUuidKey);
  12669. }
  12670. }]);
  12671. return et;
  12672. }(Qe);
  12673. var tt = /*#__PURE__*/function (_Qe2) {
  12674. (0, _inherits2.default)(tt, _Qe2);
  12675. var _super5 = _createSuper(tt);
  12676. function tt() {
  12677. (0, _classCallCheck2.default)(this, tt);
  12678. return _super5.apply(this, arguments);
  12679. }
  12680. (0, _createClass2.default)(tt, [{
  12681. key: "signIn",
  12682. value: function () {
  12683. var _signIn2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee18(e) {
  12684. var t, n;
  12685. return _regenerator.default.wrap(function _callee18$(_context18) {
  12686. while (1) {
  12687. switch (_context18.prev = _context18.next) {
  12688. case 0:
  12689. if (!("string" != typeof e)) {
  12690. _context18.next = 2;
  12691. break;
  12692. }
  12693. throw new te({
  12694. code: "PARAM_ERROR",
  12695. message: "ticket must be a string"
  12696. });
  12697. case 2:
  12698. t = this._cache.keys.refreshTokenKey;
  12699. _context18.next = 5;
  12700. return this._request.send("auth.signInWithTicket", {
  12701. ticket: e,
  12702. refresh_token: this._cache.getStore(t) || ""
  12703. });
  12704. case 5:
  12705. n = _context18.sent;
  12706. if (!n.refresh_token) {
  12707. _context18.next = 15;
  12708. break;
  12709. }
  12710. this.setRefreshToken(n.refresh_token);
  12711. _context18.next = 10;
  12712. return this._request.refreshAccessToken();
  12713. case 10:
  12714. De(qe);
  12715. De(Ke, {
  12716. env: this.config.env,
  12717. loginType: Be.CUSTOM,
  12718. persistence: this.config.persistence
  12719. });
  12720. _context18.next = 14;
  12721. return this.refreshUserInfo();
  12722. case 14:
  12723. return _context18.abrupt("return", new Ze(this.config.env));
  12724. case 15:
  12725. throw new te({
  12726. message: "自定义登录失败"
  12727. });
  12728. case 16:
  12729. case "end":
  12730. return _context18.stop();
  12731. }
  12732. }
  12733. }, _callee18, this);
  12734. }));
  12735. function signIn(_x11) {
  12736. return _signIn2.apply(this, arguments);
  12737. }
  12738. return signIn;
  12739. }()
  12740. }]);
  12741. return tt;
  12742. }(Qe);
  12743. var nt = /*#__PURE__*/function (_Qe3) {
  12744. (0, _inherits2.default)(nt, _Qe3);
  12745. var _super6 = _createSuper(nt);
  12746. function nt() {
  12747. (0, _classCallCheck2.default)(this, nt);
  12748. return _super6.apply(this, arguments);
  12749. }
  12750. (0, _createClass2.default)(nt, [{
  12751. key: "signIn",
  12752. value: function () {
  12753. var _signIn3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee19(e, t) {
  12754. var n, s, r, i, o;
  12755. return _regenerator.default.wrap(function _callee19$(_context19) {
  12756. while (1) {
  12757. switch (_context19.prev = _context19.next) {
  12758. case 0:
  12759. if (!("string" != typeof e)) {
  12760. _context19.next = 2;
  12761. break;
  12762. }
  12763. throw new te({
  12764. code: "PARAM_ERROR",
  12765. message: "email must be a string"
  12766. });
  12767. case 2:
  12768. n = this._cache.keys.refreshTokenKey;
  12769. _context19.next = 5;
  12770. return this._request.send("auth.signIn", {
  12771. loginType: "EMAIL",
  12772. email: e,
  12773. password: t,
  12774. refresh_token: this._cache.getStore(n) || ""
  12775. });
  12776. case 5:
  12777. s = _context19.sent;
  12778. r = s.refresh_token;
  12779. i = s.access_token;
  12780. o = s.access_token_expire;
  12781. if (!r) {
  12782. _context19.next = 22;
  12783. break;
  12784. }
  12785. this.setRefreshToken(r);
  12786. if (!(i && o)) {
  12787. _context19.next = 15;
  12788. break;
  12789. }
  12790. this.setAccessToken(i, o);
  12791. _context19.next = 17;
  12792. break;
  12793. case 15:
  12794. _context19.next = 17;
  12795. return this._request.refreshAccessToken();
  12796. case 17:
  12797. _context19.next = 19;
  12798. return this.refreshUserInfo();
  12799. case 19:
  12800. De(qe);
  12801. De(Ke, {
  12802. env: this.config.env,
  12803. loginType: Be.EMAIL,
  12804. persistence: this.config.persistence
  12805. });
  12806. return _context19.abrupt("return", new Ze(this.config.env));
  12807. case 22:
  12808. throw s.code ? new te({
  12809. code: s.code,
  12810. message: "\u90AE\u7BB1\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  12811. }) : new te({
  12812. message: "邮箱登录失败"
  12813. });
  12814. case 23:
  12815. case "end":
  12816. return _context19.stop();
  12817. }
  12818. }
  12819. }, _callee19, this);
  12820. }));
  12821. function signIn(_x12, _x13) {
  12822. return _signIn3.apply(this, arguments);
  12823. }
  12824. return signIn;
  12825. }()
  12826. }, {
  12827. key: "activate",
  12828. value: function () {
  12829. var _activate = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee20(e) {
  12830. return _regenerator.default.wrap(function _callee20$(_context20) {
  12831. while (1) {
  12832. switch (_context20.prev = _context20.next) {
  12833. case 0:
  12834. return _context20.abrupt("return", this._request.send("auth.activateEndUserMail", {
  12835. token: e
  12836. }));
  12837. case 1:
  12838. case "end":
  12839. return _context20.stop();
  12840. }
  12841. }
  12842. }, _callee20, this);
  12843. }));
  12844. function activate(_x14) {
  12845. return _activate.apply(this, arguments);
  12846. }
  12847. return activate;
  12848. }()
  12849. }, {
  12850. key: "resetPasswordWithToken",
  12851. value: function () {
  12852. var _resetPasswordWithToken = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee21(e, t) {
  12853. return _regenerator.default.wrap(function _callee21$(_context21) {
  12854. while (1) {
  12855. switch (_context21.prev = _context21.next) {
  12856. case 0:
  12857. return _context21.abrupt("return", this._request.send("auth.resetPasswordWithToken", {
  12858. token: e,
  12859. newPassword: t
  12860. }));
  12861. case 1:
  12862. case "end":
  12863. return _context21.stop();
  12864. }
  12865. }
  12866. }, _callee21, this);
  12867. }));
  12868. function resetPasswordWithToken(_x15, _x16) {
  12869. return _resetPasswordWithToken.apply(this, arguments);
  12870. }
  12871. return resetPasswordWithToken;
  12872. }()
  12873. }]);
  12874. return nt;
  12875. }(Qe);
  12876. var st = /*#__PURE__*/function (_Qe4) {
  12877. (0, _inherits2.default)(st, _Qe4);
  12878. var _super7 = _createSuper(st);
  12879. function st() {
  12880. (0, _classCallCheck2.default)(this, st);
  12881. return _super7.apply(this, arguments);
  12882. }
  12883. (0, _createClass2.default)(st, [{
  12884. key: "signIn",
  12885. value: function () {
  12886. var _signIn4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee22(e, t) {
  12887. var n, s, r, i, o;
  12888. return _regenerator.default.wrap(function _callee22$(_context22) {
  12889. while (1) {
  12890. switch (_context22.prev = _context22.next) {
  12891. case 0:
  12892. if (!("string" != typeof e)) {
  12893. _context22.next = 2;
  12894. break;
  12895. }
  12896. throw new te({
  12897. code: "PARAM_ERROR",
  12898. message: "username must be a string"
  12899. });
  12900. case 2:
  12901. "string" != typeof t && (t = "", console.warn("password is empty"));
  12902. n = this._cache.keys.refreshTokenKey;
  12903. _context22.next = 6;
  12904. return this._request.send("auth.signIn", {
  12905. loginType: Be.USERNAME,
  12906. username: e,
  12907. password: t,
  12908. refresh_token: this._cache.getStore(n) || ""
  12909. });
  12910. case 6:
  12911. s = _context22.sent;
  12912. r = s.refresh_token;
  12913. i = s.access_token_expire;
  12914. o = s.access_token;
  12915. if (!r) {
  12916. _context22.next = 23;
  12917. break;
  12918. }
  12919. this.setRefreshToken(r);
  12920. if (!(o && i)) {
  12921. _context22.next = 16;
  12922. break;
  12923. }
  12924. this.setAccessToken(o, i);
  12925. _context22.next = 18;
  12926. break;
  12927. case 16:
  12928. _context22.next = 18;
  12929. return this._request.refreshAccessToken();
  12930. case 18:
  12931. _context22.next = 20;
  12932. return this.refreshUserInfo();
  12933. case 20:
  12934. De(qe);
  12935. De(Ke, {
  12936. env: this.config.env,
  12937. loginType: Be.USERNAME,
  12938. persistence: this.config.persistence
  12939. });
  12940. return _context22.abrupt("return", new Ze(this.config.env));
  12941. case 23:
  12942. throw s.code ? new te({
  12943. code: s.code,
  12944. message: "\u7528\u6237\u540D\u5BC6\u7801\u767B\u5F55\u5931\u8D25: ".concat(s.message)
  12945. }) : new te({
  12946. message: "用户名密码登录失败"
  12947. });
  12948. case 24:
  12949. case "end":
  12950. return _context22.stop();
  12951. }
  12952. }
  12953. }, _callee22, this);
  12954. }));
  12955. function signIn(_x17, _x18) {
  12956. return _signIn4.apply(this, arguments);
  12957. }
  12958. return signIn;
  12959. }()
  12960. }]);
  12961. return st;
  12962. }(Qe);
  12963. var rt = /*#__PURE__*/function () {
  12964. function rt(e) {
  12965. (0, _classCallCheck2.default)(this, rt);
  12966. 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);
  12967. }
  12968. (0, _createClass2.default)(rt, [{
  12969. key: "currentUser",
  12970. get: function get() {
  12971. var e = this.hasLoginState();
  12972. return e && e.user || null;
  12973. }
  12974. }, {
  12975. key: "loginType",
  12976. get: function get() {
  12977. return this._cache.getStore(this._cache.keys.loginTypeKey);
  12978. }
  12979. }, {
  12980. key: "anonymousAuthProvider",
  12981. value: function anonymousAuthProvider() {
  12982. return new et(this.config);
  12983. }
  12984. }, {
  12985. key: "customAuthProvider",
  12986. value: function customAuthProvider() {
  12987. return new tt(this.config);
  12988. }
  12989. }, {
  12990. key: "emailAuthProvider",
  12991. value: function emailAuthProvider() {
  12992. return new nt(this.config);
  12993. }
  12994. }, {
  12995. key: "usernameAuthProvider",
  12996. value: function usernameAuthProvider() {
  12997. return new st(this.config);
  12998. }
  12999. }, {
  13000. key: "signInAnonymously",
  13001. value: function () {
  13002. var _signInAnonymously = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee23() {
  13003. return _regenerator.default.wrap(function _callee23$(_context23) {
  13004. while (1) {
  13005. switch (_context23.prev = _context23.next) {
  13006. case 0:
  13007. return _context23.abrupt("return", new et(this.config).signIn());
  13008. case 1:
  13009. case "end":
  13010. return _context23.stop();
  13011. }
  13012. }
  13013. }, _callee23, this);
  13014. }));
  13015. function signInAnonymously() {
  13016. return _signInAnonymously.apply(this, arguments);
  13017. }
  13018. return signInAnonymously;
  13019. }()
  13020. }, {
  13021. key: "signInWithEmailAndPassword",
  13022. value: function () {
  13023. var _signInWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee24(e, t) {
  13024. return _regenerator.default.wrap(function _callee24$(_context24) {
  13025. while (1) {
  13026. switch (_context24.prev = _context24.next) {
  13027. case 0:
  13028. return _context24.abrupt("return", new nt(this.config).signIn(e, t));
  13029. case 1:
  13030. case "end":
  13031. return _context24.stop();
  13032. }
  13033. }
  13034. }, _callee24, this);
  13035. }));
  13036. function signInWithEmailAndPassword(_x19, _x20) {
  13037. return _signInWithEmailAndPassword.apply(this, arguments);
  13038. }
  13039. return signInWithEmailAndPassword;
  13040. }()
  13041. }, {
  13042. key: "signInWithUsernameAndPassword",
  13043. value: function signInWithUsernameAndPassword(e, t) {
  13044. return new st(this.config).signIn(e, t);
  13045. }
  13046. }, {
  13047. key: "linkAndRetrieveDataWithTicket",
  13048. value: function () {
  13049. var _linkAndRetrieveDataWithTicket2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(e) {
  13050. return _regenerator.default.wrap(function _callee25$(_context25) {
  13051. while (1) {
  13052. switch (_context25.prev = _context25.next) {
  13053. case 0:
  13054. this._anonymousAuthProvider || (this._anonymousAuthProvider = new et(this.config)), Ne(je, this._onAnonymousConverted);
  13055. _context25.next = 3;
  13056. return this._anonymousAuthProvider.linkAndRetrieveDataWithTicket(e);
  13057. case 3:
  13058. return _context25.abrupt("return", _context25.sent);
  13059. case 4:
  13060. case "end":
  13061. return _context25.stop();
  13062. }
  13063. }
  13064. }, _callee25, this);
  13065. }));
  13066. function linkAndRetrieveDataWithTicket(_x21) {
  13067. return _linkAndRetrieveDataWithTicket2.apply(this, arguments);
  13068. }
  13069. return linkAndRetrieveDataWithTicket;
  13070. }()
  13071. }, {
  13072. key: "signOut",
  13073. value: function () {
  13074. var _signOut = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee26() {
  13075. var _this$_cache$keys10, e, t, n, s, r;
  13076. return _regenerator.default.wrap(function _callee26$(_context26) {
  13077. while (1) {
  13078. switch (_context26.prev = _context26.next) {
  13079. case 0:
  13080. if (!(this.loginType === Be.ANONYMOUS)) {
  13081. _context26.next = 2;
  13082. break;
  13083. }
  13084. throw new te({
  13085. message: "匿名用户不支持登出操作"
  13086. });
  13087. case 2:
  13088. _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);
  13089. if (s) {
  13090. _context26.next = 5;
  13091. break;
  13092. }
  13093. return _context26.abrupt("return");
  13094. case 5:
  13095. _context26.next = 7;
  13096. return this._request.send("auth.logout", {
  13097. refresh_token: s
  13098. });
  13099. case 7:
  13100. r = _context26.sent;
  13101. return _context26.abrupt("return", (this._cache.removeStore(e), this._cache.removeStore(t), this._cache.removeStore(n), De(qe), De(Ke, {
  13102. env: this.config.env,
  13103. loginType: Be.NULL,
  13104. persistence: this.config.persistence
  13105. }), r));
  13106. case 9:
  13107. case "end":
  13108. return _context26.stop();
  13109. }
  13110. }
  13111. }, _callee26, this);
  13112. }));
  13113. function signOut() {
  13114. return _signOut.apply(this, arguments);
  13115. }
  13116. return signOut;
  13117. }()
  13118. }, {
  13119. key: "signUpWithEmailAndPassword",
  13120. value: function () {
  13121. var _signUpWithEmailAndPassword = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee27(e, t) {
  13122. return _regenerator.default.wrap(function _callee27$(_context27) {
  13123. while (1) {
  13124. switch (_context27.prev = _context27.next) {
  13125. case 0:
  13126. return _context27.abrupt("return", this._request.send("auth.signUpWithEmailAndPassword", {
  13127. email: e,
  13128. password: t
  13129. }));
  13130. case 1:
  13131. case "end":
  13132. return _context27.stop();
  13133. }
  13134. }
  13135. }, _callee27, this);
  13136. }));
  13137. function signUpWithEmailAndPassword(_x22, _x23) {
  13138. return _signUpWithEmailAndPassword.apply(this, arguments);
  13139. }
  13140. return signUpWithEmailAndPassword;
  13141. }()
  13142. }, {
  13143. key: "sendPasswordResetEmail",
  13144. value: function () {
  13145. var _sendPasswordResetEmail = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee28(e) {
  13146. return _regenerator.default.wrap(function _callee28$(_context28) {
  13147. while (1) {
  13148. switch (_context28.prev = _context28.next) {
  13149. case 0:
  13150. return _context28.abrupt("return", this._request.send("auth.sendPasswordResetEmail", {
  13151. email: e
  13152. }));
  13153. case 1:
  13154. case "end":
  13155. return _context28.stop();
  13156. }
  13157. }
  13158. }, _callee28, this);
  13159. }));
  13160. function sendPasswordResetEmail(_x24) {
  13161. return _sendPasswordResetEmail.apply(this, arguments);
  13162. }
  13163. return sendPasswordResetEmail;
  13164. }()
  13165. }, {
  13166. key: "onLoginStateChanged",
  13167. value: function onLoginStateChanged(e) {
  13168. var _this9 = this;
  13169. Ne(qe, function () {
  13170. var t = _this9.hasLoginState();
  13171. e.call(_this9, t);
  13172. });
  13173. var t = this.hasLoginState();
  13174. e.call(this, t);
  13175. }
  13176. }, {
  13177. key: "onLoginStateExpired",
  13178. value: function onLoginStateExpired(e) {
  13179. Ne(Fe, e.bind(this));
  13180. }
  13181. }, {
  13182. key: "onAccessTokenRefreshed",
  13183. value: function onAccessTokenRefreshed(e) {
  13184. Ne($e, e.bind(this));
  13185. }
  13186. }, {
  13187. key: "onAnonymousConverted",
  13188. value: function onAnonymousConverted(e) {
  13189. Ne(je, e.bind(this));
  13190. }
  13191. }, {
  13192. key: "onLoginTypeChanged",
  13193. value: function onLoginTypeChanged(e) {
  13194. var _this10 = this;
  13195. Ne(Ke, function () {
  13196. var t = _this10.hasLoginState();
  13197. e.call(_this10, t);
  13198. });
  13199. }
  13200. }, {
  13201. key: "getAccessToken",
  13202. value: function () {
  13203. var _getAccessToken2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee29() {
  13204. return _regenerator.default.wrap(function _callee29$(_context29) {
  13205. while (1) {
  13206. switch (_context29.prev = _context29.next) {
  13207. case 0:
  13208. _context29.next = 2;
  13209. return this._request.getAccessToken();
  13210. case 2:
  13211. _context29.t0 = _context29.sent.accessToken;
  13212. _context29.t1 = this.config.env;
  13213. return _context29.abrupt("return", {
  13214. accessToken: _context29.t0,
  13215. env: _context29.t1
  13216. });
  13217. case 5:
  13218. case "end":
  13219. return _context29.stop();
  13220. }
  13221. }
  13222. }, _callee29, this);
  13223. }));
  13224. function getAccessToken() {
  13225. return _getAccessToken2.apply(this, arguments);
  13226. }
  13227. return getAccessToken;
  13228. }()
  13229. }, {
  13230. key: "hasLoginState",
  13231. value: function hasLoginState() {
  13232. var e = this._cache.keys.refreshTokenKey;
  13233. return this._cache.getStore(e) ? new Ze(this.config.env) : null;
  13234. }
  13235. }, {
  13236. key: "isUsernameRegistered",
  13237. value: function () {
  13238. var _isUsernameRegistered = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee30(e) {
  13239. var _yield$this$_request$5, t;
  13240. return _regenerator.default.wrap(function _callee30$(_context30) {
  13241. while (1) {
  13242. switch (_context30.prev = _context30.next) {
  13243. case 0:
  13244. if (!("string" != typeof e)) {
  13245. _context30.next = 2;
  13246. break;
  13247. }
  13248. throw new te({
  13249. code: "PARAM_ERROR",
  13250. message: "username must be a string"
  13251. });
  13252. case 2:
  13253. _context30.next = 4;
  13254. return this._request.send("auth.isUsernameRegistered", {
  13255. username: e
  13256. });
  13257. case 4:
  13258. _yield$this$_request$5 = _context30.sent;
  13259. t = _yield$this$_request$5.data;
  13260. return _context30.abrupt("return", t && t.isRegistered);
  13261. case 7:
  13262. case "end":
  13263. return _context30.stop();
  13264. }
  13265. }
  13266. }, _callee30, this);
  13267. }));
  13268. function isUsernameRegistered(_x25) {
  13269. return _isUsernameRegistered.apply(this, arguments);
  13270. }
  13271. return isUsernameRegistered;
  13272. }()
  13273. }, {
  13274. key: "getLoginState",
  13275. value: function getLoginState() {
  13276. return Promise.resolve(this.hasLoginState());
  13277. }
  13278. }, {
  13279. key: "signInWithTicket",
  13280. value: function () {
  13281. var _signInWithTicket = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee31(e) {
  13282. return _regenerator.default.wrap(function _callee31$(_context31) {
  13283. while (1) {
  13284. switch (_context31.prev = _context31.next) {
  13285. case 0:
  13286. return _context31.abrupt("return", new tt(this.config).signIn(e));
  13287. case 1:
  13288. case "end":
  13289. return _context31.stop();
  13290. }
  13291. }
  13292. }, _callee31, this);
  13293. }));
  13294. function signInWithTicket(_x26) {
  13295. return _signInWithTicket.apply(this, arguments);
  13296. }
  13297. return signInWithTicket;
  13298. }()
  13299. }, {
  13300. key: "shouldRefreshAccessToken",
  13301. value: function shouldRefreshAccessToken(e) {
  13302. this._request._shouldRefreshAccessTokenHook = e.bind(this);
  13303. }
  13304. }, {
  13305. key: "getUserInfo",
  13306. value: function getUserInfo() {
  13307. return this._request.send("auth.getUserInfo", {}).then(function (e) {
  13308. return e.code ? e : _objectSpread(_objectSpread({}, e.data), {}, {
  13309. requestId: e.seqId
  13310. });
  13311. });
  13312. }
  13313. }, {
  13314. key: "getAuthHeader",
  13315. value: function getAuthHeader() {
  13316. var _this$_cache$keys11 = this._cache.keys,
  13317. e = _this$_cache$keys11.refreshTokenKey,
  13318. t = _this$_cache$keys11.accessTokenKey,
  13319. n = this._cache.getStore(e);
  13320. return {
  13321. "x-cloudbase-credentials": this._cache.getStore(t) + "/@@/" + n
  13322. };
  13323. }
  13324. }, {
  13325. key: "_onAnonymousConverted",
  13326. value: function _onAnonymousConverted(e) {
  13327. var t = e.data.env;
  13328. t === this.config.env && this._cache.updatePersistence(this.config.persistence);
  13329. }
  13330. }, {
  13331. key: "_onLoginTypeChanged",
  13332. value: function _onLoginTypeChanged(e) {
  13333. var _e$data = e.data,
  13334. t = _e$data.loginType,
  13335. n = _e$data.persistence,
  13336. s = _e$data.env;
  13337. s === this.config.env && (this._cache.updatePersistence(n), this._cache.setStore(this._cache.keys.loginTypeKey, t));
  13338. }
  13339. }]);
  13340. return rt;
  13341. }();
  13342. var it = function it(e, t) {
  13343. t = t || we();
  13344. var n = Ye(this.config.env),
  13345. s = e.cloudPath,
  13346. r = e.filePath,
  13347. i = e.onUploadProgress,
  13348. _e$fileType = e.fileType,
  13349. o = _e$fileType === void 0 ? "image" : _e$fileType;
  13350. return n.send("storage.getUploadMetadata", {
  13351. path: s
  13352. }).then(function (e) {
  13353. var _e$data2 = e.data,
  13354. a = _e$data2.url,
  13355. c = _e$data2.authorization,
  13356. u = _e$data2.token,
  13357. h = _e$data2.fileId,
  13358. l = _e$data2.cosFileId,
  13359. d = e.requestId,
  13360. p = {
  13361. key: s,
  13362. signature: c,
  13363. "x-cos-meta-fileid": l,
  13364. success_action_status: "201",
  13365. "x-cos-security-token": u
  13366. };
  13367. n.upload({
  13368. url: a,
  13369. data: p,
  13370. file: r,
  13371. name: s,
  13372. fileType: o,
  13373. onUploadProgress: i
  13374. }).then(function (e) {
  13375. 201 === e.statusCode ? t(null, {
  13376. fileID: h,
  13377. requestId: d
  13378. }) : t(new te({
  13379. code: "STORAGE_REQUEST_FAIL",
  13380. message: "STORAGE_REQUEST_FAIL: ".concat(e.data)
  13381. }));
  13382. }).catch(function (e) {
  13383. t(e);
  13384. });
  13385. }).catch(function (e) {
  13386. t(e);
  13387. }), t.promise;
  13388. },
  13389. ot = function ot(e, t) {
  13390. t = t || we();
  13391. var n = Ye(this.config.env),
  13392. s = e.cloudPath;
  13393. return n.send("storage.getUploadMetadata", {
  13394. path: s
  13395. }).then(function (e) {
  13396. t(null, e);
  13397. }).catch(function (e) {
  13398. t(e);
  13399. }), t.promise;
  13400. },
  13401. at = function at(_ref7, t) {
  13402. var e = _ref7.fileList;
  13403. if (t = t || we(), !e || !Array.isArray(e)) return {
  13404. code: "INVALID_PARAM",
  13405. message: "fileList必须是非空的数组"
  13406. };
  13407. var _iterator3 = _createForOfIteratorHelper(e),
  13408. _step3;
  13409. try {
  13410. for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
  13411. var _t8 = _step3.value;
  13412. if (!_t8 || "string" != typeof _t8) return {
  13413. code: "INVALID_PARAM",
  13414. message: "fileList的元素必须是非空的字符串"
  13415. };
  13416. }
  13417. } catch (err) {
  13418. _iterator3.e(err);
  13419. } finally {
  13420. _iterator3.f();
  13421. }
  13422. var n = {
  13423. fileid_list: e
  13424. };
  13425. return Ye(this.config.env).send("storage.batchDeleteFile", n).then(function (e) {
  13426. e.code ? t(null, e) : t(null, {
  13427. fileList: e.data.delete_list,
  13428. requestId: e.requestId
  13429. });
  13430. }).catch(function (e) {
  13431. t(e);
  13432. }), t.promise;
  13433. },
  13434. ct = function ct(_ref8, t) {
  13435. var e = _ref8.fileList;
  13436. t = t || we(), e && Array.isArray(e) || t(null, {
  13437. code: "INVALID_PARAM",
  13438. message: "fileList必须是非空的数组"
  13439. });
  13440. var n = [];
  13441. var _iterator4 = _createForOfIteratorHelper(e),
  13442. _step4;
  13443. try {
  13444. for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
  13445. var _s9 = _step4.value;
  13446. "object" == (0, _typeof2.default)(_s9) ? (_s9.hasOwnProperty("fileID") && _s9.hasOwnProperty("maxAge") || t(null, {
  13447. code: "INVALID_PARAM",
  13448. message: "fileList的元素必须是包含fileID和maxAge的对象"
  13449. }), n.push({
  13450. fileid: _s9.fileID,
  13451. max_age: _s9.maxAge
  13452. })) : "string" == typeof _s9 ? n.push({
  13453. fileid: _s9
  13454. }) : t(null, {
  13455. code: "INVALID_PARAM",
  13456. message: "fileList的元素必须是字符串"
  13457. });
  13458. }
  13459. } catch (err) {
  13460. _iterator4.e(err);
  13461. } finally {
  13462. _iterator4.f();
  13463. }
  13464. var s = {
  13465. file_list: n
  13466. };
  13467. return Ye(this.config.env).send("storage.batchGetDownloadUrl", s).then(function (e) {
  13468. e.code ? t(null, e) : t(null, {
  13469. fileList: e.data.download_list,
  13470. requestId: e.requestId
  13471. });
  13472. }).catch(function (e) {
  13473. t(e);
  13474. }), t.promise;
  13475. },
  13476. ut = /*#__PURE__*/function () {
  13477. var _ref10 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee32(_ref9, t) {
  13478. var e, n, s, r;
  13479. return _regenerator.default.wrap(function _callee32$(_context32) {
  13480. while (1) {
  13481. switch (_context32.prev = _context32.next) {
  13482. case 0:
  13483. e = _ref9.fileID;
  13484. _context32.next = 3;
  13485. return ct.call(this, {
  13486. fileList: [{
  13487. fileID: e,
  13488. maxAge: 600
  13489. }]
  13490. });
  13491. case 3:
  13492. n = _context32.sent.fileList[0];
  13493. if (!("SUCCESS" !== n.code)) {
  13494. _context32.next = 6;
  13495. break;
  13496. }
  13497. return _context32.abrupt("return", t ? t(n) : new Promise(function (e) {
  13498. e(n);
  13499. }));
  13500. case 6:
  13501. s = Ye(this.config.env);
  13502. r = n.download_url;
  13503. if (!(r = encodeURI(r), !t)) {
  13504. _context32.next = 10;
  13505. break;
  13506. }
  13507. return _context32.abrupt("return", s.download({
  13508. url: r
  13509. }));
  13510. case 10:
  13511. _context32.t0 = t;
  13512. _context32.next = 13;
  13513. return s.download({
  13514. url: r
  13515. });
  13516. case 13:
  13517. _context32.t1 = _context32.sent;
  13518. (0, _context32.t0)(_context32.t1);
  13519. case 15:
  13520. case "end":
  13521. return _context32.stop();
  13522. }
  13523. }
  13524. }, _callee32, this);
  13525. }));
  13526. return function ut(_x27, _x28) {
  13527. return _ref10.apply(this, arguments);
  13528. };
  13529. }(),
  13530. ht = function ht(_ref11, i) {
  13531. var e = _ref11.name,
  13532. t = _ref11.data,
  13533. n = _ref11.query,
  13534. s = _ref11.parse,
  13535. r = _ref11.search;
  13536. var o = i || we();
  13537. var a;
  13538. try {
  13539. a = t ? JSON.stringify(t) : "";
  13540. } catch (e) {
  13541. return Promise.reject(e);
  13542. }
  13543. if (!e) return Promise.reject(new te({
  13544. code: "PARAM_ERROR",
  13545. message: "函数名不能为空"
  13546. }));
  13547. var c = {
  13548. inQuery: n,
  13549. parse: s,
  13550. search: r,
  13551. function_name: e,
  13552. request_data: a
  13553. };
  13554. return Ye(this.config.env).send("functions.invokeFunction", c).then(function (e) {
  13555. if (e.code) o(null, e);else {
  13556. var _t9 = e.data.response_data;
  13557. if (s) o(null, {
  13558. result: _t9,
  13559. requestId: e.requestId
  13560. });else try {
  13561. _t9 = JSON.parse(e.data.response_data), o(null, {
  13562. result: _t9,
  13563. requestId: e.requestId
  13564. });
  13565. } catch (e) {
  13566. o(new te({
  13567. message: "response data must be json"
  13568. }));
  13569. }
  13570. }
  13571. return o.promise;
  13572. }).catch(function (e) {
  13573. o(e);
  13574. }), o.promise;
  13575. },
  13576. lt = {
  13577. timeout: 15e3,
  13578. persistence: "session"
  13579. },
  13580. dt = {};
  13581. var pt = /*#__PURE__*/function () {
  13582. function pt(e) {
  13583. (0, _classCallCheck2.default)(this, pt);
  13584. this.config = e || this.config, this.authObj = void 0;
  13585. }
  13586. (0, _createClass2.default)(pt, [{
  13587. key: "init",
  13588. value: function init(e) {
  13589. switch (ke.adapter || (this.requestClient = new ke.adapter.reqClass({
  13590. timeout: e.timeout || 5e3,
  13591. timeoutMsg: "\u8BF7\u6C42\u5728".concat((e.timeout || 5e3) / 1e3, "s\u5185\u672A\u5B8C\u6210\uFF0C\u5DF2\u4E2D\u65AD")
  13592. })), this.config = _objectSpread(_objectSpread({}, lt), e), !0) {
  13593. case this.config.timeout > 6e5:
  13594. console.warn("timeout大于可配置上限[10分钟],已重置为上限数值"), this.config.timeout = 6e5;
  13595. break;
  13596. case this.config.timeout < 100:
  13597. console.warn("timeout小于可配置下限[100ms],已重置为下限数值"), this.config.timeout = 100;
  13598. }
  13599. return new pt(this.config);
  13600. }
  13601. }, {
  13602. key: "auth",
  13603. value: function auth() {
  13604. var _ref12 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  13605. e = _ref12.persistence;
  13606. if (this.authObj) return this.authObj;
  13607. var t = e || ke.adapter.primaryStorage || lt.persistence;
  13608. var n;
  13609. return t !== this.config.persistence && (this.config.persistence = t), function (e) {
  13610. var t = e.env;
  13611. xe[t] = new Ce(e), Oe[t] = new Ce(_objectSpread(_objectSpread({}, e), {}, {
  13612. persistence: "local"
  13613. }));
  13614. }(this.config), n = this.config, Ve[n.env] = new Ge(n), this.authObj = new rt(this.config), this.authObj;
  13615. }
  13616. }, {
  13617. key: "on",
  13618. value: function on(e, t) {
  13619. return Ne.apply(this, [e, t]);
  13620. }
  13621. }, {
  13622. key: "off",
  13623. value: function off(e, t) {
  13624. return Me.apply(this, [e, t]);
  13625. }
  13626. }, {
  13627. key: "callFunction",
  13628. value: function callFunction(e, t) {
  13629. return ht.apply(this, [e, t]);
  13630. }
  13631. }, {
  13632. key: "deleteFile",
  13633. value: function deleteFile(e, t) {
  13634. return at.apply(this, [e, t]);
  13635. }
  13636. }, {
  13637. key: "getTempFileURL",
  13638. value: function getTempFileURL(e, t) {
  13639. return ct.apply(this, [e, t]);
  13640. }
  13641. }, {
  13642. key: "downloadFile",
  13643. value: function downloadFile(e, t) {
  13644. return ut.apply(this, [e, t]);
  13645. }
  13646. }, {
  13647. key: "uploadFile",
  13648. value: function uploadFile(e, t) {
  13649. return it.apply(this, [e, t]);
  13650. }
  13651. }, {
  13652. key: "getUploadMetadata",
  13653. value: function getUploadMetadata(e, t) {
  13654. return ot.apply(this, [e, t]);
  13655. }
  13656. }, {
  13657. key: "registerExtension",
  13658. value: function registerExtension(e) {
  13659. dt[e.name] = e;
  13660. }
  13661. }, {
  13662. key: "invokeExtension",
  13663. value: function () {
  13664. var _invokeExtension = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee33(e, t) {
  13665. var n;
  13666. return _regenerator.default.wrap(function _callee33$(_context33) {
  13667. while (1) {
  13668. switch (_context33.prev = _context33.next) {
  13669. case 0:
  13670. n = dt[e];
  13671. if (n) {
  13672. _context33.next = 3;
  13673. break;
  13674. }
  13675. throw new te({
  13676. message: "\u6269\u5C55".concat(e, " \u5FC5\u987B\u5148\u6CE8\u518C")
  13677. });
  13678. case 3:
  13679. _context33.next = 5;
  13680. return n.invoke(t, this);
  13681. case 5:
  13682. return _context33.abrupt("return", _context33.sent);
  13683. case 6:
  13684. case "end":
  13685. return _context33.stop();
  13686. }
  13687. }
  13688. }, _callee33, this);
  13689. }));
  13690. function invokeExtension(_x29, _x30) {
  13691. return _invokeExtension.apply(this, arguments);
  13692. }
  13693. return invokeExtension;
  13694. }()
  13695. }, {
  13696. key: "useAdapters",
  13697. value: function useAdapters(e) {
  13698. var _ref13 = be(e) || {},
  13699. t = _ref13.adapter,
  13700. n = _ref13.runtime;
  13701. t && (ke.adapter = t), n && (ke.runtime = n);
  13702. }
  13703. }]);
  13704. return pt;
  13705. }();
  13706. var ft = new pt();
  13707. function gt(e, t, n) {
  13708. void 0 === n && (n = {});
  13709. var s = /\?/.test(t),
  13710. r = "";
  13711. for (var i in n) {
  13712. "" === r ? !s && (t += "?") : r += "&", r += i + "=" + encodeURIComponent(n[i]);
  13713. }
  13714. return /^http(s)?:\/\//.test(t += r) ? t : "" + e + t;
  13715. }
  13716. var mt = /*#__PURE__*/function () {
  13717. function mt() {
  13718. (0, _classCallCheck2.default)(this, mt);
  13719. }
  13720. (0, _createClass2.default)(mt, [{
  13721. key: "post",
  13722. value: function post(e) {
  13723. var t = e.url,
  13724. n = e.data,
  13725. s = e.headers;
  13726. return new Promise(function (e, r) {
  13727. ne.request({
  13728. url: gt("https:", t),
  13729. data: n,
  13730. method: "POST",
  13731. header: s,
  13732. success: function success(t) {
  13733. e(t);
  13734. },
  13735. fail: function fail(e) {
  13736. r(e);
  13737. }
  13738. });
  13739. });
  13740. }
  13741. }, {
  13742. key: "upload",
  13743. value: function upload(e) {
  13744. return new Promise(function (t, n) {
  13745. var s = e.url,
  13746. r = e.file,
  13747. i = e.data,
  13748. o = e.headers,
  13749. a = e.fileType,
  13750. c = ne.uploadFile({
  13751. url: gt("https:", s),
  13752. name: "file",
  13753. formData: Object.assign({}, i),
  13754. filePath: r,
  13755. fileType: a,
  13756. header: o,
  13757. success: function success(e) {
  13758. var n = {
  13759. statusCode: e.statusCode,
  13760. data: e.data || {}
  13761. };
  13762. 200 === e.statusCode && i.success_action_status && (n.statusCode = parseInt(i.success_action_status, 10)), t(n);
  13763. },
  13764. fail: function fail(e) {
  13765. n(new Error(e.errMsg || "uploadFile:fail"));
  13766. }
  13767. });
  13768. "function" == typeof e.onUploadProgress && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (t) {
  13769. e.onUploadProgress({
  13770. loaded: t.totalBytesSent,
  13771. total: t.totalBytesExpectedToSend
  13772. });
  13773. });
  13774. });
  13775. }
  13776. }]);
  13777. return mt;
  13778. }();
  13779. var yt = {
  13780. setItem: function setItem(e, t) {
  13781. ne.setStorageSync(e, t);
  13782. },
  13783. getItem: function getItem(e) {
  13784. return ne.getStorageSync(e);
  13785. },
  13786. removeItem: function removeItem(e) {
  13787. ne.removeStorageSync(e);
  13788. },
  13789. clear: function clear() {
  13790. ne.clearStorageSync();
  13791. }
  13792. };
  13793. var _t = {
  13794. genAdapter: function genAdapter() {
  13795. return {
  13796. root: {},
  13797. reqClass: mt,
  13798. localStorage: yt,
  13799. primaryStorage: "local"
  13800. };
  13801. },
  13802. isMatch: function isMatch() {
  13803. return !0;
  13804. },
  13805. runtime: "uni_app"
  13806. };
  13807. ft.useAdapters(_t);
  13808. var wt = ft,
  13809. vt = wt.init;
  13810. wt.init = function (e) {
  13811. e.env = e.spaceId;
  13812. var t = vt.call(this, e);
  13813. t.config.provider = "tencent", t.config.spaceId = e.spaceId;
  13814. var n = t.auth;
  13815. return t.auth = function (e) {
  13816. var t = n.call(this, e);
  13817. return ["linkAndRetrieveDataWithTicket", "signInAnonymously", "signOut", "getAccessToken", "getLoginState", "signInWithTicket", "getUserInfo"].forEach(function (e) {
  13818. var n;
  13819. t[e] = (n = t[e], function (e) {
  13820. e = e || {};
  13821. var _ee = ee(e),
  13822. t = _ee.success,
  13823. s = _ee.fail,
  13824. r = _ee.complete;
  13825. if (!(t || s || r)) return n.call(this, e);
  13826. n.call(this, e).then(function (e) {
  13827. t && t(e), r && r(e);
  13828. }, function (e) {
  13829. s && s(e), r && r(e);
  13830. });
  13831. }).bind(t);
  13832. }), t;
  13833. }, t.customAuth = t.auth, t;
  13834. };
  13835. var It = wt;
  13836. var St = /*#__PURE__*/function (_le) {
  13837. (0, _inherits2.default)(St, _le);
  13838. var _super8 = _createSuper(St);
  13839. function St() {
  13840. (0, _classCallCheck2.default)(this, St);
  13841. return _super8.apply(this, arguments);
  13842. }
  13843. (0, _createClass2.default)(St, [{
  13844. key: "getAccessToken",
  13845. value: function getAccessToken() {
  13846. var _this11 = this;
  13847. return new Promise(function (e, t) {
  13848. var n = "Anonymous_Access_token";
  13849. _this11.setAccessToken(n), e(n);
  13850. });
  13851. }
  13852. }, {
  13853. key: "setupRequest",
  13854. value: function setupRequest(e, t) {
  13855. var n = Object.assign({}, e, {
  13856. spaceId: this.config.spaceId,
  13857. timestamp: Date.now()
  13858. }),
  13859. s = {
  13860. "Content-Type": "application/json"
  13861. };
  13862. "auth" !== t && (n.token = this.accessToken, s["x-basement-token"] = this.accessToken), s["x-serverless-sign"] = he.sign(n, this.config.clientSecret);
  13863. var r = ue();
  13864. s["x-client-info"] = encodeURIComponent(JSON.stringify(r));
  13865. var _se = se(),
  13866. i = _se.token;
  13867. return s["x-client-token"] = i, {
  13868. url: this.config.requestUrl,
  13869. method: "POST",
  13870. data: n,
  13871. dataType: "json",
  13872. header: JSON.parse(JSON.stringify(s))
  13873. };
  13874. }
  13875. }, {
  13876. key: "uploadFileToOSS",
  13877. value: function uploadFileToOSS(_ref14) {
  13878. var _this12 = this;
  13879. var e = _ref14.url,
  13880. t = _ref14.formData,
  13881. n = _ref14.name,
  13882. s = _ref14.filePath,
  13883. r = _ref14.fileType,
  13884. i = _ref14.onUploadProgress;
  13885. return new Promise(function (o, a) {
  13886. var c = _this12.adapter.uploadFile({
  13887. url: e,
  13888. formData: t,
  13889. name: n,
  13890. filePath: s,
  13891. fileType: r,
  13892. success: function success(e) {
  13893. e && e.statusCode < 400 ? o(e) : a(new te({
  13894. code: "UPLOAD_FAILED",
  13895. message: "文件上传失败"
  13896. }));
  13897. },
  13898. fail: function fail(e) {
  13899. a(new te({
  13900. code: e.code || "UPLOAD_FAILED",
  13901. message: e.message || e.errMsg || "文件上传失败"
  13902. }));
  13903. }
  13904. });
  13905. "function" == typeof i && c && "function" == typeof c.onProgressUpdate && c.onProgressUpdate(function (e) {
  13906. i({
  13907. loaded: e.totalBytesSent,
  13908. total: e.totalBytesExpectedToSend
  13909. });
  13910. });
  13911. });
  13912. }
  13913. }, {
  13914. key: "uploadFile",
  13915. value: function uploadFile(_ref15) {
  13916. var _this13 = this;
  13917. var e = _ref15.filePath,
  13918. t = _ref15.cloudPath,
  13919. _ref15$fileType = _ref15.fileType,
  13920. n = _ref15$fileType === void 0 ? "image" : _ref15$fileType,
  13921. s = _ref15.onUploadProgress;
  13922. if (!t) throw new te({
  13923. code: "CLOUDPATH_REQUIRED",
  13924. message: "cloudPath不可为空"
  13925. });
  13926. var r;
  13927. return this.getOSSUploadOptionsFromPath({
  13928. cloudPath: t
  13929. }).then(function (t) {
  13930. var _t$result = t.result,
  13931. i = _t$result.url,
  13932. o = _t$result.formData,
  13933. a = _t$result.name;
  13934. r = t.result.fileUrl;
  13935. var c = {
  13936. url: i,
  13937. formData: o,
  13938. name: a,
  13939. filePath: e,
  13940. fileType: n
  13941. };
  13942. return _this13.uploadFileToOSS(Object.assign({}, c, {
  13943. onUploadProgress: s
  13944. }));
  13945. }).then(function () {
  13946. return _this13.reportOSSUpload({
  13947. cloudPath: t
  13948. });
  13949. }).then(function (t) {
  13950. return new Promise(function (n, s) {
  13951. t.success ? n({
  13952. success: !0,
  13953. filePath: e,
  13954. fileID: r
  13955. }) : s(new te({
  13956. code: "UPLOAD_FAILED",
  13957. message: "文件上传失败"
  13958. }));
  13959. });
  13960. });
  13961. }
  13962. }, {
  13963. key: "deleteFile",
  13964. value: function deleteFile(_ref16) {
  13965. var e = _ref16.fileList;
  13966. var t = {
  13967. method: "serverless.file.resource.delete",
  13968. params: JSON.stringify({
  13969. fileList: e
  13970. })
  13971. };
  13972. return this.request(this.setupRequest(t)).then(function (e) {
  13973. if (e.success) return e.result;
  13974. throw new te({
  13975. code: "DELETE_FILE_FAILED",
  13976. message: "删除文件失败"
  13977. });
  13978. });
  13979. }
  13980. }, {
  13981. key: "getTempFileURL",
  13982. value: function getTempFileURL() {
  13983. var _ref17 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  13984. e = _ref17.fileList,
  13985. t = _ref17.maxAge;
  13986. if (!Array.isArray(e) || 0 === e.length) throw new te({
  13987. code: "INVALID_PARAM",
  13988. message: "fileList的元素必须是非空的字符串"
  13989. });
  13990. var n = {
  13991. method: "serverless.file.resource.getTempFileURL",
  13992. params: JSON.stringify({
  13993. fileList: e,
  13994. maxAge: t
  13995. })
  13996. };
  13997. return this.request(this.setupRequest(n)).then(function (e) {
  13998. if (e.success) return {
  13999. fileList: e.result.fileList.map(function (e) {
  14000. return {
  14001. fileID: e.fileID,
  14002. tempFileURL: e.tempFileURL
  14003. };
  14004. })
  14005. };
  14006. throw new te({
  14007. code: "GET_TEMP_FILE_URL_FAILED",
  14008. message: "获取临时文件链接失败"
  14009. });
  14010. });
  14011. }
  14012. }]);
  14013. return St;
  14014. }(le);
  14015. var bt = {
  14016. init: function init(e) {
  14017. var t = new St(e),
  14018. n = {
  14019. signInAnonymously: function signInAnonymously() {
  14020. return t.authorize();
  14021. },
  14022. getLoginState: function getLoginState() {
  14023. return Promise.resolve(!1);
  14024. }
  14025. };
  14026. return t.auth = function () {
  14027. return n;
  14028. }, t.customAuth = t.auth, t;
  14029. }
  14030. },
  14031. kt = n(function (e, t) {
  14032. e.exports = r.enc.Hex;
  14033. });
  14034. function At() {
  14035. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  14036. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14037. var n = t.data,
  14038. s = t.functionName,
  14039. r = t.method,
  14040. i = t.headers,
  14041. _t$signHeaderKeys = t.signHeaderKeys,
  14042. o = _t$signHeaderKeys === void 0 ? [] : _t$signHeaderKeys,
  14043. a = t.config,
  14044. c = Date.now(),
  14045. u = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (e) {
  14046. var t = 16 * Math.random() | 0;
  14047. return ("x" === e ? t : 3 & t | 8).toString(16);
  14048. }),
  14049. h = Object.assign({}, i, {
  14050. "x-from-app-id": a.spaceAppId,
  14051. "x-from-env-id": a.spaceId,
  14052. "x-to-env-id": a.spaceId,
  14053. "x-from-instance-id": c,
  14054. "x-from-function-name": s,
  14055. "x-client-timestamp": c,
  14056. "x-alipay-source": "client",
  14057. "x-request-id": u,
  14058. "x-alipay-callid": u
  14059. }),
  14060. l = ["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),
  14061. _ref18 = e.split("?") || [],
  14062. _ref19 = (0, _slicedToArray2.default)(_ref18, 2),
  14063. _ref19$ = _ref19[0],
  14064. d = _ref19$ === void 0 ? "" : _ref19$,
  14065. _ref19$2 = _ref19[1],
  14066. p = _ref19$2 === void 0 ? "" : _ref19$2,
  14067. f = function (e) {
  14068. var t = e.signedHeaders.join(";"),
  14069. n = e.signedHeaders.map(function (t) {
  14070. return "".concat(t.toLowerCase(), ":").concat(e.headers[t], "\n");
  14071. }).join(""),
  14072. s = ye(e.body).toString(kt),
  14073. r = "".concat(e.method.toUpperCase(), "\n").concat(e.path, "\n").concat(e.query, "\n").concat(n, "\n").concat(t, "\n").concat(s, "\n"),
  14074. i = ye(r).toString(kt),
  14075. o = "HMAC-SHA256\n".concat(e.timestamp, "\n").concat(i, "\n"),
  14076. a = _e(o, e.secretKey).toString(kt);
  14077. return "HMAC-SHA256 Credential=".concat(e.secretId, ", SignedHeaders=").concat(t, ", Signature=").concat(a);
  14078. }({
  14079. path: d,
  14080. query: p,
  14081. method: r,
  14082. headers: h,
  14083. timestamp: c,
  14084. body: JSON.stringify(n),
  14085. secretId: a.accessKey,
  14086. secretKey: a.secretKey,
  14087. signedHeaders: l.sort()
  14088. });
  14089. return {
  14090. url: "".concat(a.endpoint).concat(e),
  14091. headers: Object.assign({}, h, {
  14092. Authorization: f
  14093. })
  14094. };
  14095. }
  14096. function Pt(_ref20) {
  14097. var e = _ref20.url,
  14098. t = _ref20.data,
  14099. _ref20$method = _ref20.method,
  14100. n = _ref20$method === void 0 ? "POST" : _ref20$method,
  14101. _ref20$headers = _ref20.headers,
  14102. s = _ref20$headers === void 0 ? {} : _ref20$headers;
  14103. return new Promise(function (r, i) {
  14104. ne.request({
  14105. url: e,
  14106. method: n,
  14107. data: t,
  14108. header: s,
  14109. dataType: "json",
  14110. complete: function complete() {
  14111. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  14112. if (!e.statusCode || e.statusCode >= 400) {
  14113. var _ref21 = e.data || {},
  14114. _t10 = _ref21.errMsg;
  14115. return i(new te({
  14116. code: "SYS_ERR",
  14117. message: _t10 || e.errMsg || "request:fail",
  14118. requestId: e.requestID
  14119. }));
  14120. }
  14121. r({
  14122. status: e.statusCode,
  14123. data: e.data,
  14124. headers: e.header,
  14125. requestId: e.requestID
  14126. });
  14127. }
  14128. });
  14129. });
  14130. }
  14131. function Tt(e, t) {
  14132. var n = e.path,
  14133. s = e.data,
  14134. _e$method = e.method,
  14135. r = _e$method === void 0 ? "GET" : _e$method,
  14136. _At = At(n, {
  14137. functionName: "",
  14138. data: s,
  14139. method: r,
  14140. headers: {
  14141. "x-alipay-cloud-mode": "oss",
  14142. "x-data-api-type": "oss",
  14143. "x-expire-timestamp": Date.now() + 6e4
  14144. },
  14145. signHeaderKeys: ["x-data-api-type", "x-expire-timestamp"],
  14146. config: t
  14147. }),
  14148. i = _At.url,
  14149. o = _At.headers;
  14150. return Pt({
  14151. url: i,
  14152. data: s,
  14153. method: r,
  14154. headers: o
  14155. }).then(function (e) {
  14156. var t = e.data || {};
  14157. if (!t.success) throw new te({
  14158. code: e.code,
  14159. message: e.message,
  14160. requestId: e.trace_id
  14161. });
  14162. return t.data || {};
  14163. }).catch(function (e) {
  14164. throw new te({
  14165. code: e.errCode,
  14166. message: e.errMsg,
  14167. requestId: e.requestId
  14168. });
  14169. });
  14170. }
  14171. function Ct() {
  14172. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  14173. var t = e.trim().replace(/^cloud:\/\//, ""),
  14174. n = t.indexOf("/");
  14175. if (n <= 0) throw new te({
  14176. code: "INVALID_PARAM",
  14177. message: "fileID不合法"
  14178. });
  14179. var s = t.substring(0, n),
  14180. r = t.substring(n + 1);
  14181. return s !== this.config.spaceId && console.warn("file ".concat(e, " does not belong to env ").concat(this.config.spaceId)), r;
  14182. }
  14183. var xt = /*#__PURE__*/function () {
  14184. function xt(e) {
  14185. (0, _classCallCheck2.default)(this, xt);
  14186. if (["spaceId", "spaceAppId", "accessKey", "secretKey"].forEach(function (t) {
  14187. if (!Object.prototype.hasOwnProperty.call(e, t)) throw new Error("".concat(t, " required"));
  14188. }), e.endpoint) {
  14189. if ("string" != typeof e.endpoint) throw new Error("endpoint must be string");
  14190. if (!/^https:\/\//.test(e.endpoint)) throw new Error("endpoint must start with https://");
  14191. e.endpoint = e.endpoint.replace(/\/$/, "");
  14192. }
  14193. this.config = Object.assign({}, e, {
  14194. endpoint: e.endpoint || "https://".concat(e.spaceId, ".api-hz.cloudbasefunction.cn")
  14195. });
  14196. }
  14197. (0, _createClass2.default)(xt, [{
  14198. key: "callFunction",
  14199. value: function callFunction(e) {
  14200. return function (e, t) {
  14201. var n = e.name,
  14202. s = e.data,
  14203. r = "POST",
  14204. _At2 = At("/functions/invokeFunction", {
  14205. functionName: n,
  14206. data: s,
  14207. method: r,
  14208. headers: {
  14209. "x-to-function-name": n
  14210. },
  14211. signHeaderKeys: ["x-to-function-name"],
  14212. config: t
  14213. }),
  14214. i = _At2.url,
  14215. o = _At2.headers;
  14216. return Pt({
  14217. url: i,
  14218. data: s,
  14219. method: r,
  14220. headers: o
  14221. }).then(function (e) {
  14222. return {
  14223. errCode: 0,
  14224. success: !0,
  14225. requestId: e.requestId,
  14226. result: e.data
  14227. };
  14228. }).catch(function (e) {
  14229. throw new te({
  14230. code: e.errCode,
  14231. message: e.errMsg,
  14232. requestId: e.requestId
  14233. });
  14234. });
  14235. }(e, this.config);
  14236. }
  14237. }, {
  14238. key: "uploadFileToOSS",
  14239. value: function uploadFileToOSS(_ref22) {
  14240. var e = _ref22.url,
  14241. t = _ref22.filePath,
  14242. n = _ref22.fileType,
  14243. s = _ref22.formData,
  14244. r = _ref22.onUploadProgress;
  14245. return new Promise(function (i, o) {
  14246. var a = ne.uploadFile({
  14247. url: e,
  14248. filePath: t,
  14249. fileType: n,
  14250. formData: s,
  14251. name: "file",
  14252. success: function success(e) {
  14253. e && e.statusCode < 400 ? i(e) : o(new te({
  14254. code: "UPLOAD_FAILED",
  14255. message: "文件上传失败"
  14256. }));
  14257. },
  14258. fail: function fail(e) {
  14259. o(new te({
  14260. code: e.code || "UPLOAD_FAILED",
  14261. message: e.message || e.errMsg || "文件上传失败"
  14262. }));
  14263. }
  14264. });
  14265. "function" == typeof r && a && "function" == typeof a.onProgressUpdate && a.onProgressUpdate(function (e) {
  14266. r({
  14267. loaded: e.totalBytesSent,
  14268. total: e.totalBytesExpectedToSend
  14269. });
  14270. });
  14271. });
  14272. }
  14273. }, {
  14274. key: "uploadFile",
  14275. value: function () {
  14276. var _uploadFile2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee34(_ref23) {
  14277. var e, _ref23$cloudPath, t, _ref23$fileType, n, s, r, i, o, a, c;
  14278. return _regenerator.default.wrap(function _callee34$(_context34) {
  14279. while (1) {
  14280. switch (_context34.prev = _context34.next) {
  14281. case 0:
  14282. 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;
  14283. if (!("string" !== f(t))) {
  14284. _context34.next = 3;
  14285. break;
  14286. }
  14287. throw new te({
  14288. code: "INVALID_PARAM",
  14289. message: "cloudPath必须为字符串类型"
  14290. });
  14291. case 3:
  14292. if (t = t.trim()) {
  14293. _context34.next = 5;
  14294. break;
  14295. }
  14296. throw new te({
  14297. code: "INVALID_PARAM",
  14298. message: "cloudPath不可为空"
  14299. });
  14300. case 5:
  14301. if (!/:\/\//.test(t)) {
  14302. _context34.next = 7;
  14303. break;
  14304. }
  14305. throw new te({
  14306. code: "INVALID_PARAM",
  14307. message: "cloudPath不合法"
  14308. });
  14309. case 7:
  14310. _context34.next = 9;
  14311. return Tt({
  14312. path: "/".concat(t.replace(/^\//, ""), "?post_url")
  14313. }, this.config);
  14314. case 9:
  14315. r = _context34.sent;
  14316. i = r.file_id;
  14317. o = r.upload_url;
  14318. a = r.form_data;
  14319. c = a && a.reduce(function (e, t) {
  14320. return e[t.key] = t.value, e;
  14321. }, {});
  14322. return _context34.abrupt("return", this.uploadFileToOSS({
  14323. url: o,
  14324. filePath: e,
  14325. fileType: n,
  14326. formData: c,
  14327. onUploadProgress: s
  14328. }).then(function () {
  14329. return {
  14330. fileID: i
  14331. };
  14332. }));
  14333. case 15:
  14334. case "end":
  14335. return _context34.stop();
  14336. }
  14337. }
  14338. }, _callee34, this);
  14339. }));
  14340. function uploadFile(_x31) {
  14341. return _uploadFile2.apply(this, arguments);
  14342. }
  14343. return uploadFile;
  14344. }()
  14345. }, {
  14346. key: "getTempFileURL",
  14347. value: function () {
  14348. var _getTempFileURL = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee35(_ref24) {
  14349. var _this14 = this;
  14350. var e;
  14351. return _regenerator.default.wrap(function _callee35$(_context35) {
  14352. while (1) {
  14353. switch (_context35.prev = _context35.next) {
  14354. case 0:
  14355. e = _ref24.fileList;
  14356. return _context35.abrupt("return", new Promise(function (t, n) {
  14357. (!e || e.length < 0) && n(new te({
  14358. errCode: "INVALID_PARAM",
  14359. errMsg: "fileList不能为空数组"
  14360. })), e.length > 50 && n(new te({
  14361. errCode: "INVALID_PARAM",
  14362. errMsg: "fileList数组长度不能超过50"
  14363. }));
  14364. var s = [];
  14365. var _iterator5 = _createForOfIteratorHelper(e),
  14366. _step5;
  14367. try {
  14368. for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
  14369. var _t11 = _step5.value;
  14370. "string" !== f(_t11) && n(new te({
  14371. errCode: "INVALID_PARAM",
  14372. errMsg: "fileList的元素必须是非空的字符串"
  14373. }));
  14374. var _e17 = Ct.call(_this14, _t11);
  14375. s.push({
  14376. file_id: _e17,
  14377. expire: 600
  14378. });
  14379. }
  14380. } catch (err) {
  14381. _iterator5.e(err);
  14382. } finally {
  14383. _iterator5.f();
  14384. }
  14385. Tt({
  14386. path: "/?download_url",
  14387. data: {
  14388. file_list: s
  14389. },
  14390. method: "POST"
  14391. }, _this14.config).then(function (e) {
  14392. var _e$file_list = e.file_list,
  14393. n = _e$file_list === void 0 ? [] : _e$file_list;
  14394. t({
  14395. fileList: n.map(function (e) {
  14396. return {
  14397. fileID: e.file_id,
  14398. tempFileURL: e.download_url
  14399. };
  14400. })
  14401. });
  14402. }).catch(function (e) {
  14403. return n(e);
  14404. });
  14405. }));
  14406. case 2:
  14407. case "end":
  14408. return _context35.stop();
  14409. }
  14410. }
  14411. }, _callee35);
  14412. }));
  14413. function getTempFileURL(_x32) {
  14414. return _getTempFileURL.apply(this, arguments);
  14415. }
  14416. return getTempFileURL;
  14417. }()
  14418. }]);
  14419. return xt;
  14420. }();
  14421. var Ot = {
  14422. init: function init(e) {
  14423. e.provider = "alipay";
  14424. var t = new xt(e);
  14425. return t.auth = function () {
  14426. return {
  14427. signInAnonymously: function signInAnonymously() {
  14428. return Promise.resolve();
  14429. },
  14430. getLoginState: function getLoginState() {
  14431. return Promise.resolve(!0);
  14432. }
  14433. };
  14434. }, t;
  14435. }
  14436. };
  14437. function Et(_ref25) {
  14438. var e = _ref25.data;
  14439. var t;
  14440. t = ue();
  14441. var n = JSON.parse(JSON.stringify(e || {}));
  14442. if (Object.assign(n, {
  14443. clientInfo: t
  14444. }), !n.uniIdToken) {
  14445. var _se2 = se(),
  14446. _e18 = _se2.token;
  14447. _e18 && (n.uniIdToken = _e18);
  14448. }
  14449. return n;
  14450. }
  14451. function Lt() {
  14452. return _Lt.apply(this, arguments);
  14453. }
  14454. function _Lt() {
  14455. _Lt = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee56() {
  14456. var _this27 = this;
  14457. var _ref67,
  14458. e,
  14459. t,
  14460. _this$__dev__,
  14461. n,
  14462. s,
  14463. r,
  14464. i,
  14465. o,
  14466. a,
  14467. _args6 = arguments;
  14468. return _regenerator.default.wrap(function _callee56$(_context56) {
  14469. while (1) {
  14470. switch (_context56.prev = _context56.next) {
  14471. case 0:
  14472. _ref67 = _args6.length > 0 && _args6[0] !== undefined ? _args6[0] : {}, e = _ref67.name, t = _ref67.data;
  14473. _context56.next = 3;
  14474. return this.__dev__.initLocalNetwork();
  14475. case 3:
  14476. _this$__dev__ = this.__dev__, n = _this$__dev__.localAddress, s = _this$__dev__.localPort, r = {
  14477. aliyun: "aliyun",
  14478. tencent: "tcb",
  14479. alipay: "alipay"
  14480. }[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);
  14481. return _context56.abrupt("return", new Promise(function (t, n) {
  14482. ne.request({
  14483. method: "POST",
  14484. url: o,
  14485. data: {
  14486. name: e,
  14487. platform: P,
  14488. provider: r,
  14489. spaceId: i
  14490. },
  14491. timeout: 3e3,
  14492. success: function success(e) {
  14493. t(e);
  14494. },
  14495. fail: function fail() {
  14496. t({
  14497. data: {
  14498. code: "NETWORK_ERROR",
  14499. message: "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下,自动切换为已部署的云函数。"
  14500. }
  14501. });
  14502. }
  14503. });
  14504. }).then(function () {
  14505. var _ref68 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14506. e = _ref68.data;
  14507. var _ref69 = e || {},
  14508. t = _ref69.code,
  14509. n = _ref69.message;
  14510. return {
  14511. code: 0 === t ? 0 : t || "SYS_ERR",
  14512. message: n || "SYS_ERR"
  14513. };
  14514. }).then(function (_ref70) {
  14515. var n = _ref70.code,
  14516. s = _ref70.message;
  14517. if (0 !== n) {
  14518. switch (n) {
  14519. case "MODULE_ENCRYPTED":
  14520. 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"));
  14521. break;
  14522. case "FUNCTION_ENCRYPTED":
  14523. 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"));
  14524. break;
  14525. case "ACTION_ENCRYPTED":
  14526. console.error(s || "需要访问加密的uni-clientDB-action,自动切换为云端环境");
  14527. break;
  14528. case "NETWORK_ERROR":
  14529. {
  14530. var _e30 = "连接本地调试服务失败,请检查客户端是否和主机在同一局域网下";
  14531. throw console.error(_e30), new Error(_e30);
  14532. }
  14533. case "SWITCH_TO_CLOUD":
  14534. break;
  14535. default:
  14536. {
  14537. 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");
  14538. throw console.error(_e31), new Error(_e31);
  14539. }
  14540. }
  14541. return _this27._callCloudFunction({
  14542. name: e,
  14543. data: t
  14544. });
  14545. }
  14546. return new Promise(function (e, n) {
  14547. var s = Et.call(_this27, {
  14548. data: t
  14549. });
  14550. ne.request({
  14551. method: "POST",
  14552. url: a,
  14553. data: {
  14554. provider: r,
  14555. platform: P,
  14556. param: s
  14557. },
  14558. success: function success() {
  14559. var _ref71 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14560. t = _ref71.statusCode,
  14561. s = _ref71.data;
  14562. return !t || t >= 400 ? n(new te({
  14563. code: s.code || "SYS_ERR",
  14564. message: s.message || "request:fail"
  14565. })) : e({
  14566. result: s
  14567. });
  14568. },
  14569. fail: function fail(e) {
  14570. n(new te({
  14571. code: e.code || e.errCode || "SYS_ERR",
  14572. message: e.message || e.errMsg || "request:fail"
  14573. }));
  14574. }
  14575. });
  14576. });
  14577. }));
  14578. case 5:
  14579. case "end":
  14580. return _context56.stop();
  14581. }
  14582. }
  14583. }, _callee56, this);
  14584. }));
  14585. return _Lt.apply(this, arguments);
  14586. }
  14587. var Rt = [{
  14588. rule: /fc_function_not_found|FUNCTION_NOT_FOUND/,
  14589. content: ",云函数[{functionName}]在云端不存在,请检查此云函数名称是否正确以及该云函数是否已上传到服务空间",
  14590. mode: "append"
  14591. }];
  14592. var Ut = /[\\^$.*+?()[\]{}|]/g,
  14593. Nt = RegExp(Ut.source);
  14594. function Dt(e, t, n) {
  14595. return e.replace(new RegExp((s = t) && Nt.test(s) ? s.replace(Ut, "\\$&") : s, "g"), n);
  14596. var s;
  14597. }
  14598. var Mt = "none",
  14599. qt = "request",
  14600. Ft = "response",
  14601. Kt = "both";
  14602. var jt = /*#__PURE__*/function () {
  14603. function jt() {
  14604. var _ref26 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  14605. e = _ref26.secretType,
  14606. t = _ref26.uniCloudIns;
  14607. (0, _classCallCheck2.default)(this, jt);
  14608. this.clientType = "", this.secretType = e || Mt, this.uniCloudIns = t;
  14609. var _this$uniCloudIns$con = this.uniCloudIns.config,
  14610. n = _this$uniCloudIns$con.provider,
  14611. s = _this$uniCloudIns$con.spaceId;
  14612. var r;
  14613. this.provider = n, this.spaceId = s, this.scopedGlobalCache = (r = this.uniCloudIns, L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", r.config.spaceId)));
  14614. }
  14615. (0, _createClass2.default)(jt, [{
  14616. key: "getSystemInfo",
  14617. value: function getSystemInfo() {
  14618. return this._systemInfo || (this._systemInfo = ae()), this._systemInfo;
  14619. }
  14620. }, {
  14621. key: "appId",
  14622. get: function get() {
  14623. return this.getSystemInfo().appId;
  14624. }
  14625. }, {
  14626. key: "deviceId",
  14627. get: function get() {
  14628. return this.getSystemInfo().deviceId;
  14629. }
  14630. }, {
  14631. key: "encryptData",
  14632. value: function () {
  14633. var _encryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee36(e) {
  14634. return _regenerator.default.wrap(function _callee36$(_context36) {
  14635. while (1) {
  14636. switch (_context36.prev = _context36.next) {
  14637. case 0:
  14638. return _context36.abrupt("return", this.secretType === Mt ? e : this.platformEncryptData(e));
  14639. case 1:
  14640. case "end":
  14641. return _context36.stop();
  14642. }
  14643. }
  14644. }, _callee36, this);
  14645. }));
  14646. function encryptData(_x33) {
  14647. return _encryptData.apply(this, arguments);
  14648. }
  14649. return encryptData;
  14650. }()
  14651. }, {
  14652. key: "decryptResult",
  14653. value: function () {
  14654. var _decryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee37(e) {
  14655. var _ref27, t, n;
  14656. return _regenerator.default.wrap(function _callee37$(_context37) {
  14657. while (1) {
  14658. switch (_context37.prev = _context37.next) {
  14659. case 0:
  14660. if (!(this.secretType === Mt)) {
  14661. _context37.next = 2;
  14662. break;
  14663. }
  14664. return _context37.abrupt("return", e);
  14665. case 2:
  14666. _ref27 = e || {}, t = _ref27.errCode, n = _ref27.content;
  14667. return _context37.abrupt("return", t || !n ? e : this.secretType === qt ? n : this.platformDecryptResult(e));
  14668. case 4:
  14669. case "end":
  14670. return _context37.stop();
  14671. }
  14672. }
  14673. }, _callee37, this);
  14674. }));
  14675. function decryptResult(_x34) {
  14676. return _decryptResult.apply(this, arguments);
  14677. }
  14678. return decryptResult;
  14679. }()
  14680. }, {
  14681. key: "wrapVerifyClientCallFunction",
  14682. value: function wrapVerifyClientCallFunction(e) {
  14683. var t = this;
  14684. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee38() {
  14685. var _ref29,
  14686. n,
  14687. _ref29$data,
  14688. s,
  14689. r,
  14690. _args38 = arguments;
  14691. return _regenerator.default.wrap(function _callee38$(_context38) {
  14692. while (1) {
  14693. switch (_context38.prev = _context38.next) {
  14694. case 0:
  14695. _ref29 = _args38.length > 0 && _args38[0] !== undefined ? _args38[0] : {}, n = _ref29.name, _ref29$data = _ref29.data, s = _ref29$data === void 0 ? {} : _ref29$data;
  14696. _context38.next = 3;
  14697. return t.prepare();
  14698. case 3:
  14699. _context38.next = 5;
  14700. return t.platformGetSignOption();
  14701. case 5:
  14702. (s = JSON.parse(JSON.stringify(s)))._uniCloudOptions = _context38.sent;
  14703. _context38.next = 8;
  14704. return e({
  14705. name: n,
  14706. data: s
  14707. });
  14708. case 8:
  14709. r = _context38.sent;
  14710. _context38.t0 = t.isClientKeyNotFound(r);
  14711. if (!_context38.t0) {
  14712. _context38.next = 19;
  14713. break;
  14714. }
  14715. _context38.next = 13;
  14716. return t.prepare({
  14717. forceUpdate: !0
  14718. });
  14719. case 13:
  14720. _context38.next = 15;
  14721. return t.platformGetSignOption();
  14722. case 15:
  14723. s._uniCloudOptions = _context38.sent;
  14724. _context38.next = 18;
  14725. return e({
  14726. name: n,
  14727. data: s
  14728. });
  14729. case 18:
  14730. r = _context38.sent;
  14731. case 19:
  14732. return _context38.abrupt("return", r);
  14733. case 20:
  14734. case "end":
  14735. return _context38.stop();
  14736. }
  14737. }
  14738. }, _callee38);
  14739. }));
  14740. }
  14741. }, {
  14742. key: "wrapEncryptDataCallFunction",
  14743. value: function wrapEncryptDataCallFunction(e) {
  14744. var t = this;
  14745. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee39() {
  14746. var _ref31,
  14747. n,
  14748. _ref31$data,
  14749. s,
  14750. r,
  14751. i,
  14752. _r3,
  14753. _args39 = arguments;
  14754. return _regenerator.default.wrap(function _callee39$(_context39) {
  14755. while (1) {
  14756. switch (_context39.prev = _context39.next) {
  14757. case 0:
  14758. _ref31 = _args39.length > 0 && _args39[0] !== undefined ? _args39[0] : {}, n = _ref31.name, _ref31$data = _ref31.data, s = _ref31$data === void 0 ? {} : _ref31$data;
  14759. _context39.next = 3;
  14760. return t.prepare();
  14761. case 3:
  14762. _context39.next = 5;
  14763. return t.encryptData(s);
  14764. case 5:
  14765. r = _context39.sent;
  14766. _context39.next = 8;
  14767. return e({
  14768. name: n,
  14769. data: r
  14770. });
  14771. case 8:
  14772. i = _context39.sent;
  14773. if (!t.isClientKeyNotFound(i)) {
  14774. _context39.next = 21;
  14775. break;
  14776. }
  14777. _context39.next = 12;
  14778. return t.prepare({
  14779. forceUpdate: !0
  14780. });
  14781. case 12:
  14782. _context39.next = 14;
  14783. return t.encryptData(s);
  14784. case 14:
  14785. _r3 = _context39.sent;
  14786. _context39.next = 17;
  14787. return t.platformGetSignOption();
  14788. case 17:
  14789. s._uniCloudOptions = _context39.sent;
  14790. _context39.next = 20;
  14791. return e({
  14792. name: n,
  14793. data: _r3
  14794. });
  14795. case 20:
  14796. i = _context39.sent;
  14797. case 21:
  14798. _context39.next = 23;
  14799. return t.decryptResult(i.result);
  14800. case 23:
  14801. i.result = _context39.sent;
  14802. return _context39.abrupt("return", i);
  14803. case 25:
  14804. case "end":
  14805. return _context39.stop();
  14806. }
  14807. }
  14808. }, _callee39);
  14809. }));
  14810. }
  14811. }]);
  14812. return jt;
  14813. }();
  14814. /*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
  14815. function $t(e) {
  14816. return parseInt(e) === e;
  14817. }
  14818. function Bt(e) {
  14819. if (!$t(e.length)) return !1;
  14820. for (var t = 0; t < e.length; t++) {
  14821. if (!$t(e[t]) || e[t] < 0 || e[t] > 255) return !1;
  14822. }
  14823. return !0;
  14824. }
  14825. function Wt(e, t) {
  14826. if (e.buffer && "Uint8Array" === e.name) return t && (e = e.slice ? e.slice() : Array.prototype.slice.call(e)), e;
  14827. if (Array.isArray(e)) {
  14828. if (!Bt(e)) throw new Error("Array contains invalid value: " + e);
  14829. return new Uint8Array(e);
  14830. }
  14831. if ($t(e.length) && Bt(e)) return new Uint8Array(e);
  14832. throw new Error("unsupported array-like object");
  14833. }
  14834. function Ht(e) {
  14835. return new Uint8Array(e);
  14836. }
  14837. function zt(e, t, n, s, r) {
  14838. null == s && null == r || (e = e.slice ? e.slice(s, r) : Array.prototype.slice.call(e, s, r)), t.set(e, n);
  14839. }
  14840. var Jt,
  14841. Gt = {
  14842. toBytes: function toBytes(e) {
  14843. var t = [],
  14844. n = 0;
  14845. for (e = encodeURI(e); n < e.length;) {
  14846. var s = e.charCodeAt(n++);
  14847. 37 === s ? (t.push(parseInt(e.substr(n, 2), 16)), n += 2) : t.push(s);
  14848. }
  14849. return Wt(t);
  14850. },
  14851. fromBytes: function fromBytes(e) {
  14852. for (var t = [], n = 0; n < e.length;) {
  14853. var s = e[n];
  14854. 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);
  14855. }
  14856. return t.join("");
  14857. }
  14858. },
  14859. Vt = (Jt = "0123456789abcdef", {
  14860. toBytes: function toBytes(e) {
  14861. for (var t = [], n = 0; n < e.length; n += 2) {
  14862. t.push(parseInt(e.substr(n, 2), 16));
  14863. }
  14864. return t;
  14865. },
  14866. fromBytes: function fromBytes(e) {
  14867. for (var t = [], n = 0; n < e.length; n++) {
  14868. var s = e[n];
  14869. t.push(Jt[(240 & s) >> 4] + Jt[15 & s]);
  14870. }
  14871. return t.join("");
  14872. }
  14873. }),
  14874. Yt = {
  14875. 16: 10,
  14876. 24: 12,
  14877. 32: 14
  14878. },
  14879. 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],
  14880. 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],
  14881. 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],
  14882. 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],
  14883. 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],
  14884. 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],
  14885. 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],
  14886. 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],
  14887. 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],
  14888. 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],
  14889. 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],
  14890. 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],
  14891. hn = [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],
  14892. ln = [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],
  14893. 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];
  14894. function pn(e) {
  14895. for (var t = [], n = 0; n < e.length; n += 4) {
  14896. t.push(e[n] << 24 | e[n + 1] << 16 | e[n + 2] << 8 | e[n + 3]);
  14897. }
  14898. return t;
  14899. }
  14900. var fn = /*#__PURE__*/function () {
  14901. function fn(e) {
  14902. (0, _classCallCheck2.default)(this, fn);
  14903. if (!(this instanceof fn)) throw Error("AES must be instanitated with `new`");
  14904. Object.defineProperty(this, "key", {
  14905. value: Wt(e, !0)
  14906. }), this._prepare();
  14907. }
  14908. (0, _createClass2.default)(fn, [{
  14909. key: "_prepare",
  14910. value: function _prepare() {
  14911. var e = Yt[this.key.length];
  14912. if (null == e) throw new Error("invalid key size (must be 16, 24 or 32 bytes)");
  14913. this._Ke = [], this._Kd = [];
  14914. for (var t = 0; t <= e; t++) {
  14915. this._Ke.push([0, 0, 0, 0]), this._Kd.push([0, 0, 0, 0]);
  14916. }
  14917. var n,
  14918. s = 4 * (e + 1),
  14919. r = this.key.length / 4,
  14920. i = pn(this.key);
  14921. for (t = 0; t < r; t++) {
  14922. n = t >> 2, this._Ke[n][t % 4] = i[t], this._Kd[e - n][t % 4] = i[t];
  14923. }
  14924. for (var o, a = 0, c = r; c < s;) {
  14925. 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++) {
  14926. i[t] ^= i[t - 1];
  14927. } else {
  14928. for (t = 1; t < r / 2; t++) {
  14929. i[t] ^= i[t - 1];
  14930. }
  14931. 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;
  14932. for (t = r / 2 + 1; t < r; t++) {
  14933. i[t] ^= i[t - 1];
  14934. }
  14935. }
  14936. for (t = 0; t < r && c < s;) {
  14937. u = c >> 2, h = c % 4, this._Ke[u][h] = i[t], this._Kd[e - u][h] = i[t++], c++;
  14938. }
  14939. }
  14940. for (var u = 1; u < e; u++) {
  14941. for (var h = 0; h < 4; h++) {
  14942. o = this._Kd[u][h], this._Kd[u][h] = un[o >> 24 & 255] ^ hn[o >> 16 & 255] ^ ln[o >> 8 & 255] ^ dn[255 & o];
  14943. }
  14944. }
  14945. }
  14946. }, {
  14947. key: "encrypt",
  14948. value: function encrypt(e) {
  14949. if (16 != e.length) throw new Error("invalid plaintext size (must be 16 bytes)");
  14950. for (var t = this._Ke.length - 1, n = [0, 0, 0, 0], s = pn(e), r = 0; r < 4; r++) {
  14951. s[r] ^= this._Ke[0][r];
  14952. }
  14953. for (var i = 1; i < t; i++) {
  14954. for (r = 0; r < 4; r++) {
  14955. 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];
  14956. }
  14957. s = n.slice();
  14958. }
  14959. var o,
  14960. a = Ht(16);
  14961. for (r = 0; r < 4; r++) {
  14962. 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);
  14963. }
  14964. return a;
  14965. }
  14966. }, {
  14967. key: "decrypt",
  14968. value: function decrypt(e) {
  14969. if (16 != e.length) throw new Error("invalid ciphertext size (must be 16 bytes)");
  14970. for (var t = this._Kd.length - 1, n = [0, 0, 0, 0], s = pn(e), r = 0; r < 4; r++) {
  14971. s[r] ^= this._Kd[0][r];
  14972. }
  14973. for (var i = 1; i < t; i++) {
  14974. for (r = 0; r < 4; r++) {
  14975. 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];
  14976. }
  14977. s = n.slice();
  14978. }
  14979. var o,
  14980. a = Ht(16);
  14981. for (r = 0; r < 4; r++) {
  14982. 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);
  14983. }
  14984. return a;
  14985. }
  14986. }]);
  14987. return fn;
  14988. }();
  14989. var gn = /*#__PURE__*/function () {
  14990. function gn(e) {
  14991. (0, _classCallCheck2.default)(this, gn);
  14992. if (!(this instanceof gn)) throw Error("AES must be instanitated with `new`");
  14993. this.description = "Electronic Code Block", this.name = "ecb", this._aes = new fn(e);
  14994. }
  14995. (0, _createClass2.default)(gn, [{
  14996. key: "encrypt",
  14997. value: function encrypt(e) {
  14998. if ((e = Wt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  14999. for (var t = Ht(e.length), n = Ht(16), s = 0; s < e.length; s += 16) {
  15000. zt(e, n, 0, s, s + 16), zt(n = this._aes.encrypt(n), t, s);
  15001. }
  15002. return t;
  15003. }
  15004. }, {
  15005. key: "decrypt",
  15006. value: function decrypt(e) {
  15007. if ((e = Wt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  15008. for (var t = Ht(e.length), n = Ht(16), s = 0; s < e.length; s += 16) {
  15009. zt(e, n, 0, s, s + 16), zt(n = this._aes.decrypt(n), t, s);
  15010. }
  15011. return t;
  15012. }
  15013. }]);
  15014. return gn;
  15015. }();
  15016. var mn = /*#__PURE__*/function () {
  15017. function mn(e, t) {
  15018. (0, _classCallCheck2.default)(this, mn);
  15019. if (!(this instanceof mn)) throw Error("AES must be instanitated with `new`");
  15020. if (this.description = "Cipher Block Chaining", this.name = "cbc", t) {
  15021. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  15022. } else t = Ht(16);
  15023. this._lastCipherblock = Wt(t, !0), this._aes = new fn(e);
  15024. }
  15025. (0, _createClass2.default)(mn, [{
  15026. key: "encrypt",
  15027. value: function encrypt(e) {
  15028. if ((e = Wt(e)).length % 16 != 0) throw new Error("invalid plaintext size (must be multiple of 16 bytes)");
  15029. for (var t = Ht(e.length), n = Ht(16), s = 0; s < e.length; s += 16) {
  15030. zt(e, n, 0, s, s + 16);
  15031. for (var r = 0; r < 16; r++) {
  15032. n[r] ^= this._lastCipherblock[r];
  15033. }
  15034. this._lastCipherblock = this._aes.encrypt(n), zt(this._lastCipherblock, t, s);
  15035. }
  15036. return t;
  15037. }
  15038. }, {
  15039. key: "decrypt",
  15040. value: function decrypt(e) {
  15041. if ((e = Wt(e)).length % 16 != 0) throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");
  15042. for (var t = Ht(e.length), n = Ht(16), s = 0; s < e.length; s += 16) {
  15043. zt(e, n, 0, s, s + 16), n = this._aes.decrypt(n);
  15044. for (var r = 0; r < 16; r++) {
  15045. t[s + r] = n[r] ^ this._lastCipherblock[r];
  15046. }
  15047. zt(e, this._lastCipherblock, 0, s, s + 16);
  15048. }
  15049. return t;
  15050. }
  15051. }]);
  15052. return mn;
  15053. }();
  15054. var yn = /*#__PURE__*/function () {
  15055. function yn(e, t, n) {
  15056. (0, _classCallCheck2.default)(this, yn);
  15057. if (!(this instanceof yn)) throw Error("AES must be instanitated with `new`");
  15058. if (this.description = "Cipher Feedback", this.name = "cfb", t) {
  15059. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 size)");
  15060. } else t = Ht(16);
  15061. n || (n = 1), this.segmentSize = n, this._shiftRegister = Wt(t, !0), this._aes = new fn(e);
  15062. }
  15063. (0, _createClass2.default)(yn, [{
  15064. key: "encrypt",
  15065. value: function encrypt(e) {
  15066. if (e.length % this.segmentSize != 0) throw new Error("invalid plaintext size (must be segmentSize bytes)");
  15067. for (var t, n = Wt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  15068. t = this._aes.encrypt(this._shiftRegister);
  15069. for (var r = 0; r < this.segmentSize; r++) {
  15070. n[s + r] ^= t[r];
  15071. }
  15072. zt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), zt(n, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  15073. }
  15074. return n;
  15075. }
  15076. }, {
  15077. key: "decrypt",
  15078. value: function decrypt(e) {
  15079. if (e.length % this.segmentSize != 0) throw new Error("invalid ciphertext size (must be segmentSize bytes)");
  15080. for (var t, n = Wt(e, !0), s = 0; s < n.length; s += this.segmentSize) {
  15081. t = this._aes.encrypt(this._shiftRegister);
  15082. for (var r = 0; r < this.segmentSize; r++) {
  15083. n[s + r] ^= t[r];
  15084. }
  15085. zt(this._shiftRegister, this._shiftRegister, 0, this.segmentSize), zt(e, this._shiftRegister, 16 - this.segmentSize, s, s + this.segmentSize);
  15086. }
  15087. return n;
  15088. }
  15089. }]);
  15090. return yn;
  15091. }();
  15092. var _n = /*#__PURE__*/function () {
  15093. function _n(e, t) {
  15094. (0, _classCallCheck2.default)(this, _n);
  15095. if (!(this instanceof _n)) throw Error("AES must be instanitated with `new`");
  15096. if (this.description = "Output Feedback", this.name = "ofb", t) {
  15097. if (16 != t.length) throw new Error("invalid initialation vector size (must be 16 bytes)");
  15098. } else t = Ht(16);
  15099. this._lastPrecipher = Wt(t, !0), this._lastPrecipherIndex = 16, this._aes = new fn(e);
  15100. }
  15101. (0, _createClass2.default)(_n, [{
  15102. key: "encrypt",
  15103. value: function encrypt(e) {
  15104. for (var t = Wt(e, !0), n = 0; n < t.length; n++) {
  15105. 16 === this._lastPrecipherIndex && (this._lastPrecipher = this._aes.encrypt(this._lastPrecipher), this._lastPrecipherIndex = 0), t[n] ^= this._lastPrecipher[this._lastPrecipherIndex++];
  15106. }
  15107. return t;
  15108. }
  15109. }, {
  15110. key: "decrypt",
  15111. value: function decrypt(e) {
  15112. return this.encrypt(e);
  15113. }
  15114. }]);
  15115. return _n;
  15116. }();
  15117. var wn = /*#__PURE__*/function () {
  15118. function wn(e) {
  15119. (0, _classCallCheck2.default)(this, wn);
  15120. if (!(this instanceof wn)) throw Error("Counter must be instanitated with `new`");
  15121. 0 === e || e || (e = 1), "number" == typeof e ? (this._counter = Ht(16), this.setValue(e)) : this.setBytes(e);
  15122. }
  15123. (0, _createClass2.default)(wn, [{
  15124. key: "setValue",
  15125. value: function setValue(e) {
  15126. if ("number" != typeof e || parseInt(e) != e) throw new Error("invalid counter value (must be an integer)");
  15127. if (e > Number.MAX_SAFE_INTEGER) throw new Error("integer value out of safe range");
  15128. for (var t = 15; t >= 0; --t) {
  15129. this._counter[t] = e % 256, e = parseInt(e / 256);
  15130. }
  15131. }
  15132. }, {
  15133. key: "setBytes",
  15134. value: function setBytes(e) {
  15135. if (16 != (e = Wt(e, !0)).length) throw new Error("invalid counter bytes size (must be 16 bytes)");
  15136. this._counter = e;
  15137. }
  15138. }, {
  15139. key: "increment",
  15140. value: function increment() {
  15141. for (var e = 15; e >= 0; e--) {
  15142. if (255 !== this._counter[e]) {
  15143. this._counter[e]++;
  15144. break;
  15145. }
  15146. this._counter[e] = 0;
  15147. }
  15148. }
  15149. }]);
  15150. return wn;
  15151. }();
  15152. var vn = /*#__PURE__*/function () {
  15153. function vn(e, t) {
  15154. (0, _classCallCheck2.default)(this, vn);
  15155. if (!(this instanceof vn)) throw Error("AES must be instanitated with `new`");
  15156. 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);
  15157. }
  15158. (0, _createClass2.default)(vn, [{
  15159. key: "encrypt",
  15160. value: function encrypt(e) {
  15161. for (var t = Wt(e, !0), n = 0; n < t.length; n++) {
  15162. 16 === this._remainingCounterIndex && (this._remainingCounter = this._aes.encrypt(this._counter._counter), this._remainingCounterIndex = 0, this._counter.increment()), t[n] ^= this._remainingCounter[this._remainingCounterIndex++];
  15163. }
  15164. return t;
  15165. }
  15166. }, {
  15167. key: "decrypt",
  15168. value: function decrypt(e) {
  15169. return this.encrypt(e);
  15170. }
  15171. }]);
  15172. return vn;
  15173. }();
  15174. var In = {
  15175. AES: fn,
  15176. Counter: wn,
  15177. ModeOfOperation: {
  15178. ecb: gn,
  15179. cbc: mn,
  15180. cfb: yn,
  15181. ofb: _n,
  15182. ctr: vn
  15183. },
  15184. utils: {
  15185. hex: Vt,
  15186. utf8: Gt
  15187. },
  15188. padding: {
  15189. pkcs7: {
  15190. pad: function pad(e) {
  15191. var t = 16 - (e = Wt(e, !0)).length % 16,
  15192. n = Ht(e.length + t);
  15193. zt(e, n);
  15194. for (var s = e.length; s < n.length; s++) {
  15195. n[s] = t;
  15196. }
  15197. return n;
  15198. },
  15199. strip: function strip(e) {
  15200. if ((e = Wt(e, !0)).length < 16) throw new Error("PKCS#7 invalid length");
  15201. var t = e[e.length - 1];
  15202. if (t > 16) throw new Error("PKCS#7 padding byte out of range");
  15203. for (var n = e.length - t, s = 0; s < t; s++) {
  15204. if (e[n + s] !== t) throw new Error("PKCS#7 invalid padding byte");
  15205. }
  15206. var r = Ht(n);
  15207. return zt(e, r, 0, 0, n), r;
  15208. }
  15209. }
  15210. },
  15211. _arrayTest: {
  15212. coerceArray: Wt,
  15213. createArray: Ht,
  15214. copyArray: zt
  15215. }
  15216. };
  15217. function Sn(e, t, n) {
  15218. var s = new Uint8Array(uni.base64ToArrayBuffer(t)),
  15219. r = In.utils.utf8.toBytes(n),
  15220. i = In.utils.utf8.toBytes(e),
  15221. o = new In.ModeOfOperation.cbc(s, r),
  15222. a = In.padding.pkcs7.pad(i),
  15223. c = o.encrypt(a);
  15224. return uni.arrayBufferToBase64(c);
  15225. }
  15226. var bn = {
  15227. code: 2e4,
  15228. message: "System error"
  15229. },
  15230. kn = {
  15231. code: 20101,
  15232. message: "Invalid client"
  15233. },
  15234. An = {
  15235. code: 20102,
  15236. message: "Get encrypt key failed"
  15237. },
  15238. Pn = {
  15239. 10001: "Secure network is not supported on current playground or unimpsdk",
  15240. 10003: "Config missing in current app. If the problem pesist, please contact DCloud.",
  15241. 10009: "Encrypt payload failed",
  15242. 10010: "Decrypt response failed"
  15243. };
  15244. function Tn(e) {
  15245. var _ref32 = e || {},
  15246. t = _ref32.errSubject,
  15247. n = _ref32.subject,
  15248. s = _ref32.errCode,
  15249. r = _ref32.errMsg,
  15250. i = _ref32.code,
  15251. o = _ref32.message,
  15252. a = _ref32.cause;
  15253. return new te({
  15254. subject: t || n || "uni-secure-network",
  15255. code: s || i || bn.code,
  15256. message: r || o,
  15257. cause: a
  15258. });
  15259. }
  15260. var Cn,
  15261. xn,
  15262. On = null;
  15263. var En = /*#__PURE__*/function (_jt) {
  15264. (0, _inherits2.default)(En, _jt);
  15265. var _super9 = _createSuper(En);
  15266. function En(e) {
  15267. var _this15;
  15268. (0, _classCallCheck2.default)(this, En);
  15269. _this15 = _super9.call(this, e), _this15.clientType = "mp-weixin", _this15.userEncryptKey = null;
  15270. return _this15;
  15271. }
  15272. (0, _createClass2.default)(En, [{
  15273. key: "isLogin",
  15274. value: function isLogin() {
  15275. return !!this.scopedGlobalCache.mpWeixinCode || !!this.scopedGlobalCache.mpWeixinOpenid;
  15276. }
  15277. }, {
  15278. key: "prepare",
  15279. value: function () {
  15280. var _prepare2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee40() {
  15281. return _regenerator.default.wrap(function _callee40$(_context40) {
  15282. while (1) {
  15283. switch (_context40.prev = _context40.next) {
  15284. case 0:
  15285. if (this.isLogin()) {
  15286. _context40.next = 7;
  15287. break;
  15288. }
  15289. if (this.scopedGlobalCache.initPromise) {
  15290. _context40.next = 3;
  15291. break;
  15292. }
  15293. throw new Error("`uniCloud.initSecureNetworkByWeixin` has not yet been called");
  15294. case 3:
  15295. _context40.next = 5;
  15296. return this.scopedGlobalCache.initPromise;
  15297. case 5:
  15298. if (this.isLogin()) {
  15299. _context40.next = 7;
  15300. break;
  15301. }
  15302. throw new Error("uniCloud.initSecureNetworkByWeixin` has not yet been called or successfully excuted");
  15303. case 7:
  15304. case "end":
  15305. return _context40.stop();
  15306. }
  15307. }
  15308. }, _callee40, this);
  15309. }));
  15310. function prepare() {
  15311. return _prepare2.apply(this, arguments);
  15312. }
  15313. return prepare;
  15314. }()
  15315. }, {
  15316. key: "getUserEncryptKey",
  15317. value: function () {
  15318. var _getUserEncryptKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee41() {
  15319. var _this16 = this;
  15320. var e;
  15321. return _regenerator.default.wrap(function _callee41$(_context41) {
  15322. while (1) {
  15323. switch (_context41.prev = _context41.next) {
  15324. case 0:
  15325. if (!this.userEncryptKey) {
  15326. _context41.next = 2;
  15327. break;
  15328. }
  15329. return _context41.abrupt("return", this.userEncryptKey);
  15330. case 2:
  15331. if (!(On && On.expireTime)) {
  15332. _context41.next = 6;
  15333. break;
  15334. }
  15335. e = Date.now();
  15336. if (!(On.expireTime - e > 0)) {
  15337. _context41.next = 6;
  15338. break;
  15339. }
  15340. return _context41.abrupt("return", (this.userEncryptKey = On, this.userEncryptKey));
  15341. case 6:
  15342. return _context41.abrupt("return", new Promise(function (e, t) {
  15343. uni.getUserCryptoManager().getLatestUserKey({
  15344. success: function success(t) {
  15345. On = t, _this16.userEncryptKey = t, e(_this16.userEncryptKey);
  15346. },
  15347. fail: function fail(e) {
  15348. t(Tn(_objectSpread(_objectSpread({}, An), {}, {
  15349. cause: e
  15350. })));
  15351. }
  15352. });
  15353. }));
  15354. case 7:
  15355. case "end":
  15356. return _context41.stop();
  15357. }
  15358. }
  15359. }, _callee41, this);
  15360. }));
  15361. function getUserEncryptKey() {
  15362. return _getUserEncryptKey.apply(this, arguments);
  15363. }
  15364. return getUserEncryptKey;
  15365. }()
  15366. }, {
  15367. key: "getWxAppId",
  15368. value: function getWxAppId() {
  15369. return wx.getAccountInfoSync().miniProgram.appId;
  15370. }
  15371. }, {
  15372. key: "platformGetSignOption",
  15373. value: function () {
  15374. var _platformGetSignOption = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee42() {
  15375. var _yield$this$getUserEn, e, t, n;
  15376. return _regenerator.default.wrap(function _callee42$(_context42) {
  15377. while (1) {
  15378. switch (_context42.prev = _context42.next) {
  15379. case 0:
  15380. _context42.next = 2;
  15381. return this.getUserEncryptKey();
  15382. case 2:
  15383. _yield$this$getUserEn = _context42.sent;
  15384. e = _yield$this$getUserEn.encryptKey;
  15385. t = _yield$this$getUserEn.iv;
  15386. n = _yield$this$getUserEn.version;
  15387. return _context42.abrupt("return", {
  15388. verifyClientSign: Sn(JSON.stringify({
  15389. data: JSON.stringify({}),
  15390. appId: this.appId,
  15391. deviceId: this.deviceId,
  15392. wxAppId: this.getWxAppId(),
  15393. simulator: "devtools" === ae().platform,
  15394. timestamp: Date.now()
  15395. }), e, t),
  15396. encryptKeyId: n,
  15397. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  15398. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  15399. });
  15400. case 7:
  15401. case "end":
  15402. return _context42.stop();
  15403. }
  15404. }
  15405. }, _callee42, this);
  15406. }));
  15407. function platformGetSignOption() {
  15408. return _platformGetSignOption.apply(this, arguments);
  15409. }
  15410. return platformGetSignOption;
  15411. }()
  15412. }, {
  15413. key: "platformEncryptData",
  15414. value: function () {
  15415. var _platformEncryptData = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee43(e) {
  15416. var _yield$this$getUserEn2, t, n, s, r;
  15417. return _regenerator.default.wrap(function _callee43$(_context43) {
  15418. while (1) {
  15419. switch (_context43.prev = _context43.next) {
  15420. case 0:
  15421. _context43.next = 2;
  15422. return this.getUserEncryptKey();
  15423. case 2:
  15424. _yield$this$getUserEn2 = _context43.sent;
  15425. t = _yield$this$getUserEn2.encryptKey;
  15426. n = _yield$this$getUserEn2.iv;
  15427. s = _yield$this$getUserEn2.version;
  15428. r = {
  15429. secretType: this.secretType,
  15430. encryptKeyId: s,
  15431. mpWeixinCode: this.scopedGlobalCache.mpWeixinCode,
  15432. mpWeixinOpenid: this.scopedGlobalCache.mpWeixinOpenid
  15433. };
  15434. return _context43.abrupt("return", this.secretType === Ft ? {
  15435. content: e,
  15436. _uniCloudOptions: r
  15437. } : {
  15438. content: Sn(JSON.stringify({
  15439. data: JSON.stringify(e),
  15440. appId: this.appId,
  15441. deviceId: this.deviceId,
  15442. wxAppId: this.getWxAppId(),
  15443. simulator: "devtools" === ae().platform,
  15444. timestamp: Date.now()
  15445. }), t, n),
  15446. _uniCloudOptions: r
  15447. });
  15448. case 8:
  15449. case "end":
  15450. return _context43.stop();
  15451. }
  15452. }
  15453. }, _callee43, this);
  15454. }));
  15455. function platformEncryptData(_x35) {
  15456. return _platformEncryptData.apply(this, arguments);
  15457. }
  15458. return platformEncryptData;
  15459. }()
  15460. }, {
  15461. key: "platformDecryptResult",
  15462. value: function () {
  15463. var _platformDecryptResult = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee44(e) {
  15464. var t, _yield$this$getUserEn3, n, s;
  15465. return _regenerator.default.wrap(function _callee44$(_context44) {
  15466. while (1) {
  15467. switch (_context44.prev = _context44.next) {
  15468. case 0:
  15469. t = e.content;
  15470. _context44.next = 3;
  15471. return this.getUserEncryptKey();
  15472. case 3:
  15473. _yield$this$getUserEn3 = _context44.sent;
  15474. n = _yield$this$getUserEn3.encryptKey;
  15475. s = _yield$this$getUserEn3.iv;
  15476. return _context44.abrupt("return", JSON.parse(function (e, t, n) {
  15477. var s = new Uint8Array(uni.base64ToArrayBuffer(e)),
  15478. r = new Uint8Array(uni.base64ToArrayBuffer(t)),
  15479. i = In.utils.utf8.toBytes(n),
  15480. o = new In.ModeOfOperation.cbc(r, i),
  15481. a = In.padding.pkcs7.strip(o.decrypt(s));
  15482. return In.utils.utf8.fromBytes(a);
  15483. }(t, n, s)));
  15484. case 7:
  15485. case "end":
  15486. return _context44.stop();
  15487. }
  15488. }
  15489. }, _callee44, this);
  15490. }));
  15491. function platformDecryptResult(_x36) {
  15492. return _platformDecryptResult.apply(this, arguments);
  15493. }
  15494. return platformDecryptResult;
  15495. }()
  15496. }, {
  15497. key: "isClientKeyNotFound",
  15498. value: function isClientKeyNotFound() {
  15499. return !1;
  15500. }
  15501. }]);
  15502. return En;
  15503. }(jt);
  15504. function Ln(e) {
  15505. var t = ["hasClientKey", "encryptGetClientKeyPayload", "setClientKey", "encrypt", "decrypt"],
  15506. n = {};
  15507. var _loop = function _loop(_s10) {
  15508. var r = t[_s10];
  15509. n[r] = function () {
  15510. for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
  15511. t[_key] = arguments[_key];
  15512. }
  15513. return new Promise(function (n, s) {
  15514. "function" == typeof e[r] ? e[r].apply(e, t.concat([function () {
  15515. var _ref33 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15516. e = _ref33.type,
  15517. t = _ref33.data,
  15518. r = _ref33.errCode,
  15519. i = _ref33.errMsg,
  15520. o = _ref33.errSubject,
  15521. a = _ref33.message;
  15522. "success" === e ? n(t) : s(Tn({
  15523. errCode: r,
  15524. errMsg: Pn[r] || i || a,
  15525. errSubject: o
  15526. }));
  15527. }])) : s(Tn({
  15528. message: "请检查manifest.json内是否开启安全网络模块,另外注意标准基座不支持安全网络模块"
  15529. }));
  15530. });
  15531. };
  15532. };
  15533. for (var _s10 = 0; _s10 < t.length; _s10++) {
  15534. _loop(_s10);
  15535. }
  15536. return n;
  15537. }
  15538. var Rn = /*#__PURE__*/function (_jt2) {
  15539. (0, _inherits2.default)(Rn, _jt2);
  15540. var _super10 = _createSuper(Rn);
  15541. function Rn(e) {
  15542. var _this17;
  15543. (0, _classCallCheck2.default)(this, Rn);
  15544. _this17 = _super10.call(this, e), _this17.clientType = "app", _this17.appUtils = _objectSpread({}, Ln(uni.requireNativePlugin("plus"))), _this17.systemInfo = Cn || (Cn = ae());
  15545. return _this17;
  15546. }
  15547. (0, _createClass2.default)(Rn, [{
  15548. key: "hasClientKey",
  15549. value: function () {
  15550. var _hasClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee45() {
  15551. return _regenerator.default.wrap(function _callee45$(_context45) {
  15552. while (1) {
  15553. switch (_context45.prev = _context45.next) {
  15554. case 0:
  15555. _context45.next = 2;
  15556. return this.appUtils.hasClientKey({
  15557. provider: this.provider,
  15558. spaceId: this.spaceId
  15559. });
  15560. case 2:
  15561. this._hasClientKey = _context45.sent;
  15562. return _context45.abrupt("return", this._hasClientKey);
  15563. case 4:
  15564. case "end":
  15565. return _context45.stop();
  15566. }
  15567. }
  15568. }, _callee45, this);
  15569. }));
  15570. function hasClientKey() {
  15571. return _hasClientKey.apply(this, arguments);
  15572. }
  15573. return hasClientKey;
  15574. }()
  15575. }, {
  15576. key: "getAppClientKey",
  15577. value: function () {
  15578. var _getAppClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee46() {
  15579. var _yield$this$appUtils$, e, t, n, s, r;
  15580. return _regenerator.default.wrap(function _callee46$(_context46) {
  15581. while (1) {
  15582. switch (_context46.prev = _context46.next) {
  15583. case 0:
  15584. _context46.next = 2;
  15585. return this.appUtils.encryptGetClientKeyPayload({
  15586. data: JSON.stringify({})
  15587. });
  15588. case 2:
  15589. _yield$this$appUtils$ = _context46.sent;
  15590. e = _yield$this$appUtils$.data;
  15591. t = _yield$this$appUtils$.key;
  15592. _context46.next = 7;
  15593. return this.uniCloudIns.callFunction({
  15594. name: "DCloud-clientDB",
  15595. data: {
  15596. redirectTo: "encryption",
  15597. action: "getAppClientKey",
  15598. data: e,
  15599. key: t
  15600. }
  15601. });
  15602. case 7:
  15603. _context46.t0 = _context46.sent.result;
  15604. if (_context46.t0) {
  15605. _context46.next = 10;
  15606. break;
  15607. }
  15608. _context46.t0 = {};
  15609. case 10:
  15610. n = _context46.t0;
  15611. if (!(0 !== n.errCode)) {
  15612. _context46.next = 13;
  15613. break;
  15614. }
  15615. throw function (e) {
  15616. return new te({
  15617. subject: e.errSubject || "uni-secure-network",
  15618. code: e.errCode || e.code || bn.code,
  15619. message: e.errMsg || e.message
  15620. });
  15621. }(n);
  15622. case 13:
  15623. s = n.clientKey, r = n.key;
  15624. _context46.next = 16;
  15625. return this.appUtils.setClientKey({
  15626. provider: this.provider,
  15627. spaceId: this.spaceId,
  15628. clientKey: s,
  15629. key: r
  15630. });
  15631. case 16:
  15632. case "end":
  15633. return _context46.stop();
  15634. }
  15635. }
  15636. }, _callee46, this);
  15637. }));
  15638. function getAppClientKey() {
  15639. return _getAppClientKey.apply(this, arguments);
  15640. }
  15641. return getAppClientKey;
  15642. }()
  15643. }, {
  15644. key: "ensureClientKey",
  15645. value: function () {
  15646. var _ensureClientKey = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee47() {
  15647. var _this18 = this;
  15648. var _ref34,
  15649. _ref34$forceUpdate,
  15650. e,
  15651. _args47 = arguments;
  15652. return _regenerator.default.wrap(function _callee47$(_context47) {
  15653. while (1) {
  15654. switch (_context47.prev = _context47.next) {
  15655. case 0:
  15656. _ref34 = _args47.length > 0 && _args47[0] !== undefined ? _args47[0] : {}, _ref34$forceUpdate = _ref34.forceUpdate, e = _ref34$forceUpdate === void 0 ? !1 : _ref34$forceUpdate;
  15657. _context47.t1 = !0;
  15658. _context47.next = 4;
  15659. return this.hasClientKey();
  15660. case 4:
  15661. _context47.t2 = _context47.sent;
  15662. _context47.t0 = _context47.t1 !== _context47.t2;
  15663. if (_context47.t0) {
  15664. _context47.next = 8;
  15665. break;
  15666. }
  15667. _context47.t0 = e;
  15668. case 8:
  15669. if (!_context47.t0) {
  15670. _context47.next = 10;
  15671. break;
  15672. }
  15673. return _context47.abrupt("return", (e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus === l || !e && this.scopedGlobalCache.initPromise && this.scopedGlobalCache.initStatus !== p || (this.scopedGlobalCache.initPromise = this.getAppClientKey(), this.scopedGlobalCache.initPromise.then(function (e) {
  15674. _this18.scopedGlobalCache.initStatus = d;
  15675. }).catch(function (e) {
  15676. throw _this18.scopedGlobalCache.initStatus = p, e;
  15677. }), this.scopedGlobalCache.initStatus = l), this.scopedGlobalCache.initPromise));
  15678. case 10:
  15679. case "end":
  15680. return _context47.stop();
  15681. }
  15682. }
  15683. }, _callee47, this);
  15684. }));
  15685. function ensureClientKey() {
  15686. return _ensureClientKey.apply(this, arguments);
  15687. }
  15688. return ensureClientKey;
  15689. }()
  15690. }, {
  15691. key: "prepare",
  15692. value: function () {
  15693. var _prepare3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee48() {
  15694. var _ref35,
  15695. _ref35$forceUpdate,
  15696. e,
  15697. _args48 = arguments;
  15698. return _regenerator.default.wrap(function _callee48$(_context48) {
  15699. while (1) {
  15700. switch (_context48.prev = _context48.next) {
  15701. case 0:
  15702. _ref35 = _args48.length > 0 && _args48[0] !== undefined ? _args48[0] : {}, _ref35$forceUpdate = _ref35.forceUpdate, e = _ref35$forceUpdate === void 0 ? !1 : _ref35$forceUpdate;
  15703. _context48.next = 3;
  15704. return this.ensureClientKey({
  15705. forceUpdate: e
  15706. });
  15707. case 3:
  15708. case "end":
  15709. return _context48.stop();
  15710. }
  15711. }
  15712. }, _callee48, this);
  15713. }));
  15714. function prepare() {
  15715. return _prepare3.apply(this, arguments);
  15716. }
  15717. return prepare;
  15718. }()
  15719. }, {
  15720. key: "platformGetSignOption",
  15721. value: function () {
  15722. var _platformGetSignOption2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee49() {
  15723. var _yield$this$appUtils$2, e, t;
  15724. return _regenerator.default.wrap(function _callee49$(_context49) {
  15725. while (1) {
  15726. switch (_context49.prev = _context49.next) {
  15727. case 0:
  15728. _context49.next = 2;
  15729. return this.appUtils.encrypt({
  15730. provider: this.provider,
  15731. spaceId: this.spaceId,
  15732. data: JSON.stringify({})
  15733. });
  15734. case 2:
  15735. _yield$this$appUtils$2 = _context49.sent;
  15736. e = _yield$this$appUtils$2.data;
  15737. t = _yield$this$appUtils$2.key;
  15738. return _context49.abrupt("return", {
  15739. verifyClientSign: e,
  15740. encryptKeyId: t
  15741. });
  15742. case 6:
  15743. case "end":
  15744. return _context49.stop();
  15745. }
  15746. }
  15747. }, _callee49, this);
  15748. }));
  15749. function platformGetSignOption() {
  15750. return _platformGetSignOption2.apply(this, arguments);
  15751. }
  15752. return platformGetSignOption;
  15753. }()
  15754. }, {
  15755. key: "platformEncryptData",
  15756. value: function () {
  15757. var _platformEncryptData2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee50(e) {
  15758. var _yield$this$appUtils$3, t, n, s;
  15759. return _regenerator.default.wrap(function _callee50$(_context50) {
  15760. while (1) {
  15761. switch (_context50.prev = _context50.next) {
  15762. case 0:
  15763. _context50.next = 2;
  15764. return this.appUtils.encrypt({
  15765. provider: this.provider,
  15766. spaceId: this.spaceId,
  15767. data: JSON.stringify(e)
  15768. });
  15769. case 2:
  15770. _yield$this$appUtils$3 = _context50.sent;
  15771. t = _yield$this$appUtils$3.data;
  15772. n = _yield$this$appUtils$3.key;
  15773. s = {
  15774. secretType: this.secretType,
  15775. encryptKeyId: n
  15776. };
  15777. return _context50.abrupt("return", this.secretType === Ft ? {
  15778. content: e,
  15779. _uniCloudOptions: s
  15780. } : {
  15781. content: t,
  15782. _uniCloudOptions: s
  15783. });
  15784. case 7:
  15785. case "end":
  15786. return _context50.stop();
  15787. }
  15788. }
  15789. }, _callee50, this);
  15790. }));
  15791. function platformEncryptData(_x37) {
  15792. return _platformEncryptData2.apply(this, arguments);
  15793. }
  15794. return platformEncryptData;
  15795. }()
  15796. }, {
  15797. key: "platformDecryptResult",
  15798. value: function () {
  15799. var _platformDecryptResult2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee51(e) {
  15800. var t, _e$_uniCloudOptions, n, s, r;
  15801. return _regenerator.default.wrap(function _callee51$(_context51) {
  15802. while (1) {
  15803. switch (_context51.prev = _context51.next) {
  15804. case 0:
  15805. t = e.content;
  15806. _e$_uniCloudOptions = e._uniCloudOptions;
  15807. n = _e$_uniCloudOptions === void 0 ? {} : _e$_uniCloudOptions;
  15808. s = n.encryptKeyId;
  15809. _context51.next = 6;
  15810. return this.appUtils.decrypt({
  15811. provider: this.provider,
  15812. spaceId: this.spaceId,
  15813. data: t,
  15814. key: s
  15815. });
  15816. case 6:
  15817. r = _context51.sent;
  15818. return _context51.abrupt("return", JSON.parse(r.data));
  15819. case 8:
  15820. case "end":
  15821. return _context51.stop();
  15822. }
  15823. }
  15824. }, _callee51, this);
  15825. }));
  15826. function platformDecryptResult(_x38) {
  15827. return _platformDecryptResult2.apply(this, arguments);
  15828. }
  15829. return platformDecryptResult;
  15830. }()
  15831. }, {
  15832. key: "isClientKeyNotFound",
  15833. value: function isClientKeyNotFound() {
  15834. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  15835. var t = e.result || {};
  15836. return 70009 === t.errCode && "uni-secure-network" === t.errSubject;
  15837. }
  15838. }]);
  15839. return Rn;
  15840. }(jt);
  15841. function Un() {
  15842. var _ref36 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15843. e = _ref36.secretType;
  15844. return e === qt || e === Ft || e === Kt;
  15845. }
  15846. function Nn() {
  15847. var _ref37 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15848. e = _ref37.name,
  15849. _ref37$data = _ref37.data,
  15850. t = _ref37$data === void 0 ? {} : _ref37$data;
  15851. return "app" === P && "DCloud-clientDB" === e && "encryption" === t.redirectTo && "getAppClientKey" === t.action;
  15852. }
  15853. function Dn() {
  15854. var _ref38 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15855. e = _ref38.provider,
  15856. t = _ref38.spaceId,
  15857. n = _ref38.functionName;
  15858. var _ae = ae(),
  15859. s = _ae.appId,
  15860. r = _ae.uniPlatform,
  15861. i = _ae.osName;
  15862. var o = r;
  15863. "app" === r && (o = i);
  15864. var a = function () {
  15865. var _ref39 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15866. e = _ref39.provider,
  15867. t = _ref39.spaceId;
  15868. var n = A;
  15869. if (!n) return {};
  15870. e = function (e) {
  15871. return "tencent" === e ? "tcb" : e;
  15872. }(e);
  15873. var s = n.find(function (n) {
  15874. return n.provider === e && n.spaceId === t;
  15875. });
  15876. return s && s.config;
  15877. }({
  15878. provider: e,
  15879. spaceId: t
  15880. });
  15881. if (!a || !a.accessControl || !a.accessControl.enable) return !1;
  15882. var c = a.accessControl.function || {},
  15883. u = Object.keys(c);
  15884. if (0 === u.length) return !0;
  15885. var h = function (e, t) {
  15886. var n, s, r;
  15887. for (var _i2 = 0; _i2 < e.length; _i2++) {
  15888. var _o2 = e[_i2];
  15889. _o2 !== t ? "*" !== _o2 ? _o2.split(",").map(function (e) {
  15890. return e.trim();
  15891. }).indexOf(t) > -1 && (s = _o2) : r = _o2 : n = _o2;
  15892. }
  15893. return n || s || r;
  15894. }(u, n);
  15895. if (!h) return !1;
  15896. if ((c[h] || []).find(function () {
  15897. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  15898. return e.appId === s && (e.platform || "").toLowerCase() === o.toLowerCase();
  15899. })) return !0;
  15900. 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);
  15901. }
  15902. function Mn(_ref40) {
  15903. var e = _ref40.functionName,
  15904. t = _ref40.result,
  15905. n = _ref40.logPvd;
  15906. if (S && this.__dev__.debugLog && t && t.requestId) {
  15907. var _s11 = JSON.stringify({
  15908. spaceId: this.config.spaceId,
  15909. functionName: e,
  15910. requestId: t.requestId
  15911. });
  15912. console.log("[".concat(n, "-request]").concat(_s11, "[/").concat(n, "-request]"));
  15913. }
  15914. }
  15915. function qn(e) {
  15916. var t = e.callFunction,
  15917. n = function n(_n7) {
  15918. var _this19 = this;
  15919. var s = _n7.name;
  15920. _n7.data = Et.call(e, {
  15921. data: _n7.data
  15922. });
  15923. var r = {
  15924. aliyun: "aliyun",
  15925. tencent: "tcb",
  15926. tcb: "tcb",
  15927. alipay: "alipay"
  15928. }[this.config.provider],
  15929. i = Un(_n7),
  15930. o = Nn(_n7),
  15931. a = i || o;
  15932. return t.call(this, _n7).then(function (e) {
  15933. return e.errCode = 0, !a && Mn.call(_this19, {
  15934. functionName: s,
  15935. result: e,
  15936. logPvd: r
  15937. }), Promise.resolve(e);
  15938. }, function (e) {
  15939. return !a && Mn.call(_this19, {
  15940. functionName: s,
  15941. result: e,
  15942. logPvd: r
  15943. }), e && e.message && (e.message = function () {
  15944. var _ref41 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  15945. _ref41$message = _ref41.message,
  15946. e = _ref41$message === void 0 ? "" : _ref41$message,
  15947. _ref41$extraInfo = _ref41.extraInfo,
  15948. t = _ref41$extraInfo === void 0 ? {} : _ref41$extraInfo,
  15949. _ref41$formatter = _ref41.formatter,
  15950. n = _ref41$formatter === void 0 ? [] : _ref41$formatter;
  15951. for (var _s12 = 0; _s12 < n.length; _s12++) {
  15952. var _n$_s = n[_s12],
  15953. _r4 = _n$_s.rule,
  15954. _i3 = _n$_s.content,
  15955. _o3 = _n$_s.mode,
  15956. _a = e.match(_r4);
  15957. if (!_a) continue;
  15958. var _c = _i3;
  15959. for (var _e19 = 1; _e19 < _a.length; _e19++) {
  15960. _c = Dt(_c, "{$".concat(_e19, "}"), _a[_e19]);
  15961. }
  15962. for (var _e20 in t) {
  15963. _c = Dt(_c, "{".concat(_e20, "}"), t[_e20]);
  15964. }
  15965. return "replace" === _o3 ? _c : e + _c;
  15966. }
  15967. return e;
  15968. }({
  15969. message: "[".concat(_n7.name, "]: ").concat(e.message),
  15970. formatter: Rt,
  15971. extraInfo: {
  15972. functionName: s
  15973. }
  15974. })), Promise.reject(e);
  15975. });
  15976. };
  15977. e.callFunction = function (t) {
  15978. var _e$config = e.config,
  15979. s = _e$config.provider,
  15980. r = _e$config.spaceId,
  15981. i = t.name;
  15982. var o, a;
  15983. 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 (_ref42) {
  15984. var e = _ref42.name,
  15985. _ref42$data = _ref42.data,
  15986. t = _ref42$data === void 0 ? {} : _ref42$data;
  15987. return "mp-weixin" === P && "uni-id-co" === e && "secureNetworkHandshakeByWeixin" === t.method;
  15988. }(t)) a = o.call(e, t);else if (Un(t)) {
  15989. a = new xn({
  15990. secretType: t.secretType,
  15991. uniCloudIns: e
  15992. }).wrapEncryptDataCallFunction(n.bind(e))(t);
  15993. } else if (Dn({
  15994. provider: s,
  15995. spaceId: r,
  15996. functionName: i
  15997. })) {
  15998. a = new xn({
  15999. secretType: t.secretType,
  16000. uniCloudIns: e
  16001. }).wrapVerifyClientCallFunction(n.bind(e))(t);
  16002. } else a = o(t);
  16003. return Object.defineProperty(a, "result", {
  16004. get: function get() {
  16005. return console.warn("当前返回结果为Promise类型,不可直接访问其result属性,详情请参考:https://uniapp.dcloud.net.cn/uniCloud/faq?id=promise"), {};
  16006. }
  16007. }), a;
  16008. };
  16009. }
  16010. xn = "mp-weixin" !== P && "app" !== P ? /*#__PURE__*/function () {
  16011. function _class2() {
  16012. (0, _classCallCheck2.default)(this, _class2);
  16013. throw Tn({
  16014. message: "Platform ".concat(P, " is not supported by secure network")
  16015. });
  16016. }
  16017. return (0, _createClass2.default)(_class2);
  16018. }() : k ? "mp-weixin" === P ? En : Rn : /*#__PURE__*/function () {
  16019. function _class3() {
  16020. (0, _classCallCheck2.default)(this, _class3);
  16021. throw Tn({
  16022. message: "Platform ".concat(P, " is not enabled, please check whether secure network module is enabled in your manifest.json")
  16023. });
  16024. }
  16025. return (0, _createClass2.default)(_class3);
  16026. }();
  16027. var Fn = Symbol("CLIENT_DB_INTERNAL");
  16028. function Kn(e, t) {
  16029. return e.then = "DoNotReturnProxyWithAFunctionNamedThen", e._internalType = Fn, e.inspect = null, e.__ob__ = void 0, new Proxy(e, {
  16030. get: function get(e, n, s) {
  16031. if ("_uniClient" === n) return null;
  16032. if ("symbol" == (0, _typeof2.default)(n)) return e[n];
  16033. if (n in e || "string" != typeof n) {
  16034. var _t12 = e[n];
  16035. return "function" == typeof _t12 ? _t12.bind(e) : _t12;
  16036. }
  16037. return t.get(e, n, s);
  16038. }
  16039. });
  16040. }
  16041. function jn(e) {
  16042. return {
  16043. on: function on(t, n) {
  16044. e[t] = e[t] || [], e[t].indexOf(n) > -1 || e[t].push(n);
  16045. },
  16046. off: function off(t, n) {
  16047. e[t] = e[t] || [];
  16048. var s = e[t].indexOf(n);
  16049. -1 !== s && e[t].splice(s, 1);
  16050. }
  16051. };
  16052. }
  16053. var $n = ["db.Geo", "db.command", "command.aggregate"];
  16054. function Bn(e, t) {
  16055. return $n.indexOf("".concat(e, ".").concat(t)) > -1;
  16056. }
  16057. function Wn(e) {
  16058. switch (f(e)) {
  16059. case "array":
  16060. return e.map(function (e) {
  16061. return Wn(e);
  16062. });
  16063. case "object":
  16064. return e._internalType === Fn || Object.keys(e).forEach(function (t) {
  16065. e[t] = Wn(e[t]);
  16066. }), e;
  16067. case "regexp":
  16068. return {
  16069. $regexp: {
  16070. source: e.source,
  16071. flags: e.flags
  16072. }
  16073. };
  16074. case "date":
  16075. return {
  16076. $date: e.toISOString()
  16077. };
  16078. default:
  16079. return e;
  16080. }
  16081. }
  16082. function Hn(e) {
  16083. return e && e.content && e.content.$method;
  16084. }
  16085. var zn = /*#__PURE__*/function () {
  16086. function zn(e, t, n) {
  16087. (0, _classCallCheck2.default)(this, zn);
  16088. this.content = e, this.prevStage = t || null, this.udb = null, this._database = n;
  16089. }
  16090. (0, _createClass2.default)(zn, [{
  16091. key: "toJSON",
  16092. value: function toJSON() {
  16093. var e = this;
  16094. var t = [e.content];
  16095. for (; e.prevStage;) {
  16096. e = e.prevStage, t.push(e.content);
  16097. }
  16098. return {
  16099. $db: t.reverse().map(function (e) {
  16100. return {
  16101. $method: e.$method,
  16102. $param: Wn(e.$param)
  16103. };
  16104. })
  16105. };
  16106. }
  16107. }, {
  16108. key: "toString",
  16109. value: function toString() {
  16110. return JSON.stringify(this.toJSON());
  16111. }
  16112. }, {
  16113. key: "getAction",
  16114. value: function getAction() {
  16115. var e = this.toJSON().$db.find(function (e) {
  16116. return "action" === e.$method;
  16117. });
  16118. return e && e.$param && e.$param[0];
  16119. }
  16120. }, {
  16121. key: "getCommand",
  16122. value: function getCommand() {
  16123. return {
  16124. $db: this.toJSON().$db.filter(function (e) {
  16125. return "action" !== e.$method;
  16126. })
  16127. };
  16128. }
  16129. }, {
  16130. key: "isAggregate",
  16131. get: function get() {
  16132. var e = this;
  16133. for (; e;) {
  16134. var t = Hn(e),
  16135. _n8 = Hn(e.prevStage);
  16136. if ("aggregate" === t && "collection" === _n8 || "pipeline" === t) return !0;
  16137. e = e.prevStage;
  16138. }
  16139. return !1;
  16140. }
  16141. }, {
  16142. key: "isCommand",
  16143. get: function get() {
  16144. var e = this;
  16145. for (; e;) {
  16146. if ("command" === Hn(e)) return !0;
  16147. e = e.prevStage;
  16148. }
  16149. return !1;
  16150. }
  16151. }, {
  16152. key: "isAggregateCommand",
  16153. get: function get() {
  16154. var e = this;
  16155. for (; e;) {
  16156. var t = Hn(e),
  16157. _n9 = Hn(e.prevStage);
  16158. if ("aggregate" === t && "command" === _n9) return !0;
  16159. e = e.prevStage;
  16160. }
  16161. return !1;
  16162. }
  16163. }, {
  16164. key: "getNextStageFn",
  16165. value: function getNextStageFn(e) {
  16166. var t = this;
  16167. return function () {
  16168. return Jn({
  16169. $method: e,
  16170. $param: Wn(Array.from(arguments))
  16171. }, t, t._database);
  16172. };
  16173. }
  16174. }, {
  16175. key: "count",
  16176. get: function get() {
  16177. return this.isAggregate ? this.getNextStageFn("count") : function () {
  16178. return this._send("count", Array.from(arguments));
  16179. };
  16180. }
  16181. }, {
  16182. key: "remove",
  16183. get: function get() {
  16184. return this.isCommand ? this.getNextStageFn("remove") : function () {
  16185. return this._send("remove", Array.from(arguments));
  16186. };
  16187. }
  16188. }, {
  16189. key: "get",
  16190. value: function get() {
  16191. return this._send("get", Array.from(arguments));
  16192. }
  16193. }, {
  16194. key: "add",
  16195. get: function get() {
  16196. return this.isCommand ? this.getNextStageFn("add") : function () {
  16197. return this._send("add", Array.from(arguments));
  16198. };
  16199. }
  16200. }, {
  16201. key: "update",
  16202. value: function update() {
  16203. return this._send("update", Array.from(arguments));
  16204. }
  16205. }, {
  16206. key: "end",
  16207. value: function end() {
  16208. return this._send("end", Array.from(arguments));
  16209. }
  16210. }, {
  16211. key: "set",
  16212. get: function get() {
  16213. return this.isCommand ? this.getNextStageFn("set") : function () {
  16214. throw new Error("JQL禁止使用set方法");
  16215. };
  16216. }
  16217. }, {
  16218. key: "_send",
  16219. value: function _send(e, t) {
  16220. var n = this.getAction(),
  16221. s = this.getCommand();
  16222. if (s.$db.push({
  16223. $method: e,
  16224. $param: Wn(t)
  16225. }), S) {
  16226. var _e21 = s.$db.find(function (e) {
  16227. return "collection" === e.$method;
  16228. }),
  16229. _t13 = _e21 && _e21.$param;
  16230. _t13 && 1 === _t13.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- 如果主表数据量很小请忽略此信息,项目发行时不会出现此提示。");
  16231. }
  16232. return this._database._callCloudFunction({
  16233. action: n,
  16234. command: s
  16235. });
  16236. }
  16237. }]);
  16238. return zn;
  16239. }();
  16240. function Jn(e, t, n) {
  16241. return Kn(new zn(e, t, n), {
  16242. get: function get(e, t) {
  16243. var s = "db";
  16244. return e && e.content && (s = e.content.$method), Bn(s, t) ? Jn({
  16245. $method: t
  16246. }, e, n) : function () {
  16247. return Jn({
  16248. $method: t,
  16249. $param: Wn(Array.from(arguments))
  16250. }, e, n);
  16251. };
  16252. }
  16253. });
  16254. }
  16255. function Gn(_ref43) {
  16256. var e = _ref43.path,
  16257. t = _ref43.method;
  16258. return /*#__PURE__*/function () {
  16259. function _class4() {
  16260. (0, _classCallCheck2.default)(this, _class4);
  16261. this.param = Array.from(arguments);
  16262. }
  16263. (0, _createClass2.default)(_class4, [{
  16264. key: "toJSON",
  16265. value: function toJSON() {
  16266. return {
  16267. $newDb: [].concat((0, _toConsumableArray2.default)(e.map(function (e) {
  16268. return {
  16269. $method: e
  16270. };
  16271. })), [{
  16272. $method: t,
  16273. $param: this.param
  16274. }])
  16275. };
  16276. }
  16277. }, {
  16278. key: "toString",
  16279. value: function toString() {
  16280. return JSON.stringify(this.toJSON());
  16281. }
  16282. }]);
  16283. return _class4;
  16284. }();
  16285. }
  16286. function Vn(e) {
  16287. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16288. return Kn(new e(t), {
  16289. get: function get(e, t) {
  16290. return Bn("db", t) ? Jn({
  16291. $method: t
  16292. }, null, e) : function () {
  16293. return Jn({
  16294. $method: t,
  16295. $param: Wn(Array.from(arguments))
  16296. }, null, e);
  16297. };
  16298. }
  16299. });
  16300. }
  16301. var Yn = /*#__PURE__*/function (_ref44) {
  16302. (0, _inherits2.default)(Yn, _ref44);
  16303. var _super11 = _createSuper(Yn);
  16304. function Yn() {
  16305. (0, _classCallCheck2.default)(this, Yn);
  16306. return _super11.apply(this, arguments);
  16307. }
  16308. (0, _createClass2.default)(Yn, [{
  16309. key: "_parseResult",
  16310. value: function _parseResult(e) {
  16311. return this._isJQL ? e.result : e;
  16312. }
  16313. }, {
  16314. key: "_callCloudFunction",
  16315. value: function _callCloudFunction(_ref45) {
  16316. var _this20 = this;
  16317. var e = _ref45.action,
  16318. t = _ref45.command,
  16319. n = _ref45.multiCommand,
  16320. s = _ref45.queryList;
  16321. function r(e, t) {
  16322. if (n && s) for (var _n10 = 0; _n10 < s.length; _n10++) {
  16323. var _r5 = s[_n10];
  16324. _r5.udb && "function" == typeof _r5.udb.setResult && (t ? _r5.udb.setResult(t) : _r5.udb.setResult(e.result.dataList[_n10]));
  16325. }
  16326. }
  16327. var i = this,
  16328. o = this._isJQL ? "databaseForJQL" : "database";
  16329. function a(e) {
  16330. return i._callback("error", [e]), M(q(o, "fail"), e).then(function () {
  16331. return M(q(o, "complete"), e);
  16332. }).then(function () {
  16333. return r(null, e), Y(j, {
  16334. type: W,
  16335. content: e
  16336. }), Promise.reject(e);
  16337. });
  16338. }
  16339. var c = M(q(o, "invoke")),
  16340. u = this._uniClient;
  16341. return c.then(function () {
  16342. return u.callFunction({
  16343. name: "DCloud-clientDB",
  16344. type: h,
  16345. data: {
  16346. action: e,
  16347. command: t,
  16348. multiCommand: n
  16349. }
  16350. });
  16351. }).then(function (e) {
  16352. var _e$result = e.result,
  16353. t = _e$result.code,
  16354. n = _e$result.message,
  16355. s = _e$result.token,
  16356. c = _e$result.tokenExpired,
  16357. _e$result$systemInfo = _e$result.systemInfo,
  16358. u = _e$result$systemInfo === void 0 ? [] : _e$result$systemInfo;
  16359. if (u) for (var _e22 = 0; _e22 < u.length; _e22++) {
  16360. var _u$_e = u[_e22],
  16361. _t14 = _u$_e.level,
  16362. _n11 = _u$_e.message,
  16363. _s13 = _u$_e.detail,
  16364. _r6 = console["app" === P && "warn" === _t14 ? "error" : _t14] || console.log;
  16365. var _i4 = "[System Info]" + _n11;
  16366. _s13 && (_i4 = "".concat(_i4, "\n\u8BE6\u7EC6\u4FE1\u606F\uFF1A").concat(_s13)), _r6(_i4);
  16367. }
  16368. if (t) {
  16369. return a(new te({
  16370. code: t,
  16371. message: n,
  16372. requestId: e.requestId
  16373. }));
  16374. }
  16375. e.result.errCode = e.result.errCode || e.result.code, e.result.errMsg = e.result.errMsg || e.result.message, s && c && (re({
  16376. token: s,
  16377. tokenExpired: c
  16378. }), _this20._callbackAuth("refreshToken", [{
  16379. token: s,
  16380. tokenExpired: c
  16381. }]), _this20._callback("refreshToken", [{
  16382. token: s,
  16383. tokenExpired: c
  16384. }]), Y(B, {
  16385. token: s,
  16386. tokenExpired: c
  16387. }));
  16388. var h = [{
  16389. prop: "affectedDocs",
  16390. tips: "affectedDocs不再推荐使用,请使用inserted/deleted/updated/data.length替代"
  16391. }, {
  16392. prop: "code",
  16393. tips: "code不再推荐使用,请使用errCode替代"
  16394. }, {
  16395. prop: "message",
  16396. tips: "message不再推荐使用,请使用errMsg替代"
  16397. }];
  16398. var _loop2 = function _loop2(_t15) {
  16399. var _h$_t = h[_t15],
  16400. n = _h$_t.prop,
  16401. s = _h$_t.tips;
  16402. if (n in e.result) {
  16403. var _t16 = e.result[n];
  16404. Object.defineProperty(e.result, n, {
  16405. get: function get() {
  16406. return console.warn(s), _t16;
  16407. }
  16408. });
  16409. }
  16410. };
  16411. for (var _t15 = 0; _t15 < h.length; _t15++) {
  16412. _loop2(_t15);
  16413. }
  16414. return function (e) {
  16415. return M(q(o, "success"), e).then(function () {
  16416. return M(q(o, "complete"), e);
  16417. }).then(function () {
  16418. r(e, null);
  16419. var t = i._parseResult(e);
  16420. return Y(j, {
  16421. type: W,
  16422. content: t
  16423. }), Promise.resolve(t);
  16424. });
  16425. }(e);
  16426. }, function (e) {
  16427. /fc_function_not_found|FUNCTION_NOT_FOUND/g.test(e.message) && console.warn("clientDB未初始化,请在web控制台保存一次schema以开启clientDB");
  16428. return a(new te({
  16429. code: e.code || "SYSTEM_ERROR",
  16430. message: e.message,
  16431. requestId: e.requestId
  16432. }));
  16433. });
  16434. }
  16435. }]);
  16436. return Yn;
  16437. }( /*#__PURE__*/function () {
  16438. function _class5() {
  16439. var _ref46 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16440. _ref46$uniClient = _ref46.uniClient,
  16441. e = _ref46$uniClient === void 0 ? {} : _ref46$uniClient,
  16442. _ref46$isJQL = _ref46.isJQL,
  16443. t = _ref46$isJQL === void 0 ? !1 : _ref46$isJQL;
  16444. (0, _classCallCheck2.default)(this, _class5);
  16445. 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({}, {
  16446. get: function get(e, t) {
  16447. return {
  16448. $env: t
  16449. };
  16450. }
  16451. }), this.Geo = Kn({}, {
  16452. get: function get(e, t) {
  16453. return Gn({
  16454. path: ["Geo"],
  16455. method: t
  16456. });
  16457. }
  16458. }), this.serverDate = Gn({
  16459. path: [],
  16460. method: "serverDate"
  16461. }), this.RegExp = Gn({
  16462. path: [],
  16463. method: "RegExp"
  16464. });
  16465. }
  16466. (0, _createClass2.default)(_class5, [{
  16467. key: "getCloudEnv",
  16468. value: function getCloudEnv(e) {
  16469. if ("string" != typeof e || !e.trim()) throw new Error("getCloudEnv参数错误");
  16470. return {
  16471. $env: e.replace("$cloudEnv_", "")
  16472. };
  16473. }
  16474. }, {
  16475. key: "_callback",
  16476. value: function _callback(e, t) {
  16477. var n = this._dbCallBacks;
  16478. n[e] && n[e].forEach(function (e) {
  16479. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  16480. });
  16481. }
  16482. }, {
  16483. key: "_callbackAuth",
  16484. value: function _callbackAuth(e, t) {
  16485. var n = this._authCallBacks;
  16486. n[e] && n[e].forEach(function (e) {
  16487. e.apply(void 0, (0, _toConsumableArray2.default)(t));
  16488. });
  16489. }
  16490. }, {
  16491. key: "multiSend",
  16492. value: function multiSend() {
  16493. var e = Array.from(arguments),
  16494. t = e.map(function (e) {
  16495. var t = e.getAction(),
  16496. n = e.getCommand();
  16497. if ("getTemp" !== n.$db[n.$db.length - 1].$method) throw new Error("multiSend只支持子命令内使用getTemp");
  16498. return {
  16499. action: t,
  16500. command: n
  16501. };
  16502. });
  16503. return this._callCloudFunction({
  16504. multiCommand: t,
  16505. queryList: e
  16506. });
  16507. }
  16508. }]);
  16509. return _class5;
  16510. }());
  16511. var Qn = "token无效,跳转登录页面",
  16512. Xn = "token过期,跳转登录页面",
  16513. Zn = {
  16514. TOKEN_INVALID_TOKEN_EXPIRED: Xn,
  16515. TOKEN_INVALID_INVALID_CLIENTID: Qn,
  16516. TOKEN_INVALID: Qn,
  16517. TOKEN_INVALID_WRONG_TOKEN: Qn,
  16518. TOKEN_INVALID_ANONYMOUS_USER: Qn
  16519. },
  16520. es = {
  16521. "uni-id-token-expired": Xn,
  16522. "uni-id-check-token-failed": Qn,
  16523. "uni-id-token-not-exist": Qn,
  16524. "uni-id-check-device-feature-failed": Qn
  16525. };
  16526. function ts(e, t) {
  16527. var n = "";
  16528. return n = e ? "".concat(e, "/").concat(t) : t, n.replace(/^\//, "");
  16529. }
  16530. function ns() {
  16531. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  16532. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
  16533. var n = [],
  16534. s = [];
  16535. return e.forEach(function (e) {
  16536. !0 === e.needLogin ? n.push(ts(t, e.path)) : !1 === e.needLogin && s.push(ts(t, e.path));
  16537. }), {
  16538. needLoginPage: n,
  16539. notNeedLoginPage: s
  16540. };
  16541. }
  16542. function ss(e) {
  16543. return e.split("?")[0].replace(/^\//, "");
  16544. }
  16545. function rs() {
  16546. return function (e) {
  16547. var t = e && e.$page && e.$page.fullPath || "";
  16548. return t ? ("/" !== t.charAt(0) && (t = "/" + t), t) : t;
  16549. }(function () {
  16550. var e = getCurrentPages();
  16551. return e[e.length - 1];
  16552. }());
  16553. }
  16554. function is() {
  16555. return ss(rs());
  16556. }
  16557. function os() {
  16558. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
  16559. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16560. if (!e) return !1;
  16561. if (!(t && t.list && t.list.length)) return !1;
  16562. var n = t.list,
  16563. s = ss(e);
  16564. return n.some(function (e) {
  16565. return e.pagePath === s;
  16566. });
  16567. }
  16568. var as = !!_pages.default.uniIdRouter;
  16569. var _ref47 = function () {
  16570. var _ref28 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _pages.default,
  16571. _ref28$pages = _ref28.pages,
  16572. t = _ref28$pages === void 0 ? [] : _ref28$pages,
  16573. _ref28$subPackages = _ref28.subPackages,
  16574. n = _ref28$subPackages === void 0 ? [] : _ref28$subPackages,
  16575. _ref28$uniIdRouter = _ref28.uniIdRouter,
  16576. s = _ref28$uniIdRouter === void 0 ? {} : _ref28$uniIdRouter,
  16577. _ref28$tabBar = _ref28.tabBar,
  16578. r = _ref28$tabBar === void 0 ? {} : _ref28$tabBar;
  16579. var i = s.loginPage,
  16580. _s$needLogin = s.needLogin,
  16581. o = _s$needLogin === void 0 ? [] : _s$needLogin,
  16582. _s$resToLogin = s.resToLogin,
  16583. a = _s$resToLogin === void 0 ? !0 : _s$resToLogin,
  16584. _ns = ns(t),
  16585. c = _ns.needLoginPage,
  16586. u = _ns.notNeedLoginPage,
  16587. _ref30 = function () {
  16588. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
  16589. var t = [],
  16590. n = [];
  16591. return e.forEach(function (e) {
  16592. var s = e.root,
  16593. _e$pages = e.pages,
  16594. r = _e$pages === void 0 ? [] : _e$pages,
  16595. _ns2 = ns(r, s),
  16596. i = _ns2.needLoginPage,
  16597. o = _ns2.notNeedLoginPage;
  16598. t.push.apply(t, (0, _toConsumableArray2.default)(i)), n.push.apply(n, (0, _toConsumableArray2.default)(o));
  16599. }), {
  16600. needLoginPage: t,
  16601. notNeedLoginPage: n
  16602. };
  16603. }(n),
  16604. h = _ref30.needLoginPage,
  16605. l = _ref30.notNeedLoginPage;
  16606. return {
  16607. loginPage: i,
  16608. routerNeedLogin: o,
  16609. resToLogin: a,
  16610. needLoginPage: [].concat((0, _toConsumableArray2.default)(c), (0, _toConsumableArray2.default)(h)),
  16611. notNeedLoginPage: [].concat((0, _toConsumableArray2.default)(u), (0, _toConsumableArray2.default)(l)),
  16612. loginPageInTabBar: os(i, r)
  16613. };
  16614. }(),
  16615. cs = _ref47.loginPage,
  16616. us = _ref47.routerNeedLogin,
  16617. hs = _ref47.resToLogin,
  16618. ls = _ref47.needLoginPage,
  16619. ds = _ref47.notNeedLoginPage,
  16620. ps = _ref47.loginPageInTabBar;
  16621. if (ls.indexOf(cs) > -1) throw new Error("Login page [".concat(cs, "] should not be \"needLogin\", please check your pages.json"));
  16622. function fs(e) {
  16623. var t = is();
  16624. if ("/" === e.charAt(0)) return e;
  16625. var _e$split = e.split("?"),
  16626. _e$split2 = (0, _slicedToArray2.default)(_e$split, 2),
  16627. n = _e$split2[0],
  16628. s = _e$split2[1],
  16629. r = n.replace(/^\//, "").split("/"),
  16630. i = t.split("/");
  16631. i.pop();
  16632. for (var _e23 = 0; _e23 < r.length; _e23++) {
  16633. var _t17 = r[_e23];
  16634. ".." === _t17 ? i.pop() : "." !== _t17 && i.push(_t17);
  16635. }
  16636. return "" === i[0] && i.shift(), "/" + i.join("/") + (s ? "?" + s : "");
  16637. }
  16638. function gs(e) {
  16639. var t = ss(fs(e));
  16640. return !(ds.indexOf(t) > -1) && (ls.indexOf(t) > -1 || us.some(function (t) {
  16641. return function (e, t) {
  16642. return new RegExp(t).test(e);
  16643. }(e, t);
  16644. }));
  16645. }
  16646. function ms(_ref48) {
  16647. var e = _ref48.redirect;
  16648. var t = ss(e),
  16649. n = ss(cs);
  16650. return is() !== n && t !== n;
  16651. }
  16652. function ys() {
  16653. var _ref49 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16654. e = _ref49.api,
  16655. t = _ref49.redirect;
  16656. if (!t || !ms({
  16657. redirect: t
  16658. })) return;
  16659. var n = function (e, t) {
  16660. return "/" !== e.charAt(0) && (e = "/" + e), t ? e.indexOf("?") > -1 ? e + "&uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e + "?uniIdRedirectUrl=".concat(encodeURIComponent(t)) : e;
  16661. }(cs, t);
  16662. ps ? "navigateTo" !== e && "redirectTo" !== e || (e = "switchTab") : "switchTab" === e && (e = "navigateTo");
  16663. var s = {
  16664. navigateTo: uni.navigateTo,
  16665. redirectTo: uni.redirectTo,
  16666. switchTab: uni.switchTab,
  16667. reLaunch: uni.reLaunch
  16668. };
  16669. setTimeout(function () {
  16670. s[e]({
  16671. url: n
  16672. });
  16673. });
  16674. }
  16675. function _s() {
  16676. var _ref50 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  16677. e = _ref50.url;
  16678. var t = {
  16679. abortLoginPageJump: !1,
  16680. autoToLoginPage: !1
  16681. },
  16682. n = function () {
  16683. var _se3 = se(),
  16684. e = _se3.token,
  16685. t = _se3.tokenExpired;
  16686. var n;
  16687. if (e) {
  16688. if (t < Date.now()) {
  16689. var _e24 = "uni-id-token-expired";
  16690. n = {
  16691. errCode: _e24,
  16692. errMsg: es[_e24]
  16693. };
  16694. }
  16695. } else {
  16696. var _e25 = "uni-id-check-token-failed";
  16697. n = {
  16698. errCode: _e25,
  16699. errMsg: es[_e25]
  16700. };
  16701. }
  16702. return n;
  16703. }();
  16704. if (gs(e) && n) {
  16705. n.uniIdRedirectUrl = e;
  16706. if (J($).length > 0) return setTimeout(function () {
  16707. Y($, n);
  16708. }, 0), t.abortLoginPageJump = !0, t;
  16709. t.autoToLoginPage = !0;
  16710. }
  16711. return t;
  16712. }
  16713. function ws() {
  16714. !function () {
  16715. var e = rs(),
  16716. _s14 = _s({
  16717. url: e
  16718. }),
  16719. t = _s14.abortLoginPageJump,
  16720. n = _s14.autoToLoginPage;
  16721. t || n && ys({
  16722. api: "redirectTo",
  16723. redirect: e
  16724. });
  16725. }();
  16726. var e = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
  16727. var _loop3 = function _loop3(_t18) {
  16728. var n = e[_t18];
  16729. uni.addInterceptor(n, {
  16730. invoke: function invoke(e) {
  16731. var _s15 = _s({
  16732. url: e.url
  16733. }),
  16734. t = _s15.abortLoginPageJump,
  16735. s = _s15.autoToLoginPage;
  16736. return t ? e : s ? (ys({
  16737. api: n,
  16738. redirect: fs(e.url)
  16739. }), !1) : e;
  16740. }
  16741. });
  16742. };
  16743. for (var _t18 = 0; _t18 < e.length; _t18++) {
  16744. _loop3(_t18);
  16745. }
  16746. }
  16747. function vs() {
  16748. this.onResponse(function (e) {
  16749. var t = e.type,
  16750. n = e.content;
  16751. var s = !1;
  16752. switch (t) {
  16753. case "cloudobject":
  16754. s = function (e) {
  16755. if ("object" != (0, _typeof2.default)(e)) return !1;
  16756. var _ref51 = e || {},
  16757. t = _ref51.errCode;
  16758. return t in es;
  16759. }(n);
  16760. break;
  16761. case "clientdb":
  16762. s = function (e) {
  16763. if ("object" != (0, _typeof2.default)(e)) return !1;
  16764. var _ref52 = e || {},
  16765. t = _ref52.errCode;
  16766. return t in Zn;
  16767. }(n);
  16768. }
  16769. s && function () {
  16770. var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  16771. var t = J($);
  16772. Z().then(function () {
  16773. var n = rs();
  16774. if (n && ms({
  16775. redirect: n
  16776. })) return t.length > 0 ? Y($, Object.assign({
  16777. uniIdRedirectUrl: n
  16778. }, e)) : void (cs && ys({
  16779. api: "navigateTo",
  16780. redirect: n
  16781. }));
  16782. });
  16783. }(n);
  16784. });
  16785. }
  16786. function Is(e) {
  16787. !function (e) {
  16788. e.onResponse = function (e) {
  16789. G(j, e);
  16790. }, e.offResponse = function (e) {
  16791. V(j, e);
  16792. };
  16793. }(e), function (e) {
  16794. e.onNeedLogin = function (e) {
  16795. G($, e);
  16796. }, e.offNeedLogin = function (e) {
  16797. V($, e);
  16798. }, as && (L("_globalUniCloudStatus").needLoginInit || (L("_globalUniCloudStatus").needLoginInit = !0, Z().then(function () {
  16799. ws.call(e);
  16800. }), hs && vs.call(e)));
  16801. }(e), function (e) {
  16802. e.onRefreshToken = function (e) {
  16803. G(B, e);
  16804. }, e.offRefreshToken = function (e) {
  16805. V(B, e);
  16806. };
  16807. }(e);
  16808. }
  16809. var Ss;
  16810. var bs = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  16811. ks = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
  16812. function As() {
  16813. var e = se().token || "",
  16814. t = e.split(".");
  16815. if (!e || 3 !== t.length) return {
  16816. uid: null,
  16817. role: [],
  16818. permission: [],
  16819. tokenExpired: 0
  16820. };
  16821. var n;
  16822. try {
  16823. n = JSON.parse((s = t[1], decodeURIComponent(Ss(s).split("").map(function (e) {
  16824. return "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2);
  16825. }).join(""))));
  16826. } catch (e) {
  16827. throw new Error("获取当前用户信息出错,详细错误信息为:" + e.message);
  16828. }
  16829. var s;
  16830. return n.tokenExpired = 1e3 * n.exp, delete n.exp, delete n.iat, n;
  16831. }
  16832. Ss = "function" != typeof atob ? function (e) {
  16833. 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.");
  16834. var t;
  16835. e += "==".slice(2 - (3 & e.length));
  16836. for (var n, s, r = "", i = 0; i < e.length;) {
  16837. 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);
  16838. }
  16839. return r;
  16840. } : atob;
  16841. var Ps = n(function (e, t) {
  16842. Object.defineProperty(t, "__esModule", {
  16843. value: !0
  16844. });
  16845. var n = "chooseAndUploadFile:ok",
  16846. s = "chooseAndUploadFile:fail";
  16847. function r(e, t) {
  16848. return e.tempFiles.forEach(function (e, n) {
  16849. 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("."));
  16850. }), e.tempFilePaths || (e.tempFilePaths = e.tempFiles.map(function (e) {
  16851. return e.path;
  16852. })), e;
  16853. }
  16854. function i(e, t, _ref53) {
  16855. var s = _ref53.onChooseFile,
  16856. r = _ref53.onUploadProgress;
  16857. return t.then(function (e) {
  16858. if (s) {
  16859. var _t19 = s(e);
  16860. if (void 0 !== _t19) return Promise.resolve(_t19).then(function (t) {
  16861. return void 0 === t ? e : t;
  16862. });
  16863. }
  16864. return e;
  16865. }).then(function (t) {
  16866. return !1 === t ? {
  16867. errMsg: n,
  16868. tempFilePaths: [],
  16869. tempFiles: []
  16870. } : function (e, t) {
  16871. var s = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 5;
  16872. var r = arguments.length > 3 ? arguments[3] : undefined;
  16873. (t = Object.assign({}, t)).errMsg = n;
  16874. var i = t.tempFiles,
  16875. o = i.length;
  16876. var a = 0;
  16877. return new Promise(function (n) {
  16878. for (; a < s;) {
  16879. c();
  16880. }
  16881. function c() {
  16882. var s = a++;
  16883. if (s >= o) return void (!i.find(function (e) {
  16884. return !e.url && !e.errMsg;
  16885. }) && n(t));
  16886. var u = i[s];
  16887. e.uploadFile({
  16888. filePath: u.path,
  16889. cloudPath: u.cloudPath,
  16890. fileType: u.fileType,
  16891. cloudPathAsRealPath: u.cloudPathAsRealPath,
  16892. onUploadProgress: function onUploadProgress(e) {
  16893. e.index = s, e.tempFile = u, e.tempFilePath = u.path, r && r(e);
  16894. }
  16895. }).then(function (e) {
  16896. u.url = e.fileID, s < o && c();
  16897. }).catch(function (e) {
  16898. u.errMsg = e.errMsg || e.message, s < o && c();
  16899. });
  16900. }
  16901. });
  16902. }(e, t, 5, r);
  16903. });
  16904. }
  16905. t.initChooseAndUploadFile = function (e) {
  16906. return function () {
  16907. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
  16908. type: "all"
  16909. };
  16910. return "image" === t.type ? i(e, function (e) {
  16911. var t = e.count,
  16912. n = e.sizeType,
  16913. _e$sourceType = e.sourceType,
  16914. i = _e$sourceType === void 0 ? ["album", "camera"] : _e$sourceType,
  16915. o = e.extension;
  16916. return new Promise(function (e, a) {
  16917. uni.chooseImage({
  16918. count: t,
  16919. sizeType: n,
  16920. sourceType: i,
  16921. extension: o,
  16922. success: function success(t) {
  16923. e(r(t, "image"));
  16924. },
  16925. fail: function fail(e) {
  16926. a({
  16927. errMsg: e.errMsg.replace("chooseImage:fail", s)
  16928. });
  16929. }
  16930. });
  16931. });
  16932. }(t), t) : "video" === t.type ? i(e, function (e) {
  16933. var t = e.camera,
  16934. n = e.compressed,
  16935. i = e.maxDuration,
  16936. _e$sourceType2 = e.sourceType,
  16937. o = _e$sourceType2 === void 0 ? ["album", "camera"] : _e$sourceType2,
  16938. a = e.extension;
  16939. return new Promise(function (e, c) {
  16940. uni.chooseVideo({
  16941. camera: t,
  16942. compressed: n,
  16943. maxDuration: i,
  16944. sourceType: o,
  16945. extension: a,
  16946. success: function success(t) {
  16947. var n = t.tempFilePath,
  16948. s = t.duration,
  16949. i = t.size,
  16950. o = t.height,
  16951. a = t.width;
  16952. e(r({
  16953. errMsg: "chooseVideo:ok",
  16954. tempFilePaths: [n],
  16955. tempFiles: [{
  16956. name: t.tempFile && t.tempFile.name || "",
  16957. path: n,
  16958. size: i,
  16959. type: t.tempFile && t.tempFile.type || "",
  16960. width: a,
  16961. height: o,
  16962. duration: s,
  16963. fileType: "video",
  16964. cloudPath: ""
  16965. }]
  16966. }, "video"));
  16967. },
  16968. fail: function fail(e) {
  16969. c({
  16970. errMsg: e.errMsg.replace("chooseVideo:fail", s)
  16971. });
  16972. }
  16973. });
  16974. });
  16975. }(t), t) : i(e, function (e) {
  16976. var t = e.count,
  16977. n = e.extension;
  16978. return new Promise(function (e, i) {
  16979. var o = uni.chooseFile;
  16980. if ("undefined" != typeof wx && "function" == typeof wx.chooseMessageFile && (o = wx.chooseMessageFile), "function" != typeof o) return i({
  16981. errMsg: s + " 请指定 type 类型,该平台仅支持选择 image 或 video。"
  16982. });
  16983. o({
  16984. type: "all",
  16985. count: t,
  16986. extension: n,
  16987. success: function success(t) {
  16988. e(r(t));
  16989. },
  16990. fail: function fail(e) {
  16991. i({
  16992. errMsg: e.errMsg.replace("chooseFile:fail", s)
  16993. });
  16994. }
  16995. });
  16996. });
  16997. }(t), t);
  16998. };
  16999. };
  17000. }),
  17001. Ts = t(Ps);
  17002. var Cs = "manual";
  17003. function xs(e) {
  17004. return {
  17005. props: {
  17006. localdata: {
  17007. type: Array,
  17008. default: function _default() {
  17009. return [];
  17010. }
  17011. },
  17012. options: {
  17013. type: [Object, Array],
  17014. default: function _default() {
  17015. return {};
  17016. }
  17017. },
  17018. spaceInfo: {
  17019. type: Object,
  17020. default: function _default() {
  17021. return {};
  17022. }
  17023. },
  17024. collection: {
  17025. type: [String, Array],
  17026. default: ""
  17027. },
  17028. action: {
  17029. type: String,
  17030. default: ""
  17031. },
  17032. field: {
  17033. type: String,
  17034. default: ""
  17035. },
  17036. orderby: {
  17037. type: String,
  17038. default: ""
  17039. },
  17040. where: {
  17041. type: [String, Object],
  17042. default: ""
  17043. },
  17044. pageData: {
  17045. type: String,
  17046. default: "add"
  17047. },
  17048. pageCurrent: {
  17049. type: Number,
  17050. default: 1
  17051. },
  17052. pageSize: {
  17053. type: Number,
  17054. default: 20
  17055. },
  17056. getcount: {
  17057. type: [Boolean, String],
  17058. default: !1
  17059. },
  17060. gettree: {
  17061. type: [Boolean, String],
  17062. default: !1
  17063. },
  17064. gettreepath: {
  17065. type: [Boolean, String],
  17066. default: !1
  17067. },
  17068. startwith: {
  17069. type: String,
  17070. default: ""
  17071. },
  17072. limitlevel: {
  17073. type: Number,
  17074. default: 10
  17075. },
  17076. groupby: {
  17077. type: String,
  17078. default: ""
  17079. },
  17080. groupField: {
  17081. type: String,
  17082. default: ""
  17083. },
  17084. distinct: {
  17085. type: [Boolean, String],
  17086. default: !1
  17087. },
  17088. foreignKey: {
  17089. type: String,
  17090. default: ""
  17091. },
  17092. loadtime: {
  17093. type: String,
  17094. default: "auto"
  17095. },
  17096. manual: {
  17097. type: Boolean,
  17098. default: !1
  17099. }
  17100. },
  17101. data: function data() {
  17102. return {
  17103. mixinDatacomLoading: !1,
  17104. mixinDatacomHasMore: !1,
  17105. mixinDatacomResData: [],
  17106. mixinDatacomErrorMessage: "",
  17107. mixinDatacomPage: {}
  17108. };
  17109. },
  17110. created: function created() {
  17111. var _this21 = this;
  17112. this.mixinDatacomPage = {
  17113. current: this.pageCurrent,
  17114. size: this.pageSize,
  17115. count: 0
  17116. }, this.$watch(function () {
  17117. var e = [];
  17118. return ["pageCurrent", "pageSize", "localdata", "collection", "action", "field", "orderby", "where", "getont", "getcount", "gettree", "groupby", "groupField", "distinct"].forEach(function (t) {
  17119. e.push(_this21[t]);
  17120. }), e;
  17121. }, function (e, t) {
  17122. if (_this21.loadtime === Cs) return;
  17123. var n = !1;
  17124. var s = [];
  17125. for (var _r7 = 2; _r7 < e.length; _r7++) {
  17126. e[_r7] !== t[_r7] && (s.push(e[_r7]), n = !0);
  17127. }
  17128. e[0] !== t[0] && (_this21.mixinDatacomPage.current = _this21.pageCurrent), _this21.mixinDatacomPage.size = _this21.pageSize, _this21.onMixinDatacomPropsChange(n, s);
  17129. });
  17130. },
  17131. methods: {
  17132. onMixinDatacomPropsChange: function onMixinDatacomPropsChange(e, t) {},
  17133. mixinDatacomEasyGet: function mixinDatacomEasyGet() {
  17134. var _this22 = this;
  17135. var _ref54 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17136. _ref54$getone = _ref54.getone,
  17137. e = _ref54$getone === void 0 ? !1 : _ref54$getone,
  17138. t = _ref54.success,
  17139. n = _ref54.fail;
  17140. this.mixinDatacomLoading || (this.mixinDatacomLoading = !0, this.mixinDatacomErrorMessage = "", this.mixinDatacomGet().then(function (n) {
  17141. _this22.mixinDatacomLoading = !1;
  17142. var _n$result = n.result,
  17143. s = _n$result.data,
  17144. r = _n$result.count;
  17145. _this22.getcount && (_this22.mixinDatacomPage.count = r), _this22.mixinDatacomHasMore = s.length < _this22.pageSize;
  17146. var i = e ? s.length ? s[0] : void 0 : s;
  17147. _this22.mixinDatacomResData = i, t && t(i);
  17148. }).catch(function (e) {
  17149. _this22.mixinDatacomLoading = !1, _this22.mixinDatacomErrorMessage = e, n && n(e);
  17150. }));
  17151. },
  17152. mixinDatacomGet: function mixinDatacomGet() {
  17153. var _n12;
  17154. var t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17155. var n = e.database(this.spaceInfo);
  17156. var s = t.action || this.action;
  17157. s && (n = n.action(s));
  17158. var r = t.collection || this.collection;
  17159. n = Array.isArray(r) ? (_n12 = n).collection.apply(_n12, (0, _toConsumableArray2.default)(r)) : n.collection(r);
  17160. var i = t.where || this.where;
  17161. i && Object.keys(i).length && (n = n.where(i));
  17162. var o = t.field || this.field;
  17163. o && (n = n.field(o));
  17164. var a = t.foreignKey || this.foreignKey;
  17165. a && (n = n.foreignKey(a));
  17166. var c = t.groupby || this.groupby;
  17167. c && (n = n.groupBy(c));
  17168. var u = t.groupField || this.groupField;
  17169. u && (n = n.groupField(u));
  17170. !0 === (void 0 !== t.distinct ? t.distinct : this.distinct) && (n = n.distinct());
  17171. var h = t.orderby || this.orderby;
  17172. h && (n = n.orderBy(h));
  17173. var l = void 0 !== t.pageCurrent ? t.pageCurrent : this.mixinDatacomPage.current,
  17174. d = void 0 !== t.pageSize ? t.pageSize : this.mixinDatacomPage.size,
  17175. p = void 0 !== t.getcount ? t.getcount : this.getcount,
  17176. f = void 0 !== t.gettree ? t.gettree : this.gettree,
  17177. g = void 0 !== t.gettreepath ? t.gettreepath : this.gettreepath,
  17178. m = {
  17179. getCount: p
  17180. },
  17181. y = {
  17182. limitLevel: void 0 !== t.limitlevel ? t.limitlevel : this.limitlevel,
  17183. startWith: void 0 !== t.startwith ? t.startwith : this.startwith
  17184. };
  17185. return f && (m.getTree = y), g && (m.getTreePath = y), n = n.skip(d * (l - 1)).limit(d).get(m), n;
  17186. }
  17187. }
  17188. };
  17189. }
  17190. function Os(e) {
  17191. return function (t) {
  17192. var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17193. n = function (e) {
  17194. var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17195. 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;
  17196. }({
  17197. customUI: !1,
  17198. loadingOptions: {
  17199. title: "加载中...",
  17200. mask: !0
  17201. },
  17202. errorOptions: {
  17203. type: "modal",
  17204. retry: !1
  17205. }
  17206. }, n);
  17207. var _n13 = n,
  17208. s = _n13.customUI,
  17209. r = _n13.loadingOptions,
  17210. i = _n13.errorOptions,
  17211. o = _n13.parseSystemError,
  17212. a = !s;
  17213. return new Proxy({}, {
  17214. get: function get(s, c) {
  17215. return function () {
  17216. var _ref55 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17217. e = _ref55.fn,
  17218. t = _ref55.interceptorName,
  17219. n = _ref55.getCallbackArgs;
  17220. return /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee52() {
  17221. var _len2,
  17222. s,
  17223. _key2,
  17224. r,
  17225. i,
  17226. o,
  17227. _args = arguments;
  17228. return _regenerator.default.wrap(function _callee52$(_context52) {
  17229. while (1) {
  17230. switch (_context52.prev = _context52.next) {
  17231. case 0:
  17232. for (_len2 = _args.length, s = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  17233. s[_key2] = _args[_key2];
  17234. }
  17235. r = n ? n({
  17236. params: s
  17237. }) : {};
  17238. _context52.prev = 2;
  17239. _context52.next = 5;
  17240. return M(q(t, "invoke"), _objectSpread({}, r));
  17241. case 5:
  17242. _context52.next = 7;
  17243. return e.apply(void 0, s);
  17244. case 7:
  17245. i = _context52.sent;
  17246. _context52.next = 10;
  17247. return M(q(t, "success"), _objectSpread(_objectSpread({}, r), {}, {
  17248. result: i
  17249. }));
  17250. case 10:
  17251. return _context52.abrupt("return", i);
  17252. case 13:
  17253. _context52.prev = 13;
  17254. _context52.t0 = _context52["catch"](2);
  17255. o = _context52.t0;
  17256. _context52.next = 18;
  17257. return M(q(t, "fail"), _objectSpread(_objectSpread({}, r), {}, {
  17258. error: o
  17259. }));
  17260. case 18:
  17261. throw o;
  17262. case 19:
  17263. _context52.prev = 19;
  17264. _context52.next = 22;
  17265. return M(q(t, "complete"), o ? _objectSpread(_objectSpread({}, r), {}, {
  17266. error: o
  17267. }) : _objectSpread(_objectSpread({}, r), {}, {
  17268. result: i
  17269. }));
  17270. case 22:
  17271. return _context52.finish(19);
  17272. case 23:
  17273. case "end":
  17274. return _context52.stop();
  17275. }
  17276. }
  17277. }, _callee52, null, [[2, 13, 19, 23]]);
  17278. }));
  17279. }({
  17280. fn: function () {
  17281. var _s16 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee54() {
  17282. var l,
  17283. _len3,
  17284. h,
  17285. _key3,
  17286. d,
  17287. p,
  17288. _ref57,
  17289. f,
  17290. g,
  17291. m,
  17292. y,
  17293. _e26,
  17294. _yield,
  17295. _t20,
  17296. _n14,
  17297. _args4 = arguments;
  17298. return _regenerator.default.wrap(function _callee54$(_context54) {
  17299. while (1) {
  17300. switch (_context54.prev = _context54.next) {
  17301. case 0:
  17302. a && uni.showLoading({
  17303. title: r.title,
  17304. mask: r.mask
  17305. });
  17306. for (_len3 = _args4.length, h = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
  17307. h[_key3] = _args4[_key3];
  17308. }
  17309. d = {
  17310. name: t,
  17311. type: u,
  17312. data: {
  17313. method: c,
  17314. params: h
  17315. }
  17316. };
  17317. "object" == (0, _typeof2.default)(n.secretMethods) && function (e, t) {
  17318. var n = t.data.method,
  17319. s = e.secretMethods || {},
  17320. r = s[n] || s["*"];
  17321. r && (t.secretType = r);
  17322. }(n, d);
  17323. p = !1;
  17324. _context54.prev = 5;
  17325. _context54.next = 8;
  17326. return e.callFunction(d);
  17327. case 8:
  17328. l = _context54.sent;
  17329. _context54.next = 14;
  17330. break;
  17331. case 11:
  17332. _context54.prev = 11;
  17333. _context54.t0 = _context54["catch"](5);
  17334. p = !0, l = {
  17335. result: new te(_context54.t0)
  17336. };
  17337. case 14:
  17338. _ref57 = l.result || {}, f = _ref57.errSubject, g = _ref57.errCode, m = _ref57.errMsg, y = _ref57.newToken;
  17339. if (!(a && uni.hideLoading(), y && y.token && y.tokenExpired && (re(y), Y(B, _objectSpread({}, y))), g)) {
  17340. _context54.next = 39;
  17341. break;
  17342. }
  17343. _e26 = m;
  17344. if (!(p && o)) {
  17345. _context54.next = 24;
  17346. break;
  17347. }
  17348. _context54.next = 20;
  17349. return o({
  17350. objectName: t,
  17351. methodName: c,
  17352. params: h,
  17353. errSubject: f,
  17354. errCode: g,
  17355. errMsg: m
  17356. });
  17357. case 20:
  17358. _context54.t1 = _context54.sent.errMsg;
  17359. if (_context54.t1) {
  17360. _context54.next = 23;
  17361. break;
  17362. }
  17363. _context54.t1 = m;
  17364. case 23:
  17365. _e26 = _context54.t1;
  17366. case 24:
  17367. if (!a) {
  17368. _context54.next = 37;
  17369. break;
  17370. }
  17371. if (!("toast" === i.type)) {
  17372. _context54.next = 29;
  17373. break;
  17374. }
  17375. uni.showToast({
  17376. title: _e26,
  17377. icon: "none"
  17378. });
  17379. _context54.next = 37;
  17380. break;
  17381. case 29:
  17382. if (!("modal" !== i.type)) {
  17383. _context54.next = 31;
  17384. break;
  17385. }
  17386. throw new Error("Invalid errorOptions.type: ".concat(i.type));
  17387. case 31:
  17388. _context54.next = 33;
  17389. return (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee53() {
  17390. var _ref59,
  17391. e,
  17392. t,
  17393. n,
  17394. s,
  17395. r,
  17396. _args2 = arguments;
  17397. return _regenerator.default.wrap(function _callee53$(_context53) {
  17398. while (1) {
  17399. switch (_context53.prev = _context53.next) {
  17400. case 0:
  17401. _ref59 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, e = _ref59.title, t = _ref59.content, n = _ref59.showCancel, s = _ref59.cancelText, r = _ref59.confirmText;
  17402. return _context53.abrupt("return", new Promise(function (i, o) {
  17403. uni.showModal({
  17404. title: e,
  17405. content: t,
  17406. showCancel: n,
  17407. cancelText: s,
  17408. confirmText: r,
  17409. success: function success(e) {
  17410. i(e);
  17411. },
  17412. fail: function fail() {
  17413. i({
  17414. confirm: !1,
  17415. cancel: !0
  17416. });
  17417. }
  17418. });
  17419. }));
  17420. case 2:
  17421. case "end":
  17422. return _context53.stop();
  17423. }
  17424. }
  17425. }, _callee53);
  17426. }))({
  17427. title: "提示",
  17428. content: _e26,
  17429. showCancel: i.retry,
  17430. cancelText: "取消",
  17431. confirmText: i.retry ? "重试" : "确定"
  17432. });
  17433. case 33:
  17434. _yield = _context54.sent;
  17435. _t20 = _yield.confirm;
  17436. if (!(i.retry && _t20)) {
  17437. _context54.next = 37;
  17438. break;
  17439. }
  17440. return _context54.abrupt("return", s.apply(void 0, h));
  17441. case 37:
  17442. _n14 = new te({
  17443. subject: f,
  17444. code: g,
  17445. message: m,
  17446. requestId: l.requestId
  17447. });
  17448. throw _n14.detail = l.result, Y(j, {
  17449. type: z,
  17450. content: _n14
  17451. }), _n14;
  17452. case 39:
  17453. return _context54.abrupt("return", (Y(j, {
  17454. type: z,
  17455. content: l.result
  17456. }), l.result));
  17457. case 40:
  17458. case "end":
  17459. return _context54.stop();
  17460. }
  17461. }
  17462. }, _callee54, null, [[5, 11]]);
  17463. }));
  17464. function s() {
  17465. return _s16.apply(this, arguments);
  17466. }
  17467. return s;
  17468. }(),
  17469. interceptorName: "callObject",
  17470. getCallbackArgs: function getCallbackArgs() {
  17471. var _ref60 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17472. e = _ref60.params;
  17473. return {
  17474. objectName: t,
  17475. methodName: c,
  17476. params: e
  17477. };
  17478. }
  17479. });
  17480. }
  17481. });
  17482. };
  17483. }
  17484. function Es(e) {
  17485. return L("_globalUniCloudSecureNetworkCache__{spaceId}".replace("{spaceId}", e.config.spaceId));
  17486. }
  17487. function Ls() {
  17488. return _Ls.apply(this, arguments);
  17489. }
  17490. function _Ls() {
  17491. _Ls = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee57() {
  17492. var _ref72,
  17493. e,
  17494. _ref72$callLoginByWei,
  17495. t,
  17496. n,
  17497. s,
  17498. r,
  17499. _args7 = arguments;
  17500. return _regenerator.default.wrap(function _callee57$(_context57) {
  17501. while (1) {
  17502. switch (_context57.prev = _context57.next) {
  17503. case 0:
  17504. _ref72 = _args7.length > 0 && _args7[0] !== undefined ? _args7[0] : {}, e = _ref72.openid, _ref72$callLoginByWei = _ref72.callLoginByWeixin, t = _ref72$callLoginByWei === void 0 ? !1 : _ref72$callLoginByWei;
  17505. n = Es(this);
  17506. if (!("mp-weixin" !== P)) {
  17507. _context57.next = 4;
  17508. break;
  17509. }
  17510. throw new Error("[SecureNetwork] API `initSecureNetworkByWeixin` is not supported on platform `".concat(P, "`"));
  17511. case 4:
  17512. if (!(e && t)) {
  17513. _context57.next = 6;
  17514. break;
  17515. }
  17516. throw new Error("[SecureNetwork] openid and callLoginByWeixin cannot be passed at the same time");
  17517. case 6:
  17518. if (!e) {
  17519. _context57.next = 8;
  17520. break;
  17521. }
  17522. return _context57.abrupt("return", (n.mpWeixinOpenid = e, {}));
  17523. case 8:
  17524. _context57.next = 10;
  17525. return new Promise(function (e, t) {
  17526. uni.login({
  17527. success: function success(t) {
  17528. e(t.code);
  17529. },
  17530. fail: function fail(e) {
  17531. t(new Error(e.errMsg));
  17532. }
  17533. });
  17534. });
  17535. case 10:
  17536. s = _context57.sent;
  17537. r = this.importObject("uni-id-co", {
  17538. customUI: !0
  17539. });
  17540. _context57.next = 14;
  17541. return r.secureNetworkHandshakeByWeixin({
  17542. code: s,
  17543. callLoginByWeixin: t
  17544. });
  17545. case 14:
  17546. n.mpWeixinCode = s;
  17547. return _context57.abrupt("return", {
  17548. code: s
  17549. });
  17550. case 16:
  17551. case "end":
  17552. return _context57.stop();
  17553. }
  17554. }
  17555. }, _callee57, this);
  17556. }));
  17557. return _Ls.apply(this, arguments);
  17558. }
  17559. function Rs(_x39) {
  17560. return _Rs.apply(this, arguments);
  17561. }
  17562. function _Rs() {
  17563. _Rs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee58(e) {
  17564. var t;
  17565. return _regenerator.default.wrap(function _callee58$(_context58) {
  17566. while (1) {
  17567. switch (_context58.prev = _context58.next) {
  17568. case 0:
  17569. t = Es(this);
  17570. return _context58.abrupt("return", (t.initPromise || (t.initPromise = Ls.call(this, e)), t.initPromise));
  17571. case 2:
  17572. case "end":
  17573. return _context58.stop();
  17574. }
  17575. }
  17576. }, _callee58, this);
  17577. }));
  17578. return _Rs.apply(this, arguments);
  17579. }
  17580. function Us(e) {
  17581. return function () {
  17582. var _ref61 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17583. t = _ref61.openid,
  17584. _ref61$callLoginByWei = _ref61.callLoginByWeixin,
  17585. n = _ref61$callLoginByWei === void 0 ? !1 : _ref61$callLoginByWei;
  17586. return Rs.call(e, {
  17587. openid: t,
  17588. callLoginByWeixin: n
  17589. });
  17590. };
  17591. }
  17592. function Ns(e) {
  17593. var t = {
  17594. getSystemInfo: uni.getSystemInfo,
  17595. getPushClientId: uni.getPushClientId
  17596. };
  17597. return function (n) {
  17598. return new Promise(function (s, r) {
  17599. t[e](_objectSpread(_objectSpread({}, n), {}, {
  17600. success: function success(e) {
  17601. s(e);
  17602. },
  17603. fail: function fail(e) {
  17604. r(e);
  17605. }
  17606. }));
  17607. });
  17608. };
  17609. }
  17610. var Ds = /*#__PURE__*/function (_ref62) {
  17611. (0, _inherits2.default)(Ds, _ref62);
  17612. var _super12 = _createSuper(Ds);
  17613. function Ds() {
  17614. var _this23;
  17615. (0, _classCallCheck2.default)(this, Ds);
  17616. _this23 = _super12.call(this), _this23._uniPushMessageCallback = _this23._receivePushMessage.bind((0, _assertThisInitialized2.default)(_this23)), _this23._currentMessageId = -1, _this23._payloadQueue = [];
  17617. return _this23;
  17618. }
  17619. (0, _createClass2.default)(Ds, [{
  17620. key: "init",
  17621. value: function init() {
  17622. var _this24 = this;
  17623. return Promise.all([Ns("getSystemInfo")(), Ns("getPushClientId")()]).then(function () {
  17624. var _ref63 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [],
  17625. _ref64 = (0, _slicedToArray2.default)(_ref63, 2),
  17626. _ref64$ = _ref64[0];
  17627. _ref64$ = _ref64$ === void 0 ? {} : _ref64$;
  17628. var e = _ref64$.appId,
  17629. _ref64$2 = _ref64[1];
  17630. _ref64$2 = _ref64$2 === void 0 ? {} : _ref64$2;
  17631. var t = _ref64$2.cid;
  17632. if (!e) throw new Error("Invalid appId, please check the manifest.json file");
  17633. if (!t) throw new Error("Invalid push client id");
  17634. _this24._appId = e, _this24._pushClientId = t, _this24._seqId = Date.now() + "-" + Math.floor(9e5 * Math.random() + 1e5), _this24.emit("open"), _this24._initMessageListener();
  17635. }, function (e) {
  17636. throw _this24.emit("error", e), _this24.close(), e;
  17637. });
  17638. }
  17639. }, {
  17640. key: "open",
  17641. value: function () {
  17642. var _open = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee55() {
  17643. return _regenerator.default.wrap(function _callee55$(_context55) {
  17644. while (1) {
  17645. switch (_context55.prev = _context55.next) {
  17646. case 0:
  17647. return _context55.abrupt("return", this.init());
  17648. case 1:
  17649. case "end":
  17650. return _context55.stop();
  17651. }
  17652. }
  17653. }, _callee55, this);
  17654. }));
  17655. function open() {
  17656. return _open.apply(this, arguments);
  17657. }
  17658. return open;
  17659. }()
  17660. }, {
  17661. key: "_isUniCloudSSE",
  17662. value: function _isUniCloudSSE(e) {
  17663. if ("receive" !== e.type) return !1;
  17664. var t = e && e.data && e.data.payload;
  17665. return !(!t || "UNI_CLOUD_SSE" !== t.channel || t.seqId !== this._seqId);
  17666. }
  17667. }, {
  17668. key: "_receivePushMessage",
  17669. value: function _receivePushMessage(e) {
  17670. if (!this._isUniCloudSSE(e)) return;
  17671. var t = e && e.data && e.data.payload,
  17672. n = t.action,
  17673. s = t.messageId,
  17674. r = t.message;
  17675. this._payloadQueue.push({
  17676. action: n,
  17677. messageId: s,
  17678. message: r
  17679. }), this._consumMessage();
  17680. }
  17681. }, {
  17682. key: "_consumMessage",
  17683. value: function _consumMessage() {
  17684. var _this25 = this;
  17685. for (;;) {
  17686. var _e27 = this._payloadQueue.find(function (e) {
  17687. return e.messageId === _this25._currentMessageId + 1;
  17688. });
  17689. if (!_e27) break;
  17690. this._currentMessageId++, this._parseMessagePayload(_e27);
  17691. }
  17692. }
  17693. }, {
  17694. key: "_parseMessagePayload",
  17695. value: function _parseMessagePayload(e) {
  17696. var t = e.action,
  17697. n = e.messageId,
  17698. s = e.message;
  17699. "end" === t ? this._end({
  17700. messageId: n,
  17701. message: s
  17702. }) : "message" === t && this._appendMessage({
  17703. messageId: n,
  17704. message: s
  17705. });
  17706. }
  17707. }, {
  17708. key: "_appendMessage",
  17709. value: function _appendMessage() {
  17710. var _ref65 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17711. e = _ref65.messageId,
  17712. t = _ref65.message;
  17713. this.emit("message", t);
  17714. }
  17715. }, {
  17716. key: "_end",
  17717. value: function _end() {
  17718. var _ref66 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
  17719. e = _ref66.messageId,
  17720. t = _ref66.message;
  17721. this.emit("end", t), this.close();
  17722. }
  17723. }, {
  17724. key: "_initMessageListener",
  17725. value: function _initMessageListener() {
  17726. uni.onPushMessage(this._uniPushMessageCallback);
  17727. }
  17728. }, {
  17729. key: "_destroy",
  17730. value: function _destroy() {
  17731. uni.offPushMessage(this._uniPushMessageCallback);
  17732. }
  17733. }, {
  17734. key: "toJSON",
  17735. value: function toJSON() {
  17736. return {
  17737. appId: this._appId,
  17738. pushClientId: this._pushClientId,
  17739. seqId: this._seqId
  17740. };
  17741. }
  17742. }, {
  17743. key: "close",
  17744. value: function close() {
  17745. this._destroy(), this.emit("close");
  17746. }
  17747. }]);
  17748. return Ds;
  17749. }( /*#__PURE__*/function () {
  17750. function _class6() {
  17751. (0, _classCallCheck2.default)(this, _class6);
  17752. this._callback = {};
  17753. }
  17754. (0, _createClass2.default)(_class6, [{
  17755. key: "addListener",
  17756. value: function addListener(e, t) {
  17757. this._callback[e] || (this._callback[e] = []), this._callback[e].push(t);
  17758. }
  17759. }, {
  17760. key: "on",
  17761. value: function on(e, t) {
  17762. return this.addListener(e, t);
  17763. }
  17764. }, {
  17765. key: "removeListener",
  17766. value: function removeListener(e, t) {
  17767. if (!t) throw new Error('The "listener" argument must be of type function. Received undefined');
  17768. var n = this._callback[e];
  17769. if (!n) return;
  17770. var s = function (e, t) {
  17771. for (var _n15 = e.length - 1; _n15 >= 0; _n15--) {
  17772. if (e[_n15] === t) return _n15;
  17773. }
  17774. return -1;
  17775. }(n, t);
  17776. n.splice(s, 1);
  17777. }
  17778. }, {
  17779. key: "off",
  17780. value: function off(e, t) {
  17781. return this.removeListener(e, t);
  17782. }
  17783. }, {
  17784. key: "removeAllListener",
  17785. value: function removeAllListener(e) {
  17786. delete this._callback[e];
  17787. }
  17788. }, {
  17789. key: "emit",
  17790. value: function emit(e) {
  17791. var n = this._callback[e];
  17792. for (var _len4 = arguments.length, t = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  17793. t[_key4 - 1] = arguments[_key4];
  17794. }
  17795. if (n) for (var _e28 = 0; _e28 < n.length; _e28++) {
  17796. n[_e28].apply(n, t);
  17797. }
  17798. }
  17799. }]);
  17800. return _class6;
  17801. }());
  17802. function Ms(_x40, _x41) {
  17803. return _Ms.apply(this, arguments);
  17804. }
  17805. function _Ms() {
  17806. _Ms = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee59(e, t) {
  17807. var n, _e32, s;
  17808. return _regenerator.default.wrap(function _callee59$(_context59) {
  17809. while (1) {
  17810. switch (_context59.prev = _context59.next) {
  17811. case 0:
  17812. n = "http://".concat(e, ":").concat(t, "/system/ping");
  17813. _context59.prev = 1;
  17814. _context59.next = 4;
  17815. return s = {
  17816. url: n,
  17817. timeout: 500
  17818. }, new Promise(function (e, t) {
  17819. ne.request(_objectSpread(_objectSpread({}, s), {}, {
  17820. success: function success(t) {
  17821. e(t);
  17822. },
  17823. fail: function fail(e) {
  17824. t(e);
  17825. }
  17826. }));
  17827. });
  17828. case 4:
  17829. _e32 = _context59.sent;
  17830. return _context59.abrupt("return", !(!_e32.data || 0 !== _e32.data.code));
  17831. case 8:
  17832. _context59.prev = 8;
  17833. _context59.t0 = _context59["catch"](1);
  17834. return _context59.abrupt("return", !1);
  17835. case 11:
  17836. case "end":
  17837. return _context59.stop();
  17838. }
  17839. }
  17840. }, _callee59, null, [[1, 8]]);
  17841. }));
  17842. return _Ms.apply(this, arguments);
  17843. }
  17844. function qs(_x42) {
  17845. return _qs.apply(this, arguments);
  17846. }
  17847. function _qs() {
  17848. _qs = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee61(e) {
  17849. var _ae2, _e33, _t22, t, _t$debugInfo, n, s, _yield2, r, i, o;
  17850. return _regenerator.default.wrap(function _callee61$(_context61) {
  17851. while (1) {
  17852. switch (_context61.prev = _context61.next) {
  17853. case 0:
  17854. if (S) {
  17855. _context61.next = 2;
  17856. break;
  17857. }
  17858. return _context61.abrupt("return", Promise.resolve());
  17859. case 2:
  17860. if ("app" === P) {
  17861. _ae2 = ae(), _e33 = _ae2.osName, _t22 = _ae2.osVersion;
  17862. "ios" === _e33 && function (e) {
  17863. if (!e || "string" != typeof e) return 0;
  17864. var t = e.match(/^(\d+)./);
  17865. return t && t[1] ? parseInt(t[1]) : 0;
  17866. }(_t22) >= 14 && console.warn("iOS 14及以上版本连接uniCloud本地调试服务需要允许客户端查找并连接到本地网络上的设备(仅开发模式生效,发行模式会连接uniCloud云端服务)");
  17867. }
  17868. t = e.__dev__;
  17869. if (t.debugInfo) {
  17870. _context61.next = 6;
  17871. break;
  17872. }
  17873. return _context61.abrupt("return");
  17874. case 6:
  17875. _t$debugInfo = t.debugInfo;
  17876. n = _t$debugInfo.address;
  17877. s = _t$debugInfo.servePort;
  17878. _context61.next = 11;
  17879. return function () {
  17880. var _ref73 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee60(e, t) {
  17881. var n, _s17, _r8;
  17882. return _regenerator.default.wrap(function _callee60$(_context60) {
  17883. while (1) {
  17884. switch (_context60.prev = _context60.next) {
  17885. case 0:
  17886. _s17 = 0;
  17887. case 1:
  17888. if (!(_s17 < e.length)) {
  17889. _context60.next = 11;
  17890. break;
  17891. }
  17892. _r8 = e[_s17];
  17893. _context60.next = 5;
  17894. return Ms(_r8, t);
  17895. case 5:
  17896. if (!_context60.sent) {
  17897. _context60.next = 8;
  17898. break;
  17899. }
  17900. n = _r8;
  17901. return _context60.abrupt("break", 11);
  17902. case 8:
  17903. _s17++;
  17904. _context60.next = 1;
  17905. break;
  17906. case 11:
  17907. return _context60.abrupt("return", {
  17908. address: n,
  17909. port: t
  17910. });
  17911. case 12:
  17912. case "end":
  17913. return _context60.stop();
  17914. }
  17915. }
  17916. }, _callee60);
  17917. }));
  17918. return function (_x43, _x44) {
  17919. return _ref73.apply(this, arguments);
  17920. };
  17921. }()(n, s);
  17922. case 11:
  17923. _yield2 = _context61.sent;
  17924. r = _yield2.address;
  17925. if (!r) {
  17926. _context61.next = 15;
  17927. break;
  17928. }
  17929. return _context61.abrupt("return", (t.localAddress = r, void (t.localPort = s)));
  17930. case 15:
  17931. i = console["app" === P ? "error" : "warn"];
  17932. o = "";
  17933. 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)) {
  17934. _context61.next = 19;
  17935. break;
  17936. }
  17937. throw new Error(o);
  17938. case 19:
  17939. i(o);
  17940. case 20:
  17941. case "end":
  17942. return _context61.stop();
  17943. }
  17944. }
  17945. }, _callee61);
  17946. }));
  17947. return _qs.apply(this, arguments);
  17948. }
  17949. function Fs(e) {
  17950. e._initPromiseHub || (e._initPromiseHub = new v({
  17951. createPromise: function createPromise() {
  17952. var t = Promise.resolve();
  17953. var n;
  17954. n = 1, t = new Promise(function (e) {
  17955. setTimeout(function () {
  17956. e();
  17957. }, n);
  17958. });
  17959. var s = e.auth();
  17960. return t.then(function () {
  17961. return s.getLoginState();
  17962. }).then(function (e) {
  17963. return e ? Promise.resolve() : s.signInAnonymously();
  17964. });
  17965. }
  17966. }));
  17967. }
  17968. var Ks = {
  17969. tcb: It,
  17970. tencent: It,
  17971. aliyun: de,
  17972. private: bt,
  17973. alipay: Ot
  17974. };
  17975. var js = new ( /*#__PURE__*/function () {
  17976. function _class7() {
  17977. (0, _classCallCheck2.default)(this, _class7);
  17978. }
  17979. (0, _createClass2.default)(_class7, [{
  17980. key: "init",
  17981. value: function init(e) {
  17982. var t = {};
  17983. var n = Ks[e.provider];
  17984. if (!n) throw new Error("未提供正确的provider参数");
  17985. t = n.init(e), S && function (e) {
  17986. if (!S) return;
  17987. var t = {};
  17988. e.__dev__ = t, t.debugLog = S && ("web" === P && navigator.userAgent.indexOf("HBuilderX") > 0 || "app" === P);
  17989. var n = T;
  17990. n && !n.code && (t.debugInfo = n);
  17991. var s = new v({
  17992. createPromise: function createPromise() {
  17993. return qs(e);
  17994. }
  17995. });
  17996. t.initLocalNetwork = function () {
  17997. return s.exec();
  17998. };
  17999. }(t), Fs(t), qn(t), function (e) {
  18000. var t = e.uploadFile;
  18001. e.uploadFile = function (e) {
  18002. return t.call(this, e);
  18003. };
  18004. }(t), function (e) {
  18005. e.database = function (t) {
  18006. if (t && Object.keys(t).length > 0) return e.init(t).database();
  18007. if (this._database) return this._database;
  18008. var n = Vn(Yn, {
  18009. uniClient: e
  18010. });
  18011. return this._database = n, n;
  18012. }, e.databaseForJQL = function (t) {
  18013. if (t && Object.keys(t).length > 0) return e.init(t).databaseForJQL();
  18014. if (this._databaseForJQL) return this._databaseForJQL;
  18015. var n = Vn(Yn, {
  18016. uniClient: e,
  18017. isJQL: !0
  18018. });
  18019. return this._databaseForJQL = n, n;
  18020. };
  18021. }(t), function (e) {
  18022. e.getCurrentUserInfo = As, e.chooseAndUploadFile = Ts.initChooseAndUploadFile(e), Object.assign(e, {
  18023. get mixinDatacom() {
  18024. return xs(e);
  18025. }
  18026. }), e.SSEChannel = Ds, e.initSecureNetworkByWeixin = Us(e), e.importObject = Os(e);
  18027. }(t);
  18028. return ["callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "chooseAndUploadFile"].forEach(function (e) {
  18029. if (!t[e]) return;
  18030. var n = t[e];
  18031. t[e] = function () {
  18032. return n.apply(t, Array.from(arguments));
  18033. }, t[e] = function (e, t) {
  18034. return function (n) {
  18035. var _this26 = this;
  18036. var s = !1;
  18037. if ("callFunction" === t) {
  18038. var _e29 = n && n.type || c;
  18039. s = _e29 !== c;
  18040. }
  18041. var r = "callFunction" === t && !s,
  18042. i = this._initPromiseHub.exec();
  18043. n = n || {};
  18044. var _ee2 = ee(n),
  18045. o = _ee2.success,
  18046. a = _ee2.fail,
  18047. u = _ee2.complete,
  18048. h = i.then(function () {
  18049. return s ? Promise.resolve() : M(q(t, "invoke"), n);
  18050. }).then(function () {
  18051. return e.call(_this26, n);
  18052. }).then(function (e) {
  18053. return s ? Promise.resolve(e) : M(q(t, "success"), e).then(function () {
  18054. return M(q(t, "complete"), e);
  18055. }).then(function () {
  18056. return r && Y(j, {
  18057. type: H,
  18058. content: e
  18059. }), Promise.resolve(e);
  18060. });
  18061. }, function (e) {
  18062. return s ? Promise.reject(e) : M(q(t, "fail"), e).then(function () {
  18063. return M(q(t, "complete"), e);
  18064. }).then(function () {
  18065. return Y(j, {
  18066. type: H,
  18067. content: e
  18068. }), Promise.reject(e);
  18069. });
  18070. });
  18071. if (!(o || a || u)) return h;
  18072. h.then(function (e) {
  18073. o && o(e), u && u(e), r && Y(j, {
  18074. type: H,
  18075. content: e
  18076. });
  18077. }, function (e) {
  18078. a && a(e), u && u(e), r && Y(j, {
  18079. type: H,
  18080. content: e
  18081. });
  18082. });
  18083. };
  18084. }(t[e], e).bind(t);
  18085. }), t.init = this.init, t;
  18086. }
  18087. }]);
  18088. return _class7;
  18089. }())();
  18090. (function () {
  18091. var e = C;
  18092. var t = {};
  18093. if (e && 1 === e.length) t = e[0], js = js.init(t), js._isDefault = !0;else {
  18094. var _t21 = ["auth", "callFunction", "uploadFile", "deleteFile", "getTempFileURL", "downloadFile", "database", "getCurrentUSerInfo", "importObject"];
  18095. var _n16;
  18096. _n16 = e && e.length > 0 ? "应用有多个服务空间,请通过uniCloud.init方法指定要使用的服务空间" : x ? "应用未关联服务空间,请在uniCloud目录右键关联服务空间" : "uni-app cli项目内使用uniCloud需要使用HBuilderX的运行菜单运行项目,且需要在uniCloud目录关联服务空间", _t21.forEach(function (e) {
  18097. js[e] = function () {
  18098. return console.error(_n16), Promise.reject(new te({
  18099. code: "SYS_ERR",
  18100. message: _n16
  18101. }));
  18102. };
  18103. });
  18104. }
  18105. Object.assign(js, {
  18106. get mixinDatacom() {
  18107. return xs(js);
  18108. }
  18109. }), Is(js), js.addInterceptor = N, js.removeInterceptor = D, js.interceptObject = F, S && "web" === P && (window.uniCloud = js);
  18110. })();
  18111. var $s = js;
  18112. exports.default = $s;
  18113. /* 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"]))
  18114. /***/ }),
  18115. /* 29 */
  18116. /*!************************************************************************************************!*\
  18117. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/@babel/runtime/regenerator/index.js ***!
  18118. \************************************************************************************************/
  18119. /*! no static exports found */
  18120. /***/ (function(module, exports, __webpack_require__) {
  18121. // TODO(Babel 8): Remove this file.
  18122. var runtime = __webpack_require__(/*! @babel/runtime/helpers/regeneratorRuntime */ 30)();
  18123. module.exports = runtime;
  18124. /***/ }),
  18125. /* 30 */
  18126. /*!*******************************************************************!*\
  18127. !*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
  18128. \*******************************************************************/
  18129. /*! no static exports found */
  18130. /***/ (function(module, exports, __webpack_require__) {
  18131. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  18132. function _regeneratorRuntime() {
  18133. "use strict";
  18134. /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
  18135. module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
  18136. return exports;
  18137. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18138. var exports = {},
  18139. Op = Object.prototype,
  18140. hasOwn = Op.hasOwnProperty,
  18141. defineProperty = Object.defineProperty || function (obj, key, desc) {
  18142. obj[key] = desc.value;
  18143. },
  18144. $Symbol = "function" == typeof Symbol ? Symbol : {},
  18145. iteratorSymbol = $Symbol.iterator || "@@iterator",
  18146. asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
  18147. toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  18148. function define(obj, key, value) {
  18149. return Object.defineProperty(obj, key, {
  18150. value: value,
  18151. enumerable: !0,
  18152. configurable: !0,
  18153. writable: !0
  18154. }), obj[key];
  18155. }
  18156. try {
  18157. define({}, "");
  18158. } catch (err) {
  18159. define = function define(obj, key, value) {
  18160. return obj[key] = value;
  18161. };
  18162. }
  18163. function wrap(innerFn, outerFn, self, tryLocsList) {
  18164. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
  18165. generator = Object.create(protoGenerator.prototype),
  18166. context = new Context(tryLocsList || []);
  18167. return defineProperty(generator, "_invoke", {
  18168. value: makeInvokeMethod(innerFn, self, context)
  18169. }), generator;
  18170. }
  18171. function tryCatch(fn, obj, arg) {
  18172. try {
  18173. return {
  18174. type: "normal",
  18175. arg: fn.call(obj, arg)
  18176. };
  18177. } catch (err) {
  18178. return {
  18179. type: "throw",
  18180. arg: err
  18181. };
  18182. }
  18183. }
  18184. exports.wrap = wrap;
  18185. var ContinueSentinel = {};
  18186. function Generator() {}
  18187. function GeneratorFunction() {}
  18188. function GeneratorFunctionPrototype() {}
  18189. var IteratorPrototype = {};
  18190. define(IteratorPrototype, iteratorSymbol, function () {
  18191. return this;
  18192. });
  18193. var getProto = Object.getPrototypeOf,
  18194. NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  18195. NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
  18196. var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
  18197. function defineIteratorMethods(prototype) {
  18198. ["next", "throw", "return"].forEach(function (method) {
  18199. define(prototype, method, function (arg) {
  18200. return this._invoke(method, arg);
  18201. });
  18202. });
  18203. }
  18204. function AsyncIterator(generator, PromiseImpl) {
  18205. function invoke(method, arg, resolve, reject) {
  18206. var record = tryCatch(generator[method], generator, arg);
  18207. if ("throw" !== record.type) {
  18208. var result = record.arg,
  18209. value = result.value;
  18210. return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
  18211. invoke("next", value, resolve, reject);
  18212. }, function (err) {
  18213. invoke("throw", err, resolve, reject);
  18214. }) : PromiseImpl.resolve(value).then(function (unwrapped) {
  18215. result.value = unwrapped, resolve(result);
  18216. }, function (error) {
  18217. return invoke("throw", error, resolve, reject);
  18218. });
  18219. }
  18220. reject(record.arg);
  18221. }
  18222. var previousPromise;
  18223. defineProperty(this, "_invoke", {
  18224. value: function value(method, arg) {
  18225. function callInvokeWithMethodAndArg() {
  18226. return new PromiseImpl(function (resolve, reject) {
  18227. invoke(method, arg, resolve, reject);
  18228. });
  18229. }
  18230. return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
  18231. }
  18232. });
  18233. }
  18234. function makeInvokeMethod(innerFn, self, context) {
  18235. var state = "suspendedStart";
  18236. return function (method, arg) {
  18237. if ("executing" === state) throw new Error("Generator is already running");
  18238. if ("completed" === state) {
  18239. if ("throw" === method) throw arg;
  18240. return doneResult();
  18241. }
  18242. for (context.method = method, context.arg = arg;;) {
  18243. var delegate = context.delegate;
  18244. if (delegate) {
  18245. var delegateResult = maybeInvokeDelegate(delegate, context);
  18246. if (delegateResult) {
  18247. if (delegateResult === ContinueSentinel) continue;
  18248. return delegateResult;
  18249. }
  18250. }
  18251. if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
  18252. if ("suspendedStart" === state) throw state = "completed", context.arg;
  18253. context.dispatchException(context.arg);
  18254. } else "return" === context.method && context.abrupt("return", context.arg);
  18255. state = "executing";
  18256. var record = tryCatch(innerFn, self, context);
  18257. if ("normal" === record.type) {
  18258. if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
  18259. return {
  18260. value: record.arg,
  18261. done: context.done
  18262. };
  18263. }
  18264. "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
  18265. }
  18266. };
  18267. }
  18268. function maybeInvokeDelegate(delegate, context) {
  18269. var methodName = context.method,
  18270. method = delegate.iterator[methodName];
  18271. 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;
  18272. var record = tryCatch(method, delegate.iterator, context.arg);
  18273. if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
  18274. var info = record.arg;
  18275. 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);
  18276. }
  18277. function pushTryEntry(locs) {
  18278. var entry = {
  18279. tryLoc: locs[0]
  18280. };
  18281. 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
  18282. }
  18283. function resetTryEntry(entry) {
  18284. var record = entry.completion || {};
  18285. record.type = "normal", delete record.arg, entry.completion = record;
  18286. }
  18287. function Context(tryLocsList) {
  18288. this.tryEntries = [{
  18289. tryLoc: "root"
  18290. }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
  18291. }
  18292. function values(iterable) {
  18293. if (iterable) {
  18294. var iteratorMethod = iterable[iteratorSymbol];
  18295. if (iteratorMethod) return iteratorMethod.call(iterable);
  18296. if ("function" == typeof iterable.next) return iterable;
  18297. if (!isNaN(iterable.length)) {
  18298. var i = -1,
  18299. next = function next() {
  18300. for (; ++i < iterable.length;) {
  18301. if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
  18302. }
  18303. return next.value = undefined, next.done = !0, next;
  18304. };
  18305. return next.next = next;
  18306. }
  18307. }
  18308. return {
  18309. next: doneResult
  18310. };
  18311. }
  18312. function doneResult() {
  18313. return {
  18314. value: undefined,
  18315. done: !0
  18316. };
  18317. }
  18318. return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
  18319. value: GeneratorFunctionPrototype,
  18320. configurable: !0
  18321. }), defineProperty(GeneratorFunctionPrototype, "constructor", {
  18322. value: GeneratorFunction,
  18323. configurable: !0
  18324. }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
  18325. var ctor = "function" == typeof genFun && genFun.constructor;
  18326. return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
  18327. }, exports.mark = function (genFun) {
  18328. return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
  18329. }, exports.awrap = function (arg) {
  18330. return {
  18331. __await: arg
  18332. };
  18333. }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  18334. return this;
  18335. }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  18336. void 0 === PromiseImpl && (PromiseImpl = Promise);
  18337. var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
  18338. return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
  18339. return result.done ? result.value : iter.next();
  18340. });
  18341. }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
  18342. return this;
  18343. }), define(Gp, "toString", function () {
  18344. return "[object Generator]";
  18345. }), exports.keys = function (val) {
  18346. var object = Object(val),
  18347. keys = [];
  18348. for (var key in object) {
  18349. keys.push(key);
  18350. }
  18351. return keys.reverse(), function next() {
  18352. for (; keys.length;) {
  18353. var key = keys.pop();
  18354. if (key in object) return next.value = key, next.done = !1, next;
  18355. }
  18356. return next.done = !0, next;
  18357. };
  18358. }, exports.values = values, Context.prototype = {
  18359. constructor: Context,
  18360. reset: function reset(skipTempReset) {
  18361. 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) {
  18362. "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
  18363. }
  18364. },
  18365. stop: function stop() {
  18366. this.done = !0;
  18367. var rootRecord = this.tryEntries[0].completion;
  18368. if ("throw" === rootRecord.type) throw rootRecord.arg;
  18369. return this.rval;
  18370. },
  18371. dispatchException: function dispatchException(exception) {
  18372. if (this.done) throw exception;
  18373. var context = this;
  18374. function handle(loc, caught) {
  18375. return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
  18376. }
  18377. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  18378. var entry = this.tryEntries[i],
  18379. record = entry.completion;
  18380. if ("root" === entry.tryLoc) return handle("end");
  18381. if (entry.tryLoc <= this.prev) {
  18382. var hasCatch = hasOwn.call(entry, "catchLoc"),
  18383. hasFinally = hasOwn.call(entry, "finallyLoc");
  18384. if (hasCatch && hasFinally) {
  18385. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  18386. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  18387. } else if (hasCatch) {
  18388. if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
  18389. } else {
  18390. if (!hasFinally) throw new Error("try statement without catch or finally");
  18391. if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
  18392. }
  18393. }
  18394. }
  18395. },
  18396. abrupt: function abrupt(type, arg) {
  18397. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  18398. var entry = this.tryEntries[i];
  18399. if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
  18400. var finallyEntry = entry;
  18401. break;
  18402. }
  18403. }
  18404. finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
  18405. var record = finallyEntry ? finallyEntry.completion : {};
  18406. return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
  18407. },
  18408. complete: function complete(record, afterLoc) {
  18409. if ("throw" === record.type) throw record.arg;
  18410. 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;
  18411. },
  18412. finish: function finish(finallyLoc) {
  18413. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  18414. var entry = this.tryEntries[i];
  18415. if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
  18416. }
  18417. },
  18418. "catch": function _catch(tryLoc) {
  18419. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  18420. var entry = this.tryEntries[i];
  18421. if (entry.tryLoc === tryLoc) {
  18422. var record = entry.completion;
  18423. if ("throw" === record.type) {
  18424. var thrown = record.arg;
  18425. resetTryEntry(entry);
  18426. }
  18427. return thrown;
  18428. }
  18429. }
  18430. throw new Error("illegal catch attempt");
  18431. },
  18432. delegateYield: function delegateYield(iterable, resultName, nextLoc) {
  18433. return this.delegate = {
  18434. iterator: values(iterable),
  18435. resultName: resultName,
  18436. nextLoc: nextLoc
  18437. }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
  18438. }
  18439. }, exports;
  18440. }
  18441. module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18442. /***/ }),
  18443. /* 31 */
  18444. /*!**********************************************************************!*\
  18445. !*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
  18446. \**********************************************************************/
  18447. /*! no static exports found */
  18448. /***/ (function(module, exports) {
  18449. function _assertThisInitialized(self) {
  18450. if (self === void 0) {
  18451. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  18452. }
  18453. return self;
  18454. }
  18455. module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18456. /***/ }),
  18457. /* 32 */
  18458. /*!*****************************************************************!*\
  18459. !*** ./node_modules/@babel/runtime/helpers/asyncToGenerator.js ***!
  18460. \*****************************************************************/
  18461. /*! no static exports found */
  18462. /***/ (function(module, exports) {
  18463. function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
  18464. try {
  18465. var info = gen[key](arg);
  18466. var value = info.value;
  18467. } catch (error) {
  18468. reject(error);
  18469. return;
  18470. }
  18471. if (info.done) {
  18472. resolve(value);
  18473. } else {
  18474. Promise.resolve(value).then(_next, _throw);
  18475. }
  18476. }
  18477. function _asyncToGenerator(fn) {
  18478. return function () {
  18479. var self = this,
  18480. args = arguments;
  18481. return new Promise(function (resolve, reject) {
  18482. var gen = fn.apply(self, args);
  18483. function _next(value) {
  18484. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
  18485. }
  18486. function _throw(err) {
  18487. asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
  18488. }
  18489. _next(undefined);
  18490. });
  18491. };
  18492. }
  18493. module.exports = _asyncToGenerator, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18494. /***/ }),
  18495. /* 33 */
  18496. /*!*********************************************************!*\
  18497. !*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
  18498. \*********************************************************/
  18499. /*! no static exports found */
  18500. /***/ (function(module, exports, __webpack_require__) {
  18501. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  18502. function _inherits(subClass, superClass) {
  18503. if (typeof superClass !== "function" && superClass !== null) {
  18504. throw new TypeError("Super expression must either be null or a function");
  18505. }
  18506. subClass.prototype = Object.create(superClass && superClass.prototype, {
  18507. constructor: {
  18508. value: subClass,
  18509. writable: true,
  18510. configurable: true
  18511. }
  18512. });
  18513. Object.defineProperty(subClass, "prototype", {
  18514. writable: false
  18515. });
  18516. if (superClass) setPrototypeOf(subClass, superClass);
  18517. }
  18518. module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18519. /***/ }),
  18520. /* 34 */
  18521. /*!**************************************************************************!*\
  18522. !*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
  18523. \**************************************************************************/
  18524. /*! no static exports found */
  18525. /***/ (function(module, exports, __webpack_require__) {
  18526. var _typeof = __webpack_require__(/*! ./typeof.js */ 13)["default"];
  18527. var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ 31);
  18528. function _possibleConstructorReturn(self, call) {
  18529. if (call && (_typeof(call) === "object" || typeof call === "function")) {
  18530. return call;
  18531. } else if (call !== void 0) {
  18532. throw new TypeError("Derived constructors may only return object or undefined");
  18533. }
  18534. return assertThisInitialized(self);
  18535. }
  18536. module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18537. /***/ }),
  18538. /* 35 */
  18539. /*!***************************************************************!*\
  18540. !*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
  18541. \***************************************************************/
  18542. /*! no static exports found */
  18543. /***/ (function(module, exports) {
  18544. function _getPrototypeOf(o) {
  18545. module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
  18546. return o.__proto__ || Object.getPrototypeOf(o);
  18547. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18548. return _getPrototypeOf(o);
  18549. }
  18550. module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18551. /***/ }),
  18552. /* 36 */
  18553. /*!****************************************************************!*\
  18554. !*** ./node_modules/@babel/runtime/helpers/wrapNativeSuper.js ***!
  18555. \****************************************************************/
  18556. /*! no static exports found */
  18557. /***/ (function(module, exports, __webpack_require__) {
  18558. var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ 35);
  18559. var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ 16);
  18560. var isNativeFunction = __webpack_require__(/*! ./isNativeFunction.js */ 37);
  18561. var construct = __webpack_require__(/*! ./construct.js */ 15);
  18562. function _wrapNativeSuper(Class) {
  18563. var _cache = typeof Map === "function" ? new Map() : undefined;
  18564. module.exports = _wrapNativeSuper = function _wrapNativeSuper(Class) {
  18565. if (Class === null || !isNativeFunction(Class)) return Class;
  18566. if (typeof Class !== "function") {
  18567. throw new TypeError("Super expression must either be null or a function");
  18568. }
  18569. if (typeof _cache !== "undefined") {
  18570. if (_cache.has(Class)) return _cache.get(Class);
  18571. _cache.set(Class, Wrapper);
  18572. }
  18573. function Wrapper() {
  18574. return construct(Class, arguments, getPrototypeOf(this).constructor);
  18575. }
  18576. Wrapper.prototype = Object.create(Class.prototype, {
  18577. constructor: {
  18578. value: Wrapper,
  18579. enumerable: false,
  18580. writable: true,
  18581. configurable: true
  18582. }
  18583. });
  18584. return setPrototypeOf(Wrapper, Class);
  18585. }, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18586. return _wrapNativeSuper(Class);
  18587. }
  18588. module.exports = _wrapNativeSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18589. /***/ }),
  18590. /* 37 */
  18591. /*!*****************************************************************!*\
  18592. !*** ./node_modules/@babel/runtime/helpers/isNativeFunction.js ***!
  18593. \*****************************************************************/
  18594. /*! no static exports found */
  18595. /***/ (function(module, exports) {
  18596. function _isNativeFunction(fn) {
  18597. return Function.toString.call(fn).indexOf("[native code]") !== -1;
  18598. }
  18599. module.exports = _isNativeFunction, module.exports.__esModule = true, module.exports["default"] = module.exports;
  18600. /***/ }),
  18601. /* 38 */
  18602. /*!*****************************************************************************************!*\
  18603. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages.json?{"type":"origin-pages-json"} ***!
  18604. \*****************************************************************************************/
  18605. /*! no static exports found */
  18606. /***/ (function(module, exports, __webpack_require__) {
  18607. "use strict";
  18608. Object.defineProperty(exports, "__esModule", {
  18609. value: true
  18610. });
  18611. exports.default = void 0;
  18612. var _default = {
  18613. "pages": [{
  18614. "path": "pages/chooseIdentity/index",
  18615. "style": {
  18616. "navigationStyle": "custom",
  18617. "navigationBarTitleText": "选择身份",
  18618. "app-plus": {
  18619. "titleNView": {
  18620. "buttons": [{
  18621. "text": "",
  18622. "fontSrc": "/static/uni.ttf",
  18623. "fontSize": "22px",
  18624. "color": "#FFFFFF"
  18625. }]
  18626. }
  18627. },
  18628. "usingComponents": {
  18629. "van-button": "/wxcomponents/weapp/dist/button/index",
  18630. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18631. "van-field": "/wxcomponents/weapp/dist/field/index",
  18632. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18633. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18634. "van-dialog": "/wxcomponents/weapp/dist/dialog/index"
  18635. }
  18636. }
  18637. }, {
  18638. "path": "pages/login/login",
  18639. "style": {
  18640. "navigationBarTitleText": "登录",
  18641. "app-plus": {
  18642. "titleNView": {
  18643. "buttons": [{
  18644. "text": "",
  18645. "fontSrc": "/static/uni.ttf",
  18646. "fontSize": "22px",
  18647. "color": "#FFFFFF"
  18648. }]
  18649. }
  18650. },
  18651. "usingComponents": {
  18652. "van-button": "/wxcomponents/weapp/dist/button/index",
  18653. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18654. "van-field": "/wxcomponents/weapp/dist/field/index",
  18655. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18656. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18657. "van-dialog": "/wxcomponents/weapp/dist/dialog/index"
  18658. }
  18659. }
  18660. }, {
  18661. "path": "pages/index/index",
  18662. "style": {
  18663. "navigationBarTitleText": "首页"
  18664. }
  18665. }, {
  18666. "path": "pages/mine/mine",
  18667. "style": {
  18668. "navigationStyle": "custom",
  18669. "navigationBarTitleText": "我的",
  18670. "app-plus": {
  18671. "bounce": "vertical",
  18672. "titleNView": {
  18673. "buttons": [{
  18674. "text": "",
  18675. "fontSrc": "/static/uni.ttf",
  18676. "fontSize": "22px",
  18677. "color": "#FFFFFF"
  18678. }]
  18679. }
  18680. },
  18681. "usingComponents": {
  18682. "van-button": "/wxcomponents/weapp/dist/button/index",
  18683. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18684. "van-field": "/wxcomponents/weapp/dist/field/index",
  18685. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18686. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18687. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18688. "van-icon": "/wxcomponents/weapp/dist/icon/index"
  18689. }
  18690. }
  18691. }],
  18692. "subPackages": [{
  18693. "root": "pages/subPackages",
  18694. "pages": [{
  18695. "path": "carmange/add",
  18696. "style": {
  18697. "navigationBarTitleText": "添加车辆",
  18698. "enablePullDownRefresh": true,
  18699. "onReachBottomDistance": 100,
  18700. "app-plus": {
  18701. "bounce": "vertical",
  18702. "titleNView": {
  18703. "buttons": [{
  18704. "text": "",
  18705. "fontSrc": "/static/uni.ttf",
  18706. "fontSize": "22px",
  18707. "color": "#FFFFFF"
  18708. }]
  18709. }
  18710. },
  18711. "component": true,
  18712. "usingComponents": {
  18713. "van-button": "/wxcomponents/weapp/dist/button/index",
  18714. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18715. "van-field": "/wxcomponents/weapp/dist/field/index",
  18716. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18717. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18718. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18719. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  18720. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  18721. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  18722. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  18723. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  18724. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  18725. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  18726. }
  18727. }
  18728. }, {
  18729. "path": "carmange/index",
  18730. "style": {
  18731. "navigationBarTitleText": "车辆管理",
  18732. "enablePullDownRefresh": true,
  18733. "onReachBottomDistance": 100,
  18734. "app-plus": {
  18735. "bounce": "vertical",
  18736. "titleNView": {
  18737. "buttons": [{
  18738. "text": "",
  18739. "fontSrc": "/static/uni.ttf",
  18740. "fontSize": "22px",
  18741. "color": "#FFFFFF"
  18742. }]
  18743. }
  18744. },
  18745. "component": true,
  18746. "usingComponents": {
  18747. "van-button": "/wxcomponents/weapp/dist/button/index",
  18748. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18749. "van-field": "/wxcomponents/weapp/dist/field/index",
  18750. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18751. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18752. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18753. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  18754. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  18755. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  18756. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  18757. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  18758. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  18759. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  18760. }
  18761. }
  18762. }, {
  18763. "path": "scanCode/index",
  18764. "style": {
  18765. "navigationBarTitleText": "扫码核验",
  18766. "enablePullDownRefresh": true,
  18767. "onReachBottomDistance": 100,
  18768. "app-plus": {
  18769. "bounce": "vertical",
  18770. "titleNView": {
  18771. "buttons": [{
  18772. "text": "",
  18773. "fontSrc": "/static/uni.ttf",
  18774. "fontSize": "22px",
  18775. "color": "#FFFFFF"
  18776. }]
  18777. }
  18778. },
  18779. "component": true,
  18780. "usingComponents": {
  18781. "van-button": "/wxcomponents/weapp/dist/button/index",
  18782. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18783. "van-field": "/wxcomponents/weapp/dist/field/index",
  18784. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18785. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18786. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18787. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  18788. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  18789. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  18790. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  18791. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  18792. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  18793. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  18794. }
  18795. }
  18796. }, {
  18797. "path": "noticeList/qy",
  18798. "style": {
  18799. "navigationBarTitleText": "企业消息",
  18800. "enablePullDownRefresh": true,
  18801. "onReachBottomDistance": 100,
  18802. "app-plus": {
  18803. "bounce": "vertical",
  18804. "titleNView": {
  18805. "buttons": [{
  18806. "text": "",
  18807. "fontSrc": "/static/uni.ttf",
  18808. "fontSize": "22px",
  18809. "color": "#FFFFFF"
  18810. }]
  18811. }
  18812. },
  18813. "component": true,
  18814. "usingComponents": {
  18815. "van-button": "/wxcomponents/weapp/dist/button/index",
  18816. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18817. "van-field": "/wxcomponents/weapp/dist/field/index",
  18818. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18819. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18820. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18821. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  18822. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  18823. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  18824. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  18825. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  18826. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  18827. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  18828. }
  18829. }
  18830. }, {
  18831. "path": "noticeList/sj",
  18832. "style": {
  18833. "navigationBarTitleText": "司机消息",
  18834. "enablePullDownRefresh": true,
  18835. "onReachBottomDistance": 100,
  18836. "app-plus": {
  18837. "bounce": "vertical",
  18838. "titleNView": {
  18839. "buttons": [{
  18840. "text": "",
  18841. "fontSrc": "/static/uni.ttf",
  18842. "fontSize": "22px",
  18843. "color": "#FFFFFF"
  18844. }]
  18845. }
  18846. },
  18847. "component": true,
  18848. "usingComponents": {
  18849. "van-button": "/wxcomponents/weapp/dist/button/index",
  18850. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18851. "van-field": "/wxcomponents/weapp/dist/field/index",
  18852. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18853. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18854. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18855. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  18856. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  18857. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  18858. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  18859. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  18860. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  18861. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  18862. }
  18863. }
  18864. }, {
  18865. "path": "yy_history/code",
  18866. "style": {
  18867. "navigationBarTitleText": "预约码",
  18868. "enablePullDownRefresh": true,
  18869. "onReachBottomDistance": 100,
  18870. "app-plus": {
  18871. "bounce": "vertical",
  18872. "titleNView": {
  18873. "buttons": [{
  18874. "text": "",
  18875. "fontSrc": "/static/uni.ttf",
  18876. "fontSize": "22px",
  18877. "color": "#FFFFFF"
  18878. }]
  18879. }
  18880. },
  18881. "component": true,
  18882. "usingComponents": {
  18883. "van-button": "/wxcomponents/weapp/dist/button/index",
  18884. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18885. "van-field": "/wxcomponents/weapp/dist/field/index",
  18886. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18887. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18888. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18889. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  18890. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  18891. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  18892. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  18893. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  18894. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  18895. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  18896. }
  18897. }
  18898. }, {
  18899. "path": "yy_history/edit",
  18900. "style": {
  18901. "navigationBarTitleText": "修改预约",
  18902. "enablePullDownRefresh": true,
  18903. "onReachBottomDistance": 100,
  18904. "app-plus": {
  18905. "bounce": "vertical",
  18906. "titleNView": {
  18907. "buttons": [{
  18908. "text": "",
  18909. "fontSrc": "/static/uni.ttf",
  18910. "fontSize": "22px",
  18911. "color": "#FFFFFF"
  18912. }]
  18913. }
  18914. },
  18915. "component": true,
  18916. "usingComponents": {
  18917. "van-button": "/wxcomponents/weapp/dist/button/index",
  18918. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18919. "van-field": "/wxcomponents/weapp/dist/field/index",
  18920. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18921. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18922. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18923. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  18924. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  18925. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  18926. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  18927. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  18928. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  18929. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  18930. }
  18931. }
  18932. }, {
  18933. "path": "sj_history/detail",
  18934. "style": {
  18935. "navigationBarTitleText": "司机预约详情",
  18936. "enablePullDownRefresh": true,
  18937. "onReachBottomDistance": 100,
  18938. "app-plus": {
  18939. "bounce": "vertical",
  18940. "titleNView": {
  18941. "buttons": [{
  18942. "text": "",
  18943. "fontSrc": "/static/uni.ttf",
  18944. "fontSize": "22px",
  18945. "color": "#FFFFFF"
  18946. }]
  18947. }
  18948. },
  18949. "component": true,
  18950. "usingComponents": {
  18951. "van-button": "/wxcomponents/weapp/dist/button/index",
  18952. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18953. "van-field": "/wxcomponents/weapp/dist/field/index",
  18954. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18955. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18956. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18957. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  18958. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  18959. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  18960. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  18961. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  18962. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  18963. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  18964. }
  18965. }
  18966. }, {
  18967. "path": "sj_history/edit",
  18968. "style": {
  18969. "navigationBarTitleText": "修改预约",
  18970. "enablePullDownRefresh": true,
  18971. "onReachBottomDistance": 100,
  18972. "app-plus": {
  18973. "bounce": "vertical",
  18974. "titleNView": {
  18975. "buttons": [{
  18976. "text": "",
  18977. "fontSrc": "/static/uni.ttf",
  18978. "fontSize": "22px",
  18979. "color": "#FFFFFF"
  18980. }]
  18981. }
  18982. },
  18983. "component": true,
  18984. "usingComponents": {
  18985. "van-button": "/wxcomponents/weapp/dist/button/index",
  18986. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  18987. "van-field": "/wxcomponents/weapp/dist/field/index",
  18988. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  18989. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  18990. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  18991. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  18992. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  18993. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  18994. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  18995. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  18996. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  18997. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  18998. }
  18999. }
  19000. }, {
  19001. "path": "yy_history/index",
  19002. "style": {
  19003. "navigationBarTitleText": "预约历史",
  19004. "enablePullDownRefresh": true,
  19005. "onReachBottomDistance": 100,
  19006. "app-plus": {
  19007. "bounce": "vertical",
  19008. "titleNView": {
  19009. "buttons": [{
  19010. "text": "",
  19011. "fontSrc": "/static/uni.ttf",
  19012. "fontSize": "22px",
  19013. "color": "#FFFFFF"
  19014. }]
  19015. }
  19016. },
  19017. "component": true,
  19018. "usingComponents": {
  19019. "van-button": "/wxcomponents/weapp/dist/button/index",
  19020. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19021. "van-field": "/wxcomponents/weapp/dist/field/index",
  19022. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19023. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19024. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19025. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19026. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19027. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19028. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19029. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19030. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19031. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19032. }
  19033. }
  19034. }, {
  19035. "path": "sj_history/index",
  19036. "style": {
  19037. "navigationBarTitleText": "预约历史",
  19038. "enablePullDownRefresh": true,
  19039. "onReachBottomDistance": 100,
  19040. "app-plus": {
  19041. "bounce": "vertical",
  19042. "titleNView": {
  19043. "buttons": [{
  19044. "text": "",
  19045. "fontSrc": "/static/uni.ttf",
  19046. "fontSize": "22px",
  19047. "color": "#FFFFFF"
  19048. }]
  19049. }
  19050. },
  19051. "component": true,
  19052. "usingComponents": {
  19053. "van-button": "/wxcomponents/weapp/dist/button/index",
  19054. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19055. "van-field": "/wxcomponents/weapp/dist/field/index",
  19056. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19057. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19058. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19059. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19060. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19061. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19062. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19063. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19064. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19065. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19066. }
  19067. }
  19068. }, {
  19069. "path": "sj_yy/index",
  19070. "style": {
  19071. "navigationBarTitleText": "司机预约",
  19072. "enablePullDownRefresh": true,
  19073. "onReachBottomDistance": 100,
  19074. "app-plus": {
  19075. "bounce": "vertical",
  19076. "titleNView": {
  19077. "buttons": [{
  19078. "text": "",
  19079. "fontSrc": "/static/uni.ttf",
  19080. "fontSize": "22px",
  19081. "color": "#FFFFFF"
  19082. }]
  19083. }
  19084. },
  19085. "component": true,
  19086. "usingComponents": {
  19087. "van-button": "/wxcomponents/weapp/dist/button/index",
  19088. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19089. "van-field": "/wxcomponents/weapp/dist/field/index",
  19090. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19091. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19092. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19093. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19094. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19095. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19096. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19097. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19098. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19099. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19100. }
  19101. }
  19102. }, {
  19103. "path": "qy_yy/index",
  19104. "style": {
  19105. "navigationBarTitleText": "企业预约",
  19106. "enablePullDownRefresh": true,
  19107. "onReachBottomDistance": 100,
  19108. "app-plus": {
  19109. "bounce": "vertical",
  19110. "titleNView": {
  19111. "buttons": [{
  19112. "text": "",
  19113. "fontSrc": "/static/uni.ttf",
  19114. "fontSize": "22px",
  19115. "color": "#FFFFFF"
  19116. }]
  19117. }
  19118. },
  19119. "component": true,
  19120. "usingComponents": {
  19121. "van-button": "/wxcomponents/weapp/dist/button/index",
  19122. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19123. "van-field": "/wxcomponents/weapp/dist/field/index",
  19124. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19125. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19126. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19127. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19128. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19129. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19130. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19131. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19132. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19133. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19134. }
  19135. }
  19136. }, {
  19137. "path": "choosecar/index",
  19138. "style": {
  19139. "navigationBarTitleText": "车型选择",
  19140. "enablePullDownRefresh": true,
  19141. "onReachBottomDistance": 100,
  19142. "app-plus": {
  19143. "bounce": "vertical",
  19144. "titleNView": {
  19145. "buttons": [{
  19146. "text": "",
  19147. "fontSrc": "/static/uni.ttf",
  19148. "fontSize": "22px",
  19149. "color": "#FFFFFF"
  19150. }]
  19151. }
  19152. },
  19153. "component": true,
  19154. "usingComponents": {
  19155. "van-button": "/wxcomponents/weapp/dist/button/index",
  19156. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19157. "van-field": "/wxcomponents/weapp/dist/field/index",
  19158. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19159. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19160. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19161. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19162. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19163. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19164. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19165. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19166. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19167. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19168. }
  19169. }
  19170. }, {
  19171. "path": "phoneRegister/index",
  19172. "style": {
  19173. "navigationBarTitleText": "授权手机号快捷登录",
  19174. "enablePullDownRefresh": true,
  19175. "onReachBottomDistance": 100,
  19176. "app-plus": {
  19177. "bounce": "vertical",
  19178. "titleNView": {
  19179. "buttons": [{
  19180. "text": "",
  19181. "fontSrc": "/static/uni.ttf",
  19182. "fontSize": "22px",
  19183. "color": "#FFFFFF"
  19184. }]
  19185. }
  19186. },
  19187. "component": true,
  19188. "usingComponents": {
  19189. "van-button": "/wxcomponents/weapp/dist/button/index",
  19190. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19191. "van-field": "/wxcomponents/weapp/dist/field/index",
  19192. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19193. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19194. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19195. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19196. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19197. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19198. "van-datetime-picker": "/wxcomponents/weapp/dist/datetime-picker/index",
  19199. "van-uploader": "/wxcomponents/weapp/dist/uploader/index",
  19200. "van-checkbox": "/wxcomponents/weapp/dist/checkbox/index",
  19201. "van-checkbox-group": "/wxcomponents/weapp/dist/checkbox-group/index"
  19202. }
  19203. }
  19204. }, {
  19205. "path": "password/index",
  19206. "style": {
  19207. "navigationBarTitleText": "修改密码",
  19208. "enablePullDownRefresh": true,
  19209. "onReachBottomDistance": 100,
  19210. "app-plus": {
  19211. "bounce": "vertical",
  19212. "titleNView": {
  19213. "buttons": [{
  19214. "text": "",
  19215. "fontSrc": "/static/uni.ttf",
  19216. "fontSize": "22px",
  19217. "color": "#FFFFFF"
  19218. }]
  19219. }
  19220. },
  19221. "component": true,
  19222. "usingComponents": {
  19223. "van-radio": "/wxcomponents/weapp/dist/radio/index",
  19224. "van-radio-group": "/wxcomponents/weapp/dist/radio-group/index",
  19225. "van-empty": "/wxcomponents/weapp/dist/empty/index",
  19226. "van-button": "/wxcomponents/weapp/dist/button/index",
  19227. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19228. "van-field": "/wxcomponents/weapp/dist/field/index",
  19229. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19230. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19231. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19232. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19233. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19234. "van-tabs": "/wxcomponents/weapp/dist/tabs/index"
  19235. }
  19236. }
  19237. }],
  19238. "network": "all"
  19239. }],
  19240. "globalStyle": {
  19241. "pageOrientation": "portrait",
  19242. "navigationBarTitleText": "Hello uniapp",
  19243. "navigationBarTextStyle": "black",
  19244. "navigationBarBackgroundColor": "#FFFFFF",
  19245. "backgroundColor": "#FFFFFF",
  19246. "backgroundColorTop": "#FFFFFF",
  19247. "backgroundColorBottom": "#F4F5F6",
  19248. "usingComponents": {
  19249. "van-empty": "/wxcomponents/weapp/dist/empty/index",
  19250. "van-button": "/wxcomponents/weapp/dist/button/index",
  19251. "van-toast": "/wxcomponents/weapp/dist/toast/index",
  19252. "van-field": "/wxcomponents/weapp/dist/field/index",
  19253. "van-popup": "/wxcomponents/weapp/dist/popup/index",
  19254. "van-picker": "/wxcomponents/weapp/dist/picker/index",
  19255. "van-dialog": "/wxcomponents/weapp/dist/dialog/index",
  19256. "van-icon": "/wxcomponents/weapp/dist/icon/index",
  19257. "van-tab": "/wxcomponents/weapp/dist/tab/index",
  19258. "van-tabs": "/wxcomponents/weapp/dist/tabs/index",
  19259. "van-row": "/wxcomponents/weapp/dist/row/index",
  19260. "van-col": "/wxcomponents/weapp/dist/col/index"
  19261. }
  19262. },
  19263. "tabBar": {
  19264. "color": "#7A7E83",
  19265. "selectedColor": "#2527AA",
  19266. "borderStyle": "black",
  19267. "backgroundColor": "#F8F8F8",
  19268. "list": [{
  19269. "pagePath": "pages/index/index",
  19270. "iconPath": "static/home.png",
  19271. "selectedIconPath": "static/homeselect.png",
  19272. "text": "首页"
  19273. }, {
  19274. "pagePath": "pages/mine/mine",
  19275. "iconPath": "static/mine.png",
  19276. "selectedIconPath": "static/mineselect.png",
  19277. "text": "我的"
  19278. }]
  19279. },
  19280. "window": {
  19281. "backgroundTextStyle": "dark",
  19282. "navigationBarBackgroundColor": "#ffffff",
  19283. "navigationBarTitleText": "Demo",
  19284. "navigationBarTextStyle": "black",
  19285. "enablePullDownRefresh": true
  19286. },
  19287. "condition": {
  19288. "current": 0,
  19289. "list": [{
  19290. "name": "",
  19291. "path": "",
  19292. "query": ""
  19293. }]
  19294. },
  19295. "lazyCodeLoading": "requiredComponents"
  19296. };
  19297. exports.default = _default;
  19298. /***/ }),
  19299. /* 39 */
  19300. /*!****************************************************************************!*\
  19301. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages.json?{"type":"stat"} ***!
  19302. \****************************************************************************/
  19303. /*! no static exports found */
  19304. /***/ (function(module, exports, __webpack_require__) {
  19305. "use strict";
  19306. Object.defineProperty(exports, "__esModule", {
  19307. value: true
  19308. });
  19309. exports.default = void 0;
  19310. var _default = {
  19311. "appid": "__UNI__8C5F0F6"
  19312. };
  19313. exports.default = _default;
  19314. /***/ }),
  19315. /* 40 */
  19316. /*!*****************************************************************************!*\
  19317. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages.json?{"type":"style"} ***!
  19318. \*****************************************************************************/
  19319. /*! no static exports found */
  19320. /***/ (function(module, exports, __webpack_require__) {
  19321. "use strict";
  19322. Object.defineProperty(exports, "__esModule", {
  19323. value: true
  19324. });
  19325. exports.default = void 0;
  19326. var _default = {
  19327. "pages": {
  19328. "pages/chooseIdentity/index": {
  19329. "navigationStyle": "custom",
  19330. "navigationBarTitleText": "选择身份"
  19331. },
  19332. "pages/login/login": {
  19333. "navigationBarTitleText": "登录"
  19334. },
  19335. "pages/index/index": {
  19336. "navigationBarTitleText": "首页"
  19337. },
  19338. "pages/mine/mine": {
  19339. "navigationStyle": "custom",
  19340. "navigationBarTitleText": "我的"
  19341. },
  19342. "pages/subPackages/carmange/add": {
  19343. "navigationBarTitleText": "添加车辆",
  19344. "enablePullDownRefresh": true,
  19345. "onReachBottomDistance": 100,
  19346. "component": true
  19347. },
  19348. "pages/subPackages/carmange/index": {
  19349. "navigationBarTitleText": "车辆管理",
  19350. "enablePullDownRefresh": true,
  19351. "onReachBottomDistance": 100,
  19352. "component": true
  19353. },
  19354. "pages/subPackages/scanCode/index": {
  19355. "navigationBarTitleText": "扫码核验",
  19356. "enablePullDownRefresh": true,
  19357. "onReachBottomDistance": 100,
  19358. "component": true
  19359. },
  19360. "pages/subPackages/noticeList/qy": {
  19361. "navigationBarTitleText": "企业消息",
  19362. "enablePullDownRefresh": true,
  19363. "onReachBottomDistance": 100,
  19364. "component": true
  19365. },
  19366. "pages/subPackages/noticeList/sj": {
  19367. "navigationBarTitleText": "司机消息",
  19368. "enablePullDownRefresh": true,
  19369. "onReachBottomDistance": 100,
  19370. "component": true
  19371. },
  19372. "pages/subPackages/yy_history/code": {
  19373. "navigationBarTitleText": "预约码",
  19374. "enablePullDownRefresh": true,
  19375. "onReachBottomDistance": 100,
  19376. "component": true
  19377. },
  19378. "pages/subPackages/yy_history/edit": {
  19379. "navigationBarTitleText": "修改预约",
  19380. "enablePullDownRefresh": true,
  19381. "onReachBottomDistance": 100,
  19382. "component": true
  19383. },
  19384. "pages/subPackages/sj_history/detail": {
  19385. "navigationBarTitleText": "司机预约详情",
  19386. "enablePullDownRefresh": true,
  19387. "onReachBottomDistance": 100,
  19388. "component": true
  19389. },
  19390. "pages/subPackages/sj_history/edit": {
  19391. "navigationBarTitleText": "修改预约",
  19392. "enablePullDownRefresh": true,
  19393. "onReachBottomDistance": 100,
  19394. "component": true
  19395. },
  19396. "pages/subPackages/yy_history/index": {
  19397. "navigationBarTitleText": "预约历史",
  19398. "enablePullDownRefresh": true,
  19399. "onReachBottomDistance": 100,
  19400. "component": true
  19401. },
  19402. "pages/subPackages/sj_history/index": {
  19403. "navigationBarTitleText": "预约历史",
  19404. "enablePullDownRefresh": true,
  19405. "onReachBottomDistance": 100,
  19406. "component": true
  19407. },
  19408. "pages/subPackages/sj_yy/index": {
  19409. "navigationBarTitleText": "司机预约",
  19410. "enablePullDownRefresh": true,
  19411. "onReachBottomDistance": 100,
  19412. "component": true
  19413. },
  19414. "pages/subPackages/qy_yy/index": {
  19415. "navigationBarTitleText": "企业预约",
  19416. "enablePullDownRefresh": true,
  19417. "onReachBottomDistance": 100,
  19418. "component": true
  19419. },
  19420. "pages/subPackages/choosecar/index": {
  19421. "navigationBarTitleText": "车型选择",
  19422. "enablePullDownRefresh": true,
  19423. "onReachBottomDistance": 100,
  19424. "component": true
  19425. },
  19426. "pages/subPackages/phoneRegister/index": {
  19427. "navigationBarTitleText": "授权手机号快捷登录",
  19428. "enablePullDownRefresh": true,
  19429. "onReachBottomDistance": 100,
  19430. "component": true
  19431. },
  19432. "pages/subPackages/password/index": {
  19433. "navigationBarTitleText": "修改密码",
  19434. "enablePullDownRefresh": true,
  19435. "onReachBottomDistance": 100,
  19436. "component": true
  19437. }
  19438. },
  19439. "globalStyle": {
  19440. "pageOrientation": "portrait",
  19441. "navigationBarTitleText": "Hello uniapp",
  19442. "navigationBarTextStyle": "black",
  19443. "navigationBarBackgroundColor": "#FFFFFF",
  19444. "backgroundColor": "#FFFFFF",
  19445. "backgroundColorTop": "#FFFFFF",
  19446. "backgroundColorBottom": "#F4F5F6"
  19447. }
  19448. };
  19449. exports.default = _default;
  19450. /***/ }),
  19451. /* 41 */,
  19452. /* 42 */,
  19453. /* 43 */,
  19454. /* 44 */,
  19455. /* 45 */,
  19456. /* 46 */
  19457. /*!**********************************************************************************************************!*\
  19458. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js ***!
  19459. \**********************************************************************************************************/
  19460. /*! exports provided: default */
  19461. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  19462. "use strict";
  19463. __webpack_require__.r(__webpack_exports__);
  19464. /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return normalizeComponent; });
  19465. /* globals __VUE_SSR_CONTEXT__ */
  19466. // IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
  19467. // This module is a runtime utility for cleaner component module output and will
  19468. // be included in the final webpack user bundle.
  19469. function normalizeComponent (
  19470. scriptExports,
  19471. render,
  19472. staticRenderFns,
  19473. functionalTemplate,
  19474. injectStyles,
  19475. scopeId,
  19476. moduleIdentifier, /* server only */
  19477. shadowMode, /* vue-cli only */
  19478. components, // fixed by xxxxxx auto components
  19479. renderjs // fixed by xxxxxx renderjs
  19480. ) {
  19481. // Vue.extend constructor export interop
  19482. var options = typeof scriptExports === 'function'
  19483. ? scriptExports.options
  19484. : scriptExports
  19485. // fixed by xxxxxx auto components
  19486. if (components) {
  19487. if (!options.components) {
  19488. options.components = {}
  19489. }
  19490. var hasOwn = Object.prototype.hasOwnProperty
  19491. for (var name in components) {
  19492. if (hasOwn.call(components, name) && !hasOwn.call(options.components, name)) {
  19493. options.components[name] = components[name]
  19494. }
  19495. }
  19496. }
  19497. // fixed by xxxxxx renderjs
  19498. if (renderjs) {
  19499. if(typeof renderjs.beforeCreate === 'function'){
  19500. renderjs.beforeCreate = [renderjs.beforeCreate]
  19501. }
  19502. (renderjs.beforeCreate || (renderjs.beforeCreate = [])).unshift(function() {
  19503. this[renderjs.__module] = this
  19504. });
  19505. (options.mixins || (options.mixins = [])).push(renderjs)
  19506. }
  19507. // render functions
  19508. if (render) {
  19509. options.render = render
  19510. options.staticRenderFns = staticRenderFns
  19511. options._compiled = true
  19512. }
  19513. // functional template
  19514. if (functionalTemplate) {
  19515. options.functional = true
  19516. }
  19517. // scopedId
  19518. if (scopeId) {
  19519. options._scopeId = 'data-v-' + scopeId
  19520. }
  19521. var hook
  19522. if (moduleIdentifier) { // server build
  19523. hook = function (context) {
  19524. // 2.3 injection
  19525. context =
  19526. context || // cached call
  19527. (this.$vnode && this.$vnode.ssrContext) || // stateful
  19528. (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
  19529. // 2.2 with runInNewContext: true
  19530. if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
  19531. context = __VUE_SSR_CONTEXT__
  19532. }
  19533. // inject component styles
  19534. if (injectStyles) {
  19535. injectStyles.call(this, context)
  19536. }
  19537. // register component module identifier for async chunk inferrence
  19538. if (context && context._registeredComponents) {
  19539. context._registeredComponents.add(moduleIdentifier)
  19540. }
  19541. }
  19542. // used by ssr in case component is cached and beforeCreate
  19543. // never gets called
  19544. options._ssrRegister = hook
  19545. } else if (injectStyles) {
  19546. hook = shadowMode
  19547. ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
  19548. : injectStyles
  19549. }
  19550. if (hook) {
  19551. if (options.functional) {
  19552. // for template-only hot-reload because in that case the render fn doesn't
  19553. // go through the normalizer
  19554. options._injectStyles = hook
  19555. // register for functioal component in vue file
  19556. var originalRender = options.render
  19557. options.render = function renderWithStyleInjection (h, context) {
  19558. hook.call(context)
  19559. return originalRender(h, context)
  19560. }
  19561. } else {
  19562. // inject component registration as beforeCreate hook
  19563. var existing = options.beforeCreate
  19564. options.beforeCreate = existing
  19565. ? [].concat(existing, hook)
  19566. : [hook]
  19567. }
  19568. }
  19569. return {
  19570. exports: scriptExports,
  19571. options: options
  19572. }
  19573. }
  19574. /***/ }),
  19575. /* 47 */
  19576. /*!****************************************************************!*\
  19577. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/store/index.js ***!
  19578. \****************************************************************/
  19579. /*! no static exports found */
  19580. /***/ (function(module, exports, __webpack_require__) {
  19581. "use strict";
  19582. /* WEBPACK VAR INJECTION */(function(uni) {
  19583. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  19584. Object.defineProperty(exports, "__esModule", {
  19585. value: true
  19586. });
  19587. exports.default = void 0;
  19588. var _vue = _interopRequireDefault(__webpack_require__(/*! vue */ 25));
  19589. var _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ 48));
  19590. _vue.default.use(_vuex.default);
  19591. var store = new _vuex.default.Store({
  19592. state: {
  19593. userInfo: null,
  19594. token: null,
  19595. isRefresh: true,
  19596. kickbackData: []
  19597. },
  19598. getters: {
  19599. kickbackDataLen: function kickbackDataLen(state) {
  19600. return state.kickbackData.length;
  19601. }
  19602. },
  19603. mutations: {
  19604. setData: function setData(state, _ref) {
  19605. var payload = _ref.payload;
  19606. for (var v in payload) {
  19607. state[v] = payload[v];
  19608. uni.setStorageSync(v, payload[v]);
  19609. }
  19610. }
  19611. },
  19612. actions: {}
  19613. });
  19614. var _default = store;
  19615. exports.default = _default;
  19616. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  19617. /***/ }),
  19618. /* 48 */
  19619. /*!**************************************************************************************!*\
  19620. !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
  19621. \**************************************************************************************/
  19622. /*! no static exports found */
  19623. /***/ (function(module, exports, __webpack_require__) {
  19624. "use strict";
  19625. /* WEBPACK VAR INJECTION */(function(global) {/*!
  19626. * vuex v3.6.2
  19627. * (c) 2021 Evan You
  19628. * @license MIT
  19629. */
  19630. function applyMixin (Vue) {
  19631. var version = Number(Vue.version.split('.')[0]);
  19632. if (version >= 2) {
  19633. Vue.mixin({ beforeCreate: vuexInit });
  19634. } else {
  19635. // override init and inject vuex init procedure
  19636. // for 1.x backwards compatibility.
  19637. var _init = Vue.prototype._init;
  19638. Vue.prototype._init = function (options) {
  19639. if ( options === void 0 ) options = {};
  19640. options.init = options.init
  19641. ? [vuexInit].concat(options.init)
  19642. : vuexInit;
  19643. _init.call(this, options);
  19644. };
  19645. }
  19646. /**
  19647. * Vuex init hook, injected into each instances init hooks list.
  19648. */
  19649. function vuexInit () {
  19650. var options = this.$options;
  19651. // store injection
  19652. if (options.store) {
  19653. this.$store = typeof options.store === 'function'
  19654. ? options.store()
  19655. : options.store;
  19656. } else if (options.parent && options.parent.$store) {
  19657. this.$store = options.parent.$store;
  19658. }
  19659. }
  19660. }
  19661. var target = typeof window !== 'undefined'
  19662. ? window
  19663. : typeof global !== 'undefined'
  19664. ? global
  19665. : {};
  19666. var devtoolHook = target.__VUE_DEVTOOLS_GLOBAL_HOOK__;
  19667. function devtoolPlugin (store) {
  19668. if (!devtoolHook) { return }
  19669. store._devtoolHook = devtoolHook;
  19670. devtoolHook.emit('vuex:init', store);
  19671. devtoolHook.on('vuex:travel-to-state', function (targetState) {
  19672. store.replaceState(targetState);
  19673. });
  19674. store.subscribe(function (mutation, state) {
  19675. devtoolHook.emit('vuex:mutation', mutation, state);
  19676. }, { prepend: true });
  19677. store.subscribeAction(function (action, state) {
  19678. devtoolHook.emit('vuex:action', action, state);
  19679. }, { prepend: true });
  19680. }
  19681. /**
  19682. * Get the first item that pass the test
  19683. * by second argument function
  19684. *
  19685. * @param {Array} list
  19686. * @param {Function} f
  19687. * @return {*}
  19688. */
  19689. function find (list, f) {
  19690. return list.filter(f)[0]
  19691. }
  19692. /**
  19693. * Deep copy the given object considering circular structure.
  19694. * This function caches all nested objects and its copies.
  19695. * If it detects circular structure, use cached copy to avoid infinite loop.
  19696. *
  19697. * @param {*} obj
  19698. * @param {Array<Object>} cache
  19699. * @return {*}
  19700. */
  19701. function deepCopy (obj, cache) {
  19702. if ( cache === void 0 ) cache = [];
  19703. // just return if obj is immutable value
  19704. if (obj === null || typeof obj !== 'object') {
  19705. return obj
  19706. }
  19707. // if obj is hit, it is in circular structure
  19708. var hit = find(cache, function (c) { return c.original === obj; });
  19709. if (hit) {
  19710. return hit.copy
  19711. }
  19712. var copy = Array.isArray(obj) ? [] : {};
  19713. // put the copy into cache at first
  19714. // because we want to refer it in recursive deepCopy
  19715. cache.push({
  19716. original: obj,
  19717. copy: copy
  19718. });
  19719. Object.keys(obj).forEach(function (key) {
  19720. copy[key] = deepCopy(obj[key], cache);
  19721. });
  19722. return copy
  19723. }
  19724. /**
  19725. * forEach for object
  19726. */
  19727. function forEachValue (obj, fn) {
  19728. Object.keys(obj).forEach(function (key) { return fn(obj[key], key); });
  19729. }
  19730. function isObject (obj) {
  19731. return obj !== null && typeof obj === 'object'
  19732. }
  19733. function isPromise (val) {
  19734. return val && typeof val.then === 'function'
  19735. }
  19736. function assert (condition, msg) {
  19737. if (!condition) { throw new Error(("[vuex] " + msg)) }
  19738. }
  19739. function partial (fn, arg) {
  19740. return function () {
  19741. return fn(arg)
  19742. }
  19743. }
  19744. // Base data struct for store's module, package with some attribute and method
  19745. var Module = function Module (rawModule, runtime) {
  19746. this.runtime = runtime;
  19747. // Store some children item
  19748. this._children = Object.create(null);
  19749. // Store the origin module object which passed by programmer
  19750. this._rawModule = rawModule;
  19751. var rawState = rawModule.state;
  19752. // Store the origin module's state
  19753. this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
  19754. };
  19755. var prototypeAccessors = { namespaced: { configurable: true } };
  19756. prototypeAccessors.namespaced.get = function () {
  19757. return !!this._rawModule.namespaced
  19758. };
  19759. Module.prototype.addChild = function addChild (key, module) {
  19760. this._children[key] = module;
  19761. };
  19762. Module.prototype.removeChild = function removeChild (key) {
  19763. delete this._children[key];
  19764. };
  19765. Module.prototype.getChild = function getChild (key) {
  19766. return this._children[key]
  19767. };
  19768. Module.prototype.hasChild = function hasChild (key) {
  19769. return key in this._children
  19770. };
  19771. Module.prototype.update = function update (rawModule) {
  19772. this._rawModule.namespaced = rawModule.namespaced;
  19773. if (rawModule.actions) {
  19774. this._rawModule.actions = rawModule.actions;
  19775. }
  19776. if (rawModule.mutations) {
  19777. this._rawModule.mutations = rawModule.mutations;
  19778. }
  19779. if (rawModule.getters) {
  19780. this._rawModule.getters = rawModule.getters;
  19781. }
  19782. };
  19783. Module.prototype.forEachChild = function forEachChild (fn) {
  19784. forEachValue(this._children, fn);
  19785. };
  19786. Module.prototype.forEachGetter = function forEachGetter (fn) {
  19787. if (this._rawModule.getters) {
  19788. forEachValue(this._rawModule.getters, fn);
  19789. }
  19790. };
  19791. Module.prototype.forEachAction = function forEachAction (fn) {
  19792. if (this._rawModule.actions) {
  19793. forEachValue(this._rawModule.actions, fn);
  19794. }
  19795. };
  19796. Module.prototype.forEachMutation = function forEachMutation (fn) {
  19797. if (this._rawModule.mutations) {
  19798. forEachValue(this._rawModule.mutations, fn);
  19799. }
  19800. };
  19801. Object.defineProperties( Module.prototype, prototypeAccessors );
  19802. var ModuleCollection = function ModuleCollection (rawRootModule) {
  19803. // register root module (Vuex.Store options)
  19804. this.register([], rawRootModule, false);
  19805. };
  19806. ModuleCollection.prototype.get = function get (path) {
  19807. return path.reduce(function (module, key) {
  19808. return module.getChild(key)
  19809. }, this.root)
  19810. };
  19811. ModuleCollection.prototype.getNamespace = function getNamespace (path) {
  19812. var module = this.root;
  19813. return path.reduce(function (namespace, key) {
  19814. module = module.getChild(key);
  19815. return namespace + (module.namespaced ? key + '/' : '')
  19816. }, '')
  19817. };
  19818. ModuleCollection.prototype.update = function update$1 (rawRootModule) {
  19819. update([], this.root, rawRootModule);
  19820. };
  19821. ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
  19822. var this$1 = this;
  19823. if ( runtime === void 0 ) runtime = true;
  19824. if ((true)) {
  19825. assertRawModule(path, rawModule);
  19826. }
  19827. var newModule = new Module(rawModule, runtime);
  19828. if (path.length === 0) {
  19829. this.root = newModule;
  19830. } else {
  19831. var parent = this.get(path.slice(0, -1));
  19832. parent.addChild(path[path.length - 1], newModule);
  19833. }
  19834. // register nested modules
  19835. if (rawModule.modules) {
  19836. forEachValue(rawModule.modules, function (rawChildModule, key) {
  19837. this$1.register(path.concat(key), rawChildModule, runtime);
  19838. });
  19839. }
  19840. };
  19841. ModuleCollection.prototype.unregister = function unregister (path) {
  19842. var parent = this.get(path.slice(0, -1));
  19843. var key = path[path.length - 1];
  19844. var child = parent.getChild(key);
  19845. if (!child) {
  19846. if ((true)) {
  19847. console.warn(
  19848. "[vuex] trying to unregister module '" + key + "', which is " +
  19849. "not registered"
  19850. );
  19851. }
  19852. return
  19853. }
  19854. if (!child.runtime) {
  19855. return
  19856. }
  19857. parent.removeChild(key);
  19858. };
  19859. ModuleCollection.prototype.isRegistered = function isRegistered (path) {
  19860. var parent = this.get(path.slice(0, -1));
  19861. var key = path[path.length - 1];
  19862. if (parent) {
  19863. return parent.hasChild(key)
  19864. }
  19865. return false
  19866. };
  19867. function update (path, targetModule, newModule) {
  19868. if ((true)) {
  19869. assertRawModule(path, newModule);
  19870. }
  19871. // update target module
  19872. targetModule.update(newModule);
  19873. // update nested modules
  19874. if (newModule.modules) {
  19875. for (var key in newModule.modules) {
  19876. if (!targetModule.getChild(key)) {
  19877. if ((true)) {
  19878. console.warn(
  19879. "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
  19880. 'manual reload is needed'
  19881. );
  19882. }
  19883. return
  19884. }
  19885. update(
  19886. path.concat(key),
  19887. targetModule.getChild(key),
  19888. newModule.modules[key]
  19889. );
  19890. }
  19891. }
  19892. }
  19893. var functionAssert = {
  19894. assert: function (value) { return typeof value === 'function'; },
  19895. expected: 'function'
  19896. };
  19897. var objectAssert = {
  19898. assert: function (value) { return typeof value === 'function' ||
  19899. (typeof value === 'object' && typeof value.handler === 'function'); },
  19900. expected: 'function or object with "handler" function'
  19901. };
  19902. var assertTypes = {
  19903. getters: functionAssert,
  19904. mutations: functionAssert,
  19905. actions: objectAssert
  19906. };
  19907. function assertRawModule (path, rawModule) {
  19908. Object.keys(assertTypes).forEach(function (key) {
  19909. if (!rawModule[key]) { return }
  19910. var assertOptions = assertTypes[key];
  19911. forEachValue(rawModule[key], function (value, type) {
  19912. assert(
  19913. assertOptions.assert(value),
  19914. makeAssertionMessage(path, key, type, value, assertOptions.expected)
  19915. );
  19916. });
  19917. });
  19918. }
  19919. function makeAssertionMessage (path, key, type, value, expected) {
  19920. var buf = key + " should be " + expected + " but \"" + key + "." + type + "\"";
  19921. if (path.length > 0) {
  19922. buf += " in module \"" + (path.join('.')) + "\"";
  19923. }
  19924. buf += " is " + (JSON.stringify(value)) + ".";
  19925. return buf
  19926. }
  19927. var Vue; // bind on install
  19928. var Store = function Store (options) {
  19929. var this$1 = this;
  19930. if ( options === void 0 ) options = {};
  19931. // Auto install if it is not done yet and `window` has `Vue`.
  19932. // To allow users to avoid auto-installation in some cases,
  19933. // this code should be placed here. See #731
  19934. if (!Vue && typeof window !== 'undefined' && window.Vue) {
  19935. install(window.Vue);
  19936. }
  19937. if ((true)) {
  19938. assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
  19939. assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
  19940. assert(this instanceof Store, "store must be called with the new operator.");
  19941. }
  19942. var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
  19943. var strict = options.strict; if ( strict === void 0 ) strict = false;
  19944. // store internal state
  19945. this._committing = false;
  19946. this._actions = Object.create(null);
  19947. this._actionSubscribers = [];
  19948. this._mutations = Object.create(null);
  19949. this._wrappedGetters = Object.create(null);
  19950. this._modules = new ModuleCollection(options);
  19951. this._modulesNamespaceMap = Object.create(null);
  19952. this._subscribers = [];
  19953. this._watcherVM = new Vue();
  19954. this._makeLocalGettersCache = Object.create(null);
  19955. // bind commit and dispatch to self
  19956. var store = this;
  19957. var ref = this;
  19958. var dispatch = ref.dispatch;
  19959. var commit = ref.commit;
  19960. this.dispatch = function boundDispatch (type, payload) {
  19961. return dispatch.call(store, type, payload)
  19962. };
  19963. this.commit = function boundCommit (type, payload, options) {
  19964. return commit.call(store, type, payload, options)
  19965. };
  19966. // strict mode
  19967. this.strict = strict;
  19968. var state = this._modules.root.state;
  19969. // init root module.
  19970. // this also recursively registers all sub-modules
  19971. // and collects all module getters inside this._wrappedGetters
  19972. installModule(this, state, [], this._modules.root);
  19973. // initialize the store vm, which is responsible for the reactivity
  19974. // (also registers _wrappedGetters as computed properties)
  19975. resetStoreVM(this, state);
  19976. // apply plugins
  19977. plugins.forEach(function (plugin) { return plugin(this$1); });
  19978. var useDevtools = options.devtools !== undefined ? options.devtools : Vue.config.devtools;
  19979. if (useDevtools) {
  19980. devtoolPlugin(this);
  19981. }
  19982. };
  19983. var prototypeAccessors$1 = { state: { configurable: true } };
  19984. prototypeAccessors$1.state.get = function () {
  19985. return this._vm._data.$$state
  19986. };
  19987. prototypeAccessors$1.state.set = function (v) {
  19988. if ((true)) {
  19989. assert(false, "use store.replaceState() to explicit replace store state.");
  19990. }
  19991. };
  19992. Store.prototype.commit = function commit (_type, _payload, _options) {
  19993. var this$1 = this;
  19994. // check object-style commit
  19995. var ref = unifyObjectStyle(_type, _payload, _options);
  19996. var type = ref.type;
  19997. var payload = ref.payload;
  19998. var options = ref.options;
  19999. var mutation = { type: type, payload: payload };
  20000. var entry = this._mutations[type];
  20001. if (!entry) {
  20002. if ((true)) {
  20003. console.error(("[vuex] unknown mutation type: " + type));
  20004. }
  20005. return
  20006. }
  20007. this._withCommit(function () {
  20008. entry.forEach(function commitIterator (handler) {
  20009. handler(payload);
  20010. });
  20011. });
  20012. this._subscribers
  20013. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  20014. .forEach(function (sub) { return sub(mutation, this$1.state); });
  20015. if (
  20016. ( true) &&
  20017. options && options.silent
  20018. ) {
  20019. console.warn(
  20020. "[vuex] mutation type: " + type + ". Silent option has been removed. " +
  20021. 'Use the filter functionality in the vue-devtools'
  20022. );
  20023. }
  20024. };
  20025. Store.prototype.dispatch = function dispatch (_type, _payload) {
  20026. var this$1 = this;
  20027. // check object-style dispatch
  20028. var ref = unifyObjectStyle(_type, _payload);
  20029. var type = ref.type;
  20030. var payload = ref.payload;
  20031. var action = { type: type, payload: payload };
  20032. var entry = this._actions[type];
  20033. if (!entry) {
  20034. if ((true)) {
  20035. console.error(("[vuex] unknown action type: " + type));
  20036. }
  20037. return
  20038. }
  20039. try {
  20040. this._actionSubscribers
  20041. .slice() // shallow copy to prevent iterator invalidation if subscriber synchronously calls unsubscribe
  20042. .filter(function (sub) { return sub.before; })
  20043. .forEach(function (sub) { return sub.before(action, this$1.state); });
  20044. } catch (e) {
  20045. if ((true)) {
  20046. console.warn("[vuex] error in before action subscribers: ");
  20047. console.error(e);
  20048. }
  20049. }
  20050. var result = entry.length > 1
  20051. ? Promise.all(entry.map(function (handler) { return handler(payload); }))
  20052. : entry[0](payload);
  20053. return new Promise(function (resolve, reject) {
  20054. result.then(function (res) {
  20055. try {
  20056. this$1._actionSubscribers
  20057. .filter(function (sub) { return sub.after; })
  20058. .forEach(function (sub) { return sub.after(action, this$1.state); });
  20059. } catch (e) {
  20060. if ((true)) {
  20061. console.warn("[vuex] error in after action subscribers: ");
  20062. console.error(e);
  20063. }
  20064. }
  20065. resolve(res);
  20066. }, function (error) {
  20067. try {
  20068. this$1._actionSubscribers
  20069. .filter(function (sub) { return sub.error; })
  20070. .forEach(function (sub) { return sub.error(action, this$1.state, error); });
  20071. } catch (e) {
  20072. if ((true)) {
  20073. console.warn("[vuex] error in error action subscribers: ");
  20074. console.error(e);
  20075. }
  20076. }
  20077. reject(error);
  20078. });
  20079. })
  20080. };
  20081. Store.prototype.subscribe = function subscribe (fn, options) {
  20082. return genericSubscribe(fn, this._subscribers, options)
  20083. };
  20084. Store.prototype.subscribeAction = function subscribeAction (fn, options) {
  20085. var subs = typeof fn === 'function' ? { before: fn } : fn;
  20086. return genericSubscribe(subs, this._actionSubscribers, options)
  20087. };
  20088. Store.prototype.watch = function watch (getter, cb, options) {
  20089. var this$1 = this;
  20090. if ((true)) {
  20091. assert(typeof getter === 'function', "store.watch only accepts a function.");
  20092. }
  20093. return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
  20094. };
  20095. Store.prototype.replaceState = function replaceState (state) {
  20096. var this$1 = this;
  20097. this._withCommit(function () {
  20098. this$1._vm._data.$$state = state;
  20099. });
  20100. };
  20101. Store.prototype.registerModule = function registerModule (path, rawModule, options) {
  20102. if ( options === void 0 ) options = {};
  20103. if (typeof path === 'string') { path = [path]; }
  20104. if ((true)) {
  20105. assert(Array.isArray(path), "module path must be a string or an Array.");
  20106. assert(path.length > 0, 'cannot register the root module by using registerModule.');
  20107. }
  20108. this._modules.register(path, rawModule);
  20109. installModule(this, this.state, path, this._modules.get(path), options.preserveState);
  20110. // reset store to update getters...
  20111. resetStoreVM(this, this.state);
  20112. };
  20113. Store.prototype.unregisterModule = function unregisterModule (path) {
  20114. var this$1 = this;
  20115. if (typeof path === 'string') { path = [path]; }
  20116. if ((true)) {
  20117. assert(Array.isArray(path), "module path must be a string or an Array.");
  20118. }
  20119. this._modules.unregister(path);
  20120. this._withCommit(function () {
  20121. var parentState = getNestedState(this$1.state, path.slice(0, -1));
  20122. Vue.delete(parentState, path[path.length - 1]);
  20123. });
  20124. resetStore(this);
  20125. };
  20126. Store.prototype.hasModule = function hasModule (path) {
  20127. if (typeof path === 'string') { path = [path]; }
  20128. if ((true)) {
  20129. assert(Array.isArray(path), "module path must be a string or an Array.");
  20130. }
  20131. return this._modules.isRegistered(path)
  20132. };
  20133. Store.prototype[[104,111,116,85,112,100,97,116,101].map(function (item) {return String.fromCharCode(item)}).join('')] = function (newOptions) {
  20134. this._modules.update(newOptions);
  20135. resetStore(this, true);
  20136. };
  20137. Store.prototype._withCommit = function _withCommit (fn) {
  20138. var committing = this._committing;
  20139. this._committing = true;
  20140. fn();
  20141. this._committing = committing;
  20142. };
  20143. Object.defineProperties( Store.prototype, prototypeAccessors$1 );
  20144. function genericSubscribe (fn, subs, options) {
  20145. if (subs.indexOf(fn) < 0) {
  20146. options && options.prepend
  20147. ? subs.unshift(fn)
  20148. : subs.push(fn);
  20149. }
  20150. return function () {
  20151. var i = subs.indexOf(fn);
  20152. if (i > -1) {
  20153. subs.splice(i, 1);
  20154. }
  20155. }
  20156. }
  20157. function resetStore (store, hot) {
  20158. store._actions = Object.create(null);
  20159. store._mutations = Object.create(null);
  20160. store._wrappedGetters = Object.create(null);
  20161. store._modulesNamespaceMap = Object.create(null);
  20162. var state = store.state;
  20163. // init all modules
  20164. installModule(store, state, [], store._modules.root, true);
  20165. // reset vm
  20166. resetStoreVM(store, state, hot);
  20167. }
  20168. function resetStoreVM (store, state, hot) {
  20169. var oldVm = store._vm;
  20170. // bind store public getters
  20171. store.getters = {};
  20172. // reset local getters cache
  20173. store._makeLocalGettersCache = Object.create(null);
  20174. var wrappedGetters = store._wrappedGetters;
  20175. var computed = {};
  20176. forEachValue(wrappedGetters, function (fn, key) {
  20177. // use computed to leverage its lazy-caching mechanism
  20178. // direct inline function use will lead to closure preserving oldVm.
  20179. // using partial to return function with only arguments preserved in closure environment.
  20180. computed[key] = partial(fn, store);
  20181. Object.defineProperty(store.getters, key, {
  20182. get: function () { return store._vm[key]; },
  20183. enumerable: true // for local getters
  20184. });
  20185. });
  20186. // use a Vue instance to store the state tree
  20187. // suppress warnings just in case the user has added
  20188. // some funky global mixins
  20189. var silent = Vue.config.silent;
  20190. Vue.config.silent = true;
  20191. store._vm = new Vue({
  20192. data: {
  20193. $$state: state
  20194. },
  20195. computed: computed
  20196. });
  20197. Vue.config.silent = silent;
  20198. // enable strict mode for new vm
  20199. if (store.strict) {
  20200. enableStrictMode(store);
  20201. }
  20202. if (oldVm) {
  20203. if (hot) {
  20204. // dispatch changes in all subscribed watchers
  20205. // to force getter re-evaluation for hot reloading.
  20206. store._withCommit(function () {
  20207. oldVm._data.$$state = null;
  20208. });
  20209. }
  20210. Vue.nextTick(function () { return oldVm.$destroy(); });
  20211. }
  20212. }
  20213. function installModule (store, rootState, path, module, hot) {
  20214. var isRoot = !path.length;
  20215. var namespace = store._modules.getNamespace(path);
  20216. // register in namespace map
  20217. if (module.namespaced) {
  20218. if (store._modulesNamespaceMap[namespace] && ("development" !== 'production')) {
  20219. console.error(("[vuex] duplicate namespace " + namespace + " for the namespaced module " + (path.join('/'))));
  20220. }
  20221. store._modulesNamespaceMap[namespace] = module;
  20222. }
  20223. // set state
  20224. if (!isRoot && !hot) {
  20225. var parentState = getNestedState(rootState, path.slice(0, -1));
  20226. var moduleName = path[path.length - 1];
  20227. store._withCommit(function () {
  20228. if ((true)) {
  20229. if (moduleName in parentState) {
  20230. console.warn(
  20231. ("[vuex] state field \"" + moduleName + "\" was overridden by a module with the same name at \"" + (path.join('.')) + "\"")
  20232. );
  20233. }
  20234. }
  20235. Vue.set(parentState, moduleName, module.state);
  20236. });
  20237. }
  20238. var local = module.context = makeLocalContext(store, namespace, path);
  20239. module.forEachMutation(function (mutation, key) {
  20240. var namespacedType = namespace + key;
  20241. registerMutation(store, namespacedType, mutation, local);
  20242. });
  20243. module.forEachAction(function (action, key) {
  20244. var type = action.root ? key : namespace + key;
  20245. var handler = action.handler || action;
  20246. registerAction(store, type, handler, local);
  20247. });
  20248. module.forEachGetter(function (getter, key) {
  20249. var namespacedType = namespace + key;
  20250. registerGetter(store, namespacedType, getter, local);
  20251. });
  20252. module.forEachChild(function (child, key) {
  20253. installModule(store, rootState, path.concat(key), child, hot);
  20254. });
  20255. }
  20256. /**
  20257. * make localized dispatch, commit, getters and state
  20258. * if there is no namespace, just use root ones
  20259. */
  20260. function makeLocalContext (store, namespace, path) {
  20261. var noNamespace = namespace === '';
  20262. var local = {
  20263. dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) {
  20264. var args = unifyObjectStyle(_type, _payload, _options);
  20265. var payload = args.payload;
  20266. var options = args.options;
  20267. var type = args.type;
  20268. if (!options || !options.root) {
  20269. type = namespace + type;
  20270. if (( true) && !store._actions[type]) {
  20271. console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
  20272. return
  20273. }
  20274. }
  20275. return store.dispatch(type, payload)
  20276. },
  20277. commit: noNamespace ? store.commit : function (_type, _payload, _options) {
  20278. var args = unifyObjectStyle(_type, _payload, _options);
  20279. var payload = args.payload;
  20280. var options = args.options;
  20281. var type = args.type;
  20282. if (!options || !options.root) {
  20283. type = namespace + type;
  20284. if (( true) && !store._mutations[type]) {
  20285. console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
  20286. return
  20287. }
  20288. }
  20289. store.commit(type, payload, options);
  20290. }
  20291. };
  20292. // getters and state object must be gotten lazily
  20293. // because they will be changed by vm update
  20294. Object.defineProperties(local, {
  20295. getters: {
  20296. get: noNamespace
  20297. ? function () { return store.getters; }
  20298. : function () { return makeLocalGetters(store, namespace); }
  20299. },
  20300. state: {
  20301. get: function () { return getNestedState(store.state, path); }
  20302. }
  20303. });
  20304. return local
  20305. }
  20306. function makeLocalGetters (store, namespace) {
  20307. if (!store._makeLocalGettersCache[namespace]) {
  20308. var gettersProxy = {};
  20309. var splitPos = namespace.length;
  20310. Object.keys(store.getters).forEach(function (type) {
  20311. // skip if the target getter is not match this namespace
  20312. if (type.slice(0, splitPos) !== namespace) { return }
  20313. // extract local getter type
  20314. var localType = type.slice(splitPos);
  20315. // Add a port to the getters proxy.
  20316. // Define as getter property because
  20317. // we do not want to evaluate the getters in this time.
  20318. Object.defineProperty(gettersProxy, localType, {
  20319. get: function () { return store.getters[type]; },
  20320. enumerable: true
  20321. });
  20322. });
  20323. store._makeLocalGettersCache[namespace] = gettersProxy;
  20324. }
  20325. return store._makeLocalGettersCache[namespace]
  20326. }
  20327. function registerMutation (store, type, handler, local) {
  20328. var entry = store._mutations[type] || (store._mutations[type] = []);
  20329. entry.push(function wrappedMutationHandler (payload) {
  20330. handler.call(store, local.state, payload);
  20331. });
  20332. }
  20333. function registerAction (store, type, handler, local) {
  20334. var entry = store._actions[type] || (store._actions[type] = []);
  20335. entry.push(function wrappedActionHandler (payload) {
  20336. var res = handler.call(store, {
  20337. dispatch: local.dispatch,
  20338. commit: local.commit,
  20339. getters: local.getters,
  20340. state: local.state,
  20341. rootGetters: store.getters,
  20342. rootState: store.state
  20343. }, payload);
  20344. if (!isPromise(res)) {
  20345. res = Promise.resolve(res);
  20346. }
  20347. if (store._devtoolHook) {
  20348. return res.catch(function (err) {
  20349. store._devtoolHook.emit('vuex:error', err);
  20350. throw err
  20351. })
  20352. } else {
  20353. return res
  20354. }
  20355. });
  20356. }
  20357. function registerGetter (store, type, rawGetter, local) {
  20358. if (store._wrappedGetters[type]) {
  20359. if ((true)) {
  20360. console.error(("[vuex] duplicate getter key: " + type));
  20361. }
  20362. return
  20363. }
  20364. store._wrappedGetters[type] = function wrappedGetter (store) {
  20365. return rawGetter(
  20366. local.state, // local state
  20367. local.getters, // local getters
  20368. store.state, // root state
  20369. store.getters // root getters
  20370. )
  20371. };
  20372. }
  20373. function enableStrictMode (store) {
  20374. store._vm.$watch(function () { return this._data.$$state }, function () {
  20375. if ((true)) {
  20376. assert(store._committing, "do not mutate vuex store state outside mutation handlers.");
  20377. }
  20378. }, { deep: true, sync: true });
  20379. }
  20380. function getNestedState (state, path) {
  20381. return path.reduce(function (state, key) { return state[key]; }, state)
  20382. }
  20383. function unifyObjectStyle (type, payload, options) {
  20384. if (isObject(type) && type.type) {
  20385. options = payload;
  20386. payload = type;
  20387. type = type.type;
  20388. }
  20389. if ((true)) {
  20390. assert(typeof type === 'string', ("expects string as the type, but found " + (typeof type) + "."));
  20391. }
  20392. return { type: type, payload: payload, options: options }
  20393. }
  20394. function install (_Vue) {
  20395. if (Vue && _Vue === Vue) {
  20396. if ((true)) {
  20397. console.error(
  20398. '[vuex] already installed. Vue.use(Vuex) should be called only once.'
  20399. );
  20400. }
  20401. return
  20402. }
  20403. Vue = _Vue;
  20404. applyMixin(Vue);
  20405. }
  20406. /**
  20407. * Reduce the code which written in Vue.js for getting the state.
  20408. * @param {String} [namespace] - Module's namespace
  20409. * @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.
  20410. * @param {Object}
  20411. */
  20412. var mapState = normalizeNamespace(function (namespace, states) {
  20413. var res = {};
  20414. if (( true) && !isValidMap(states)) {
  20415. console.error('[vuex] mapState: mapper parameter must be either an Array or an Object');
  20416. }
  20417. normalizeMap(states).forEach(function (ref) {
  20418. var key = ref.key;
  20419. var val = ref.val;
  20420. res[key] = function mappedState () {
  20421. var state = this.$store.state;
  20422. var getters = this.$store.getters;
  20423. if (namespace) {
  20424. var module = getModuleByNamespace(this.$store, 'mapState', namespace);
  20425. if (!module) {
  20426. return
  20427. }
  20428. state = module.context.state;
  20429. getters = module.context.getters;
  20430. }
  20431. return typeof val === 'function'
  20432. ? val.call(this, state, getters)
  20433. : state[val]
  20434. };
  20435. // mark vuex getter for devtools
  20436. res[key].vuex = true;
  20437. });
  20438. return res
  20439. });
  20440. /**
  20441. * Reduce the code which written in Vue.js for committing the mutation
  20442. * @param {String} [namespace] - Module's namespace
  20443. * @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.
  20444. * @return {Object}
  20445. */
  20446. var mapMutations = normalizeNamespace(function (namespace, mutations) {
  20447. var res = {};
  20448. if (( true) && !isValidMap(mutations)) {
  20449. console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
  20450. }
  20451. normalizeMap(mutations).forEach(function (ref) {
  20452. var key = ref.key;
  20453. var val = ref.val;
  20454. res[key] = function mappedMutation () {
  20455. var args = [], len = arguments.length;
  20456. while ( len-- ) args[ len ] = arguments[ len ];
  20457. // Get the commit method from store
  20458. var commit = this.$store.commit;
  20459. if (namespace) {
  20460. var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
  20461. if (!module) {
  20462. return
  20463. }
  20464. commit = module.context.commit;
  20465. }
  20466. return typeof val === 'function'
  20467. ? val.apply(this, [commit].concat(args))
  20468. : commit.apply(this.$store, [val].concat(args))
  20469. };
  20470. });
  20471. return res
  20472. });
  20473. /**
  20474. * Reduce the code which written in Vue.js for getting the getters
  20475. * @param {String} [namespace] - Module's namespace
  20476. * @param {Object|Array} getters
  20477. * @return {Object}
  20478. */
  20479. var mapGetters = normalizeNamespace(function (namespace, getters) {
  20480. var res = {};
  20481. if (( true) && !isValidMap(getters)) {
  20482. console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
  20483. }
  20484. normalizeMap(getters).forEach(function (ref) {
  20485. var key = ref.key;
  20486. var val = ref.val;
  20487. // The namespace has been mutated by normalizeNamespace
  20488. val = namespace + val;
  20489. res[key] = function mappedGetter () {
  20490. if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
  20491. return
  20492. }
  20493. if (( true) && !(val in this.$store.getters)) {
  20494. console.error(("[vuex] unknown getter: " + val));
  20495. return
  20496. }
  20497. return this.$store.getters[val]
  20498. };
  20499. // mark vuex getter for devtools
  20500. res[key].vuex = true;
  20501. });
  20502. return res
  20503. });
  20504. /**
  20505. * Reduce the code which written in Vue.js for dispatch the action
  20506. * @param {String} [namespace] - Module's namespace
  20507. * @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.
  20508. * @return {Object}
  20509. */
  20510. var mapActions = normalizeNamespace(function (namespace, actions) {
  20511. var res = {};
  20512. if (( true) && !isValidMap(actions)) {
  20513. console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
  20514. }
  20515. normalizeMap(actions).forEach(function (ref) {
  20516. var key = ref.key;
  20517. var val = ref.val;
  20518. res[key] = function mappedAction () {
  20519. var args = [], len = arguments.length;
  20520. while ( len-- ) args[ len ] = arguments[ len ];
  20521. // get dispatch function from store
  20522. var dispatch = this.$store.dispatch;
  20523. if (namespace) {
  20524. var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
  20525. if (!module) {
  20526. return
  20527. }
  20528. dispatch = module.context.dispatch;
  20529. }
  20530. return typeof val === 'function'
  20531. ? val.apply(this, [dispatch].concat(args))
  20532. : dispatch.apply(this.$store, [val].concat(args))
  20533. };
  20534. });
  20535. return res
  20536. });
  20537. /**
  20538. * Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
  20539. * @param {String} namespace
  20540. * @return {Object}
  20541. */
  20542. var createNamespacedHelpers = function (namespace) { return ({
  20543. mapState: mapState.bind(null, namespace),
  20544. mapGetters: mapGetters.bind(null, namespace),
  20545. mapMutations: mapMutations.bind(null, namespace),
  20546. mapActions: mapActions.bind(null, namespace)
  20547. }); };
  20548. /**
  20549. * Normalize the map
  20550. * normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
  20551. * normalizeMap({a: 1, b: 2, c: 3}) => [ { key: 'a', val: 1 }, { key: 'b', val: 2 }, { key: 'c', val: 3 } ]
  20552. * @param {Array|Object} map
  20553. * @return {Object}
  20554. */
  20555. function normalizeMap (map) {
  20556. if (!isValidMap(map)) {
  20557. return []
  20558. }
  20559. return Array.isArray(map)
  20560. ? map.map(function (key) { return ({ key: key, val: key }); })
  20561. : Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); })
  20562. }
  20563. /**
  20564. * Validate whether given map is valid or not
  20565. * @param {*} map
  20566. * @return {Boolean}
  20567. */
  20568. function isValidMap (map) {
  20569. return Array.isArray(map) || isObject(map)
  20570. }
  20571. /**
  20572. * 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.
  20573. * @param {Function} fn
  20574. * @return {Function}
  20575. */
  20576. function normalizeNamespace (fn) {
  20577. return function (namespace, map) {
  20578. if (typeof namespace !== 'string') {
  20579. map = namespace;
  20580. namespace = '';
  20581. } else if (namespace.charAt(namespace.length - 1) !== '/') {
  20582. namespace += '/';
  20583. }
  20584. return fn(namespace, map)
  20585. }
  20586. }
  20587. /**
  20588. * Search a special module from store by namespace. if module not exist, print error message.
  20589. * @param {Object} store
  20590. * @param {String} helper
  20591. * @param {String} namespace
  20592. * @return {Object}
  20593. */
  20594. function getModuleByNamespace (store, helper, namespace) {
  20595. var module = store._modulesNamespaceMap[namespace];
  20596. if (( true) && !module) {
  20597. console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
  20598. }
  20599. return module
  20600. }
  20601. // Credits: borrowed code from fcomb/redux-logger
  20602. function createLogger (ref) {
  20603. if ( ref === void 0 ) ref = {};
  20604. var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
  20605. var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
  20606. var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
  20607. var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
  20608. var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
  20609. var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
  20610. var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
  20611. var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
  20612. var logger = ref.logger; if ( logger === void 0 ) logger = console;
  20613. return function (store) {
  20614. var prevState = deepCopy(store.state);
  20615. if (typeof logger === 'undefined') {
  20616. return
  20617. }
  20618. if (logMutations) {
  20619. store.subscribe(function (mutation, state) {
  20620. var nextState = deepCopy(state);
  20621. if (filter(mutation, prevState, nextState)) {
  20622. var formattedTime = getFormattedTime();
  20623. var formattedMutation = mutationTransformer(mutation);
  20624. var message = "mutation " + (mutation.type) + formattedTime;
  20625. startMessage(logger, message, collapsed);
  20626. logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
  20627. logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
  20628. logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
  20629. endMessage(logger);
  20630. }
  20631. prevState = nextState;
  20632. });
  20633. }
  20634. if (logActions) {
  20635. store.subscribeAction(function (action, state) {
  20636. if (actionFilter(action, state)) {
  20637. var formattedTime = getFormattedTime();
  20638. var formattedAction = actionTransformer(action);
  20639. var message = "action " + (action.type) + formattedTime;
  20640. startMessage(logger, message, collapsed);
  20641. logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
  20642. endMessage(logger);
  20643. }
  20644. });
  20645. }
  20646. }
  20647. }
  20648. function startMessage (logger, message, collapsed) {
  20649. var startMessage = collapsed
  20650. ? logger.groupCollapsed
  20651. : logger.group;
  20652. // render
  20653. try {
  20654. startMessage.call(logger, message);
  20655. } catch (e) {
  20656. logger.log(message);
  20657. }
  20658. }
  20659. function endMessage (logger) {
  20660. try {
  20661. logger.groupEnd();
  20662. } catch (e) {
  20663. logger.log('—— log end ——');
  20664. }
  20665. }
  20666. function getFormattedTime () {
  20667. var time = new Date();
  20668. return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
  20669. }
  20670. function repeat (str, times) {
  20671. return (new Array(times + 1)).join(str)
  20672. }
  20673. function pad (num, maxLength) {
  20674. return repeat('0', maxLength - num.toString().length) + num
  20675. }
  20676. var index_cjs = {
  20677. Store: Store,
  20678. install: install,
  20679. version: '3.6.2',
  20680. mapState: mapState,
  20681. mapMutations: mapMutations,
  20682. mapGetters: mapGetters,
  20683. mapActions: mapActions,
  20684. createNamespacedHelpers: createNamespacedHelpers,
  20685. createLogger: createLogger
  20686. };
  20687. module.exports = index_cjs;
  20688. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ 3)))
  20689. /***/ }),
  20690. /* 49 */
  20691. /*!***********************************************************************!*\
  20692. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages/utils/common.js ***!
  20693. \***********************************************************************/
  20694. /*! no static exports found */
  20695. /***/ (function(module, exports, __webpack_require__) {
  20696. "use strict";
  20697. Object.defineProperty(exports, "__esModule", {
  20698. value: true
  20699. });
  20700. exports.default = void 0;
  20701. exports.getUrlParameter = getUrlParameter;
  20702. /**
  20703. * 获取url参数值
  20704. * @param {*} url
  20705. * @param {*} name
  20706. */
  20707. function getUrlParameter(url, name) {
  20708. var regexSearch = '[\\?&#]' + name + '=([^&#]*)';
  20709. var regex = new RegExp(regexSearch);
  20710. var results = regex.exec(url);
  20711. console.log(results, 'results');
  20712. return results ? window.decodeURIComponent(results[1]) : '';
  20713. }
  20714. var _default = {
  20715. transDate: function transDate(val, pattern) {
  20716. if (val) {
  20717. var time = new Date();
  20718. time.setTime(val);
  20719. if (Date.parse(val)) {
  20720. time = new Date(val);
  20721. }
  20722. if (time instanceof Date) {
  20723. return this.formatDate(pattern || 'yyyy-MM-dd', time);
  20724. }
  20725. }
  20726. return '';
  20727. },
  20728. transBaseDateTime: function transBaseDateTime(val, pattern) {
  20729. if (val) {
  20730. var time = new Date();
  20731. time.setTime(val);
  20732. if (Date.parse(val)) {
  20733. time = new Date(val);
  20734. }
  20735. if (time instanceof Date) {
  20736. return this.formatDate(pattern || 'yyyy年MM月dd日 hh:mm', time);
  20737. }
  20738. }
  20739. return '';
  20740. },
  20741. transBaseToDateTime: function transBaseToDateTime(val, pattern) {
  20742. if (val) {
  20743. var time = new Date();
  20744. time.setTime(val);
  20745. if (Date.parse(val)) {
  20746. time = new Date(val);
  20747. }
  20748. if (time instanceof Date) {
  20749. return this.formatDate(pattern || 'MM月dd日 hh:mm', time);
  20750. }
  20751. }
  20752. return '';
  20753. },
  20754. transServDate: function transServDate(val) {
  20755. return this.transDate(val, 'yyyy-MM-dd hh:mm:ss');
  20756. },
  20757. transServDay: function transServDay(val) {
  20758. return this.transDate(val, 'yyyy-MM-dd');
  20759. },
  20760. isArrayFn: function isArrayFn(value) {
  20761. if (typeof Array.isArray === 'function') {
  20762. return Array.isArray(value);
  20763. } else {
  20764. return Object.prototype.toString.call(value) === '[object Array]';
  20765. }
  20766. },
  20767. transDcMap: function transDcMap(arr) {
  20768. var tMap = {};
  20769. arr.forEach(function (item) {
  20770. tMap[item.value] = item.label;
  20771. });
  20772. return tMap;
  20773. },
  20774. castEval: function castEval(val) {
  20775. // return JSON.parse(val)
  20776. if (val) {
  20777. return eval('(' + val + ')');
  20778. } else {
  20779. return '';
  20780. }
  20781. },
  20782. castString: function castString(val) {
  20783. return JSON.stringify(val);
  20784. },
  20785. // 金额格式化,整数部分每3位用逗号分隔,支持带有正负号以及小数部分
  20786. formatMoney: function formatMoney(amt) {
  20787. if (!amt) return '';
  20788. if (amt.length <= 3) {
  20789. return amt;
  20790. }
  20791. if (!/^(\+|-)?(\d+)(\.\d+)?$/.test(amt)) {
  20792. return amt;
  20793. }
  20794. var a = RegExp.$1;
  20795. var b = RegExp.$2;
  20796. var c = RegExp.$3;
  20797. var re = new RegExp();
  20798. re.compile('(\\d)(\\d{3})(,|$)');
  20799. while (re.test(b)) {
  20800. b = b.replace(re, '$1,$2$3');
  20801. }
  20802. return a + '' + b + '' + c;
  20803. },
  20804. formatDate: function formatDate(fmt, date) {
  20805. // author: meizz
  20806. var o = {
  20807. 'M+': date.getMonth() + 1,
  20808. // 月份
  20809. 'd+': date.getDate(),
  20810. // 日
  20811. 'h+': date.getHours(),
  20812. // 小时
  20813. 'm+': date.getMinutes(),
  20814. // 分
  20815. 's+': date.getSeconds(),
  20816. // 秒
  20817. 'q+': Math.floor((date.getMonth() + 3) / 3),
  20818. // 季度
  20819. 'S': date.getMilliseconds() // 毫秒
  20820. };
  20821. if (/(y+)/.test(fmt)) {
  20822. fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
  20823. }
  20824. for (var k in o) {
  20825. if (new RegExp('(' + k + ')').test(fmt)) {
  20826. fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
  20827. }
  20828. }
  20829. return fmt;
  20830. },
  20831. replaceThumbnail: function replaceThumbnail(urlPath) {
  20832. if (urlPath != null) {
  20833. urlPath = urlPath.replace('/server/FileController/download/', this.$constant.BASE_URI + '/wx/fileController/downloadThumbnail/');
  20834. }
  20835. if (urlPath != null) {
  20836. urlPath = urlPath.replace('/h5Server/FileController/download/', this.$constant.BASE_URI + '/wx/fileController/downloadThumbnail/');
  20837. }
  20838. return urlPath;
  20839. },
  20840. goBack: function goBack() {
  20841. // window.history.go(-1)
  20842. // self.location = document.referrer
  20843. history.back();
  20844. },
  20845. uuid: function uuid(len, radix) {
  20846. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  20847. var uuid = [];
  20848. var i;
  20849. radix = radix || chars.length;
  20850. if (len) {
  20851. // Compact form
  20852. for (i = 0; i < len; i++) {
  20853. uuid[i] = chars[0 | Math.random() * radix];
  20854. }
  20855. } else {
  20856. // rfc4122, version 4 form
  20857. var r;
  20858. // rfc4122 requires these characters
  20859. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  20860. uuid[14] = '4';
  20861. // Fill in random data. At i==19 set the high bits of clock sequence as
  20862. // per rfc4122, sec. 4.1.5
  20863. for (i = 0; i < 36; i++) {
  20864. if (!uuid[i]) {
  20865. r = 0 | Math.random() * 16;
  20866. uuid[i] = chars[i === 19 ? r & 0x3 | 0x8 : r];
  20867. }
  20868. }
  20869. }
  20870. return uuid.join('');
  20871. },
  20872. handleDicList: function handleDicList(params) {
  20873. // 处理字典值数组
  20874. var obj = {};
  20875. for (var key in params) {
  20876. if (JSON.parse(params[key].dictValue)) {
  20877. obj[key] = JSON.parse(params[key].dictValue);
  20878. } else {
  20879. obj[key] = [];
  20880. }
  20881. }
  20882. return obj;
  20883. }
  20884. };
  20885. exports.default = _default;
  20886. /***/ }),
  20887. /* 50 */
  20888. /*!*************************************************************************!*\
  20889. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages/utils/constant.js ***!
  20890. \*************************************************************************/
  20891. /*! no static exports found */
  20892. /***/ (function(module, exports, __webpack_require__) {
  20893. "use strict";
  20894. Object.defineProperty(exports, "__esModule", {
  20895. value: true
  20896. });
  20897. exports.default = exports.BASE_URI = void 0;
  20898. // 系统常量
  20899. // export const BASE_URI = "https://wxdock.astrazeneca.cn/dockApi"; // 测试
  20900. var BASE_URI = "http://192.168.2.108:9001"; // 许峰本地
  20901. // export const BASE_URI = "https://hswkxc.idea-sf.com/gardenApi"; // 正式
  20902. // export const BASE_URI = "http://192.168.3.94:9010"; // 老潘本地
  20903. // export const BASE_URI = "http://192.168.2.107:9011"; // 洮洮本地
  20904. // export const BASE_URI = "http://192.168.2.103:9010"; // 老崔本地
  20905. // export const BASE_URI = "http://192.168.2.106:9011"; // 许峰本地
  20906. // export const BASE_URI = "http://192.168.2.112:9010"; // 陈凡本地
  20907. exports.BASE_URI = BASE_URI;
  20908. var _default = {
  20909. /* 系统常量*/
  20910. // 基础地址
  20911. BASE_URI: BASE_URI
  20912. };
  20913. exports.default = _default;
  20914. /***/ }),
  20915. /* 51 */
  20916. /*!******************************************************************!*\
  20917. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/common.js ***!
  20918. \******************************************************************/
  20919. /*! no static exports found */
  20920. /***/ (function(module, exports, __webpack_require__) {
  20921. "use strict";
  20922. /* WEBPACK VAR INJECTION */(function(uni) {
  20923. Object.defineProperty(exports, "__esModule", {
  20924. value: true
  20925. });
  20926. exports.default = void 0;
  20927. exports.getUrlParameter = getUrlParameter;
  20928. exports.showToast = showToast;
  20929. /**
  20930. * 获取url参数值
  20931. * @param {*} url
  20932. * @param {*} name
  20933. */
  20934. function getUrlParameter(url, name) {
  20935. var regexSearch = '[\\?&#]' + name + '=([^&#]*)';
  20936. var regex = new RegExp(regexSearch);
  20937. var results = regex.exec(url);
  20938. return results ? window.decodeURIComponent(results[1]) : '';
  20939. }
  20940. function showToast(e) {
  20941. uni.showToast({
  20942. title: e,
  20943. icon: 'none',
  20944. mask: true,
  20945. duration: 1000
  20946. });
  20947. }
  20948. var _default = {
  20949. transDate: function transDate(val, pattern) {
  20950. if (val) {
  20951. var time = new Date();
  20952. time.setTime(val);
  20953. if (Date.parse(val)) {
  20954. time = new Date(val);
  20955. }
  20956. if (time instanceof Date) {
  20957. return this.formatDate(pattern || 'yyyy-MM-dd', time);
  20958. }
  20959. }
  20960. return '';
  20961. },
  20962. transBaseDateTime: function transBaseDateTime(val, pattern) {
  20963. if (val) {
  20964. var time = new Date();
  20965. time.setTime(val);
  20966. if (Date.parse(val)) {
  20967. time = new Date(val);
  20968. }
  20969. if (time instanceof Date) {
  20970. return this.formatDate(pattern || 'yyyy年MM月dd日 hh:mm', time);
  20971. }
  20972. }
  20973. return '';
  20974. },
  20975. transBaseToDateTime: function transBaseToDateTime(val, pattern) {
  20976. if (val) {
  20977. var time = new Date();
  20978. time.setTime(val);
  20979. if (Date.parse(val)) {
  20980. time = new Date(val);
  20981. }
  20982. if (time instanceof Date) {
  20983. return this.formatDate(pattern || 'MM月dd日 hh:mm', time);
  20984. }
  20985. }
  20986. return '';
  20987. },
  20988. transServDate: function transServDate(val) {
  20989. return this.transDate(val, 'yyyy-MM-dd hh:mm:ss');
  20990. },
  20991. transServDay: function transServDay(val) {
  20992. return this.transDate(val, 'yyyy-MM-dd');
  20993. },
  20994. isArrayFn: function isArrayFn(value) {
  20995. if (typeof Array.isArray === 'function') {
  20996. return Array.isArray(value);
  20997. } else {
  20998. return Object.prototype.toString.call(value) === '[object Array]';
  20999. }
  21000. },
  21001. transDcMap: function transDcMap(arr) {
  21002. var tMap = {};
  21003. arr.forEach(function (item) {
  21004. tMap[item.value] = item.label;
  21005. });
  21006. return tMap;
  21007. },
  21008. castEval: function castEval(val) {
  21009. // return JSON.parse(val)
  21010. if (val) {
  21011. return eval('(' + val + ')');
  21012. } else {
  21013. return '';
  21014. }
  21015. },
  21016. castString: function castString(val) {
  21017. return JSON.stringify(val);
  21018. },
  21019. // 金额格式化,整数部分每3位用逗号分隔,支持带有正负号以及小数部分
  21020. formatMoney: function formatMoney(amt) {
  21021. if (!amt) return '';
  21022. if (amt.length <= 3) {
  21023. return amt;
  21024. }
  21025. if (!/^(\+|-)?(\d+)(\.\d+)?$/.test(amt)) {
  21026. return amt;
  21027. }
  21028. var a = RegExp.$1;
  21029. var b = RegExp.$2;
  21030. var c = RegExp.$3;
  21031. var re = new RegExp();
  21032. re.compile('(\\d)(\\d{3})(,|$)');
  21033. while (re.test(b)) {
  21034. b = b.replace(re, '$1,$2$3');
  21035. }
  21036. return a + '' + b + '' + c;
  21037. },
  21038. formatDate: function formatDate(fmt, date) {
  21039. // author: meizz
  21040. var o = {
  21041. 'M+': date.getMonth() + 1,
  21042. // 月份
  21043. 'd+': date.getDate(),
  21044. // 日
  21045. 'h+': date.getHours(),
  21046. // 小时
  21047. 'm+': date.getMinutes(),
  21048. // 分
  21049. 's+': date.getSeconds(),
  21050. // 秒
  21051. 'q+': Math.floor((date.getMonth() + 3) / 3),
  21052. // 季度
  21053. 'S': date.getMilliseconds() // 毫秒
  21054. };
  21055. if (/(y+)/.test(fmt)) {
  21056. fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
  21057. }
  21058. for (var k in o) {
  21059. if (new RegExp('(' + k + ')').test(fmt)) {
  21060. fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
  21061. }
  21062. }
  21063. return fmt;
  21064. },
  21065. replaceThumbnail: function replaceThumbnail(urlPath) {
  21066. if (urlPath != null) {
  21067. urlPath = urlPath.replace('/server/FileController/download/', this.$constant.BASE_URI + '/wx/fileController/downloadThumbnail/');
  21068. }
  21069. if (urlPath != null) {
  21070. urlPath = urlPath.replace('/h5Server/FileController/download/', this.$constant.BASE_URI + '/wx/fileController/downloadThumbnail/');
  21071. }
  21072. return urlPath;
  21073. },
  21074. goBack: function goBack() {
  21075. // window.history.go(-1)
  21076. // self.location = document.referrer
  21077. history.back();
  21078. },
  21079. uuid: function uuid(len, radix) {
  21080. var chars = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
  21081. var uuid = [];
  21082. var i;
  21083. radix = radix || chars.length;
  21084. if (len) {
  21085. // Compact form
  21086. for (i = 0; i < len; i++) {
  21087. uuid[i] = chars[0 | Math.random() * radix];
  21088. }
  21089. } else {
  21090. // rfc4122, version 4 form
  21091. var r;
  21092. // rfc4122 requires these characters
  21093. uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
  21094. uuid[14] = '4';
  21095. // Fill in random data. At i==19 set the high bits of clock sequence as
  21096. // per rfc4122, sec. 4.1.5
  21097. for (i = 0; i < 36; i++) {
  21098. if (!uuid[i]) {
  21099. r = 0 | Math.random() * 16;
  21100. uuid[i] = chars[i === 19 ? r & 0x3 | 0x8 : r];
  21101. }
  21102. }
  21103. }
  21104. return uuid.join('');
  21105. }
  21106. };
  21107. exports.default = _default;
  21108. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21109. /***/ }),
  21110. /* 52 */
  21111. /*!****************************************************************!*\
  21112. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/auth.js ***!
  21113. \****************************************************************/
  21114. /*! no static exports found */
  21115. /***/ (function(module, exports, __webpack_require__) {
  21116. "use strict";
  21117. /* WEBPACK VAR INJECTION */(function(uni) {
  21118. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21119. Object.defineProperty(exports, "__esModule", {
  21120. value: true
  21121. });
  21122. exports.default = void 0;
  21123. var _common = _interopRequireDefault(__webpack_require__(/*! ./common.js */ 51));
  21124. var _default = {
  21125. TYPE_FRAME: 'FRAME',
  21126. TYPE_BIZ: 'BIZ',
  21127. TYPE_USER: 'USER',
  21128. TYPE_PERSON_BIZ: 'BIZ_PERSON',
  21129. // ------------------------------ User -----------------------------------
  21130. uid: function uid() {
  21131. return this.currUser() ? this.currUser().id : null;
  21132. },
  21133. setUser: function setUser(value) {
  21134. uni.setStorage({
  21135. key: 'laocui_user_token',
  21136. data: value,
  21137. success: function success() {}
  21138. });
  21139. },
  21140. setUserInfo: function setUserInfo(value) {
  21141. uni.setStorage({
  21142. key: 'laocui_user_info',
  21143. data: JSON.stringify(value),
  21144. success: function success() {}
  21145. });
  21146. },
  21147. currUser: function currUser() {
  21148. return _common.default.castEval(localStorage.getItem(this.userKey()) || '');
  21149. },
  21150. removeUser: function removeUser() {
  21151. uni.removeStorage(this.userKey());
  21152. },
  21153. // ------------------------------ Biz -----------------------------------
  21154. bid: function bid() {
  21155. return this.currBiz() ? this.currBiz().id : null;
  21156. },
  21157. setBiz: function setBiz(value) {
  21158. sessionStorage.setItem(this.bizKey(), JSON.stringify(value));
  21159. },
  21160. removeBiz: function removeBiz() {
  21161. sessionStorage.removeItem(this.bizKey());
  21162. },
  21163. currBiz: function currBiz() {
  21164. return _common.default.castEval(sessionStorage.getItem(this.bizKey()) || null);
  21165. },
  21166. // ------------------------------ Token -----------------------------------
  21167. setToken: function setToken(token) {
  21168. localStorage.setItem(this.tokenKey(), token);
  21169. },
  21170. getToken: function getToken() {
  21171. return localStorage.getItem(this.tokenKey()) || null;
  21172. },
  21173. removeToken: function removeToken() {
  21174. localStorage.removeItem(this.tokenKey());
  21175. },
  21176. // ------------------------------ key -----------------------------------
  21177. // bizKey: function() {
  21178. // const key = this.hashCode(window.location.host + '_biz_' + this.getUserType())
  21179. // return key
  21180. // },
  21181. //
  21182. // userKey: function() {
  21183. // const key = this.hashCode(window.location.host + '_user_' + this.getUserType())
  21184. // return key
  21185. // },
  21186. //
  21187. // tokenKey: function() {
  21188. // const key = this.hashCode(window.location.host + '_token_' + this.getUserType())
  21189. // return key
  21190. // },
  21191. // Frame
  21192. setLoginInfo: function setLoginInfo(value) {
  21193. localStorage.setItem('KEY_ADMIN_USER_LOGIN_INFO', JSON.stringify(value));
  21194. },
  21195. getLoginInfo: function getLoginInfo() {
  21196. return _common.default.castEval(localStorage.getItem('KEY_ADMIN_USER_LOGIN_INFO') || null);
  21197. },
  21198. removeLoginInfo: function removeLoginInfo() {
  21199. localStorage.removeItem('KEY_ADMIN_USER_LOGIN_INFO');
  21200. },
  21201. // Biz
  21202. setBizLoginInfo: function setBizLoginInfo(value) {
  21203. localStorage.setItem('KEY_BIZ_USER_LOGIN_INFO', JSON.stringify(value));
  21204. },
  21205. getBizLoginInfo: function getBizLoginInfo() {
  21206. return _common.default.castEval(localStorage.getItem('KEY_BIZ_USER_LOGIN_INFO') || null);
  21207. },
  21208. removeBizLoginInfo: function removeBizLoginInfo() {
  21209. localStorage.removeItem('KEY_BIZ_USER_LOGIN_INFO');
  21210. },
  21211. setUserType: function setUserType(value) {
  21212. localStorage.setItem('KEY_USER_TYPE', value);
  21213. },
  21214. getUserType: function getUserType() {
  21215. return localStorage.getItem('KEY_USER_TYPE') || 'TYPE_FRAME';
  21216. },
  21217. hashCode: function hashCode(str) {
  21218. var hash = 0;
  21219. if (str.length === 0) return hash;
  21220. for (var i = 0; i < str.length; i++) {
  21221. var char = str.charCodeAt(i);
  21222. hash = (hash << 5) - hash + char;
  21223. hash = hash & hash; // Convert to 32bit integer
  21224. }
  21225. return hash;
  21226. },
  21227. /*
  21228. 定时缓存
  21229. */
  21230. setTimingLocalStorage: function setTimingLocalStorage(key, value, ttl_ms) {
  21231. var data = {
  21232. value: value,
  21233. expirse: new Date(ttl_ms).getTime()
  21234. };
  21235. localStorage.setItem(key, JSON.stringify(data));
  21236. },
  21237. getTimingLocalStorage: function getTimingLocalStorage(key) {
  21238. var data = JSON.parse(localStorage.getItem(key));
  21239. if (data !== null) {
  21240. if (data.expirse == null || data.expirse != null && data.expirse < new Date().getTime()) {
  21241. localStorage.removeItem(key);
  21242. } else {
  21243. return JSON.parse(data.value);
  21244. }
  21245. }
  21246. return null;
  21247. }
  21248. };
  21249. exports.default = _default;
  21250. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21251. /***/ }),
  21252. /* 53 */
  21253. /*!*********************************************************************************!*\
  21254. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/request/requestConfig.js ***!
  21255. \*********************************************************************************/
  21256. /*! no static exports found */
  21257. /***/ (function(module, exports, __webpack_require__) {
  21258. "use strict";
  21259. /* WEBPACK VAR INJECTION */(function(uni) {
  21260. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21261. Object.defineProperty(exports, "__esModule", {
  21262. value: true
  21263. });
  21264. exports.default = void 0;
  21265. var _request = _interopRequireDefault(__webpack_require__(/*! ./request */ 54));
  21266. var _config = _interopRequireDefault(__webpack_require__(/*! config */ 55));
  21267. // import store from "../../store/index.js";
  21268. uni.getStorage({
  21269. key: 'storage_key',
  21270. success: function success(res) {
  21271. console.log(res.data);
  21272. }
  21273. });
  21274. //可以new多个request来支持多个域名请求
  21275. var $http = new _request.default({
  21276. //接口请求地址
  21277. baseUrl: _config.default.baseUrl,
  21278. //服务器本地上传文件地址
  21279. fileUrl: _config.default.baseUrl,
  21280. //设置请求头
  21281. headers: {
  21282. 'Content-Type': 'application/x-www-form-urlencoded;',
  21283. 'ApiVersion': _config.default.version,
  21284. 'Device': _config.default.device,
  21285. 'Platform': _config.default.platform,
  21286. "Authorization": 'Bearer ' + uni.getStorageSync('laocui_user_token')
  21287. },
  21288. //以下是默认值可不写
  21289. //是否提示--默认提示
  21290. isPrompt: true,
  21291. //是否显示请求动画
  21292. load: true,
  21293. //是否使用处理数据模板
  21294. isFactory: true,
  21295. //列表接口是否有加载判断
  21296. loadMore: true
  21297. });
  21298. //当前接口请求数
  21299. var requestNum = 0;
  21300. //请求开始拦截器
  21301. $http.requestStart = function (options) {
  21302. if (requestNum <= 0) {
  21303. uni.showNavigationBarLoading();
  21304. if (options.load) {
  21305. //打开加载动画
  21306. uni.showLoading({
  21307. title: '加载中',
  21308. mask: true
  21309. });
  21310. }
  21311. }
  21312. requestNum += 1;
  21313. //请求前加入token
  21314. options.headers['Authorization'] = 'Bearer ' + uni.getStorageSync('laocui_user_token');
  21315. // console.log("请求开始前", options);
  21316. return options;
  21317. };
  21318. //请求结束
  21319. $http.requestEnd = function (options, resolve) {
  21320. //判断当前接口是否需要加载动画
  21321. requestNum = requestNum - 1;
  21322. if (requestNum <= 0) {
  21323. uni.hideLoading();
  21324. uni.hideNavigationBarLoading();
  21325. }
  21326. if (resolve.errMsg && (resolve.errMsg != "request:ok" || resolve.statusCode && resolve.statusCode != 200)) {
  21327. uni.showToast({
  21328. title: "网络错误,请检查一下网络",
  21329. mask: true,
  21330. icon: "none"
  21331. });
  21332. }
  21333. };
  21334. //登录弹窗次数
  21335. var loginPopupNum = 0;
  21336. //所有接口数据处理(可在接口里设置不调用此方法)
  21337. $http.dataFactory = function (options, resolve) {
  21338. //设置回调默认值
  21339. var callback = {
  21340. //success数据是否请求成功状态
  21341. success: false,
  21342. //这里返回的数据就是调用请求方法收到的数据
  21343. result: ""
  21344. };
  21345. // 特殊接口处理 接口报请先登录 跳转登录
  21346. if (resolve.data.code === 101) {
  21347. uni.showModal({
  21348. title: '提示',
  21349. content: resolve.data.msg,
  21350. showCancel: false,
  21351. success: function success() {
  21352. uni.setStorageSync('token', null);
  21353. uni.navigateTo({
  21354. url: '/pages/login/login'
  21355. });
  21356. }
  21357. });
  21358. return false;
  21359. }
  21360. //判断数据是否请求成功
  21361. if (resolve.data.errmsg == "成功") {
  21362. callback.success = true;
  21363. callback.result = resolve.data;
  21364. } else if (resolve.data.errno == 303) {
  21365. uni.redirectTo({
  21366. url: '/pages/login/login'
  21367. });
  21368. this.$showToast('令牌过期,请重新登陆');
  21369. } else {
  21370. uni.showToast({
  21371. title: resolve.data.errmsg,
  21372. icon: "none",
  21373. mask: true,
  21374. duration: 2000
  21375. });
  21376. //设置可以提示的时候
  21377. // if (options.isPrompt) {
  21378. // setTimeout(function () {
  21379. //提示后台接口抛出的错误信息
  21380. // uni.showToast({
  21381. // title: resolve.data.msg,
  21382. // icon: "none",
  21383. // duration: 3000
  21384. // });
  21385. // }, 500);
  21386. // }
  21387. callback.result = resolve.data;
  21388. }
  21389. uni.stopPullDownRefresh();
  21390. return callback;
  21391. };
  21392. var _default = $http;
  21393. exports.default = _default;
  21394. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21395. /***/ }),
  21396. /* 54 */
  21397. /*!***************************************************************************!*\
  21398. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/request/request.js ***!
  21399. \***************************************************************************/
  21400. /*! no static exports found */
  21401. /***/ (function(module, exports, __webpack_require__) {
  21402. "use strict";
  21403. /* WEBPACK VAR INJECTION */(function(uni) {
  21404. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21405. Object.defineProperty(exports, "__esModule", {
  21406. value: true
  21407. });
  21408. exports.default = void 0;
  21409. var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
  21410. var _classCallCheck2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ 23));
  21411. var _createClass2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/createClass */ 24));
  21412. var request = /*#__PURE__*/function () {
  21413. function request(options) {
  21414. (0, _classCallCheck2.default)(this, request);
  21415. //请求公共地址
  21416. this.baseUrl = options.baseUrl || "";
  21417. //公共文件上传请求地址
  21418. this.fileUrl = options.fileUrl || "";
  21419. //默认请求头
  21420. this.headers = options.headers || {};
  21421. //默认配置
  21422. this.config = {
  21423. isPrompt: options.isPrompt === false ? false : true,
  21424. load: options.load === false ? false : true,
  21425. isFactory: options.isFactory === false ? false : true,
  21426. loadMore: options.loadMore === false ? false : true
  21427. };
  21428. }
  21429. // 获取默认信息
  21430. (0, _createClass2.default)(request, [{
  21431. key: "getDefault",
  21432. value: function getDefault(url, options, type) {
  21433. //判断url是不是链接
  21434. var urlType = /^([hH][tT]{2}[pP]:\/\/|[hH][tT]{2}[pP][sS]:\/\/)(([A-Za-z0-9-~]+).)+([A-Za-z0-9-~/])+$/.test(url);
  21435. var httpUrl;
  21436. if (type == "file") {
  21437. httpUrl = urlType ? url : this.fileUrl + url;
  21438. } else {
  21439. httpUrl = urlType ? url : this.baseUrl + url;
  21440. }
  21441. var config = Object.assign({}, this.config, options);
  21442. //请求地址
  21443. config.httpUrl = httpUrl;
  21444. //请求头
  21445. config.headers = Object.assign(this.headers, options.headers);
  21446. return config;
  21447. }
  21448. //post请求
  21449. }, {
  21450. key: "post",
  21451. value: function post() {
  21452. var _this2 = this;
  21453. var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  21454. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21455. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21456. var requestInfo = this.getDefault(url, options, "data");
  21457. requestInfo.data = data;
  21458. return new Promise(function (resolve, reject) {
  21459. _this2.getRequest("POST", requestInfo, function (state, response) {
  21460. //是否用外部的数据处理方法
  21461. if (state && requestInfo.isFactory && _this2.dataFactory) {
  21462. //数据处理
  21463. var factoryInfo = _this2.dataFactory(requestInfo, response);
  21464. // console.log(factoryInfo)
  21465. return resolve(factoryInfo.result);
  21466. // factoryInfo.success ? resolve(factoryInfo.result) : reject(factoryInfo.result);
  21467. } else {
  21468. // console.log(response, response)
  21469. state ? resolve(response) : reject(response);
  21470. }
  21471. });
  21472. });
  21473. }
  21474. //get请求
  21475. }, {
  21476. key: "get",
  21477. value: function get() {
  21478. var _this3 = this;
  21479. var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  21480. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21481. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21482. var requestInfo = this.getDefault(url, options, "data");
  21483. requestInfo.data = data;
  21484. return new Promise(function (resolve, reject) {
  21485. _this3.getRequest("GET", requestInfo, function (state, response) {
  21486. //是否用外部的数据处理方法
  21487. if (state && requestInfo.isFactory && _this3.dataFactory) {
  21488. //数据处理
  21489. var factoryInfo = _this3.dataFactory(requestInfo, response);
  21490. factoryInfo.success ? resolve(factoryInfo.result) : reject(factoryInfo.result);
  21491. } else {
  21492. state ? resolve(response) : reject(response);
  21493. }
  21494. });
  21495. });
  21496. }
  21497. //put请求
  21498. }, {
  21499. key: "put",
  21500. value: function put() {
  21501. var _this4 = this;
  21502. var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  21503. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21504. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21505. var requestInfo = this.getDefault(url, options, "data");
  21506. requestInfo.data = data;
  21507. return new Promise(function (resolve, reject) {
  21508. _this4.getRequest("PUT", requestInfo, function (state, response) {
  21509. //是否用外部的数据处理方法
  21510. if (state && requestInfo.isFactory && _this4.dataFactory) {
  21511. //数据处理
  21512. var factoryInfo = _this4.dataFactory(requestInfo, response);
  21513. factoryInfo.success ? resolve(factoryInfo.result) : reject(factoryInfo.result);
  21514. } else {
  21515. state ? resolve(response) : reject(response);
  21516. }
  21517. });
  21518. });
  21519. }
  21520. //delete请求
  21521. }, {
  21522. key: "delete",
  21523. value: function _delete() {
  21524. var _this5 = this;
  21525. var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  21526. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21527. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21528. var requestInfo = this.getDefault(url, options, "data");
  21529. requestInfo.data = data;
  21530. return new Promise(function (resolve, reject) {
  21531. _this5.getRequest("DELETE", requestInfo, function (state, response) {
  21532. //是否用外部的数据处理方法
  21533. if (state && requestInfo.isFactory && _this5.dataFactory) {
  21534. //数据处理
  21535. var factoryInfo = _this5.dataFactory(requestInfo, response);
  21536. factoryInfo.success ? resolve(factoryInfo.result) : reject(factoryInfo.result);
  21537. } else {
  21538. state ? resolve(response) : reject(response);
  21539. }
  21540. });
  21541. });
  21542. }
  21543. //接口请求方法
  21544. }, {
  21545. key: "getRequest",
  21546. value: function getRequest(ajaxType, options, callback) {
  21547. var _this6 = this;
  21548. //请求前回调
  21549. if (this.requestStart) {
  21550. options.method = ajaxType;
  21551. var requestStart = this.requestStart(options);
  21552. if ((0, _typeof2.default)(requestStart) == "object") {
  21553. options.data = requestStart.data;
  21554. options.headers = requestStart.headers;
  21555. options.isPrompt = requestStart.isPrompt;
  21556. options.load = requestStart.load;
  21557. options.isFactory = requestStart.isFactory;
  21558. } else {
  21559. callback(false, "请求开始拦截器未通过");
  21560. return;
  21561. }
  21562. }
  21563. // console.log(options.data)
  21564. uni.request({
  21565. url: options.httpUrl,
  21566. data: options.data,
  21567. method: ajaxType,
  21568. //请求类型
  21569. header: options.headers,
  21570. //加入请求头
  21571. success: function success(res) {
  21572. // ;
  21573. //请求完成回调
  21574. _this6.requestEnd && _this6.requestEnd(options, res);
  21575. callback(true, res);
  21576. },
  21577. fail: function fail(err) {
  21578. // console.log(err);
  21579. //请求完成回调
  21580. _this6.requestEnd && _this6.requestEnd(options, err);
  21581. callback(false, err);
  21582. }
  21583. });
  21584. }
  21585. //jsonp请求(只限于H5使用)
  21586. }, {
  21587. key: "jsonp",
  21588. value: function jsonp() {
  21589. var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  21590. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21591. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21592. var requestInfo = this.getDefault(url, options, "data");
  21593. var dataStr = '';
  21594. Object.keys(data).forEach(function (key) {
  21595. dataStr += key + '=' + data[key] + '&';
  21596. });
  21597. //匹配最后一个&并去除
  21598. if (dataStr !== '') {
  21599. dataStr = dataStr.substr(0, dataStr.lastIndexOf('&'));
  21600. }
  21601. requestInfo.httpUrl = requestInfo.httpUrl + '?' + dataStr;
  21602. var _this = this;
  21603. return new Promise(function (resolve, reject) {
  21604. var callbackName = "callback" + Math.ceil(Math.random() * 1000000);
  21605. if (_this.requestStart) {
  21606. requestInfo.data = data;
  21607. var requestStart = _this.requestStart(requestInfo);
  21608. if ((0, _typeof2.default)(requestStart) == "object") {
  21609. requestInfo.data = requestStart.data;
  21610. requestInfo.headers = requestStart.headers;
  21611. requestInfo.isPrompt = requestStart.isPrompt;
  21612. requestInfo.load = requestStart.load;
  21613. requestInfo.isFactory = requestStart.isFactory;
  21614. } else {
  21615. reject("请求开始拦截器未通过");
  21616. return;
  21617. }
  21618. }
  21619. window[callbackName] = function (data) {
  21620. resolve(data);
  21621. };
  21622. var script = document.createElement("script");
  21623. script.src = requestInfo.httpUrl + "&callback=" + callbackName;
  21624. document.head.appendChild(script);
  21625. // 及时删除,防止加载过多的JS
  21626. document.head.removeChild(script);
  21627. //请求完成回调
  21628. _this.requestEnd && _this.requestEnd(requestInfo, {});
  21629. });
  21630. }
  21631. //本地服务器图片上传
  21632. }, {
  21633. key: "urlImgUpload",
  21634. value: function urlImgUpload() {
  21635. var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  21636. var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  21637. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  21638. var requestInfo = this.getDefault(url, options, "file");
  21639. requestInfo.data = data;
  21640. var _this = this;
  21641. return new Promise(function (resolve, reject) {
  21642. uni.chooseImage({
  21643. count: data.count || 9,
  21644. //默认9
  21645. sizeType: data.sizeType || ['original', 'compressed'],
  21646. //可以指定是原图还是压缩图,默认二者都有
  21647. sourceType: data.sourceType || ['album', 'camera'],
  21648. //从相册选择
  21649. success: function success(res) {
  21650. _this.urlFileUpload(requestInfo, res.tempFiles, function (state, response) {
  21651. state ? resolve(response) : reject(response);
  21652. });
  21653. }
  21654. });
  21655. });
  21656. }
  21657. //本地服务器文件上传方法
  21658. }, {
  21659. key: "urlFileUpload",
  21660. value: function urlFileUpload(options, files, callback) {
  21661. var _this = this;
  21662. //请求前回调
  21663. if (this.requestStart) {
  21664. options.method = "FILE";
  21665. var requestStart = this.requestStart(options);
  21666. if ((0, _typeof2.default)(requestStart) == "object") {
  21667. if ((0, _typeof2.default)(requestStart) == "object") {
  21668. options.data = requestStart.data;
  21669. options.headers = requestStart.headers;
  21670. options.isPrompt = requestStart.isPrompt;
  21671. options.load = requestStart.load;
  21672. options.isFactory = requestStart.isFactory;
  21673. } else {
  21674. callback(false, "请求开始拦截器未通过");
  21675. return;
  21676. }
  21677. }
  21678. }
  21679. var len = files.length - 1;
  21680. var fileList = new Array();
  21681. fileUpload(0);
  21682. function fileUpload(i) {
  21683. var config = {
  21684. url: options.httpUrl,
  21685. filePath: files[i].path,
  21686. header: options.headers,
  21687. //加入请求头
  21688. name: options.name || "file",
  21689. success: function success(response) {
  21690. response.data = JSON.parse(response.data);
  21691. //请求完成回调
  21692. _this.requestEnd && _this.requestEnd(options, response);
  21693. //是否用外部的数据处理方法
  21694. if (options.isFactory && _this.dataFactory) {
  21695. //数据处理
  21696. var factoryInfo = _this.dataFactory(options, response);
  21697. if (factoryInfo.success) {
  21698. fileList.push(factoryInfo.result);
  21699. if (len <= i) {
  21700. callback(true, fileList);
  21701. } else {
  21702. fileUpload(i + 1);
  21703. }
  21704. } else {
  21705. callback(false, factoryInfo.result);
  21706. }
  21707. } else {
  21708. fileList.push(response.data);
  21709. if (len <= i) {
  21710. callback(true, fileList);
  21711. } else {
  21712. fileUpload(i + 1);
  21713. }
  21714. }
  21715. },
  21716. fail: function fail(err) {
  21717. //请求完成回调
  21718. _this.requestEnd && _this.requestEnd(options, err);
  21719. callback(false, err);
  21720. }
  21721. };
  21722. if (options.data) {
  21723. config.formData = options.data;
  21724. }
  21725. uni.uploadFile(config);
  21726. }
  21727. }
  21728. }]);
  21729. return request;
  21730. }();
  21731. exports.default = request;
  21732. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21733. /***/ }),
  21734. /* 55 */
  21735. /*!***********************************************************!*\
  21736. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/config.js ***!
  21737. \***********************************************************/
  21738. /*! no static exports found */
  21739. /***/ (function(module, exports, __webpack_require__) {
  21740. "use strict";
  21741. /* WEBPACK VAR INJECTION */(function(uni) {
  21742. Object.defineProperty(exports, "__esModule", {
  21743. value: true
  21744. });
  21745. exports.default = void 0;
  21746. var _constant = __webpack_require__(/*! ./pages/utils/constant.js */ 50);
  21747. // console.log(BASE_URI)
  21748. var baseUrl = _constant.BASE_URI;
  21749. var device, platform;
  21750. device = uni.getSystemInfoSync().brand + ' ' + uni.getSystemInfoSync().model;
  21751. platform = 'wxmini';
  21752. // app版本
  21753. var version = "1.0";
  21754. // 高德地图 key
  21755. var key = "53ea64b17287b1f7323e9f29870af813";
  21756. var _default = {
  21757. device: device,
  21758. version: version,
  21759. platform: platform,
  21760. key: key,
  21761. baseUrl: baseUrl
  21762. };
  21763. exports.default = _default;
  21764. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  21765. /***/ }),
  21766. /* 56 */,
  21767. /* 57 */,
  21768. /* 58 */,
  21769. /* 59 */,
  21770. /* 60 */
  21771. /*!*********************************************************************************!*\
  21772. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/common/assets/image/logobig.png ***!
  21773. \*********************************************************************************/
  21774. /*! no static exports found */
  21775. /***/ (function(module, exports) {
  21776. module.exports = "/common/assets/image/logobig.png";
  21777. /***/ }),
  21778. /* 61 */
  21779. /*!*****************************************************************************!*\
  21780. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages/chooseIdentity/sj.png ***!
  21781. \*****************************************************************************/
  21782. /*! no static exports found */
  21783. /***/ (function(module, exports) {
  21784. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAACl9JREFUWEetWW1QVOcVft67u9zdZYFdYReMRDAIqPGLEUo00QiYCEYTbTQ/2thMmjhpqp026TSNnbFDzY+o+dE/iYmjYz5ME9uEpJNaFu2wKMaIihJFEQU0fhDZXUD2++vufTvvXRd3BXbv2p6ZnQv3nvOc5z33/TjnXIL/QVpabDoEyVIaxmJwdC4opgPIBSE6BkspdRHABuAKJegAIce4NNpSVWVy369bch+GxGK21VFCNhDQWoCoU8OgfkphJsCe1hM7m+rr68VU7FMhTFoah56lnPgWgBmpOJlIl1J0AbS+ps70JXshcjBlEW5psk2nlOwGwVI5oKnqUKBFydFXHn/S1JPMNinh5qbB9aDiB4QQbSIwx/BNXL/8HVwjA1BrsjC1ZCFyJpck8z/6nIJ6APpqTW3uvkRGExKur6/nllRu3AaCPyQCcI3cQsfRfejvOzVGrXjucswsfxpD1j5odTnIzisCIVyyQexobXtv80Rze1zCEtlHNu0G6C8ToV/pOox2y26EhWAyEtJzfU4BHln+GxiMBUn0yd7Wtnc3jEd6XMKWJvt2AG8kQj3f9gU62/4hi2isklKlxuPPbIYpf1ZiW4p3quuMYziMIczmLAH9JBHa5e/NOH14b8pkowYqPh21P9sOXVZuQgwK8Rf3zuk4wkcO2YoFER0EJH0iJFt/Fyxf/gWUprR9joFjC3LZurdAuInnNKXUyxHMq6o19UYBYgmT5iZ7MwGqJiIrhAJo3Pc6PE52eEUkGBJw2+mEPxiCguOQka5FZroWhCTdgLBg6UsomV+bbGocrq4zVkf36VHUZrNtHSEk4aTsOXdIWmRREYQwfrQPQqTxe366Ro0cfZZEOhAMwePzQ6vmoebT4sjxmgys3rAbHKdISJqIdF3VCulwgUSY7QqLKzd2EoKEK6Hdsgc95w6Ogg+OOOD1B/DYwgUoKS6U7t/st+Lc+W543V7wKhUcHi/C4TBCgoDcbAM0PB9HjhHWpOuTrYfu6loj40YlwhazbQUI+Xcyq47WT9B95l+jat5gEFs2b0RpyUNjTC/3XJXuFU8vhCiKOHW6Ex9+0gAxGIqbLs9t+hsUyvjIj8uD0qeq60yNEuFms+0rQsiaZIQvdTTizJEPJTVKKTZuegHz585MZjb63O32YtuO92GzDkr32C6x6sV3ZdlT4J81tcY1hKWINAC7nKxr4HonWr7aKjnIyzVi69bXZTmLVTp9phO7dn0m3SoofQyL6n4rE4P6CQ8jaT5oX0UovpFjFQx40PD+i9KCff7na2AwZKL7Uh+8Hh80Wg2mFeajomLeKFR7+zn0XbkOvz+AjIx0zJ0zA0VFBdi8eQeGb4/gJ0+8iqKH2QYgTwjBKtLcZNtGQP4ozwQ4tP9N6NL8eO21l3DixPeYPbsE6ela+Hx+OJ1uTJv24CjU1as3kJWVAbWah8PpwsWuXlRVLcTHHzWg7WQHVr24E9qMbLmuARE7WDJ+EIQ8Kdeq7/R+lM1QY0H5bMnE6fHju7N9qKooBa9SSvfCwQBuX7qA7NllCAQFWNovobq8FGpeJT3/sd+KTz9vRsVTf5br9o4ebWKEe0AIK20SShoXQGnWJVy4cB6FRQ+goDBf0t/V0Ip9jSfx++eXYU3VfOme++Y1KNQaaHJM+LTxBD5oOIpXnl2M9Ssqpedswf79czOW1yzGLe9kWP15ydxHnlPaS5rNdgchyExmka+9geKsXgzYR6A2FkCvj5g0NJ/BXz+z4O1Nq7G4LDJu36AVgs+HjAcLceh4F7buacSWl1dg+cK723zv+U5Mz9fDH+Zx3LYomfsoYRexNNlZUpD0HJ2ivYmSrB4pOsicDKJQAWLE9LbHB0PG3fxeFAQMXzyLnDkLJEdDDg+yM7UsQgA7sgkBddlAwgH4BB5tdpmE2cEhl7BW6UGl8WRkpDoTIHJAOBz5n81dZWT+UmkQwGDnaRjnVUQjAwSCdwmzI9plBcQQbnnz0O2QvZdTYjHbnSDIkPNOZus7YdQMAtpsIByTZbGoqSNHbsjjhqOvG9rJ+dAa78xNQQBCwl0XbIAeG8IiRbu9HN7whMlhHC1KqVP2omOWShLCw4YLMOgpCE2LRIyJggPSEhyvLOoswlHh0xAasePiSCmGAjlyYhV9U73E0mQzAyRJjhePWZAzjIdyhiJRY9FVKqSrZ8AOwecHFQQQpRJKNQ/ekCVdpekTFqXBiZwCR7qL5CydeMeUHmJzOGk5dG8IdOoAygtvSFyjwhZa5859oEotsmbNQcjpwNCp4yh6ZhlM5XPjIGzOdFzonyw/snc0Keh20nLQvpJS3E3BZMKU5NkwxeAco+28eh3umwNQqHkYSouQlil1rUYlLBKcujIVvlDkEElFKMHTKSU/seAcEVFW0I9MTSAVn7j4owkDjqTb/jiYd5If9qS5yf41AVan5JntZoow5k3tR4ZaXpl/1T4JPwxOStWNpE8p/bqmzvTTlBL48TzxigAWTfkeSE+QxFARfpcPx/vvZnIps45N4NlytTTZu+6nyZdGfHhU/QWgNQC6PEAV28wkgOAHgh6Ewhy+tS5OmWckuug6euK9OayxMrrOWxptaylHvkgVUU3cWKj+aqwZUQB8BsDrIkcxJTg8cH+9RErpczV1JolbXJlvMdstqXYotcSBSu2BCBSrfjkVoNIASj6yR8fIkVtLICJxhXzvyCloS02tqWZMmc8UWVtVpDibrFMZC6pTulBhbJf1Yo5ZFyEoxlfNiQxZR1PJoSy2DTtOq8q6noBL2KqKdZKhcqI857Qswm22SvjCCbu2cThJW1VRbctB+w7QxG1WpnvtRh8a//MRNj83E2XFiU+ukxf78ae9bagsX46qR1dAoUgyNUTsqF5hHFO6JWi3/no3QOLarS63A/0D13Dl2mX80H8ZnV1nEQj4pXEumVeA3619ZAzxYacP7+w/hv2W85KeUqmEQW9AQf50TJtajPy8ApiMDyDHYIJCEUlRAbq3tW2n/HYrM2HdoMm5S99uP3fsjaFhK+zDVvgDXgiCAJ8vUgWPjDgkAqwAjUp56QN4Yfk8zC3KxYHjPfjgm3a4vJHTkEWV4zhotRoolQqwPgXDYS0t1q4yZGZj9oyKd3TagTdTamjHTqTyx1atB0ffZx1NUaRwudzIzNRJThwOJ0IhQaqKY0kze57nIQghhFmGdkeYHiv59fosqFRKBINBsP4cGwDrVIKKv2r/tvH+PhnEkp6/ZGWxEmSX2+Wu0mgi0WHCyvpAIACOI+B5NXw+H3g+LdIEDAQlPfYLhcLSld1jJZbBoB/FcLs94NPSDnOEbjhz/OBoW3WiVZy0losxJLMWPLE2Xauux52mocfjhdfrk1TYq2ZkWQQZKUaQRTf6N9Nh0WQyaZIBCgUHCtodpuEtHUfNDf/Xz173jJYrX7KylgAve32BOo/bM+6HRVZVM/LsFycU/uwcfRPhuN3trQfMcolGMVKJ8Ji3ZJy1VKcR/VWgeJQjpIwCDxHARBGpEQngpoAVQC+h5JxI6FEf5zhs7+q670+3/wVUuSN+R4aMeAAAAABJRU5ErkJggg=="
  21785. /***/ }),
  21786. /* 62 */
  21787. /*!*****************************************************************************!*\
  21788. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages/chooseIdentity/qy.png ***!
  21789. \*****************************************************************************/
  21790. /*! no static exports found */
  21791. /***/ (function(module, exports) {
  21792. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAABa9JREFUWEfFmU1sVFUUgL/zoFChpUNTZkoQiLWloAJhoS5QU8QoP2L4T1zgwtgARqMuRF1oalwosAATIzWoC12YaPmJRqgapNG4ICwQlPJXIaAJzBRkpoUKbXlH75sOM533pu/NTIW7e+/dc+73zj333nPOFYpoGtOybqHBtnlYYBZKrQoRgTKjVqFblBjCaYVDlvJLucV+CcuVQoeV/AVVEjEWqtIoygKE0rx0KNdU2CvCx1s+pLWpSex85PMAVonHWCE27yBMz2eQnH2VdrVoCoVpAdEgOgMBJ2JaqzbbRWgIojTfPqrsF4u1FWE55SfrC5yI6hpVmkUY46esmO+qXBVhfUVEPh9KT07gpia1Xl7PewKvFgOSr6zCpq3beCOXb3sCO7DrHBd4Nt8Bh6O/Kp9ubabRC9oTOB7VjQIbMgdXhUvH4PJJ6P+neKyRd0BlPVROB/GgUNgcisggBjOqq6vxWeCzbCQDG/u1eNBsDRNmQ9U9OfU+k+3Tg4ATMa1T5ZDA2GwVp3YPj2Wz9RpL1y31BlalRyxmV4SlI9UjA1glfoF9IszzEj/2hftt2SQYXwdigd0Lnb/D9Xi638TKTdxZ9RaWdR3bLuWvi29z/m/XLDPj6dwzp0pbqJpHU/v0TeB4TFeJ8mUu0WxgAzltBVgj0xI9F+HsD+nn+6eVOrCpZqAPnnQvgKGAjawKq0Jhabnpw2ZXeGUdvyHk9KZsYKsE6lcO/r3rXXD62/S7B6e7V9OB4+4DzQ8Y5XhFtWETdTQmYroIJWMot51dwCOhflUWcAJO7xl+CzsahcUVYdnjAMejulNg2VB7gJcPT5oL46Ykpcy213k4ufWl2nD4cEqXwu5QRJaJCRG7bDr9oi4vYKOsZOzAousvfBfxdQnHIlwbZzFBujp1idp8PZR1zTdPYIHSUBL4Rh/0dvlp8f4eCNh4hcUSiUfVxAuv+Q3lBTy5AcompiUvHoXOI+nnqQ0QmTkwAzcgegTO/eQeKSiwiTMkEdXvgMfzBfbcJbIW3QMvJmFTzb4BBz8oHBholcQFPYVQOyzA2dvaS26tB94vAljpMC6REBiXLzDm4FgOI0rSkldjcG5fxrb2Algjhs/CqnQblzA5lW8g7+XDYyIwvja96C4dhd7uNOCURyAyKwlt3KFYH3YOvWKA/WYl6Pegi84Bjke1S6DcT7mfhe0+uNg+eGsbVQ5V94JZoGYeL3dAT7RwH1alq+BF5wQ/y5MwqdYTg7MZPjxlPowNZ/hwH5zYCWQl9oEtbBZdIqp7gQX5WjhI8FOzGEZnLecTLWBmI7MFBobvjUu40iEv+EKCn5pFMLpisLZigBU2mqP5SbX5Jl8Lm/6T50FZdcZJ154MgFKtaiZMuC/9fOU8/NlWuA+L8lRxwU+AWMIsvBGjwLYHshGP+k4gl0gFP+Z/41HdJZAjs0paJFe05jczQb4HAVbYFYrI8oID+CAgQfsEAR4UwDsHyAXahyryBbGwyYBDd4OMAL0B8T+Cxci+wEr7lmZmmsJKZhK6UpSvclklCPBdT0BpZVrDtctwptXfzn7AKqwOhcVhy07zf8xVoQwCXL/aHeycyJmHp3/EJ83fH6pmvivNN+IDZdXDXpXK2wGsOBXNOZll2MClqtsBDAxdqkpNUjyqm7LLrLca2KRDoYi4UrfA5dZbCZx3udVY2lSDls7offdMW98GJ8T/n5uJ/qY+VELNY6M2b93G63kVtDPZdjReWYOwTcRd0RzWf1B61GLdiuaywq4MMmFa1l6rE+37SEQ8K5vFg2tbf39J4+pPSm+WVXPp9M3l0oLOtdfK/27VmoYqGuYFrxxXizdDYXYM67VXJoRT6XyeBao8J8pCvxKX6weSF4utImyvCLM3KGhKTx4WdtvOubq1mWcLcwXmoNSoEE7liApXRIkidCgcsZSfyy3airm6/RcvgnQJJF0SGAAAAABJRU5ErkJggg=="
  21793. /***/ }),
  21794. /* 63 */,
  21795. /* 64 */,
  21796. /* 65 */,
  21797. /* 66 */,
  21798. /* 67 */,
  21799. /* 68 */,
  21800. /* 69 */,
  21801. /* 70 */,
  21802. /* 71 */
  21803. /*!************************************************************************!*\
  21804. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages/login/topimg.png ***!
  21805. \************************************************************************/
  21806. /*! no static exports found */
  21807. /***/ (function(module, exports) {
  21808. module.exports = "/pages/login/topimg.png";
  21809. /***/ }),
  21810. /* 72 */
  21811. /*!*********************************************************************************!*\
  21812. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/common/assets/image/comicon.png ***!
  21813. \*********************************************************************************/
  21814. /*! no static exports found */
  21815. /***/ (function(module, exports) {
  21816. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAEuElEQVR4Xu2aXWgcVRTH/+dOdNNG0yagKAqKoi+RggVFBKX6oC8Rq5AgSCFsdia7iQ+iIgUfXEHESP2ga+vO3Nk8GH0xVRFRH1QQQcX6UEEfikUUMeJHCTYq3ZjMPXLLbolpdjd3PrTN3oFA2Jz7n3N/93/O3Dsbgr3aEiDLpz0BC6iDQywgCyhZE7EOsg6yDkpGwDooGT/bg6yDrIOSEbAOSsbP9qD/ykGu644CuIGIdgHYYrhuJ5n5IwBfSClfMxybaXgiB42MjDiDg4PXR1H0rBDi1jQyVUp97DjOwwsLC0fm5uaiNDSTaCQCNDExcTczvwDgyiRJrDP2eyJ60Pf9t1LWNZaLDahYLF4cRdFhIrqicdffmXm/EOJtpdRJk0yEEFuY+U4ADwEYbIw9rpS6MQzD70y00o6NBcjzvPMAvApgpJHQt1EU7a7Val8nSXB8fPw6x3HeAHCN1mHmd4lodxAEy0l0k4yNBagxkfcAXA7gZ2beI6X8IEkizbGFQuEWIYRu1JcAmGfmYSnll2lox9GIBch13WEiehnAgF5lpdSeWq22ECeBtWPGxsa253K5GWa+B8AJpVQhDMNDaWjH0YgFyPO8BwDsA5AD8GIul3ukUqksxUlg7ZhyudwzPz8/TUS6Hy0T0V7f959LQzuORlxAjwMoN25YDoLgiTg3bzXG87xM9U1ytYA60LKALCCTgjoz1jro/3CQPqP19/dv6+3tbbsA9XqdFxcXT6w9c236Jl0sFi9TSu1n5r52C0RES0qpqTAMf1wdt+kBua57LRF9DmB7BwfrM9vOIAiOtgLEzFIIEWykkxDRD9Vq9deNxG40JpMe5Hne1cz8PhH1d0ikTkS3+b5/rI2DNjqXZpw+nnwSRdFTfX19R5NuYLMCtFUpdZMQoqfd7JhZ1ev1z2ZnZ/9KEdApKWb+jYgO5HK55yuVyqIp5WZ8JoDiJtMct7oHMfNP+mcjmvrVCxFdtCp2iZmnpZR6Zx7rOusB6SONyVGmVCrtUErtY2b9hlOfFbWb7pJSvqN/NaW06QBpAPl8/sKenp5pAKUGkCMA7giC4LgF1CCQz+evchznTSLaAeAXZr5XSvmpBdQgMDk5ecHy8nKViO4H8CcRlXzff8UCahDQu/mBgYEnAewFEBHRY77v67IzujLpQY3Vux2Afnfd8iKiaGVl5cOZmZk/2jzmjZp02jqZAEpzJ236FLOADAokjTNdJg7yPO9SZn4awNYOJfa3EOLRarU6n/bKa72zFpDBIq8b2mpizEyjo6Oilf7Q0BCXy2XV/HvXAXJd92YhxDAzO+tBUkp9FYbh6Ud51wFa83XTGYyY+ZCUsvltb/eVWKFQmBJCPAPg/BZl9noQBPd1bYl5nreTmXe1KjEA34RhePo/QrquxEybvwXUgZgFZAGdIrD5zmKmvWJtfBql0ZU7aVPwaYDO5CxmOpFN7SAiOqiUOpgUyurx+u0fgCn9WRL91Tpxe1kaDkqTTZZasZq9BdRhSWIBcl13kogms1zuDLRfCoLggKluLECmNzmX4y2gLErsXHaEae7WQdZBpp75d7x1kHWQdVAyAtZByfjZHmQdZB2UjIB1UDJ+tgd14PcP4hYGdl6JvtEAAAAASUVORK5CYII="
  21817. /***/ }),
  21818. /* 73 */
  21819. /*!*********************************************************************************!*\
  21820. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/common/assets/image/pswicon.svg ***!
  21821. \*********************************************************************************/
  21822. /*! no static exports found */
  21823. /***/ (function(module, exports, __webpack_require__) {
  21824. module.exports = __webpack_require__.p + "static/img/pswicon.5cb4118b.svg";
  21825. /***/ }),
  21826. /* 74 */
  21827. /*!*********************************************************************************!*\
  21828. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/common/assets/image/yzmicon.svg ***!
  21829. \*********************************************************************************/
  21830. /*! no static exports found */
  21831. /***/ (function(module, exports, __webpack_require__) {
  21832. module.exports = __webpack_require__.p + "static/img/yzmicon.83dc7c55.svg";
  21833. /***/ }),
  21834. /* 75 */,
  21835. /* 76 */,
  21836. /* 77 */
  21837. /*!******************************************************************************************!*\
  21838. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/wxcomponents/weapp/dist/dialog/dialog.js ***!
  21839. \******************************************************************************************/
  21840. /*! no static exports found */
  21841. /***/ (function(module, exports, __webpack_require__) {
  21842. "use strict";
  21843. /* WEBPACK VAR INJECTION */(function(wx) {
  21844. Object.defineProperty(exports, "__esModule", {
  21845. value: true
  21846. });
  21847. exports.default = void 0;
  21848. var queue = [];
  21849. var defaultOptions = {
  21850. show: false,
  21851. title: '',
  21852. width: null,
  21853. theme: 'default',
  21854. message: '',
  21855. zIndex: 100,
  21856. overlay: true,
  21857. selector: '#van-dialog',
  21858. className: '',
  21859. asyncClose: false,
  21860. beforeClose: null,
  21861. transition: 'scale',
  21862. customStyle: '',
  21863. messageAlign: '',
  21864. overlayStyle: '',
  21865. confirmButtonText: '确认',
  21866. cancelButtonText: '取消',
  21867. showConfirmButton: true,
  21868. showCancelButton: false,
  21869. closeOnClickOverlay: false,
  21870. confirmButtonOpenType: ''
  21871. };
  21872. var currentOptions = Object.assign({}, defaultOptions);
  21873. function getContext() {
  21874. var pages = getCurrentPages();
  21875. return pages[pages.length - 1];
  21876. }
  21877. var Dialog = function Dialog(options) {
  21878. options = Object.assign(Object.assign({}, currentOptions), options);
  21879. return new Promise(function (resolve, reject) {
  21880. var context = (typeof options.context === 'function' ? options.context() : options.context) || getContext();
  21881. var dialog = context.selectComponent(options.selector);
  21882. delete options.context;
  21883. delete options.selector;
  21884. if (dialog) {
  21885. dialog.setData(Object.assign({
  21886. callback: function callback(action, instance) {
  21887. action === 'confirm' ? resolve(instance) : reject(instance);
  21888. }
  21889. }, options));
  21890. wx.nextTick(function () {
  21891. dialog.setData({
  21892. show: true
  21893. });
  21894. });
  21895. queue.push(dialog);
  21896. } else {
  21897. console.warn('未找到 van-dialog 节点,请确认 selector 及 context 是否正确');
  21898. }
  21899. });
  21900. };
  21901. Dialog.alert = function (options) {
  21902. return Dialog(options);
  21903. };
  21904. Dialog.confirm = function (options) {
  21905. return Dialog(Object.assign({
  21906. showCancelButton: true
  21907. }, options));
  21908. };
  21909. Dialog.close = function () {
  21910. queue.forEach(function (dialog) {
  21911. dialog.close();
  21912. });
  21913. queue = [];
  21914. };
  21915. Dialog.stopLoading = function () {
  21916. queue.forEach(function (dialog) {
  21917. dialog.stopLoading();
  21918. });
  21919. };
  21920. Dialog.currentOptions = currentOptions;
  21921. Dialog.defaultOptions = defaultOptions;
  21922. Dialog.setDefaultOptions = function (options) {
  21923. currentOptions = Object.assign(Object.assign({}, currentOptions), options);
  21924. Dialog.currentOptions = currentOptions;
  21925. };
  21926. Dialog.resetDefaultOptions = function () {
  21927. currentOptions = Object.assign({}, defaultOptions);
  21928. Dialog.currentOptions = currentOptions;
  21929. };
  21930. Dialog.resetDefaultOptions();
  21931. var _default = Dialog;
  21932. exports.default = _default;
  21933. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  21934. /***/ }),
  21935. /* 78 */
  21936. /*!****************************************************************!*\
  21937. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/http.js ***!
  21938. \****************************************************************/
  21939. /*! no static exports found */
  21940. /***/ (function(module, exports, __webpack_require__) {
  21941. "use strict";
  21942. /* WEBPACK VAR INJECTION */(function(uni) {
  21943. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  21944. Object.defineProperty(exports, "__esModule", {
  21945. value: true
  21946. });
  21947. exports.addInterview = addInterview;
  21948. exports.addRectificationManagement = addRectificationManagement;
  21949. exports.addRepair = addRepair;
  21950. exports.addSafetySelfCheckingManage = addSafetySelfCheckingManage;
  21951. exports.addSafetySelfCheckingPlan = addSafetySelfCheckingPlan;
  21952. exports.addZaiti = addZaiti;
  21953. exports.addyixiang = addyixiang;
  21954. exports.bindWxOpenId = bindWxOpenId;
  21955. exports.cancelAppoint = cancelAppoint;
  21956. exports.clickCollect = clickCollect;
  21957. exports.companyECdit = companyECdit;
  21958. exports.companyExamineAdd = companyExamineAdd;
  21959. exports.confirmAudit = confirmAudit;
  21960. exports.editBizPassword = editBizPassword;
  21961. exports.editDriverPassword = editDriverPassword;
  21962. exports.editFramePassword = editFramePassword;
  21963. exports.editInterview = editInterview;
  21964. exports.editRepair = editRepair;
  21965. exports.editSave = editSave;
  21966. exports.editWanderAboutStatus = editWanderAboutStatus;
  21967. exports.findAllSimpleCompanies = findAllSimpleCompanies;
  21968. exports.findCompanyInfoList = findCompanyInfoList;
  21969. exports.findCompanyList = findCompanyList;
  21970. exports.findCompanyTags = findCompanyTags;
  21971. exports.findDeptList = findDeptList;
  21972. exports.findListBySaleManagementId = findListBySaleManagementId;
  21973. exports.findLongPanList = findLongPanList;
  21974. exports.findLouDongList = findLouDongList;
  21975. exports.findRectificationManagementInOutById = findRectificationManagementInOutById;
  21976. exports.findRectificationManagementInOutList = findRectificationManagementInOutList;
  21977. exports.findRoomByCondition = findRoomByCondition;
  21978. exports.findRoomInfoListByIds = findRoomInfoListByIds;
  21979. exports.findSafetySelfCheckingManageList = findSafetySelfCheckingManageList;
  21980. exports.findSafetySelfCheckingManagetById = findSafetySelfCheckingManagetById;
  21981. exports.findSafetySelfCheckingPlanById = findSafetySelfCheckingPlanById;
  21982. exports.findSafetySelfCheckingPlanList = findSafetySelfCheckingPlanList;
  21983. exports.findSuccessListBySaleManagementId = findSuccessListBySaleManagementId;
  21984. exports.findTrackUserList = findTrackUserList;
  21985. exports.findUserListByRoleWuye = findUserListByRoleWuye;
  21986. exports.findYuanQuList = findYuanQuList;
  21987. exports.getActivationRanking = getActivationRanking;
  21988. exports.getActivityById = getActivityById;
  21989. exports.getActivityById1 = getActivityById1;
  21990. exports.getAppUserMain = getAppUserMain;
  21991. exports.getBuildDetails = getBuildDetails;
  21992. exports.getByCodes = getByCodes;
  21993. exports.getBySaveStatus = getBySaveStatus;
  21994. exports.getCompanyAll = getCompanyAll;
  21995. exports.getCompanyById = getCompanyById;
  21996. exports.getCompanyHouseDetails = getCompanyHouseDetails;
  21997. exports.getCompanyTags = getCompanyTags;
  21998. exports.getCompanyTagsByQybq = getCompanyTagsByQybq;
  21999. exports.getDetial = getDetial;
  22000. exports.getDispatchToPerson = getDispatchToPerson;
  22001. exports.getInterviewDetails = getInterviewDetails;
  22002. exports.getInterviewList = getInterviewList;
  22003. exports.getMeetingAppointListAppCount = getMeetingAppointListAppCount;
  22004. exports.getPartyBranchList = getPartyBranchList;
  22005. exports.getRepairDispatchById = getRepairDispatchById;
  22006. exports.getRepairList = getRepairList;
  22007. exports.getRoomInfo = getRoomInfo;
  22008. exports.getRoomNameByCompanyId = getRoomNameByCompanyId;
  22009. exports.getSelectDeptTwo = getSelectDeptTwo;
  22010. exports.getSelectUserTwo = getSelectUserTwo;
  22011. exports.getTreeData2 = getTreeData2;
  22012. exports.getTreeData4 = getTreeData4;
  22013. exports.getTreeData6 = getTreeData6;
  22014. exports.getUserInfo = getUserInfo;
  22015. exports.getUserLocalStorageInfo = getUserLocalStorageInfo;
  22016. exports.getUserPower = getUserPower;
  22017. exports.getVenueAppointListAppCount = getVenueAppointListAppCount;
  22018. exports.getWxCompanyTags = getWxCompanyTags;
  22019. exports.getWxUserById = getWxUserById;
  22020. exports.handleList = handleList;
  22021. exports.insertRegisSignInfo = insertRegisSignInfo;
  22022. exports.interviewEscalationListAll = interviewEscalationListAll;
  22023. exports.list = list;
  22024. exports.listAllUserMain = listAllUserMain;
  22025. exports.listApp = listApp;
  22026. exports.listByModel = listByModel;
  22027. exports.listVo = listVo;
  22028. exports.login = login;
  22029. exports.loginByWeChat = loginByWeChat;
  22030. exports.readList = readList;
  22031. exports.removeTagsBind = removeTagsBind;
  22032. exports.repairList = repairList;
  22033. exports.repairList2 = repairList2;
  22034. exports.richScan = richScan;
  22035. exports.saleControllerGetById = saleControllerGetById;
  22036. exports.selectByCompanyId = selectByCompanyId;
  22037. exports.tagCategoryList = tagCategoryList;
  22038. exports.tagInfoList = tagInfoList;
  22039. exports.tagsBind = tagsBind;
  22040. exports.unbindWxId = unbindWxId;
  22041. exports.updateListRectificationManagement = updateListRectificationManagement;
  22042. exports.updateSafetySelfCheckingManage = updateSafetySelfCheckingManage;
  22043. exports.uploadPDF = uploadPDF;
  22044. exports.userList = userList;
  22045. var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
  22046. var _requestConfig = _interopRequireDefault(__webpack_require__(/*! ./request/requestConfig */ 53));
  22047. var _constant = __webpack_require__(/*! ../pages/utils/constant.js */ 50);
  22048. var _qs = _interopRequireDefault(__webpack_require__(/*! qs */ 79));
  22049. 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; }
  22050. 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; }
  22051. var baseUri = '/smartParkH5Server';
  22052. var parkActivity = '/wx/meetingAppoint';
  22053. function login(data) {
  22054. return _requestConfig.default.post('/wx/auth/login_by_app_main?' + _qs.default.stringify(data), {}, {});
  22055. }
  22056. function addRectificationManagement(data) {
  22057. return _requestConfig.default.post('/wx/RectificationController/addRectificationManagement', data, {});
  22058. }
  22059. // /wx/dock/getCarDataByBiz
  22060. function loginByWeChat(data) {
  22061. return _requestConfig.default.post('/wx/auth/loginByWeChat', data, {});
  22062. }
  22063. function bindWxOpenId(data) {
  22064. return _requestConfig.default.post('/wx/frameUser/bindWxOpenId', data, {});
  22065. }
  22066. function getMeetingAppointListAppCount(data) {
  22067. return _requestConfig.default.post('/wx/meetingAppoint/getMeetingAppointListAppCount', {
  22068. states: '1,3'
  22069. }, {});
  22070. }
  22071. function getVenueAppointListAppCount(data) {
  22072. return _requestConfig.default.post('/wx/WxParkVenueAppointController/getVenueAppointListAppCount', {
  22073. states: '1,3'
  22074. }, {});
  22075. }
  22076. function editWanderAboutStatus(data) {
  22077. return _requestConfig.default.post('/wx/repair/editWanderAboutStatus', data, {});
  22078. }
  22079. function unbindWxId(data) {
  22080. return _requestConfig.default.post('/wx/frameUser/unbindWxOpenId', data, {});
  22081. }
  22082. function getUserLocalStorageInfo() {
  22083. var userInfo = JSON.parse(uni.getStorageSync("laocui_user_info"));
  22084. return userInfo;
  22085. }
  22086. function uploadPDF() {
  22087. uni.showLoading({
  22088. title: '加载中',
  22089. mask: true
  22090. });
  22091. return new Promise(function (resolve, reject) {
  22092. uni.chooseMessageFile({
  22093. count: 1,
  22094. //默认100
  22095. type: 'file',
  22096. success: function success(res) {
  22097. uni.uploadFile({
  22098. url: _constant.BASE_URI + "/wx/fileController/upload",
  22099. filePath: res.tempFiles[0].path,
  22100. name: "file",
  22101. formData: {
  22102. user: "test"
  22103. },
  22104. success: function success(successRes) {
  22105. // 上传完成需要更新 fileList
  22106. var data = JSON.parse(successRes.data);
  22107. uni.showToast({
  22108. title: '提交成功',
  22109. duration: 500
  22110. });
  22111. resolve({
  22112. url: data.data[0],
  22113. name: res.tempFiles[0].name
  22114. });
  22115. },
  22116. fail: function fail(res) {}
  22117. });
  22118. },
  22119. fail: function fail(e) {
  22120. uni.showToast({
  22121. title: '提交成功',
  22122. duration: 0
  22123. });
  22124. }
  22125. });
  22126. });
  22127. }
  22128. function getBuildDetails(data) {
  22129. return _requestConfig.default.post('/wx/MnpBuildingController/getById', data, {});
  22130. }
  22131. function addZaiti(data) {
  22132. return _requestConfig.default.post('/wx/ParkRoomController/add', data, {});
  22133. }
  22134. function getPartyBranchList(data) {
  22135. return _requestConfig.default.post('/wx/partyBranch/getPartyBranchList', data, {});
  22136. }
  22137. function selectByCompanyId(data) {
  22138. return _requestConfig.default.post('/wx/SocialCarrierController/selectByCompanyId', data, {});
  22139. }
  22140. function getRoomNameByCompanyId(data) {
  22141. return _requestConfig.default.post('/wx/ParkContractManageController/getRoomNameByCompanyId', data, {});
  22142. }
  22143. function getTreeData2(data) {
  22144. return _requestConfig.default.post('/wx/ParkInfoController/getTreeData2', data, {});
  22145. }
  22146. function getTreeData6(data) {
  22147. return _requestConfig.default.post('/wx/ParkInfoController/getTreeData6', data, {});
  22148. }
  22149. function getTreeData4(data) {
  22150. return _requestConfig.default.post('/wx/ParkInfoController/getTreeData4', data, {});
  22151. }
  22152. function getActivationRanking(data) {
  22153. return _requestConfig.default.post('/wx/partyBranch/getActivationRanking', data, {});
  22154. }
  22155. function findRectificationManagementInOutList(data) {
  22156. return _requestConfig.default.post('/wx/RectificationController/findRectificationManagementInOutList', data, {});
  22157. }
  22158. function findRectificationManagementInOutById(e) {
  22159. return _requestConfig.default.post('/wx/RectificationController/findRectificationManagementInOutById', {
  22160. id: e
  22161. }, {});
  22162. }
  22163. function repairList(data) {
  22164. return _requestConfig.default.post('/wx/repair/serviceList', data, {});
  22165. }
  22166. function repairList2(data) {
  22167. return _requestConfig.default.post('/wx/repair/list', data, {});
  22168. }
  22169. function addSafetySelfCheckingManage(data) {
  22170. return _requestConfig.default.post('/wx/SafetyController/addSafetySelfCheckingManage', data, {});
  22171. }
  22172. function updateSafetySelfCheckingManage(data) {
  22173. return _requestConfig.default.post('/wx/SafetyController/updateSafetySelfCheckingManage', data, {});
  22174. }
  22175. function editRepair(data) {
  22176. return _requestConfig.default.post('/wx/repair/edit', data, {});
  22177. }
  22178. function addRepair(data) {
  22179. return _requestConfig.default.post('/wx/repair/add', data, {});
  22180. }
  22181. function getRepairDispatchById(id) {
  22182. return _requestConfig.default.post('/wx/repair/getById', {
  22183. id: id
  22184. }, {});
  22185. }
  22186. function getDispatchToPerson(data) {
  22187. return _requestConfig.default.post('/wx/repair/getDispatchToPerson', data, {});
  22188. }
  22189. function getCompanyById(data) {
  22190. return _requestConfig.default.post('/wx/repair/getCompanyById', data, {});
  22191. }
  22192. function getWxCompanyTags(e) {
  22193. return _requestConfig.default.post('/wx/MnpTagInfoController/tagInfoList', e, {});
  22194. }
  22195. function tagsBind(e) {
  22196. return _requestConfig.default.post('/wx/MnpTagInfoController/bind', e, {});
  22197. }
  22198. function getDetial(e) {
  22199. return _requestConfig.default.post('/wx/meetingAppoint/meetingAppointDetail', e, {});
  22200. }
  22201. function saleControllerGetById(e) {
  22202. return _requestConfig.default.post('/wx/SaleController/getById', {
  22203. id: e
  22204. }, {});
  22205. }
  22206. function getAppUserMain(data) {
  22207. return _requestConfig.default.post('/wx/company/getById', data, {});
  22208. }
  22209. function confirmAudit(data) {
  22210. return _requestConfig.default.post('/wx/meetingAppoint/confirmAudit', data, {});
  22211. }
  22212. function getCompanyTags(e) {
  22213. return _requestConfig.default.post('/wx/MnpTagInfoController/getCompanyTags', e, {});
  22214. }
  22215. function getCompanyTagsByQybq(qybq) {
  22216. return _requestConfig.default.post('/wx/MnpTagInfoController/getCompanyTagsByQybq', {
  22217. qybq: qybq
  22218. }, {});
  22219. }
  22220. function companyECdit(data) {
  22221. return _requestConfig.default.post('/wx/company/edit', data, {});
  22222. }
  22223. function tagInfoList(e) {
  22224. return _requestConfig.default.post('/wx/MnpTagInfoController/tagInfoList', e, {});
  22225. }
  22226. function findDeptList() {
  22227. return _requestConfig.default.post('/wx/SaleController/findDeptList', {}, {});
  22228. }
  22229. function tagCategoryList() {
  22230. return _requestConfig.default.post('/wx/MnpTagController/tagCategoryList', {}, {});
  22231. }
  22232. function interviewEscalationListAll(id) {
  22233. return _requestConfig.default.post('/wx/interviewEscalation/listAll', {
  22234. companyId: id
  22235. }, {});
  22236. }
  22237. function getUserInfo(data) {
  22238. var laocui_user_info = JSON.parse(uni.getStorageSync('laocui_user_info'));
  22239. return _requestConfig.default.post('/wx/frameUser/getMyInfo?userId=' + laocui_user_info.user.id, {}, {});
  22240. }
  22241. function getWxUserById(userId) {
  22242. return _requestConfig.default.get('/wx/frameUser/getWxUserById?userId=' + userId, {});
  22243. }
  22244. function getRoomInfo(e) {
  22245. return _requestConfig.default.post('/wx/ParkRoomController/getById', {
  22246. id: e
  22247. }, {});
  22248. }
  22249. function getCompanyHouseDetails(e) {
  22250. return _requestConfig.default.post('/wx/company/getById', {
  22251. id: e
  22252. }, {});
  22253. }
  22254. function handleList(e) {
  22255. return _requestConfig.default.post('/wx/workPaneController/handleList', e, {});
  22256. }
  22257. function readList(e) {
  22258. return _requestConfig.default.post('/wx/workPaneController/readList', e, {});
  22259. }
  22260. // handleList?
  22261. function findCompanyTags(e) {
  22262. return _requestConfig.default.post('/wx/MnpTagInfoController/getCompanyTags/' + e, {}, {});
  22263. }
  22264. function removeTagsBind(e) {
  22265. return _requestConfig.default.post('/wx/MnpTagInfoController/removeBind', e, {});
  22266. }
  22267. function addInterview(e) {
  22268. return _requestConfig.default.post("/wx/interviewEscalation/add", e, {});
  22269. }
  22270. function editInterview(e) {
  22271. return _requestConfig.default.post("/wx/interviewEscalation/edit", e, {});
  22272. }
  22273. function getInterviewList(e) {
  22274. return _requestConfig.default.post("/wx/interviewEscalation/list", e, {});
  22275. }
  22276. function getInterviewDetails(e) {
  22277. return _requestConfig.default.post("/wx/interviewEscalation/getById", {
  22278. id: e
  22279. }, {});
  22280. }
  22281. function findSafetySelfCheckingPlanById(e) {
  22282. return _requestConfig.default.post("/wx/SafetyController/findSafetySelfCheckingPlanById", {
  22283. id: e
  22284. }, {});
  22285. }
  22286. //
  22287. function findSafetySelfCheckingPlanList(e) {
  22288. return _requestConfig.default.post("/wx/SafetyController/findSafetySelfCheckingPlanList", e, {});
  22289. }
  22290. function getBySaveStatus(e) {
  22291. return _requestConfig.default.post("/wx/interviewEscalation/getBySaveStatus", {
  22292. createdBy: e
  22293. }, {});
  22294. }
  22295. function companyExamineAdd(e) {
  22296. return _requestConfig.default.post("/wx/company/add", e, {});
  22297. }
  22298. function listByModel(e) {
  22299. return _requestConfig.default.post('/wx/SaleController/findSaleManagementListByRoomId', e, {});
  22300. }
  22301. function listVo(e) {
  22302. // 查询园区列表,不需要参数
  22303. return _requestConfig.default.post('/wx/company/listVo', e, {});
  22304. }
  22305. // /wx/SafetyController/addSafetySelfCheckingPlan
  22306. function addSafetySelfCheckingPlan(e) {
  22307. // 查询园区列表,不需要参数
  22308. return _requestConfig.default.post('/wx/SafetyController/addSafetySelfCheckingPlan', _objectSpread({}, e), {});
  22309. }
  22310. function findSafetySelfCheckingManagetById(e) {
  22311. // 查询园区列表,不需要参数
  22312. return _requestConfig.default.post('/wx/SafetyController/findSafetySelfCheckingManagetById', {
  22313. id: e
  22314. }, {});
  22315. }
  22316. function findSafetySelfCheckingManageList(e) {
  22317. // 查询园区列表,不需要参数
  22318. return _requestConfig.default.post('/wx/SafetyController/findSafetySelfCheckingManageList', e, {});
  22319. }
  22320. function findYuanQuList() {
  22321. // 查询园区列表,不需要参数
  22322. return _requestConfig.default.post('/wx/SaleController/findYuanQuList', {}, {});
  22323. }
  22324. function findLongPanList(id) {
  22325. // 用园区ID查询楼盘列表
  22326. return _requestConfig.default.post('/wx/SaleController/findLouPanList', {
  22327. id: id
  22328. }, {});
  22329. }
  22330. function findLouDongList(id) {
  22331. // 用园区ID查询楼盘列表
  22332. return _requestConfig.default.post('/wx/SaleController/findLouDongList', {
  22333. id: id
  22334. }, {});
  22335. }
  22336. function clickCollect(e) {
  22337. return _requestConfig.default.post('/wx/parkActivity/clickCollect', e, {});
  22338. }
  22339. function insertRegisSignInfo(e) {
  22340. return _requestConfig.default.post('/wx/parkActivity/insertRegisSignInfo', e, {});
  22341. }
  22342. function richScan(e) {
  22343. return _requestConfig.default.post('/wx/parkActivity/richScan', e, {});
  22344. }
  22345. function getActivityById(id, signInCode, userId) {
  22346. return _requestConfig.default.get('/wx/parkActivity/getBySignInCode?id=' + id + '&userId=' + userId + "&signInCode=" + signInCode, {}, {});
  22347. }
  22348. function getActivityById1(id, signInCode, userId) {
  22349. return _requestConfig.default.get('/wx/parkActivity/getActivityById?id=' + id + '&userId=' + userId, {}, {});
  22350. }
  22351. function getUserPower(e) {
  22352. return _requestConfig.default.post('/wx/userPower/getUserPower', {
  22353. userId: e
  22354. }, {});
  22355. }
  22356. function editBizPassword(e) {
  22357. return _requestConfig.default.post('/wx/handleUser/editBizPassword', e, {});
  22358. }
  22359. function editFramePassword(e) {
  22360. return _requestConfig.default.post('/wx/handleUser/editFramePassword', e, {});
  22361. }
  22362. // /wx/handleUser/editDriverPassword
  22363. function editDriverPassword(e) {
  22364. return _requestConfig.default.post('/wx/handleUser/editDriverPassword', e, {});
  22365. }
  22366. function updateListRectificationManagement(e) {
  22367. return _requestConfig.default.post('/wx/RectificationController/updateListRectificationManagement', e, {});
  22368. }
  22369. function findListBySaleManagementId(e) {
  22370. return _requestConfig.default.post('/wx/SaleController/findListBySaleManagementId', e, {});
  22371. }
  22372. function findSuccessListBySaleManagementId(e) {
  22373. return _requestConfig.default.post('/wx/SaleController/findSuccessListBySaleManagementId', e, {});
  22374. }
  22375. function findUserListByRoleWuye() {
  22376. // 用园区ID查询楼盘列表
  22377. return _requestConfig.default.post('/wx/RectificationController/findUserListByRoleWuye', {}, {});
  22378. }
  22379. function listAllUserMain() {
  22380. // 用园区ID查询楼盘列表
  22381. return _requestConfig.default.post('/wx/UserMainExpandController/listAllUserMain', {}, {});
  22382. }
  22383. function userList(e) {
  22384. return _requestConfig.default.post('/wx/frameUser/userList', e, {});
  22385. }
  22386. function findAllSimpleCompanies(e) {
  22387. // http://192.168.2.112:9011/wx/frameUser/userList
  22388. return _requestConfig.default.post('/wx/company/findAllSimpleCompanies', {
  22389. searchInfo: e.qymc,
  22390. pageNum: 1,
  22391. pageSize: 10000
  22392. }, {});
  22393. }
  22394. function findTrackUserList() {
  22395. // http://192.168.2.112:9011/wx/frameUser/userList
  22396. return _requestConfig.default.post('/wx/SaleController/findTrackUserList', {}, {});
  22397. }
  22398. function getSelectUserTwo(e) {
  22399. // 用园区ID查询楼盘列表
  22400. return _requestConfig.default.post('/wx/frameUser/getSelectUserTwo', {
  22401. searchName: e
  22402. }, {});
  22403. }
  22404. function getSelectDeptTwo(e) {
  22405. // 用园区ID查询楼盘列表
  22406. return _requestConfig.default.post('/wx/frameUser/getSelectDeptTwo', {
  22407. searchName: e
  22408. }, {});
  22409. }
  22410. function findRoomInfoListByIds(e) {
  22411. // 用园区ID查询楼盘列表
  22412. return _requestConfig.default.post('/wx/SaleController/findRoomInfoListByIds', {
  22413. ids: e
  22414. }, {});
  22415. }
  22416. function findCompanyList() {
  22417. // 用园区ID查询楼盘列表
  22418. return _requestConfig.default.post('/wx/SaleController/findCompanyList', {}, {});
  22419. }
  22420. function addyixiang(e) {
  22421. return _requestConfig.default.post('/wx/SaleController/add', e, {});
  22422. }
  22423. function editSave(e) {
  22424. return _requestConfig.default.post('/wx/SaleController/editSave', e, {});
  22425. }
  22426. function findCompanyInfoList(data) {
  22427. return _requestConfig.default.post("/wx/SaleController/findCompanyInfoList", data, {});
  22428. }
  22429. function findRoomByCondition(params) {
  22430. // 用园区ID查询楼盘列表
  22431. return _requestConfig.default.post('/wx/SaleController/findRoomByCondition', params, {});
  22432. }
  22433. function getCompanyAll(qymc) {
  22434. return _requestConfig.default.post('/wx/company/listAll', {
  22435. qymc: qymc ? qymc : ""
  22436. }, {});
  22437. }
  22438. function getByCodes(params) {
  22439. // 用园区ID查询楼盘列表
  22440. return _requestConfig.default.post('/wx/sysDict/getByCodes', {
  22441. codes: params
  22442. }, {});
  22443. }
  22444. function list(data) {
  22445. return _requestConfig.default.post(parkActivity + '/getMeetingAppointList', data, {});
  22446. }
  22447. function listApp(data) {
  22448. return _requestConfig.default.post(parkActivity + '/getMeetingAppointListApp', data, {});
  22449. }
  22450. function cancelAppoint(data) {
  22451. return _requestConfig.default.post(parkActivity + '/cancelAppoint', data, {});
  22452. }
  22453. // /wx/SaleController/
  22454. function getRepairList(data) {
  22455. return _requestConfig.default.post('/wx/repair/list', data, {});
  22456. }
  22457. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  22458. /***/ }),
  22459. /* 79 */
  22460. /*!**************************************!*\
  22461. !*** ./node_modules/qs/lib/index.js ***!
  22462. \**************************************/
  22463. /*! no static exports found */
  22464. /***/ (function(module, exports, __webpack_require__) {
  22465. "use strict";
  22466. var stringify = __webpack_require__(/*! ./stringify */ 80);
  22467. var parse = __webpack_require__(/*! ./parse */ 94);
  22468. var formats = __webpack_require__(/*! ./formats */ 93);
  22469. module.exports = {
  22470. formats: formats,
  22471. parse: parse,
  22472. stringify: stringify
  22473. };
  22474. /***/ }),
  22475. /* 80 */
  22476. /*!******************************************!*\
  22477. !*** ./node_modules/qs/lib/stringify.js ***!
  22478. \******************************************/
  22479. /*! no static exports found */
  22480. /***/ (function(module, exports, __webpack_require__) {
  22481. "use strict";
  22482. var getSideChannel = __webpack_require__(/*! side-channel */ 81);
  22483. var utils = __webpack_require__(/*! ./utils */ 92);
  22484. var formats = __webpack_require__(/*! ./formats */ 93);
  22485. var has = Object.prototype.hasOwnProperty;
  22486. var arrayPrefixGenerators = {
  22487. brackets: function brackets(prefix) {
  22488. return prefix + '[]';
  22489. },
  22490. comma: 'comma',
  22491. indices: function indices(prefix, key) {
  22492. return prefix + '[' + key + ']';
  22493. },
  22494. repeat: function repeat(prefix) {
  22495. return prefix;
  22496. }
  22497. };
  22498. var isArray = Array.isArray;
  22499. var split = String.prototype.split;
  22500. var push = Array.prototype.push;
  22501. var pushToArray = function (arr, valueOrArray) {
  22502. push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
  22503. };
  22504. var toISO = Date.prototype.toISOString;
  22505. var defaultFormat = formats['default'];
  22506. var defaults = {
  22507. addQueryPrefix: false,
  22508. allowDots: false,
  22509. charset: 'utf-8',
  22510. charsetSentinel: false,
  22511. delimiter: '&',
  22512. encode: true,
  22513. encoder: utils.encode,
  22514. encodeValuesOnly: false,
  22515. format: defaultFormat,
  22516. formatter: formats.formatters[defaultFormat],
  22517. // deprecated
  22518. indices: false,
  22519. serializeDate: function serializeDate(date) {
  22520. return toISO.call(date);
  22521. },
  22522. skipNulls: false,
  22523. strictNullHandling: false
  22524. };
  22525. var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
  22526. return typeof v === 'string'
  22527. || typeof v === 'number'
  22528. || typeof v === 'boolean'
  22529. || typeof v === 'symbol'
  22530. || typeof v === 'bigint';
  22531. };
  22532. var sentinel = {};
  22533. var stringify = function stringify(
  22534. object,
  22535. prefix,
  22536. generateArrayPrefix,
  22537. commaRoundTrip,
  22538. strictNullHandling,
  22539. skipNulls,
  22540. encoder,
  22541. filter,
  22542. sort,
  22543. allowDots,
  22544. serializeDate,
  22545. format,
  22546. formatter,
  22547. encodeValuesOnly,
  22548. charset,
  22549. sideChannel
  22550. ) {
  22551. var obj = object;
  22552. var tmpSc = sideChannel;
  22553. var step = 0;
  22554. var findFlag = false;
  22555. while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
  22556. // Where object last appeared in the ref tree
  22557. var pos = tmpSc.get(object);
  22558. step += 1;
  22559. if (typeof pos !== 'undefined') {
  22560. if (pos === step) {
  22561. throw new RangeError('Cyclic object value');
  22562. } else {
  22563. findFlag = true; // Break while
  22564. }
  22565. }
  22566. if (typeof tmpSc.get(sentinel) === 'undefined') {
  22567. step = 0;
  22568. }
  22569. }
  22570. if (typeof filter === 'function') {
  22571. obj = filter(prefix, obj);
  22572. } else if (obj instanceof Date) {
  22573. obj = serializeDate(obj);
  22574. } else if (generateArrayPrefix === 'comma' && isArray(obj)) {
  22575. obj = utils.maybeMap(obj, function (value) {
  22576. if (value instanceof Date) {
  22577. return serializeDate(value);
  22578. }
  22579. return value;
  22580. });
  22581. }
  22582. if (obj === null) {
  22583. if (strictNullHandling) {
  22584. return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
  22585. }
  22586. obj = '';
  22587. }
  22588. if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
  22589. if (encoder) {
  22590. var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
  22591. if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
  22592. var valuesArray = split.call(String(obj), ',');
  22593. var valuesJoined = '';
  22594. for (var i = 0; i < valuesArray.length; ++i) {
  22595. valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
  22596. }
  22597. return [formatter(keyValue) + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
  22598. }
  22599. return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
  22600. }
  22601. return [formatter(prefix) + '=' + formatter(String(obj))];
  22602. }
  22603. var values = [];
  22604. if (typeof obj === 'undefined') {
  22605. return values;
  22606. }
  22607. var objKeys;
  22608. if (generateArrayPrefix === 'comma' && isArray(obj)) {
  22609. // we need to join elements in
  22610. objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
  22611. } else if (isArray(filter)) {
  22612. objKeys = filter;
  22613. } else {
  22614. var keys = Object.keys(obj);
  22615. objKeys = sort ? keys.sort(sort) : keys;
  22616. }
  22617. var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;
  22618. for (var j = 0; j < objKeys.length; ++j) {
  22619. var key = objKeys[j];
  22620. var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
  22621. if (skipNulls && value === null) {
  22622. continue;
  22623. }
  22624. var keyPrefix = isArray(obj)
  22625. ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
  22626. : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
  22627. sideChannel.set(object, step);
  22628. var valueSideChannel = getSideChannel();
  22629. valueSideChannel.set(sentinel, sideChannel);
  22630. pushToArray(values, stringify(
  22631. value,
  22632. keyPrefix,
  22633. generateArrayPrefix,
  22634. commaRoundTrip,
  22635. strictNullHandling,
  22636. skipNulls,
  22637. encoder,
  22638. filter,
  22639. sort,
  22640. allowDots,
  22641. serializeDate,
  22642. format,
  22643. formatter,
  22644. encodeValuesOnly,
  22645. charset,
  22646. valueSideChannel
  22647. ));
  22648. }
  22649. return values;
  22650. };
  22651. var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
  22652. if (!opts) {
  22653. return defaults;
  22654. }
  22655. if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
  22656. throw new TypeError('Encoder has to be a function.');
  22657. }
  22658. var charset = opts.charset || defaults.charset;
  22659. if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
  22660. throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
  22661. }
  22662. var format = formats['default'];
  22663. if (typeof opts.format !== 'undefined') {
  22664. if (!has.call(formats.formatters, opts.format)) {
  22665. throw new TypeError('Unknown format option provided.');
  22666. }
  22667. format = opts.format;
  22668. }
  22669. var formatter = formats.formatters[format];
  22670. var filter = defaults.filter;
  22671. if (typeof opts.filter === 'function' || isArray(opts.filter)) {
  22672. filter = opts.filter;
  22673. }
  22674. return {
  22675. addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
  22676. allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
  22677. charset: charset,
  22678. charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
  22679. delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
  22680. encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
  22681. encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
  22682. encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
  22683. filter: filter,
  22684. format: format,
  22685. formatter: formatter,
  22686. serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
  22687. skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
  22688. sort: typeof opts.sort === 'function' ? opts.sort : null,
  22689. strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
  22690. };
  22691. };
  22692. module.exports = function (object, opts) {
  22693. var obj = object;
  22694. var options = normalizeStringifyOptions(opts);
  22695. var objKeys;
  22696. var filter;
  22697. if (typeof options.filter === 'function') {
  22698. filter = options.filter;
  22699. obj = filter('', obj);
  22700. } else if (isArray(options.filter)) {
  22701. filter = options.filter;
  22702. objKeys = filter;
  22703. }
  22704. var keys = [];
  22705. if (typeof obj !== 'object' || obj === null) {
  22706. return '';
  22707. }
  22708. var arrayFormat;
  22709. if (opts && opts.arrayFormat in arrayPrefixGenerators) {
  22710. arrayFormat = opts.arrayFormat;
  22711. } else if (opts && 'indices' in opts) {
  22712. arrayFormat = opts.indices ? 'indices' : 'repeat';
  22713. } else {
  22714. arrayFormat = 'indices';
  22715. }
  22716. var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
  22717. if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
  22718. throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
  22719. }
  22720. var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
  22721. if (!objKeys) {
  22722. objKeys = Object.keys(obj);
  22723. }
  22724. if (options.sort) {
  22725. objKeys.sort(options.sort);
  22726. }
  22727. var sideChannel = getSideChannel();
  22728. for (var i = 0; i < objKeys.length; ++i) {
  22729. var key = objKeys[i];
  22730. if (options.skipNulls && obj[key] === null) {
  22731. continue;
  22732. }
  22733. pushToArray(keys, stringify(
  22734. obj[key],
  22735. key,
  22736. generateArrayPrefix,
  22737. commaRoundTrip,
  22738. options.strictNullHandling,
  22739. options.skipNulls,
  22740. options.encode ? options.encoder : null,
  22741. options.filter,
  22742. options.sort,
  22743. options.allowDots,
  22744. options.serializeDate,
  22745. options.format,
  22746. options.formatter,
  22747. options.encodeValuesOnly,
  22748. options.charset,
  22749. sideChannel
  22750. ));
  22751. }
  22752. var joined = keys.join(options.delimiter);
  22753. var prefix = options.addQueryPrefix === true ? '?' : '';
  22754. if (options.charsetSentinel) {
  22755. if (options.charset === 'iso-8859-1') {
  22756. // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
  22757. prefix += 'utf8=%26%2310003%3B&';
  22758. } else {
  22759. // encodeURIComponent('✓')
  22760. prefix += 'utf8=%E2%9C%93&';
  22761. }
  22762. }
  22763. return joined.length > 0 ? prefix + joined : '';
  22764. };
  22765. /***/ }),
  22766. /* 81 */
  22767. /*!********************************************!*\
  22768. !*** ./node_modules/side-channel/index.js ***!
  22769. \********************************************/
  22770. /*! no static exports found */
  22771. /***/ (function(module, exports, __webpack_require__) {
  22772. "use strict";
  22773. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 82);
  22774. var callBound = __webpack_require__(/*! call-bind/callBound */ 88);
  22775. var inspect = __webpack_require__(/*! object-inspect */ 90);
  22776. var $TypeError = GetIntrinsic('%TypeError%');
  22777. var $WeakMap = GetIntrinsic('%WeakMap%', true);
  22778. var $Map = GetIntrinsic('%Map%', true);
  22779. var $weakMapGet = callBound('WeakMap.prototype.get', true);
  22780. var $weakMapSet = callBound('WeakMap.prototype.set', true);
  22781. var $weakMapHas = callBound('WeakMap.prototype.has', true);
  22782. var $mapGet = callBound('Map.prototype.get', true);
  22783. var $mapSet = callBound('Map.prototype.set', true);
  22784. var $mapHas = callBound('Map.prototype.has', true);
  22785. /*
  22786. * This function traverses the list returning the node corresponding to the
  22787. * given key.
  22788. *
  22789. * That node is also moved to the head of the list, so that if it's accessed
  22790. * again we don't need to traverse the whole list. By doing so, all the recently
  22791. * used nodes can be accessed relatively quickly.
  22792. */
  22793. var listGetNode = function (list, key) { // eslint-disable-line consistent-return
  22794. for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
  22795. if (curr.key === key) {
  22796. prev.next = curr.next;
  22797. curr.next = list.next;
  22798. list.next = curr; // eslint-disable-line no-param-reassign
  22799. return curr;
  22800. }
  22801. }
  22802. };
  22803. var listGet = function (objects, key) {
  22804. var node = listGetNode(objects, key);
  22805. return node && node.value;
  22806. };
  22807. var listSet = function (objects, key, value) {
  22808. var node = listGetNode(objects, key);
  22809. if (node) {
  22810. node.value = value;
  22811. } else {
  22812. // Prepend the new node to the beginning of the list
  22813. objects.next = { // eslint-disable-line no-param-reassign
  22814. key: key,
  22815. next: objects.next,
  22816. value: value
  22817. };
  22818. }
  22819. };
  22820. var listHas = function (objects, key) {
  22821. return !!listGetNode(objects, key);
  22822. };
  22823. module.exports = function getSideChannel() {
  22824. var $wm;
  22825. var $m;
  22826. var $o;
  22827. var channel = {
  22828. assert: function (key) {
  22829. if (!channel.has(key)) {
  22830. throw new $TypeError('Side channel does not contain ' + inspect(key));
  22831. }
  22832. },
  22833. get: function (key) { // eslint-disable-line consistent-return
  22834. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  22835. if ($wm) {
  22836. return $weakMapGet($wm, key);
  22837. }
  22838. } else if ($Map) {
  22839. if ($m) {
  22840. return $mapGet($m, key);
  22841. }
  22842. } else {
  22843. if ($o) { // eslint-disable-line no-lonely-if
  22844. return listGet($o, key);
  22845. }
  22846. }
  22847. },
  22848. has: function (key) {
  22849. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  22850. if ($wm) {
  22851. return $weakMapHas($wm, key);
  22852. }
  22853. } else if ($Map) {
  22854. if ($m) {
  22855. return $mapHas($m, key);
  22856. }
  22857. } else {
  22858. if ($o) { // eslint-disable-line no-lonely-if
  22859. return listHas($o, key);
  22860. }
  22861. }
  22862. return false;
  22863. },
  22864. set: function (key, value) {
  22865. if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
  22866. if (!$wm) {
  22867. $wm = new $WeakMap();
  22868. }
  22869. $weakMapSet($wm, key, value);
  22870. } else if ($Map) {
  22871. if (!$m) {
  22872. $m = new $Map();
  22873. }
  22874. $mapSet($m, key, value);
  22875. } else {
  22876. if (!$o) {
  22877. /*
  22878. * Initialize the linked list as an empty node, so that we don't have
  22879. * to special-case handling of the first node: we can always refer to
  22880. * it as (previous node).next, instead of something like (list).head
  22881. */
  22882. $o = { key: {}, next: null };
  22883. }
  22884. listSet($o, key, value);
  22885. }
  22886. }
  22887. };
  22888. return channel;
  22889. };
  22890. /***/ }),
  22891. /* 82 */
  22892. /*!*********************************************!*\
  22893. !*** ./node_modules/get-intrinsic/index.js ***!
  22894. \*********************************************/
  22895. /*! no static exports found */
  22896. /***/ (function(module, exports, __webpack_require__) {
  22897. "use strict";
  22898. var undefined;
  22899. var $SyntaxError = SyntaxError;
  22900. var $Function = Function;
  22901. var $TypeError = TypeError;
  22902. // eslint-disable-next-line consistent-return
  22903. var getEvalledConstructor = function (expressionSyntax) {
  22904. try {
  22905. return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
  22906. } catch (e) {}
  22907. };
  22908. var $gOPD = Object.getOwnPropertyDescriptor;
  22909. if ($gOPD) {
  22910. try {
  22911. $gOPD({}, '');
  22912. } catch (e) {
  22913. $gOPD = null; // this is IE 8, which has a broken gOPD
  22914. }
  22915. }
  22916. var throwTypeError = function () {
  22917. throw new $TypeError();
  22918. };
  22919. var ThrowTypeError = $gOPD
  22920. ? (function () {
  22921. try {
  22922. // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
  22923. arguments.callee; // IE 8 does not throw here
  22924. return throwTypeError;
  22925. } catch (calleeThrows) {
  22926. try {
  22927. // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
  22928. return $gOPD(arguments, 'callee').get;
  22929. } catch (gOPDthrows) {
  22930. return throwTypeError;
  22931. }
  22932. }
  22933. }())
  22934. : throwTypeError;
  22935. var hasSymbols = __webpack_require__(/*! has-symbols */ 83)();
  22936. var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
  22937. var needsEval = {};
  22938. var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
  22939. var INTRINSICS = {
  22940. '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
  22941. '%Array%': Array,
  22942. '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
  22943. '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
  22944. '%AsyncFromSyncIteratorPrototype%': undefined,
  22945. '%AsyncFunction%': needsEval,
  22946. '%AsyncGenerator%': needsEval,
  22947. '%AsyncGeneratorFunction%': needsEval,
  22948. '%AsyncIteratorPrototype%': needsEval,
  22949. '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
  22950. '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
  22951. '%Boolean%': Boolean,
  22952. '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
  22953. '%Date%': Date,
  22954. '%decodeURI%': decodeURI,
  22955. '%decodeURIComponent%': decodeURIComponent,
  22956. '%encodeURI%': encodeURI,
  22957. '%encodeURIComponent%': encodeURIComponent,
  22958. '%Error%': Error,
  22959. '%eval%': eval, // eslint-disable-line no-eval
  22960. '%EvalError%': EvalError,
  22961. '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
  22962. '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
  22963. '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
  22964. '%Function%': $Function,
  22965. '%GeneratorFunction%': needsEval,
  22966. '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
  22967. '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
  22968. '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
  22969. '%isFinite%': isFinite,
  22970. '%isNaN%': isNaN,
  22971. '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
  22972. '%JSON%': typeof JSON === 'object' ? JSON : undefined,
  22973. '%Map%': typeof Map === 'undefined' ? undefined : Map,
  22974. '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
  22975. '%Math%': Math,
  22976. '%Number%': Number,
  22977. '%Object%': Object,
  22978. '%parseFloat%': parseFloat,
  22979. '%parseInt%': parseInt,
  22980. '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
  22981. '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
  22982. '%RangeError%': RangeError,
  22983. '%ReferenceError%': ReferenceError,
  22984. '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
  22985. '%RegExp%': RegExp,
  22986. '%Set%': typeof Set === 'undefined' ? undefined : Set,
  22987. '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
  22988. '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
  22989. '%String%': String,
  22990. '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
  22991. '%Symbol%': hasSymbols ? Symbol : undefined,
  22992. '%SyntaxError%': $SyntaxError,
  22993. '%ThrowTypeError%': ThrowTypeError,
  22994. '%TypedArray%': TypedArray,
  22995. '%TypeError%': $TypeError,
  22996. '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
  22997. '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
  22998. '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
  22999. '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
  23000. '%URIError%': URIError,
  23001. '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
  23002. '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
  23003. '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
  23004. };
  23005. var doEval = function doEval(name) {
  23006. var value;
  23007. if (name === '%AsyncFunction%') {
  23008. value = getEvalledConstructor('async function () {}');
  23009. } else if (name === '%GeneratorFunction%') {
  23010. value = getEvalledConstructor('function* () {}');
  23011. } else if (name === '%AsyncGeneratorFunction%') {
  23012. value = getEvalledConstructor('async function* () {}');
  23013. } else if (name === '%AsyncGenerator%') {
  23014. var fn = doEval('%AsyncGeneratorFunction%');
  23015. if (fn) {
  23016. value = fn.prototype;
  23017. }
  23018. } else if (name === '%AsyncIteratorPrototype%') {
  23019. var gen = doEval('%AsyncGenerator%');
  23020. if (gen) {
  23021. value = getProto(gen.prototype);
  23022. }
  23023. }
  23024. INTRINSICS[name] = value;
  23025. return value;
  23026. };
  23027. var LEGACY_ALIASES = {
  23028. '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
  23029. '%ArrayPrototype%': ['Array', 'prototype'],
  23030. '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
  23031. '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
  23032. '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
  23033. '%ArrayProto_values%': ['Array', 'prototype', 'values'],
  23034. '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
  23035. '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
  23036. '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
  23037. '%BooleanPrototype%': ['Boolean', 'prototype'],
  23038. '%DataViewPrototype%': ['DataView', 'prototype'],
  23039. '%DatePrototype%': ['Date', 'prototype'],
  23040. '%ErrorPrototype%': ['Error', 'prototype'],
  23041. '%EvalErrorPrototype%': ['EvalError', 'prototype'],
  23042. '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
  23043. '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
  23044. '%FunctionPrototype%': ['Function', 'prototype'],
  23045. '%Generator%': ['GeneratorFunction', 'prototype'],
  23046. '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
  23047. '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
  23048. '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
  23049. '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
  23050. '%JSONParse%': ['JSON', 'parse'],
  23051. '%JSONStringify%': ['JSON', 'stringify'],
  23052. '%MapPrototype%': ['Map', 'prototype'],
  23053. '%NumberPrototype%': ['Number', 'prototype'],
  23054. '%ObjectPrototype%': ['Object', 'prototype'],
  23055. '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
  23056. '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
  23057. '%PromisePrototype%': ['Promise', 'prototype'],
  23058. '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
  23059. '%Promise_all%': ['Promise', 'all'],
  23060. '%Promise_reject%': ['Promise', 'reject'],
  23061. '%Promise_resolve%': ['Promise', 'resolve'],
  23062. '%RangeErrorPrototype%': ['RangeError', 'prototype'],
  23063. '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
  23064. '%RegExpPrototype%': ['RegExp', 'prototype'],
  23065. '%SetPrototype%': ['Set', 'prototype'],
  23066. '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
  23067. '%StringPrototype%': ['String', 'prototype'],
  23068. '%SymbolPrototype%': ['Symbol', 'prototype'],
  23069. '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
  23070. '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
  23071. '%TypeErrorPrototype%': ['TypeError', 'prototype'],
  23072. '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
  23073. '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
  23074. '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
  23075. '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
  23076. '%URIErrorPrototype%': ['URIError', 'prototype'],
  23077. '%WeakMapPrototype%': ['WeakMap', 'prototype'],
  23078. '%WeakSetPrototype%': ['WeakSet', 'prototype']
  23079. };
  23080. var bind = __webpack_require__(/*! function-bind */ 85);
  23081. var hasOwn = __webpack_require__(/*! has */ 87);
  23082. var $concat = bind.call(Function.call, Array.prototype.concat);
  23083. var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
  23084. var $replace = bind.call(Function.call, String.prototype.replace);
  23085. var $strSlice = bind.call(Function.call, String.prototype.slice);
  23086. var $exec = bind.call(Function.call, RegExp.prototype.exec);
  23087. /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
  23088. var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
  23089. var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
  23090. var stringToPath = function stringToPath(string) {
  23091. var first = $strSlice(string, 0, 1);
  23092. var last = $strSlice(string, -1);
  23093. if (first === '%' && last !== '%') {
  23094. throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
  23095. } else if (last === '%' && first !== '%') {
  23096. throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
  23097. }
  23098. var result = [];
  23099. $replace(string, rePropName, function (match, number, quote, subString) {
  23100. result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
  23101. });
  23102. return result;
  23103. };
  23104. /* end adaptation */
  23105. var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
  23106. var intrinsicName = name;
  23107. var alias;
  23108. if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
  23109. alias = LEGACY_ALIASES[intrinsicName];
  23110. intrinsicName = '%' + alias[0] + '%';
  23111. }
  23112. if (hasOwn(INTRINSICS, intrinsicName)) {
  23113. var value = INTRINSICS[intrinsicName];
  23114. if (value === needsEval) {
  23115. value = doEval(intrinsicName);
  23116. }
  23117. if (typeof value === 'undefined' && !allowMissing) {
  23118. throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
  23119. }
  23120. return {
  23121. alias: alias,
  23122. name: intrinsicName,
  23123. value: value
  23124. };
  23125. }
  23126. throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
  23127. };
  23128. module.exports = function GetIntrinsic(name, allowMissing) {
  23129. if (typeof name !== 'string' || name.length === 0) {
  23130. throw new $TypeError('intrinsic name must be a non-empty string');
  23131. }
  23132. if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
  23133. throw new $TypeError('"allowMissing" argument must be a boolean');
  23134. }
  23135. if ($exec(/^%?[^%]*%?$/, name) === null) {
  23136. throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
  23137. }
  23138. var parts = stringToPath(name);
  23139. var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
  23140. var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
  23141. var intrinsicRealName = intrinsic.name;
  23142. var value = intrinsic.value;
  23143. var skipFurtherCaching = false;
  23144. var alias = intrinsic.alias;
  23145. if (alias) {
  23146. intrinsicBaseName = alias[0];
  23147. $spliceApply(parts, $concat([0, 1], alias));
  23148. }
  23149. for (var i = 1, isOwn = true; i < parts.length; i += 1) {
  23150. var part = parts[i];
  23151. var first = $strSlice(part, 0, 1);
  23152. var last = $strSlice(part, -1);
  23153. if (
  23154. (
  23155. (first === '"' || first === "'" || first === '`')
  23156. || (last === '"' || last === "'" || last === '`')
  23157. )
  23158. && first !== last
  23159. ) {
  23160. throw new $SyntaxError('property names with quotes must have matching quotes');
  23161. }
  23162. if (part === 'constructor' || !isOwn) {
  23163. skipFurtherCaching = true;
  23164. }
  23165. intrinsicBaseName += '.' + part;
  23166. intrinsicRealName = '%' + intrinsicBaseName + '%';
  23167. if (hasOwn(INTRINSICS, intrinsicRealName)) {
  23168. value = INTRINSICS[intrinsicRealName];
  23169. } else if (value != null) {
  23170. if (!(part in value)) {
  23171. if (!allowMissing) {
  23172. throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
  23173. }
  23174. return void undefined;
  23175. }
  23176. if ($gOPD && (i + 1) >= parts.length) {
  23177. var desc = $gOPD(value, part);
  23178. isOwn = !!desc;
  23179. // By convention, when a data property is converted to an accessor
  23180. // property to emulate a data property that does not suffer from
  23181. // the override mistake, that accessor's getter is marked with
  23182. // an `originalValue` property. Here, when we detect this, we
  23183. // uphold the illusion by pretending to see that original data
  23184. // property, i.e., returning the value rather than the getter
  23185. // itself.
  23186. if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
  23187. value = desc.get;
  23188. } else {
  23189. value = value[part];
  23190. }
  23191. } else {
  23192. isOwn = hasOwn(value, part);
  23193. value = value[part];
  23194. }
  23195. if (isOwn && !skipFurtherCaching) {
  23196. INTRINSICS[intrinsicRealName] = value;
  23197. }
  23198. }
  23199. }
  23200. return value;
  23201. };
  23202. /***/ }),
  23203. /* 83 */
  23204. /*!*******************************************!*\
  23205. !*** ./node_modules/has-symbols/index.js ***!
  23206. \*******************************************/
  23207. /*! no static exports found */
  23208. /***/ (function(module, exports, __webpack_require__) {
  23209. "use strict";
  23210. var origSymbol = typeof Symbol !== 'undefined' && Symbol;
  23211. var hasSymbolSham = __webpack_require__(/*! ./shams */ 84);
  23212. module.exports = function hasNativeSymbols() {
  23213. if (typeof origSymbol !== 'function') { return false; }
  23214. if (typeof Symbol !== 'function') { return false; }
  23215. if (typeof origSymbol('foo') !== 'symbol') { return false; }
  23216. if (typeof Symbol('bar') !== 'symbol') { return false; }
  23217. return hasSymbolSham();
  23218. };
  23219. /***/ }),
  23220. /* 84 */
  23221. /*!*******************************************!*\
  23222. !*** ./node_modules/has-symbols/shams.js ***!
  23223. \*******************************************/
  23224. /*! no static exports found */
  23225. /***/ (function(module, exports, __webpack_require__) {
  23226. "use strict";
  23227. /* eslint complexity: [2, 18], max-statements: [2, 33] */
  23228. module.exports = function hasSymbols() {
  23229. if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
  23230. if (typeof Symbol.iterator === 'symbol') { return true; }
  23231. var obj = {};
  23232. var sym = Symbol('test');
  23233. var symObj = Object(sym);
  23234. if (typeof sym === 'string') { return false; }
  23235. if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
  23236. if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
  23237. // temp disabled per https://github.com/ljharb/object.assign/issues/17
  23238. // if (sym instanceof Symbol) { return false; }
  23239. // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
  23240. // if (!(symObj instanceof Symbol)) { return false; }
  23241. // if (typeof Symbol.prototype.toString !== 'function') { return false; }
  23242. // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
  23243. var symVal = 42;
  23244. obj[sym] = symVal;
  23245. for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
  23246. if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
  23247. if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
  23248. var syms = Object.getOwnPropertySymbols(obj);
  23249. if (syms.length !== 1 || syms[0] !== sym) { return false; }
  23250. if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
  23251. if (typeof Object.getOwnPropertyDescriptor === 'function') {
  23252. var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
  23253. if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
  23254. }
  23255. return true;
  23256. };
  23257. /***/ }),
  23258. /* 85 */
  23259. /*!*********************************************!*\
  23260. !*** ./node_modules/function-bind/index.js ***!
  23261. \*********************************************/
  23262. /*! no static exports found */
  23263. /***/ (function(module, exports, __webpack_require__) {
  23264. "use strict";
  23265. var implementation = __webpack_require__(/*! ./implementation */ 86);
  23266. module.exports = Function.prototype.bind || implementation;
  23267. /***/ }),
  23268. /* 86 */
  23269. /*!******************************************************!*\
  23270. !*** ./node_modules/function-bind/implementation.js ***!
  23271. \******************************************************/
  23272. /*! no static exports found */
  23273. /***/ (function(module, exports, __webpack_require__) {
  23274. "use strict";
  23275. /* eslint no-invalid-this: 1 */
  23276. var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
  23277. var slice = Array.prototype.slice;
  23278. var toStr = Object.prototype.toString;
  23279. var funcType = '[object Function]';
  23280. module.exports = function bind(that) {
  23281. var target = this;
  23282. if (typeof target !== 'function' || toStr.call(target) !== funcType) {
  23283. throw new TypeError(ERROR_MESSAGE + target);
  23284. }
  23285. var args = slice.call(arguments, 1);
  23286. var bound;
  23287. var binder = function () {
  23288. if (this instanceof bound) {
  23289. var result = target.apply(
  23290. this,
  23291. args.concat(slice.call(arguments))
  23292. );
  23293. if (Object(result) === result) {
  23294. return result;
  23295. }
  23296. return this;
  23297. } else {
  23298. return target.apply(
  23299. that,
  23300. args.concat(slice.call(arguments))
  23301. );
  23302. }
  23303. };
  23304. var boundLength = Math.max(0, target.length - args.length);
  23305. var boundArgs = [];
  23306. for (var i = 0; i < boundLength; i++) {
  23307. boundArgs.push('$' + i);
  23308. }
  23309. bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
  23310. if (target.prototype) {
  23311. var Empty = function Empty() {};
  23312. Empty.prototype = target.prototype;
  23313. bound.prototype = new Empty();
  23314. Empty.prototype = null;
  23315. }
  23316. return bound;
  23317. };
  23318. /***/ }),
  23319. /* 87 */
  23320. /*!***************************************!*\
  23321. !*** ./node_modules/has/src/index.js ***!
  23322. \***************************************/
  23323. /*! no static exports found */
  23324. /***/ (function(module, exports, __webpack_require__) {
  23325. "use strict";
  23326. var bind = __webpack_require__(/*! function-bind */ 85);
  23327. module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
  23328. /***/ }),
  23329. /* 88 */
  23330. /*!*********************************************!*\
  23331. !*** ./node_modules/call-bind/callBound.js ***!
  23332. \*********************************************/
  23333. /*! no static exports found */
  23334. /***/ (function(module, exports, __webpack_require__) {
  23335. "use strict";
  23336. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 82);
  23337. var callBind = __webpack_require__(/*! ./ */ 89);
  23338. var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
  23339. module.exports = function callBoundIntrinsic(name, allowMissing) {
  23340. var intrinsic = GetIntrinsic(name, !!allowMissing);
  23341. if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
  23342. return callBind(intrinsic);
  23343. }
  23344. return intrinsic;
  23345. };
  23346. /***/ }),
  23347. /* 89 */
  23348. /*!*****************************************!*\
  23349. !*** ./node_modules/call-bind/index.js ***!
  23350. \*****************************************/
  23351. /*! no static exports found */
  23352. /***/ (function(module, exports, __webpack_require__) {
  23353. "use strict";
  23354. var bind = __webpack_require__(/*! function-bind */ 85);
  23355. var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ 82);
  23356. var $apply = GetIntrinsic('%Function.prototype.apply%');
  23357. var $call = GetIntrinsic('%Function.prototype.call%');
  23358. var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
  23359. var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
  23360. var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
  23361. var $max = GetIntrinsic('%Math.max%');
  23362. if ($defineProperty) {
  23363. try {
  23364. $defineProperty({}, 'a', { value: 1 });
  23365. } catch (e) {
  23366. // IE 8 has a broken defineProperty
  23367. $defineProperty = null;
  23368. }
  23369. }
  23370. module.exports = function callBind(originalFunction) {
  23371. var func = $reflectApply(bind, $call, arguments);
  23372. if ($gOPD && $defineProperty) {
  23373. var desc = $gOPD(func, 'length');
  23374. if (desc.configurable) {
  23375. // original length, plus the receiver, minus any additional arguments (after the receiver)
  23376. $defineProperty(
  23377. func,
  23378. 'length',
  23379. { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
  23380. );
  23381. }
  23382. }
  23383. return func;
  23384. };
  23385. var applyBind = function applyBind() {
  23386. return $reflectApply(bind, $apply, arguments);
  23387. };
  23388. if ($defineProperty) {
  23389. $defineProperty(module.exports, 'apply', { value: applyBind });
  23390. } else {
  23391. module.exports.apply = applyBind;
  23392. }
  23393. /***/ }),
  23394. /* 90 */
  23395. /*!**********************************************!*\
  23396. !*** ./node_modules/object-inspect/index.js ***!
  23397. \**********************************************/
  23398. /*! no static exports found */
  23399. /***/ (function(module, exports, __webpack_require__) {
  23400. var hasMap = typeof Map === 'function' && Map.prototype;
  23401. var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
  23402. var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
  23403. var mapForEach = hasMap && Map.prototype.forEach;
  23404. var hasSet = typeof Set === 'function' && Set.prototype;
  23405. var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
  23406. var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
  23407. var setForEach = hasSet && Set.prototype.forEach;
  23408. var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
  23409. var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
  23410. var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
  23411. var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
  23412. var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
  23413. var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
  23414. var booleanValueOf = Boolean.prototype.valueOf;
  23415. var objectToString = Object.prototype.toString;
  23416. var functionToString = Function.prototype.toString;
  23417. var $match = String.prototype.match;
  23418. var $slice = String.prototype.slice;
  23419. var $replace = String.prototype.replace;
  23420. var $toUpperCase = String.prototype.toUpperCase;
  23421. var $toLowerCase = String.prototype.toLowerCase;
  23422. var $test = RegExp.prototype.test;
  23423. var $concat = Array.prototype.concat;
  23424. var $join = Array.prototype.join;
  23425. var $arrSlice = Array.prototype.slice;
  23426. var $floor = Math.floor;
  23427. var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
  23428. var gOPS = Object.getOwnPropertySymbols;
  23429. var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
  23430. var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
  23431. // ie, `has-tostringtag/shams
  23432. var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
  23433. ? Symbol.toStringTag
  23434. : null;
  23435. var isEnumerable = Object.prototype.propertyIsEnumerable;
  23436. var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
  23437. [].__proto__ === Array.prototype // eslint-disable-line no-proto
  23438. ? function (O) {
  23439. return O.__proto__; // eslint-disable-line no-proto
  23440. }
  23441. : null
  23442. );
  23443. function addNumericSeparator(num, str) {
  23444. if (
  23445. num === Infinity
  23446. || num === -Infinity
  23447. || num !== num
  23448. || (num && num > -1000 && num < 1000)
  23449. || $test.call(/e/, str)
  23450. ) {
  23451. return str;
  23452. }
  23453. var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
  23454. if (typeof num === 'number') {
  23455. var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
  23456. if (int !== num) {
  23457. var intStr = String(int);
  23458. var dec = $slice.call(str, intStr.length + 1);
  23459. return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
  23460. }
  23461. }
  23462. return $replace.call(str, sepRegex, '$&_');
  23463. }
  23464. var utilInspect = __webpack_require__(/*! ./util.inspect */ 91);
  23465. var inspectCustom = utilInspect.custom;
  23466. var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
  23467. module.exports = function inspect_(obj, options, depth, seen) {
  23468. var opts = options || {};
  23469. if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
  23470. throw new TypeError('option "quoteStyle" must be "single" or "double"');
  23471. }
  23472. if (
  23473. has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
  23474. ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
  23475. : opts.maxStringLength !== null
  23476. )
  23477. ) {
  23478. throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
  23479. }
  23480. var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
  23481. if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
  23482. throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
  23483. }
  23484. if (
  23485. has(opts, 'indent')
  23486. && opts.indent !== null
  23487. && opts.indent !== '\t'
  23488. && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
  23489. ) {
  23490. throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
  23491. }
  23492. if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
  23493. throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
  23494. }
  23495. var numericSeparator = opts.numericSeparator;
  23496. if (typeof obj === 'undefined') {
  23497. return 'undefined';
  23498. }
  23499. if (obj === null) {
  23500. return 'null';
  23501. }
  23502. if (typeof obj === 'boolean') {
  23503. return obj ? 'true' : 'false';
  23504. }
  23505. if (typeof obj === 'string') {
  23506. return inspectString(obj, opts);
  23507. }
  23508. if (typeof obj === 'number') {
  23509. if (obj === 0) {
  23510. return Infinity / obj > 0 ? '0' : '-0';
  23511. }
  23512. var str = String(obj);
  23513. return numericSeparator ? addNumericSeparator(obj, str) : str;
  23514. }
  23515. if (typeof obj === 'bigint') {
  23516. var bigIntStr = String(obj) + 'n';
  23517. return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
  23518. }
  23519. var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
  23520. if (typeof depth === 'undefined') { depth = 0; }
  23521. if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
  23522. return isArray(obj) ? '[Array]' : '[Object]';
  23523. }
  23524. var indent = getIndent(opts, depth);
  23525. if (typeof seen === 'undefined') {
  23526. seen = [];
  23527. } else if (indexOf(seen, obj) >= 0) {
  23528. return '[Circular]';
  23529. }
  23530. function inspect(value, from, noIndent) {
  23531. if (from) {
  23532. seen = $arrSlice.call(seen);
  23533. seen.push(from);
  23534. }
  23535. if (noIndent) {
  23536. var newOpts = {
  23537. depth: opts.depth
  23538. };
  23539. if (has(opts, 'quoteStyle')) {
  23540. newOpts.quoteStyle = opts.quoteStyle;
  23541. }
  23542. return inspect_(value, newOpts, depth + 1, seen);
  23543. }
  23544. return inspect_(value, opts, depth + 1, seen);
  23545. }
  23546. if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
  23547. var name = nameOf(obj);
  23548. var keys = arrObjKeys(obj, inspect);
  23549. return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
  23550. }
  23551. if (isSymbol(obj)) {
  23552. var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
  23553. return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
  23554. }
  23555. if (isElement(obj)) {
  23556. var s = '<' + $toLowerCase.call(String(obj.nodeName));
  23557. var attrs = obj.attributes || [];
  23558. for (var i = 0; i < attrs.length; i++) {
  23559. s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
  23560. }
  23561. s += '>';
  23562. if (obj.childNodes && obj.childNodes.length) { s += '...'; }
  23563. s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
  23564. return s;
  23565. }
  23566. if (isArray(obj)) {
  23567. if (obj.length === 0) { return '[]'; }
  23568. var xs = arrObjKeys(obj, inspect);
  23569. if (indent && !singleLineValues(xs)) {
  23570. return '[' + indentedJoin(xs, indent) + ']';
  23571. }
  23572. return '[ ' + $join.call(xs, ', ') + ' ]';
  23573. }
  23574. if (isError(obj)) {
  23575. var parts = arrObjKeys(obj, inspect);
  23576. if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
  23577. return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
  23578. }
  23579. if (parts.length === 0) { return '[' + String(obj) + ']'; }
  23580. return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
  23581. }
  23582. if (typeof obj === 'object' && customInspect) {
  23583. if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
  23584. return utilInspect(obj, { depth: maxDepth - depth });
  23585. } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
  23586. return obj.inspect();
  23587. }
  23588. }
  23589. if (isMap(obj)) {
  23590. var mapParts = [];
  23591. mapForEach.call(obj, function (value, key) {
  23592. mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
  23593. });
  23594. return collectionOf('Map', mapSize.call(obj), mapParts, indent);
  23595. }
  23596. if (isSet(obj)) {
  23597. var setParts = [];
  23598. setForEach.call(obj, function (value) {
  23599. setParts.push(inspect(value, obj));
  23600. });
  23601. return collectionOf('Set', setSize.call(obj), setParts, indent);
  23602. }
  23603. if (isWeakMap(obj)) {
  23604. return weakCollectionOf('WeakMap');
  23605. }
  23606. if (isWeakSet(obj)) {
  23607. return weakCollectionOf('WeakSet');
  23608. }
  23609. if (isWeakRef(obj)) {
  23610. return weakCollectionOf('WeakRef');
  23611. }
  23612. if (isNumber(obj)) {
  23613. return markBoxed(inspect(Number(obj)));
  23614. }
  23615. if (isBigInt(obj)) {
  23616. return markBoxed(inspect(bigIntValueOf.call(obj)));
  23617. }
  23618. if (isBoolean(obj)) {
  23619. return markBoxed(booleanValueOf.call(obj));
  23620. }
  23621. if (isString(obj)) {
  23622. return markBoxed(inspect(String(obj)));
  23623. }
  23624. if (!isDate(obj) && !isRegExp(obj)) {
  23625. var ys = arrObjKeys(obj, inspect);
  23626. var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
  23627. var protoTag = obj instanceof Object ? '' : 'null prototype';
  23628. var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
  23629. var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
  23630. var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
  23631. if (ys.length === 0) { return tag + '{}'; }
  23632. if (indent) {
  23633. return tag + '{' + indentedJoin(ys, indent) + '}';
  23634. }
  23635. return tag + '{ ' + $join.call(ys, ', ') + ' }';
  23636. }
  23637. return String(obj);
  23638. };
  23639. function wrapQuotes(s, defaultStyle, opts) {
  23640. var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
  23641. return quoteChar + s + quoteChar;
  23642. }
  23643. function quote(s) {
  23644. return $replace.call(String(s), /"/g, '&quot;');
  23645. }
  23646. function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23647. function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23648. function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23649. function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23650. function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23651. function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23652. function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
  23653. // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
  23654. function isSymbol(obj) {
  23655. if (hasShammedSymbols) {
  23656. return obj && typeof obj === 'object' && obj instanceof Symbol;
  23657. }
  23658. if (typeof obj === 'symbol') {
  23659. return true;
  23660. }
  23661. if (!obj || typeof obj !== 'object' || !symToString) {
  23662. return false;
  23663. }
  23664. try {
  23665. symToString.call(obj);
  23666. return true;
  23667. } catch (e) {}
  23668. return false;
  23669. }
  23670. function isBigInt(obj) {
  23671. if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
  23672. return false;
  23673. }
  23674. try {
  23675. bigIntValueOf.call(obj);
  23676. return true;
  23677. } catch (e) {}
  23678. return false;
  23679. }
  23680. var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
  23681. function has(obj, key) {
  23682. return hasOwn.call(obj, key);
  23683. }
  23684. function toStr(obj) {
  23685. return objectToString.call(obj);
  23686. }
  23687. function nameOf(f) {
  23688. if (f.name) { return f.name; }
  23689. var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
  23690. if (m) { return m[1]; }
  23691. return null;
  23692. }
  23693. function indexOf(xs, x) {
  23694. if (xs.indexOf) { return xs.indexOf(x); }
  23695. for (var i = 0, l = xs.length; i < l; i++) {
  23696. if (xs[i] === x) { return i; }
  23697. }
  23698. return -1;
  23699. }
  23700. function isMap(x) {
  23701. if (!mapSize || !x || typeof x !== 'object') {
  23702. return false;
  23703. }
  23704. try {
  23705. mapSize.call(x);
  23706. try {
  23707. setSize.call(x);
  23708. } catch (s) {
  23709. return true;
  23710. }
  23711. return x instanceof Map; // core-js workaround, pre-v2.5.0
  23712. } catch (e) {}
  23713. return false;
  23714. }
  23715. function isWeakMap(x) {
  23716. if (!weakMapHas || !x || typeof x !== 'object') {
  23717. return false;
  23718. }
  23719. try {
  23720. weakMapHas.call(x, weakMapHas);
  23721. try {
  23722. weakSetHas.call(x, weakSetHas);
  23723. } catch (s) {
  23724. return true;
  23725. }
  23726. return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
  23727. } catch (e) {}
  23728. return false;
  23729. }
  23730. function isWeakRef(x) {
  23731. if (!weakRefDeref || !x || typeof x !== 'object') {
  23732. return false;
  23733. }
  23734. try {
  23735. weakRefDeref.call(x);
  23736. return true;
  23737. } catch (e) {}
  23738. return false;
  23739. }
  23740. function isSet(x) {
  23741. if (!setSize || !x || typeof x !== 'object') {
  23742. return false;
  23743. }
  23744. try {
  23745. setSize.call(x);
  23746. try {
  23747. mapSize.call(x);
  23748. } catch (m) {
  23749. return true;
  23750. }
  23751. return x instanceof Set; // core-js workaround, pre-v2.5.0
  23752. } catch (e) {}
  23753. return false;
  23754. }
  23755. function isWeakSet(x) {
  23756. if (!weakSetHas || !x || typeof x !== 'object') {
  23757. return false;
  23758. }
  23759. try {
  23760. weakSetHas.call(x, weakSetHas);
  23761. try {
  23762. weakMapHas.call(x, weakMapHas);
  23763. } catch (s) {
  23764. return true;
  23765. }
  23766. return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
  23767. } catch (e) {}
  23768. return false;
  23769. }
  23770. function isElement(x) {
  23771. if (!x || typeof x !== 'object') { return false; }
  23772. if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
  23773. return true;
  23774. }
  23775. return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
  23776. }
  23777. function inspectString(str, opts) {
  23778. if (str.length > opts.maxStringLength) {
  23779. var remaining = str.length - opts.maxStringLength;
  23780. var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
  23781. return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
  23782. }
  23783. // eslint-disable-next-line no-control-regex
  23784. var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
  23785. return wrapQuotes(s, 'single', opts);
  23786. }
  23787. function lowbyte(c) {
  23788. var n = c.charCodeAt(0);
  23789. var x = {
  23790. 8: 'b',
  23791. 9: 't',
  23792. 10: 'n',
  23793. 12: 'f',
  23794. 13: 'r'
  23795. }[n];
  23796. if (x) { return '\\' + x; }
  23797. return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
  23798. }
  23799. function markBoxed(str) {
  23800. return 'Object(' + str + ')';
  23801. }
  23802. function weakCollectionOf(type) {
  23803. return type + ' { ? }';
  23804. }
  23805. function collectionOf(type, size, entries, indent) {
  23806. var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
  23807. return type + ' (' + size + ') {' + joinedEntries + '}';
  23808. }
  23809. function singleLineValues(xs) {
  23810. for (var i = 0; i < xs.length; i++) {
  23811. if (indexOf(xs[i], '\n') >= 0) {
  23812. return false;
  23813. }
  23814. }
  23815. return true;
  23816. }
  23817. function getIndent(opts, depth) {
  23818. var baseIndent;
  23819. if (opts.indent === '\t') {
  23820. baseIndent = '\t';
  23821. } else if (typeof opts.indent === 'number' && opts.indent > 0) {
  23822. baseIndent = $join.call(Array(opts.indent + 1), ' ');
  23823. } else {
  23824. return null;
  23825. }
  23826. return {
  23827. base: baseIndent,
  23828. prev: $join.call(Array(depth + 1), baseIndent)
  23829. };
  23830. }
  23831. function indentedJoin(xs, indent) {
  23832. if (xs.length === 0) { return ''; }
  23833. var lineJoiner = '\n' + indent.prev + indent.base;
  23834. return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
  23835. }
  23836. function arrObjKeys(obj, inspect) {
  23837. var isArr = isArray(obj);
  23838. var xs = [];
  23839. if (isArr) {
  23840. xs.length = obj.length;
  23841. for (var i = 0; i < obj.length; i++) {
  23842. xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
  23843. }
  23844. }
  23845. var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
  23846. var symMap;
  23847. if (hasShammedSymbols) {
  23848. symMap = {};
  23849. for (var k = 0; k < syms.length; k++) {
  23850. symMap['$' + syms[k]] = syms[k];
  23851. }
  23852. }
  23853. for (var key in obj) { // eslint-disable-line no-restricted-syntax
  23854. if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
  23855. if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
  23856. if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
  23857. // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
  23858. continue; // eslint-disable-line no-restricted-syntax, no-continue
  23859. } else if ($test.call(/[^\w$]/, key)) {
  23860. xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
  23861. } else {
  23862. xs.push(key + ': ' + inspect(obj[key], obj));
  23863. }
  23864. }
  23865. if (typeof gOPS === 'function') {
  23866. for (var j = 0; j < syms.length; j++) {
  23867. if (isEnumerable.call(obj, syms[j])) {
  23868. xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
  23869. }
  23870. }
  23871. }
  23872. return xs;
  23873. }
  23874. /***/ }),
  23875. /* 91 */
  23876. /*!********************************!*\
  23877. !*** ./util.inspect (ignored) ***!
  23878. \********************************/
  23879. /*! no static exports found */
  23880. /***/ (function(module, exports) {
  23881. /* (ignored) */
  23882. /***/ }),
  23883. /* 92 */
  23884. /*!**************************************!*\
  23885. !*** ./node_modules/qs/lib/utils.js ***!
  23886. \**************************************/
  23887. /*! no static exports found */
  23888. /***/ (function(module, exports, __webpack_require__) {
  23889. "use strict";
  23890. var formats = __webpack_require__(/*! ./formats */ 93);
  23891. var has = Object.prototype.hasOwnProperty;
  23892. var isArray = Array.isArray;
  23893. var hexTable = (function () {
  23894. var array = [];
  23895. for (var i = 0; i < 256; ++i) {
  23896. array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
  23897. }
  23898. return array;
  23899. }());
  23900. var compactQueue = function compactQueue(queue) {
  23901. while (queue.length > 1) {
  23902. var item = queue.pop();
  23903. var obj = item.obj[item.prop];
  23904. if (isArray(obj)) {
  23905. var compacted = [];
  23906. for (var j = 0; j < obj.length; ++j) {
  23907. if (typeof obj[j] !== 'undefined') {
  23908. compacted.push(obj[j]);
  23909. }
  23910. }
  23911. item.obj[item.prop] = compacted;
  23912. }
  23913. }
  23914. };
  23915. var arrayToObject = function arrayToObject(source, options) {
  23916. var obj = options && options.plainObjects ? Object.create(null) : {};
  23917. for (var i = 0; i < source.length; ++i) {
  23918. if (typeof source[i] !== 'undefined') {
  23919. obj[i] = source[i];
  23920. }
  23921. }
  23922. return obj;
  23923. };
  23924. var merge = function merge(target, source, options) {
  23925. /* eslint no-param-reassign: 0 */
  23926. if (!source) {
  23927. return target;
  23928. }
  23929. if (typeof source !== 'object') {
  23930. if (isArray(target)) {
  23931. target.push(source);
  23932. } else if (target && typeof target === 'object') {
  23933. if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
  23934. target[source] = true;
  23935. }
  23936. } else {
  23937. return [target, source];
  23938. }
  23939. return target;
  23940. }
  23941. if (!target || typeof target !== 'object') {
  23942. return [target].concat(source);
  23943. }
  23944. var mergeTarget = target;
  23945. if (isArray(target) && !isArray(source)) {
  23946. mergeTarget = arrayToObject(target, options);
  23947. }
  23948. if (isArray(target) && isArray(source)) {
  23949. source.forEach(function (item, i) {
  23950. if (has.call(target, i)) {
  23951. var targetItem = target[i];
  23952. if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
  23953. target[i] = merge(targetItem, item, options);
  23954. } else {
  23955. target.push(item);
  23956. }
  23957. } else {
  23958. target[i] = item;
  23959. }
  23960. });
  23961. return target;
  23962. }
  23963. return Object.keys(source).reduce(function (acc, key) {
  23964. var value = source[key];
  23965. if (has.call(acc, key)) {
  23966. acc[key] = merge(acc[key], value, options);
  23967. } else {
  23968. acc[key] = value;
  23969. }
  23970. return acc;
  23971. }, mergeTarget);
  23972. };
  23973. var assign = function assignSingleSource(target, source) {
  23974. return Object.keys(source).reduce(function (acc, key) {
  23975. acc[key] = source[key];
  23976. return acc;
  23977. }, target);
  23978. };
  23979. var decode = function (str, decoder, charset) {
  23980. var strWithoutPlus = str.replace(/\+/g, ' ');
  23981. if (charset === 'iso-8859-1') {
  23982. // unescape never throws, no try...catch needed:
  23983. return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
  23984. }
  23985. // utf-8
  23986. try {
  23987. return decodeURIComponent(strWithoutPlus);
  23988. } catch (e) {
  23989. return strWithoutPlus;
  23990. }
  23991. };
  23992. var encode = function encode(str, defaultEncoder, charset, kind, format) {
  23993. // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
  23994. // It has been adapted here for stricter adherence to RFC 3986
  23995. if (str.length === 0) {
  23996. return str;
  23997. }
  23998. var string = str;
  23999. if (typeof str === 'symbol') {
  24000. string = Symbol.prototype.toString.call(str);
  24001. } else if (typeof str !== 'string') {
  24002. string = String(str);
  24003. }
  24004. if (charset === 'iso-8859-1') {
  24005. return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
  24006. return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
  24007. });
  24008. }
  24009. var out = '';
  24010. for (var i = 0; i < string.length; ++i) {
  24011. var c = string.charCodeAt(i);
  24012. if (
  24013. c === 0x2D // -
  24014. || c === 0x2E // .
  24015. || c === 0x5F // _
  24016. || c === 0x7E // ~
  24017. || (c >= 0x30 && c <= 0x39) // 0-9
  24018. || (c >= 0x41 && c <= 0x5A) // a-z
  24019. || (c >= 0x61 && c <= 0x7A) // A-Z
  24020. || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
  24021. ) {
  24022. out += string.charAt(i);
  24023. continue;
  24024. }
  24025. if (c < 0x80) {
  24026. out = out + hexTable[c];
  24027. continue;
  24028. }
  24029. if (c < 0x800) {
  24030. out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
  24031. continue;
  24032. }
  24033. if (c < 0xD800 || c >= 0xE000) {
  24034. out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
  24035. continue;
  24036. }
  24037. i += 1;
  24038. c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
  24039. /* eslint operator-linebreak: [2, "before"] */
  24040. out += hexTable[0xF0 | (c >> 18)]
  24041. + hexTable[0x80 | ((c >> 12) & 0x3F)]
  24042. + hexTable[0x80 | ((c >> 6) & 0x3F)]
  24043. + hexTable[0x80 | (c & 0x3F)];
  24044. }
  24045. return out;
  24046. };
  24047. var compact = function compact(value) {
  24048. var queue = [{ obj: { o: value }, prop: 'o' }];
  24049. var refs = [];
  24050. for (var i = 0; i < queue.length; ++i) {
  24051. var item = queue[i];
  24052. var obj = item.obj[item.prop];
  24053. var keys = Object.keys(obj);
  24054. for (var j = 0; j < keys.length; ++j) {
  24055. var key = keys[j];
  24056. var val = obj[key];
  24057. if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
  24058. queue.push({ obj: obj, prop: key });
  24059. refs.push(val);
  24060. }
  24061. }
  24062. }
  24063. compactQueue(queue);
  24064. return value;
  24065. };
  24066. var isRegExp = function isRegExp(obj) {
  24067. return Object.prototype.toString.call(obj) === '[object RegExp]';
  24068. };
  24069. var isBuffer = function isBuffer(obj) {
  24070. if (!obj || typeof obj !== 'object') {
  24071. return false;
  24072. }
  24073. return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
  24074. };
  24075. var combine = function combine(a, b) {
  24076. return [].concat(a, b);
  24077. };
  24078. var maybeMap = function maybeMap(val, fn) {
  24079. if (isArray(val)) {
  24080. var mapped = [];
  24081. for (var i = 0; i < val.length; i += 1) {
  24082. mapped.push(fn(val[i]));
  24083. }
  24084. return mapped;
  24085. }
  24086. return fn(val);
  24087. };
  24088. module.exports = {
  24089. arrayToObject: arrayToObject,
  24090. assign: assign,
  24091. combine: combine,
  24092. compact: compact,
  24093. decode: decode,
  24094. encode: encode,
  24095. isBuffer: isBuffer,
  24096. isRegExp: isRegExp,
  24097. maybeMap: maybeMap,
  24098. merge: merge
  24099. };
  24100. /***/ }),
  24101. /* 93 */
  24102. /*!****************************************!*\
  24103. !*** ./node_modules/qs/lib/formats.js ***!
  24104. \****************************************/
  24105. /*! no static exports found */
  24106. /***/ (function(module, exports, __webpack_require__) {
  24107. "use strict";
  24108. var replace = String.prototype.replace;
  24109. var percentTwenties = /%20/g;
  24110. var Format = {
  24111. RFC1738: 'RFC1738',
  24112. RFC3986: 'RFC3986'
  24113. };
  24114. module.exports = {
  24115. 'default': Format.RFC3986,
  24116. formatters: {
  24117. RFC1738: function (value) {
  24118. return replace.call(value, percentTwenties, '+');
  24119. },
  24120. RFC3986: function (value) {
  24121. return String(value);
  24122. }
  24123. },
  24124. RFC1738: Format.RFC1738,
  24125. RFC3986: Format.RFC3986
  24126. };
  24127. /***/ }),
  24128. /* 94 */
  24129. /*!**************************************!*\
  24130. !*** ./node_modules/qs/lib/parse.js ***!
  24131. \**************************************/
  24132. /*! no static exports found */
  24133. /***/ (function(module, exports, __webpack_require__) {
  24134. "use strict";
  24135. var utils = __webpack_require__(/*! ./utils */ 92);
  24136. var has = Object.prototype.hasOwnProperty;
  24137. var isArray = Array.isArray;
  24138. var defaults = {
  24139. allowDots: false,
  24140. allowPrototypes: false,
  24141. allowSparse: false,
  24142. arrayLimit: 20,
  24143. charset: 'utf-8',
  24144. charsetSentinel: false,
  24145. comma: false,
  24146. decoder: utils.decode,
  24147. delimiter: '&',
  24148. depth: 5,
  24149. ignoreQueryPrefix: false,
  24150. interpretNumericEntities: false,
  24151. parameterLimit: 1000,
  24152. parseArrays: true,
  24153. plainObjects: false,
  24154. strictNullHandling: false
  24155. };
  24156. var interpretNumericEntities = function (str) {
  24157. return str.replace(/&#(\d+);/g, function ($0, numberStr) {
  24158. return String.fromCharCode(parseInt(numberStr, 10));
  24159. });
  24160. };
  24161. var parseArrayValue = function (val, options) {
  24162. if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
  24163. return val.split(',');
  24164. }
  24165. return val;
  24166. };
  24167. // This is what browsers will submit when the ✓ character occurs in an
  24168. // application/x-www-form-urlencoded body and the encoding of the page containing
  24169. // the form is iso-8859-1, or when the submitted form has an accept-charset
  24170. // attribute of iso-8859-1. Presumably also with other charsets that do not contain
  24171. // the ✓ character, such as us-ascii.
  24172. var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
  24173. // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
  24174. var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
  24175. var parseValues = function parseQueryStringValues(str, options) {
  24176. var obj = {};
  24177. var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
  24178. var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
  24179. var parts = cleanStr.split(options.delimiter, limit);
  24180. var skipIndex = -1; // Keep track of where the utf8 sentinel was found
  24181. var i;
  24182. var charset = options.charset;
  24183. if (options.charsetSentinel) {
  24184. for (i = 0; i < parts.length; ++i) {
  24185. if (parts[i].indexOf('utf8=') === 0) {
  24186. if (parts[i] === charsetSentinel) {
  24187. charset = 'utf-8';
  24188. } else if (parts[i] === isoSentinel) {
  24189. charset = 'iso-8859-1';
  24190. }
  24191. skipIndex = i;
  24192. i = parts.length; // The eslint settings do not allow break;
  24193. }
  24194. }
  24195. }
  24196. for (i = 0; i < parts.length; ++i) {
  24197. if (i === skipIndex) {
  24198. continue;
  24199. }
  24200. var part = parts[i];
  24201. var bracketEqualsPos = part.indexOf(']=');
  24202. var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
  24203. var key, val;
  24204. if (pos === -1) {
  24205. key = options.decoder(part, defaults.decoder, charset, 'key');
  24206. val = options.strictNullHandling ? null : '';
  24207. } else {
  24208. key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
  24209. val = utils.maybeMap(
  24210. parseArrayValue(part.slice(pos + 1), options),
  24211. function (encodedVal) {
  24212. return options.decoder(encodedVal, defaults.decoder, charset, 'value');
  24213. }
  24214. );
  24215. }
  24216. if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
  24217. val = interpretNumericEntities(val);
  24218. }
  24219. if (part.indexOf('[]=') > -1) {
  24220. val = isArray(val) ? [val] : val;
  24221. }
  24222. if (has.call(obj, key)) {
  24223. obj[key] = utils.combine(obj[key], val);
  24224. } else {
  24225. obj[key] = val;
  24226. }
  24227. }
  24228. return obj;
  24229. };
  24230. var parseObject = function (chain, val, options, valuesParsed) {
  24231. var leaf = valuesParsed ? val : parseArrayValue(val, options);
  24232. for (var i = chain.length - 1; i >= 0; --i) {
  24233. var obj;
  24234. var root = chain[i];
  24235. if (root === '[]' && options.parseArrays) {
  24236. obj = [].concat(leaf);
  24237. } else {
  24238. obj = options.plainObjects ? Object.create(null) : {};
  24239. var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
  24240. var index = parseInt(cleanRoot, 10);
  24241. if (!options.parseArrays && cleanRoot === '') {
  24242. obj = { 0: leaf };
  24243. } else if (
  24244. !isNaN(index)
  24245. && root !== cleanRoot
  24246. && String(index) === cleanRoot
  24247. && index >= 0
  24248. && (options.parseArrays && index <= options.arrayLimit)
  24249. ) {
  24250. obj = [];
  24251. obj[index] = leaf;
  24252. } else if (cleanRoot !== '__proto__') {
  24253. obj[cleanRoot] = leaf;
  24254. }
  24255. }
  24256. leaf = obj;
  24257. }
  24258. return leaf;
  24259. };
  24260. var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
  24261. if (!givenKey) {
  24262. return;
  24263. }
  24264. // Transform dot notation to bracket notation
  24265. var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
  24266. // The regex chunks
  24267. var brackets = /(\[[^[\]]*])/;
  24268. var child = /(\[[^[\]]*])/g;
  24269. // Get the parent
  24270. var segment = options.depth > 0 && brackets.exec(key);
  24271. var parent = segment ? key.slice(0, segment.index) : key;
  24272. // Stash the parent if it exists
  24273. var keys = [];
  24274. if (parent) {
  24275. // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
  24276. if (!options.plainObjects && has.call(Object.prototype, parent)) {
  24277. if (!options.allowPrototypes) {
  24278. return;
  24279. }
  24280. }
  24281. keys.push(parent);
  24282. }
  24283. // Loop through children appending to the array until we hit depth
  24284. var i = 0;
  24285. while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
  24286. i += 1;
  24287. if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
  24288. if (!options.allowPrototypes) {
  24289. return;
  24290. }
  24291. }
  24292. keys.push(segment[1]);
  24293. }
  24294. // If there's a remainder, just add whatever is left
  24295. if (segment) {
  24296. keys.push('[' + key.slice(segment.index) + ']');
  24297. }
  24298. return parseObject(keys, val, options, valuesParsed);
  24299. };
  24300. var normalizeParseOptions = function normalizeParseOptions(opts) {
  24301. if (!opts) {
  24302. return defaults;
  24303. }
  24304. if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
  24305. throw new TypeError('Decoder has to be a function.');
  24306. }
  24307. if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
  24308. throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
  24309. }
  24310. var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
  24311. return {
  24312. allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
  24313. allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
  24314. allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
  24315. arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
  24316. charset: charset,
  24317. charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
  24318. comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
  24319. decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
  24320. delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
  24321. // eslint-disable-next-line no-implicit-coercion, no-extra-parens
  24322. depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
  24323. ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
  24324. interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
  24325. parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
  24326. parseArrays: opts.parseArrays !== false,
  24327. plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
  24328. strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
  24329. };
  24330. };
  24331. module.exports = function (str, opts) {
  24332. var options = normalizeParseOptions(opts);
  24333. if (str === '' || str === null || typeof str === 'undefined') {
  24334. return options.plainObjects ? Object.create(null) : {};
  24335. }
  24336. var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
  24337. var obj = options.plainObjects ? Object.create(null) : {};
  24338. // Iterate over the keys and setup the new object
  24339. var keys = Object.keys(tempObj);
  24340. for (var i = 0; i < keys.length; ++i) {
  24341. var key = keys[i];
  24342. var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
  24343. obj = utils.merge(obj, newObj, options);
  24344. }
  24345. if (options.allowSparse === true) {
  24346. return obj;
  24347. }
  24348. return utils.compact(obj);
  24349. };
  24350. /***/ }),
  24351. /* 95 */
  24352. /*!*************************************************************************!*\
  24353. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/zww-md5/w_md5.js ***!
  24354. \*************************************************************************/
  24355. /*! no static exports found */
  24356. /***/ (function(module, exports, __webpack_require__) {
  24357. "use strict";
  24358. Object.defineProperty(exports, "__esModule", {
  24359. value: true
  24360. });
  24361. exports.default = void 0;
  24362. var w_md5 = {};
  24363. function hex_md5(string, bit) {
  24364. function md5_RotateLeft(lValue, iShiftBits) {
  24365. return lValue << iShiftBits | lValue >>> 32 - iShiftBits;
  24366. }
  24367. function md5_AddUnsigned(lX, lY) {
  24368. var lX4, lY4, lX8, lY8, lResult;
  24369. lX8 = lX & 0x80000000;
  24370. lY8 = lY & 0x80000000;
  24371. lX4 = lX & 0x40000000;
  24372. lY4 = lY & 0x40000000;
  24373. lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF);
  24374. if (lX4 & lY4) {
  24375. return lResult ^ 0x80000000 ^ lX8 ^ lY8;
  24376. }
  24377. if (lX4 | lY4) {
  24378. if (lResult & 0x40000000) {
  24379. return lResult ^ 0xC0000000 ^ lX8 ^ lY8;
  24380. } else {
  24381. return lResult ^ 0x40000000 ^ lX8 ^ lY8;
  24382. }
  24383. } else {
  24384. return lResult ^ lX8 ^ lY8;
  24385. }
  24386. }
  24387. function md5_F(x, y, z) {
  24388. return x & y | ~x & z;
  24389. }
  24390. function md5_G(x, y, z) {
  24391. return x & z | y & ~z;
  24392. }
  24393. function md5_H(x, y, z) {
  24394. return x ^ y ^ z;
  24395. }
  24396. function md5_I(x, y, z) {
  24397. return y ^ (x | ~z);
  24398. }
  24399. function md5_FF(a, b, c, d, x, s, ac) {
  24400. a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_F(b, c, d), x), ac));
  24401. return md5_AddUnsigned(md5_RotateLeft(a, s), b);
  24402. }
  24403. ;
  24404. function md5_GG(a, b, c, d, x, s, ac) {
  24405. a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_G(b, c, d), x), ac));
  24406. return md5_AddUnsigned(md5_RotateLeft(a, s), b);
  24407. }
  24408. ;
  24409. function md5_HH(a, b, c, d, x, s, ac) {
  24410. a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_H(b, c, d), x), ac));
  24411. return md5_AddUnsigned(md5_RotateLeft(a, s), b);
  24412. }
  24413. ;
  24414. function md5_II(a, b, c, d, x, s, ac) {
  24415. a = md5_AddUnsigned(a, md5_AddUnsigned(md5_AddUnsigned(md5_I(b, c, d), x), ac));
  24416. return md5_AddUnsigned(md5_RotateLeft(a, s), b);
  24417. }
  24418. ;
  24419. function md5_ConvertToWordArray(string) {
  24420. var lWordCount;
  24421. var lMessageLength = string.length;
  24422. var lNumberOfWords_temp1 = lMessageLength + 8;
  24423. var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - lNumberOfWords_temp1 % 64) / 64;
  24424. var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16;
  24425. var lWordArray = Array(lNumberOfWords - 1);
  24426. var lBytePosition = 0;
  24427. var lByteCount = 0;
  24428. while (lByteCount < lMessageLength) {
  24429. lWordCount = (lByteCount - lByteCount % 4) / 4;
  24430. lBytePosition = lByteCount % 4 * 8;
  24431. lWordArray[lWordCount] = lWordArray[lWordCount] | string.charCodeAt(lByteCount) << lBytePosition;
  24432. lByteCount++;
  24433. }
  24434. lWordCount = (lByteCount - lByteCount % 4) / 4;
  24435. lBytePosition = lByteCount % 4 * 8;
  24436. lWordArray[lWordCount] = lWordArray[lWordCount] | 0x80 << lBytePosition;
  24437. lWordArray[lNumberOfWords - 2] = lMessageLength << 3;
  24438. lWordArray[lNumberOfWords - 1] = lMessageLength >>> 29;
  24439. return lWordArray;
  24440. }
  24441. ;
  24442. function md5_WordToHex(lValue) {
  24443. var WordToHexValue = "",
  24444. WordToHexValue_temp = "",
  24445. lByte,
  24446. lCount;
  24447. for (lCount = 0; lCount <= 3; lCount++) {
  24448. lByte = lValue >>> lCount * 8 & 255;
  24449. WordToHexValue_temp = "0" + lByte.toString(16);
  24450. WordToHexValue = WordToHexValue + WordToHexValue_temp.substr(WordToHexValue_temp.length - 2, 2);
  24451. }
  24452. return WordToHexValue;
  24453. }
  24454. ;
  24455. function md5_Utf8Encode(string) {
  24456. string = string.replace(/\r\n/g, "\n");
  24457. var utftext = "";
  24458. for (var n = 0; n < string.length; n++) {
  24459. var c = string.charCodeAt(n);
  24460. if (c < 128) {
  24461. utftext += String.fromCharCode(c);
  24462. } else if (c > 127 && c < 2048) {
  24463. utftext += String.fromCharCode(c >> 6 | 192);
  24464. utftext += String.fromCharCode(c & 63 | 128);
  24465. } else {
  24466. utftext += String.fromCharCode(c >> 12 | 224);
  24467. utftext += String.fromCharCode(c >> 6 & 63 | 128);
  24468. utftext += String.fromCharCode(c & 63 | 128);
  24469. }
  24470. }
  24471. return utftext;
  24472. }
  24473. ;
  24474. var x = Array();
  24475. var k, AA, BB, CC, DD, a, b, c, d;
  24476. var S11 = 7,
  24477. S12 = 12,
  24478. S13 = 17,
  24479. S14 = 22;
  24480. var S21 = 5,
  24481. S22 = 9,
  24482. S23 = 14,
  24483. S24 = 20;
  24484. var S31 = 4,
  24485. S32 = 11,
  24486. S33 = 16,
  24487. S34 = 23;
  24488. var S41 = 6,
  24489. S42 = 10,
  24490. S43 = 15,
  24491. S44 = 21;
  24492. string = md5_Utf8Encode(string);
  24493. x = md5_ConvertToWordArray(string);
  24494. a = 0x67452301;
  24495. b = 0xEFCDAB89;
  24496. c = 0x98BADCFE;
  24497. d = 0x10325476;
  24498. for (k = 0; k < x.length; k += 16) {
  24499. AA = a;
  24500. BB = b;
  24501. CC = c;
  24502. DD = d;
  24503. a = md5_FF(a, b, c, d, x[k + 0], S11, 0xD76AA478);
  24504. d = md5_FF(d, a, b, c, x[k + 1], S12, 0xE8C7B756);
  24505. c = md5_FF(c, d, a, b, x[k + 2], S13, 0x242070DB);
  24506. b = md5_FF(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE);
  24507. a = md5_FF(a, b, c, d, x[k + 4], S11, 0xF57C0FAF);
  24508. d = md5_FF(d, a, b, c, x[k + 5], S12, 0x4787C62A);
  24509. c = md5_FF(c, d, a, b, x[k + 6], S13, 0xA8304613);
  24510. b = md5_FF(b, c, d, a, x[k + 7], S14, 0xFD469501);
  24511. a = md5_FF(a, b, c, d, x[k + 8], S11, 0x698098D8);
  24512. d = md5_FF(d, a, b, c, x[k + 9], S12, 0x8B44F7AF);
  24513. c = md5_FF(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1);
  24514. b = md5_FF(b, c, d, a, x[k + 11], S14, 0x895CD7BE);
  24515. a = md5_FF(a, b, c, d, x[k + 12], S11, 0x6B901122);
  24516. d = md5_FF(d, a, b, c, x[k + 13], S12, 0xFD987193);
  24517. c = md5_FF(c, d, a, b, x[k + 14], S13, 0xA679438E);
  24518. b = md5_FF(b, c, d, a, x[k + 15], S14, 0x49B40821);
  24519. a = md5_GG(a, b, c, d, x[k + 1], S21, 0xF61E2562);
  24520. d = md5_GG(d, a, b, c, x[k + 6], S22, 0xC040B340);
  24521. c = md5_GG(c, d, a, b, x[k + 11], S23, 0x265E5A51);
  24522. b = md5_GG(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA);
  24523. a = md5_GG(a, b, c, d, x[k + 5], S21, 0xD62F105D);
  24524. d = md5_GG(d, a, b, c, x[k + 10], S22, 0x2441453);
  24525. c = md5_GG(c, d, a, b, x[k + 15], S23, 0xD8A1E681);
  24526. b = md5_GG(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8);
  24527. a = md5_GG(a, b, c, d, x[k + 9], S21, 0x21E1CDE6);
  24528. d = md5_GG(d, a, b, c, x[k + 14], S22, 0xC33707D6);
  24529. c = md5_GG(c, d, a, b, x[k + 3], S23, 0xF4D50D87);
  24530. b = md5_GG(b, c, d, a, x[k + 8], S24, 0x455A14ED);
  24531. a = md5_GG(a, b, c, d, x[k + 13], S21, 0xA9E3E905);
  24532. d = md5_GG(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8);
  24533. c = md5_GG(c, d, a, b, x[k + 7], S23, 0x676F02D9);
  24534. b = md5_GG(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A);
  24535. a = md5_HH(a, b, c, d, x[k + 5], S31, 0xFFFA3942);
  24536. d = md5_HH(d, a, b, c, x[k + 8], S32, 0x8771F681);
  24537. c = md5_HH(c, d, a, b, x[k + 11], S33, 0x6D9D6122);
  24538. b = md5_HH(b, c, d, a, x[k + 14], S34, 0xFDE5380C);
  24539. a = md5_HH(a, b, c, d, x[k + 1], S31, 0xA4BEEA44);
  24540. d = md5_HH(d, a, b, c, x[k + 4], S32, 0x4BDECFA9);
  24541. c = md5_HH(c, d, a, b, x[k + 7], S33, 0xF6BB4B60);
  24542. b = md5_HH(b, c, d, a, x[k + 10], S34, 0xBEBFBC70);
  24543. a = md5_HH(a, b, c, d, x[k + 13], S31, 0x289B7EC6);
  24544. d = md5_HH(d, a, b, c, x[k + 0], S32, 0xEAA127FA);
  24545. c = md5_HH(c, d, a, b, x[k + 3], S33, 0xD4EF3085);
  24546. b = md5_HH(b, c, d, a, x[k + 6], S34, 0x4881D05);
  24547. a = md5_HH(a, b, c, d, x[k + 9], S31, 0xD9D4D039);
  24548. d = md5_HH(d, a, b, c, x[k + 12], S32, 0xE6DB99E5);
  24549. c = md5_HH(c, d, a, b, x[k + 15], S33, 0x1FA27CF8);
  24550. b = md5_HH(b, c, d, a, x[k + 2], S34, 0xC4AC5665);
  24551. a = md5_II(a, b, c, d, x[k + 0], S41, 0xF4292244);
  24552. d = md5_II(d, a, b, c, x[k + 7], S42, 0x432AFF97);
  24553. c = md5_II(c, d, a, b, x[k + 14], S43, 0xAB9423A7);
  24554. b = md5_II(b, c, d, a, x[k + 5], S44, 0xFC93A039);
  24555. a = md5_II(a, b, c, d, x[k + 12], S41, 0x655B59C3);
  24556. d = md5_II(d, a, b, c, x[k + 3], S42, 0x8F0CCC92);
  24557. c = md5_II(c, d, a, b, x[k + 10], S43, 0xFFEFF47D);
  24558. b = md5_II(b, c, d, a, x[k + 1], S44, 0x85845DD1);
  24559. a = md5_II(a, b, c, d, x[k + 8], S41, 0x6FA87E4F);
  24560. d = md5_II(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0);
  24561. c = md5_II(c, d, a, b, x[k + 6], S43, 0xA3014314);
  24562. b = md5_II(b, c, d, a, x[k + 13], S44, 0x4E0811A1);
  24563. a = md5_II(a, b, c, d, x[k + 4], S41, 0xF7537E82);
  24564. d = md5_II(d, a, b, c, x[k + 11], S42, 0xBD3AF235);
  24565. c = md5_II(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB);
  24566. b = md5_II(b, c, d, a, x[k + 9], S44, 0xEB86D391);
  24567. a = md5_AddUnsigned(a, AA);
  24568. b = md5_AddUnsigned(b, BB);
  24569. c = md5_AddUnsigned(c, CC);
  24570. d = md5_AddUnsigned(d, DD);
  24571. }
  24572. if (bit == 32) {
  24573. return (md5_WordToHex(a) + md5_WordToHex(b) + md5_WordToHex(c) + md5_WordToHex(d)).toLowerCase();
  24574. }
  24575. return (md5_WordToHex(b) + md5_WordToHex(c)).toLowerCase();
  24576. }
  24577. //16位小写
  24578. w_md5.hex_md5_16 = function (string) {
  24579. return hex_md5(string, 16);
  24580. };
  24581. //16位大写
  24582. w_md5.hex_md5_16Upper = function (string) {
  24583. return hex_md5(string, 16).toUpperCase();
  24584. };
  24585. //32位小写
  24586. w_md5.hex_md5_32 = function (string) {
  24587. return hex_md5(string, 32);
  24588. };
  24589. //32位大写
  24590. w_md5.hex_md5_32Upper = function (string) {
  24591. return hex_md5(string, 32).toUpperCase();
  24592. };
  24593. var _default = w_md5;
  24594. exports.default = _default;
  24595. /***/ }),
  24596. /* 96 */,
  24597. /* 97 */,
  24598. /* 98 */,
  24599. /* 99 */,
  24600. /* 100 */,
  24601. /* 101 */,
  24602. /* 102 */
  24603. /*!***********************************************************************!*\
  24604. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/pages/index/image.png ***!
  24605. \***********************************************************************/
  24606. /*! no static exports found */
  24607. /***/ (function(module, exports) {
  24608. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAK3SURBVHgB7Zk7ktpAEIYb7AMopQgsn8AqICCzfAM4AThzZnwC4ASGEyw+we7eQDkv+QSWE0hJSHj67/LgGoQszUizq61afVWUmJZmpv+eB0yLqKDgdVMiw7iua223W/t4PDr/OimVNvyZzWYeGcaYgEaj4Z7P5z6+suNWzKMP/JnP5z/IAJkFSI67pEdQLpfb0+nUpwy8oQzA+QGcv8NXm/SxUPdLtVotrVYrj1KSegSE8/2wHTae7x6u/ul0CtiGSNuwObC5uN5ML9iGWB8DSkEqAbVarYtO72QbO47LCE6Pfd/fxNXFpY/6duhWG+vigTRJJaBer/8iadqIaLfheKBS33EcG6Nyz6MimTfYud7HiY+iTJqICNqXMpwPdJxn+FnU+cR1JbMFUR3SRFsAotYJlQc6zl/gSMPhz6G2XNJEWwCiZsvlLPv54XDgLXQjte2QJmlGwJY6DCgDPApi8d+0rYq2gJdGISBvCgF5UwjIm0JA3hQC8uZ1CRBnARmtw4diH32d55UFNJtNPtdeNY7yiLIzDLXZw4nNUq2sLGC/3/codBIzkdtZLBYTXDzJxCezr4rV1QRw9HG5ahRHwh4ZgrMSoXJP9JmIkgBE/2rqIPoTHEYeyRAi5ehJJgt9flepmyhARKIr2xD9IRkG0+ZbyNTirF9ivaQHdrvdvVwW0Q/IMJxiRNujUF+JO1JsXigqgUV/hzqgp4F3n1bI1o3bLN5SPB8ibC49IyJT8V8BSVPoJ+UMZkBs9jo2O71er/1KpWKhkSblAK83/E7EbhhKuVHOZULEO3peguVy+TvpIeOvmJD4bSFykX8FsFUGpl8zJS3iNHQwWq2oGxDm0fUPVmaM/52G8+OY2xMyTKZXTFHgdVGAhX+TaUb0B1iQYzKM8TVwgRc+Lh9F8VH3xUVBQYEafwCLayQ6vEk9mwAAAABJRU5ErkJggg=="
  24609. /***/ }),
  24610. /* 103 */,
  24611. /* 104 */,
  24612. /* 105 */
  24613. /*!**********************************************************************!*\
  24614. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/noticeList.js ***!
  24615. \**********************************************************************/
  24616. /*! no static exports found */
  24617. /***/ (function(module, exports, __webpack_require__) {
  24618. "use strict";
  24619. var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
  24620. Object.defineProperty(exports, "__esModule", {
  24621. value: true
  24622. });
  24623. exports.bizMessageCount = bizMessageCount;
  24624. exports.bizMessageListPage = bizMessageListPage;
  24625. exports.bizReadMessage = bizReadMessage;
  24626. exports.driverMessageCount = driverMessageCount;
  24627. exports.driverMessageListPage = driverMessageListPage;
  24628. exports.driverReadMessage = driverReadMessage;
  24629. var _requestConfig = _interopRequireDefault(__webpack_require__(/*! ./request/requestConfig */ 53));
  24630. var _constant = __webpack_require__(/*! ../pages/utils/constant.js */ 50);
  24631. var _qs = _interopRequireDefault(__webpack_require__(/*! qs */ 79));
  24632. var baseUri = '';
  24633. var dict = '/wx/dict/';
  24634. var dock = '/wx/dock/';
  24635. // ​/wx​/dock​/driverMessageListPage
  24636. function driverMessageListPage(data) {
  24637. return _requestConfig.default.post(baseUri + dock + 'driverMessageListPage', data, {});
  24638. }
  24639. function driverMessageCount(data) {
  24640. return _requestConfig.default.post(baseUri + dock + 'driverMessageCount', data, {});
  24641. }
  24642. function bizMessageCount(data) {
  24643. return _requestConfig.default.post(baseUri + dock + 'bizMessageCount', data, {});
  24644. }
  24645. // /wx/dock/bizMessageCount
  24646. function driverReadMessage(data) {
  24647. return _requestConfig.default.post(baseUri + dock + 'driverReadMessage', data, {});
  24648. }
  24649. // /wx/dock / bizReadMessage
  24650. function bizReadMessage(data) {
  24651. return _requestConfig.default.post(baseUri + dock + 'bizReadMessage', data, {});
  24652. }
  24653. //
  24654. // ​/wx​/dock​/bizMessageListPage
  24655. function bizMessageListPage(data) {
  24656. return _requestConfig.default.post(baseUri + dock + 'bizMessageListPage', data, {});
  24657. }
  24658. /***/ }),
  24659. /* 106 */
  24660. /*!*************************************************************************!*\
  24661. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/js_sdk/localUserInfo.js ***!
  24662. \*************************************************************************/
  24663. /*! no static exports found */
  24664. /***/ (function(module, exports, __webpack_require__) {
  24665. "use strict";
  24666. /* WEBPACK VAR INJECTION */(function(uni) {
  24667. Object.defineProperty(exports, "__esModule", {
  24668. value: true
  24669. });
  24670. exports.getUserLocalStorageInfo = getUserLocalStorageInfo;
  24671. function getUserLocalStorageInfo() {
  24672. var userInfo = JSON.parse(uni.getStorageSync("laocui_user_info"));
  24673. return userInfo;
  24674. }
  24675. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  24676. /***/ }),
  24677. /* 107 */,
  24678. /* 108 */,
  24679. /* 109 */,
  24680. /* 110 */,
  24681. /* 111 */,
  24682. /* 112 */,
  24683. /* 113 */
  24684. /*!************************************************************************!*\
  24685. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/static/mine/banner.png ***!
  24686. \************************************************************************/
  24687. /*! no static exports found */
  24688. /***/ (function(module, exports) {
  24689. module.exports = "/static/mine/banner.png";
  24690. /***/ }),
  24691. /* 114 */
  24692. /*!**********************************************************************!*\
  24693. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/static/mine/head.png ***!
  24694. \**********************************************************************/
  24695. /*! no static exports found */
  24696. /***/ (function(module, exports) {
  24697. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAGGZJREFUeF7tXQd4VEXXfs/2TSVi6L0GEBBRUBBRURH8FCygyG8XKSJSRBGlCoLwUSJSFJAiSpEi+IEIUoWAKNJEek1M6CSkbN/5n7mbhJTd7L279+7dqPM8S0J25pwz5525d2ZOGcLfoDB2NQaO6HrQuOqBoT5IUw/MXQXQRAIsEoRIMEQCiMrtbhaAbM+HsgF3NkiTAuY+DsIxaLXHAP1xIsos7eqh0tYBxhjBbm8IYm1BeACEVmCopEw/WBpAu8CwBYy2wWD4g4iYMryUoVoqAGaMRcPleAbM3RFgbQGKV0Yd/qiyywBtA7F10JqWl4YZHrYAM8Y0cNoeAWMvgqgzALM/9Yf4ewuIVoGxhdAZNxKRO8T8RbELO4CZLfM2aPQvgvA8GCqL6oXalQh/wYVvYKAFRMbDaotTkH/YAMyYrTEc7iEg6gpAF05KkiCLE0RLocUnRMZDEtopVlV1gJnDci9AQwB0BKC6PDJpmoGwFsw9jvQRSTLRDIiMagplVmsdaDEJwBMBSV56Gq2BDgOJTKfUEDnkADPGIuG0DQPwNgCTGp1WgacVYFOhM40h4vvu0JWQASzsX132bmDuiQAptG8NneIC4iQsxti7MJgWh2o/HRKAGWPl4LQtB9AmIMX8/Rr9DJ3xGSK6pHTXFAeYOayPAGwhQOWV7kzpos8uAvQi6U0blJRbMYAZYzrYbWOgwWAAGiU7UYppuwGaAJ1hGBE5leiHIgCzzMx4GHXfgaiVEkL/7WgylgS9qTMRXZa7b7IDzJilOpy0HkCC3ML+rekRTkKL9kSm03L2U1aAmd3eFOT+AUBFOYX8x9AipMLt7EiGqANy9Vk2gJnD0QZwrQFQRi7h/pF0iK6DaTqRXv+zHP2XBWDmtHUCY4vD0OIjh47UoMEtVc+TzvhdsMyDBpg5LPcBwjs33Mx5wepG7fY2QNue9PptwQgSFMC579yt/z6Wg4GgxLY3oKM2RMaDgXIIGGBmtdaCDklg+PcAI1Dti2rHLsJFrcgU2Oo6IIBZZmY5mPQ7ANQVJeO/lYLVwAnojPcGcrQpGWDGmBZO22YA9wUr9b/tJWiAsR3Qm+4nIpeEVtIN7MxhHQ/gPSlMQlnXZsnBmRN/4szxw/jrzEmkpZzFlYupsFpyYLV4LHUmcyRM5gjcWqESKlapgco16qBW/dtQo25DGE3hvFak8aQ3vi9Fn5JmMHNYHwWwNhzPlg/9thPb1q3A3p2b4XQ6pOggv65Ob8Cd97bD/R2fQaM77g6IhsKNuGPfY6Q38V2LqCIaYJaTUwUGzT4w3CqKcggqud1u/LJ1PdZ88wVSzpyQlWO12gno1L0nWrR9RFa6wRNjV+BgzSgiIkUMLVEAM8b0cNo2hZM999jBvfhq+jicO3lETD8DrlMroTFeePN91GnYNGAasjeU8D4WB7DL2htuzJBd0AAIupxOLJk9CeuXLwygdYBNiPBEtx54+pW+0Gi0ARKRuZkGfUhrmumPql+A2Y0bt8KsPwbQLf6IKf191o10TBn2Fo7/8bvSrLzS5+/lt0d9CnMED3NSu7BrsDjqU0zMlZIk8Q+w3TIXRK+q3R2+Ep44pCdSz8tqTZPcrWq162PwuM9RpqxK0TMFJSZ8QTpTz4ABZnZ7S5Cb+/Wq6pGRmXEdH739AtKSz/gBhIExj3M1E4YuQfgD/8ljxoQ/MlB+BV7Z7xgvxrNKzboYnrgI5si8YEXJ40SuBm7oNK2IDL/4Ilhi75jdsgdEd8klTSB07DYrPh70Ck4d8XEcyxg8EHrACwQwxrifej7++b8LNIURk0ubETg3/t9Gd9yDweM/h1ardhAG7SG9saVkgJnD2h6A6P1WIOCJaTN9zGDs3rKueNU8YAOYgWL4llRHGBBEeLjz83jxrQ+CJSdH+w6+9sY+ZzBzWLmZStXjyI3ffYOF08Z6ZmjuP54JJf2xKocWC9LIA7nPBxNwz4OPyU1eKr3tpDe19dbIq6ZybbxB2SGlSli0/uW0FAx5rRP4IzocSx7AUTGxGP/l94iNK6uymKwt6c3biwrhA2Ar96vix5KqlU8Gv44/ft+FPEWqJogvxvnvZqBVu/+g99BP1BbxB9KbeABfoVIMYGbPbgbS7lUz0m//L9sxaWhvQdBwBbioXKNnLEXN+repCTIDczUnQ+S+gkJ4AdjyOYjeUEtSfr489PXO+OtcbjBegZmilkw++RaQLaHpnfhg8gJ1RST6knTG13wCzBgzwWlLU9MFJ2nTWsz8+N18GcN1Bnt7ugyZOFdtK1Q6dMaKRJS/cCk0g5kt5yloNCvUHIaDX34MF5LPlgqAhX13AZN6/cbN8eHUEJ6RewPK7X6ajBEr874qDLDTugoMPOGJKmVv0mZMHfZWId6laQZzwUfNWCo4D6hWCN+RzvRkMYDZ9etlEGW+CMCglnDj33kNh/ftLjUAe1aBhZej9z78BHoOGaeWCjlfO7Is5SkuLp3/J38GM6flNTCao5Zkl9KSMej/vOzMwnmR5WWVrzcY8dm32xARFa2WKvnW43UymOcWAdi2GIw9p5ZUy+dNw+pFs4qxD+dHtGcC83PswpuRVweMxAP/6aKWKvlR3xLSGbsVBthh4Wn7Kqgl1cD/aw9+elW0lEaAGzS9C0Mnz1dLlZxvGulNQpoMYegxmy0BGqas70sJ3U0+fRxDe+SvC0rXO9jLi5h7fUxfsR1RMSrG4bmpARmNRz0Au6w94Ubx52OIxuB3X83EivmfeeUW7jPY12P6jXfHok171TYk/N3Riwymzz0AO9V9/47s261Ee28gNt4Qjc1cNkWW0gBa3v8o+g7jacBUKrnvYQ/Adus5EKqpIUp25g30fqo1mLt4Ls8wX0Dnq8vbQisyOhYzV+4AaVRyhmE4TwZTdco9nsxRy7iwZ9sGTBs9IOjHs8lkQmRUFK5eKdEHTZEx7A1gzmj0zGWoWa+RIjxFEGXQGSOI2bKaQKOTLWWACMaFqiz87GNsXPV10AC/8uqrqFChAiZOmACnU5GENSV2zRvI3Xu/h0efeVGqSuSr73Y2JbXPnz944ymcP3UsKIDvaN4cPXv1Emhs3boFi7/+Rj4liaTkDWAeBsPdbFUr/FyaOWzvA+xjNYSwWS3o8Z+7BJuvD4T9OtGVKVMGI0aNQkRERD6JL2bNwt693KQduuIN4Lhby+PTpTwQU61CQ4g5bfPA2MtqiMAd2Lk7rK8iZovUf+BANGjQoBAJq9WKsWPG4NJFfrQemuJL1unLtyNGLXcebh9mDvXcc35cuQiLpvs+mPcH8EMPP4QuXZ/1imBycjI+GTcODkdgkYaBDAtv8r4zbhaatlAtRed6/ojeBTBVYiXnThqOretKMD8zQG+KQLfnunrdCrdo0QI6vd4nFidPnlRsFtvdWqxYthR2C7+hx1OE3XARH5nn3hiEx55VKzCEdvMZzFfQTQIZscG2KfGAI5e4KSISiYlTg2Ule3sXI7zzzhDk3Ch5W6ay+fAgMaf1DBhqyK4BEQR7PN4C1pyS82ObTGYkTlNxJVpCP/q/PQCWnJsz2FtVbvznTgCqFMJZYg7LVTUiBzOuXUHfLl59tQvpgh9gJE6bpop+/DHt368fLBZLidUiIqPx+ZrCTgz+6Mr4/SX+iOYShjy1/tGDezF2gP9DgNIOMAdrxsqfER2rSvStVTWAf96wGl98MrTYYK1cuTLaPfQQqlarBg0RUtPS0OKuu/zuh2Uc9aJJ/bpnDypWrAg3Y0g+fx4//fQTUv/6q1j7UdOXgGcKUKFwgNV5RHszEba9/3507doF9oxLsGelI6pCTehMecHWxS02Kigsd7l8M4rRac1GVtppGKLjoI8th2VLl2H7tsJRP28Nn4wWbXksX6gLu6baImvOf4dh2w/53p2oXr063n3vXWSmHIE5riKMsfFFgsx4fK+XfUjIdZbLsMB2iO9/bRmXYbmehugqDTBxwkScPXvT9ff5XoPRoYsKZ0meRZaVX8XWMNR64tH6B3/lyfI8ZcjQoShrdMJcpgL0ET4c1sJoEnvTlyMnE5brF3DVpsX4cTcPcPg+mO+HVSgHVTvoKGhkMBgMwko54+whxNUKo2w2xRDxP8Kunz6A2BqN0a9v3/xTNPWC0zwHHT8CCHkyqL7P3IeM61cFFVaqVEkwGPDRb47z5/fnX8kqzJR8lnl9GDViBFJTU4W/N2p+D4ZMUMUjeb0qxgb+znr5kaZwuz1pF7UaDSYnJoJvicK5CBYjEesAm80GvkfmgXS88KRqY79QISKIaCFfRQ8FaGwoFZt9IwO9nix8IctLr7yMVq1alyxGWExe/0Ls3LEDCxfcjDS8Jb48EpeoYTakodzg3xUaTUjP0i6lJmPQC4WjGCIjIzF85Ehw+25pLunp6Rg1Yjhycm6ecPHEp7P/92vou+V2P6uKy87Z44cxrDe/JrhwiY+Px0svv4y69eoV+oI/6jQavi9RPzdHnmAemQo71J04fhzz583DFS9+YQs2HIRGG+IseYLLjicmOKROd0f27xFSI3krPMFKnTp1hJMs/ntKcjIe79QJdeuGV+7xEydO4PvVq1GlalXBI4WfZHHzpC/vlM9X7w51vJLH6Y4rOdRus/t2bcXkD98U/ch69rnn8GC7dqLrh6Li5k2bsHTJEtGsuOsOd+EJWclzmxUADrHjO897xfNfiS2NGjVCv/79xVYPSb1piYn4448/RPOauGAtKlQJoVW2iON7T1DoQle2r1+F2RM/FK0cnU6HKVMTYTCqFrpcSFa7zY5BAwfAbreL7sPHs1ehaq3CawvRjQOpqEEv0uaFroQ4+GzTmqWYnzhakth9+/VD48aqWGSKyXno0CF89qk0J4SQR/4XDD7zPKatqWChuXPwx5VfYdF0fvWD+NKwYUO8PcB7BIR4KvLUTJwyFX/+yY/wxZfhny5C3UbNxDcIqia7QHqzcH9kgQj/0AWgrft2PhbPmii5CwMHDUL9BHUvNT169CimTJIeVPbh1AWo3/hOyX0OqIHXAHC75TVQaFI4/G/JXCydPVmy7DVq1sSQ999XLVcl3wJxf2u+JZJaeEA4DwwPSSH2OumKpnAIYRKW7xfPwbI5UwLq65NPPYVHO3QIqG2wjdb/8ANWrbxpw5ZCb+jkeWjQtIWUJoHWtcNir0QxMYIlR5U0St8vno1lcwJzheWHH33efBNNmobWrHjwwAHMmD7dd5iNHzhCBrCvNErCQitE59LBzGAup9FoxHtDhqBylSqBjnJJ7VJSUjBh/HhwK1Gg5YMpC5DQJATvYH7+bIxYlidn4RkcolSGa5d+iSVfSF+oFFRudHQ0er/5JmrXrh2ozkW1O3XyJGbMmIGszExR9X1VGpb4FerddkdQNEQ0LjmVoTCLnba5YEzRWIsfli/ANzMniJC35CparRbdX3gBrVv7MTMGyCkpKQmLFi6EyyXpukCv3EZOX4zaCQoHkPhLRioAHIJ0whtWfY2vPpMvYpV7Y3bq1EmI8JejZGdlYc2aNdi6ZYsc5AQaY2YtR/W6haMgZSPuISQunbBQ02HldzUo5ue5/cdVmD1B/FGlGEVwb5CHHn5Y+JjNgV0wyaMUftq4UfjwEFQ5y0ezvhUuv1SwrCe9qdj2QpWU/vt3b8OkD/oo0td6dWrh9W6dYYwpC0P0LdD4uRXF7XLCnnkNthtXMXfxdzh2Upl7mZQ/yZKQ0t8zi207AVbYr0YmSE7+eQCj3npeJmqFydSsXgWvPHEz5klrMEFrMHs+Rs/MdtkscNnzPjdn6rw123DmnKg7HyXLPnza16jb8HbJ7cQ1oCTSG70uRHzfuuK0PgGG1eIYSKvFbwp9/3VlkoQVBViKZEoC/PGcVahaUyFrEqET6UxrvPW15IuxHLZfASb75u3Khb8woLsynrrhCvDkrzcgvkJlKeNNXF2GfWQw+dx/lQwws98Np3C1nazOUJkZ6ejzlDJbm2pVK6HH04+AuaSlbiCtHrNXbMT55OLBY+I0XXKtmSt3IipWdodCBrhbkz5ily/ufoFjdss8EMkaWOOw2/FqB2VMZ+XKl8fojz6CPfMq7FnXYc/JhMuaDZbrg52nCNJooTVFwhARDUNUHAzRZTFi2DBcVChxy7z1+8BvGJe1MDafDGbvzm25jPwDnJlZDib9UQBxcgr30iNN4JbhAKGoTBzgj8aM8SoqX1jxwhdc3srwDz9UBGB+v+H8DTLnmiO6Dos9gaKjL5WEi1+AhRW1AhdE9+rcCtmZGXKOGYFWSQD7Y6YUwDyt8MxVO/2xl/a9XBdECwAzpoXTxoNeZXtxDn6pIy6knJPWKRG1wxFg7mzHne5kLDuhM7YlIr9nqKJmsACyxVIDOuJXb8vyqB7drztOHN4vW58jDCZUjI1H5XIV0b1/j4DoLk6cg+SLqUjLuIwcu3wnWfVua4ZhiYsCkqlYI/5odrjvILP5ZgByCZRFAyyAbMvuDI2WW7wltfPGn1/V/ntSYPE6kUYz6sRXQ9VbKqBKXDnUKVcd5WNuXg6Zc1dZQCtRRBdDxK+eaEdeLt64ipOXziHl+iUkX7uAk5fPI9tWcsIVX3pu3rod+o+W5qTngxa/1/ZJ0hlFn09I1ILgJD8FhKCdlOdOGoGt65aLGtUc0EaV6qBJlXqoV646KpYp+Xp1W+0ouOKlRSpqL1thPFVySiQ+s49fPIeDKcdxOPWkaMAfeOwZvDpwlKi++qk0lfQmSZ6H0gFmTA+nbQ+AoM7dvp07FWu+me21PwadHg0r1sbtVesLP/0BWpSI26yFtUkZ8YlbGIPpYDo0Fr+vtEKs0tIv48+0U9iffEwA3OHynsb4ieffQJfX3g4SYLYHOtO9RCRpgy8Z4Nz3cTVo6edgssQXtQnrtTo0qFgLzaomoGWtJojOT74SmF4clcxwVMtL4FIyDf35bOhTA3v85lHOtGbjl9MHsS/5KI6knS4Edvc+7+HRp/2njPIpJcN5uFgbMpsle/sFBLAAstVaF1rwU65bA4Fg1+Z1mDF2MOKj49C+UWu0rt0MUaabKYEDoVm0jaMiBznC90x2M+iTs6FPk29BxWXgYCed2o8fDyfhcuY19Bk6Afe0C/SWcHYVLmpFJtPxQHQSMMACyPbsO0HaTQBipDJPOfA7zq/+Hi1rNRUi/JUq/HHtqBoBV6zh5sLLxaDNcAjgSn0sS5HT5XYLs7pap8dRpWkAJ3dEN+CmdmQw/CaFb8G6QQEsgOxwtAVcPM+HUZQQGZnAoWPAeU/+in9MqVYJaFwfiBV95Z0N0LYnvb5w0i2JCgsaYAFkj2mRx1L6dqWw2YF9fwJnkvnJiUQx/ybVea7hmlWBZg2BkgPpbCBXV9JFejUBStGGLADnzuQ2IPdqMFb8ICT1IrB7P2AN3O1USqfCvq7JCLS8HajsNV44HWCdSW8Oaubm6UA2gD3v5Kym0OjWgUG4N0+Yqb8fBo4p4wYT9kD6EzChFnB7I0BITyGUNDBNBzIYZLNMyAqwgKnFUh1a+hFuV31s2wNcuOyvm//s7yvEA/e3BDSaI9CxDkRmWQ/oZQfYM3FZPHbs/gmnkxV2BP6bjI261Q+iUcIDFBt7Te4eKQKwAPK6dUY4aA4ysrqDMcX4yK2QkNIjYoiJWgQD60EdOyqyQFFc8Wzthm5Iz/oSTqe0w+GQaloFZnqdBWViXqGODymao0xxgIXZvHlHfVy6sgw2+7+PbK4Qk+kAKpTrQm3vPqH00AoJwALII0dq0LzVO8jMGgmHM7DQA6W1oTR9vc6K6KgR2Jv0Xxo5svh1qwrwDxnAebKzTUmVkZ4+FTnZT8P9D3k3a4ghMnIFKpTpT61aKeO26WNwhBzgfKA3bG6H65nTYbXVV2Dghg9Js+kIysb2pXZtA/NuCLInqgGcu50irN/8ErIsg5GTo2hkVpB6kt480nwE5oiJ6PjgfOKrZZWKqgAX7DPbuP0xZNx4FzmWNqV2W8WBjDBvwy3RE+nBtutUwrQQ27ABOP/RvT2pBS5deQNOdzfY7PIaiJXSuNGQA51mMcrHzaY2bX5Rik0gdMMO4Hygt2zRwaF9DhkZXWB3dITTqQukg4q10ekcMOjWIa7McmhdS+iBB0J/7biIzoUtwIUe37/9FotLGS8gJ+dxOFz3wW5X59DEYLBCr92OiIjvUavyAkpICC5xhwiAgq1SKgAu2km2PaktLl9tBdDjsDuaw+6QOegnl6PRYINe/xvgXotyt+6iNvdsDVbhoW5fKgEuBviOHZXg0t6NzBu1kJUTD4P+HoBqwO2OgJuZ4Hbr4XZr4XJ5fIO0Wp6u3QWNxgENWaHR5ADsLKz23YiJvoToqNPQGnfTvXeUereT/wdi29kqXXm2EQAAAABJRU5ErkJggg=="
  24698. /***/ }),
  24699. /* 115 */
  24700. /*!*****************************************************************************!*\
  24701. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/static/mine/versionicon.png ***!
  24702. \*****************************************************************************/
  24703. /*! no static exports found */
  24704. /***/ (function(module, exports) {
  24705. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAABVBJREFUWEftWd9rHFUU/s7sJtmHtrTa7EyTWaiYgmCEFhQrVnTNpD9QHwqtTWgKCoopKiIIrX+BLRREVFpRUGilUSsNNNI2mbhKI1YU2oeIBSMWdpLOJNqGmkI2uzNH7syu3d1kd2Z2t0Kg85adc+/55tzvfOeeE8Iye2iZ4cVdwHf6xOqOcDw+en8TWCPCFoA7CaSAoLjAGSaDTYDGmTGWBenT011/1PNRNQJORdW4vYcl7pdAW8IAcMBjzPTBlBX5GkjmwqwVtqEBt8vDXQQ6RkQdZc7mAR53mCYkwrx45zBiEnEHQJ0AYsX2DL7CzK9NWltHw4AOATgVSyi5dwHqLzhgxhyAARB/bpjRi0DSBbr4ScVUJbcZTHuJ0FcKno+lzeibldeW7hYIcGvrN0qL1HyaiDa71GTkADoyl7l5eHZ252yYCK1efXr1ipZVBwB+iwhRbz++mHEWds7MPGP67eUL2AUbaU4R6IH85uNZOL2WtW3cb/Nq72X5fGcTpJNELl0gKJKxF5J+oH0AuzS4ANDD+cgOZpzr+2ZmnhdUqPtpbf1yRYt0z0kiPFuItGFFk9XoURVwQhk5WuAsMwYNK7LbP7NTsXXx3JMCwLXp6Pf+3ExFVdk+XQANCE53768UjYqAhRpIJOkFGmScG4/5RVZRzq5vQlMKwPq8w6tZZJOmueNqtePwIr3mxwI9HHa0SupRAbD46txvQrpEgmVhbwrCWVXRvyJgV6l84ZRharv9+ONxOnJJJKLgs2FGH1rqNJcErMb1vSThhBddOmRYXW/7ORTvE4r+Z1F0C0uupk3tviDrVXn0HSI+KGxtRs+UpX1Rvm5JwAlFvwBgi9DZucw/iaDSpSr6WQK2l0X4nGFqO4IAFpK3MrbyWl6nx9Km9oQv4NbWcx2xSPT3vCp8Yljay0GcCRv3WCmSImCtJ1X4K8t2MgidCj5UWf+YCC+Jv+ft3IaZme0Txf4XRbg9rr8iSTiW18akYXZ/FxSwsGtbeWYtxVpcmbqVvTUY9HT+A6yMPEUgkbhwHPRPTmsfVQWsyvrxfPmcT5uRNf6yFOZzgtgK7bdvCFow44Rhaft8AI9cIqKNAP+SNrsfCeKi2MYtvbFVb4jf5uZvvhc2wl7yjvwsihUzXzas7k1VASdk/Zq4zzqMgUlL6w0LWJX1M7crF4YMS3su7B7tsn5SIvSI+3Ta0tZVB6zonDf4LG1qL4Z1ViZtgSWt2E9C0T8F8IL4LW1qJXm2KOkSyw5wnZRoRIRDUUKV60u6RgAOlXT1ylr9gEPKWnt8uF+SpKO1Fo56AaslhcPZPzm91S1ihWdR0tVTmj0NLbkAhVaJ0KU577Smy0+9gGu6/Ainany4jyTpuEuLENfLegGXXi/t3ilr20B5HQh0gc+RtNE0n/41SBEppgQzTxhW94Yg6xTl2wej7Fyu6QIvHLTJuhYhjHhR5vEgLZJ7OsroAQIf8pKWDhpm12E/wOUtks3onrI0tz0LGGHPrKwJHTKsyE7/JhRou/e8OxKY+nvbFT+wQIOaUM9RKqbKuVTRAGUo41zv9WtG/UF6Fg1v871NFw9SchTpCcrpSuA9ztoDDR6kFCKx1KiKj8xl5mocVa04ANCdGVXdjtDiYaBou0RXAHJOGGbTT9WHgdlHwVLf/zIMLD5WoR4S8fuFWVvRu3kGj3PZuJWIO6jCuNVher2SGlSiku8wcOmFqWibvLArQpFXxTggaJLl7cZstj+csppPBVGcULIWBIi4ezSTpBFJj1f/l4HzwwI7ennbHsRHsU2NEQ7rpnH2dwE3LpZL77TsIvwvQyHlS9/f8ZQAAAAASUVORK5CYII="
  24706. /***/ }),
  24707. /* 116 */
  24708. /*!******************************************************************************!*\
  24709. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/static/mine/editpassword.png ***!
  24710. \******************************************************************************/
  24711. /*! no static exports found */
  24712. /***/ (function(module, exports) {
  24713. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAA/BJREFUWEftmE9oHGUYxp/3m80m8Q/UJJsZsxMQbKGCl0APETw0ZJIaqwdBhELFFhU8KBbsIVKlCoUq6qGHnixY0YOot9TSZHdZoYIBPQgWKhhIYGdkJtPGHgrdNbPzlplxcbPu7ny72e0azFz2sO/3vr/v+f7M+wxhhz20w3jx/wROpb5+oJ8eOgSBSTDtBWFPsHLMsAFaAfnLlp3IAVPF7a7othQeHc09miSeJ8JRAAPNYJhxm8AXSkwfrK8bTrvgbQLnB8ZV7yyDXidCoro4AyaYbxDBY5BGgF4DV4SPdwrryjlgymsVvGXgVOo7bUBJLgB0oFKMGctg/3yJN7Oue9iuhhh7cGFEDPY/BSFeJuBg1ZhLJX/jiOu+cLsV6JaAA9h+JZkn0P6/i6yVGa/+4RhZmaJjatZQCJ8CeCSK5x+K5T/nWoFuATif0FXvKhFNtlssGBceUDG0QBSp7TO+shzjiMyEgxhp4LSaOyWIz0TCIFv0N55rRZmtQPmBcc3LAPRkCF3GMcs1PpeBlgKO9m3/angTMOyiX5qo3asyxf61t+8fvE7ACIN/M+2Zx2RySAHrauYsEc1HavjHLXf2okzyuJj0yOIzIqF8w0wXTGf6jbh46S2ha9lCeD0x1gqOsq+d60gGRiYmVuGx4cX9Sp9yPTogdMZypt+VSdytmFjgh0eWDiQS4qcImJ+wnJnlbsHI5I0FDpKkU4vPB7+We+hbmaTdjIkFHh7OpQf7aG83ISq572zyys2b01azWk2BdTX7JoCPa/uFbsEzI+gtTpqOca5RjYbAQ0OX9fv6kqv3CrYCGECX/NJ4o3u+IbCuZQ4SKB8l4p/L7H8iSGxpbDqltM++ppB4q9JQMXjKtGe+r5dfCph9/0VzffbLTgHWy5PWlo4JiM9CebYN3CRBpybRU+DQiQjSZU59ZcI9A9a1zEcEOhkuLcMjwomCbZyPW4meAKe1zGEBulQNF0B7pc199q25tWbQPQHWtdxpAr9XCyZzaHsDrC69QiQCC7Tl8cv+hOXO/vKfUxgI3fRV0D8GVdYC9UThSMEAurwKgsbAFdNWnpXpn3sIDIxr2cBOBc74YsE2jsfdEMH/u8CN3u311NPVzO9EYUu6MxROa9mXiPGaV+a37Rv1m5jaifZ0S8js2e4ClzFnusaVdkBkx+ijS0dJiC861K3RvGlPfyhbvJ246i9LbbWXaTUzKYh+rDQxAF8D0a12YGLHMO8B6PGKu2nmzpt4unxC17xfq75UxtbtRAAzXzOdxESjl01TE5oeuqxTX/I0CPfENYOxwpt/vW9tPG02mnysze+Eap3MsQvcSTXr5dpVuNsK3wXVCjlLaPN+NwAAAABJRU5ErkJggg=="
  24714. /***/ }),
  24715. /* 117 */
  24716. /*!****************************************************************************!*\
  24717. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/static/mine/youjiantou.png ***!
  24718. \****************************************************************************/
  24719. /*! no static exports found */
  24720. /***/ (function(module, exports) {
  24721. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAAgFJREFUWEft189qE1EUx/FzklyDmCgkryEkkHtDxGg6glAq7dMoLipuxAqib+I/XGgHi7MJIeTeZFcspStREZ8ggWSOXIlQBt10zhlauLOf4TO/+cLMIFywAy+YFwJY+omFhcPCmQVCEiEJ7iSSJKlEUbSUXvbv9XM1PBqNLiul3iPiZ631syLQucDOuQgAYgBQiLjb6XT2pNG5wB43m8120jR95dEA8ERr/VgSnRvscdPpdJuIXns0Ee0ZY3al0CzgItFsYI92zt0DgDcAcElqaVawR1trtxDx7Rr93BjzkDMPdrA0WgR8Cu3zqBIR29JiYI+eTCabpVLpnUcDwAut9YO8eYiC/4F+qbW+nwctDs6iieiRMebpWdGFgJ1z14hoiIjX/atca715bsHj8fhquVz+hIhdADhUSt1ptVq/ziWYG+tvUiyJ4XBYr1arB+tlj5RSgzzLsnwP/++xrrExIt4AgKM0TaNut/vzrBmcPo99YUksexJJktTq9fo+ANwkomMiGnAty56Ex9ZqtX1E/INdLBZRv9//wZEBexJFYVmSiOP4SrPZ/AgAtwDgZD6fDySWZUnCYxuNxgdEvO2xlUplo91uf+fOgC0Ja+0GIvq/5q/L5TLq9XrfJLEsSVhr765Wqy9FYFnA0otmr8/+4pC+gQAOC2cWCEmEJDIL/AZuWc4tuG4XogAAAABJRU5ErkJggg=="
  24722. /***/ }),
  24723. /* 118 */
  24724. /*!*************************************************************************!*\
  24725. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/static/mine/outicon.png ***!
  24726. \*************************************************************************/
  24727. /*! no static exports found */
  24728. /***/ (function(module, exports) {
  24729. module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAABQpJREFUWEftmXGIFHUUx79vZtUlFM7LvZm7mwUPCgwKDC5CSvC8mdRUMLjSoD/6w/8KukDRoEgpSSjIwNB/wj9MlCQsSu3csfUP/xBUMhQSMjyYubuZ20sFLde7mXnx2905Nr3dmdm9/UO4/WvZmffeZ76/936/92YJj9mHHjNezAG3esVaonAm893C+dLiHcS4Yo8b38/mQ7QEOKua7wDYzwwv+Pd+5+jdjROzBd0SYE09+zGBdwnIKUz1OM664Tng2VJA+JlTuErNxDmsqWd3EPMgA3ttV/9qppWJo3BWyX3JRAMIsNMe14/EXeEEwPlUt+IflghbhHNmvmK7xvONAmuKeZcICyu+9tqu8UEc6JjA+ZTW4R8lCQMlpwzHD/j10YJxvlHg7szQAEnyoRAazPss13g/CjoWsKbkPiOinWVWvu7BW1dvq4qTEsJXd+bMckmSToOglpXGVtvVv6kHHQncrebWS6CfK06Gi/6DFYXCeqee07jAwkfXk0PLpJR8saJ0cZL9F1x3zbVa/iOA8+ms6v8BYCmAoucFK8cmXrkUtWxJgMtKDw1Isny87JfPW46xsiFgTTHfI8I+YRwwfTri9n8UBdvoPtytmEfDgvaZN426xo8zxaqjcD6VVfw/QVgqisxy5R6gr9gy4PZTGs2bf5MIKQbO2Y7elwi4SzF1mZArFxrtsp3+3XFgG1W4ZKeYh4nwlvj+z+Rk9tatV+2HY9ZUWFNznxNomzAo+t7ThcLaG60GrhYJwLuWo38dGzir5i4C1Cu2MdsxnokL24zCQD6VVf27ANIB49iIq7+ZANi8X8+w3gN0KUNbZJKPgnHHcuXOuLkvfE4LxXzNdo3nYgG3tZ1oW5RedLuR/A0DaGpulVf0hp07yXrh6TwuFbreGQtYVU8vnYd5N5sBTpJC1fdmVfMQgLfFb5ajP1JjMxbdYwcshsi03C6SXxzwsZqSRhV92E5TzJ+IsAHAsOXoPbFSopT8ijlWakoYpuXqxmwBRfnRVNMiQANw3nL0R47o2vuwYp4gwiZm3LNdeTHQ50UFa/Z6dSrWWtmawOGoLiAC8IYRxzjZLFCU/f97F3/jiLsm7BKnTWsCt7ef0p4Iz3bGD7arvxYVsNnrmpK7SkTPMjBhO3J2pv27bnupVdJCgHie1Ds2sfpys1C17LsUc7NMOFYudNpnuf0zTh91gUsTgSz9Vt4s+ILtpla2IpfFQbUwvehqpdiKRf9BT60hIXri6DAPSVJ5I2fwF7ZjbJ9tlau2MqHuh5bbv6dWjEjgyjEtVBZTh5i7BmuN9408iBj3QTRYtuVLlpNaUW8VI4GFm84lZ3plWcpPj+Wl/lja01x65NPdHf6BcPXEkDBFUyui3sPFAhbQ6pLcqpRM4hQK3yWcm2Rp6/h4/19JldWUX18E/INEtLwsLBzf8/tG/15zPcpXbGDhqCuTe1mW6Hg4lovenhnfMkv7R8ZX/x4VrKvjzEsSSdvEgRTey8w3Ai/YGAdW2CQCFgaZzEl1gbTgQHXQSkFeJ+AcQNc4YAeSPBFwoEqAyoTlBIjWSxy5058AfHDSv729UHjjXtTDhtcTA4eGWsZcCxmfENAbN9i0qsAvzLx7xDUuJLVtGDgMVCrIFG0GsIFAy2oBiH2cIZnseUfiLv9MvpoGrnZa+m8DbU+RTG3wKQ2Zi1McTLju/BtJxqR6qs8qcNLlbeT+OeBGVEti8x9q9mtLhchgzwAAAABJRU5ErkJggg=="
  24730. /***/ }),
  24731. /* 119 */,
  24732. /* 120 */,
  24733. /* 121 */,
  24734. /* 122 */,
  24735. /* 123 */,
  24736. /* 124 */,
  24737. /* 125 */,
  24738. /* 126 */,
  24739. /* 127 */,
  24740. /* 128 */,
  24741. /* 129 */,
  24742. /* 130 */,
  24743. /* 131 */,
  24744. /* 132 */,
  24745. /* 133 */,
  24746. /* 134 */,
  24747. /* 135 */,
  24748. /* 136 */,
  24749. /* 137 */,
  24750. /* 138 */,
  24751. /* 139 */,
  24752. /* 140 */,
  24753. /* 141 */,
  24754. /* 142 */,
  24755. /* 143 */,
  24756. /* 144 */,
  24757. /* 145 */,
  24758. /* 146 */,
  24759. /* 147 */,
  24760. /* 148 */,
  24761. /* 149 */,
  24762. /* 150 */,
  24763. /* 151 */,
  24764. /* 152 */,
  24765. /* 153 */,
  24766. /* 154 */,
  24767. /* 155 */,
  24768. /* 156 */,
  24769. /* 157 */,
  24770. /* 158 */,
  24771. /* 159 */,
  24772. /* 160 */,
  24773. /* 161 */,
  24774. /* 162 */,
  24775. /* 163 */,
  24776. /* 164 */,
  24777. /* 165 */,
  24778. /* 166 */,
  24779. /* 167 */,
  24780. /* 168 */,
  24781. /* 169 */,
  24782. /* 170 */,
  24783. /* 171 */,
  24784. /* 172 */,
  24785. /* 173 */,
  24786. /* 174 */,
  24787. /* 175 */,
  24788. /* 176 */,
  24789. /* 177 */,
  24790. /* 178 */,
  24791. /* 179 */,
  24792. /* 180 */,
  24793. /* 181 */,
  24794. /* 182 */,
  24795. /* 183 */,
  24796. /* 184 */,
  24797. /* 185 */,
  24798. /* 186 */,
  24799. /* 187 */,
  24800. /* 188 */,
  24801. /* 189 */,
  24802. /* 190 */,
  24803. /* 191 */,
  24804. /* 192 */,
  24805. /* 193 */,
  24806. /* 194 */,
  24807. /* 195 */,
  24808. /* 196 */,
  24809. /* 197 */,
  24810. /* 198 */,
  24811. /* 199 */,
  24812. /* 200 */,
  24813. /* 201 */,
  24814. /* 202 */,
  24815. /* 203 */,
  24816. /* 204 */,
  24817. /* 205 */,
  24818. /* 206 */,
  24819. /* 207 */,
  24820. /* 208 */,
  24821. /* 209 */,
  24822. /* 210 */,
  24823. /* 211 */,
  24824. /* 212 */,
  24825. /* 213 */,
  24826. /* 214 */,
  24827. /* 215 */,
  24828. /* 216 */,
  24829. /* 217 */,
  24830. /* 218 */,
  24831. /* 219 */,
  24832. /* 220 */,
  24833. /* 221 */,
  24834. /* 222 */,
  24835. /* 223 */,
  24836. /* 224 */,
  24837. /* 225 */,
  24838. /* 226 */,
  24839. /* 227 */,
  24840. /* 228 */,
  24841. /* 229 */,
  24842. /* 230 */,
  24843. /* 231 */,
  24844. /* 232 */,
  24845. /* 233 */,
  24846. /* 234 */,
  24847. /* 235 */,
  24848. /* 236 */,
  24849. /* 237 */,
  24850. /* 238 */,
  24851. /* 239 */,
  24852. /* 240 */,
  24853. /* 241 */,
  24854. /* 242 */,
  24855. /* 243 */,
  24856. /* 244 */,
  24857. /* 245 */,
  24858. /* 246 */,
  24859. /* 247 */,
  24860. /* 248 */,
  24861. /* 249 */,
  24862. /* 250 */,
  24863. /* 251 */,
  24864. /* 252 */,
  24865. /* 253 */,
  24866. /* 254 */,
  24867. /* 255 */,
  24868. /* 256 */,
  24869. /* 257 */,
  24870. /* 258 */,
  24871. /* 259 */,
  24872. /* 260 */,
  24873. /* 261 */,
  24874. /* 262 */,
  24875. /* 263 */,
  24876. /* 264 */,
  24877. /* 265 */,
  24878. /* 266 */,
  24879. /* 267 */,
  24880. /* 268 */,
  24881. /* 269 */
  24882. /*!***********************************************************************************!*\
  24883. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/components/ay-qrcode/qrcode_wx.js ***!
  24884. \***********************************************************************************/
  24885. /*! no static exports found */
  24886. /***/ (function(module, exports, __webpack_require__) {
  24887. /* WEBPACK VAR INJECTION */(function(uni) {!function () {
  24888. // alignment pattern
  24889. var adelta = [0, 11, 15, 19, 23, 27, 31, 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24, 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28];
  24890. // version block
  24891. var vpat = [0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, 0x928, 0xb78, 0x45d, 0xa17, 0x532, 0x9a6, 0x683, 0x8c9, 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, 0x250, 0x9d5, 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, 0x541, 0xc69];
  24892. // final format bits with mask: level << 3 | mask
  24893. var fmtword = [0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976,
  24894. //L
  24895. 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0,
  24896. //M
  24897. 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed,
  24898. //Q
  24899. 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b //H
  24900. ];
  24901. // 4 per version: number of blocks 1,2; data width; ecc width
  24902. var eccblocks = [1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17, 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28, 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22, 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16, 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22, 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28, 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26, 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26, 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24, 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28, 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24, 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28, 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22, 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24, 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24, 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30, 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28, 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28, 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26, 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28, 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30, 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24, 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30, 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30, 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30, 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30, 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30, 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30, 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30, 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30, 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30, 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30, 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30, 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30, 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30, 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30, 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30, 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30, 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30, 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30];
  24903. // Galois field log table
  24904. var glog = [0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b, 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71, 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45, 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6, 0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88, 0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, 0xf1, 0xd2, 0x13, 0x5c, 0x83, 0x38, 0x46, 0x40, 0x1e, 0x42, 0xb6, 0xa3, 0xc3, 0x48, 0x7e, 0x6e, 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85, 0xba, 0x3d, 0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b, 0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57, 0x07, 0x70, 0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, 0x67, 0x4a, 0xde, 0xed, 0x31, 0xc5, 0xfe, 0x18, 0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8, 0xb4, 0x7c, 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e, 0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, 0x90, 0x87, 0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61, 0xf2, 0x56, 0xd3, 0xab, 0x14, 0x2a, 0x5d, 0x9e, 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d, 0x41, 0xa2, 0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76, 0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6, 0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a, 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7, 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf];
  24905. // Galios field exponent table
  24906. var gexp = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26, 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23, 0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1, 0x5f, 0xbe, 0x61, 0xc2, 0x99, 0x2f, 0x5e, 0xbc, 0x65, 0xca, 0x89, 0x0f, 0x1e, 0x3c, 0x78, 0xf0, 0xfd, 0xe7, 0xd3, 0xbb, 0x6b, 0xd6, 0xb1, 0x7f, 0xfe, 0xe1, 0xdf, 0xa3, 0x5b, 0xb6, 0x71, 0xe2, 0xd9, 0xaf, 0x43, 0x86, 0x11, 0x22, 0x44, 0x88, 0x0d, 0x1a, 0x34, 0x68, 0xd0, 0xbd, 0x67, 0xce, 0x81, 0x1f, 0x3e, 0x7c, 0xf8, 0xed, 0xc7, 0x93, 0x3b, 0x76, 0xec, 0xc5, 0x97, 0x33, 0x66, 0xcc, 0x85, 0x17, 0x2e, 0x5c, 0xb8, 0x6d, 0xda, 0xa9, 0x4f, 0x9e, 0x21, 0x42, 0x84, 0x15, 0x2a, 0x54, 0xa8, 0x4d, 0x9a, 0x29, 0x52, 0xa4, 0x55, 0xaa, 0x49, 0x92, 0x39, 0x72, 0xe4, 0xd5, 0xb7, 0x73, 0xe6, 0xd1, 0xbf, 0x63, 0xc6, 0x91, 0x3f, 0x7e, 0xfc, 0xe5, 0xd7, 0xb3, 0x7b, 0xf6, 0xf1, 0xff, 0xe3, 0xdb, 0xab, 0x4b, 0x96, 0x31, 0x62, 0xc4, 0x95, 0x37, 0x6e, 0xdc, 0xa5, 0x57, 0xae, 0x41, 0x82, 0x19, 0x32, 0x64, 0xc8, 0x8d, 0x07, 0x0e, 0x1c, 0x38, 0x70, 0xe0, 0xdd, 0xa7, 0x53, 0xa6, 0x51, 0xa2, 0x59, 0xb2, 0x79, 0xf2, 0xf9, 0xef, 0xc3, 0x9b, 0x2b, 0x56, 0xac, 0x45, 0x8a, 0x09, 0x12, 0x24, 0x48, 0x90, 0x3d, 0x7a, 0xf4, 0xf5, 0xf7, 0xf3, 0xfb, 0xeb, 0xcb, 0x8b, 0x0b, 0x16, 0x2c, 0x58, 0xb0, 0x7d, 0xfa, 0xe9, 0xcf, 0x83, 0x1b, 0x36, 0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00];
  24907. // Working buffers:
  24908. // data input and ecc append, image working buffer, fixed part of image, run lengths for badness
  24909. var strinbuf = [],
  24910. eccbuf = [],
  24911. qrframe = [],
  24912. framask = [],
  24913. rlens = [];
  24914. // Control values - width is based on version, last 4 are from table.
  24915. var version, width, neccblk1, neccblk2, datablkw, eccblkwid;
  24916. var ecclevel = 2;
  24917. // set bit to indicate cell in qrframe is immutable. symmetric around diagonal
  24918. function setmask(x, y) {
  24919. var bt;
  24920. if (x > y) {
  24921. bt = x;
  24922. x = y;
  24923. y = bt;
  24924. }
  24925. // y*y = 1+3+5...
  24926. bt = y;
  24927. bt *= y;
  24928. bt += y;
  24929. bt >>= 1;
  24930. bt += x;
  24931. framask[bt] = 1;
  24932. }
  24933. // enter alignment pattern - black to qrframe, white to mask (later black frame merged to mask)
  24934. function putalign(x, y) {
  24935. var j;
  24936. qrframe[x + width * y] = 1;
  24937. for (j = -2; j < 2; j++) {
  24938. qrframe[x + j + width * (y - 2)] = 1;
  24939. qrframe[x - 2 + width * (y + j + 1)] = 1;
  24940. qrframe[x + 2 + width * (y + j)] = 1;
  24941. qrframe[x + j + 1 + width * (y + 2)] = 1;
  24942. }
  24943. for (j = 0; j < 2; j++) {
  24944. setmask(x - 1, y + j);
  24945. setmask(x + 1, y - j);
  24946. setmask(x - j, y - 1);
  24947. setmask(x + j, y + 1);
  24948. }
  24949. }
  24950. //========================================================================
  24951. // Reed Solomon error correction
  24952. // exponentiation mod N
  24953. function modnn(x) {
  24954. while (x >= 255) {
  24955. x -= 255;
  24956. x = (x >> 8) + (x & 255);
  24957. }
  24958. return x;
  24959. }
  24960. var genpoly = [];
  24961. // Calculate and append ECC data to data block. Block is in strinbuf, indexes to buffers given.
  24962. function appendrs(data, dlen, ecbuf, eclen) {
  24963. var i, j, fb;
  24964. for (i = 0; i < eclen; i++) {
  24965. strinbuf[ecbuf + i] = 0;
  24966. }
  24967. for (i = 0; i < dlen; i++) {
  24968. fb = glog[strinbuf[data + i] ^ strinbuf[ecbuf]];
  24969. if (fb != 255) /* fb term is non-zero */
  24970. for (j = 1; j < eclen; j++) {
  24971. strinbuf[ecbuf + j - 1] = strinbuf[ecbuf + j] ^ gexp[modnn(fb + genpoly[eclen - j])];
  24972. } else for (j = ecbuf; j < ecbuf + eclen; j++) {
  24973. strinbuf[j] = strinbuf[j + 1];
  24974. }
  24975. strinbuf[ecbuf + eclen - 1] = fb == 255 ? 0 : gexp[modnn(fb + genpoly[0])];
  24976. }
  24977. }
  24978. //========================================================================
  24979. // Frame data insert following the path rules
  24980. // check mask - since symmetrical use half.
  24981. function ismasked(x, y) {
  24982. var bt;
  24983. if (x > y) {
  24984. bt = x;
  24985. x = y;
  24986. y = bt;
  24987. }
  24988. bt = y;
  24989. bt += y * y;
  24990. bt >>= 1;
  24991. bt += x;
  24992. return framask[bt];
  24993. }
  24994. //========================================================================
  24995. // Apply the selected mask out of the 8.
  24996. function applymask(m) {
  24997. var x, y, r3x, r3y;
  24998. switch (m) {
  24999. case 0:
  25000. for (y = 0; y < width; y++) {
  25001. for (x = 0; x < width; x++) {
  25002. if (!(x + y & 1) && !ismasked(x, y)) qrframe[x + y * width] ^= 1;
  25003. }
  25004. }
  25005. break;
  25006. case 1:
  25007. for (y = 0; y < width; y++) {
  25008. for (x = 0; x < width; x++) {
  25009. if (!(y & 1) && !ismasked(x, y)) qrframe[x + y * width] ^= 1;
  25010. }
  25011. }
  25012. break;
  25013. case 2:
  25014. for (y = 0; y < width; y++) {
  25015. for (r3x = 0, x = 0; x < width; x++, r3x++) {
  25016. if (r3x == 3) r3x = 0;
  25017. if (!r3x && !ismasked(x, y)) qrframe[x + y * width] ^= 1;
  25018. }
  25019. }
  25020. break;
  25021. case 3:
  25022. for (r3y = 0, y = 0; y < width; y++, r3y++) {
  25023. if (r3y == 3) r3y = 0;
  25024. for (r3x = r3y, x = 0; x < width; x++, r3x++) {
  25025. if (r3x == 3) r3x = 0;
  25026. if (!r3x && !ismasked(x, y)) qrframe[x + y * width] ^= 1;
  25027. }
  25028. }
  25029. break;
  25030. case 4:
  25031. for (y = 0; y < width; y++) {
  25032. for (r3x = 0, r3y = y >> 1 & 1, x = 0; x < width; x++, r3x++) {
  25033. if (r3x == 3) {
  25034. r3x = 0;
  25035. r3y = !r3y;
  25036. }
  25037. if (!r3y && !ismasked(x, y)) qrframe[x + y * width] ^= 1;
  25038. }
  25039. }
  25040. break;
  25041. case 5:
  25042. for (r3y = 0, y = 0; y < width; y++, r3y++) {
  25043. if (r3y == 3) r3y = 0;
  25044. for (r3x = 0, x = 0; x < width; x++, r3x++) {
  25045. if (r3x == 3) r3x = 0;
  25046. if (!((x & y & 1) + !(!r3x | !r3y)) && !ismasked(x, y)) qrframe[x + y * width] ^= 1;
  25047. }
  25048. }
  25049. break;
  25050. case 6:
  25051. for (r3y = 0, y = 0; y < width; y++, r3y++) {
  25052. if (r3y == 3) r3y = 0;
  25053. for (r3x = 0, x = 0; x < width; x++, r3x++) {
  25054. if (r3x == 3) r3x = 0;
  25055. if (!((x & y & 1) + (r3x && r3x == r3y) & 1) && !ismasked(x, y)) qrframe[x + y * width] ^= 1;
  25056. }
  25057. }
  25058. break;
  25059. case 7:
  25060. for (r3y = 0, y = 0; y < width; y++, r3y++) {
  25061. if (r3y == 3) r3y = 0;
  25062. for (r3x = 0, x = 0; x < width; x++, r3x++) {
  25063. if (r3x == 3) r3x = 0;
  25064. if (!((r3x && r3x == r3y) + (x + y & 1) & 1) && !ismasked(x, y)) qrframe[x + y * width] ^= 1;
  25065. }
  25066. }
  25067. break;
  25068. }
  25069. return;
  25070. }
  25071. // Badness coefficients.
  25072. var N1 = 3,
  25073. N2 = 3,
  25074. N3 = 40,
  25075. N4 = 10;
  25076. // Using the table of the length of each run, calculate the amount of bad image
  25077. // - long runs or those that look like finders; called twice, once each for X and Y
  25078. function badruns(length) {
  25079. var i;
  25080. var runsbad = 0;
  25081. for (i = 0; i <= length; i++) {
  25082. if (rlens[i] >= 5) runsbad += N1 + rlens[i] - 5;
  25083. }
  25084. // BwBBBwB as in finder
  25085. for (i = 3; i < length - 1; i += 2) {
  25086. if (rlens[i - 2] == rlens[i + 2] && rlens[i + 2] == rlens[i - 1] && rlens[i - 1] == rlens[i + 1] && rlens[i - 1] * 3 == rlens[i]
  25087. // white around the black pattern? Not part of spec
  25088. && (rlens[i - 3] == 0 // beginning
  25089. || i + 3 > length // end
  25090. || rlens[i - 3] * 3 >= rlens[i] * 4 || rlens[i + 3] * 3 >= rlens[i] * 4)) runsbad += N3;
  25091. }
  25092. return runsbad;
  25093. }
  25094. // Calculate how bad the masked image is - blocks, imbalance, runs, or finders.
  25095. function badcheck() {
  25096. var x, y, h, b, b1;
  25097. var thisbad = 0;
  25098. var bw = 0;
  25099. // blocks of same color.
  25100. for (y = 0; y < width - 1; y++) {
  25101. for (x = 0; x < width - 1; x++) {
  25102. if (qrframe[x + width * y] && qrframe[x + 1 + width * y] && qrframe[x + width * (y + 1)] && qrframe[x + 1 + width * (y + 1)] // all black
  25103. || !(qrframe[x + width * y] || qrframe[x + 1 + width * y] || qrframe[x + width * (y + 1)] || qrframe[x + 1 + width * (y + 1)]))
  25104. // all white
  25105. thisbad += N2;
  25106. }
  25107. }
  25108. // X runs
  25109. for (y = 0; y < width; y++) {
  25110. rlens[0] = 0;
  25111. for (h = b = x = 0; x < width; x++) {
  25112. if ((b1 = qrframe[x + width * y]) == b) rlens[h]++;else rlens[++h] = 1;
  25113. b = b1;
  25114. bw += b ? 1 : -1;
  25115. }
  25116. thisbad += badruns(h);
  25117. }
  25118. // black/white imbalance
  25119. if (bw < 0) bw = -bw;
  25120. var big = bw;
  25121. var count = 0;
  25122. big += big << 2;
  25123. big <<= 1;
  25124. while (big > width * width) {
  25125. big -= width * width, count++;
  25126. }
  25127. thisbad += count * N4;
  25128. // Y runs
  25129. for (x = 0; x < width; x++) {
  25130. rlens[0] = 0;
  25131. for (h = b = y = 0; y < width; y++) {
  25132. if ((b1 = qrframe[x + width * y]) == b) rlens[h]++;else rlens[++h] = 1;
  25133. b = b1;
  25134. }
  25135. thisbad += badruns(h);
  25136. }
  25137. return thisbad;
  25138. }
  25139. function genframe(instring) {
  25140. var x, y, k, t, v, i, j, m;
  25141. // find the smallest version that fits the string
  25142. t = instring.length;
  25143. version = 0;
  25144. do {
  25145. version++;
  25146. k = (ecclevel - 1) * 4 + (version - 1) * 16;
  25147. neccblk1 = eccblocks[k++];
  25148. neccblk2 = eccblocks[k++];
  25149. datablkw = eccblocks[k++];
  25150. eccblkwid = eccblocks[k];
  25151. k = datablkw * (neccblk1 + neccblk2) + neccblk2 - 3 + (version <= 9);
  25152. if (t <= k) break;
  25153. } while (version < 40);
  25154. // FIXME - insure that it fits insted of being truncated
  25155. width = 17 + 4 * version;
  25156. // allocate, clear and setup data structures
  25157. v = datablkw + (datablkw + eccblkwid) * (neccblk1 + neccblk2) + neccblk2;
  25158. for (t = 0; t < v; t++) {
  25159. eccbuf[t] = 0;
  25160. }
  25161. strinbuf = instring.slice(0);
  25162. for (t = 0; t < width * width; t++) {
  25163. qrframe[t] = 0;
  25164. }
  25165. for (t = 0; t < (width * (width + 1) + 1) / 2; t++) {
  25166. framask[t] = 0;
  25167. }
  25168. // insert finders - black to frame, white to mask
  25169. for (t = 0; t < 3; t++) {
  25170. k = 0;
  25171. y = 0;
  25172. if (t == 1) k = width - 7;
  25173. if (t == 2) y = width - 7;
  25174. qrframe[y + 3 + width * (k + 3)] = 1;
  25175. for (x = 0; x < 6; x++) {
  25176. qrframe[y + x + width * k] = 1;
  25177. qrframe[y + width * (k + x + 1)] = 1;
  25178. qrframe[y + 6 + width * (k + x)] = 1;
  25179. qrframe[y + x + 1 + width * (k + 6)] = 1;
  25180. }
  25181. for (x = 1; x < 5; x++) {
  25182. setmask(y + x, k + 1);
  25183. setmask(y + 1, k + x + 1);
  25184. setmask(y + 5, k + x);
  25185. setmask(y + x + 1, k + 5);
  25186. }
  25187. for (x = 2; x < 4; x++) {
  25188. qrframe[y + x + width * (k + 2)] = 1;
  25189. qrframe[y + 2 + width * (k + x + 1)] = 1;
  25190. qrframe[y + 4 + width * (k + x)] = 1;
  25191. qrframe[y + x + 1 + width * (k + 4)] = 1;
  25192. }
  25193. }
  25194. // alignment blocks
  25195. if (version > 1) {
  25196. t = adelta[version];
  25197. y = width - 7;
  25198. for (;;) {
  25199. x = width - 7;
  25200. while (x > t - 3) {
  25201. putalign(x, y);
  25202. if (x < t) break;
  25203. x -= t;
  25204. }
  25205. if (y <= t + 9) break;
  25206. y -= t;
  25207. putalign(6, y);
  25208. putalign(y, 6);
  25209. }
  25210. }
  25211. // single black
  25212. qrframe[8 + width * (width - 8)] = 1;
  25213. // timing gap - mask only
  25214. for (y = 0; y < 7; y++) {
  25215. setmask(7, y);
  25216. setmask(width - 8, y);
  25217. setmask(7, y + width - 7);
  25218. }
  25219. for (x = 0; x < 8; x++) {
  25220. setmask(x, 7);
  25221. setmask(x + width - 8, 7);
  25222. setmask(x, width - 8);
  25223. }
  25224. // reserve mask-format area
  25225. for (x = 0; x < 9; x++) {
  25226. setmask(x, 8);
  25227. }
  25228. for (x = 0; x < 8; x++) {
  25229. setmask(x + width - 8, 8);
  25230. setmask(8, x);
  25231. }
  25232. for (y = 0; y < 7; y++) {
  25233. setmask(8, y + width - 7);
  25234. }
  25235. // timing row/col
  25236. for (x = 0; x < width - 14; x++) {
  25237. if (x & 1) {
  25238. setmask(8 + x, 6);
  25239. setmask(6, 8 + x);
  25240. } else {
  25241. qrframe[8 + x + width * 6] = 1;
  25242. qrframe[6 + width * (8 + x)] = 1;
  25243. }
  25244. }
  25245. // version block
  25246. if (version > 6) {
  25247. t = vpat[version - 7];
  25248. k = 17;
  25249. for (x = 0; x < 6; x++) {
  25250. for (y = 0; y < 3; y++, k--) {
  25251. if (1 & (k > 11 ? version >> k - 12 : t >> k)) {
  25252. qrframe[5 - x + width * (2 - y + width - 11)] = 1;
  25253. qrframe[2 - y + width - 11 + width * (5 - x)] = 1;
  25254. } else {
  25255. setmask(5 - x, 2 - y + width - 11);
  25256. setmask(2 - y + width - 11, 5 - x);
  25257. }
  25258. }
  25259. }
  25260. }
  25261. // sync mask bits - only set above for white spaces, so add in black bits
  25262. for (y = 0; y < width; y++) {
  25263. for (x = 0; x <= y; x++) {
  25264. if (qrframe[x + width * y]) setmask(x, y);
  25265. }
  25266. }
  25267. // convert string to bitstream
  25268. // 8 bit data to QR-coded 8 bit data (numeric or alphanum, or kanji not supported)
  25269. v = strinbuf.length;
  25270. // string to array
  25271. for (i = 0; i < v; i++) {
  25272. eccbuf[i] = strinbuf.charCodeAt(i);
  25273. }
  25274. strinbuf = eccbuf.slice(0);
  25275. // calculate max string length
  25276. x = datablkw * (neccblk1 + neccblk2) + neccblk2;
  25277. if (v >= x - 2) {
  25278. v = x - 2;
  25279. if (version > 9) v--;
  25280. }
  25281. // shift and repack to insert length prefix
  25282. i = v;
  25283. if (version > 9) {
  25284. strinbuf[i + 2] = 0;
  25285. strinbuf[i + 3] = 0;
  25286. while (i--) {
  25287. t = strinbuf[i];
  25288. strinbuf[i + 3] |= 255 & t << 4;
  25289. strinbuf[i + 2] = t >> 4;
  25290. }
  25291. strinbuf[2] |= 255 & v << 4;
  25292. strinbuf[1] = v >> 4;
  25293. strinbuf[0] = 0x40 | v >> 12;
  25294. } else {
  25295. strinbuf[i + 1] = 0;
  25296. strinbuf[i + 2] = 0;
  25297. while (i--) {
  25298. t = strinbuf[i];
  25299. strinbuf[i + 2] |= 255 & t << 4;
  25300. strinbuf[i + 1] = t >> 4;
  25301. }
  25302. strinbuf[1] |= 255 & v << 4;
  25303. strinbuf[0] = 0x40 | v >> 4;
  25304. }
  25305. // fill to end with pad pattern
  25306. i = v + 3 - (version < 10);
  25307. while (i < x) {
  25308. strinbuf[i++] = 0xec;
  25309. // buffer has room if (i == x) break;
  25310. strinbuf[i++] = 0x11;
  25311. }
  25312. // calculate and append ECC
  25313. // calculate generator polynomial
  25314. genpoly[0] = 1;
  25315. for (i = 0; i < eccblkwid; i++) {
  25316. genpoly[i + 1] = 1;
  25317. for (j = i; j > 0; j--) {
  25318. genpoly[j] = genpoly[j] ? genpoly[j - 1] ^ gexp[modnn(glog[genpoly[j]] + i)] : genpoly[j - 1];
  25319. }
  25320. genpoly[0] = gexp[modnn(glog[genpoly[0]] + i)];
  25321. }
  25322. for (i = 0; i <= eccblkwid; i++) {
  25323. genpoly[i] = glog[genpoly[i]];
  25324. } // use logs for genpoly[] to save calc step
  25325. // append ecc to data buffer
  25326. k = x;
  25327. y = 0;
  25328. for (i = 0; i < neccblk1; i++) {
  25329. appendrs(y, datablkw, k, eccblkwid);
  25330. y += datablkw;
  25331. k += eccblkwid;
  25332. }
  25333. for (i = 0; i < neccblk2; i++) {
  25334. appendrs(y, datablkw + 1, k, eccblkwid);
  25335. y += datablkw + 1;
  25336. k += eccblkwid;
  25337. }
  25338. // interleave blocks
  25339. y = 0;
  25340. for (i = 0; i < datablkw; i++) {
  25341. for (j = 0; j < neccblk1; j++) {
  25342. eccbuf[y++] = strinbuf[i + j * datablkw];
  25343. }
  25344. for (j = 0; j < neccblk2; j++) {
  25345. eccbuf[y++] = strinbuf[neccblk1 * datablkw + i + j * (datablkw + 1)];
  25346. }
  25347. }
  25348. for (j = 0; j < neccblk2; j++) {
  25349. eccbuf[y++] = strinbuf[neccblk1 * datablkw + i + j * (datablkw + 1)];
  25350. }
  25351. for (i = 0; i < eccblkwid; i++) {
  25352. for (j = 0; j < neccblk1 + neccblk2; j++) {
  25353. eccbuf[y++] = strinbuf[x + i + j * eccblkwid];
  25354. }
  25355. }
  25356. strinbuf = eccbuf;
  25357. // pack bits into frame avoiding masked area.
  25358. x = y = width - 1;
  25359. k = v = 1; // up, minus
  25360. /* inteleaved data and ecc codes */
  25361. m = (datablkw + eccblkwid) * (neccblk1 + neccblk2) + neccblk2;
  25362. for (i = 0; i < m; i++) {
  25363. t = strinbuf[i];
  25364. for (j = 0; j < 8; j++, t <<= 1) {
  25365. if (0x80 & t) qrframe[x + width * y] = 1;
  25366. do {
  25367. // find next fill position
  25368. if (v) x--;else {
  25369. x++;
  25370. if (k) {
  25371. if (y != 0) y--;else {
  25372. x -= 2;
  25373. k = !k;
  25374. if (x == 6) {
  25375. x--;
  25376. y = 9;
  25377. }
  25378. }
  25379. } else {
  25380. if (y != width - 1) y++;else {
  25381. x -= 2;
  25382. k = !k;
  25383. if (x == 6) {
  25384. x--;
  25385. y -= 8;
  25386. }
  25387. }
  25388. }
  25389. }
  25390. v = !v;
  25391. } while (ismasked(x, y));
  25392. }
  25393. }
  25394. // save pre-mask copy of frame
  25395. strinbuf = qrframe.slice(0);
  25396. t = 0; // best
  25397. y = 30000; // demerit
  25398. // for instead of while since in original arduino code
  25399. // if an early mask was "good enough" it wouldn't try for a better one
  25400. // since they get more complex and take longer.
  25401. for (k = 0; k < 8; k++) {
  25402. applymask(k); // returns black-white imbalance
  25403. x = badcheck();
  25404. if (x < y) {
  25405. // current mask better than previous best?
  25406. y = x;
  25407. t = k;
  25408. }
  25409. if (t == 7) break; // don't increment i to a void redoing mask
  25410. qrframe = strinbuf.slice(0); // reset for next pass
  25411. }
  25412. if (t != k)
  25413. // redo best mask - none good enough, last wasn't t
  25414. applymask(t);
  25415. // add in final mask/ecclevel bytes
  25416. y = fmtword[t + (ecclevel - 1 << 3)];
  25417. // low byte
  25418. for (k = 0; k < 8; k++, y >>= 1) {
  25419. if (y & 1) {
  25420. qrframe[width - 1 - k + width * 8] = 1;
  25421. if (k < 6) qrframe[8 + width * k] = 1;else qrframe[8 + width * (k + 1)] = 1;
  25422. }
  25423. }
  25424. // high byte
  25425. for (k = 0; k < 7; k++, y >>= 1) {
  25426. if (y & 1) {
  25427. qrframe[8 + width * (width - 7 + k)] = 1;
  25428. if (k) qrframe[6 - k + width * 8] = 1;else qrframe[7 + width * 8] = 1;
  25429. }
  25430. }
  25431. return qrframe;
  25432. }
  25433. var _canvas = null;
  25434. var api = {
  25435. get ecclevel() {
  25436. return ecclevel;
  25437. },
  25438. set ecclevel(val) {
  25439. ecclevel = val;
  25440. },
  25441. get size() {
  25442. return _size;
  25443. },
  25444. set size(val) {
  25445. _size = val;
  25446. },
  25447. get canvas() {
  25448. return _canvas;
  25449. },
  25450. set canvas(el) {
  25451. _canvas = el;
  25452. },
  25453. getFrame: function getFrame(string) {
  25454. return genframe(string);
  25455. },
  25456. //这里的utf16to8(str)是对Text中的字符串进行转码,让其支持中文
  25457. utf16to8: function utf16to8(str) {
  25458. var out, i, len, c;
  25459. out = "";
  25460. len = str.length;
  25461. for (i = 0; i < len; i++) {
  25462. c = str.charCodeAt(i);
  25463. if (c >= 0x0001 && c <= 0x007F) {
  25464. out += str.charAt(i);
  25465. } else if (c > 0x07FF) {
  25466. out += String.fromCharCode(0xE0 | c >> 12 & 0x0F);
  25467. out += String.fromCharCode(0x80 | c >> 6 & 0x3F);
  25468. out += String.fromCharCode(0x80 | c >> 0 & 0x3F);
  25469. } else {
  25470. out += String.fromCharCode(0xC0 | c >> 6 & 0x1F);
  25471. out += String.fromCharCode(0x80 | c >> 0 & 0x3F);
  25472. }
  25473. }
  25474. return out;
  25475. },
  25476. /**
  25477. * 新增$this参数,传入组件的this,兼容在组件中生成
  25478. */
  25479. draw: function draw(str, canvas, cavW, cavH, cavColor, haveImg, imageUrl, imageSize, $this) {
  25480. var cb = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : function () {};
  25481. var ecc = arguments.length > 10 ? arguments[10] : undefined;
  25482. var that = this;
  25483. ecclevel = ecc || ecclevel;
  25484. canvas = canvas || _canvas;
  25485. if (!canvas) {
  25486. console.warn('No canvas provided to draw QR code in!');
  25487. return;
  25488. }
  25489. var pre_background = "#ffffff";
  25490. var size = Math.min(cavW, cavH);
  25491. str = that.utf16to8(str); //增加中文显示
  25492. var frame = that.getFrame(str);
  25493. // 组件中生成qrcode需要绑定this
  25494. var ctx = uni.createCanvasContext(canvas, $this);
  25495. var px = Math.round(size / width);
  25496. var roundedSize = px * width;
  25497. // var px = 1 ;
  25498. // var roundedSize = px * (width + 8) ;
  25499. //var roundedSize = 0 ;
  25500. //var offset = Math.floor((size - roundedSize) / 2);
  25501. var offset = 0;
  25502. size = roundedSize;
  25503. //ctx.clearRect(0, 0, cavW, cavW);
  25504. ctx.setFillStyle(pre_background);
  25505. ctx.fillRect(-10, -10, cavW, cavW);
  25506. ctx.setFillStyle(cavColor);
  25507. for (var i = 0; i < width; i++) {
  25508. for (var j = 0; j < width; j++) {
  25509. if (frame[j * width + i]) {
  25510. ctx.fillRect(px * i + offset, px * j + offset, px, px);
  25511. }
  25512. }
  25513. }
  25514. //画图片
  25515. if (haveImg) {
  25516. try {
  25517. // 画圆角矩形
  25518. var drawRoundedRect = function drawRoundedRect(ctxi, x, y, width, height, r, lineWidth, fill, stroke) {
  25519. ctxi.setLineWidth(lineWidth);
  25520. ctxi.setFillStyle(pre_background);
  25521. ctxi.setStrokeStyle(pre_background);
  25522. ctxi.beginPath(); // draw top and top right corner
  25523. ctxi.moveTo(x + r, y);
  25524. ctxi.arcTo(x + width, y, x + width, y + r, r); // draw right side and bottom right corner
  25525. ctxi.arcTo(x + width, y + height, x + width - r, y + height, r); // draw bottom and bottom left corner
  25526. ctxi.arcTo(x, y + height, x, y + height - r, r); // draw left and top left corner
  25527. ctxi.arcTo(x, y, x + r, y, r);
  25528. ctxi.closePath();
  25529. if (fill) {
  25530. ctxi.fill();
  25531. }
  25532. if (stroke) {
  25533. ctxi.stroke();
  25534. }
  25535. };
  25536. var x = Number(((cavW - imageSize - 14) / 2).toFixed(2));
  25537. var y = Number(((cavH - imageSize - 14) / 2).toFixed(2));
  25538. drawRoundedRect(ctx, x, y, imageSize, imageSize, imageSize / 2, 6, true, true);
  25539. var isNetImg = false;
  25540. isNetImg = imageUrl.substr(0, 4) == 'http' ? true : false;
  25541. if (isNetImg) {
  25542. //网络图片下载到本地
  25543. uni.getImageInfo({
  25544. src: imageUrl,
  25545. success: function success(res) {
  25546. ctx.drawImage(res.path, x, y, imageSize, imageSize);
  25547. //--增加绘制完成回调
  25548. ctx.draw(false, function () {
  25549. cb();
  25550. });
  25551. }
  25552. });
  25553. } else {
  25554. ctx.drawImage(imageUrl, x, y, imageSize, imageSize);
  25555. //--增加绘制完成回调
  25556. ctx.draw(false, function () {
  25557. cb();
  25558. });
  25559. }
  25560. } catch (e) {
  25561. //TODO handle the exception
  25562. }
  25563. } else {
  25564. //--增加绘制完成回调
  25565. ctx.draw(false, function () {
  25566. cb();
  25567. });
  25568. }
  25569. }
  25570. };
  25571. module.exports = {
  25572. api: api
  25573. };
  25574. }();
  25575. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
  25576. /***/ }),
  25577. /* 270 */
  25578. /*!**************************************************************************************!*\
  25579. !*** /Users/chenpengming/代码/AstraZeneca_uniapp/components/ay-qrcode/weapp-qrcode.js ***!
  25580. \**************************************************************************************/
  25581. /*! no static exports found */
  25582. /***/ (function(module, exports, __webpack_require__) {
  25583. /* WEBPACK VAR INJECTION */(function(wx) {//Core code comes from https://github.com/davidshimjs/qrcodejs
  25584. var QRCode;
  25585. (function () {
  25586. /**
  25587. * Get the type by string length
  25588. *
  25589. * @private
  25590. * @param {String} sText
  25591. * @param {Number} nCorrectLevel
  25592. * @return {Number} type
  25593. */
  25594. function _getTypeNumber(sText, nCorrectLevel) {
  25595. var nType = 1;
  25596. var length = _getUTF8Length(sText);
  25597. for (var i = 0, len = QRCodeLimitLength.length; i <= len; i++) {
  25598. var nLimit = 0;
  25599. switch (nCorrectLevel) {
  25600. case QRErrorCorrectLevel.L:
  25601. nLimit = QRCodeLimitLength[i][0];
  25602. break;
  25603. case QRErrorCorrectLevel.M:
  25604. nLimit = QRCodeLimitLength[i][1];
  25605. break;
  25606. case QRErrorCorrectLevel.Q:
  25607. nLimit = QRCodeLimitLength[i][2];
  25608. break;
  25609. case QRErrorCorrectLevel.H:
  25610. nLimit = QRCodeLimitLength[i][3];
  25611. break;
  25612. }
  25613. if (length <= nLimit) {
  25614. break;
  25615. } else {
  25616. nType++;
  25617. }
  25618. }
  25619. if (nType > QRCodeLimitLength.length) {
  25620. throw new Error("Too long data");
  25621. }
  25622. return nType;
  25623. }
  25624. function _getUTF8Length(sText) {
  25625. var replacedText = encodeURI(sText).toString().replace(/\%[0-9a-fA-F]{2}/g, 'a');
  25626. return replacedText.length + (replacedText.length != sText ? 3 : 0);
  25627. }
  25628. function QR8bitByte(data) {
  25629. this.mode = QRMode.MODE_8BIT_BYTE;
  25630. this.data = data;
  25631. this.parsedData = [];
  25632. // Added to support UTF-8 Characters
  25633. for (var i = 0, l = this.data.length; i < l; i++) {
  25634. var byteArray = [];
  25635. var code = this.data.charCodeAt(i);
  25636. if (code > 0x10000) {
  25637. byteArray[0] = 0xF0 | (code & 0x1C0000) >>> 18;
  25638. byteArray[1] = 0x80 | (code & 0x3F000) >>> 12;
  25639. byteArray[2] = 0x80 | (code & 0xFC0) >>> 6;
  25640. byteArray[3] = 0x80 | code & 0x3F;
  25641. } else if (code > 0x800) {
  25642. byteArray[0] = 0xE0 | (code & 0xF000) >>> 12;
  25643. byteArray[1] = 0x80 | (code & 0xFC0) >>> 6;
  25644. byteArray[2] = 0x80 | code & 0x3F;
  25645. } else if (code > 0x80) {
  25646. byteArray[0] = 0xC0 | (code & 0x7C0) >>> 6;
  25647. byteArray[1] = 0x80 | code & 0x3F;
  25648. } else {
  25649. byteArray[0] = code;
  25650. }
  25651. this.parsedData.push(byteArray);
  25652. }
  25653. this.parsedData = Array.prototype.concat.apply([], this.parsedData);
  25654. if (this.parsedData.length != this.data.length) {
  25655. this.parsedData.unshift(191);
  25656. this.parsedData.unshift(187);
  25657. this.parsedData.unshift(239);
  25658. }
  25659. }
  25660. QR8bitByte.prototype = {
  25661. getLength: function getLength(buffer) {
  25662. return this.parsedData.length;
  25663. },
  25664. write: function write(buffer) {
  25665. for (var i = 0, l = this.parsedData.length; i < l; i++) {
  25666. buffer.put(this.parsedData[i], 8);
  25667. }
  25668. }
  25669. };
  25670. // QRCodeModel
  25671. function QRCodeModel(typeNumber, errorCorrectLevel) {
  25672. this.typeNumber = typeNumber;
  25673. this.errorCorrectLevel = errorCorrectLevel;
  25674. this.modules = null;
  25675. this.moduleCount = 0;
  25676. this.dataCache = null;
  25677. this.dataList = [];
  25678. }
  25679. QRCodeModel.prototype = {
  25680. addData: function addData(data) {
  25681. var newData = new QR8bitByte(data);
  25682. this.dataList.push(newData);
  25683. this.dataCache = null;
  25684. },
  25685. isDark: function isDark(row, col) {
  25686. if (row < 0 || this.moduleCount <= row || col < 0 || this.moduleCount <= col) {
  25687. throw new Error(row + "," + col);
  25688. }
  25689. return this.modules[row][col];
  25690. },
  25691. getModuleCount: function getModuleCount() {
  25692. return this.moduleCount;
  25693. },
  25694. make: function make() {
  25695. this.makeImpl(false, this.getBestMaskPattern());
  25696. },
  25697. makeImpl: function makeImpl(test, maskPattern) {
  25698. this.moduleCount = this.typeNumber * 4 + 17;
  25699. this.modules = new Array(this.moduleCount);
  25700. for (var row = 0; row < this.moduleCount; row++) {
  25701. this.modules[row] = new Array(this.moduleCount);
  25702. for (var col = 0; col < this.moduleCount; col++) {
  25703. this.modules[row][col] = null;
  25704. }
  25705. }
  25706. this.setupPositionProbePattern(0, 0);
  25707. this.setupPositionProbePattern(this.moduleCount - 7, 0);
  25708. this.setupPositionProbePattern(0, this.moduleCount - 7);
  25709. this.setupPositionAdjustPattern();
  25710. this.setupTimingPattern();
  25711. this.setupTypeInfo(test, maskPattern);
  25712. if (this.typeNumber >= 7) {
  25713. this.setupTypeNumber(test);
  25714. }
  25715. if (this.dataCache == null) {
  25716. this.dataCache = QRCodeModel.createData(this.typeNumber, this.errorCorrectLevel, this.dataList);
  25717. }
  25718. this.mapData(this.dataCache, maskPattern);
  25719. },
  25720. setupPositionProbePattern: function setupPositionProbePattern(row, col) {
  25721. for (var r = -1; r <= 7; r++) {
  25722. if (row + r <= -1 || this.moduleCount <= row + r) continue;
  25723. for (var c = -1; c <= 7; c++) {
  25724. if (col + c <= -1 || this.moduleCount <= col + c) continue;
  25725. if (0 <= r && r <= 6 && (c == 0 || c == 6) || 0 <= c && c <= 6 && (r == 0 || r == 6) || 2 <= r && r <= 4 && 2 <= c && c <= 4) {
  25726. this.modules[row + r][col + c] = true;
  25727. } else {
  25728. this.modules[row + r][col + c] = false;
  25729. }
  25730. }
  25731. }
  25732. },
  25733. getBestMaskPattern: function getBestMaskPattern() {
  25734. var minLostPoint = 0;
  25735. var pattern = 0;
  25736. for (var i = 0; i < 8; i++) {
  25737. this.makeImpl(true, i);
  25738. var lostPoint = QRUtil.getLostPoint(this);
  25739. if (i == 0 || minLostPoint > lostPoint) {
  25740. minLostPoint = lostPoint;
  25741. pattern = i;
  25742. }
  25743. }
  25744. return pattern;
  25745. },
  25746. createMovieClip: function createMovieClip(target_mc, instance_name, depth) {
  25747. var qr_mc = target_mc.createEmptyMovieClip(instance_name, depth);
  25748. var cs = 1;
  25749. this.make();
  25750. for (var row = 0; row < this.modules.length; row++) {
  25751. var y = row * cs;
  25752. for (var col = 0; col < this.modules[row].length; col++) {
  25753. var x = col * cs;
  25754. var dark = this.modules[row][col];
  25755. if (dark) {
  25756. qr_mc.beginFill(0, 100);
  25757. qr_mc.moveTo(x, y);
  25758. qr_mc.lineTo(x + cs, y);
  25759. qr_mc.lineTo(x + cs, y + cs);
  25760. qr_mc.lineTo(x, y + cs);
  25761. qr_mc.endFill();
  25762. }
  25763. }
  25764. }
  25765. return qr_mc;
  25766. },
  25767. setupTimingPattern: function setupTimingPattern() {
  25768. for (var r = 8; r < this.moduleCount - 8; r++) {
  25769. if (this.modules[r][6] != null) {
  25770. continue;
  25771. }
  25772. this.modules[r][6] = r % 2 == 0;
  25773. }
  25774. for (var c = 8; c < this.moduleCount - 8; c++) {
  25775. if (this.modules[6][c] != null) {
  25776. continue;
  25777. }
  25778. this.modules[6][c] = c % 2 == 0;
  25779. }
  25780. },
  25781. setupPositionAdjustPattern: function setupPositionAdjustPattern() {
  25782. var pos = QRUtil.getPatternPosition(this.typeNumber);
  25783. for (var i = 0; i < pos.length; i++) {
  25784. for (var j = 0; j < pos.length; j++) {
  25785. var row = pos[i];
  25786. var col = pos[j];
  25787. if (this.modules[row][col] != null) {
  25788. continue;
  25789. }
  25790. for (var r = -2; r <= 2; r++) {
  25791. for (var c = -2; c <= 2; c++) {
  25792. if (r == -2 || r == 2 || c == -2 || c == 2 || r == 0 && c == 0) {
  25793. this.modules[row + r][col + c] = true;
  25794. } else {
  25795. this.modules[row + r][col + c] = false;
  25796. }
  25797. }
  25798. }
  25799. }
  25800. }
  25801. },
  25802. setupTypeNumber: function setupTypeNumber(test) {
  25803. var bits = QRUtil.getBCHTypeNumber(this.typeNumber);
  25804. for (var i = 0; i < 18; i++) {
  25805. var mod = !test && (bits >> i & 1) == 1;
  25806. this.modules[Math.floor(i / 3)][i % 3 + this.moduleCount - 8 - 3] = mod;
  25807. }
  25808. for (var i = 0; i < 18; i++) {
  25809. var mod = !test && (bits >> i & 1) == 1;
  25810. this.modules[i % 3 + this.moduleCount - 8 - 3][Math.floor(i / 3)] = mod;
  25811. }
  25812. },
  25813. setupTypeInfo: function setupTypeInfo(test, maskPattern) {
  25814. var data = this.errorCorrectLevel << 3 | maskPattern;
  25815. var bits = QRUtil.getBCHTypeInfo(data);
  25816. for (var i = 0; i < 15; i++) {
  25817. var mod = !test && (bits >> i & 1) == 1;
  25818. if (i < 6) {
  25819. this.modules[i][8] = mod;
  25820. } else if (i < 8) {
  25821. this.modules[i + 1][8] = mod;
  25822. } else {
  25823. this.modules[this.moduleCount - 15 + i][8] = mod;
  25824. }
  25825. }
  25826. for (var i = 0; i < 15; i++) {
  25827. var mod = !test && (bits >> i & 1) == 1;
  25828. if (i < 8) {
  25829. this.modules[8][this.moduleCount - i - 1] = mod;
  25830. } else if (i < 9) {
  25831. this.modules[8][15 - i - 1 + 1] = mod;
  25832. } else {
  25833. this.modules[8][15 - i - 1] = mod;
  25834. }
  25835. }
  25836. this.modules[this.moduleCount - 8][8] = !test;
  25837. },
  25838. mapData: function mapData(data, maskPattern) {
  25839. var inc = -1;
  25840. var row = this.moduleCount - 1;
  25841. var bitIndex = 7;
  25842. var byteIndex = 0;
  25843. for (var col = this.moduleCount - 1; col > 0; col -= 2) {
  25844. if (col == 6) col--;
  25845. while (true) {
  25846. for (var c = 0; c < 2; c++) {
  25847. if (this.modules[row][col - c] == null) {
  25848. var dark = false;
  25849. if (byteIndex < data.length) {
  25850. dark = (data[byteIndex] >>> bitIndex & 1) == 1;
  25851. }
  25852. var mask = QRUtil.getMask(maskPattern, row, col - c);
  25853. if (mask) {
  25854. dark = !dark;
  25855. }
  25856. this.modules[row][col - c] = dark;
  25857. bitIndex--;
  25858. if (bitIndex == -1) {
  25859. byteIndex++;
  25860. bitIndex = 7;
  25861. }
  25862. }
  25863. }
  25864. row += inc;
  25865. if (row < 0 || this.moduleCount <= row) {
  25866. row -= inc;
  25867. inc = -inc;
  25868. break;
  25869. }
  25870. }
  25871. }
  25872. }
  25873. };
  25874. QRCodeModel.PAD0 = 0xEC;
  25875. QRCodeModel.PAD1 = 0x11;
  25876. QRCodeModel.createData = function (typeNumber, errorCorrectLevel, dataList) {
  25877. var rsBlocks = QRRSBlock.getRSBlocks(typeNumber, errorCorrectLevel);
  25878. var buffer = new QRBitBuffer();
  25879. for (var i = 0; i < dataList.length; i++) {
  25880. var data = dataList[i];
  25881. buffer.put(data.mode, 4);
  25882. buffer.put(data.getLength(), QRUtil.getLengthInBits(data.mode, typeNumber));
  25883. data.write(buffer);
  25884. }
  25885. var totalDataCount = 0;
  25886. for (var i = 0; i < rsBlocks.length; i++) {
  25887. totalDataCount += rsBlocks[i].dataCount;
  25888. }
  25889. if (buffer.getLengthInBits() > totalDataCount * 8) {
  25890. throw new Error("code length overflow. (" + buffer.getLengthInBits() + ">" + totalDataCount * 8 + ")");
  25891. }
  25892. if (buffer.getLengthInBits() + 4 <= totalDataCount * 8) {
  25893. buffer.put(0, 4);
  25894. }
  25895. while (buffer.getLengthInBits() % 8 != 0) {
  25896. buffer.putBit(false);
  25897. }
  25898. while (true) {
  25899. if (buffer.getLengthInBits() >= totalDataCount * 8) {
  25900. break;
  25901. }
  25902. buffer.put(QRCodeModel.PAD0, 8);
  25903. if (buffer.getLengthInBits() >= totalDataCount * 8) {
  25904. break;
  25905. }
  25906. buffer.put(QRCodeModel.PAD1, 8);
  25907. }
  25908. return QRCodeModel.createBytes(buffer, rsBlocks);
  25909. };
  25910. QRCodeModel.createBytes = function (buffer, rsBlocks) {
  25911. var offset = 0;
  25912. var maxDcCount = 0;
  25913. var maxEcCount = 0;
  25914. var dcdata = new Array(rsBlocks.length);
  25915. var ecdata = new Array(rsBlocks.length);
  25916. for (var r = 0; r < rsBlocks.length; r++) {
  25917. var dcCount = rsBlocks[r].dataCount;
  25918. var ecCount = rsBlocks[r].totalCount - dcCount;
  25919. maxDcCount = Math.max(maxDcCount, dcCount);
  25920. maxEcCount = Math.max(maxEcCount, ecCount);
  25921. dcdata[r] = new Array(dcCount);
  25922. for (var i = 0; i < dcdata[r].length; i++) {
  25923. dcdata[r][i] = 0xff & buffer.buffer[i + offset];
  25924. }
  25925. offset += dcCount;
  25926. var rsPoly = QRUtil.getErrorCorrectPolynomial(ecCount);
  25927. var rawPoly = new QRPolynomial(dcdata[r], rsPoly.getLength() - 1);
  25928. var modPoly = rawPoly.mod(rsPoly);
  25929. ecdata[r] = new Array(rsPoly.getLength() - 1);
  25930. for (var i = 0; i < ecdata[r].length; i++) {
  25931. var modIndex = i + modPoly.getLength() - ecdata[r].length;
  25932. ecdata[r][i] = modIndex >= 0 ? modPoly.get(modIndex) : 0;
  25933. }
  25934. }
  25935. var totalCodeCount = 0;
  25936. for (var i = 0; i < rsBlocks.length; i++) {
  25937. totalCodeCount += rsBlocks[i].totalCount;
  25938. }
  25939. var data = new Array(totalCodeCount);
  25940. var index = 0;
  25941. for (var i = 0; i < maxDcCount; i++) {
  25942. for (var r = 0; r < rsBlocks.length; r++) {
  25943. if (i < dcdata[r].length) {
  25944. data[index++] = dcdata[r][i];
  25945. }
  25946. }
  25947. }
  25948. for (var i = 0; i < maxEcCount; i++) {
  25949. for (var r = 0; r < rsBlocks.length; r++) {
  25950. if (i < ecdata[r].length) {
  25951. data[index++] = ecdata[r][i];
  25952. }
  25953. }
  25954. }
  25955. return data;
  25956. };
  25957. var QRMode = {
  25958. MODE_NUMBER: 1 << 0,
  25959. MODE_ALPHA_NUM: 1 << 1,
  25960. MODE_8BIT_BYTE: 1 << 2,
  25961. MODE_KANJI: 1 << 3
  25962. };
  25963. var QRErrorCorrectLevel = {
  25964. L: 1,
  25965. M: 0,
  25966. Q: 3,
  25967. H: 2
  25968. };
  25969. var QRMaskPattern = {
  25970. PATTERN000: 0,
  25971. PATTERN001: 1,
  25972. PATTERN010: 2,
  25973. PATTERN011: 3,
  25974. PATTERN100: 4,
  25975. PATTERN101: 5,
  25976. PATTERN110: 6,
  25977. PATTERN111: 7
  25978. };
  25979. var QRUtil = {
  25980. PATTERN_POSITION_TABLE: [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34], [6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26, 46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6, 34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80, 106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98, 122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34, 60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102, 126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84, 110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]],
  25981. G15: 1 << 10 | 1 << 8 | 1 << 5 | 1 << 4 | 1 << 2 | 1 << 1 | 1 << 0,
  25982. G18: 1 << 12 | 1 << 11 | 1 << 10 | 1 << 9 | 1 << 8 | 1 << 5 | 1 << 2 | 1 << 0,
  25983. G15_MASK: 1 << 14 | 1 << 12 | 1 << 10 | 1 << 4 | 1 << 1,
  25984. getBCHTypeInfo: function getBCHTypeInfo(data) {
  25985. var d = data << 10;
  25986. while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15) >= 0) {
  25987. d ^= QRUtil.G15 << QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G15);
  25988. }
  25989. return (data << 10 | d) ^ QRUtil.G15_MASK;
  25990. },
  25991. getBCHTypeNumber: function getBCHTypeNumber(data) {
  25992. var d = data << 12;
  25993. while (QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18) >= 0) {
  25994. d ^= QRUtil.G18 << QRUtil.getBCHDigit(d) - QRUtil.getBCHDigit(QRUtil.G18);
  25995. }
  25996. return data << 12 | d;
  25997. },
  25998. getBCHDigit: function getBCHDigit(data) {
  25999. var digit = 0;
  26000. while (data != 0) {
  26001. digit++;
  26002. data >>>= 1;
  26003. }
  26004. return digit;
  26005. },
  26006. getPatternPosition: function getPatternPosition(typeNumber) {
  26007. return QRUtil.PATTERN_POSITION_TABLE[typeNumber - 1];
  26008. },
  26009. getMask: function getMask(maskPattern, i, j) {
  26010. switch (maskPattern) {
  26011. case QRMaskPattern.PATTERN000:
  26012. return (i + j) % 2 == 0;
  26013. case QRMaskPattern.PATTERN001:
  26014. return i % 2 == 0;
  26015. case QRMaskPattern.PATTERN010:
  26016. return j % 3 == 0;
  26017. case QRMaskPattern.PATTERN011:
  26018. return (i + j) % 3 == 0;
  26019. case QRMaskPattern.PATTERN100:
  26020. return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 == 0;
  26021. case QRMaskPattern.PATTERN101:
  26022. return i * j % 2 + i * j % 3 == 0;
  26023. case QRMaskPattern.PATTERN110:
  26024. return (i * j % 2 + i * j % 3) % 2 == 0;
  26025. case QRMaskPattern.PATTERN111:
  26026. return (i * j % 3 + (i + j) % 2) % 2 == 0;
  26027. default:
  26028. throw new Error("bad maskPattern:" + maskPattern);
  26029. }
  26030. },
  26031. getErrorCorrectPolynomial: function getErrorCorrectPolynomial(errorCorrectLength) {
  26032. var a = new QRPolynomial([1], 0);
  26033. for (var i = 0; i < errorCorrectLength; i++) {
  26034. a = a.multiply(new QRPolynomial([1, QRMath.gexp(i)], 0));
  26035. }
  26036. return a;
  26037. },
  26038. getLengthInBits: function getLengthInBits(mode, type) {
  26039. if (1 <= type && type < 10) {
  26040. switch (mode) {
  26041. case QRMode.MODE_NUMBER:
  26042. return 10;
  26043. case QRMode.MODE_ALPHA_NUM:
  26044. return 9;
  26045. case QRMode.MODE_8BIT_BYTE:
  26046. return 8;
  26047. case QRMode.MODE_KANJI:
  26048. return 8;
  26049. default:
  26050. throw new Error("mode:" + mode);
  26051. }
  26052. } else if (type < 27) {
  26053. switch (mode) {
  26054. case QRMode.MODE_NUMBER:
  26055. return 12;
  26056. case QRMode.MODE_ALPHA_NUM:
  26057. return 11;
  26058. case QRMode.MODE_8BIT_BYTE:
  26059. return 16;
  26060. case QRMode.MODE_KANJI:
  26061. return 10;
  26062. default:
  26063. throw new Error("mode:" + mode);
  26064. }
  26065. } else if (type < 41) {
  26066. switch (mode) {
  26067. case QRMode.MODE_NUMBER:
  26068. return 14;
  26069. case QRMode.MODE_ALPHA_NUM:
  26070. return 13;
  26071. case QRMode.MODE_8BIT_BYTE:
  26072. return 16;
  26073. case QRMode.MODE_KANJI:
  26074. return 12;
  26075. default:
  26076. throw new Error("mode:" + mode);
  26077. }
  26078. } else {
  26079. throw new Error("type:" + type);
  26080. }
  26081. },
  26082. getLostPoint: function getLostPoint(qrCode) {
  26083. var moduleCount = qrCode.getModuleCount();
  26084. var lostPoint = 0;
  26085. for (var row = 0; row < moduleCount; row++) {
  26086. for (var col = 0; col < moduleCount; col++) {
  26087. var sameCount = 0;
  26088. var dark = qrCode.isDark(row, col);
  26089. for (var r = -1; r <= 1; r++) {
  26090. if (row + r < 0 || moduleCount <= row + r) {
  26091. continue;
  26092. }
  26093. for (var c = -1; c <= 1; c++) {
  26094. if (col + c < 0 || moduleCount <= col + c) {
  26095. continue;
  26096. }
  26097. if (r == 0 && c == 0) {
  26098. continue;
  26099. }
  26100. if (dark == qrCode.isDark(row + r, col + c)) {
  26101. sameCount++;
  26102. }
  26103. }
  26104. }
  26105. if (sameCount > 5) {
  26106. lostPoint += 3 + sameCount - 5;
  26107. }
  26108. }
  26109. }
  26110. for (var row = 0; row < moduleCount - 1; row++) {
  26111. for (var col = 0; col < moduleCount - 1; col++) {
  26112. var count = 0;
  26113. if (qrCode.isDark(row, col)) count++;
  26114. if (qrCode.isDark(row + 1, col)) count++;
  26115. if (qrCode.isDark(row, col + 1)) count++;
  26116. if (qrCode.isDark(row + 1, col + 1)) count++;
  26117. if (count == 0 || count == 4) {
  26118. lostPoint += 3;
  26119. }
  26120. }
  26121. }
  26122. for (var row = 0; row < moduleCount; row++) {
  26123. for (var col = 0; col < moduleCount - 6; col++) {
  26124. if (qrCode.isDark(row, col) && !qrCode.isDark(row, col + 1) && qrCode.isDark(row, col + 2) && qrCode.isDark(row, col + 3) && qrCode.isDark(row, col + 4) && !qrCode.isDark(row, col + 5) && qrCode.isDark(row, col + 6)) {
  26125. lostPoint += 40;
  26126. }
  26127. }
  26128. }
  26129. for (var col = 0; col < moduleCount; col++) {
  26130. for (var row = 0; row < moduleCount - 6; row++) {
  26131. if (qrCode.isDark(row, col) && !qrCode.isDark(row + 1, col) && qrCode.isDark(row + 2, col) && qrCode.isDark(row + 3, col) && qrCode.isDark(row + 4, col) && !qrCode.isDark(row + 5, col) && qrCode.isDark(row + 6, col)) {
  26132. lostPoint += 40;
  26133. }
  26134. }
  26135. }
  26136. var darkCount = 0;
  26137. for (var col = 0; col < moduleCount; col++) {
  26138. for (var row = 0; row < moduleCount; row++) {
  26139. if (qrCode.isDark(row, col)) {
  26140. darkCount++;
  26141. }
  26142. }
  26143. }
  26144. var ratio = Math.abs(100 * darkCount / moduleCount / moduleCount - 50) / 5;
  26145. lostPoint += ratio * 10;
  26146. return lostPoint;
  26147. }
  26148. };
  26149. var QRMath = {
  26150. glog: function glog(n) {
  26151. if (n < 1) {
  26152. throw new Error("glog(" + n + ")");
  26153. }
  26154. return QRMath.LOG_TABLE[n];
  26155. },
  26156. gexp: function gexp(n) {
  26157. while (n < 0) {
  26158. n += 255;
  26159. }
  26160. while (n >= 256) {
  26161. n -= 255;
  26162. }
  26163. return QRMath.EXP_TABLE[n];
  26164. },
  26165. EXP_TABLE: new Array(256),
  26166. LOG_TABLE: new Array(256)
  26167. };
  26168. for (var i = 0; i < 8; i++) {
  26169. QRMath.EXP_TABLE[i] = 1 << i;
  26170. }
  26171. for (var i = 8; i < 256; i++) {
  26172. QRMath.EXP_TABLE[i] = QRMath.EXP_TABLE[i - 4] ^ QRMath.EXP_TABLE[i - 5] ^ QRMath.EXP_TABLE[i - 6] ^ QRMath.EXP_TABLE[i - 8];
  26173. }
  26174. for (var i = 0; i < 255; i++) {
  26175. QRMath.LOG_TABLE[QRMath.EXP_TABLE[i]] = i;
  26176. }
  26177. function QRPolynomial(num, shift) {
  26178. if (num.length == undefined) {
  26179. throw new Error(num.length + "/" + shift);
  26180. }
  26181. var offset = 0;
  26182. while (offset < num.length && num[offset] == 0) {
  26183. offset++;
  26184. }
  26185. this.num = new Array(num.length - offset + shift);
  26186. for (var i = 0; i < num.length - offset; i++) {
  26187. this.num[i] = num[i + offset];
  26188. }
  26189. }
  26190. QRPolynomial.prototype = {
  26191. get: function get(index) {
  26192. return this.num[index];
  26193. },
  26194. getLength: function getLength() {
  26195. return this.num.length;
  26196. },
  26197. multiply: function multiply(e) {
  26198. var num = new Array(this.getLength() + e.getLength() - 1);
  26199. for (var i = 0; i < this.getLength(); i++) {
  26200. for (var j = 0; j < e.getLength(); j++) {
  26201. num[i + j] ^= QRMath.gexp(QRMath.glog(this.get(i)) + QRMath.glog(e.get(j)));
  26202. }
  26203. }
  26204. return new QRPolynomial(num, 0);
  26205. },
  26206. mod: function mod(e) {
  26207. if (this.getLength() - e.getLength() < 0) {
  26208. return this;
  26209. }
  26210. var ratio = QRMath.glog(this.get(0)) - QRMath.glog(e.get(0));
  26211. var num = new Array(this.getLength());
  26212. for (var i = 0; i < this.getLength(); i++) {
  26213. num[i] = this.get(i);
  26214. }
  26215. for (var i = 0; i < e.getLength(); i++) {
  26216. num[i] ^= QRMath.gexp(QRMath.glog(e.get(i)) + ratio);
  26217. }
  26218. return new QRPolynomial(num, 0).mod(e);
  26219. }
  26220. };
  26221. function QRRSBlock(totalCount, dataCount) {
  26222. this.totalCount = totalCount;
  26223. this.dataCount = dataCount;
  26224. }
  26225. QRRSBlock.RS_BLOCK_TABLE = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1, 26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17], [2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33, 15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98, 78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61, 39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4, 36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6, 43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4, 51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6, 47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21], [12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37, 17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7, 55, 25], [11, 36, 12], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19, 2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1, 50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70, 44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44, 11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3, 67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145, 117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140, 112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75, 47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148, 118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106, 4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10, 142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47, 17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15, 28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11, 45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54, 24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54, 24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75, 47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75, 47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74, 46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146, 116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151, 121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46, 16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45, 15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55, 25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54, 24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76, 48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75, 47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]];
  26226. QRRSBlock.getRSBlocks = function (typeNumber, errorCorrectLevel) {
  26227. var rsBlock = QRRSBlock.getRsBlockTable(typeNumber, errorCorrectLevel);
  26228. if (rsBlock == undefined) {
  26229. throw new Error("bad rs block @ typeNumber:" + typeNumber + "/errorCorrectLevel:" + errorCorrectLevel);
  26230. }
  26231. var length = rsBlock.length / 3;
  26232. var list = [];
  26233. for (var i = 0; i < length; i++) {
  26234. var count = rsBlock[i * 3 + 0];
  26235. var totalCount = rsBlock[i * 3 + 1];
  26236. var dataCount = rsBlock[i * 3 + 2];
  26237. for (var j = 0; j < count; j++) {
  26238. list.push(new QRRSBlock(totalCount, dataCount));
  26239. }
  26240. }
  26241. return list;
  26242. };
  26243. QRRSBlock.getRsBlockTable = function (typeNumber, errorCorrectLevel) {
  26244. switch (errorCorrectLevel) {
  26245. case QRErrorCorrectLevel.L:
  26246. return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 0];
  26247. case QRErrorCorrectLevel.M:
  26248. return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 1];
  26249. case QRErrorCorrectLevel.Q:
  26250. return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 2];
  26251. case QRErrorCorrectLevel.H:
  26252. return QRRSBlock.RS_BLOCK_TABLE[(typeNumber - 1) * 4 + 3];
  26253. default:
  26254. return undefined;
  26255. }
  26256. };
  26257. function QRBitBuffer() {
  26258. this.buffer = [];
  26259. this.length = 0;
  26260. }
  26261. QRBitBuffer.prototype = {
  26262. get: function get(index) {
  26263. var bufIndex = Math.floor(index / 8);
  26264. return (this.buffer[bufIndex] >>> 7 - index % 8 & 1) == 1;
  26265. },
  26266. put: function put(num, length) {
  26267. for (var i = 0; i < length; i++) {
  26268. this.putBit((num >>> length - i - 1 & 1) == 1);
  26269. }
  26270. },
  26271. getLengthInBits: function getLengthInBits() {
  26272. return this.length;
  26273. },
  26274. putBit: function putBit(bit) {
  26275. var bufIndex = Math.floor(this.length / 8);
  26276. if (this.buffer.length <= bufIndex) {
  26277. this.buffer.push(0);
  26278. }
  26279. if (bit) {
  26280. this.buffer[bufIndex] |= 0x80 >>> this.length % 8;
  26281. }
  26282. this.length++;
  26283. }
  26284. };
  26285. var QRCodeLimitLength = [[17, 14, 11, 7], [32, 26, 20, 14], [53, 42, 32, 24], [78, 62, 46, 34], [106, 84, 60, 44], [134, 106, 74, 58], [154, 122, 86, 64], [192, 152, 108, 84], [230, 180, 130, 98], [271, 213, 151, 119], [321, 251, 177, 137], [367, 287, 203, 155], [425, 331, 241, 177], [458, 362, 258, 194], [520, 412, 292, 220], [586, 450, 322, 250], [644, 504, 364, 280], [718, 560, 394, 310], [792, 624, 442, 338], [858, 666, 482, 382], [929, 711, 509, 403], [1003, 779, 565, 439], [1091, 857, 611, 461], [1171, 911, 661, 511], [1273, 997, 715, 535], [1367, 1059, 751, 593], [1465, 1125, 805, 625], [1528, 1190, 868, 658], [1628, 1264, 908, 698], [1732, 1370, 982, 742], [1840, 1452, 1030, 790], [1952, 1538, 1112, 842], [2068, 1628, 1168, 898], [2188, 1722, 1228, 958], [2303, 1809, 1283, 983], [2431, 1911, 1351, 1051], [2563, 1989, 1423, 1093], [2699, 2099, 1499, 1139], [2809, 2213, 1579, 1219], [2953, 2331, 1663, 1273]];
  26286. // QRCode object
  26287. QRCode = function QRCode(canvasId, vOption) {
  26288. this._htOption = {
  26289. width: 256,
  26290. height: 256,
  26291. typeNumber: 4,
  26292. colorDark: "#000000",
  26293. colorLight: "#ffffff",
  26294. correctLevel: QRErrorCorrectLevel.H
  26295. };
  26296. if (typeof vOption === 'string') {
  26297. vOption = {
  26298. text: vOption
  26299. };
  26300. }
  26301. // Overwrites options
  26302. if (vOption) {
  26303. for (var i in vOption) {
  26304. this._htOption[i] = vOption[i];
  26305. }
  26306. }
  26307. this._oQRCode = null;
  26308. this.canvasId = canvasId;
  26309. if (this._htOption.text && this.canvasId) {
  26310. this.makeCode(this._htOption.text);
  26311. }
  26312. };
  26313. QRCode.prototype.makeCode = function (sText) {
  26314. this._oQRCode = new QRCodeModel(_getTypeNumber(sText, this._htOption.correctLevel), this._htOption.correctLevel);
  26315. this._oQRCode.addData(sText);
  26316. this._oQRCode.make();
  26317. this.makeImage();
  26318. };
  26319. QRCode.prototype.makeImage = function () {
  26320. var _oContext;
  26321. if (this._htOption.usingIn) {
  26322. _oContext = wx.createCanvasContext(this.canvasId, this._htOption.usingIn);
  26323. } else {
  26324. _oContext = wx.createCanvasContext(this.canvasId);
  26325. }
  26326. var _htOption = this._htOption;
  26327. var oQRCode = this._oQRCode;
  26328. var nCount = oQRCode.getModuleCount();
  26329. var nWidth = _htOption.width / nCount;
  26330. var nHeight = _htOption.height / nCount;
  26331. var nRoundedWidth = Math.round(nWidth);
  26332. var nRoundedHeight = Math.round(nHeight);
  26333. if (_htOption.image && _htOption.image != '') {
  26334. _oContext.drawImage(_htOption.image, 0, 0, _htOption.width, _htOption.height);
  26335. }
  26336. for (var row = 0; row < nCount; row++) {
  26337. for (var col = 0; col < nCount; col++) {
  26338. var bIsDark = oQRCode.isDark(row, col);
  26339. var nLeft = col * nWidth;
  26340. var nTop = row * nHeight;
  26341. _oContext.setStrokeStyle(bIsDark ? _htOption.colorDark : _htOption.colorLight);
  26342. // _oContext.setStrokeStyle('yellow')
  26343. _oContext.setLineWidth(1);
  26344. _oContext.setFillStyle(bIsDark ? _htOption.colorDark : _htOption.colorLight);
  26345. // _oContext.setFillStyle('red')
  26346. // if (bIsDark) {
  26347. _oContext.fillRect(nLeft, nTop, nWidth, nHeight);
  26348. // }
  26349. // 안티 앨리어싱 방지 처리
  26350. // if (bIsDark) {
  26351. _oContext.strokeRect(Math.floor(nLeft) + 0.5, Math.floor(nTop) + 0.5, nRoundedWidth, nRoundedHeight);
  26352. _oContext.strokeRect(Math.ceil(nLeft) - 0.5, Math.ceil(nTop) - 0.5, nRoundedWidth, nRoundedHeight);
  26353. // }
  26354. // _oContext.fillRect(
  26355. // Math.floor(nLeft) + 0.5,
  26356. // Math.floor(nTop) + 0.5,
  26357. // nRoundedWidth,
  26358. // nRoundedHeight
  26359. // );
  26360. // _oContext.fillRect(
  26361. // Math.ceil(nLeft) - 0.5,
  26362. // Math.ceil(nTop) - 0.5,
  26363. // nRoundedWidth,
  26364. // nRoundedHeight
  26365. // );
  26366. // _oContext.clearRect(
  26367. // Math.floor(nLeft) + 0.5,
  26368. // Math.floor(nTop) + 0.5,
  26369. // nRoundedWidth,
  26370. // nRoundedHeight
  26371. // );
  26372. // _oContext.clearRect(
  26373. // Math.ceil(nLeft) - 0.5,
  26374. // Math.ceil(nTop) - 0.5,
  26375. // nRoundedWidth,
  26376. // nRoundedHeight
  26377. // );
  26378. }
  26379. }
  26380. _oContext.draw();
  26381. };
  26382. // 保存为图片,将临时路径传给回调
  26383. QRCode.prototype.exportImage = function (callback) {
  26384. if (!callback) {
  26385. return;
  26386. }
  26387. wx.canvasToTempFilePath({
  26388. x: 0,
  26389. y: 0,
  26390. width: this._htOption.width,
  26391. height: this._htOption.height,
  26392. destWidth: this._htOption.width,
  26393. destHeight: this._htOption.height,
  26394. canvasId: this.canvasId,
  26395. success: function success(res) {
  26396. console.log(res.tempFilePath);
  26397. callback(res.tempFilePath);
  26398. }
  26399. });
  26400. };
  26401. QRCode.CorrectLevel = QRErrorCorrectLevel;
  26402. })();
  26403. module.exports = QRCode;
  26404. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
  26405. /***/ })
  26406. ]]);
  26407. //# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map